blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
listlengths
1
1
author
stringlengths
0
119
1a8ddc71e64faaf3f35cc30aa2d8abea3d3db890
ac227cc22d5f5364e5d029a2cef83816a6954590
/src/shared/spawn_job_graph_command.h
34ac0014f6f788dba4667f7d46e03d8e54c6974b
[ "BSD-3-Clause" ]
permissive
schinmayee/nimbus
597185bc8bac91a2480466cebc8b337f5d96bd2e
170cd15e24a7a88243a6ea80aabadc0fc0e6e177
refs/heads/master
2020-03-11T11:42:39.262834
2018-04-18T01:28:23
2018-04-18T01:28:23
129,976,755
0
0
BSD-3-Clause
2018-04-17T23:33:23
2018-04-17T23:33:23
null
UTF-8
C++
false
false
3,354
h
/* * Copyright 2013 Stanford University. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * - Neither the name of the copyright holders nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * A SpawnJobGraphCommand is a message sent from a worker to the * controller to spawn an instance of the job graph template. * * Author: Omid Mashayekhi <omidm@stanford.edu> */ #ifndef NIMBUS_SRC_SHARED_SPAWN_JOB_GRAPH_COMMAND_H_ #define NIMBUS_SRC_SHARED_SPAWN_JOB_GRAPH_COMMAND_H_ #include <string> #include <vector> #include "src/shared/scheduler_command.h" #include "src/shared/geometric_region.h" #include "src/shared/protobuf_compiled/commands.pb.h" namespace nimbus { class SpawnJobGraphCommand : public SchedulerCommand { public: SpawnJobGraphCommand(); SpawnJobGraphCommand(const std::string& job_graph_name, const std::vector<job_id_t>& inner_job_ids, const std::vector<job_id_t>& outer_job_ids, const std::vector<Parameter>& parameters, const ID<job_id_t>& parent_job_id); ~SpawnJobGraphCommand(); virtual SchedulerCommand* Clone(); virtual bool Parse(const std::string& param_segment); virtual bool Parse(const SchedulerPBuf& buf); virtual std::string ToNetworkData(); virtual std::string ToString(); std::string job_graph_name(); std::vector<job_id_t> inner_job_ids(); std::vector<job_id_t> outer_job_ids(); std::vector<Parameter> parameters(); ID<job_id_t> parent_job_id(); private: std::string job_graph_name_; std::vector<job_id_t> inner_job_ids_; std::vector<job_id_t> outer_job_ids_; std::vector<Parameter> parameters_; ID<job_id_t> parent_job_id_; bool ReadFromProtobuf(const SubmitJobGraphPBuf& buf); bool WriteToProtobuf(SubmitJobGraphPBuf* buf); }; } // namespace nimbus #endif // NIMBUS_SRC_SHARED_SPAWN_JOB_GRAPH_COMMAND_H_
[ "omidm@stanford.edu" ]
omidm@stanford.edu
45d26f4065d6a0e051b505cf5057fe1fc1fdf6dc
97478e6083db1b7ec79680cfcfd78ed6f5895c7d
/chrome/browser/chooser_controller/chooser_controller.cc
ff464cac68f2586b0eaec36be2fe267287a08b55
[ "BSD-3-Clause" ]
permissive
zeph1912/milkomeda_chromium
94e81510e1490d504b631a29af2f1fef76110733
7b29a87147c40376bcdd1742f687534bcd0e4c78
refs/heads/master
2023-03-15T11:05:27.924423
2018-12-19T07:58:08
2018-12-19T07:58:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,930
cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chooser_controller/chooser_controller.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" #include "components/url_formatter/elide_url.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/constants.h" #include "ui/base/l10n/l10n_util.h" #include "url/origin.h" namespace { base::string16 CreateTitle(content::RenderFrameHost* render_frame_host, int title_string_id_origin, int title_string_id_extension) { url::Origin origin = render_frame_host->GetLastCommittedOrigin(); if (origin.scheme() == extensions::kExtensionScheme) { content::WebContents* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); content::BrowserContext* browser_context = web_contents->GetBrowserContext(); extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry::Get(browser_context); if (extension_registry) { const extensions::Extension* extension = extension_registry->enabled_extensions().GetByID(origin.host()); if (extension) { return l10n_util::GetStringFUTF16(title_string_id_extension, base::UTF8ToUTF16(extension->name())); } } } return l10n_util::GetStringFUTF16( title_string_id_origin, url_formatter::FormatOriginForSecurityDisplay( origin, url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC)); } } // namespace ChooserController::ChooserController(content::RenderFrameHost* owner, int title_string_id_origin, int title_string_id_extension) { if (owner) { title_ = CreateTitle(owner, title_string_id_origin, title_string_id_extension); } } ChooserController::~ChooserController() {} base::string16 ChooserController::GetTitle() const { return title_; } bool ChooserController::ShouldShowIconBeforeText() const { return false; } bool ChooserController::ShouldShowFootnoteView() const { return true; } bool ChooserController::AllowMultipleSelection() const { return false; } int ChooserController::GetSignalStrengthLevel(size_t index) const { return -1; } bool ChooserController::IsConnected(size_t index) const { return false; } bool ChooserController::IsPaired(size_t index) const { return false; } void ChooserController::RefreshOptions() { NOTREACHED(); } base::string16 ChooserController::GetStatus() const { return base::string16(); } void ChooserController::OpenAdapterOffHelpUrl() const { NOTREACHED(); }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
6921a87bf771696094730e35e77f99aa2ec725de
b4c9a89b9acf805ba7d6beb43eac29d48d71944d
/client/src/clientshipwrecklord.cpp
4f6eb02fcc108313ebbbc2a098ffa98150b65182
[]
no_license
ufaith/mir2x
5db0b5132c69cf63b4ce8e74b65b062164720feb
2e08a371794372c346b0cd43934a8785bfedd133
refs/heads/master
2022-03-26T01:45:33.209809
2022-02-22T21:29:35
2022-02-22T21:29:35
93,562,935
1
0
null
2017-06-06T20:54:08
2017-06-06T20:54:08
null
UTF-8
C++
false
false
1,637
cpp
#include "dbcomid.hpp" #include "processrun.hpp" #include "dbcomrecord.hpp" #include "motioneffect.hpp" #include "clientshipwrecklord.hpp" bool ClientShipwreckLord::onActionAttack(const ActionNode &action) { const auto [endX, endY, endDir] = motionEndGLoc().at(1); m_motionQueue = makeWalkMotionQueue(endX, endY, action.x, action.y, SYS_MAXSPEED); switch(const auto magicID = action.extParam.attack.magicID){ case DBCOM_MAGICID(u8"物理攻击"): { m_motionQueue.push_back(std::unique_ptr<MotionNode>(new MotionNode { .type = MOTION_MON_ATTACK0, .direction = m_processRun->getAimDirection(action, currMotion()->direction), .x = action.x, .y = action.y, })); m_motionQueue.back()->effect.reset(new MotionSyncEffect(u8"霸王教主_火刃", u8"运行", this, m_motionQueue.back().get())); return true; } case DBCOM_MAGICID(u8"霸王教主_野蛮冲撞"): { m_motionQueue.push_back(std::unique_ptr<MotionNode>(new MotionNode { .type = MOTION_MON_SPELL0, .direction = m_processRun->getAimDirection(action, currMotion()->direction), .x = action.x, .y = action.y, })); return true; } default: { throw fflerror("invalid DC: id = %d, name = %s", to_d(magicID), to_cstr(DBCOM_MAGICRECORD(magicID).name)); } } }
[ "anhonghe@gmail.com" ]
anhonghe@gmail.com
3196c9bc0ce330fb5dbd53ec167ab174b5851898
01272e18b570aec27ed61a8e0d8cb6445949a4d4
/DebouncedInput.cpp
5ce12cf9e532e07d757ddcc3a8ad102708471939
[]
no_license
xdannys9/FinalProject
790590d832d7dec3537014528f7bb70d15856af5
4a6ca7a8313cc1126a4e67c7a61f332c4a2ade12
refs/heads/master
2021-01-10T01:19:14.576630
2016-02-23T08:31:58
2016-02-23T08:31:58
52,306,814
0
0
null
null
null
null
UTF-8
C++
false
false
1,010
cpp
/* * DebouncedInput.cpp * * Created on: 31.1.2016 * Author: krl */ #include "DebouncedInput.h" DebouncedInput::DebouncedInput(int arduinoPin, unsigned int debounceTimeMs) : DigitalIoPin(arduinoPin, DigitalIoPin::pullup, true), stableTime(0), last(0), state(false), debounceTime(debounceTimeMs) { // TODO Auto-generated constructor stub } DebouncedInput::~DebouncedInput() { // TODO Auto-generated destructor stub } bool DebouncedInput::read() { bool value = DigitalIoPin::read(); unsigned int now = GetSysticks(); // see if current value is different from last reported value if(value != state) { // it is different from last reported increment stable time counter stableTime += now - last; } else { // went back to old value - reset stable time counter stableTime = 0; } last = now; // we change the reported value only when the new value has been stable for at least debounceTime if(stableTime > debounceTime) { state = value; stableTime = 0; } return state; }
[ "dansu@metropolia.fi" ]
dansu@metropolia.fi
1528c3dfd8b1489665217eb6449a300ec2a74845
920e2db3f486ea30f8477fb299f7431041cb0f27
/max_of_all_subarrays.h
06c0ff1643c57f7ea088ec72b18263add7b4e35e
[]
no_license
goooog2009/interview
7432799296082211e35c74965d6375086cde05cc
c3443c3e70baaf2c0bafa23b2827264d2385969e
refs/heads/master
2021-01-16T19:04:44.050466
2015-05-31T02:08:59
2015-05-31T02:08:59
36,583,968
0
0
null
null
null
null
UTF-8
C++
false
false
1,635
h
/* http://www.geeksforgeeks.org/maximum-of-all-subarrays-of-size-k/ Given an array and an integer k, find the maximum for each and every contiguous subarray of size k. Examples: Input : arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6} k = 3 Output : 3 3 4 5 5 5 6 Input : arr[] = {8, 5, 10, 7, 9, 4, 15, 12, 90, 13} k = 4 Output : 10 10 10 15 15 90 90 */ #pragma once #include "util.h" #include <vector> #include <deque> namespace MaxOfAllSubarrays { using namespace std; vector<int> MaxOfAllSubarrays(const vector<int>& v, size_t k) { deque<int> d; for (size_t i = 0; i < k; ++i) { while (!d.empty() && v[d.back()] <= v[i]) { d.pop_back(); } d.push_back(i); } vector<int> vmax; for (size_t i = k; i < v.size(); ++i) { vmax.push_back(v[d.front()]); while (!d.empty() && v[d.back()] <= v[i]) { d.pop_back(); } while (!d.empty() && (i - d.front()) >= k) { d.pop_front(); } d.push_back(i); } vmax.push_back(v[d.front()]); return vmax; } void Run() { vector<vector<int>> v = { {1, 2, 3, 1, 4, 5, 2, 3, 6} , {8, 5, 10, 7, 9, 4, 15, 12, 90, 13} }; vector<size_t> k = {3, 4}; vector<vector<int>> ans = { {3, 3, 4, 5, 5, 5, 6} , {10, 10, 10, 15, 15, 90, 90} }; util::TestOne("case 0", MaxOfAllSubarrays(v[0], k[0]), ans[0]); util::TestOne("case 1", MaxOfAllSubarrays(v[1], k[1]), ans[1]); } }
[ "dkotlyarov@gmail.com" ]
dkotlyarov@gmail.com
4dd2366c298f7ec4e83b08ed5c9c229ed93b1a85
f83ef53177180ebfeb5a3e230aa29794f52ce1fc
/opencv/opencv-3.4.2/modules/videoio/src/cap_ximea.cpp
afc08879411b554adcf7bf0aab24a1ac1413f864
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
msrLi/portingSources
fe7528b3fd08eed4a1b41383c88ee5c09c2294ef
57d561730ab27804a3172b33807f2bffbc9e52ae
refs/heads/master
2021-07-08T01:22:29.604203
2019-07-10T13:07:06
2019-07-10T13:07:06
196,183,165
2
1
Apache-2.0
2020-10-13T14:30:53
2019-07-10T10:16:46
null
UTF-8
C++
false
false
59,550
cpp
#include "precomp.hpp" #ifdef _WIN32 #include <xiApi.h> #else #include <m3api/xiApi.h> #endif using namespace std; /**********************************************************************************/ class CvCaptureCAM_XIMEA : public CvCapture { public: CvCaptureCAM_XIMEA() { init(); } virtual ~CvCaptureCAM_XIMEA() { close(); } virtual bool open( int index ); bool open( const char* deviceName ); virtual void close(); virtual double getProperty(int) const CV_OVERRIDE; virtual bool setProperty(int, double) CV_OVERRIDE; virtual bool grabFrame() CV_OVERRIDE; virtual IplImage* retrieveFrame(int) CV_OVERRIDE; virtual int getCaptureDomain() CV_OVERRIDE { return CV_CAP_XIAPI; } // Return the type of the capture object: CV_CAP_VFW, etc... private: bool _open(); void init(); void errMsg(const char* msg, int errNum) const; void resetCvImage(); int ocvParamtoXimeaParam(int value) const; IplImage* frame; HANDLE hmv; DWORD numDevices; int timeout; XI_IMG image; }; /**********************************************************************************/ CvCapture* cvCreateCameraCapture_XIMEA( int index ) { CvCaptureCAM_XIMEA* capture = new CvCaptureCAM_XIMEA; if( capture->open( index )) return capture; delete capture; return 0; } CvCapture* cvCreateCameraCapture_XIMEA( const char* serialNumber ) { CvCaptureCAM_XIMEA* capture = new CvCaptureCAM_XIMEA; if( capture->open( serialNumber )) return capture; delete capture; return 0; } /**********************************************************************************/ // Enumerate connected devices void CvCaptureCAM_XIMEA::init() { #if defined _WIN32 xiGetNumberDevices( &numDevices); #else // try second re-enumeration if first one fails if (xiGetNumberDevices( &numDevices) != XI_OK) { xiGetNumberDevices( &numDevices); } #endif hmv = NULL; frame = NULL; timeout = 0; memset(&image, 0, sizeof(XI_IMG)); } /**********************************************************************************/ // Initialize camera input bool CvCaptureCAM_XIMEA::open( int wIndex ) { if(numDevices == 0) return false; int mvret = XI_OK; if((mvret = xiOpenDevice( wIndex, &hmv)) != XI_OK) { #if defined _WIN32 errMsg("Open XI_DEVICE failed", mvret); return false; #else // try opening second time if first fails if((mvret = xiOpenDevice( wIndex, &hmv)) != XI_OK) { errMsg("Open XI_DEVICE failed", mvret); return false; } #endif } return _open(); } bool CvCaptureCAM_XIMEA::open( const char* serialNumber ) { if(numDevices == 0) return false; int mvret = XI_OK; if((mvret = xiOpenDeviceBy(XI_OPEN_BY_SN, serialNumber, &hmv)) != XI_OK) { errMsg("Open XI_DEVICE failed", mvret); return false; } return _open(); } bool CvCaptureCAM_XIMEA::_open() { #define HandleXiResult(res) if (res!=XI_OK) goto error; int width = 0; int height = 0; int isColor = 0; // always use auto exposure/gain int mvret = xiSetParamInt( hmv, XI_PRM_AEAG, 1); HandleXiResult(mvret); mvret = xiGetParamInt( hmv, XI_PRM_WIDTH, &width); HandleXiResult(mvret); mvret = xiGetParamInt( hmv, XI_PRM_HEIGHT, &height); HandleXiResult(mvret); mvret = xiGetParamInt(hmv, XI_PRM_IMAGE_IS_COLOR, &isColor); HandleXiResult(mvret); if(isColor) // for color cameras { // default image format RGB24 mvret = xiSetParamInt( hmv, XI_PRM_IMAGE_DATA_FORMAT, XI_RGB24); HandleXiResult(mvret); // always use auto white balance for color cameras mvret = xiSetParamInt( hmv, XI_PRM_AUTO_WB, 1); HandleXiResult(mvret); // allocate frame buffer for RGB24 image frame = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 3); } else // for mono cameras { // default image format MONO8 mvret = xiSetParamInt( hmv, XI_PRM_IMAGE_DATA_FORMAT, XI_MONO8); HandleXiResult(mvret); // allocate frame buffer for MONO8 image frame = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 1); } //default capture timeout 10s timeout = 10000; mvret = xiStartAcquisition(hmv); if(mvret != XI_OK) { errMsg("StartAcquisition XI_DEVICE failed", mvret); goto error; } return true; error: errMsg("Open XI_DEVICE failed", mvret); xiCloseDevice(hmv); hmv = NULL; return false; } /**********************************************************************************/ void CvCaptureCAM_XIMEA::close() { if(frame) cvReleaseImage(&frame); if(hmv) { xiStopAcquisition(hmv); xiCloseDevice(hmv); } hmv = NULL; } /**********************************************************************************/ bool CvCaptureCAM_XIMEA::grabFrame() { memset(&image, 0, sizeof(XI_IMG)); image.size = sizeof(XI_IMG); int mvret = xiGetImage( hmv, timeout, &image); if(mvret == XI_ACQUISITION_STOPED) { xiStartAcquisition(hmv); mvret = xiGetImage(hmv, timeout, &image); } if(mvret != XI_OK) { errMsg("Error during GetImage", mvret); return false; } return true; } /**********************************************************************************/ IplImage* CvCaptureCAM_XIMEA::retrieveFrame(int) { // update cvImage after format has changed resetCvImage(); // copy pixel data switch( image.frm) { case XI_MONO8 : case XI_RAW8 : memcpy( frame->imageData, image.bp, image.width*image.height); break; case XI_MONO16 : case XI_RAW16 : memcpy( frame->imageData, image.bp, image.width*image.height*sizeof(WORD)); break; case XI_RGB24 : case XI_RGB_PLANAR : memcpy( frame->imageData, image.bp, image.width*image.height*3); break; case XI_RGB32 : memcpy( frame->imageData, image.bp, image.width*image.height*4); break; default: break; } return frame; } /**********************************************************************************/ void CvCaptureCAM_XIMEA::resetCvImage() { bool do_reset = false; // first check basic image resolution if((int)image.width != frame->width || (int)image.height != frame->height) do_reset = true; // afterwards check image format switch( image.frm) { case XI_MONO8 : case XI_RAW8 : { if(frame->depth != IPL_DEPTH_8U || frame->nChannels != 1) do_reset = true; } break; case XI_MONO16 : case XI_RAW16 : { if(frame->depth != IPL_DEPTH_16U || frame->nChannels != 1) do_reset = true; } break; case XI_RGB24 : case XI_RGB_PLANAR : { if(frame->depth != IPL_DEPTH_8U || frame->nChannels != 3) do_reset = true; } break; case XI_RGB32 : { if(frame->depth != IPL_DEPTH_8U || frame->nChannels != 4) do_reset = true; } break; default: errMsg("CvCaptureCAM_XIMEA::resetCvImage ERROR: Unknown format.", XI_NOT_SUPPORTED_DATA_FORMAT); return; } if(do_reset) { if(frame) cvReleaseImage(&frame); frame = NULL; switch( image.frm) { case XI_MONO8 : case XI_RAW8 : frame = cvCreateImage(cvSize( image.width, image.height), IPL_DEPTH_8U, 1); break; case XI_MONO16 : case XI_RAW16 : frame = cvCreateImage(cvSize( image.width, image.height), IPL_DEPTH_16U, 1); break; case XI_RGB24 : case XI_RGB_PLANAR : frame = cvCreateImage(cvSize( image.width, image.height), IPL_DEPTH_8U, 3); break; case XI_RGB32 : frame = cvCreateImage(cvSize( image.width, image.height), IPL_DEPTH_8U, 4); break; default : errMsg("CvCaptureCAM_XIMEA::resetCvImage ERROR: Unknown format.", XI_NOT_SUPPORTED_DATA_FORMAT); return; } } cvZero(frame); } /**********************************************************************************/ int CvCaptureCAM_XIMEA::ocvParamtoXimeaParam(int property_id) const { XI_RETURN stat = XI_OK; switch (property_id) { // OCV parameters case CV_CAP_PROP_POS_FRAMES: // Number of successfully transferred frames on transport layer. stat = xiSetParamInt(hmv, XI_PRM_COUNTER_SELECTOR, XI_CNT_SEL_TRANSPORT_TRANSFERRED_FRAMES); if (stat) errMsg("xiSetParamInt(XI_PRM_COUNTER_SELECTOR)", stat); return CV_CAP_PROP_XI_COUNTER_VALUE; case CV_CAP_PROP_FRAME_WIDTH: return CV_CAP_PROP_XI_WIDTH; case CV_CAP_PROP_FRAME_HEIGHT: return CV_CAP_PROP_XI_HEIGHT; case CV_CAP_PROP_FPS: return CV_CAP_PROP_XI_FRAMERATE; case CV_CAP_PROP_GAIN: return CV_CAP_PROP_XI_GAIN; case CV_CAP_PROP_EXPOSURE: return CV_CAP_PROP_XI_EXPOSURE; case CV_CAP_PROP_XI_DATA_FORMAT: return CV_CAP_PROP_XI_IMAGE_DATA_FORMAT; default: return property_id; } } /**********************************************************************************/ bool CvCaptureCAM_XIMEA::setProperty( int property_id, double value ) { bool setProp_result = true; bool doAcqReset = false; string ximea_param = ""; int ival = (int) value; float fval = (float) value; XI_PRM_TYPE value_type = xiTypeInteger; XI_RETURN stat = XI_OK; if(hmv == NULL) { errMsg("CvCaptureCAM_XIMEA::setProperty", XI_INVALID_HANDLE); return false; } // convert OCV property id to XIMEA id if necessary property_id = ocvParamtoXimeaParam(property_id); // decode OpenCV parameter to xiAPI parameter switch( property_id ) { case CV_CAP_PROP_XI_TIMEOUT: timeout = (int) value; return true; case CV_CAP_PROP_XI_EXPOSURE: ximea_param = "exposure"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_EXPOSURE_BURST_COUNT: ximea_param = "exposure_burst_count"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_GAIN_SELECTOR: ximea_param = "gain_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GAIN: ximea_param = "gain"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_DOWNSAMPLING: ximea_param = "downsampling"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_DOWNSAMPLING_TYPE: ximea_param = "downsampling_type"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_BINNING_SELECTOR: ximea_param = "binning_selector"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_BINNING_VERTICAL: ximea_param = "binning_vertical"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_BINNING_HORIZONTAL: ximea_param = "binning_horizontal"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_BINNING_PATTERN: ximea_param = "binning_pattern"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_DECIMATION_SELECTOR: ximea_param = "decimation_selector"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_DECIMATION_VERTICAL: ximea_param = "decimation_vertical"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_DECIMATION_HORIZONTAL: ximea_param = "decimation_horizontal"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_DECIMATION_PATTERN: ximea_param = "decimation_pattern"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR: ximea_param = "test_pattern_generator_selector"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_TEST_PATTERN: ximea_param = "test_pattern"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_IMAGE_DATA_FORMAT: ximea_param = "imgdataformat"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_SHUTTER_TYPE: ximea_param = "shutter_type"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_SENSOR_TAPS: ximea_param = "sensor_taps"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_AEAG: ximea_param = "aeag"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_AEAG_ROI_OFFSET_X: ximea_param = "aeag_roi_offset_x"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_ROI_OFFSET_Y: ximea_param = "aeag_roi_offset_y"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_ROI_WIDTH: ximea_param = "aeag_roi_width"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_ROI_HEIGHT: ximea_param = "aeag_roi_height"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_BPC: ximea_param = "bpc"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_AUTO_WB: ximea_param = "auto_wb"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_MANUAL_WB: ximea_param = "manual_wb"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_WB_KR: ximea_param = "wb_kr"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_WB_KG: ximea_param = "wb_kg"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_WB_KB: ximea_param = "wb_kb"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_WIDTH: ximea_param = "width"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_HEIGHT: ximea_param = "height"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_OFFSET_X: ximea_param = "offsetX"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_OFFSET_Y: ximea_param = "offsetY"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_REGION_SELECTOR : ximea_param = "region_selector"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_REGION_MODE : ximea_param = "region_mode"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_EXP_PRIORITY: ximea_param = "exp_priority"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_AG_MAX_LIMIT: ximea_param = "ag_max_limit"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_AE_MAX_LIMIT: ximea_param = "ae_max_limit"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_LEVEL: ximea_param = "aeag_level"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LIMIT_BANDWIDTH: ximea_param = "limit_bandwidth"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH: ximea_param = "sensor_bit_depth"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH: ximea_param = "output_bit_depth"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH: ximea_param = "image_data_bit_depth"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_OUTPUT_DATA_PACKING: ximea_param = "output_bit_packing"; value_type = xiTypeBoolean; doAcqReset = true; break; case CV_CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE: ximea_param = "output_bit_packing_type"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_IS_COOLED: ximea_param = "iscooled"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_COOLING: ximea_param = "cooling"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_TARGET_TEMP: ximea_param = "target_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CHIP_TEMP: ximea_param = "chip_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_HOUS_TEMP: ximea_param = "hous_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_HOUS_BACK_SIDE_TEMP: ximea_param = "hous_back_side_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_SENSOR_BOARD_TEMP: ximea_param = "sensor_board_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CMS: ximea_param = "cms"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_APPLY_CMS: ximea_param = "apply_cms"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_IMAGE_IS_COLOR: ximea_param = "iscolor"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_COLOR_FILTER_ARRAY: ximea_param = "cfa"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GAMMAY: ximea_param = "gammaY"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_GAMMAC: ximea_param = "gammaC"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_SHARPNESS: ximea_param = "sharpness"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_00: ximea_param = "ccMTX00"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_01: ximea_param = "ccMTX01"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_02: ximea_param = "ccMTX02"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_03: ximea_param = "ccMTX03"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_10: ximea_param = "ccMTX10"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_11: ximea_param = "ccMTX11"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_12: ximea_param = "ccMTX12"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_13: ximea_param = "ccMTX13"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_20: ximea_param = "ccMTX20"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_21: ximea_param = "ccMTX21"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_22: ximea_param = "ccMTX22"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_23: ximea_param = "ccMTX23"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_30: ximea_param = "ccMTX30"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_31: ximea_param = "ccMTX31"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_32: ximea_param = "ccMTX32"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_33: ximea_param = "ccMTX33"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_DEFAULT_CC_MATRIX: ximea_param = "defccMTX"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_TRG_SOURCE: ximea_param = "trigger_source"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_TRG_SOFTWARE: ximea_param = "trigger_software"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_TRG_SELECTOR: ximea_param = "trigger_selector"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_ACQ_FRAME_BURST_COUNT: ximea_param = "acq_frame_burst_count"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_GPI_SELECTOR: ximea_param = "gpi_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GPI_MODE: ximea_param = "gpi_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GPI_LEVEL: ximea_param = "gpi_level"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_GPO_SELECTOR: ximea_param = "gpo_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GPO_MODE: ximea_param = "gpo_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LED_SELECTOR: ximea_param = "led_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LED_MODE: ximea_param = "led_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_DEBOUNCE_EN: ximea_param = "dbnc_en"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_DEBOUNCE_T0: ximea_param = "dbnc_t0"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEBOUNCE_T1: ximea_param = "dbnc_t1"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEBOUNCE_POL: ximea_param = "dbnc_pol"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LENS_MODE: ximea_param = "lens_mode"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_LENS_APERTURE_VALUE: ximea_param = "lens_aperture_value"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE: ximea_param = "lens_focus_movement_value"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LENS_FOCUS_MOVE: ximea_param = "lens_focus_move"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_LENS_FOCUS_DISTANCE: ximea_param = "lens_focus_distance"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_LENS_FOCAL_LENGTH: ximea_param = "lens_focal_length"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_LENS_FEATURE_SELECTOR: ximea_param = "lens_feature_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LENS_FEATURE: ximea_param = "lens_feature"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_DEVICE_MODEL_ID: ximea_param = "device_model_id"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEVICE_SN: ximea_param = "device_sn"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA: ximea_param = "imgdataformatrgb32alpha"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_IMAGE_PAYLOAD_SIZE: ximea_param = "imgpayloadsize"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT: ximea_param = "transport_pixel_format"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ: ximea_param = "sensor_clock_freq_hz"; value_type = xiTypeFloat; doAcqReset = true; break; case CV_CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX: ximea_param = "sensor_clock_freq_index"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT: ximea_param = "sensor_output_channel_count"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_FRAMERATE: ximea_param = "framerate"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_COUNTER_SELECTOR: ximea_param = "counter_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_COUNTER_VALUE: ximea_param = "counter_value"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_ACQ_TIMING_MODE: ximea_param = "acq_timing_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_AVAILABLE_BANDWIDTH: ximea_param = "available_bandwidth"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_BUFFER_POLICY: ximea_param = "buffer_policy"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LUT_EN: ximea_param = "LUTEnable"; value_type = xiTypeBoolean; doAcqReset = true; break; case CV_CAP_PROP_XI_LUT_INDEX: ximea_param = "LUTIndex"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_LUT_VALUE: ximea_param = "LUTValue"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_TRG_DELAY: ximea_param = "trigger_delay"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TS_RST_MODE: ximea_param = "ts_rst_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TS_RST_SOURCE: ximea_param = "ts_rst_source"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_IS_DEVICE_EXIST: ximea_param = "isexist"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_ACQ_BUFFER_SIZE: ximea_param = "acq_buffer_size"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT: ximea_param = "acq_buffer_size_unit"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE: ximea_param = "acq_transport_buffer_size"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_BUFFERS_QUEUE_SIZE: ximea_param = "buffers_queue_size"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT: ximea_param = "acq_transport_buffer_commit"; value_type = xiTypeInteger; doAcqReset = true; break; case CV_CAP_PROP_XI_RECENT_FRAME: ximea_param = "recent_frame"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_DEVICE_RESET: ximea_param = "device_reset"; value_type = xiTypeCommand; doAcqReset = true; break; case CV_CAP_PROP_XI_COLUMN_FPN_CORRECTION: ximea_param = "column_fpn_correction"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_ROW_FPN_CORRECTION: ximea_param = "row_fpn_correction"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_MODE: ximea_param = "sensor_mode"; value_type = xiTypeEnum; doAcqReset = true; break; case CV_CAP_PROP_XI_HDR: ximea_param = "hdr"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_HDR_KNEEPOINT_COUNT: ximea_param = "hdr_kneepoint_count"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HDR_T1: ximea_param = "hdr_t1"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HDR_T2: ximea_param = "hdr_t2"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_KNEEPOINT1: ximea_param = "hdr_kneepoint1"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_KNEEPOINT2: ximea_param = "hdr_kneepoint2"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_IMAGE_BLACK_LEVEL: ximea_param = "image_black_level"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HW_REVISION: ximea_param = "hw_revision"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEBUG_LEVEL: ximea_param = "debug_level"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION: ximea_param = "auto_bandwidth_calculation"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_FFS_FILE_ID: ximea_param = "ffs_file_id"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_FFS_FILE_SIZE: ximea_param = "ffs_file_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_FREE_FFS_SIZE: ximea_param = "free_ffs_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_USED_FFS_SIZE: ximea_param = "used_ffs_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_FFS_ACCESS_KEY: ximea_param = "ffs_access_key"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_SENSOR_FEATURE_SELECTOR: ximea_param = "sensor_feature_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_FEATURE_VALUE: ximea_param = "sensor_feature_value"; value_type = xiTypeInteger; break; default: // report invalid parameter as it is not of numerical type errMsg("CvCaptureCAM_XIMEA::setProperty", XI_UNKNOWN_PARAM); return false; } if(doAcqReset) { stat = xiStopAcquisition(hmv); errMsg("CvCaptureCAM_XIMEA::setProperty, xiStopAcquisition", stat); if(stat != XI_OK) setProp_result = false; } switch(value_type) { case xiTypeInteger : // integer parameter type case xiTypeEnum : // enumerator parameter type case xiTypeBoolean : // boolean parameter type case xiTypeCommand : // command parameter type stat = xiSetParamInt(hmv, ximea_param.c_str(), ival); break; case xiTypeFloat : // float parameter type stat = xiSetParamFloat(hmv, ximea_param.c_str(), fval); break; default: errMsg("CvCaptureCAM_XIMEA::setProperty", XI_WRONG_PARAM_TYPE); setProp_result = false; } if(stat != XI_OK) { // report error on parameter setting errMsg("CvCaptureCAM_XIMEA::setProperty, xiSetParam", stat); setProp_result = false; } if(doAcqReset) { stat = xiStartAcquisition(hmv); errMsg("xiStartAcquisition::setProperty, xiStartAcquisition", stat); if(stat != XI_OK) setProp_result = false; } return setProp_result; } /**********************************************************************************/ double CvCaptureCAM_XIMEA::getProperty( int property_id ) const { XI_RETURN stat = XI_OK; double getPropVal = 0; int ival = 0; float fval = 0; string ximea_param = ""; XI_PRM_TYPE value_type = xiTypeInteger; if(hmv == NULL) { errMsg("CvCaptureCAM_XIMEA::getProperty", XI_INVALID_HANDLE); return 0; } // convert OCV property id to XIMEA id if necessary property_id = ocvParamtoXimeaParam(property_id); // decode OpenCV parameter to xiAPI parameter switch( property_id ) { case CV_CAP_PROP_XI_TIMEOUT: return (double) timeout; case CV_CAP_PROP_XI_EXPOSURE: ximea_param = "exposure"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_EXPOSURE_BURST_COUNT: ximea_param = "exposure_burst_count"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_GAIN_SELECTOR: ximea_param = "gain_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GAIN: ximea_param = "gain"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_DOWNSAMPLING: ximea_param = "downsampling"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_DOWNSAMPLING_TYPE: ximea_param = "downsampling_type"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_BINNING_SELECTOR: ximea_param = "binning_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_BINNING_VERTICAL: ximea_param = "binning_vertical"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_BINNING_HORIZONTAL: ximea_param = "binning_horizontal"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_BINNING_PATTERN: ximea_param = "binning_pattern"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_DECIMATION_SELECTOR: ximea_param = "decimation_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_DECIMATION_VERTICAL: ximea_param = "decimation_vertical"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DECIMATION_HORIZONTAL: ximea_param = "decimation_horizontal"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DECIMATION_PATTERN: ximea_param = "decimation_pattern"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TEST_PATTERN_GENERATOR_SELECTOR: ximea_param = "test_pattern_generator_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TEST_PATTERN: ximea_param = "test_pattern"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_IMAGE_DATA_FORMAT: ximea_param = "imgdataformat"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SHUTTER_TYPE: ximea_param = "shutter_type"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_TAPS: ximea_param = "sensor_taps"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_AEAG: ximea_param = "aeag"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_AEAG_ROI_OFFSET_X: ximea_param = "aeag_roi_offset_x"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_ROI_OFFSET_Y: ximea_param = "aeag_roi_offset_y"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_ROI_WIDTH: ximea_param = "aeag_roi_width"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_ROI_HEIGHT: ximea_param = "aeag_roi_height"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_BPC: ximea_param = "bpc"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_AUTO_WB: ximea_param = "auto_wb"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_MANUAL_WB: ximea_param = "manual_wb"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_WB_KR: ximea_param = "wb_kr"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_WB_KG: ximea_param = "wb_kg"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_WB_KB: ximea_param = "wb_kb"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_WIDTH: ximea_param = "width"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HEIGHT: ximea_param = "height"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_OFFSET_X: ximea_param = "offsetX"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_OFFSET_Y: ximea_param = "offsetY"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_REGION_SELECTOR : ximea_param = "region_selector"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_REGION_MODE : ximea_param = "region_mode"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_EXP_PRIORITY: ximea_param = "exp_priority"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_AG_MAX_LIMIT: ximea_param = "ag_max_limit"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_AE_MAX_LIMIT: ximea_param = "ae_max_limit"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_AEAG_LEVEL: ximea_param = "aeag_level"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LIMIT_BANDWIDTH: ximea_param = "limit_bandwidth"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_SENSOR_DATA_BIT_DEPTH: ximea_param = "sensor_bit_depth"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_OUTPUT_DATA_BIT_DEPTH: ximea_param = "output_bit_depth"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_IMAGE_DATA_BIT_DEPTH: ximea_param = "image_data_bit_depth"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_OUTPUT_DATA_PACKING: ximea_param = "output_bit_packing"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_OUTPUT_DATA_PACKING_TYPE: ximea_param = "output_bit_packing_type"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_IS_COOLED: ximea_param = "iscooled"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_COOLING: ximea_param = "cooling"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_TARGET_TEMP: ximea_param = "target_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CHIP_TEMP: ximea_param = "chip_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_HOUS_TEMP: ximea_param = "hous_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_HOUS_BACK_SIDE_TEMP: ximea_param = "hous_back_side_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_SENSOR_BOARD_TEMP: ximea_param = "sensor_board_temp"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CMS: ximea_param = "cms"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_APPLY_CMS: ximea_param = "apply_cms"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_IMAGE_IS_COLOR: ximea_param = "iscolor"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_COLOR_FILTER_ARRAY: ximea_param = "cfa"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GAMMAY: ximea_param = "gammaY"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_GAMMAC: ximea_param = "gammaC"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_SHARPNESS: ximea_param = "sharpness"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_00: ximea_param = "ccMTX00"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_01: ximea_param = "ccMTX01"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_02: ximea_param = "ccMTX02"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_03: ximea_param = "ccMTX03"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_10: ximea_param = "ccMTX10"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_11: ximea_param = "ccMTX11"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_12: ximea_param = "ccMTX12"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_13: ximea_param = "ccMTX13"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_20: ximea_param = "ccMTX20"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_21: ximea_param = "ccMTX21"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_22: ximea_param = "ccMTX22"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_23: ximea_param = "ccMTX23"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_30: ximea_param = "ccMTX30"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_31: ximea_param = "ccMTX31"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_32: ximea_param = "ccMTX32"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_CC_MATRIX_33: ximea_param = "ccMTX33"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_DEFAULT_CC_MATRIX: ximea_param = "defccMTX"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_TRG_SOURCE: ximea_param = "trigger_source"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TRG_SOFTWARE: ximea_param = "trigger_software"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_TRG_SELECTOR: ximea_param = "trigger_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_ACQ_FRAME_BURST_COUNT: ximea_param = "acq_frame_burst_count"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_GPI_SELECTOR: ximea_param = "gpi_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GPI_MODE: ximea_param = "gpi_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GPI_LEVEL: ximea_param = "gpi_level"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_GPO_SELECTOR: ximea_param = "gpo_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_GPO_MODE: ximea_param = "gpo_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LED_SELECTOR: ximea_param = "led_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LED_MODE: ximea_param = "led_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_DEBOUNCE_EN: ximea_param = "dbnc_en"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_DEBOUNCE_T0: ximea_param = "dbnc_t0"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEBOUNCE_T1: ximea_param = "dbnc_t1"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEBOUNCE_POL: ximea_param = "dbnc_pol"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LENS_MODE: ximea_param = "lens_mode"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_LENS_APERTURE_VALUE: ximea_param = "lens_aperture_value"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_LENS_FOCUS_MOVEMENT_VALUE: ximea_param = "lens_focus_movement_value"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LENS_FOCUS_MOVE: ximea_param = "lens_focus_move"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_LENS_FOCUS_DISTANCE: ximea_param = "lens_focus_distance"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_LENS_FOCAL_LENGTH: ximea_param = "lens_focal_length"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_LENS_FEATURE_SELECTOR: ximea_param = "lens_feature_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LENS_FEATURE: ximea_param = "lens_feature"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_DEVICE_MODEL_ID: ximea_param = "device_model_id"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEVICE_SN: ximea_param = "device_sn"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_IMAGE_DATA_FORMAT_RGB32_ALPHA: ximea_param = "imgdataformatrgb32alpha"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_IMAGE_PAYLOAD_SIZE: ximea_param = "imgpayloadsize"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_TRANSPORT_PIXEL_FORMAT: ximea_param = "transport_pixel_format"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_CLOCK_FREQ_HZ: ximea_param = "sensor_clock_freq_hz"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_SENSOR_CLOCK_FREQ_INDEX: ximea_param = "sensor_clock_freq_index"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_SENSOR_OUTPUT_CHANNEL_COUNT: ximea_param = "sensor_output_channel_count"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_FRAMERATE: ximea_param = "framerate"; value_type = xiTypeFloat; break; case CV_CAP_PROP_XI_COUNTER_SELECTOR: ximea_param = "counter_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_COUNTER_VALUE: ximea_param = "counter_value"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_ACQ_TIMING_MODE: ximea_param = "acq_timing_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_AVAILABLE_BANDWIDTH: ximea_param = "available_bandwidth"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_BUFFER_POLICY: ximea_param = "buffer_policy"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_LUT_EN: ximea_param = "LUTEnable"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_LUT_INDEX: ximea_param = "LUTIndex"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_LUT_VALUE: ximea_param = "LUTValue"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_TRG_DELAY: ximea_param = "trigger_delay"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TS_RST_MODE: ximea_param = "ts_rst_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_TS_RST_SOURCE: ximea_param = "ts_rst_source"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_IS_DEVICE_EXIST: ximea_param = "isexist"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_ACQ_BUFFER_SIZE: ximea_param = "acq_buffer_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_ACQ_BUFFER_SIZE_UNIT: ximea_param = "acq_buffer_size_unit"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_SIZE: ximea_param = "acq_transport_buffer_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_BUFFERS_QUEUE_SIZE: ximea_param = "buffers_queue_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_ACQ_TRANSPORT_BUFFER_COMMIT: ximea_param = "acq_transport_buffer_commit"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_RECENT_FRAME: ximea_param = "recent_frame"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_DEVICE_RESET: ximea_param = "device_reset"; value_type = xiTypeCommand; break; case CV_CAP_PROP_XI_COLUMN_FPN_CORRECTION: ximea_param = "column_fpn_correction"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_ROW_FPN_CORRECTION: ximea_param = "row_fpn_correction"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_MODE: ximea_param = "sensor_mode"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_HDR: ximea_param = "hdr"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_HDR_KNEEPOINT_COUNT: ximea_param = "hdr_kneepoint_count"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HDR_T1: ximea_param = "hdr_t1"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HDR_T2: ximea_param = "hdr_t2"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_KNEEPOINT1: ximea_param = "hdr_kneepoint1"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_KNEEPOINT2: ximea_param = "hdr_kneepoint2"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_IMAGE_BLACK_LEVEL: ximea_param = "image_black_level"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_HW_REVISION: ximea_param = "hw_revision"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_DEBUG_LEVEL: ximea_param = "debug_level"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_AUTO_BANDWIDTH_CALCULATION: ximea_param = "auto_bandwidth_calculation"; value_type = xiTypeBoolean; break; case CV_CAP_PROP_XI_FFS_FILE_ID: ximea_param = "ffs_file_id"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_FFS_FILE_SIZE: ximea_param = "ffs_file_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_FREE_FFS_SIZE: ximea_param = "free_ffs_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_USED_FFS_SIZE: ximea_param = "used_ffs_size"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_FFS_ACCESS_KEY: ximea_param = "ffs_access_key"; value_type = xiTypeInteger; break; case CV_CAP_PROP_XI_SENSOR_FEATURE_SELECTOR: ximea_param = "sensor_feature_selector"; value_type = xiTypeEnum; break; case CV_CAP_PROP_XI_SENSOR_FEATURE_VALUE: ximea_param = "sensor_feature_value"; value_type = xiTypeInteger; break; default: // report invalid parameter as it is not of string type errMsg("CvCaptureCAM_XIMEA::getProperty", XI_UNKNOWN_PARAM); return 0; } switch(value_type) { case xiTypeInteger : // integer parameter type case xiTypeEnum : // enumerator parameter type case xiTypeBoolean : // boolean parameter type case xiTypeCommand : // command parameter type stat = xiGetParamInt(hmv, ximea_param.c_str(), &ival); if(stat == XI_OK) getPropVal = ival; else errMsg("CvCaptureCAM_XIMEA::getProperty, xiGetParamInt", stat); break; case xiTypeFloat : // float parameter type stat = xiGetParamFloat(hmv, ximea_param.c_str(), &fval); if(stat == XI_OK) getPropVal = fval; else errMsg("CvCaptureCAM_XIMEA::getProperty, xiGetParamFloat", stat); break; default: // unknown value type selected errMsg("CvCaptureCAM_XIMEA::getProperty", XI_WRONG_PARAM_TYPE); } return getPropVal; } /**********************************************************************************/ void CvCaptureCAM_XIMEA::errMsg(const char* msg, int errNum) const { // with XI_OK there is nothing to report if(errNum == XI_OK) return; string error_message = ""; switch(errNum) { case XI_OK : error_message = "Function call succeeded"; break; case XI_INVALID_HANDLE : error_message = "Invalid handle"; break; case XI_READREG : error_message = "Register read error"; break; case XI_WRITEREG : error_message = "Register write error"; break; case XI_FREE_RESOURCES : error_message = "Freeing resiurces error"; break; case XI_FREE_CHANNEL : error_message = "Freeing channel error"; break; case XI_FREE_BANDWIDTH : error_message = "Freeing bandwidth error"; break; case XI_READBLK : error_message = "Read block error"; break; case XI_WRITEBLK : error_message = "Write block error"; break; case XI_NO_IMAGE : error_message = "No image"; break; case XI_TIMEOUT : error_message = "Timeout"; break; case XI_INVALID_ARG : error_message = "Invalid arguments supplied"; break; case XI_NOT_SUPPORTED : error_message = "Not supported"; break; case XI_ISOCH_ATTACH_BUFFERS : error_message = "Attach buffers error"; break; case XI_GET_OVERLAPPED_RESULT : error_message = "Overlapped result"; break; case XI_MEMORY_ALLOCATION : error_message = "Memory allocation error"; break; case XI_DLLCONTEXTISNULL : error_message = "DLL context is NULL"; break; case XI_DLLCONTEXTISNONZERO : error_message = "DLL context is non zero"; break; case XI_DLLCONTEXTEXIST : error_message = "DLL context exists"; break; case XI_TOOMANYDEVICES : error_message = "Too many devices connected"; break; case XI_ERRORCAMCONTEXT : error_message = "Camera context error"; break; case XI_UNKNOWN_HARDWARE : error_message = "Unknown hardware"; break; case XI_INVALID_TM_FILE : error_message = "Invalid TM file"; break; case XI_INVALID_TM_TAG : error_message = "Invalid TM tag"; break; case XI_INCOMPLETE_TM : error_message = "Incomplete TM"; break; case XI_BUS_RESET_FAILED : error_message = "Bus reset error"; break; case XI_NOT_IMPLEMENTED : error_message = "Not implemented"; break; case XI_SHADING_TOOBRIGHT : error_message = "Shading too bright"; break; case XI_SHADING_TOODARK : error_message = "Shading too dark"; break; case XI_TOO_LOW_GAIN : error_message = "Gain is too low"; break; case XI_INVALID_BPL : error_message = "Invalid bad pixel list"; break; case XI_BPL_REALLOC : error_message = "Bad pixel list realloc error"; break; case XI_INVALID_PIXEL_LIST : error_message = "Invalid pixel list"; break; case XI_INVALID_FFS : error_message = "Invalid Flash File System"; break; case XI_INVALID_PROFILE : error_message = "Invalid profile"; break; case XI_INVALID_CALIBRATION : error_message = "Invalid calibration"; break; case XI_INVALID_BUFFER : error_message = "Invalid buffer"; break; case XI_INVALID_DATA : error_message = "Invalid data"; break; case XI_TGBUSY : error_message = "Timing generator is busy"; break; case XI_IO_WRONG : error_message = "Wrong operation open/write/read/close"; break; case XI_ACQUISITION_ALREADY_UP : error_message = "Acquisition already started"; break; case XI_OLD_DRIVER_VERSION : error_message = "Old version of device driver installed to the system."; break; case XI_GET_LAST_ERROR : error_message = "To get error code please call GetLastError function."; break; case XI_CANT_PROCESS : error_message = "Data can't be processed"; break; case XI_ACQUISITION_STOPED : error_message = "Acquisition has been stopped. It should be started before GetImage."; break; case XI_ACQUISITION_STOPED_WERR : error_message = "Acquisition has been stopped with error."; break; case XI_INVALID_INPUT_ICC_PROFILE : error_message = "Input ICC profile missed or corrupted"; break; case XI_INVALID_OUTPUT_ICC_PROFILE : error_message = "Output ICC profile missed or corrupted"; break; case XI_DEVICE_NOT_READY : error_message = "Device not ready to operate"; break; case XI_SHADING_TOOCONTRAST : error_message = "Shading too contrast"; break; case XI_ALREADY_INITIALIZED : error_message = "Module already initialized"; break; case XI_NOT_ENOUGH_PRIVILEGES : error_message = "Application doesn't enough privileges(one or more app"; break; case XI_NOT_COMPATIBLE_DRIVER : error_message = "Installed driver not compatible with current software"; break; case XI_TM_INVALID_RESOURCE : error_message = "TM file was not loaded successfully from resources"; break; case XI_DEVICE_HAS_BEEN_RESETED : error_message = "Device has been reset, abnormal initial state"; break; case XI_NO_DEVICES_FOUND : error_message = "No Devices Found"; break; case XI_RESOURCE_OR_FUNCTION_LOCKED : error_message = "Resource(device) or function locked by mutex"; break; case XI_BUFFER_SIZE_TOO_SMALL : error_message = "Buffer provided by user is too small"; break; case XI_COULDNT_INIT_PROCESSOR : error_message = "Couldn't initialize processor."; break; case XI_NOT_INITIALIZED : error_message = "The object/module/procedure/process being referred to has not been started."; break; case XI_RESOURCE_NOT_FOUND : error_message = "Resource not found(could be processor, file, item..)."; break; case XI_UNKNOWN_PARAM : error_message = "Unknown parameter"; break; case XI_WRONG_PARAM_VALUE : error_message = "Wrong parameter value"; break; case XI_WRONG_PARAM_TYPE : error_message = "Wrong parameter type"; break; case XI_WRONG_PARAM_SIZE : error_message = "Wrong parameter size"; break; case XI_BUFFER_TOO_SMALL : error_message = "Input buffer too small"; break; case XI_NOT_SUPPORTED_PARAM : error_message = "Parameter info not supported"; break; case XI_NOT_SUPPORTED_PARAM_INFO : error_message = "Parameter info not supported"; break; case XI_NOT_SUPPORTED_DATA_FORMAT : error_message = "Data format not supported"; break; case XI_READ_ONLY_PARAM : error_message = "Read only parameter"; break; case XI_BANDWIDTH_NOT_SUPPORTED : error_message = "This camera does not support currently available bandwidth"; break; case XI_INVALID_FFS_FILE_NAME : error_message = "FFS file selector is invalid or NULL"; break; case XI_FFS_FILE_NOT_FOUND : error_message = "FFS file not found"; break; case XI_PROC_OTHER_ERROR : error_message = "Processing error - other"; break; case XI_PROC_PROCESSING_ERROR : error_message = "Error while image processing."; break; case XI_PROC_INPUT_FORMAT_UNSUPPORTED : error_message = "Input format is not supported for processing."; break; case XI_PROC_OUTPUT_FORMAT_UNSUPPORTED : error_message = "Output format is not supported for processing."; break; default: error_message = "Unknown error value"; } #if defined _WIN32 char buf[512]=""; sprintf( buf, "%s : %d, %s\n", msg, errNum, error_message.c_str()); OutputDebugString(buf); #else fprintf(stderr, "%s : %d, %s\n", msg, errNum, error_message.c_str()); #endif } /**********************************************************************************/
[ "lihuibin705@163.com" ]
lihuibin705@163.com
97dc7cf888e0f9d2b73fd57492987b9deda18158
d3df95e4f766c49c9cd39fe6a00e647699a65a0d
/percusion.h
dfda1199673084aa293436898cadf0129fb98f3b
[]
no_license
romulo24/Musica-POO-P58
7b5bdecd189f71c6c64dc434a77fb73f8dc1bf1e
b99cf3d0628773d9b294cb5256a5709efeb5918e
refs/heads/main
2023-07-11T10:51:16.042469
2021-08-25T01:16:16
2021-08-25T01:16:16
399,650,254
1
0
null
null
null
null
UTF-8
C++
false
false
243
h
#ifndef PERCUSION_H #define PERCUSION_H #include"instrumentos.h" class Percusion : public Instrumentos { public: Percusion(string,string,float,string); virtual string Afinar(); virtual string getDatos(); }; #endif // PERCUSION_H
[ "torresromulo200@gmail.com" ]
torresromulo200@gmail.com
479689c8ebf2f6559fff636578c6ec80d63ac3ac
975915453061d83a9e0a986cddafcf37126fa0d8
/src/ViewBook.cpp
ea18276845a733973096053bd7b7d1730dd8a81f
[ "MIT" ]
permissive
GritzMaze/Library
f3a0675ffeade1bf860c9c4647abb38d6d844f57
af7212842d64e68e3bdcc027fad736824507d255
refs/heads/master
2023-05-20T13:18:36.265104
2021-06-13T13:36:28
2021-06-13T13:36:28
362,052,092
1
0
null
null
null
null
UTF-8
C++
false
false
1,178
cpp
#include "../include/BookDB.h" void BookDB::view() { system("cls"); Draw::drawHeader("BOOK LIST"); Draw::drawSubmenu("TITLE", "AUTHOR", "GENRE", "ID"); int size = books.getSize(); int i = 0; for (; i < size; ++i) { books[i]->partlyPrintVertical(7 + i); } if (i < 15) { i = 15; } Draw::drawFooter(i + 9); Draw::gotoxy(20, i + 11); std::cout << "Enter 0 to go back to Main Menu."; Draw::gotoxy(20, i + 13); } void BookDB::viewBooks() { view(); std::cout << "Enter ID to see full info about a book: "; int id = 0; std::cin >> id; if (std::cin.fail()) { InputHandle::errMsg("Not a number entered for ID!"); std::cin.clear(); std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); viewBooks(); } std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); if (id == 0) return; if (this->printByID(id)) { Draw::gotoxy(20, 23); std::cout << "Press ANY key to continue..."; if (getch()) { system("cls"); viewBooks(); } } return; }
[ "jivkovvesselin@gmail.com" ]
jivkovvesselin@gmail.com
e7ebdd4a445cb62b01125b1c51f420eb965c64e5
d381fc971bf431d8aef76fceb847ccf9d316cc5d
/ouzel/graphics/empty/RendererEmpty.cpp
e1d5ffaa55e5eccb329517eed817adf8c6366997
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
keima97/ouzel
da8eba3eab1052d366f23121d1817bec17279b74
e6673e678b4739235371a15ae3863942b692c5fb
refs/heads/master
2021-01-12T04:10:00.715745
2016-12-27T23:02:49
2016-12-27T23:02:49
77,517,391
0
0
null
null
null
null
UTF-8
C++
false
false
5,550
cpp
// Copyright (C) 2016 Elviss Strazdins // This file is part of the Ouzel engine. #include "RendererEmpty.h" #include "core/Engine.h" #include "core/Cache.h" #include "BlendStateEmpty.h" #include "TextureEmpty.h" #include "RenderTargetEmpty.h" #include "ShaderEmpty.h" #include "MeshBufferEmpty.h" #include "IndexBufferEmpty.h" #include "VertexBufferEmpty.h" namespace ouzel { namespace graphics { RendererEmpty::RendererEmpty(): Renderer(Driver::EMPTY) { } bool RendererEmpty::init(Window* newWindow, uint32_t newSampleCount, TextureFilter newTextureFilter, PixelFormat newBackBufferFormat, bool newVerticalSync) { if (!Renderer::init(newWindow, newSampleCount, newTextureFilter, newBackBufferFormat, newVerticalSync)) { return false; } ShaderPtr textureShader = createShader(); textureShader->initFromBuffers({ }, { }, VertexPCT::ATTRIBUTES, {{"color", 4 * sizeof(float)}}, {{"modelViewProj", sizeof(Matrix4)}}); sharedEngine->getCache()->setShader(SHADER_TEXTURE, textureShader); ShaderPtr colorShader = createShader(); colorShader->initFromBuffers({ }, { }, VertexPC::ATTRIBUTES, {{"color", 4 * sizeof(float)}}, {{"modelViewProj", sizeof(Matrix4)}}); sharedEngine->getCache()->setShader(SHADER_COLOR, colorShader); BlendStatePtr noBlendState = createBlendState(); noBlendState->init(false, BlendState::BlendFactor::ONE, BlendState::BlendFactor::ZERO, BlendState::BlendOperation::ADD, BlendState::BlendFactor::ONE, BlendState::BlendFactor::ZERO, BlendState::BlendOperation::ADD); sharedEngine->getCache()->setBlendState(BLEND_NO_BLEND, noBlendState); BlendStatePtr addBlendState = createBlendState(); addBlendState->init(true, BlendState::BlendFactor::ONE, BlendState::BlendFactor::ONE, BlendState::BlendOperation::ADD, BlendState::BlendFactor::ONE, BlendState::BlendFactor::ONE, BlendState::BlendOperation::ADD); sharedEngine->getCache()->setBlendState(BLEND_ADD, addBlendState); BlendStatePtr multiplyBlendState = createBlendState(); multiplyBlendState->init(true, BlendState::BlendFactor::DEST_COLOR, BlendState::BlendFactor::ZERO, BlendState::BlendOperation::ADD, BlendState::BlendFactor::ONE, BlendState::BlendFactor::ONE, BlendState::BlendOperation::ADD); sharedEngine->getCache()->setBlendState(BLEND_MULTIPLY, multiplyBlendState); BlendStatePtr alphaBlendState = createBlendState(); alphaBlendState->init(true, BlendState::BlendFactor::SRC_ALPHA, BlendState::BlendFactor::INV_SRC_ALPHA, BlendState::BlendOperation::ADD, BlendState::BlendFactor::ONE, BlendState::BlendFactor::ONE, BlendState::BlendOperation::ADD); sharedEngine->getCache()->setBlendState(BLEND_ALPHA, alphaBlendState); TexturePtr whitePixelTexture = createTexture(); whitePixelTexture->initFromBuffer( { 255, 255, 255, 255 }, Size2(1.0f, 1.0f), false, false); sharedEngine->getCache()->setTexture(TEXTURE_WHITE_PIXEL, whitePixelTexture); return true; } BlendStatePtr RendererEmpty::createBlendState() { BlendStatePtr blendState = std::make_shared<BlendStateEmpty>(); return blendState; } TexturePtr RendererEmpty::createTexture() { TexturePtr texture(new TextureEmpty()); return texture; } RenderTargetPtr RendererEmpty::createRenderTarget() { RenderTargetPtr renderTarget = std::make_shared<RenderTargetEmpty>(); return renderTarget; } ShaderPtr RendererEmpty::createShader() { ShaderPtr shader = std::make_shared<ShaderEmpty>(); return shader; } MeshBufferPtr RendererEmpty::createMeshBuffer() { MeshBufferPtr meshBuffer = std::make_shared<MeshBufferEmpty>(); return meshBuffer; } IndexBufferPtr RendererEmpty::createIndexBuffer() { IndexBufferPtr indexBuffer = std::make_shared<IndexBufferEmpty>(); return indexBuffer; } VertexBufferPtr RendererEmpty::createVertexBuffer() { VertexBufferPtr vertexBuffer = std::make_shared<VertexBufferEmpty>(); return vertexBuffer; } } // namespace graphics } // namespace ouzel
[ "elviss@elviss.lv" ]
elviss@elviss.lv
da2de0f0ec61ce9e64b5bac5f228e9ebd5cc997c
d3683c6ffb0a71ccb8cbc6f1b008ffaed006e4e6
/SupportLibraries/bullet-2.76/Extras/Serialize/BlenderSerialize/bBlenderFile.cpp
37a332fbac37393e397e02ef1b6a5d9798df91dc
[ "Zlib", "LicenseRef-scancode-unknown-license-reference" ]
permissive
kristofe/GameEngine
0cc491211d76e62ad82f06032b5bae06872dadc1
8f5c37956a27459b16249442c15450f0ff183046
refs/heads/master
2021-01-19T18:36:04.878626
2014-05-09T22:31:15
2014-05-09T22:31:15
5,623,912
1
1
null
null
null
null
UTF-8
C++
false
false
4,714
cpp
/* bParse Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #include "bBlenderFile.h" #include "bMain.h" #include "bDefines.h" #include "bDNA.h" #include <stdio.h> #include <string.h> // 32 && 64 bit versions extern unsigned char DNAstr[]; extern int DNAlen; extern unsigned char DNAstr64[]; extern int DNAlen64; using namespace bParse; bBlenderFile::bBlenderFile(const char* fileName) :bFile(fileName, "BLENDER") { mMain= new bMain(this, fileName, mVersion); } bBlenderFile::bBlenderFile(char *memoryBuffer, int len) :bFile(memoryBuffer,len, "BLENDER"), mMain(0) { mMain= new bMain(this, "memoryBuf", mVersion); } bBlenderFile::~bBlenderFile() { delete mMain; } bMain* bBlenderFile::getMain() { return mMain; } // ----------------------------------------------------- // void bBlenderFile::parseData() { printf ("Building datablocks\n"); printf ("Chunk size = %d\n",CHUNK_HEADER_LEN); printf ("File chunk size = %d\n", ChunkUtils::getOffset(mFlags)); const bool swap = (mFlags&FD_ENDIAN_SWAP)!=0; char *dataPtr = mFileBuffer+mDataStart; bChunkInd dataChunk; dataChunk.code = 0; //dataPtr += ChunkUtils::getNextBlock(&dataChunk, dataPtr, mFlags); int seek = getNextBlock(&dataChunk, dataPtr, mFlags); //dataPtr += ChunkUtils::getOffset(mFlags); char *dataPtrHead = 0; while (dataChunk.code != DNA1) { // one behind if (dataChunk.code == SDNA) break; //if (dataChunk.code == DNA1) break; // same as (BHEAD+DATA dependency) dataPtrHead = dataPtr+ChunkUtils::getOffset(mFlags); char *id = readStruct(dataPtrHead, dataChunk); // lookup maps if (id) { mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id); m_chunks.push_back(dataChunk); // block it bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code); if (listID) listID->push_back((bStructHandle*)id); } if (dataChunk.code == GLOB) { m_glob = (bStructHandle*) id; } // next please! dataPtr += seek; seek = getNextBlock(&dataChunk, dataPtr, mFlags); if (seek < 0) break; } } void bBlenderFile::addDataBlock(char* dataBlock) { mMain->addDatablock(dataBlock); } // 32 && 64 bit versions extern unsigned char DNAstr[]; extern int DNAlen; //unsigned char DNAstr[]={0}; //int DNAlen=0; extern unsigned char DNAstr64[]; extern int DNAlen64; void bBlenderFile::writeDNA(FILE* fp) { bChunkInd dataChunk; dataChunk.code = DNA1; dataChunk.dna_nr = 0; dataChunk.nr = 1; if (VOID_IS_8) { dataChunk.len = DNAlen64; dataChunk.oldPtr = DNAstr64; fwrite(&dataChunk,sizeof(bChunkInd),1,fp); fwrite(DNAstr64, DNAlen64,1,fp); } else { dataChunk.len = DNAlen; dataChunk.oldPtr = DNAstr; fwrite(&dataChunk,sizeof(bChunkInd),1,fp); fwrite(DNAstr, DNAlen,1,fp); } } void bBlenderFile::parse(bool verboseDumpAllTypes) { if (VOID_IS_8) { parseInternal(verboseDumpAllTypes,(char*)DNAstr64,DNAlen64); } else { parseInternal(verboseDumpAllTypes,(char*)DNAstr,DNAlen); } } // experimental int bBlenderFile::write(const char* fileName, bool fixupPointers) { FILE *fp = fopen(fileName, "wb"); if (fp) { char header[SIZEOFBLENDERHEADER] ; memcpy(header, m_headerString, 7); int endian= 1; endian= ((char*)&endian)[0]; if (endian) { header[7] = '_'; } else { header[7] = '-'; } if (VOID_IS_8) { header[8]='V'; } else { header[8]='v'; } header[9] = '2'; header[10] = '4'; header[11] = '9'; fwrite(header,SIZEOFBLENDERHEADER,1,fp); writeChunks(fp, fixupPointers); writeDNA(fp); fclose(fp); } else { printf("Error: cannot open file %s for writing\n",fileName); return 0; } return 1; }
[ "kristofe72@gmail.com" ]
kristofe72@gmail.com
cf5a80f5c7954e237de0de06f03d21b4e1a73b0b
d649cb8ad89a28f0baa2160a3ee58bc007ceae04
/components/payments/core/payment_request_data_util.cc
bee795f54c8f21157cc6b54dbee0bca7f4f40c40
[ "BSD-3-Clause" ]
permissive
yzyz/chromium
6ee310fcbbed07caa228985a3e66ac70b13b56ee
5f4bb2f552aeb48610c1b59fe9a555e4c9ac78fa
refs/heads/master
2023-01-13T12:30:09.212664
2017-07-13T20:32:26
2017-07-13T20:32:26
93,433,050
0
0
null
null
null
null
UTF-8
C++
false
false
10,884
cc
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/payments/core/payment_request_data_util.h" #include "base/stl_util.h" #include "base/strings/string16.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "components/autofill/core/browser/autofill_country.h" #include "components/autofill/core/browser/autofill_data_util.h" #include "components/autofill/core/browser/autofill_profile.h" #include "components/autofill/core/browser/field_types.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/validation.h" #include "components/payments/core/basic_card_response.h" #include "components/payments/core/payment_address.h" #include "components/payments/core/payment_method_data.h" #include "third_party/libphonenumber/phonenumber_api.h" namespace payments { namespace data_util { namespace { using ::i18n::phonenumbers::PhoneNumber; using ::i18n::phonenumbers::PhoneNumberUtil; // Formats the |phone_number| to the specified |format|. Returns the original // number if the operation is not possible. std::string FormatPhoneNumber(const std::string& phone_number, const std::string& country_code, PhoneNumberUtil::PhoneNumberFormat format) { PhoneNumber parsed_number; PhoneNumberUtil* phone_number_util = PhoneNumberUtil::GetInstance(); if (phone_number_util->Parse(phone_number, country_code, &parsed_number) != PhoneNumberUtil::NO_PARSING_ERROR) { return phone_number; } std::string formatted_number; phone_number_util->Format(parsed_number, format, &formatted_number); return formatted_number; } } // namespace PaymentAddress GetPaymentAddressFromAutofillProfile( const autofill::AutofillProfile& profile, const std::string& app_locale) { PaymentAddress address; address.country = profile.GetRawInfo(autofill::ADDRESS_HOME_COUNTRY); address.address_line = base::SplitString( profile.GetInfo( autofill::AutofillType(autofill::ADDRESS_HOME_STREET_ADDRESS), app_locale), base::ASCIIToUTF16("\n"), base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); address.region = profile.GetRawInfo(autofill::ADDRESS_HOME_STATE); address.city = profile.GetRawInfo(autofill::ADDRESS_HOME_CITY); address.dependent_locality = profile.GetRawInfo(autofill::ADDRESS_HOME_DEPENDENT_LOCALITY); address.postal_code = profile.GetRawInfo(autofill::ADDRESS_HOME_ZIP); address.sorting_code = profile.GetRawInfo(autofill::ADDRESS_HOME_SORTING_CODE); address.language_code = base::UTF8ToUTF16(profile.language_code()); address.organization = profile.GetRawInfo(autofill::COMPANY_NAME); address.recipient = profile.GetInfo(autofill::AutofillType(autofill::NAME_FULL), app_locale); address.phone = profile.GetRawInfo(autofill::PHONE_HOME_WHOLE_NUMBER); return address; } BasicCardResponse GetBasicCardResponseFromAutofillCreditCard( const autofill::CreditCard& card, const base::string16& cvc, const autofill::AutofillProfile& billing_profile, const std::string& app_locale) { BasicCardResponse response; response.cardholder_name = card.GetRawInfo(autofill::CREDIT_CARD_NAME_FULL); response.card_number = card.GetRawInfo(autofill::CREDIT_CARD_NUMBER); response.expiry_month = card.GetRawInfo(autofill::CREDIT_CARD_EXP_MONTH); response.expiry_year = card.GetRawInfo(autofill::CREDIT_CARD_EXP_4_DIGIT_YEAR); response.card_security_code = cvc; response.billing_address = GetPaymentAddressFromAutofillProfile(billing_profile, app_locale); return response; } void ParseBasicCardSupportedNetworks( const std::vector<PaymentMethodData>& method_data, std::vector<std::string>* out_supported_networks, std::set<std::string>* out_basic_card_specified_networks) { DCHECK(out_supported_networks->empty()); DCHECK(out_basic_card_specified_networks->empty()); const std::set<std::string> kBasicCardNetworks{ "amex", "diners", "discover", "jcb", "mastercard", "mir", "unionpay", "visa"}; std::set<std::string> remaining_card_networks(kBasicCardNetworks); for (const PaymentMethodData& method_data_entry : method_data) { if (method_data_entry.supported_methods.empty()) return; for (const std::string& method : method_data_entry.supported_methods) { if (method.empty()) continue; const char kBasicCardMethodName[] = "basic-card"; // If a card network is specified right in "supportedMethods", add it. auto card_it = remaining_card_networks.find(method); if (card_it != remaining_card_networks.end()) { out_supported_networks->push_back(method); // |method| removed from |remaining_card_networks| so that it is not // doubly added to |out_supported_networks|. remaining_card_networks.erase(card_it); } else if (method == kBasicCardMethodName) { // For the "basic-card" method, check "supportedNetworks". if (method_data_entry.supported_networks.empty()) { // Empty |supported_networks| means all networks are supported. out_supported_networks->insert(out_supported_networks->end(), remaining_card_networks.begin(), remaining_card_networks.end()); out_basic_card_specified_networks->insert(kBasicCardNetworks.begin(), kBasicCardNetworks.end()); // Clear the set so that no further networks are added to // |out_supported_networks|. remaining_card_networks.clear(); } else { // The merchant has specified a few basic card supported networks. Use // the mapping to transform to known basic-card types. for (const std::string& supported_network : method_data_entry.supported_networks) { // Make sure that the network was not already added to // |out_supported_networks|. If it's still in // |remaining_card_networks| it's fair game. auto it = remaining_card_networks.find(supported_network); if (it != remaining_card_networks.end()) { out_supported_networks->push_back(supported_network); remaining_card_networks.erase(it); } if (kBasicCardNetworks.find(supported_network) != kBasicCardNetworks.end()) { out_basic_card_specified_networks->insert(supported_network); } } } } } } } void ParseSupportedCardTypes( const std::vector<PaymentMethodData>& method_data, std::set<autofill::CreditCard::CardType>* out_supported_card_types_set) { DCHECK(out_supported_card_types_set->empty()); for (const PaymentMethodData& method_data_entry : method_data) { // Ignore |supported_types| if |supported_methods| does not contain // "basic_card". if (!base::ContainsValue(method_data_entry.supported_methods, "basic-card")) continue; for (const autofill::CreditCard::CardType& card_type : method_data_entry.supported_types) { out_supported_card_types_set->insert(card_type); } } // Omitting the card types means all 3 card types are supported. if (out_supported_card_types_set->empty()) { out_supported_card_types_set->insert( autofill::CreditCard::CARD_TYPE_CREDIT); out_supported_card_types_set->insert(autofill::CreditCard::CARD_TYPE_DEBIT); out_supported_card_types_set->insert( autofill::CreditCard::CARD_TYPE_PREPAID); } // Let the user decide whether an unknown card type should be used. out_supported_card_types_set->insert(autofill::CreditCard::CARD_TYPE_UNKNOWN); } base::string16 GetFormattedPhoneNumberForDisplay( const autofill::AutofillProfile& profile, const std::string& locale) { // Since the "+" is removed for some country's phone numbers, try to add a "+" // and see if it is a valid phone number for a country. // Having two "+" in front of a number has no effect on the formatted number. // The reason for this is international phone numbers for another country. For // example, without adding a "+", the US number 1-415-123-1234 for an AU // address would be wrongly formatted as +61 1-415-123-1234 which is invalid. std::string phone = base::UTF16ToUTF8(profile.GetInfo( autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), locale)); std::string tentative_intl_phone = "+" + phone; // Always favor the tentative international phone number if it's determined as // being a valid number. if (autofill::IsValidPhoneNumber( base::UTF8ToUTF16(tentative_intl_phone), GetCountryCodeWithFallback(&profile, locale))) { return base::UTF8ToUTF16(FormatPhoneForDisplay( tentative_intl_phone, GetCountryCodeWithFallback(&profile, locale))); } return base::UTF8ToUTF16(FormatPhoneForDisplay( phone, GetCountryCodeWithFallback(&profile, locale))); } std::string FormatPhoneForDisplay(const std::string& phone_number, const std::string& country_code) { return FormatPhoneNumber(phone_number, country_code, PhoneNumberUtil::PhoneNumberFormat::INTERNATIONAL); } std::string FormatPhoneForResponse(const std::string& phone_number, const std::string& country_code) { return FormatPhoneNumber(phone_number, country_code, PhoneNumberUtil::PhoneNumberFormat::E164); } base::string16 FormatCardNumberForDisplay(const base::string16& card_number) { base::string16 number = autofill::CreditCard::StripSeparators(card_number); if (number.empty() || !base::IsAsciiDigit(number[0])) return card_number; std::vector<size_t> positions = {4U, 9U, 14U}; if (autofill::CreditCard::GetCardNetwork(number) == autofill::kAmericanExpressCard) { positions = {4U, 11U}; } static const base::char16 kSeparator = base::ASCIIToUTF16(" ")[0]; for (size_t i : positions) { if (number.size() > i) number.insert(i, 1U, kSeparator); } return number; } std::string GetCountryCodeWithFallback(const autofill::AutofillProfile* profile, const std::string& app_locale) { std::string country_code = base::UTF16ToUTF8(profile->GetRawInfo(autofill::ADDRESS_HOME_COUNTRY)); if (!autofill::data_util::IsValidCountryCode(country_code)) country_code = autofill::AutofillCountry::CountryCodeForLocale(app_locale); return country_code; } } // namespace data_util } // namespace payments
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
b0898079f20214030e284467ed941173692029cd
d34c38ce1657bae910b9818ab1cb2b42a53f23b7
/src/shrpx_worker.h
8339cde0a7135e19acd59e1da4f10b316b620bc6
[ "MIT" ]
permissive
iwanaga/nghttp2
a54585b3a1d510a30766b12ac639ef9c0c8e86be
9f5f724147f15c67633ddcd1a7f08045223208c4
refs/heads/master
2021-01-18T08:56:43.886225
2015-02-01T15:20:44
2015-02-01T15:20:44
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,928
h
/* * nghttp2 - HTTP/2 C Library * * Copyright (c) 2012 Tatsuhiro Tsujikawa * * 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 SHRPX_WORKER_H #define SHRPX_WORKER_H #include "shrpx.h" #include <mutex> #include <deque> #include <thread> #ifndef NOTHREADS #include <future> #endif // NOTHREADS #include <openssl/ssl.h> #include <openssl/err.h> #include <ev.h> #include "shrpx_config.h" #include "shrpx_downstream_connection_pool.h" namespace shrpx { class Http2Session; class ConnectBlocker; namespace ssl { struct CertLookupTree; } // namespace ssl struct WorkerStat { WorkerStat() : num_connections(0), next_downstream(0) {} size_t num_connections; // Next downstream index in Config::downstream_addrs. For HTTP/2 // downstream connections, this is always 0. For HTTP/1, this is // used as load balancing. size_t next_downstream; }; enum WorkerEventType { NEW_CONNECTION = 0x01, REOPEN_LOG = 0x02, GRACEFUL_SHUTDOWN = 0x03, RENEW_TICKET_KEYS = 0x04, }; struct WorkerEvent { WorkerEventType type; struct { sockaddr_union client_addr; size_t client_addrlen; int client_fd; }; std::shared_ptr<TicketKeys> ticket_keys; }; class Worker { public: Worker(SSL_CTX *sv_ssl_ctx, SSL_CTX *cl_ssl_ctx, ssl::CertLookupTree *cert_tree, const std::shared_ptr<TicketKeys> &ticket_keys); ~Worker(); void wait(); void process_events(); void send(const WorkerEvent &event); private: #ifndef NOTHREADS std::future<void> fut_; #endif // NOTHREADS std::mutex m_; std::deque<WorkerEvent> q_; ev_async w_; DownstreamConnectionPool dconn_pool_; struct ev_loop *loop_; SSL_CTX *sv_ssl_ctx_; SSL_CTX *cl_ssl_ctx_; std::unique_ptr<Http2Session> http2session_; std::unique_ptr<ConnectBlocker> http1_connect_blocker_; std::unique_ptr<WorkerStat> worker_stat_; }; } // namespace shrpx #endif // SHRPX_WORKER_H
[ "tatsuhiro.t@gmail.com" ]
tatsuhiro.t@gmail.com
f8e1b8e3dae76461410483c154e7030430ea34f1
898cb76a8969c1296578d48db137f685aec297f8
/src/isutility/LogStream.cc
af7dd2c9f055298f2232792372718c6e08ac8509
[]
no_license
USTCer-ycw/simpletool
b74f3024779d89ab2709ec19e267df85e9340f38
ff235e36cafb4b771612f067f645ad142589e54c
refs/heads/master
2022-12-14T06:20:37.974609
2020-09-25T02:43:53
2020-09-25T02:43:53
298,434,151
0
0
null
null
null
null
GB18030
C++
false
false
4,454
cc
#include <src/isutility/LogStream.h> #include <src/isutility/Compatible.h> #include <algorithm> #include <limits> #include <type_traits> #include <string.h> #include <stdint.h> #include <stdio.h> #pragma warning(disable:4996) using namespace istool; using namespace istool::detail; #ifndef __WINDOWS__ #pragma GCC diagnostic ignored "-Wtype-limits" #endif namespace istool { namespace detail { const char digits[] = "9876543210123456789"; const char* zero = digits + 9; static_assert(sizeof(digits) == 20, "not = 20"); const char digitsHex[] = "0123456789ABCDEF"; static_assert(sizeof digitsHex == 17, "not = 17"); // Efficient Integer to String Conversions, by Matthew Wilson. template<typename T> size_t convert(char buf[], T value) { T i = value; char* p = buf; do { int lsd = static_cast<int>(i % 10); i /= 10; *p++ = zero[lsd]; } while (i != 0); if (value < 0) { *p++ = '-'; } *p = '\0'; std::reverse(buf, p); return p - buf; } size_t convertHex(char buf[], uintptr_t value) { uintptr_t i = value; char* p = buf; do { int lsd = static_cast<int>(i % 16); i /= 16; *p++ = digitsHex[lsd]; } while (i != 0); *p = '\0'; std::reverse(buf, p); return p - buf; } template class FixedBuffer<kSmallBuffer>; template class FixedBuffer<kLargeBuffer>; } } template<int SIZE> const char* FixedBuffer<SIZE>::debugString() { *cur_ = '\0'; return data_; } template<int SIZE> void FixedBuffer<SIZE>::cookieStart() { } template<int SIZE> void FixedBuffer<SIZE>::cookieEnd() { } void LogStream::staticCheck() { static_assert(kMaxNumericSize - 10 > std::numeric_limits<double>::digits10, " more limits double"); static_assert(kMaxNumericSize - 10 > std::numeric_limits<long double>::digits10, " more limits long double"); static_assert(kMaxNumericSize - 10 > std::numeric_limits<long>::digits10, " more limits long"); static_assert(kMaxNumericSize - 10 > std::numeric_limits<long long>::digits10, " more limits long long"); } template<typename T> void LogStream::formatInteger(T v) { if (buffer_.avail() >= kMaxNumericSize) { size_t len = convert(buffer_.current(), v); buffer_.add(len); } } LogStream& LogStream::operator<<(short v) { *this << static_cast<int>(v); return *this; } LogStream& LogStream::operator<<(unsigned short v) { *this << static_cast<unsigned int>(v); return *this; } LogStream& LogStream::operator<<(int v) { formatInteger(v); return *this; } LogStream& LogStream::operator<<(unsigned int v) { formatInteger(v); return *this; } LogStream& LogStream::operator<<(long v) { formatInteger(v); return *this; } LogStream& LogStream::operator<<(unsigned long v) { formatInteger(v); return *this; } LogStream& LogStream::operator<<(long long v) { formatInteger(v); return *this; } LogStream& LogStream::operator<<(unsigned long long v) { formatInteger(v); return *this; } LogStream& LogStream::operator<<(const void* p) { uintptr_t v = reinterpret_cast<uintptr_t>(p); if (buffer_.avail() >= kMaxNumericSize) { char* buf = buffer_.current(); buf[0] = '0'; buf[1] = 'x'; size_t len = convertHex(buf + 2, v); buffer_.add(len + 2); } return *this; } // FIXME: replace this with Grisu3 by Florian Loitsch. LogStream& LogStream::operator<<(double v) { if (buffer_.avail() >= kMaxNumericSize) { //%.6g的时候MAXDOUBLE可以sprint成科学技术法 #ifdef __WINDOWS__ int len = SNPRINTF(buffer_.current(), kMaxNumericSize, kMaxLen, "%.6f", v); #else int len = SNPRINTF(buffer_.current(), kMaxNumericSize, "%.6f", v); #endif if (len >= 0) buffer_.add(len); } return *this; } template<typename T> Fmt::Fmt(const char* fmt, T val) { static_assert(std::is_arithmetic<T>::value == true, "not arithmetix"); length_ = SNPRINTF(buf_, sizeof buf_, fmt, val); assert(static_cast<size_t>(length_) < sizeof buf_); } // Explicit instantiations template Fmt::Fmt(const char* fmt, char); template Fmt::Fmt(const char* fmt, short); template Fmt::Fmt(const char* fmt, unsigned short); template Fmt::Fmt(const char* fmt, int); template Fmt::Fmt(const char* fmt, unsigned int); template Fmt::Fmt(const char* fmt, long); template Fmt::Fmt(const char* fmt, unsigned long); template Fmt::Fmt(const char* fmt, long long); template Fmt::Fmt(const char* fmt, unsigned long long); template Fmt::Fmt(const char* fmt, float); template Fmt::Fmt(const char* fmt, double);
[ "1254070992@qq.com" ]
1254070992@qq.com
f711ea6d4675db49b71fadf7bbcf60ce14442da2
0586591e93cd2cb81568271d40f6cd1342d120cd
/net/reactor.h
bde3c8aac2944f64990c19ac25e1251b1a255595
[]
no_license
Sicily9/Chat
116817eb108d97aab93260c5b4437f762b74c92b
029c2b3defd12d5ce8a6c8f8d9224858c42494c2
refs/heads/master
2020-03-22T01:50:37.250529
2018-07-01T14:04:33
2018-07-01T14:04:33
139,333,446
0
0
null
null
null
null
UTF-8
C++
false
false
1,324
h
/* * reactor.h * * Created on: 2018年2月27日 * Author: xc */ #ifndef NET_REACTOR_H_ #define NET_REACTOR_H_ #include <atomic> #include <thread> #include <vector> #include <boost/noncopyable.hpp> #include <boost/scoped_ptr.hpp> #include <boost/function.hpp> #include <mutex> namespace xc{ namespace net{ class Poller; class Handler; class EventLoop : public boost::noncopyable { public: typedef boost::function<void()> Functor; EventLoop(); ~EventLoop(); void loop(); void quit(); void updateHandler(Handler *handler); void removeHandler(Handler *handler); bool hasHandler(Handler* handler); bool isInLoopThread(); static void configInit(); void wakeup(); void handleRead(); void runInLoop(const Functor& cb); void queueInLoop(const Functor& cb); void doPendingFunctors(); private: static bool _inited; typedef std::vector<Handler*> HandlerList; boost::scoped_ptr<Poller> _poller; std::atomic_bool _looping; std::atomic_bool _quit; const pthread_t _tid; int _wakeupFd; std::atomic_bool _callingPendingFunctors; boost::scoped_ptr<Handler> _wakeupHandler; HandlerList _activeHandlers; Handler* _currentActiveHandler; std::vector<Functor> _pendingFunctors; std::mutex _mutex; }; } } #endif /* NET_REACTOR_H_ */
[ "727847140@qq.com" ]
727847140@qq.com
77437803fb204d9bbd888ecff8f2ebb15745b1ee
8e2551f7bf62234219c94b1d0cc14916ff8bf698
/ZeldaNSQ_US-src-linux/src/game/content/objects/Statue.cpp
a9720c3b8a7fc5e42ed876db219f3c8d73ac7001
[]
no_license
tommybee/zelda-series
762307ac4d30298935bdb2c3a7d7588206523551
2c00ea6f7ef0156118aeeec25214ab935af6e5ca
refs/heads/master
2020-09-14T17:57:48.046854
2016-09-09T07:37:28
2016-09-09T07:37:28
67,777,315
1
0
null
null
null
null
UTF-8
C++
false
false
4,101
cpp
#include "Statue.h" #include "../../../engine/resources/ResourceManager.h" #include "../../../engine/window/WindowManager.h" #include "../../../engine/audio/AudioManager.h" #include "../../game/scene/Scene.h" #include "../../MainController.h" #include "../effects/Plouf.h" Statue::Statue(int i, int j) { x = i; y = j; x0 = x; y0 = y; image = ResourceManager::getInstance()->loadImage("data/images/objects/statue.png", true); // for quadtree operations: width = 16; height = 25; box.setX(x); box.setY(y+9); box.setW(16); box.setH(16); } Statue::~Statue() { ResourceManager::getInstance()->free(image); } void Statue::loop() { if (moving) { if (dx != 0) { if (dx < 0) { width += dx; } else { x += dx; width -= dx; } box.setX(x); box.setW(width); } else if (dy != 0) { if (dy < 0) { height += dy; } else { y += dy; height -= dy; } box.setY(y + 9); box.setH(height - 9); } if (dx != 0 || dy != 0) { // quadtree operations: checkPosition(); computeMaxSize(); } if (height == 25 && width == 16) { moving = false; dx = 0; dy = 0; Scene* scene = MainController::getInstance()->getGameController()->getSceneController()->getScene(); if (isOnWater(&box)) { AudioManager::getInstance()->playSound(TS_PLOUF); scene->getMap()->addEffect(new Plouf(x, y + 9)); alive = false; } else if (isOnGap(&box)) { AudioManager::getInstance()->playSound(TS_TOMBE); alive = false; } } } } void Statue::draw(int offsetX, int offsetY) { int i = x - offsetX; int j = y - offsetY; if (moving) { if (dx < 0) { i += width - 16; } else if (dy < 0) { j += height - 25; } } WindowManager::getInstance()->draw(image, 0, 0, 16, 25, i, j); } void Statue::pousse(Direction d, int v) { if (!moving) { BoundingBox dest; dest.setX(x); dest.setY(y + 9); dest.setW(16); dest.setH(16); switch (d) { case N : dest.setY(y + 9 - 16); break; case S : dest.setY(y + 9 + 16); break; case W : dest.setX(x - 16); break; case E : dest.setX(x + 16); break; } Scene* scene = MainController::getInstance()->getGameController()->getSceneController()->getScene(); if (scene->checkCollisions(&dest, this, true)) { AudioManager::getInstance()->playSound(TS_PUSH); moving = true; switch (d) { case N : y -= 16; height += 16; dy = -v; break; case S : height += 16; dy = v; break; case W : x -= 16; width += 16; dx = -v; break; case E : width += 16; dx = v; break; } box.setX(x); box.setY(y + 9); box.setW(width); box.setH(height - 9); // quadtree operations: checkPosition(); computeMaxSize(); } } } bool Statue::isResetable() { return true; } void Statue::reset() { moving = false; dx = 0; dy = 0; x = x0; y = y0; width = 16; height = 25; box.setX(x); box.setY(y+9); box.setW(16); box.setH(16); checkPosition(); }
[ "tommybee@naver.com" ]
tommybee@naver.com
47f07f5479f4caf2bba6cc6b24783303ecbc5008
5fa970dcbcdd2c5976dfcd52ee7db30a952b92f9
/ftp/FTPClient.cpp
f349a58d736f22f771662a9bdba6fe79eeb3a6cf
[ "curl" ]
permissive
WaterKnight/postprocInstaller
32f18a9808d690f3ac23e15b12f911d480dbad47
07729c4172f92b9402cbe0236e12601a9a3ff117
refs/heads/master
2020-06-29T09:13:30.454760
2019-08-04T13:30:37
2019-08-04T13:30:37
200,496,379
0
0
null
null
null
null
UTF-8
C++
false
false
75,286
cpp
//////////////////////////////////////////////////////////////////////////////// // // The official specification of the File Transfer Protocol (FTP) is the RFC 959. // Most of the documentation are taken from this RFC. // This is an implementation of an simple FTP client. I have tried to implement // platform independent. For the communication i used the classes CBlockingSocket, // CSockAddr, ... from David J. Kruglinski (Inside Visual C++). These classes are // only small wrappers for the sockets-API. // Further I used a smart pointer-implementation from Scott Meyers (Effective C++, // More Effective C++, Effective STL). // The implementation of the logon-sequence (with firewall support) was published // in an article on Codeguru by Phil Anderson. // The code for the parsing of the different FTP LIST responses is taken from // D. J. Bernstein (http://cr.yp.to/ftpparse.html). I only wrapped the c-code in // a class. // I have tested the code on Windows and Linux (Kubuntu). // // Copyright (c) 2004-2012 Thomas Oswald // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // // History: // v1.5 released 2007-06-01 //+# TODO // v1.1 released 2005-12-04 // - Bug in OpenPassiveDataConnection removed: SendCommand was called before data connection was established. // - Bugs in GetSingleResponseLine removed: // * Infinite loop if response line doesn't end with CRLF. // * Return value of std:string->find must be checked against npos. // - Now runs in unicode. // - Streams removed. // - Explicit detaching of observers are not necessary anymore. // - ExecuteDatachannelCommand now accepts an ITransferNotification object. // Through this concept there is no need to write the received files to a file. // For example the bytes can be written only in memory or an other tcp stream. // - Added an interface for the blocking socket (IBlockingSocket). // Therefore it is possible to exchange the socket implementation, e.g. for // writing unit tests (by simulating an specific scenario of a FTP communication). // - Replaced the magic numbers concerning the reply codes by a class. // v1.0 released 2004-10-25 //////////////////////////////////////////////////////////////////////////////// //#include "stdafx.h" #include "FTPClient.h" #include <limits> #include <algorithm> #include <iterator> #include <assert.h> #include <stdio.h> #include "FTPListParse.h" #include "FTPFileStatus.h" #include <iostream> using namespace std; #undef max #ifdef __AFX_H__ // MFC only #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif #endif using namespace nsHelper; namespace nsFTP { class CMakeString { public: CMakeString& operator<<(DWORD dwNum) { DWORD dwTemp = dwNum; int iCnt=1; // name lookup of 'iCnt' changed for new ISO 'for' scoping for( ; (dwTemp/=10) != 0; iCnt++ ) ; m_str.resize(m_str.size() + iCnt); // string size +1 because tsprintf needs the size including the terminating NULL character; // the size method returns the size without the terminating NULL character tsprintf(&(*m_str.begin()), m_str.size()+1, _T("%s%u"), m_str.c_str(), dwNum); return *this; } CMakeString& operator<<(const tstring& strAdd) { m_str += strAdd; return *this; } operator tstring() const { return m_str; } private: tstring m_str; }; tstring& ReplaceStr(tstring& strTarget, const tstring& strToReplace, const tstring& strReplacement) { size_t pos = strTarget.find(strToReplace); while( pos != tstring::npos ) { strTarget.replace(pos, strToReplace.length(), strReplacement); pos = strTarget.find(strToReplace, pos+1); } return strTarget; } class CFile : public CFTPClient::ITransferNotification { FILE* m_pFile; tstring m_strFileName; public: enum TOriginEnum { orBegin=SEEK_SET, orEnd=SEEK_END, orCurrent=SEEK_CUR }; CFile() : m_pFile(NULL) {} virtual ~CFile() { Close(); } bool Open(const tstring& strFileName, const tstring& strMode) { m_strFileName = strFileName; #if _MSC_VER >= 1500 return fopen_s(&m_pFile, CCnv::ConvertToString(strFileName).c_str(), CCnv::ConvertToString(strMode).c_str()) == 0; #else m_pFile = fopen(CCnv::ConvertToString(strFileName).c_str(), CCnv::ConvertToString(strMode).c_str()); return m_pFile!=NULL; #endif } bool Close() { FILE* pFile = m_pFile; m_pFile = NULL; return pFile && fclose(pFile)==0; } bool Seek(long lOffset, TOriginEnum enOrigin) { return m_pFile && fseek(m_pFile, lOffset, enOrigin)==0; } long Tell() { if( !m_pFile ) return -1L; return ftell(m_pFile); } size_t Write(const void* pBuffer, size_t itemSize, size_t itemCount) { if( !m_pFile ) return 0; return fwrite(pBuffer, itemSize, itemCount, m_pFile); } size_t Read(void* pBuffer, size_t itemSize, size_t itemCount) { if( !m_pFile ) return 0; return fread(pBuffer, itemSize, itemCount, m_pFile); } virtual tstring GetLocalStreamName() const override { return m_strFileName; } virtual UINT GetLocalStreamSize() const override { if( !m_pFile ) return 0; const long lCurPos = ftell(m_pFile); fseek(m_pFile, 0, SEEK_END); const long lEndPos = ftell(m_pFile); fseek(m_pFile, lCurPos, SEEK_SET); return lEndPos; } virtual void SetLocalStreamOffset(DWORD dwOffsetFromBeginOfStream) override { Seek(dwOffsetFromBeginOfStream, CFile::orBegin); } virtual void OnBytesReceived(const TByteVector& vBuffer, long lReceivedBytes) override { Write(&(*vBuffer.begin()), sizeof(TByteVector::value_type), lReceivedBytes); } virtual void OnPreBytesSend(char* pszBuffer, size_t bufferSize, size_t& bytesToSend) override { bytesToSend = Read(pszBuffer, sizeof(char), bufferSize); } }; class COutputStream::CPimpl { CPimpl& operator=(const CPimpl&); // no implementation for assignment operator public: CPimpl(const tstring& strEolCharacterSequence, const tstring& strStreamName) : mc_strEolCharacterSequence(strEolCharacterSequence), m_itCurrentPos(m_vBuffer.end()), m_strStreamName(strStreamName) { } const tstring mc_strEolCharacterSequence; tstring m_vBuffer; tstring::iterator m_itCurrentPos; tstring m_strStreamName; }; COutputStream::COutputStream(const tstring& strEolCharacterSequence, const tstring& strStreamName) : m_spPimpl(new CPimpl(strEolCharacterSequence, strStreamName)) { } COutputStream::~COutputStream() {} void COutputStream::SetBuffer(const tstring& strBuffer) { m_spPimpl->m_vBuffer = strBuffer; } const tstring& COutputStream::GetBuffer() const { return m_spPimpl->m_vBuffer; } void COutputStream::SetStartPosition() { m_spPimpl->m_itCurrentPos = m_spPimpl->m_vBuffer.begin(); } bool COutputStream::GetNextLine(tstring& strLine)// const { tstring::iterator it = std::search(m_spPimpl->m_itCurrentPos, m_spPimpl->m_vBuffer.end(), m_spPimpl->mc_strEolCharacterSequence.begin(), m_spPimpl->mc_strEolCharacterSequence.end()); if( it == m_spPimpl->m_vBuffer.end() ) return false; strLine.assign(m_spPimpl->m_itCurrentPos, it); m_spPimpl->m_itCurrentPos = it + m_spPimpl->mc_strEolCharacterSequence.size(); return true; } tstring COutputStream::GetLocalStreamName() const { return m_spPimpl->m_strStreamName; } UINT COutputStream::GetLocalStreamSize() const { return m_spPimpl->m_vBuffer.size(); } void COutputStream::SetLocalStreamOffset(DWORD dwOffsetFromBeginOfStream) { m_spPimpl->m_itCurrentPos = m_spPimpl->m_vBuffer.begin() + dwOffsetFromBeginOfStream; } void COutputStream::OnBytesReceived(const TByteVector& vBuffer, long lReceivedBytes) { std::copy(vBuffer.begin(), vBuffer.begin()+lReceivedBytes, std::back_inserter(m_spPimpl->m_vBuffer)); } void COutputStream::OnPreBytesSend(char* pszBuffer, size_t bufferSize, size_t& bytesToSend) { for( bytesToSend=0; m_spPimpl->m_itCurrentPos!=m_spPimpl->m_vBuffer.end() && bytesToSend < bufferSize; ++m_spPimpl->m_itCurrentPos, ++bytesToSend ) pszBuffer[bytesToSend] = *m_spPimpl->m_itCurrentPos; } } using namespace nsFTP; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// /// constructor /// @param[in] apSocket Instance of socket class which will be used for /// communication with the FTP server. /// CFTPClient class takes ownership of this instance. /// It will be deleted on destruction of this object. /// If this pointer is NULL, the CBlockingSocket implementation /// will be used. /// This gives the ability to set an other socket class. /// For example a socket class can be implemented which simulates /// a FTP server (for unit testing). /// @param[in] uiTimeout Timeout used for socket operation. /// @param[in] uiBufferSize Size of the buffer used for sending and receiving /// data via sockets. The size have an influence on /// the performance. Through empiric test i come to the /// conclusion that 2048 is a good size. /// @param[in] uiResponseWait Sleep time between receive calls to socket when getting /// the response. Sometimes the socket hangs if no wait time /// is set. Normally not wait time is necessary. CFTPClient::CFTPClient(std::auto_ptr<IBlockingSocket> apSocket, unsigned int uiTimeout/*=10*/, unsigned int uiBufferSize/*=2048*/, unsigned int uiResponseWait/*=0*/, const tstring& strRemoteDirectorySeparator/*=_T("/")*/) : mc_uiTimeout(uiTimeout), mc_uiResponseWait(uiResponseWait), mc_strEolCharacterSequence(_T("\r\n")), mc_strRemoteDirectorySeparator(strRemoteDirectorySeparator),//+# documentation missing m_vBuffer(uiBufferSize), m_apSckControlConnection(apSocket), m_apFileListParser(new CFTPListParser()), m_fTransferInProgress(false), m_fAbortTransfer(false), m_fResumeIfPossible(true) { cout << "create" << endl; ASSERT( m_apSckControlConnection.get() ); } /// destructor CFTPClient::~CFTPClient() { if( IsTransferringData() ) Abort(); if( IsConnected() ) Logout(); } /// Attach an observer to the client. You can attach as many observers as you want. /// The client send notifications (more precisely the virtual functions are called) /// to the observers. void CFTPClient::AttachObserver(CFTPClient::CNotification* pObserver) { ASSERT( pObserver ); if( pObserver ) m_setObserver.Attach(pObserver); } /// Detach an observer from the client. void CFTPClient::DetachObserver(CFTPClient::CNotification* pObserver) { ASSERT( pObserver ); if( pObserver ) m_setObserver.Detach(pObserver); } /// Sets the file list parser which is used for parsing the results of the LIST command. void CFTPClient::SetFileListParser(std::auto_ptr<IFileListParser> apFileListParser) { m_apFileListParser = apFileListParser; } /// Returns a set of all observers currently attached to the client. CFTPClient::TObserverSet& CFTPClient::GetObservers() { return m_setObserver; } /// Enables or disables resuming for file transfer operations. /// @param[in] fEnable True enables resuming, false disables it. void CFTPClient::SetResumeMode(bool fEnable/*=true*/) { m_fResumeIfPossible=fEnable; } /// Indicates if the resume mode is set. bool CFTPClient::IsResumeModeEnabled() const { return m_fResumeIfPossible; } /// Opens the control channel to the FTP server. /// @param[in] strServerHost IP-address or name of the server /// @param[in] iServerPort Port for channel. Usually this is port 21. bool CFTPClient::OpenControlChannel(const tstring& strServerHost, USHORT ushServerPort/*=DEFAULT_FTP_PORT*/) { CloseControlChannel(); try { cout << "open " << m_apSckControlConnection.get() << endl; m_apSckControlConnection->Create(SOCK_STREAM); CSockAddr adr = m_apSckControlConnection->GetHostByName(CCnv::ConvertToString(strServerHost).c_str(), ushServerPort); m_apSckControlConnection->Connect(adr); cout << "openB " << m_apSckControlConnection.get() << endl; } catch(CBlockingSocketException& blockingException) { ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); m_apSckControlConnection->Cleanup(); return false; } return true; } /// Returns the connection state of the client. bool CFTPClient::IsConnected() const { bool c = SOCKET()!=INVALID_SOCKET; bool b = m_apSckControlConnection->operator SOCKET()!=INVALID_SOCKET; cout << "connA " << m_apSckControlConnection.get() << " " << b << " " << c << " " << SOCKET() << " " << INVALID_SOCKET << endl; return b; } /// Returns true if a download/upload is running, otherwise false. bool CFTPClient::IsTransferringData() const { return m_fTransferInProgress; } /// Closes the control channel to the FTP server. void CFTPClient::CloseControlChannel() { try { cout << "close" << endl; m_apSckControlConnection->Close(); m_apCurrentRepresentation.reset(NULL); } catch(CBlockingSocketException& blockingException) { blockingException.GetErrorMessage(); m_apSckControlConnection->Cleanup(); } } /// Analyse the repy code of a FTP server-response. /// @param[in] Reply Reply of a FTP server. /// @retval FTP_OK All runs perfect. /// @retval FTP_ERROR Something went wrong. An other response was expected. /// @retval NOT_OK The command was not accepted. int CFTPClient::SimpleErrorCheck(const CReply& Reply) const { if( Reply.Code().IsNegativeReply() ) return FTP_NOTOK; else if( Reply.Code().IsPositiveCompletionReply() ) return FTP_OK; ASSERT( Reply.Code().IsPositiveReply() ); return FTP_ERROR; } /// Logs on to a FTP server. /// @param[in] logonInfo Structure with logon information. bool CFTPClient::Login(const CLogonInfo& logonInfo) { m_LastLogonInfo = logonInfo; enum {LO=-2, ///< Logged On ER=-1, ///< Error NUMLOGIN=9, ///< currently supports 9 different login sequences }; int iLogonSeq[NUMLOGIN][18] = { // this array stores all of the logon sequences for the various firewalls // in blocks of 3 nums. // 1st num is command to send, // 2nd num is next point in logon sequence array if 200 series response // is rec'd from server as the result of the command, // 3rd num is next point in logon sequence if 300 series rec'd { 0,LO,3, 1,LO, 6, 2,LO,ER }, // no firewall { 3, 6,3, 4, 6,ER, 5,ER, 9, 0,LO,12, 1,LO,15, 2,LO,ER }, // SITE hostname { 3, 6,3, 4, 6,ER, 6,LO, 9, 1,LO,12, 2,LO,ER }, // USER after logon { 7, 3,3, 0,LO, 6, 1,LO, 9, 2,LO,ER }, // proxy OPEN { 3, 6,3, 4, 6,ER, 0,LO, 9, 1,LO,12, 2,LO,ER }, // Transparent { 6,LO,3, 1,LO, 6, 2,LO,ER }, // USER with no logon { 8, 6,3, 4, 6,ER, 0,LO, 9, 1,LO,12, 2,LO,ER }, // USER fireID@remotehost { 9,ER,3, 1,LO, 6, 2,LO,ER }, // USER remoteID@remotehost fireID {10,LO,3, 11,LO, 6, 2,LO,ER } // USER remoteID@fireID@remotehost }; // are we connecting directly to the host (logon type 0) or via a firewall? (logon type>0) tstring strTemp; USHORT ushPort=0; if( logonInfo.FwType() == CFirewallType::None()) { strTemp = logonInfo.Hostname(); ushPort = logonInfo.Hostport(); } else { strTemp = logonInfo.FwHost(); ushPort = logonInfo.FwPort(); } tstring strHostnamePort(logonInfo.Hostname()); if( logonInfo.Hostport()!=DEFAULT_FTP_PORT ) strHostnamePort = CMakeString() << logonInfo.Hostname() << _T(":") << logonInfo.Hostport(); // add port to hostname (only if port is not 21) if( IsConnected() ) Logout(); if( !OpenControlChannel(strTemp, ushPort) ) return false; cout << "ghi " << m_apSckControlConnection.get() << endl; // get initial connect msg off server CReply Reply; if( !GetResponse(Reply) || !Reply.Code().IsPositiveCompletionReply() ) return false; int iLogonPoint=0; // go through appropriate logon procedure for ( ; ; ) { // send command, get response CReply Reply; switch(iLogonSeq[logonInfo.FwType().AsEnum()][iLogonPoint]) { // state command command argument success fail case 0: if( SendCommand(CCommand::USER(), logonInfo.Username(), Reply) ) break; else return false; case 1: if( SendCommand(CCommand::PASS(), logonInfo.Password(), Reply) ) break; else return false; case 2: if( SendCommand(CCommand::ACCT(), logonInfo.Account(), Reply) ) break; else return false; case 3: if( SendCommand(CCommand::USER(), logonInfo.FwUsername(), Reply) ) break; else return false; case 4: if( SendCommand(CCommand::PASS(), logonInfo.FwPassword(), Reply) ) break; else return false; case 5: if( SendCommand(CCommand::SITE(), strHostnamePort, Reply) ) break; else return false; case 6: if( SendCommand(CCommand::USER(), logonInfo.Username() + _T("@") + strHostnamePort, Reply) ) break; else return false; case 7: if( SendCommand(CCommand::OPEN(), strHostnamePort, Reply) ) break; else return false; case 8: if( SendCommand(CCommand::USER(), logonInfo.FwUsername() + _T("@") + strHostnamePort, Reply) ) break; else return false; case 9: if( SendCommand(CCommand::USER(), logonInfo.Username() + _T("@") + strHostnamePort + _T(" ") + logonInfo.FwUsername(), Reply) ) break; else return false; case 10: if( SendCommand(CCommand::USER(), logonInfo.Username() + _T("@") + logonInfo.FwUsername() + _T("@") + strHostnamePort, Reply) ) break; else return false; case 11: if( SendCommand(CCommand::PASS(), logonInfo.Password() + _T("@") + logonInfo.FwPassword(), Reply) ) break; else return false; } if( !Reply.Code().IsPositiveCompletionReply() && !Reply.Code().IsPositiveIntermediateReply() ) { cout << "A" << Reply.Code().Value() << endl; return false; } const unsigned int uiFirstDigitOfReplyCode = CCnv::TStringToLong(Reply.Code().Value())/100; iLogonPoint=iLogonSeq[logonInfo.FwType().AsEnum()][iLogonPoint + uiFirstDigitOfReplyCode-1]; //get next command from array switch(iLogonPoint) { case ER: // ER means somewhat has gone wrong { ReportError(_T("Logon failed."), CCnv::ConvertToTString(__FILE__), __LINE__); } cout << "B" << endl; return false; case LO: // LO means we're fully logged on if( ChangeWorkingDirectory(mc_strRemoteDirectorySeparator)!=FTP_OK ) { cout << "C" << endl; return false; } cout << "D " << m_apSckControlConnection.get() << endl; return true; } } //return false; } /// Rename a file on the FTP server. /// @remarks Can be used for moving the file to another directory. /// @param[in] strOldName Name of the file to rename. /// @param[in] strNewName The new name for the file. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Rename(const tstring& strOldName, const tstring& strNewName) const { CReply Reply; if( !SendCommand(CCommand::RNFR(), strOldName, Reply) ) return FTP_ERROR; if( Reply.Code().IsNegativeReply() ) return FTP_NOTOK; else if( !Reply.Code().IsPositiveIntermediateReply() ) { ASSERT( Reply.Code().IsPositiveCompletionReply() || Reply.Code().IsPositivePreliminaryReply() ); return FTP_ERROR; } if( !SendCommand(CCommand::RNTO(), strNewName, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Moves a file within the FTP server. /// @param[in] strFullSourceFilePath Name of the file which should be moved. /// @param[in] strFullTargetFilePath The destination where the file should be moved to (file name must be also given). /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Move(const tstring& strFullSourceFilePath, const tstring& strFullTargetFilePath) const { return Rename(strFullSourceFilePath, strFullTargetFilePath); } /// Gets the directory listing of the FTP server. Sends the LIST command to /// the FTP server. /// @param[in] strPath Starting path for the list command. /// @param[out] vstrFileList Returns a simple list of the files and folders of the specified directory. /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::List(const tstring& strPath, TStringVector& vstrFileList, bool fPasv) const { COutputStream outputStream(mc_strEolCharacterSequence, CCommand::LIST().AsString()); if( !ExecuteDatachannelCommand(CCommand::LIST(), strPath, CRepresentation(CType::ASCII()), fPasv, 0, outputStream) ) return false; vstrFileList.clear(); tstring strLine; outputStream.SetStartPosition(); while( outputStream.GetNextLine(strLine) ) vstrFileList.push_back(strPath + strLine.c_str()); return true; } /// Gets the directory listing of the FTP server. Sends the NLST command to /// the FTP server. /// @param[in] strPath Starting path for the list command. /// @param[out] vstrFileList Returns a simple list of the files and folders of the specified the directory. /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::NameList(const tstring& strPath, TStringVector& vstrFileList, bool fPasv) const { COutputStream outputStream(mc_strEolCharacterSequence, CCommand::NLST().AsString()); if( !ExecuteDatachannelCommand(CCommand::NLST(), strPath, CRepresentation(CType::ASCII()), fPasv, 0, outputStream) ) return false; vstrFileList.clear(); tstring strLine; outputStream.SetStartPosition(); while( outputStream.GetNextLine(strLine) ) vstrFileList.push_back(strPath + strLine.c_str()); return true; } /// Gets the directory listing of the FTP server. Sends the LIST command to /// the FTP server. /// @param[in] strPath Starting path for the list command. /// @param[out] vFileList Returns a detailed list of the files and folders of the specified directory. /// vFileList contains CFTPFileStatus-Objects. These Objects provide a lot of /// information about the file/folder. /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::List(const tstring& strPath, TFTPFileStatusShPtrVec& vFileList, bool fPasv) const { ASSERT( m_apFileListParser.get() ); COutputStream outputStream(mc_strEolCharacterSequence, CCommand::LIST().AsString()); if( !ExecuteDatachannelCommand(CCommand::LIST(), strPath, CRepresentation(CType::ASCII()), fPasv, 0, outputStream) ) return false; vFileList.clear(); tstring strLine; outputStream.SetStartPosition(); while( outputStream.GetNextLine(strLine) ) { TFTPFileStatusShPtr spFtpFileStatus(new CFTPFileStatus()); if( m_apFileListParser->Parse(*spFtpFileStatus, strLine) ) { spFtpFileStatus->Path() = strPath; vFileList.push_back(spFtpFileStatus); } } return true; } /// Gets the directory listing of the FTP server. Sends the NLST command to /// the FTP server. /// @param[in] strPath Starting path for the list command. /// @param[out] vFileList Returns a simple list of the files and folders of the specified directory. /// vFileList contains CFTPFileStatus-Objects. Normally these Objects provide /// a lot of information about the file/folder. But the NLST-command provide /// only a simple list of the directory content (no specific information). /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::NameList(const tstring& strPath, TFTPFileStatusShPtrVec& vFileList, bool fPasv) const { COutputStream outputStream(mc_strEolCharacterSequence, CCommand::NLST().AsString()); if( !ExecuteDatachannelCommand(CCommand::NLST(), strPath, CRepresentation(CType::ASCII()), fPasv, 0, outputStream) ) return false; vFileList.clear(); tstring strLine; outputStream.SetStartPosition(); while( outputStream.GetNextLine(strLine) ) { TFTPFileStatusShPtr spFtpFileStatus(new CFTPFileStatus()); spFtpFileStatus->Path() = strPath; spFtpFileStatus->Name() = strLine; vFileList.push_back(spFtpFileStatus); } return true; } /// Gets a file from the FTP server. /// Uses C functions for file access (very fast). /// @param[in] strRemoteFile Filename of the sourcefile on the FTP server. /// @param[in] strLocalFile Filename of the target file on the local computer. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::DownloadFile(const tstring& strRemoteFile, const tstring& strLocalFile, const CRepresentation& repType, bool fPasv) const { CFile file; cout << "dlA" << endl; if( !file.Open(strLocalFile, m_fResumeIfPossible?_T("ab"):_T("wb")) ) { ReportError(CError::GetErrorDescription(), CCnv::ConvertToTString(__FILE__), __LINE__); return false; } file.Seek(0, CFile::orEnd); cout << "dlB" << endl; return DownloadFile(strRemoteFile, file, repType, fPasv); } /// Gets a file from the FTP server. /// Uses C functions for file access (very fast). /// @param[in] strRemoteFile Filename of the sourcefile on the FTP server. /// @param[in] Observer Object which receives the transfer notifications. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::DownloadFile(const tstring& strRemoteFile, ITransferNotification& Observer, const CRepresentation& repType, bool fPasv) const { long lRemoteFileSize = 0; FileSize(strRemoteFile, lRemoteFileSize); for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnPreReceiveFile(strRemoteFile, Observer.GetLocalStreamName(), lRemoteFileSize); const bool fRet = ExecuteDatachannelCommand(CCommand::RETR(), strRemoteFile, repType, fPasv, m_fResumeIfPossible ? Observer.GetLocalStreamSize() : 0, Observer); for( TObserverSet::const_iterator it2=m_setObserver.begin(); it2!=m_setObserver.end(); it2++ ) (*it2)->OnPostReceiveFile(strRemoteFile, Observer.GetLocalStreamName(), lRemoteFileSize); return fRet; } /// Gets a file from the FTP server. /// The target file is on an other FTP server (FXP). /// NOTICE: The file is directly transferred from one server to the other server. /// @param[in] strSourceFile File which is on the source FTP server. /// @param[in] TargetFtpServer The FTP server where the downloaded file will be stored. /// @param[in] strTargetFile Filename of the target file on the target FTP server. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::DownloadFile(const tstring& strSourceFile, const CFTPClient& TargetFtpServer, const tstring& strTargetFile, const CRepresentation& repType/*=CRepresentation(CType::Image())*/, bool fPasv/*=true*/) const { cout << "download " << m_apSckControlConnection.get() << endl; return TransferFile(*this, strSourceFile, TargetFtpServer, strTargetFile, repType, fPasv); } /// Puts a file on the FTP server. /// Uses C functions for file access (very fast). /// @param[in] strLocalFile Filename of the the local sourcefile which to put on the FTP server. /// @param[in] strRemoteFile Filename of the target file on the FTP server. /// @param[in] fStoreUnique if true, the FTP command STOU is used for saving /// else the FTP command STOR is used. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::UploadFile(const tstring& strLocalFile, const tstring& strRemoteFile, bool fStoreUnique, const CRepresentation& repType, bool fPasv) const { CFile file; if( !file.Open(strLocalFile, _T("rb")) ) { ReportError(CError::GetErrorDescription(), CCnv::ConvertToTString(__FILE__), __LINE__); return false; } return UploadFile(file, strRemoteFile, fStoreUnique, repType, fPasv); } /// Puts a file on the FTP server. /// Uses C functions for file access (very fast). /// @param[in] Observer Object which receives the transfer notifications for upload requests. /// @param[in] strRemoteFile Filename of the target file on the FTP server. /// @param[in] fStoreUnique if true, the FTP command STOU is used for saving /// else the FTP command STOR is used. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::UploadFile(ITransferNotification& Observer, const tstring& strRemoteFile, bool fStoreUnique, const CRepresentation& repType, bool fPasv) const { long lRemoteFileSize = 0; if( m_fResumeIfPossible ) FileSize(strRemoteFile, lRemoteFileSize); CCommand cmd(CCommand::STOR()); if( lRemoteFileSize > 0 ) cmd = CCommand::APPE(); else if( fStoreUnique ) cmd = CCommand::STOU(); const long lLocalFileSize = Observer.GetLocalStreamSize(); Observer.SetLocalStreamOffset(lRemoteFileSize); TObserverSet::const_iterator it; for( it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnPreSendFile(Observer.GetLocalStreamName(), strRemoteFile, lLocalFileSize); const bool fRet = ExecuteDatachannelCommand(cmd, strRemoteFile, repType, fPasv, 0, Observer); for( it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnPostSendFile(Observer.GetLocalStreamName(), strRemoteFile, lLocalFileSize); return fRet; } /// Puts a file on the FTP server. /// The source file is on an other FTP server (FXP). /// NOTICE: The file is directly transferred from one server to the other server. /// @param[in] SourceFtpServer A FTP server from which the file is taken for upload action. /// @param[in] strSourceFile File which is on the source FTP server. /// @param[in] strTargetFile Filename of the target file on the FTP server. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive bool CFTPClient::UploadFile(const CFTPClient& SourceFtpServer, const tstring& strSourceFile, const tstring& strTargetFile, const CRepresentation& repType/*=CRepresentation(CType::Image())*/, bool fPasv/*=true*/) const { return TransferFile(SourceFtpServer, strSourceFile, *this, strTargetFile, repType, !fPasv); } /// Transfers a file from a FTP server to another FTP server. /// The source file is on an other FTP server (FXP). /// NOTICE: The file is directly transferred from one server to the other server. /// @param[in] SourceFtpServer A FTP server from which the file which is copied. /// @param[in] strSourceFile Name of the file which is on the source FTP server. /// @param[in] TargetFtpServer A FTP server to which the file is copied. /// @param[in] strTargetFile Name of the file on the target FTP server. /// @param[in] repType Representation Type (see documentation of CRepresentation) /// @param[in] fPasv see documentation of CFTPClient::Passive /*static*/ bool CFTPClient::TransferFile(const CFTPClient& SourceFtpServer, const tstring& strSourceFile, const CFTPClient& TargetFtpServer, const tstring& strTargetFile, const CRepresentation& repType/*=CRepresentation(CType::Image())*/, bool fSourcePasv/*=false*/) { cout << "transA" << endl; // transmit representation to server if( SourceFtpServer.RepresentationType(repType)!=FTP_OK ) return false; cout << "transB" << endl; if( TargetFtpServer.RepresentationType(repType)!=FTP_OK ) return false; cout << "transC" << endl; const CFTPClient& PassiveServer = fSourcePasv ? SourceFtpServer : TargetFtpServer; const CFTPClient& ActiveServer = fSourcePasv ? TargetFtpServer : SourceFtpServer; // set one FTP server in passive mode // the FTP server opens a port and tell us the socket (ip address + port) // this socket is used for opening the data connection ULONG ulIP = 0; USHORT ushSock = 0; if( PassiveServer.Passive(ulIP, ushSock)!=FTP_OK ) { cout << "not passive" << endl; return false;} cout << "transD" << endl; CSockAddr csaPassiveServer(ulIP, ushSock); // transmit the socket (ip address + port) of the first FTP server to the // second server // the second FTP server establishes then the data connection to the first if( ActiveServer.DataPort(csaPassiveServer.DottedDecimal(), ushSock)!=FTP_OK ) return false; cout << "transE" << endl; if( !SourceFtpServer.SendCommand(CCommand::RETR(), strSourceFile) ) return false; cout << "transEE" << endl; CReply ReplyTarget; if( !TargetFtpServer.SendCommand(CCommand::STOR(), strTargetFile, ReplyTarget) || !ReplyTarget.Code().IsPositivePreliminaryReply() ){ cout << "reply " << ReplyTarget.Code().Value() << endl; return false;} cout << "transF" << endl; CReply ReplySource; if( !SourceFtpServer.GetResponse(ReplySource) || !ReplySource.Code().IsPositivePreliminaryReply() ) return false; cout << "transG" << endl; // get response from FTP servers if( !SourceFtpServer.GetResponse(ReplySource) || !ReplySource.Code().IsPositiveCompletionReply() || !TargetFtpServer.GetResponse(ReplyTarget) || !ReplyTarget.Code().IsPositiveCompletionReply() ) return false; cout << "transEnd" << endl; return true; } /// Executes a commando that result in a communication over the data port. /// @param[in] crDatachannelCmd Command to be executeted. /// @param[in] strPath Parameter for the command usually a path. /// @param[in] representation see documentation of CFTPClient::CRepresentation /// @param[in] fPasv see documentation of CFTPClient::Passive /// @param[in] dwByteOffset Server marker at which file transfer is to be restarted. /// @param[in] Observer Object for observing the execution of the command. bool CFTPClient::ExecuteDatachannelCommand(const CCommand& crDatachannelCmd, const tstring& strPath, const CRepresentation& representation, bool fPasv, DWORD dwByteOffset, ITransferNotification& Observer) const { if( !crDatachannelCmd.IsDatachannelCommand() ) { ASSERT(false); return false; } if( m_fTransferInProgress ) return false; if( !IsConnected() ) return false; // transmit representation to server if( RepresentationType(representation)!=FTP_OK ) return false; std::auto_ptr<IBlockingSocket> apSckDataConnection(m_apSckControlConnection->CreateInstance()); if( fPasv ) { if( !OpenPassiveDataConnection(*apSckDataConnection, crDatachannelCmd, strPath, dwByteOffset) ) return false; } else { if( !OpenActiveDataConnection(*apSckDataConnection, crDatachannelCmd, strPath, dwByteOffset) ) return false; } const bool fTransferOK = TransferData(crDatachannelCmd, Observer, *apSckDataConnection); apSckDataConnection->Close(); // get response from FTP server CReply Reply; if( !fTransferOK || !GetResponse(Reply) || !Reply.Code().IsPositiveCompletionReply() ) return false; return true; } /// Executes a commando that result in a communication over the data port. /// @param[in] crDatachannelCmd Command to be executeted. /// @param[in] Observer Object for observing the execution of the command. /// @param[in] sckDataConnection Socket which is used for sending/receiving data. bool CFTPClient::TransferData(const CCommand& crDatachannelCmd, ITransferNotification& Observer, IBlockingSocket& sckDataConnection) const { if( crDatachannelCmd.IsDatachannelWriteCommand() ) { if( !SendData(Observer, sckDataConnection) ) return false; } else if( crDatachannelCmd.IsDatachannelReadCommand() ) { if( !ReceiveData(Observer, sckDataConnection) ) return false; } else { ASSERT( false ); return false; } return true; } /// Opens an active data connection. /// @param[out] sckDataConnection /// @param[in] crDatachannelCmd Command to be executeted. /// @param[in] strPath Parameter for the command usually a path. /// @param[in] dwByteOffset Server marker at which file transfer is to be restarted. bool CFTPClient::OpenActiveDataConnection(IBlockingSocket& sckDataConnection, const CCommand& crDatachannelCmd, const tstring& strPath, DWORD dwByteOffset) const { if( !crDatachannelCmd.IsDatachannelCommand() ) { ASSERT(false); return false; } std::auto_ptr<IBlockingSocket> apSckServer(m_apSckControlConnection->CreateInstance()); USHORT ushLocalSock = 0; try { // INADDR_ANY = ip address of localhost // second parameter "0" means that the WINSOCKAPI ask for a port CSockAddr csaAddressTemp(INADDR_ANY, 0); apSckServer->Create(SOCK_STREAM); apSckServer->Bind(csaAddressTemp); apSckServer->GetSockAddr(csaAddressTemp); ushLocalSock=csaAddressTemp.Port(); apSckServer->Listen(); } catch(CBlockingSocketException& blockingException) { ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); apSckServer->Cleanup(); return false; } // get own ip address CSockAddr csaLocalAddress; m_apSckControlConnection->GetSockAddr(csaLocalAddress); // transmit the socket (ip address + port) to the server // the FTP server establishes then the data connection if( DataPort(csaLocalAddress.DottedDecimal(), ushLocalSock)!=FTP_OK ) return false; // if resuming is activated then set offset if( m_fResumeIfPossible && (crDatachannelCmd==CCommand::STOR() || crDatachannelCmd==CCommand::RETR() || crDatachannelCmd==CCommand::APPE() ) && (dwByteOffset!=0 && Restart(dwByteOffset)!=FTP_OK) ) return false; // send FTP command RETR/STOR/NLST/LIST to the server CReply Reply; if( !SendCommand(crDatachannelCmd, strPath, Reply) || !Reply.Code().IsPositivePreliminaryReply() ) return false; // accept the data connection CSockAddr sockAddrTemp; if( !apSckServer->Accept(sckDataConnection, sockAddrTemp) ) return false; return true; } /// Opens a passive data connection. /// @param[out] sckDataConnection /// @param[in] crDatachannelCmd Command to be executeted. /// @param[in] strPath Parameter for the command usually a path. /// @param[in] dwByteOffset Server marker at which file transfer is to be restarted. bool CFTPClient::OpenPassiveDataConnection(IBlockingSocket& sckDataConnection, const CCommand& crDatachannelCmd, const tstring& strPath, DWORD dwByteOffset) const { if( !crDatachannelCmd.IsDatachannelCommand() ) { ASSERT(false); return false; } ULONG ulRemoteHostIP = 0; USHORT ushServerSock = 0; // set passive mode // the FTP server opens a port and tell us the socket (ip address + port) // this socket is used for opening the data connection if( Passive(ulRemoteHostIP, ushServerSock)!=FTP_OK ) return false; // establish connection CSockAddr sockAddrTemp; try { sckDataConnection.Create(SOCK_STREAM); CSockAddr csaAddress(ulRemoteHostIP, ushServerSock); sckDataConnection.Connect(csaAddress); } catch(CBlockingSocketException& blockingException) { ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); sckDataConnection.Cleanup(); return false; } // if resuming is activated then set offset if( m_fResumeIfPossible && (crDatachannelCmd==CCommand::STOR() || crDatachannelCmd==CCommand::RETR() || crDatachannelCmd==CCommand::APPE() ) && (dwByteOffset!=0 && Restart(dwByteOffset)!=FTP_OK) ) return false; // send FTP command RETR/STOR/NLST/LIST to the server CReply Reply; if( !SendCommand(crDatachannelCmd, strPath, Reply) || !Reply.Code().IsPositivePreliminaryReply() ) return false; return true; } /// Sends data over a socket to the server. /// @param[in] Observer Object for observing the execution of the command. /// @param[in] sckDataConnection Socket which is used for the send action. bool CFTPClient::SendData(ITransferNotification& Observer, IBlockingSocket& sckDataConnection) const { try { m_fTransferInProgress=true; int iNumWrite = 0; size_t bytesRead = 0; Observer.OnPreBytesSend(&m_vBuffer.front(), m_vBuffer.size(), bytesRead); while( !m_fAbortTransfer && bytesRead!=0 ) { iNumWrite = sckDataConnection.Write(&(*m_vBuffer.begin()), static_cast<int>(bytesRead), mc_uiTimeout); ASSERT( iNumWrite == static_cast<int>(bytesRead) ); for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnBytesSent(m_vBuffer, iNumWrite); Observer.OnPreBytesSend(&m_vBuffer.front(), m_vBuffer.size(), bytesRead); } m_fTransferInProgress=false; if( m_fAbortTransfer ) { Abort(); return false; } } catch(CBlockingSocketException& blockingException) { m_fTransferInProgress=false; ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); sckDataConnection.Cleanup(); return false; } return true; } /// Receives data over a socket from the server. /// @param[in] Observer Object for observing the execution of the command. /// @param[in] sckDataConnection Socket which is used for receiving the data. bool CFTPClient::ReceiveData(ITransferNotification& Observer, IBlockingSocket& sckDataConnection) const { try { m_fTransferInProgress = true; for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnBeginReceivingData(); int iNumRead=sckDataConnection.Receive(&(*m_vBuffer.begin()), static_cast<int>(m_vBuffer.size()), mc_uiTimeout); long lTotalBytes = iNumRead; while( !m_fAbortTransfer && iNumRead!=0 ) { for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnBytesReceived(m_vBuffer, iNumRead); Observer.OnBytesReceived(m_vBuffer, iNumRead); iNumRead=sckDataConnection.Receive(&(*m_vBuffer.begin()), static_cast<int>(m_vBuffer.size()), mc_uiTimeout); lTotalBytes += iNumRead; } for( TObserverSet::const_iterator it2=m_setObserver.begin(); it2!=m_setObserver.end(); it2++ ) (*it2)->OnEndReceivingData(lTotalBytes); m_fTransferInProgress=false; if( m_fAbortTransfer ) { Abort(); return false; } } catch(CBlockingSocketException& blockingException) { m_fTransferInProgress=false; ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); sckDataConnection.Cleanup(); return false; } return true; } /// Sends a command to the server. /// @param[in] Command Command to send. bool CFTPClient::SendCommand(const CCommand& Command, const CArg& Arguments) const { cout << "sendCmdA" << endl; if( !IsConnected() ) return false; cout << "sendCmdB" << endl; try { for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnSendCommand(Command, Arguments); const std::string strCommand = CCnv::ConvertToString(Command.AsString(Arguments)) + "\r\n"; m_apSckControlConnection->Write(strCommand.c_str(), static_cast<int>(strCommand.length()), mc_uiTimeout); } catch(CBlockingSocketException& blockingException) { ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); const_cast<CFTPClient*>(this)->m_apSckControlConnection->Cleanup(); return false; } cout << "sendCmd success" << endl; return true; } /// Sends a command to the server. /// @param[in] Command Command to send. /// @param[out] Reply The Reply of the server to the sent command. bool CFTPClient::SendCommand(const CCommand& Command, const CArg& Arguments, CReply& Reply) const { if( !SendCommand(Command, Arguments) || !GetResponse(Reply) ) return false; return true; } /// This function gets the server response. /// A server response can exists of more than one line. This function /// returns the full response (multiline). /// @param[out] Reply Reply of the server to a command. bool CFTPClient::GetResponse(CReply& Reply) const { tstring strResponse; if( !GetSingleResponseLine(strResponse) ) return false; if( strResponse.length()>3 && strResponse.at(3)==_T('-') ) { tstring strSingleLine(strResponse); const int iRetCode=CCnv::TStringToLong(strResponse); // handle multi-line server responses while( !(strSingleLine.length()>3 && strSingleLine.at(3)==_T(' ') && CCnv::TStringToLong(strSingleLine)==iRetCode) ) { if( !GetSingleResponseLine(strSingleLine) ) return false; strResponse += mc_strEolCharacterSequence + strSingleLine; } } bool fRet = Reply.Set(strResponse); for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnResponse(Reply); return fRet; } /// Reads a single response line from the server control channel. /// @param[out] strResponse Response of the server as string. bool CFTPClient::GetSingleResponseLine(tstring& strResponse) const { if( !IsConnected() ) return false; try { if( m_qResponseBuffer.empty() ) { // internal buffer is empty ==> get response from FTP server int iNum=0; std::string strTemp; do { iNum=m_apSckControlConnection->Receive(&(*m_vBuffer.begin()), static_cast<int>(m_vBuffer.size())-1, mc_uiTimeout); if( mc_uiResponseWait !=0 ) Sleep(mc_uiResponseWait); m_vBuffer[iNum] = '\0'; strTemp+=&(*m_vBuffer.begin()); } while( iNum==static_cast<int>(m_vBuffer.size())-1 && m_apSckControlConnection->CheckReadability() ); // each line in response is a separate entry in the internal buffer while( strTemp.length() ) { size_t iCRLF=strTemp.find('\n'); if( iCRLF != std::string::npos ) { m_qResponseBuffer.push(strTemp.substr(0, iCRLF+1)); strTemp.erase(0, iCRLF+1); } else { // this is not rfc standard; normally each command must end with CRLF // in this case it doesn't m_qResponseBuffer.push(strTemp); strTemp.clear(); } } if( m_qResponseBuffer.empty() ) return false; } // get first response-line from buffer strResponse = CCnv::ConvertToTString(m_qResponseBuffer.front().c_str()); m_qResponseBuffer.pop(); // remove CrLf if exists (don't use mc_strEolCharacterSequence here) if( strResponse.length()> 1 && strResponse.substr(strResponse.length()-2)==_T("\r\n") ) strResponse.erase(strResponse.length()-2, 2); } catch(CBlockingSocketException& blockingException) { ReportError(blockingException.GetErrorMessage(), CCnv::ConvertToTString(__FILE__), __LINE__); const_cast<CFTPClient*>(this)->m_apSckControlConnection->Cleanup(); return false; } return true; } /// Executes the FTP command CDUP (change to parent directory). /// This command is a special case of CFTPClient::ChangeWorkingDirectory /// (CWD), and is included to simplify the implementation of programs for /// transferring directory trees between operating systems having different /// syntaxes for naming the parent directory. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::ChangeToParentDirectory() const { CReply Reply; if( !SendCommand(CCommand::CDUP(), CArg(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command QUIT. /// This command terminates a USER and if file transfer is not in progress, /// the server closes the control connection. If file transfer is in progress, /// the connection will remain open for result response and the server will /// then close it. /// If the user-process is transferring files for several USERs but does not /// wish to close and then reopen connections for each, then the REIN command /// should be used instead of QUIT. /// An unexpected close on the control connection will cause the server to take /// the effective action of an abort (ABOR) and a logout. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Logout() { CReply Reply; if( !SendCommand(CCommand::QUIT(), CArg(), Reply) ) return FTP_ERROR; CloseControlChannel(); return SimpleErrorCheck(Reply); } /// Executes the FTP command PASV. Set the passive mode. /// This command requests the server-DTP (data transfer process) on a data to /// "listen" port (which is not its default data port) and to wait for a /// connection rather than initiate one upon receipt of a transfer command. /// The response to this command includes the host and port address this /// server is listening on. /// @param[out] ulIpAddress IP address the server is listening on. /// @param[out] ushPort Port the server is listening on. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Passive(ULONG& ulIpAddress, USHORT& ushPort) const { CReply Reply; if( !SendCommand(CCommand::PASV(), CArg(), Reply) ) return FTP_ERROR; if( Reply.Code().IsPositiveCompletionReply() ) { if( !GetIpAddressFromResponse(Reply.Value(), ulIpAddress, ushPort) ) return FTP_ERROR; } return SimpleErrorCheck(Reply); } /// Parses a response string and extracts the ip address and port information. /// @param[in] strResponse The response string of a FTP server which holds /// the ip address and port information. /// @param[out] ulIpAddress Buffer for the ip address. /// @param[out] ushPort Buffer for the port information. /// @retval true Everything went ok. /// @retval false An error occurred (invalid format). bool CFTPClient::GetIpAddressFromResponse(const tstring& strResponse, ULONG& ulIpAddress, USHORT& ushPort) const { // parsing of ip-address and port implemented with a finite state machine // ...(192,168,1,1,3,44)... enum T_enState { state0, state1, state2, state3, state4 } enState = state0; tstring strIpAddress, strPort; USHORT ushTempPort = 0; ULONG ulTempIpAddress = 0; int iCommaCnt = 4; for( tstring::const_iterator it=strResponse.begin(); it!=strResponse.end(); ++it ) { switch( enState ) { case state0: if( *it == _T('(') ) enState = state1; break; case state1: if( *it == _T(',') ) { if( --iCommaCnt == 0 ) { enState = state2; ulTempIpAddress += CCnv::TStringToLong(strIpAddress.c_str()); } else { ulTempIpAddress += CCnv::TStringToLong(strIpAddress.c_str())<<8*iCommaCnt; strIpAddress.clear(); } } else { if( !tisdigit(*it) ) return false; strIpAddress += *it; } break; case state2: if( *it == _T(',') ) { ushTempPort = static_cast<USHORT>(CCnv::TStringToLong(strPort.c_str())<<8); strPort.clear(); enState = state3; } else { if( !tisdigit(*it) ) return false; strPort += *it; } break; case state3: if( *it == _T(')') ) { // compiler warning if using +=operator ushTempPort = ushTempPort + static_cast<USHORT>(CCnv::TStringToLong(strPort.c_str())); enState = state4; } else { if( !tisdigit(*it) ) return false; strPort += *it; } break; case state4: break; // some compilers complain if not all enumeration values are listet } } if( enState==state4 ) { ulIpAddress = ulTempIpAddress; ushPort = ushTempPort; } return enState==state4; } /// Executes the FTP command ABOR. /// This command tells the server to abort the previous FTP service command /// and any associated transfer of data. The abort command may require /// "special action", as discussed in the Section on FTP Commands, to force /// recognition by the server. No action is to be taken if the previous /// command has been completed (including data transfer). The control /// connection is not to be closed by the server, but the data connection /// must be closed. /// There are two cases for the server upon receipt of this command:<BR> /// (1) the FTP service command was already completed, or <BR> /// (2) the FTP service command is still in progress.<BR> /// In the first case, the server closes the data connection (if it is open) /// and responds with a 226 reply, indicating that the abort command was /// successfully processed. /// In the second case, the server aborts the FTP service in progress and /// closes the data connection, returning a 426 reply to indicate that the /// service request terminated abnormally. The server then sends a 226 reply, /// indicating that the abort command was successfully processed. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Abort() const { if( m_fTransferInProgress ) { m_fAbortTransfer = true; return FTP_OK; } m_fAbortTransfer = false; CReply Reply; if( !SendCommand(CCommand::ABOR(), CArg(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command PWD (PRINT WORKING DIRECTORY) /// This command causes the name of the current working directory /// to be returned in the reply. int CFTPClient::PrintWorkingDirectory() const { CReply Reply; if( !SendCommand(CCommand::PWD(), CArg(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command SYST (SYSTEM) /// This command is used to find out the type of operating system at the server. /// The reply shall have as its first word one of the system names listed in the /// current version of the Assigned Numbers document [Reynolds, Joyce, and /// Jon Postel, "Assigned Numbers", RFC 943, ISI, April 1985.]. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::System() const { CReply Reply; if( !SendCommand(CCommand::SYST(), CArg(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command NOOP /// This command does not affect any parameters or previously entered commands. /// It specifies no action other than that the server send an FTP_OK reply. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Noop() const { CReply Reply; if( !SendCommand(CCommand::NOOP(), CArg(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command PORT (DATA PORT) /// The argument is a HOST-PORT specification for the data port to be used in data /// connection. There are defaults for both the user and server data ports, and /// under normal circumstances this command and its reply are not needed. If /// this command is used, the argument is the concatenation of a 32-bit internet /// host address and a 16-bit TCP port address. /// @param[in] strHostIP IP-address like xxx.xxx.xxx.xxx /// @param[in] uiPort 16-bit TCP port address. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::DataPort(const tstring& strHostIP, USHORT ushPort) const { tstring strPortArguments; // convert the port number to 2 bytes + add to the local IP strPortArguments = CMakeString() << strHostIP << _T(",") << (ushPort>>8) << _T(",") << (ushPort&0xFF); ReplaceStr(strPortArguments, _T("."), _T(",")); CReply Reply; if( !SendCommand(CCommand::PORT(), strPortArguments, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command TYPE (REPRESENTATION TYPE) /// Caches the representation state if successful. /// see Documentation of nsFTP::CRepresentation /// @param[in] representation see Documentation of nsFTP::CRepresentation /// @param[in] iSize Indicates Bytesize for type LocalByte. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::RepresentationType(const CRepresentation& representation, DWORD dwSize) const { // check representation cout << "presA" << endl; if( m_apCurrentRepresentation.get()!=NULL && representation==*m_apCurrentRepresentation ) return FTP_OK; cout << "presB" << endl; const int iRet = _RepresentationType(representation, dwSize); cout << "presBB" << endl; if( iRet==FTP_OK ) { cout << "presC" << endl; if( m_apCurrentRepresentation.get()==NULL ) { cout << "presD" << endl; m_apCurrentRepresentation.reset(new CRepresentation(representation));} else{ cout << "presE" << endl; *m_apCurrentRepresentation = representation;} } else{ cout << "presCC" << endl; m_apCurrentRepresentation.reset(NULL);} cout << "presRet" << iRet << endl; return iRet; } /// Executes the FTP command TYPE (REPRESENTATION TYPE) /// see Documentation of nsFTP::CRepresentation /// @param[in] representation see Documentation of nsFTP::CRepresentation /// @param[in] dwSize Indicates Bytesize for type LocalByte. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::_RepresentationType(const CRepresentation& representation, DWORD dwSize) const { CArg Arguments(representation.Type().AsString()); cout << "repTypeA" << endl; switch( representation.Type().AsEnum() ) { case CType::tyLocalByte: Arguments.push_back(CMakeString() << dwSize); break; case CType::tyASCII: case CType::tyEBCDIC: case CType::tyImage: if( representation.Format().IsValid() ) Arguments.push_back(representation.Format().AsString()); } cout << "repTypeB" << endl; CReply Reply; for (int i = 0; i < Arguments.size(); i++) { cout << i << ": " << Arguments.at(i) << endl; } cout << CCommand::TYPE().AsString() << endl; if( !SendCommand(CCommand::TYPE(), Arguments, Reply) ) { cout << "repTypeC " << Reply.Code().Value() << "bla" << endl; return FTP_ERROR;} cout << "repTypeD" << endl; return SimpleErrorCheck(Reply); } /// Executes the FTP command CWD (CHANGE WORKING DIRECTORY) /// This command allows the user to work with a different directory or dataset /// for file storage or retrieval without altering his login or accounting /// information. Transfer parameters are similarly unchanged. /// @param[in] strDirectory Pathname specifying a directory or other system /// dependent file group designator. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::ChangeWorkingDirectory(const tstring& strDirectory) const { ASSERT( !strDirectory.empty() ); CReply Reply; if( !SendCommand(CCommand::CWD(), strDirectory, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command MKD (MAKE DIRECTORY) /// This command causes the directory specified in the pathname to be created /// as a directory (if the pathname is absolute) or as a subdirectory of the /// current working directory (if the pathname is relative). /// @pararm[in] strDirectory Pathname specifying a directory to be created. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::MakeDirectory(const tstring& strDirectory) const { ASSERT( !strDirectory.empty() ); CReply Reply; if( !SendCommand(CCommand::MKD(), strDirectory, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command SITE (SITE PARAMETERS) /// This command is used by the server to provide services specific to his /// system that are essential to file transfer but not sufficiently universal /// to be included as commands in the protocol. The nature of these services /// and the specification of their syntax can be stated in a reply to the HELP /// SITE command. /// @param[in] strCmd Command to be executed. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::SiteParameters(const tstring& strCmd) const { ASSERT( !strCmd.empty() ); CReply Reply; if( !SendCommand(CCommand::SITE(), strCmd, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command HELP /// This command shall cause the server to send helpful information regarding /// its implementation status over the control connection to the user. /// The command may take an argument (e.g., any command name) and return more /// specific information as a response. The reply is type 211 or 214. /// It is suggested that HELP be allowed before entering a USER command. The /// server may use this reply to specify site-dependent parameters, e.g., in /// response to HELP SITE. /// @param[in] strTopic Topic of the requested help. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Help(const tstring& strTopic) const { CReply Reply; if( !SendCommand(CCommand::HELP(), strTopic, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command DELE (DELETE) /// This command causes the file specified in the pathname to be deleted at the /// server site. If an extra level of protection is desired (such as the query, /// "Do you really wish to delete?"), it should be provided by the user-FTP process. /// @param[in] strFile Pathname of the file to delete. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Delete(const tstring& strFile) const { ASSERT( !strFile.empty() ); CReply Reply; if( !SendCommand(CCommand::DELE(), strFile, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command RMD (REMOVE DIRECTORY) /// This command causes the directory specified in the pathname to be removed /// as a directory (if the pathname is absolute) or as a subdirectory of the /// current working directory (if the pathname is relative). /// @param[in] strDirectory Pathname of the directory to delete. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::RemoveDirectory(const tstring& strDirectory) const { ASSERT( !strDirectory.empty() ); CReply Reply; if( !SendCommand(CCommand::RMD(), strDirectory, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command STRU (FILE STRUCTURE) /// see documentation of nsFTP::CStructure /// The default structure is File. /// @param[in] crStructure see Documentation of nsFTP::CStructure /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::FileStructure(const CStructure& crStructure) const { CReply Reply; if( !SendCommand(CCommand::STRU(), crStructure.AsString(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command MODE (TRANSFER MODE) /// see documentation of nsFTP::CTransferMode /// The default transfer mode is Stream. /// @param[in] crTransferMode see Documentation of nsFTP::CTransferMode /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::TransferMode(const CTransferMode& crTransferMode) const { CReply Reply; if( !SendCommand(CCommand::MODE(), crTransferMode.AsString(), Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command STAT (STATUS) /// This command shall cause a status response to be sent over the control /// connection in the form of a reply. The command may be sent during a file /// transfer (along with the Telnet IP and Synch signals--see the Section on /// FTP Commands) in which case the server will respond with the status of the /// operation in progress, or it may be sent between file transfers. In the /// latter case, the command may have an argument field. /// @param[in] strPath If the argument is a pathname, the command is analogous /// to the "list" command except that data shall be transferred /// over the control connection. If a partial pathname is /// given, the server may respond with a list of file names or /// attributes associated with that specification. If no argument /// is given, the server should return general status information /// about the server FTP process. This should include current /// values of all transfer parameters and the status of connections. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Status(const tstring& strPath) const { CReply Reply; if( !SendCommand(CCommand::STAT(), strPath, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command ALLO (ALLOCATE) /// This command may be required by some servers to reserve sufficient storage /// to accommodate the new file to be transferred. /// @param[in] iReserveBytes The argument shall be a decimal integer representing /// the number of bytes (using the logical byte size) of /// storage to be reserved for the file. For files sent /// with record or page structure a maximum record or page /// size (in logical bytes) might also be necessary; this /// is indicated by a decimal integer in a second argument /// field of the command. /// @pararm[in] piMaxPageOrRecordSize This second argument is optional. This command /// shall be followed by a STORe or APPEnd command. /// The ALLO command should be treated as a NOOP (no operation) /// by those servers which do not require that the maximum /// size of the file be declared beforehand, and those servers /// interested in only the maximum record or page size should /// accept a dummy value in the first argument and ignore it. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Allocate(int iReserveBytes, const int* piMaxPageOrRecordSize/*=NULL*/) const { CArg Arguments(CMakeString() << iReserveBytes); if( piMaxPageOrRecordSize!=NULL ) { Arguments.push_back(_T("R")); Arguments.push_back(CMakeString() << *piMaxPageOrRecordSize); } CReply Reply; if( !SendCommand(CCommand::ALLO(), Arguments, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command SMNT () /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::StructureMount(const tstring& strPath) const { CReply Reply; if( !SendCommand(CCommand::SMNT(), strPath, Reply) ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Executes the FTP command (STRUCTURE MOUNT) /// This command allows the user to mount a different file system data structure /// without altering his login or accounting information. Transfer parameters /// are similarly unchanged. The argument is a pathname specifying a directory /// or other system dependent file group designator. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Reinitialize() const { CReply Reply; if( !SendCommand(CCommand::REIN(), CArg(), Reply) ) return FTP_ERROR; if( Reply.Code().IsPositiveCompletionReply() ) return FTP_OK; else if( Reply.Code().IsPositivePreliminaryReply() ) { if( !GetResponse(Reply) || !Reply.Code().IsPositiveCompletionReply() ) return FTP_ERROR; } else if( Reply.Code().IsNegativeReply() ) return FTP_NOTOK; ASSERT( Reply.Code().IsPositiveIntermediateReply() ); return FTP_ERROR; } /// Executes the FTP command REST (RESTART) /// This command does not cause file transfer but skips over the file to the /// specified data checkpoint. This command shall be immediately followed /// by the appropriate FTP service command which shall cause file transfer /// to resume. /// @param[in] dwPosition Represents the server marker at which file transfer /// is to be restarted. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::Restart(DWORD dwPosition) const { CReply Reply; if( !SendCommand(CCommand::REST(), CArg(CMakeString() << dwPosition), Reply) ) return FTP_ERROR; if( Reply.Code().IsPositiveIntermediateReply() ) return FTP_OK; else if( Reply.Code().IsNegativeReply() ) return FTP_NOTOK; ASSERT( Reply.Code().IsPositiveReply() ); return FTP_ERROR; } /// Executes the FTP command SIZE /// Return size of file. /// SIZE is not specified in RFC 959. /// @param[in] Pathname of a file. /// @param[out] Size of the file specified in pathname. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::FileSize(const tstring& strPath, long& lSize) const { CReply Reply; if( !SendCommand(CCommand::SIZE(), strPath, Reply) ) return FTP_ERROR; lSize = CCnv::TStringToLong(Reply.Value().substr(4).c_str()); return SimpleErrorCheck(Reply); } /// Executes the FTP command MDTM /// Show last modification time of file. /// MDTM is not specified in RFC 959. /// @param[in] strPath Pathname of a file. /// @param[out] strModificationTime Modification time of the file specified in pathname. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::FileModificationTime(const tstring& strPath, tstring& strModificationTime) const { strModificationTime.erase(); CReply Reply; if( !SendCommand(CCommand::MDTM(), strPath, Reply) ) return FTP_ERROR; if( Reply.Value().length()>=18 ) { tstring strTemp(Reply.Value().substr(4)); size_t iPos=strTemp.find(_T('.')); if( iPos!=tstring::npos ) strTemp = strTemp.substr(0, iPos); if( strTemp.length()==14 ) strModificationTime=strTemp; } if( strModificationTime.empty() ) return FTP_ERROR; return SimpleErrorCheck(Reply); } /// Show last modification time of file. /// @param[in] strPath Pathname of a file. /// @param[out] tmModificationTime Modification time of the file specified in pathname. /// @return see return values of CFTPClient::SimpleErrorCheck int CFTPClient::FileModificationTime(const tstring& strPath, tm& tmModificationTime) const { tstring strTemp; const int iRet = FileModificationTime(strPath, strTemp); memset(&tmModificationTime, 0, sizeof(tmModificationTime)); if( iRet==FTP_OK ) { tmModificationTime.tm_year = CCnv::TStringToLong(strTemp.substr(0, 4).c_str()); tmModificationTime.tm_mon = CCnv::TStringToLong(strTemp.substr(4, 2).c_str()); tmModificationTime.tm_mday = CCnv::TStringToLong(strTemp.substr(6, 2).c_str()); tmModificationTime.tm_hour = CCnv::TStringToLong(strTemp.substr(8, 2).c_str()); tmModificationTime.tm_min = CCnv::TStringToLong(strTemp.substr(10, 2).c_str()); tmModificationTime.tm_sec = CCnv::TStringToLong(strTemp.substr(12).c_str()); } return iRet; } /// Notifies all observers that an error occurred. /// @param[in] strErrorMsg Error message which is reported to all observers. /// @param[in] Name of the sourcecode file where the error occurred. /// @param[in] Line number in th sourcecode file where the error occurred. void CFTPClient::ReportError(const tstring& strErrorMsg, const tstring& strFile, DWORD dwLineNr) const { for( TObserverSet::const_iterator it=m_setObserver.begin(); it!=m_setObserver.end(); it++ ) (*it)->OnInternalError(strErrorMsg, strFile, dwLineNr); }
[ "awaterknight@googlemail.com" ]
awaterknight@googlemail.com
acc1bac3294fc728b41ed99ff6fc7a45af4522e0
24f26275ffcd9324998d7570ea9fda82578eeb9e
/services/network/network_service_proxy_delegate.h
5c8d31c7f53a1e32e7bf9a813293a0f3306e0552
[ "BSD-3-Clause" ]
permissive
Vizionnation/chromenohistory
70a51193c8538d7b995000a1b2a654e70603040f
146feeb85985a6835f4b8826ad67be9195455402
refs/heads/master
2022-12-15T07:02:54.461083
2019-10-25T15:07:06
2019-10-25T15:07:06
217,557,501
2
1
BSD-3-Clause
2022-11-19T06:53:07
2019-10-25T14:58:54
null
UTF-8
C++
false
false
4,376
h
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_NETWORK_NETWORK_SERVICE_PROXY_DELEGATE_H_ #define SERVICES_NETWORK_NETWORK_SERVICE_PROXY_DELEGATE_H_ #include <deque> #include "base/component_export.h" #include "base/macros.h" #include "mojo/public/cpp/bindings/receiver.h" #include "net/base/proxy_delegate.h" #include "services/network/public/mojom/network_context.mojom.h" namespace net { class HttpRequestHeaders; class ProxyResolutionService; class URLRequest; } // namespace net namespace network { // NetworkServiceProxyDelegate is used to support the custom proxy // configuration, which can be set in // NetworkContextParams.custom_proxy_config_client_receiver. class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkServiceProxyDelegate : public net::ProxyDelegate, public mojom::CustomProxyConfigClient { public: explicit NetworkServiceProxyDelegate( mojom::CustomProxyConfigPtr initial_config, mojo::PendingReceiver<mojom::CustomProxyConfigClient> config_client_receiver); ~NetworkServiceProxyDelegate() override; void SetProxyResolutionService( net::ProxyResolutionService* proxy_resolution_service) { proxy_resolution_service_ = proxy_resolution_service; } // These methods are forwarded from the NetworkDelegate. void OnBeforeStartTransaction(net::URLRequest* request, net::HttpRequestHeaders* headers); void OnBeforeSendHeaders(net::URLRequest* request, const net::ProxyInfo& proxy_info, net::HttpRequestHeaders* headers); // net::ProxyDelegate implementation: void OnResolveProxy(const GURL& url, const std::string& method, const net::ProxyRetryInfoMap& proxy_retry_info, net::ProxyInfo* result) override; void OnFallback(const net::ProxyServer& bad_proxy, int net_error) override; void OnBeforeHttp1TunnelRequest( const net::ProxyServer& proxy_server, net::HttpRequestHeaders* extra_headers) override; net::Error OnHttp1TunnelHeadersReceived( const net::ProxyServer& proxy_server, const net::HttpResponseHeaders& response_headers) override; private: // Checks whether |proxy_server| is present in the current proxy config. bool IsInProxyConfig(const net::ProxyServer& proxy_server) const; // Whether the current config may proxy |url|. bool MayProxyURL(const GURL& url) const; // Whether the current config may have proxied |url| with the current config // or a previous config. bool MayHaveProxiedURL(const GURL& url) const; // Whether the HTTP |method| with current |proxy_info| is eligible to be // proxied. bool EligibleForProxy(const net::ProxyInfo& proxy_info, const std::string& method) const; // Fills the alternative proxy config in |result| if applicable. void GetAlternativeProxy(const net::ProxyRetryInfoMap& proxy_retry_info, net::ProxyInfo* result); // mojom::CustomProxyConfigClient implementation: void OnCustomProxyConfigUpdated( mojom::CustomProxyConfigPtr proxy_config) override; void MarkProxiesAsBad(base::TimeDelta bypass_duration, const net::ProxyList& bad_proxies, MarkProxiesAsBadCallback callback) override; void ClearBadProxiesCache() override; mojom::CustomProxyConfigPtr proxy_config_; mojo::Receiver<mojom::CustomProxyConfigClient> receiver_; // Cache of URLs for which the usage of custom proxy results // in redirect loops. A container is used here since it's possible that // at any given time, there are multiple URLs that result in redirect loops // when fetched via the custom proxy. std::deque<GURL> redirect_loop_cache_; // We keep track of a limited number of previous configs so we can determine // if a request used a custom proxy if the config happened to change during // the request. std::deque<mojom::CustomProxyConfigPtr> previous_proxy_configs_; net::ProxyResolutionService* proxy_resolution_service_ = nullptr; DISALLOW_COPY_AND_ASSIGN(NetworkServiceProxyDelegate); }; } // namespace network #endif // SERVICES_NETWORK_NETWORK_SERVICE_PROXY_DELEGATE_H_
[ "rjkroege@chromium.org" ]
rjkroege@chromium.org
54e757bc6dc4c642c83b1142d47eb2dc67a5a4a2
b123ae84991b346dc94477ed8ff0cf4e31149faf
/clients/vmime/libvmime-0.9.1/src/utility/stream.cpp
71ed2b26cf2f2122150baf2e15689e22458073de
[]
no_license
darknebuli/darknebuli-EMAIL
c92ee49c36476f710f3b1399298a5a6a3b76ba9f
decb35fd069de9430fba7f0a1d28cf4e954521af
refs/heads/master
2020-05-18T13:25:00.577314
2012-04-30T21:05:12
2012-04-30T21:05:12
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,025
cpp
U2FsdGVkX19VaWJjbk95a7zJHIhb5eI5pUJ1qe4XD+MeqNOa7BzL0b1Lrm5vm28K LdVJP2ytFsSBx+gBGpcT7jmWyN655qzSwW005vldE+Lz1rjbraYD+fM/wt2A282L HQHOlwIcG4cN1AJ4UKLiVpSWSCl+LoOP7jG++V6osOREUaoIUf06N60EcBBS7m/H WtQV8a5Czga6PxYCagUKEoPYMo3T9OlDTqDMj8d0cOog27Ph6svCEFj3pWEZM5J6 T50GUT/Flcu9dPiTydT55OmxGU8Dzt0Xc5VuKPR5xzBDOXyPRi3+Ka68ZqgrSBKY LKFRm8lVObQWjDf1G/CtF0rcJErAMrOSL9JFY/Pm9SgbWsCXLW0vUOv6TCkOZMdR 5IisDBd6pgbyy35omCrrLgwHkROa6fLkKFZ7F/Cu5PRTLAX1c6DBGiP3VysYHCpz SDshAxo1qqZzn9Lh0rMSISh1SGcWE8MPISqMmK4kyyR9tQsjBW7SX+9W4lq9OrCj +wnMeJ5q8aZs4CR4h8Ntru6DoHM5bntTtUWfl5XkbbURU3ibtiitilt+WdycvBvq PUwyqd9oP/tZto29NqdCpCqNDV3Tv3Co34pE1kfqfb7xk3HOkVBhF5bXobCjmt6C q8pJbw+Inf9h5aQDk87H9Mvs6HItnhZES2P4XazC53fvsF7zbwPoyjEj5VIiIxCW lLzrIzmL8t0xsqRzIsELv8B+et0D+y2KxBYRRAVS1fBemM9gmTAcTnZGXWl63VI2 Raem7AvQR9tKQO3GQBrgskOsUk4cNHRUfSY3qSODZIf1krPvDKfPCidftNPnlIyz qVxV+yGtZEEUzm3Cv1OtQ7HmEueoczI29sCOI/SjBbRx/pKrb/OfVMIMFKCmlGda b0NOpYnFZct9nWUd9hmqLKcPJiqnR7FpLC5/1AiSVfJKV0Om2bYCD23B5/0ixBbD UP9n8TMoNIWJICbeCGsluUsXrr/HjBQNeR7LdZoxg2+4nP9P8aLXkSz4/Yij8MHN /yjAqZ7w0ha9v6XZRTDRdsJVnuyltQ/qyTWUUkR5RdJf7YdOPHzZA9tOeBpnHEAI BnvBaP5+/IWOGLZDgduj7aMIFQHzv6icEUx5M8FYTScXQF+I6X3QH9bfvMlcobNa KJVgi6kQDQ7xBXCLJzGcqmli9BSaDb5bWcHyzlJ9hx93CEbHTIgByOHncVRgNyRw +BlCkClXGP3N5lDinWUmZeIpKqhzHrTJGjpfOJM5J/byWU/+99ZzMLs+dnttZvHK P56GapfW7eW0DMhL2bMAl9GzNly33bPy6+d5da+r7NV1O4+d+EwG5NZWVu5DLfDN cKSonX7GAvXOrEd015tIo3aEQ7OBuNzK4dvsgi/7rNEiRntQVMqQTKZbZNBfBY6N g/HDaThL+2YfB+yDwYCVp6iNGC0NgxuhgChdeqvGR4q3JjcmZQaCjJCGZ9//B4Ay sgVECiwqY1yPzxxRN2n/+mD1y0+sUKX5rONOag45MCOwEQ3hJXyMy1/n06SadSr+ QpjjdGIVKZBQ5iX2cGLwbi2wRO0IqjRj5kp7+dQX4musakSXbirlTIHKHuHRosBp 3DEHaxr39G8JcNpTNvi+yWaVvXnnqanT8crZICjd7tIsOheqOqPmxaCjmmCxpZnX yCS/4nJB7r3uTuyBcwfZkpiC0YS0bR07yxgIAIa0pnGYU7tHjf9upP+b75/tYiOq vh8aBH9tAU9BlSByz/Pm/xr5fOBNsdQKfyWpZmVRF+IFyBkQdi9jAPYVcurfqKnE VlVIhYcYphXSRMQ6fhxyWvj5HsqiZiVpZmI/vx3yYMYo6pPYVc+bx8lcB9ZH3QX8 g24c0xyPQTUsWbvZicbNSLMn9IfOrSqVzLPc/aq8GjX8FzFXQJ8scbhj5g+uNQhI PsoM4lCew01Pn0XJCfmlQPA6YXhi6VWeVC0V7WaMSG078DtUribkAXqitNfJRsoN XZhZfLUiKmsu3uNUaZqxDInXc7LRxaNGAmAUtVbxdp9MT6ZR/M7O289kHXWviLnS 22iRsvyuu9apncBS711pKBazQUDKYHera9Oj2BgIc+vcd0XcNKE1AmaaeOU5TKNn iYSQ02BWkXMewnz7hUhwjWNhMSVfn59CZobc/8TQNNZDl86T3hZbFe3+jb74nHWv Y+sFel8EZuDvJjAndbdZ3RYZxex7mQ+/Z/hKvQVCHMwNWOliiYxO7/8XfDoXbht9 jI5s7auQ2YhWEgYOjseHs83jspYdGjHAPMXX6mb2ULoAjYzkHwWjpWcxG9CXILLe ooIOj8vgroA3tWAxdh1B+Uje5iKrJ2Ba8FUZ5MV5CD70igB5wdLUxXA5wvCf5ypQ 8C5aeY9l4L4tLb9fkc/GfJjaCp3a/fgeUU3WpGt43ZGffQ8b4pUK4bY7EUEctqZu FogFw/ottGB9iv1vVtfTU+M6qQ9+P/ZxIAO5M3HL7M7R7gSptWw5wQAPWOg20AH1 uEIxKDG/N9C8EeMxtRFh2wIHQjwSeif0+eX4DZmUzF6GZz+tcn4Oqo/JYCZ8r9UE CnjuCGRiU2POq5XXWbwJ/Vfk2TeNE9TmoXntsxGnnm8w64EgynlXntVC6r8YJ8DN 8L8y9/P30Csu1qtDdGseAVMQ7x/wNQh1K2dV1IHBKidXe3lN1OwgF7n5yFJSbShi RN0j88AJrtsstYKMupuJpd4//HbQwP25rINQS4IS9peAr4YHKipFzCQA+JRxmoVq Sa9aSl9JwmEynjOCUhNb0pLL+8zc9FVLtCYOtSDz43byYqFQBmVXY7DNov4fmYZJ MWpTrorap2DhN4sj/dQxFHnbQnewLeU4C8p2eCd7+86oXG9EvC16F+wYcZEgU3Ef D2rUjz4AvMyE3uRmqbm7mv5Rp1/E/7tsbNiF0edQ1asCboWJfPyXrTd9yp5YUhDJ gOwog4egnfWraugpAWm8eE5B60jBQnA8O1+wvYjwmIT8CfhXvLv+jcqNCugUosPv Ug7HqPvHg/9PqN25LleMutLvE30MCzLTQMtT9A5lPD+uSoQ3YtQuQHlOQ7kSF8+j xatl+g64ie8C6zIIgIiLyVsz+jYbtVMAu+ZShDKaQ+aIIi3bdZaGE5EuY7+Wi0Qg m1BhDgZw2nYb30hgDCt5pstOTkwlOuxaCk+83L+1pZhzOt9LEIT+/l8RtJXbPgva R+4JDdSGqRrkyCePNmMWyEDZH1IVPK+WiEnI9Lt7HWzMeiMpzLuMn46R+OIvH6zl DqIS3vJDgRG6XoOKGF7Q6TZbDuzJ84U3ocbOnn6LzTNPW++LrOMeSj3WDggk+Xej tWYmxOO15I3nf2dnLl5gNZtsH3Mc8Dt4V5efCcHqMZyTtCrfjXgDg1dGB4a/2iYq g/5zHJ8URyZB2QSYx3K/7S1utv6gYc3M7ny9sU4OAkydIPBnBTenrHAiZPm1wAgF zPizB+Fx9JwzXyTVqKW6+ymUz8cZoSidLjNXCHCgRZxQIQFObaxX62Dc/e+hQPKl 5Ds4J89/C1bSDNtSj08Qrbr1mRFo3XBXAQiJCSAgPWJHpRCOWFXEhjrUSrwUGYHj UtJeyQs1ov8CQhB7fTO8Ueekvqf4G4u9jU8/68Y+lpispmkDyxYsya6SMNRaYJDU l+xhDtdEIxDt4xjDBUC5sigcjtd3bK0XJDQhHojmtG7sIRYAZKUwpVhm8EiKTikg 6DV8cVPfiJqUMnNMMsmBDN55qgDRfoiSHq4vqRBBqJBXxcEvB/fOTwa40eTQUWmi qOi5TEIenKU1aUqKOBdjQiGr85KqoB+EJKB0+LCU9q7Inc47RCPbwZ5Dw48mFDP+ 9kjz4OtPTxeidURnFPUtQISys2pOoSV/WXyZCC2gzrMaZe78AHY2vk97JSzor1ci g/5zHJ8URyZB2QSYx3K/7TpuGK89FFV8uCPHoaykJwRuDHHS+UxXo+e8+ENbr2z4 3iW6fK7CWPWg9KmGZPgLnHu80QMg/wCwF9gPmRzfzpI+T7iZUOfhQFbNhxGH7aCc +qUgA8P/asV340xX0n45ZbFelo/c5zCKq7YSH9tqlCfiPKGeR+FXPh6YTmF/5dFT sSVBSh3q97hRGOPyWBpzhamZmfDI4YZP/CWAv2/dkojjDinQfscnbUvQ0GBcDOEt v7/0P7sX1uLLGEAoasOdeD/v6+lzu2+rMZnQQ3mCtMP6pSADw/9qxXfjTFfSfjll sV6Wj9znMIqrthIf22qUJ1mqDPmaA1v+fhqcw+OPg419yIUsEpDX0/IbPLEvUEk2 61iqXmHwm+lcNKz1ENPx9d8L5YkKP09m4tUhYw/gQIH7brewGWSWwd0/ds2waM5C nfq3PWu4e5iWoDJfqKdQd+v6hHpyoH+O43xCQM2sQx9x7kQ9Z9hpewZO9/pK7JDK gpkVay+A/o5YlvlY7k+DdDO/DdPsyeKEo3rZR30ISocpRBdDJJLYCMQermymj4zE 8XDMNuJtheKW71fOgpcQ95UE8petivEsO2wKXIA3M2TnH2LWehpGxZFE7uiprbLX S5t+sLUonNsrTNFTw6caI2VlJwl4E8gme1BDiIzRkEPdUKyhYKxdF2iblqLCnF6B wRP26q601033sxnKaafbSNUO+mor+aVrDXWWKGPxbC6XjX4pSw1uelMEhyxCuHQ5 ABZ7fKqRY1kQBFAwhh8TWN8L5YkKP09m4tUhYw/gQIFFidIL22/YWnFptCQLQLmr BW36dleA0EUAQ4+ULuesc1xshAZ715NfQlVSdUCyl2LyWMG46D7LLnrm3BKrGGCw NSrHW2jnrKH62OKNKyWb9lpeTHKo84hgOKFvmk8D5Ih/suPAtJrHGomFQsYiGMIm vSeQ11K4grBLGVzSOPvcYfct0839fo+IzlKeeKv8y6rkOzgnz38LVtIM21KPTxCt gEzLffnjzUITZlzJ5bAstrpntY0KsDIAaMYFc/T41HcjsTlvd0Hcf85qrs8Sbfsl EO4PjLhPa9v4jusgj/cbLvBOBD24dT5VWEtWu7hNJQespmkDyxYsya6SMNRaYJDU l+xhDtdEIxDt4xjDBUC5sigcjtd3bK0XJDQhHojmtG6M9L8ZedDe6ct7ue5rgLY6 zy5X37ao1tneyoB2KWXeN8I/gE0nuMrbpuIGqsxyVeoejkxS5rSJ0qe6RF2K/ttL ptLwJm2pDQ5ya3IqY4Jcl2IM3bt6K5AJo4rKtUXoTVXZqMZeY40tgJhLhuCibgop tW0MkbnHqWw355DWIJ8hTOQRtQC0aCjpGGmmk2hOn7xNC8qcDV/uAEP/D/yt+5LS 3lk+J9Rn8A/nlyHlr1FOPjLSiJkpKsBng+da/t+xcujlc0qrHgfplvdjA1RuFoq8 Q08DFaSqzXuv1VIBbQBVKbpntY0KsDIAaMYFc/T41HcKffUc/C31VzoW/vLmL5Y9 PIqJPdazfNkkssF4xiVrR2tBSVPuOMA+tfJH5eXvDAEPE+FgG/LoQOLcRDrihHtw byg1rscMGVdzGXh2iKVU+BRNUjV0l4tWdcm+ZBcLzZypp6t+0+EvgJtrf0T0rN5b rSrDC+pkLi804IDsmD89OIjy4b+LDzy1RkM2pdZNrIyx9Gn2r9hkX7eITs5srim6 7I2dbKUv9hQ0giYWWxC1sAkXw6dPesaKErb3t943CvHOxOzTZW8jvK/itMhxzJhx 8ljBuOg+yy565twSqxhgsCTxwymKzoBR5lEbjTd0whzPKjQs6Tr3Hpyp3AQpm0yM Dx++hUPjngmWiipdXzhpWl55T76Bm6sCYsutWliLskEJbbv/QOekwjNydw6ViV88 vzwmc/i/PC8g6XCjSXyx+Z06htqrg/qvDqa23uyL9Q1gR9sgYKrxSH7DJJL/8CvH jkw77kOqXlMJYIfrwZ6gq06KgK56Dgegm7pYzdSGwj0n8ALJKZaENggpwQfwVssX fZDl7Xi4dlV4a3JWwE03ehp2rC3bsUqG19uUTMdbyWh0nqv94wXlKecK9/B+YlYq Mus0PCyCbwLJ+1w1z9mkxPGWBf6AlUZTQtXJM3a4+gBq7n/wu9VboNjEwsQiSzOM x3ir990znR86xScAKSjuUM+hN8/QgH16JZWmRNjIYb9s3cXVaNFmYmk2KRRigre4 JGFmTy7/x8TAlsSVRMkevzdkZg0roNuG/vQ+NKCXbFUk8cMpis6AUeZRG403dMIc 5cGg+qPxnQaONrfuDwYJby3S63CeVJqcsA1MDgisvD8ZwSUwoj6ixuEEKFFrhOGM CXZQ8J9qrFLmqHZ794Nkifi3j0BSF4S919AYYpVy50KViDr+ZDee2zH0P/SpVggJ b1Q2TTKInA1zFcYlw7dRwAIHQjwSeif0+eX4DZmUzF5B8uYusqt+RZmDO32x0J7w Hyc1fajRp5VopAi5WXVDMWLTeICdvQMum6P4sYMyYU6pmZnwyOGGT/wlgL9v3ZKI 4w4p0H7HJ21L0NBgXAzhLcgAF9bDzH9HuOtE3nUWg5RLJyUHBayGoNSVeTSapw8N 5GDbowgRnNTbkwATIT1z991Nqy7r2UAXmVMvyWV/g6hflbv3dko+itsed/ewwbYB WPY0XM4ZZ81UUWn2z7Wn2vxdTpRppYFv3BCz9qMLAMf2t60/Ll8bVSmG+eH5gZ0I AHMMeqmwn/S0z7LmvCm5Ftbx4fhAiBuec3lxTmWYgJaUVc20LjxyBxx39h6Qogyw uEOXwErhXXMZPtpWoej4Slj2NFzOGWfNVFFp9s+1p9r8XU6UaaWBb9wQs/ajCwDH p7ckFkTBdAHC3hWCoC78Lq2YdeNv6w9epa9tajt6UBvSYNiODuIbiH9mi41z1UYZ zYwR08An3aD/wndsRLnL1rV8i/cJ2SdLrsgONWlijiYIjHRYtpyNN3iB9igGxCR9 laQ4GLXLa6MoURTJumm4qRpl7vwAdja+T3slLOivVyIPE+FgG/LoQOLcRDrihHtw byg1rscMGVdzGXh2iKVU+LacfMMqLfje20MsbKkAEauGXeLN+lS5WSVLkVNkkW6/ iD5zRS/RD2Ixqle5AW/GJ/IsrAea0IGjFJzvk7HeERqVqEVDWTz1YrDXBVNAwSd2 AYWYXQqeEDMF2o3MxXhtsWgbVvd5/WijcJml4aXOf+R9QpcUn/5xkW0qJT8HnVuq Apexy/bEiAMwciQF/VoWsoMs9wxDj7DjMxV3fLMjoiR9OLNqbua1ZntZTEMTtu3M uM4gKMgsPIUp8XFt2cS7Q8mg3rZNjbEqD2ZQGmyGINbx/rW0yAeLUoG6M9RPQbaZ hJI+lCWSBu2rUbx9jwnqikYR2oiXDDMR4Efenv0PoZDheNN/t3+f8YY5qB+NhJHX esm7sAIGcDmtYCOucxLKXdMTvUaOXfzLvkpS8EDJMbk2a+LHm3l1cO+8PAvZDHC9 22jsqyT8h3awMIz26kst/rhZosyIZ8kNcMeaVlEzmlnJoN62TY2xKg9mUBpshiDW ZT0zfYXtjDBenna664IlMgNCAJnPqoaBg/5926D2rfRZBQ47ajYdCosYobNNpRMF IWk/FCXrbrdO9Ee6tu7RU87E7NNlbyO8r+K0yHHMmHEs38OX2VjQJCGwzVZY49R4 lYg6/mQ3ntsx9D/0qVYICZ8rAx+7QXqCD3k3Lf/s15QeFDlcT46r5fJ7y7NL6C+C 745yK9Pz/B69qkTS18XBIoa7OpDmWxByqea+H1dfl+YhOXI5LVbmY6j8ArSdEXm+ q1rKnWr/woGd8vHQtIDdrnjBtpZ1tN0RMMpfZs8rKTJi1CcNwijdu1zFWM9qS8fc m6pw1/MqHp+ytmXm1uppV5MBO4PS6lqVfTrj6tWVQZCkWgTN51maBYERs/Pu+iXz x8R1Jfc6Lg7sQmcv0/uHf1yZsknPBnWDpnV9vHtneAsacTnD5mknT20wk/NG3epJ yXuPJlNVacsEYgs+QpdAL1gMd5+9/YOJ+98Jc0Ok2auFbYYitjCFuyzFFsBQA3fF WQUOO2o2HQqLGKGzTaUTBVv6QytOJ6BMnQcGbI4lngDvVDqC3dm3qo6x0Ehk+Wvx 1u6tsnaBJcMP6CBZ2NYsOu8PyN6HgYt66ePZAzB0/0lDNiUlD6/pXkf5qr0zh8iW D6Y54vrcdmP7NUW/B4fW5d/1dDdOBktWsISwSqS3WqwyXBNAUv+D8hAAwQMYdGKc /vEPGvFG39N+YGf7MR+20ll7gFQEnTeeskJux7/EjluGSujlVX6afBTc+T+aApRY ptLwJm2pDQ5ya3IqY4Jcl1UazQB3efP03qglJNaHyrcMqrD9yvW+DiXx0nLPZLnR lgsPUMhzI9cbrn5KkfXNDMkQOvopT2oXgyOces3peUDfqTY+E9SZtVGtEFNHuvp2 V2GzvG4cXCQlTHzxBd52HhF4A0FYI0A4I79e4tWkoF57APix0RI+X2lOsSIfBrps +NzAqFnOBVX+ld7JhLsdIOTKflIyF1zJBv4edVKl8IsoSnzT1gXD+7pFO44trehM owHKX8BuqtFVyEoTViLalX+ADk3pf50LkHeweol5o0KyndDj4wRxX7NDVF2DjlqN 9CqLZ2/lutF/DNArRd4x9gsq8EIq+RbT2jwu6eIUPKGtrbzTjBDn6jcIDaTkXiHP Kepd+Yj7IzJIiR4S2CLEKJb9kgR5QoGJRUwxnKHIcc8+8BcgLy60GC3xkZs/EbzW F5Hh9EExn02ZV8imyqs3nuIwtjtHn4a+WpUNIqcvr1dzZai6Xd8Q/4+nYSJI3b+v BT1OCs5V73zFXKKNq0ePIPDmnuNhsgB/ZTTV6di+e+T5KeB+NexdgTFyMvmPOsyo GBJauZCmofGzNXgEzbM9k4e+Mrv2utFrzR/srcAeCMlhPgfq1a7lTLjjmVhOrmwa h74yu/a60WvNH+ytwB4IyXRO639HkQJN5jZsIe3txuXhRSUryRLJoIepGWfQDajK zbFY+NX9Uh+nNSKPVXbh8aOf1qaOqHWMOMCdXiJXhZlKNCoFpWoqI4V3zcTK+48p Xiyrn8p7tYHaPz5a6aJuJB0HqbYko3GDoSuQFfip++FhVIrvIHP7bOIjj3AnY64j ZeJZWQ87/H4xNy2yVHMxVdIDjhCJYcEOjRAYs6EoG0Z6fUpIWP4DzKrZl5h5Jmpx boD30gIT8gwIuFC/qz22/VBiTtjX0/npn2yWRbLuNoOzfn934pZTd/YIfPwUQhxB NWgaQrmBFQcbiZJkBd2jRtyrClPqW9LQB9sFVfw3kL9VxCCf/MmqObSvgvzKSpV/ 0f3aX8fVeMRJLkpDI4c4xGc0oNvhBfebsS9bScYRJ4+X7GEO10QjEO3jGMMFQLmy KByO13dsrRckNCEeiOa0bgmPePwN06lYVXxxPZe24LENqNeaS4+7cJaAaoad8p0U sVI9N1BPn72yaJGHBeINfP39+pACs/JLyFYMo61dNDmVvW4llr9xMf9YKFApbtI0 MlOhz6Ljms21A+VOMNMS1p1ke0HTGFH/XMclsKLpPDN12UWzY+OMWH1cQee6JBgD 7JK/5rf3evrFUR8NsuUwjtvKkHa5WbYHg4f1USZj4SGP1Lt2XmZllWNFqzI1cNpL To+WqUFJNuIPIyjDBwXBKb5UinQ9BDIwQagO3FuIe3QtTmomZSHXJ3zV46HjopgC NBGuUDqc+C874Ao/4YmS50GCsSploqtA5Sme8uvL8/MiNenxzuAT72hI9A0RiIr9 s08Dz63ZowntnQzrqiTb9j7wFyAvLrQYLfGRmz8RvNY0fcyCmV9Q8gPMFmuZC33x +IGVuXX/S7YZgZZwp8gTYGG9FzKKsUAlck6NnyxRywPMxj5XmzjNjB7eAh36mwCH GUqbabWSOo4+N4rB1lwK5ybWoAXBzH9TYtxOY/HV1+e2N/G8b1zN+1Msfxbpb3cO ume1jQqwMgBoxgVz9PjUd61RIeVYieGL72Gc/YR2+tRcbIQGe9eTX0JVUnVAspdi SOtchFizzDkpknMwRK/csHKkkakaIpCFlTLyskXFglMupSyLKKSrguBVeeXaONUy MWqDG6tXNaCY14rAh73EN0IlcvaCyuiF488i2JzQmD5o6ehxXRwek0YLjWr7kgBH XYBXDlVth1dtZfsYD8ZzFHobJkpGfwUuEEMtX24gxVEvIsdYPoeaji3iuGey8DlZ JgQlTtEnq7jM9vk3yocpkv8xcNseiIVUNMBMWA24q5kZpgrF8R292j0huuSTocM4 vCqEhrGBlB5Azy54PgZsfHYNtNFCs3UcxL7Q7KO+LAAUkMohO8aIj13pDb6xDl49 SyqHU/FW+mQeifMDFr1YkEo3Nh7eER1sG3HvPWbx+2q8KoSGsYGUHkDPLng+Bmx8 0f3aX8fVeMRJLkpDI4c4xEoJMRcleVDwADT71dAbFzSffQ8b4pUK4bY7EUEctqZu l/44uTW+uGqJt1mBpMvay2GfjtKzS8xNB1K3foVPZc/19oD1XnrUIb8TPWDXowAY dCXPFCm47uPO+nb3IiKSIPiBlbl1/0u2GYGWcKfIE2BK2CnjZAtiUGyB7ujVtv1N OOPKws4BcuOmjkgg4bhV4NqSyxpbZrKCuewMXrBHWDhAvCjBFuOnn1Z384G5G82s mMqScOAO/P4ht+BSr1AEgUz81nItiOoGWgZYQZJymYNnkEEQePJLrwTWU483pCDp wz5e/lglrMGXiL5iXG7Yi+J2CUWt9VstzTYAl/Naf4LwD7y7tDLKtsGoUH4L2mlW LmwuNO8/ZpzfqpNHJACOgFcQIIUYA+K55lULd3yqLLHMh3JaAx/WCulwPZrlN5bO mR3gHoBTJgwpMnX7CpgyxIfu0fg2JCIzSh+Fii310lLiESP5K12cVQpVsLqm+0WS xsR1xkh+BHcj7Ewv+mZ1U1mjxZRTI6e+GYPENBbF1M96rtJp8//7E6DosT3esthN RlfFj5/l6K5tqSC7Nx7FuML8am663YpPGxfSVmLLlnG8KoSGsYGUHkDPLng+Bmx8 R0r8S2NRoZYi9D+6LBq6G8nbutpoUJvNtS68AwMePIHV532vQvbIXQ271TY5Y9pd 3U2rLuvZQBeZUy/JZX+DqDROvJwQUhbujzJNAG3evPa0+6Ye3Y44xLjB5IZA6DRt EhgaslDSH2rQ+W6J8nJ8pEfQMd4EyXnF5vdmt5fYPGm0vXHP8SlP0R+z2nZFHeO3 M8b8nbgk0HC69q4ElJq9ugKXscv2xIgDMHIkBf1aFrJrB4z1iLCEiXkJ7myNe0d0 zbqvXG0zZ9sydShRni+TkUqhd4Ln8jTgiwhY0rZKgsA1/7OSROpMPFblxnmPSwv0 FC6ft1amMYYZY2IdLXxxN+tQH9Ao48iGHTqvS6o2kbk2yqs8/47pozfr5jlLpQWb wHM5wJd90Q3fwa+NKsqX4jXDWpW4TJm9Zh7I5auojAGQI6/Niw+8SwTqTk84FbRF 6IAOKvWa2br9OALBzY45MPhtDDFmQ5B2RGZbWP2DEegAFnt8qpFjWRAEUDCGHxNY taxVray27lsG2gQ+3fDN3rr1mRFo3XBXAQiJCSAgPWJHpRCOWFXEhjrUSrwUGYHj UtJeyQs1ov8CQhB7fTO8Ueekvqf4G4u9jU8/68Y+lpiMfWtCrSIfUTQcT98iZ64Y NZ2zkvGwZMEB6eDw5S+yhor8TpbJQ2p8wlFg/mqSz6qrKdCYko9CeUbPzLLq4QZx RYnSC9tv2FpxabQkC0C5qwVt+nZXgNBFAEOPlC7nrHNMHBE/jaepPAtTDHzuzhLn Ij/pUEHi81pL8THFUWDFWc9EDb4ccpVeK9b6jP6+cK2u/Clhbrc/M5rLMMzxg5dP HqrYabMBcNO5TePG8tv8PgOfT7QihIQfhmX11080uW8LKvBCKvkW09o8LuniFDyh tXGNoCDAVXFSvc9rJYex+IRu0xBXs/sT25np0bRPuRiwzUOJtfDm1b/bzNt4fNHu ZmdXEX/5atNW1KAPDRLZ+p9a8qd1F9ApwE5rAz4ELnYcO3qJ574qIQ99MPDUa5vA yXjasXmE6Ok+RFBtJe2knzg8nFLZwZ8O9XvwVPj6MCUx0ihD0HPVRwM7/nvGBegT oaJXjUNBtkGxUZZ9aw0WhCtTYqAJ3iHK/2BhSWPSjYOw+t9pNgj62kryKviSmmmC 2dP7CH7LERd5edLvtwVnGq7y2+otLRDFWzGY3N1zwC5H6uzw2GHS7+eSj8HAP+B/ vxqct0VKu8+8LXvOMPui9Z99DxvilQrhtjsRQRy2pm72yRxb8s1o4tYKPi94R5pD lL1o7Q1DAuYaDISG1trj/4xLpATt+FE7uPpF5nDYCVeONkFgJy+8gcywNx9l1PDB ydu62mhQm821LrwDAx48gcsI0RBMijaa1RIZArnkkWvlNN3ZEeMSu+uPPsSntH4m yhF4pQYwbJoG7T9qGn4HzkwcET+Np6k8C1MMfO7OEudm3ehyEB2ChnBM+8jaaTOr 1XiaAnTp+wayMksGBHDEPYyx31nxr4jngqHOLGwx0qO5tqwn5zQrlXZCjQDHLkjS ASc3YEbHASMPYHVy6E/CLh96X6nNJNvvMjlv6VIKd4qMjmztq5DZiFYSBg6Ox4ez RyHKkMMbSk3fnWJD7Ttn1D6OEmRYStcfnULEFcRuxctU00VHJbQ//XDOcOyRbJOT DmzyCl16qz/ATZFgprtywyoWH64YRzA2Frf5Qy9hY3nNNX5KXoB74TUi51A0ZvVs EIRMBWTcaXCua15HAJIaLAmFdjZp0jFuN+chgbMPlL9qun9fJcFyerTApFsMxbkP jozP3sNBS9snC0ewPndrcQ==
[ "charles@rhizometric.com" ]
charles@rhizometric.com
047f6fc7a33fb41ee86d2d2f187f603b1dbb9d42
bddb40149f9028297d9b4f3f6b77514cadac9bca
/Source/GG_Framework/Logic/Network/ClientServer.h
e7b120219c4b9051ebe290e65c33afe07c78ce27
[]
no_license
JamesTerm/GremlinGames
91d61a50d0926b8e95cad21053ba2cf6c3316003
fd0366af007bff8cffe4941b4bb5bb16948a8c66
refs/heads/master
2021-10-20T21:15:53.121770
2019-03-01T15:45:58
2019-03-01T15:45:58
173,261,435
0
1
null
null
null
null
UTF-8
C++
false
false
2,734
h
// ClientServer.h #pragma once #include "RakServerInterface.h" #include "RakClientInterface.h" namespace GG_Framework { namespace Logic { namespace Network { static const unsigned DEFAULT_SERVER_PORT = 2000; //! An actual RAKNET Server class FRAMEWORK_LOGIC_NETWORK_API Server : public IServer, public IPacketReceiver { public: Server(unsigned maxPlayers, unsigned portNumber = DEFAULT_SERVER_PORT); virtual ~Server(); virtual IPacketReceiver* AsPacketReceiver(){return this;} virtual bool IsActive(); virtual unsigned GetNumConnections(); virtual Packet* Receive(); virtual void DeallocatePacket( Packet *packet ); Event2<IServer*, PlayerID> ClientConnect_Event; Event3<IServer*, PlayerID, bool> ClientDisconnect_Event; //!< 3rd parameter is true for a normal disconnect and //!< false if we lost a server from a time-out. virtual bool Send( const char *data, const int length, PacketPriority priority, PacketReliability reliability, char orderingChannel, PlayerID playerId, bool broadcast, std::set<PlayerID>* onlyToPeers ); virtual bool Send( RakNet::BitStream *bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel, PlayerID playerId, bool broadcast, std::set<PlayerID>* onlyToPeers ); RakServerInterface* GetRakServer(){return m_rakServer;} private: RakServerInterface* m_rakServer; }; ////////////////////////////////////////////////////////////////////////// static const unsigned DEFAULT_CLIENT_PORT = 2100; static const char* LOOPBACK_URL = "127.0.0.1"; //! An Actual RAKNET Client class FRAMEWORK_LOGIC_NETWORK_API Client : public IClient, public IPacketReceiver { public: Client( const char* serverURL = LOOPBACK_URL, unsigned serverPort = DEFAULT_SERVER_PORT, unsigned clientPort = DEFAULT_CLIENT_PORT); virtual ~Client(); virtual IPacketReceiver* AsPacketReceiver(){return this;} virtual bool IsConnected(); virtual Packet* Receive(); virtual void DeallocatePacket( Packet *packet ); virtual bool Send( const char *data, const int length, PacketPriority priority, PacketReliability reliability, char orderingChannel ); virtual bool Send( RakNet::BitStream * bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel ); RakClientInterface* GetClientInterface(){return m_rakClient;} virtual PlayerID GetMyPlayerID() const {return m_rakClient->GetPlayerID();} private: RakClientInterface* m_rakClient; }; ////////////////////////////////////////////////////////////////////////// } } }
[ "james@e2c3bcc0-b32a-0410-840c-db224dcf21cb" ]
james@e2c3bcc0-b32a-0410-840c-db224dcf21cb
acad3b01771173080513a1721314c161aaa622b9
9868081bfa02eb06e6b05ad614c801dfc1b01b6b
/tutorial/OgreShrewMouse/Day2/include/ShrewMouseApplication.h
380cfa1566364cd5baf45b592ce3669b1e921937
[]
no_license
utah2013zyd/Game
76b04b3c61f36ad6ab7e7b052b828b568fc5bd61
00e35ee4a57300d574e51eedf57d9a37df27a4d6
refs/heads/master
2021-01-23T14:46:21.555549
2014-10-06T00:24:55
2014-10-06T00:24:55
22,240,748
1
0
null
null
null
null
GB18030
C++
false
false
552
h
#ifndef __ShrewMouseApplication_H__ #define __ShrewMouseApplication_H__ #include "ExampleApplication.h" class ShrewMouseManager; class ShrewMouseApplication : public ExampleApplication { public: ShrewMouseApplication(void); ~ShrewMouseApplication(void); protected: //用于系统回调来创建场景 void createScene(void); //用于提供框架所需要的FrameListener类型。 virtual void createFrameListener(void); private: //这里提供一个管理器,用于协调所有的地鼠。 ShrewMouseManager * _miceManager; }; #endif
[ "whuydzhang@gmail.com" ]
whuydzhang@gmail.com
28b86b2e07bd437c3896099c5f245ff813be9170
a238dfa674a20a9e821e3374edb725e5f3759ff9
/scr/Client/Unreal/Source/UMC/Private/UMC.cpp
8cc82cde3ba66b740c037635da51d07041fbb8d1
[ "MIT" ]
permissive
kamesenin/UMC
d844b08729ab418c783b77baced0153e13c3f114
58972259b615774b8928f29f1742686790e227a9
refs/heads/master
2020-04-22T03:30:34.677712
2020-02-04T11:23:44
2020-02-04T11:23:44
170,089,485
0
0
null
null
null
null
UTF-8
C++
false
false
209
cpp
/*** UMC Created by Tomasz 'kamesenin' Witczak - kamesenin@gmail.com **/ #include "UMC.h" #include "UMCPrivatePCH.h" DEFINE_LOG_CATEGORY(UMCLog) IMPLEMENT_MODULE(FUMC, UMC); #define LOCTEXT_NAMESPACE "UMC"
[ "kamesenin@gmail.com" ]
kamesenin@gmail.com
39edeedb757b2e46b582ce73a2ac11cf0f33ed1d
9f05e53255dd6fc4d6d626c79321b96c2b73116e
/classtemplate/classtemplate/classtemplate.cpp
f4d33e56286a352ace77e1cf3fa115ff2c4b53af
[]
no_license
frbgd/al2
c11ba81a178649723b2489f86091e9942b0b87b3
a681b5dad4119d1b34b74334688ded10763c3e57
refs/heads/master
2021-09-28T18:59:58.349769
2018-11-19T14:59:21
2018-11-19T14:59:21
158,241,649
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
2,902
cpp
#include<clocale> #include <iostream> using namespace std; #include <iomanip> template <typename T> class Stack { private: T *stackPtr; // указатель на стек int size; // размер стека T top; // вершина стека public: Stack(int = 10);// по умолчанию размер стека равен 10 элементам ~Stack(); // деструктор bool push(const T); // поместить элемент в стек bool pop(); // удалить из стека элемент void printStack(); }; int main() { setlocale(LC_ALL, "Russian"); Stack <int> myStack(5); // заполняем стек cout << "Заталкиваем элементы в стек: "; int ct = 0; while (ct++ != 5) { int temp; cin >> temp; myStack.push(temp); } myStack.printStack(); // вывод стека на экран cout << "\nУдаляем два элемента из стека:\n"; myStack.pop(); // удаляем элемент из стека myStack.pop(); // удаляем элемент из стека myStack.printStack(); // вывод стека на экран system("pause"); return 0; } // конструктор template <typename T> Stack<T>::Stack(int s) { size = s > 0 ? s : 10; // инициализировать размер стека stackPtr = new T[size]; // выделить память под стек top = -1; // значение -1 говорит о том, что стек пуст } // деструктор template <typename T> Stack<T>::~Stack() { delete[] stackPtr; // удаляем стек } // элемент функция класса Stack для помещения элемента в стек // возвращаемое значение - true, операция успешно завершена // false, элемент в стек не добавлен template <typename T> bool Stack<T>::push(const T value) { if (top == size - 1) return false; // стек полон top++; stackPtr[top] = value; // помещаем элемент в стек return true; // успешное выполнение операции } // элемент функция класса Stack для удаления элемента из стек // возвращаемое значение - true, операция успешно завершена // false, стек пуст template <typename T> bool Stack<T>::pop() { if (top == -1) return false; // стек пуст stackPtr[top] = 0; // удаляем элемент из стека top--; return true; // успешное выполнение операции } // вывод стека на экран template <typename T> void Stack<T>::printStack() { for (int ix = size - 1; ix >= 0; ix--) cout << "|" << setw(4) << stackPtr[ix] << endl; }
[ "kap17597@gmail.com" ]
kap17597@gmail.com
f910d1d2421bee8ccfd099de37c022d527df6074
3699bec7aebc26f26eac9d79fe22510f71c8300e
/Classes/NDKHelper/NDKCallbackNode.h
14a4f449b3a7815936b715581e703a131f5279b6
[]
no_license
trananhkhoi46/Wordzzle
981c508666e19f8b721c86f3f55c57e7f457796a
8a464eb4c1c1f9fa8ead4cef5fa2e859d16cefab
refs/heads/master
2021-06-11T23:37:56.301687
2017-01-14T03:59:49
2017-01-14T03:59:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
666
h
// // NDKCallbackNode.h // EasyNDK-for-cocos2dx // // Created by Amir Ali Jiwani on 23/02/2013. // // #ifndef __EasyNDK_for_cocos2dx__NDKCallbackNode__ #define __EasyNDK_for_cocos2dx__NDKCallbackNode__ #include "cocos2d.h" #include <string> USING_NS_CC; using namespace std; class NDKCallbackNode { private : SEL_CallFuncND sel; string name; string groupName; CCNode *target; public : NDKCallbackNode(const char *groupName, const char *name, SEL_CallFuncND sel, CCNode *target); string getName(); string getGroup(); SEL_CallFuncND getSelector(); CCNode* getTarget(); }; #endif
[ "khoitran@misfit.com" ]
khoitran@misfit.com
9e1d6d779554eec3f8b7f1b9c1b1afb820f2c9e2
aef302057f403307c87180551b4f89a2cf0f25c8
/include/musrRootOutput.hh
edc680410cf2f33c654775d7f886c30eab630644
[]
no_license
kimsiang/musrSim2014
16eb6fb54089e14a88c2935fc26e7ff873c8a935
cd96f63c815cbf2c6783c368ca70aef7043540da
refs/heads/master
2020-07-26T23:05:53.326135
2016-02-08T21:27:00
2016-02-08T21:27:00
51,315,271
0
0
null
null
null
null
UTF-8
C++
false
false
20,859
hh
/*************************************************************************** * musrSim - the program for the simulation of (mainly) muSR instruments. * * More info on http://lmu.web.psi.ch/simulation/index.html . * * musrSim is based od Geant4 (http://geant4.web.cern.ch/geant4/) * * * * Copyright (C) 2009 by Paul Scherrer Institut, 5232 Villigen PSI, * * Switzerland * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ***************************************************************************/ #ifndef musrRootOutput_h #define musrRootOutput_h 1 //#include "G4UserRunAction.hh" #include "globals.hh" #include "G4ThreeVector.hh" // ROOT #include "TFile.h" #include "TTree.h" #include "TH1.h" #include "TH2.h" #include "TVectorD.h" // #include <map> //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... class musrRootOutput { public: musrRootOutput(); ~musrRootOutput(); static musrRootOutput* GetRootInstance(); public: void BeginOfRunAction(); void EndOfRunAction(); void FillEvent(); void ClearAllRootVariables(); void SetVolumeIDMapping(std::string logivol, int volumeID); G4int ConvertVolumeToID(std::string logivol); G4int ConvertProcessToID(std::string processName); void SetSpecialSaveVolumeDefined() {boolIsAnySpecialSaveVolumeDefined=true;}; // Getting variables (just for debugging) G4double GetDecayPositionZ() {return muDecayPosZ;}; G4double GetDecayTime() {return muDecayTime*microsecond;}; G4double GetTimeInTarget() {return muTargetTime*microsecond;}; // Setting variables common to the whole event: void SetRunID (G4int id) {runID = id;}; void SetEventID (G4int id) {eventID = id;}; void SetTimeToNextEvent(G4double deltaT) {timeToNextEvent = deltaT/microsecond;} void SetDecayDetectorID (std::string detectorName) {muDecayDetID = SensDetectorMapping[detectorName];}; Int_t GetDecayDetectorID() {return muDecayDetID;}; void SetBField (G4double F[6]) {B_t[0]=F[0]/tesla; B_t[1]=F[1]/tesla; B_t[2]=F[2]/tesla; B_t[3]=F[3]/tesla; B_t[4]=F[4]/tesla; B_t[5]=F[5]/tesla;}; void SetDecayPolarisation (G4ThreeVector pol) {muDecayPolX=pol.x(); muDecayPolY=pol.y(); muDecayPolZ=pol.z();}; void SetDecayPosition (G4ThreeVector pos) {muDecayPosX=pos.x()/mm; muDecayPosY=pos.y()/mm; muDecayPosZ=pos.z()/mm;}; void SetEventWeight (G4double w) {weight *= w;} void SetDetectorInfo (G4int nDetectors, G4int ID, G4int particleID, G4double edep, G4double edep_el, G4double edep_pos, G4double edep_gam, G4double edep_mup,G4int nsteps, G4double length, G4double t1, G4double t2, G4double x, G4double y, G4double z, G4double ek, G4double ekVertex, G4double xVertex, G4double yVertex, G4double zVertex, G4int idVolVertex, G4int idProcVertex, G4int idTrackVertex) ; void SetDetectorInfoVvv (G4int nDetectors, G4double ekVertex, G4double xVertex, G4double yVertex, G4double zVertex, G4int idVolVertex, G4int idProcVertex, G4int idTrackVertex, G4int particleID) ; void SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4int nPhotPrim, G4double timeFirst, G4double timeSecond, G4double timeThird, G4double timeA, G4double timeB, G4double timeC, G4double timeD, G4double timeMean, G4double timeLast, G4double timeCFD, G4double amplCFD); void SetCFDSpecialInfo (G4int n, G4double time); void SetTimeC1SpecialInfo (G4double* time); void SetSaveDetectorInfo (G4int ID, G4int particleID, G4double ke, G4double x, G4double y, G4double z, G4double time, G4double px, G4double py, G4double pz, G4double polx, G4double poly, G4double polz) ; void SetInitialMuonParameters(G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz, G4double xpolaris, G4double ypolaris, G4double zpolaris, G4double particleTime) { muIniTime=particleTime/microsecond; muIniPosX=x; muIniPosY=y; muIniPosZ=z; muIniMomX=px; muIniMomY=py; muIniMomZ=pz; muIniPolX=xpolaris; muIniPolY=ypolaris; muIniPolZ=zpolaris; } void PrintInitialMuonParameters() { G4cout<<"musrRootOutput.hh: Initial muon parameters: x="<<muIniPosX<<", y="<<muIniPosY<<", z="<<muIniPosZ <<", px="<<muIniMomX << ", py="<<muIniMomY<<", pz="<<muIniMomZ<<G4endl; G4cout<<" polx="<<muIniPolX<<", poly="<<muIniPolY<<", polz="<<muIniPolZ<<G4endl; G4cout<<" time at which muon was generated = "<<muIniTime<<G4endl; G4cout<<" numberOfGeneratedEvents = "<<GeantParametersD[7]<<G4endl; } void SetPolInTarget(G4ThreeVector pol) {muTargetPolX=pol.x(); muTargetPolY=pol.y(); muTargetPolZ=pol.z();} void SetTimeInTarget(G4double time) {muTargetTime = time/microsecond;} void SetMomentumInTarget(G4ThreeVector mom) {muTargetMomX=(mom.x())/MeV; muTargetMomY=(mom.y())/MeV; muTargetMomZ=(mom.z())/MeV;} void SetPolInM0(G4ThreeVector pol) {muM0PolX=pol.x(); muM0PolY=pol.y(); muM0PolZ=pol.z();} void SetTimeInM0(G4double time) {muM0Time = time/microsecond;} void SetPolInM1(G4ThreeVector pol) {muM1PolX=pol.x(); muM1PolY=pol.y(); muM1PolZ=pol.z();} void SetTimeInM1(G4double time) {muM1Time = time/microsecond;} void SetPolInM2(G4ThreeVector pol) {muM2PolX=pol.x(); muM2PolY=pol.y(); muM2PolZ=pol.z();} void SetTimeInM2(G4double time) {muM2Time = time/microsecond;} void SetInitialPositronMomentum(G4ThreeVector mom) {posIniMomx=mom.x(); posIniMomy=mom.y(); posIniMomz=mom.z();} void SetNOptPhot(G4int value) {nOptPhot=value;} void SetPhotDetTime(G4double time); void SetDecayTime(G4double time) {muDecayTime=time/microsecond;} void SetNrFieldNomVal(G4int n) {nFieldNomVal = n;} void SetFieldNomVal(G4int i, G4double value); G4int GetNrOfVolumes() {return det_nMax;} void SetBFieldIntegral(G4double BxInt,G4double ByInt,G4double BzInt,G4double BzInt1,G4double BzInt2,G4double BzInt3) { BxIntegral=BxInt/m/tesla; ByIntegral=ByInt/m/tesla; BzIntegral=BzInt/m/tesla; BzIntegral1=BzInt1/m/tesla;BzIntegral2=BzInt2/mm;BzIntegral3=BzInt3/mm; } void StoreGeantParameter(Int_t i, Double_t value) { if (i<maxNGeantParameters) { GeantParametersD[i]=value; } else {G4cout<<"musrRootOutput.hh::StoreGeantParameter: index="<<i<<" out of range" <<" (maxNGeantParameters=" <<maxNGeantParameters<<")"<<G4endl;} }; void setRootOutputDirectoryName(char dirName[1000]); TH2F *htest1, *htest2; TH1F *htest3, *htest4, *htest5, *htest6, *htest7, *htest8; public: static G4bool store_runID; static G4bool store_eventID; static G4bool store_weight; static G4bool store_timeToNextEvent; static G4bool store_BFieldAtDecay; static G4bool store_muIniTime; static G4bool store_muIniPosX; static G4bool store_muIniPosY; static G4bool store_muIniPosZ; static G4bool store_muIniMomX; static G4bool store_muIniMomY; static G4bool store_muIniMomZ; static G4bool store_muIniPolX; static G4bool store_muIniPolY; static G4bool store_muIniPolZ; static G4bool store_muDecayDetID; static G4bool store_muDecayPosX; static G4bool store_muDecayPosY; static G4bool store_muDecayPosZ; static G4bool store_muDecayTime; static G4bool store_muDecayPolX; static G4bool store_muDecayPolY; static G4bool store_muDecayPolZ; static G4bool store_muTargetTime; static G4bool store_muTargetPolX; static G4bool store_muTargetPolY; static G4bool store_muTargetPolZ; static G4bool store_muTargetMomX; static G4bool store_muTargetMomY; static G4bool store_muTargetMomZ; static G4bool store_muM0Time; static G4bool store_muM0PolX; static G4bool store_muM0PolY; static G4bool store_muM0PolZ; static G4bool store_muM1Time; static G4bool store_muM1PolX; static G4bool store_muM1PolY; static G4bool store_muM1PolZ; static G4bool store_muM2Time; static G4bool store_muM2PolX; static G4bool store_muM2PolY; static G4bool store_muM2PolZ; static G4bool store_posIniMomX; static G4bool store_posIniMomY; static G4bool store_posIniMomZ; static G4bool store_nOptPhot; static G4bool store_nOptPhotDet; static G4bool store_phot_time; static G4bool store_det_ID; static G4bool store_det_edep; static G4bool store_det_edep_el; static G4bool store_det_edep_pos; static G4bool store_det_edep_gam; static G4bool store_det_edep_mup; static G4bool store_det_nsteps; static G4bool store_det_length; static G4bool store_det_start; static G4bool store_det_end; static G4bool store_det_x; static G4bool store_det_y; static G4bool store_det_z; static G4bool store_det_kine; static G4bool store_det_VrtxKine; static G4bool store_det_VrtxX; static G4bool store_det_VrtxY; static G4bool store_det_VrtxZ; static G4bool store_det_VrtxVolID; static G4bool store_det_VrtxProcID; static G4bool store_det_VrtxTrackID; static G4bool store_det_VrtxParticleID; static G4bool store_det_VvvKine; static G4bool store_det_VvvX; static G4bool store_det_VvvY; static G4bool store_det_VvvZ; static G4bool store_det_VvvVolID; static G4bool store_det_VvvProcID; static G4bool store_det_VvvTrackID; static G4bool store_det_VvvParticleID; static G4bool store_fieldNomVal; static G4bool store_fieldIntegralBx; static G4bool store_fieldIntegralBy; static G4bool store_fieldIntegralBz; static G4bool store_fieldIntegralBz1; static G4bool store_fieldIntegralBz2; static G4bool store_fieldIntegralBz3; static G4bool store_odet_ID; static G4bool store_odet_nPhot; static G4bool store_odet_nPhotPrim; static G4bool store_odet_timeFirst; static G4bool store_odet_timeSecond; static G4bool store_odet_timeThird; static G4bool store_odet_timeA; static G4bool store_odet_timeB; static G4bool store_odet_timeC; static G4bool store_odet_timeD; static G4bool store_odet_timeMean; static G4bool store_odet_timeLast; static G4bool store_odet_timeCFD; static G4bool store_odet_amplCFD; static G4bool store_odet_timeCFDarray; static G4bool store_odet_timeC1; static G4int oldEventNumberInG4EqEMFieldWithSpinFunction; private: TFile* rootFile; TTree* rootTree; static musrRootOutput* pointerToRoot; static const Int_t maxNGeantParameters=30; char rootOutputDirectoryName[1000]; Double_t GeantParametersD[maxNGeantParameters]; // parameters transfered from GEANT to Root // 0 ... fieldOption: 0 ... no field, 1 ... uniform, 2 ... gaussian, 3 ... from table // 1 ... fieldValue: intensity of the magnetic field // 2 ... minimum of the generated decay time of the muon (in microsecond) // 3 ... maximum of the generated decay time of the muon (in microsecond) // 4 ... muon mean life time (in microsecond) // 5 ... nr. of the last generated event // 6 ... run number // 7 ... numberOfGeneratedEvents (i.e. number of the generated events; // in case of Turtle nr. of events tried); // Variables common to the whole event: Int_t runID; Int_t eventID; Double_t weight; Double_t timeToNextEvent; Double_t B_t[6]; Double_t muIniTime; Double_t muIniPosX, muIniPosY, muIniPosZ; Double_t muIniMomX, muIniMomY, muIniMomZ; Double_t muIniPolX, muIniPolY, muIniPolZ; Int_t muDecayDetID; Double_t muDecayPolX, muDecayPolY, muDecayPolZ; Double_t muTargetTime, muTargetPolX, muTargetPolY, muTargetPolZ; Double_t muTargetMomX, muTargetMomY, muTargetMomZ; Double_t muM0Time, muM0PolX, muM0PolY, muM0PolZ; Double_t muM1Time, muM1PolX, muM1PolY, muM1PolZ; Double_t muM2Time, muM2PolX, muM2PolY, muM2PolZ; Double_t muDecayPosX, muDecayPosY, muDecayPosZ; Double_t muDecayTime; Double_t posIniMomx, posIniMomy, posIniMomz; Int_t nOptPhot, nOptPhotDet; static const Int_t maxNOptPhotDet=10000; Double_t phot_time[maxNOptPhotDet]; public: static const Int_t maxNFieldnNominalValues=30; private: Int_t nFieldNomVal; Double_t fieldNomVal[maxNFieldnNominalValues]; Double_t BxIntegral, ByIntegral, BzIntegral; Double_t BzIntegral1, BzIntegral2, BzIntegral3; // Variables for a particle in a given detector within the event public: static const Int_t maxNSubTracks=30; private: // Variables for the activity inside a given detector public: static const Int_t det_nMax=100; // must be by 1 higher than the real number of detector "hits", because // else the detector nr. 0 is counted (0 is used if no // SensDetectorMapping correspond to a given logical volume). private: G4int det_n; G4int det_ID[det_nMax]; G4double det_edep[det_nMax]; G4int det_nsteps[det_nMax]; G4double det_length[det_nMax]; G4double det_edep_el[det_nMax]; G4double det_edep_pos[det_nMax]; G4double det_edep_gam[det_nMax]; G4double det_edep_mup[det_nMax]; G4double det_time_start[det_nMax]; G4double det_time_end[det_nMax]; G4double det_x[det_nMax]; G4double det_y[det_nMax]; G4double det_z[det_nMax]; G4double det_kine[det_nMax]; G4double det_VrtxKine[det_nMax]; G4double det_VrtxX[det_nMax]; G4double det_VrtxY[det_nMax]; G4double det_VrtxZ[det_nMax]; G4int det_VrtxVolID[det_nMax]; G4int det_VrtxProcID[det_nMax]; G4int det_VrtxTrackID[det_nMax]; G4int det_VrtxParticleID[det_nMax]; G4double det_VvvKine[det_nMax]; G4double det_VvvX[det_nMax]; G4double det_VvvY[det_nMax]; G4double det_VvvZ[det_nMax]; G4int det_VvvVolID[det_nMax]; G4int det_VvvProcID[det_nMax]; G4int det_VvvTrackID[det_nMax]; G4int det_VvvParticleID[det_nMax]; public: static const Int_t odet_nMax=det_nMax; private: G4int odet_n; G4int odet_ID[odet_nMax]; G4int odet_nPhot[odet_nMax]; G4int odet_nPhotPrim[odet_nMax]; G4double odet_timeFirst[odet_nMax]; G4double odet_timeSecond[odet_nMax]; G4double odet_timeThird[odet_nMax]; G4double odet_timeA[odet_nMax]; G4double odet_timeB[odet_nMax]; G4double odet_timeC[odet_nMax]; G4double odet_timeD[odet_nMax]; G4double odet_timeMean[odet_nMax]; G4double odet_timeLast[odet_nMax]; G4double odet_timeCFD[odet_nMax]; G4double odet_amplCFD[odet_nMax]; G4double odet_timeCFD100[odet_nMax]; G4double odet_timeCFD101[odet_nMax]; G4double odet_timeCFD102[odet_nMax]; G4double odet_timeCFD103[odet_nMax]; G4double odet_timeCFD104[odet_nMax]; G4double odet_timeCFD105[odet_nMax]; G4double odet_timeCFD106[odet_nMax]; G4double odet_timeCFD107[odet_nMax]; G4double odet_timeCFD108[odet_nMax]; G4double odet_timeCFD109[odet_nMax]; G4double odet_timeCFD110[odet_nMax]; G4double odet_timeCFD111[odet_nMax]; G4double odet_timeCFD112[odet_nMax]; G4double odet_timeCFD200[odet_nMax]; G4double odet_timeCFD201[odet_nMax]; G4double odet_timeCFD202[odet_nMax]; G4double odet_timeCFD203[odet_nMax]; G4double odet_timeCFD204[odet_nMax]; G4double odet_timeCFD205[odet_nMax]; G4double odet_timeCFD206[odet_nMax]; G4double odet_timeCFD207[odet_nMax]; G4double odet_timeCFD208[odet_nMax]; G4double odet_timeCFD209[odet_nMax]; G4double odet_timeCFD210[odet_nMax]; G4double odet_timeCFD211[odet_nMax]; G4double odet_timeCFD212[odet_nMax]; G4double odet_timeCFD300[odet_nMax]; G4double odet_timeCFD301[odet_nMax]; G4double odet_timeCFD302[odet_nMax]; G4double odet_timeCFD303[odet_nMax]; G4double odet_timeCFD304[odet_nMax]; G4double odet_timeCFD305[odet_nMax]; G4double odet_timeCFD306[odet_nMax]; G4double odet_timeCFD307[odet_nMax]; G4double odet_timeCFD308[odet_nMax]; G4double odet_timeCFD309[odet_nMax]; G4double odet_timeCFD310[odet_nMax]; G4double odet_timeCFD311[odet_nMax]; G4double odet_timeCFD312[odet_nMax]; G4double odet_timeCFD400[odet_nMax]; G4double odet_timeCFD401[odet_nMax]; G4double odet_timeCFD402[odet_nMax]; G4double odet_timeCFD403[odet_nMax]; G4double odet_timeCFD404[odet_nMax]; G4double odet_timeCFD405[odet_nMax]; G4double odet_timeCFD406[odet_nMax]; G4double odet_timeCFD407[odet_nMax]; G4double odet_timeCFD408[odet_nMax]; G4double odet_timeCFD409[odet_nMax]; G4double odet_timeCFD410[odet_nMax]; G4double odet_timeCFD411[odet_nMax]; G4double odet_timeCFD412[odet_nMax]; G4double odet_timeCFD500[odet_nMax]; G4double odet_timeCFD501[odet_nMax]; G4double odet_timeCFD502[odet_nMax]; G4double odet_timeCFD503[odet_nMax]; G4double odet_timeCFD504[odet_nMax]; G4double odet_timeCFD505[odet_nMax]; G4double odet_timeCFD506[odet_nMax]; G4double odet_timeCFD507[odet_nMax]; G4double odet_timeCFD508[odet_nMax]; G4double odet_timeCFD509[odet_nMax]; G4double odet_timeCFD510[odet_nMax]; G4double odet_timeCFD511[odet_nMax]; G4double odet_timeCFD512[odet_nMax]; G4double odet_timeC1[odet_nMax]; G4double odet_timeC2[odet_nMax]; G4double odet_timeC3[odet_nMax]; G4double odet_timeC4[odet_nMax]; G4double odet_timeC5[odet_nMax]; G4double odet_timeC6[odet_nMax]; G4double odet_timeC7[odet_nMax]; G4double odet_timeC8[odet_nMax]; G4double odet_timeC9[odet_nMax]; G4double odet_timeC10[odet_nMax]; G4double odet_timeC11[odet_nMax]; G4double odet_timeC12[odet_nMax]; G4double odet_timeC13[odet_nMax]; G4double odet_timeC14[odet_nMax]; G4double odet_timeC15[odet_nMax]; G4double odet_timeC16[odet_nMax]; G4double odet_timeC17[odet_nMax]; G4double odet_timeC18[odet_nMax]; G4double odet_timeC19[odet_nMax]; G4double odet_timeC20[odet_nMax]; G4double odet_timeC21[odet_nMax]; G4double odet_timeC22[odet_nMax]; G4double odet_timeC23[odet_nMax]; G4double odet_timeC24[odet_nMax]; G4double odet_timeC25[odet_nMax]; G4double odet_timeC26[odet_nMax]; G4double odet_timeC27[odet_nMax]; G4double odet_timeC28[odet_nMax]; G4double odet_timeC29[odet_nMax]; G4double odet_timeC30[odet_nMax]; G4double odet_timeC31[odet_nMax]; G4double odet_timeC32[odet_nMax]; G4double odet_timeC33[odet_nMax]; G4double odet_timeC34[odet_nMax]; G4double odet_timeC35[odet_nMax]; G4double odet_timeC36[odet_nMax]; G4double odet_timeC37[odet_nMax]; G4double odet_timeC38[odet_nMax]; G4double odet_timeC39[odet_nMax]; G4double odet_timeC40[odet_nMax]; public: static const Int_t save_nMax=5000; private: G4int save_n; G4int save_detID[save_nMax]; G4int save_particleID[save_nMax]; G4double save_ke[save_nMax]; G4double save_time[save_nMax]; G4double save_x[save_nMax]; G4double save_y[save_nMax]; G4double save_z[save_nMax]; G4double save_px[save_nMax]; G4double save_py[save_nMax]; G4double save_pz[save_nMax]; G4double save_polx[save_nMax]; G4double save_poly[save_nMax]; G4double save_polz[save_nMax]; G4bool boolIsAnySpecialSaveVolumeDefined; std::map<std::string,int> SensDetectorMapping; std::map<std::string,int> ProcessIDMapping; }; #endif
[ "kimsiang84@gmail.com" ]
kimsiang84@gmail.com
2e2947b5e51152b3c95eecd575cb9073380717e8
1f6504b256d5fdcd6f14d4054c90deb592318972
/stack.h
c658985326e9ebc2d6dc1c78649acba8f48f9d7f
[]
no_license
utec-cs-aed-2021-2/circular-array-DiegoGCh
938f6564cac984f557492e462485f26c895a411d
8fdb8db9a00710e0eb1f40492352c724857c8bcd
refs/heads/main
2023-08-09T07:25:47.878602
2021-09-14T04:24:28
2021-09-14T04:24:28
404,923,605
0
0
null
2021-09-10T01:48:42
2021-09-10T01:48:37
C++
UTF-8
C++
false
false
549
h
#ifndef STACKARR_H #define STACKARR_H #include "circulararray.h" template <typename T> class StackArray: public CircularArray<T> { public: StackArray<T>(): CircularArray<T>(0){}; StackArray<T>(int _capacity): CircularArray<T>(_capacity){}; ~StackArray(){ }; void stack_push_back(T data){ this->push_back(data); }; T stack_pop_back(){ return this->pop_back(); }; string stack_to_string(){ return this->to_string(); }; }; #endif
[ "64449084+DiegoGCh@users.noreply.github.com" ]
64449084+DiegoGCh@users.noreply.github.com
e36b69f293338e1629e6e0f70366bc6a2480d9df
f0b7bcc41298354b471a72a7eeafe349aa8655bf
/codebase/apps/titan/src/CIDD_titan/save_pu_proc.cc
db7a05f573614b6b8451575d0b30a106cd7efb1a
[ "BSD-3-Clause" ]
permissive
NCAR/lrose-core
23abeb4e4f1b287725dc659fb566a293aba70069
be0d059240ca442883ae2993b6aa112011755688
refs/heads/master
2023-09-01T04:01:36.030960
2023-08-25T00:41:16
2023-08-25T00:41:16
51,408,988
90
53
NOASSERTION
2023-08-18T21:59:40
2016-02-09T23:36:25
C++
UTF-8
C++
false
false
6,291
cc
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1990 - 2016 // ** University Corporation for Atmospheric Research (UCAR) // ** National Center for Atmospheric Research (NCAR) // ** Boulder, Colorado, USA // ** BSD licence applies - redistribution and use in source and binary // ** forms, with or without modification, are permitted provided that // ** the following conditions are met: // ** 1) If the software is modified to produce derivative works, // ** such modified software should be clearly marked, so as not // ** to confuse it with the version available from UCAR. // ** 2) Redistributions of source code must retain the above copyright // ** notice, this list of conditions and the following disclaimer. // ** 3) 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. // ** 4) Neither the name of UCAR nor the names of its contributors, // ** if any, may be used to endorse or promote products derived from // ** this software without specific prior written permission. // ** DISCLAIMER: THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS // ** OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED // ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* /************************************************************************* * SAVE_PU_PROCS.C - Notify and event callback function stubs for CIDD's * Image Save confirmation panel */ #define SAVE_PU_PROCS #include "cidd.h" /************************************************************************* * Update the panel with the right window's parameters */ void update_save_panel(void) { static char msg[64]; switch(gd.save_im_win) { default: case PLAN_VIEW: /* The horizontal window */ sprintf(msg,"Plan view - Image size %d X %d", gd.h_win.img_dim.width,gd.h_win.img_dim.height); xv_set(gd.save_pu->save_pu_msg,PANEL_LABEL_STRING,msg,NULL); xv_set(gd.save_pu->dir_tx,PANEL_VALUE,gd.h_win.image_dir,NULL); xv_set(gd.save_pu->fname_tx,PANEL_VALUE,gd.h_win.image_fname,NULL); xv_set(gd.save_pu->cmd_tx,PANEL_VALUE,gd.h_win.image_command,NULL); break; case XSECT_VIEW: /* The vertical cross section window */ sprintf(msg,"Cross Section - Image size %d X %d", gd.v_win.img_dim.width,gd.v_win.img_dim.height); xv_set(gd.save_pu->save_pu_msg,PANEL_LABEL_STRING,msg,NULL); xv_set(gd.save_pu->dir_tx,PANEL_VALUE,gd.v_win.image_dir,NULL); xv_set(gd.save_pu->fname_tx,PANEL_VALUE,gd.v_win.image_fname,NULL); xv_set(gd.save_pu->cmd_tx,PANEL_VALUE,gd.v_win.image_command,NULL); break; } } /************************************************************************* * Notify callback function for `dir_tx'. */ Panel_setting set_dir_proc(Panel_item item, Event *event) { char * value = (char *) xv_get(item, PANEL_VALUE); switch(gd.save_im_win) { default: case PLAN_VIEW: /* The horizontal window */ STRcopy(gd.h_win.image_dir, value,MAX_PATH_LEN); break; case XSECT_VIEW: /* The vertical cross section window */ STRcopy(gd.v_win.image_dir, value,MAX_PATH_LEN); break; } return panel_text_notify(item, event); } /************************************************************************* * Notify callback function for `fname_tx'. */ Panel_setting set_fname_proc(Panel_item item, Event *event) { char * value = (char *) xv_get(item, PANEL_VALUE); switch(gd.save_im_win) { default: case PLAN_VIEW: /* The horizontal window */ STRcopy(gd.h_win.image_fname, value,MAX_PATH_LEN); break; case XSECT_VIEW: /* The vertical cross section window */ STRcopy(gd.v_win.image_fname, value,MAX_PATH_LEN); break; } return panel_text_notify(item, event); } /************************************************************************* * Notify callback function for `cmd_tx'. */ Panel_setting set_command_proc(Panel_item item, Event *event) { char * value = (char *) xv_get(item, PANEL_VALUE); switch(gd.save_im_win) { default: case PLAN_VIEW: /* The horizontal window */ STRcopy(gd.h_win.image_command, value,MAX_PATH_LEN); break; case XSECT_VIEW: /* The vertical cross section window */ STRcopy(gd.v_win.image_command, value,MAX_PATH_LEN); break; } return panel_text_notify(item, event); } /************************************************************************* * Notify callback function for `save_bt'. */ void save_image_proc(Panel_item item, Event *event) { // Use unused parameters item = 0; event = NULL; dump_cidd_image(gd.save_im_win,1,0,gd.h_win.page); } /************************************************************************* * Notify callback function for `cancel_bt'. */ void cancel_save_proc(Panel_item item, Event *event) { // Use unused parameters item = 0; event = NULL; xv_set(gd.save_pu->save_im_pu,FRAME_CMD_PUSHPIN_IN, FALSE,XV_SHOW, FALSE,NULL); } /************************************************************************* * Notify callback function for `gen_name_bt'. */ void gen_fname_proc(Panel_item, Event *) { char *fname; switch(gd.save_im_win) { default: case PLAN_VIEW: /* The horizontal window */ fname = gen_image_fname(gd.image_horiz_prefix,gd.mrec[gd.h_win.page]); STRcopy(gd.h_win.image_fname, fname,MAX_PATH_LEN); break; case XSECT_VIEW: /* The vertical cross section window */ fname = gen_image_fname(gd.image_vert_prefix,gd.mrec[gd.v_win.page]); STRcopy(gd.v_win.image_fname, fname,MAX_PATH_LEN); break; } update_save_panel(); }
[ "dixon@ucar.edu" ]
dixon@ucar.edu
b8e6f359fcd9d7cae2980add2bdd393d1a2890af
41f9824afb54d112e509443787410b7ec7c4ac74
/PA2/include/graphics.h
92870515409777a405c69a3219bab3f95376d548
[]
no_license
orion996/cs480Jordy
82c5e222a8bb9dbe0166a9dad1713cb539c4c1b6
994db5fc11a0a5396fd14021c54d018036277e42
refs/heads/master
2021-07-16T12:17:51.451275
2018-12-17T03:53:09
2018-12-17T03:53:09
146,338,545
0
0
null
null
null
null
UTF-8
C++
false
false
568
h
#ifndef GRAPHICS_H #define GRAPHICS_H #include <iostream> using namespace std; #include "graphics_headers.h" #include "camera.h" #include "shader.h" #include "object.h" class Graphics { public: Graphics(); ~Graphics(); bool Initialize(int width, int height); void Update(unsigned int dt, char cmd); void Render(); private: std::string ErrorString(GLenum error); Camera *m_camera; Shader *m_shader; GLint m_projectionMatrix; GLint m_viewMatrix; GLint m_modelMatrix; Object *m_cube; }; #endif /* GRAPHICS_H */
[ "njordy@nevada.unr.edu" ]
njordy@nevada.unr.edu
2b0c5c03bbb571bf74dabe040f7861b76d6d72df
a829617f9ad158df80a569dd02a99c53639fa2c6
/ext/contour.cc
825d1f5e80da5f28b98a59f84fe4c8a23cd34822
[]
no_license
alexhsamuel/pyhep
6db5edd03522553c54c8745a0e7fe98d96d2b7ae
c685756e9065a230e2e84c311a1c89239c5d94de
refs/heads/master
2021-01-10T14:24:08.648081
2015-10-22T13:18:50
2015-10-22T13:18:50
44,745,881
1
0
null
null
null
null
UTF-8
C++
false
false
9,664
cc
//---------------------------------------------------------------------- // // contour.cc // // Adapted from newcntr.c by Michael Aramini, // http://members.bellatlantic.net/~vze2vrva/ // // Ref: http://members.bellatlantic.net/~vze2vrva/thesis.html // //---------------------------------------------------------------------- //---------------------------------------------------------------------- // includes //---------------------------------------------------------------------- #include <cmath> #include <cstdlib> #include <cstdio> #include "contour.hh" //---------------------------------------------------------------------- // methods //---------------------------------------------------------------------- Contour::Contour(double x0, double x1, int x_spacing, double y0, double y1, int y_spacing, const std::vector<double>& levels, Function function, Callback callback, void* cookie) : x0_(x0), x1_(x1), x_spacing_(x_spacing), y0_(y0), y1_(y1), y_spacing_(y_spacing), levels_(levels), function_(function), callback_(callback), cookie_(cookie), x_scale_((x1_ - x0_) / X_RESOLUTION), x_offset_(x0_), y_scale_((y1_ - y0_) / Y_RESOLUTION), y_offset_(y0_) { } double Contour::function(int x, int y) { // Is it already in the array? if (grid(x, y).top_len_ == -1) { // Not in the array; create new array element. grid(x, y).top_len_ = 0; grid(x, y).bot_len_ = 0; grid(x, y).right_len_ = 0; grid(x, y).left_len_ = 0; double x1 = x_offset_ + x_scale_ * x; double y1 = y_offset_ + y_scale_ * y; grid(x, y).value_ = function_(cookie_, x1, y1); } return grid(x, y).value_; } void Contour::compute() { int xlow = 0; int oldx3 = 0; int x3 = Y_RESOLUTION / x_spacing_; int x4 = (2 * Y_RESOLUTION) / x_spacing_; for (int x = oldx3; x <= x4; x++) { // Allocate new columns needed. if (x >= Y_RESOLUTION + 1) break; grid_[x] = (Cell*) calloc(X_RESOLUTION + 1, sizeof(Cell)); for (int y = 0; y <= X_RESOLUTION; y++) grid(x, y).top_len_ = -1; } int y3; int y4 = 0; for (int j = 0; j < y_spacing_; j++) { y3 = y4; y4 = ((j + 1) * X_RESOLUTION) / y_spacing_; cntr1(oldx3, x3, y3, y4); } for (int i = 1; i < x_spacing_; i++) { y4 = 0; for (int j = 0; j < y_spacing_; j++) { y3 = y4; y4 = ((j + 1) * X_RESOLUTION) / y_spacing_; cntr1(x3, x4, y3, y4); } y4 = 0; for (int j = 0; j < y_spacing_; j++) { y3 = y4; y4 = ((j + 1) * X_RESOLUTION) / y_spacing_; pass2(oldx3, x3, y3, y4); } if (i < x_spacing_ - 1) { // Re-use columns no longer needed. oldx3 = x3; x3 = x4; x4 = ((i + 2) * Y_RESOLUTION) / x_spacing_; for (int x = x3 + 1; x <= x4; x++) { if (xlow < oldx3) { grid_[x] = grid_[xlow]; grid_[xlow++] = NULL; } else { grid_[x] = (Cell*) calloc(X_RESOLUTION + 1, sizeof(Cell)); } for (int y = 0; y <= X_RESOLUTION; y++) grid(x, y).top_len_ = -1; } } } y4 = 0; for (int j = 0; j < y_spacing_; j++) { y3 = y4; y4 = ((j + 1) * X_RESOLUTION) / y_spacing_; pass2(x3, x4, y3, y4); } // Clean up rest of dynamically allocated memory. for (int x = xlow; x <= Y_RESOLUTION; x++) free(grid_[x]); } void Contour::cntr1(int x1, int x2, int y1, int y2) { // If not a real cell, punt. if ((x1 == x2) || (y1 == y2)) return; double f11 = function(x1, y1); double f12 = function(x1, y2); double f21 = function(x2, y1); double f22 = function(x2, y2); // Is the cell divisible? if ((x2 > x1 + 1) || (y2 > y1 + 1)) { int x3 = (x1 + x2) / 2; int y3 = (y1 + y2) / 2; double f33 = function(x3, y3); unsigned i = 0; unsigned j = 0; if (f33 < f11) i++; else if (f33 > f11) j++; if (f33 < f12) i++; else if (f33 > f12) j++; if (f33 < f21) i++; else if (f33 > f21) j++; if (f33 < f22) i++; else if (f33 > f22) j++; // Should we divide the cell? if ((i > 2) || (j > 2)) { // Yes. cntr1(x1, x3, y1, y3); cntr1(x3, x2, y1, y3); cntr1(x1, x3, y3, y2); cntr1(x3, x2, y3, y2); return; } } // Install the cell in the array. grid(x1, y2).bot_len_ = x2 - x1; grid(x1, y1).top_len_ = x2 - x1; grid(x2, y1).left_len_ = y2 - y1; grid(x1, y1).right_len_ = y2 - y1; } void Contour::pass2(int x1, int x2, int y1, int y2) { int left = 0; int right = 0; int top = 0; int bot = 0; double yy0 = 0; double yy1 = 0; double xx0 = 0; double xx1 = 0; int old, neu; double fold, fnew; // If not a real cell, punt. if ((x1 == x2) || (y1 == y2)) return; double f11 = grid(x1, y1).value_; double f12 = grid(x1, y2).value_; double f21 = grid(x2, y1).value_; double f22 = grid(x2, y2).value_; // Is cell divisible? if ((x2 > x1 + 1) || (y2 > y1 + 1)) { int x3 = (x1 + x2) / 2; int y3 = (y1 + y2) / 2; double f33 = grid(x3, y3).value_; unsigned i = 0; unsigned j = 0; if (f33 < f11) i++; else if (f33 > f11) j++; if (f33 < f12) i++; else if (f33 > f12) j++; if (f33 < f21) i++; else if (f33 > f21) j++; if (f33 < f22) i++; else if (f33 > f22) j++; // Should we divide the cell? if ((i > 2) || (j > 2)) { // Yes. pass2(x1, x3, y1, y3); pass2(x3, x2, y1, y3); pass2(x1, x3, y3, y2); pass2(x3, x2, y3, y2); return; } } for (unsigned i = 0; i < levels_.size(); i++) { double v = levels_[i]; unsigned j = 0; if (f21 > v) j++; if (f11 > v) j |= 2; if (f22 > v) j |= 4; if (f12 > v) j |= 010; if ((f11 > v) ^ (f12 > v)) { if ((grid(x1, y1).left_len_ != 0) && (grid(x1, y1).left_len_ < grid(x1, y1).right_len_)) { old = y1; fold = f11; while (1) { neu = old + grid(x1, old).left_len_; fnew = grid(x1, neu).value_; if ((fnew > v) ^ (fold > v)) break; old = neu; fold = fnew; } yy0 = ((old - y1) + (neu - old) * (v - fold) / (fnew - fold)) / (y2 - y1); } else yy0 = (v - f11) / (f12 - f11); left = (int)(y1 + (y2 - y1) * yy0 + 0.5); } if ((f21 > v) ^ (f22 > v)) { if ((grid(x2, y1).right_len_ != 0) && (grid(x2, y1).right_len_ < grid(x2, y1).left_len_)) { old = y1; fold = f21; while (1) { neu = old + grid(x2, old).right_len_; fnew = grid(x2, neu).value_; if ((fnew > v) ^ (fold > v)) break; old = neu; fold = fnew; } yy1 = ((old - y1) + (neu - old) * (v - fold) / (fnew - fold)) / (y2 - y1); } else yy1 = (v - f21) / (f22 - f21); right = (int)(y1 + (y2 - y1) * yy1 + 0.5); } if ((f21 > v) ^ (f11 > v)) { if ((grid(x1, y1).bot_len_ != 0) && (grid(x1, y1).bot_len_ < grid(x1, y1).top_len_)) { old = x1; fold = f11; while (1) { neu = old + grid(old, y1).bot_len_; fnew = grid(neu, y1).value_; if ((fnew > v) ^ (fold > v)) break; old = neu; fold = fnew; } xx0 = ((old - x1) + (neu - old) * (v - fold) / (fnew - fold)) / (x2 - x1); } else xx0 = (v - f11) / (f21 - f11); bot = (int)(x1 + (x2 - x1) * xx0 + 0.5); } if ((f22 > v) ^ (f12 > v)) { if ((grid(x1, y2).top_len_ != 0) && (grid(x1, y2).top_len_ < grid(x1, y2).bot_len_)) { old = x1; fold = f12; while (1) { neu = old + grid(old, y2).top_len_; fnew = grid(neu, y2).value_; if ((fnew > v) ^ (fold > v)) break; old = neu; fold = fnew; } xx1 = ((old - x1) + (neu - old) * (v - fold) / (fnew - fold)) / (x2 - x1); } else xx1 = (v - f12) / (f22 - f12); top = (int)(x1 + (x2 - x1) * xx1 + 0.5); } switch (j) { case 7: case 010: line(x1, left, top, y2); break; case 5: case 012: line(bot, y1, top, y2); break; case 2: case 015: line(x1, left, bot, y1); break; case 4: case 013: line(top, y2, x2, right); break; case 3: case 014: line(x1, left, x2, right); break; case 1: case 016: line(bot, y1, x2, right); break; case 0: case 017: break; case 6: case 011: { double yy3 = (xx0 * (yy1 - yy0) + yy0) / (1.0 - (xx1 - xx0) * (yy1 - yy0)); double xx3 = yy3 * (xx1 - xx0) + xx0; xx3 = x1 + xx3 * (x2 - x1); yy3 = y1 + yy3 * (y2 - y1); xx3 = x_offset_ + xx3 * x_scale_; yy3 = y_offset_ + yy3 * y_scale_; // double f = function_(cookie_, xx3, yy3); double f = function_(cookie_, isnan(xx3) ? x1_ : xx3, isnan(yy3) ? y1_ : yy3); if (f == v) { line(bot, y1, top, y2); line(x1, left, x2, right); } else { if (((f > v) && (f22 > v)) || ((f < v) && (f22 < v))) { line(x1, left, top, y2); line(bot, y1, x2, right); } else { line(x1, left, bot, y1); line(top, y2, x2, right); } } break; } } } }
[ "alex@alexsamuel.net" ]
alex@alexsamuel.net
908346501e1be6c3bbbe0aa91d28753fa02c2ee5
e60e13b8712b12a9d4ff99f91c6ff332a4601418
/mainwindow.h
eef22e3d8287b4cb862b9b9994e136ebb54aee0c
[]
no_license
Piyush-Srivastava/OOP-Open-Ended-Project
33f4d82327cb5ba20d40ffb93f5e0304ebba4eb5
69359463e5b12aeac0f17775cad39188cf60665f
refs/heads/master
2021-06-16T01:45:54.944252
2017-04-02T08:07:27
2017-04-02T08:07:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
443
h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QtCore> #include <QtGui> #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private slots: void on_pushButton_clicked(); void on_pushButton_2_clicked(); private: Ui::MainWindow *ui; QStringListModel *model; }; #endif // MAINWINDOW_H
[ "piyush061996@gmail.com" ]
piyush061996@gmail.com
d0c683db78c860e1dab56fb03178535eef9d5f2e
648d470279863a5db9bc76297589abeff5b4bb35
/src/input.cpp
016acd4d88061198350bb9346b3556a4b057df60
[ "Zlib" ]
permissive
zacharyCormack/simple_machine
88dc09a6b7199d9abb7147b19ccd258a05d22898
6255dd3a4f6e94aeff616fad3fad4351480a9956
refs/heads/master
2022-10-26T05:41:02.171719
2020-06-13T16:14:19
2020-06-13T16:14:19
269,191,057
0
0
null
null
null
null
UTF-8
C++
false
false
237
cpp
#include "Force.hpp" double* act(angle ang, double coefficient, double velocity) { double force_vec[] = {coefficient*0.5, 0, 0, __DBL_MIN__}; return line_x_y_z(vec_mult(uvec(ang, (angle){(char)(0)}), force_vec)); }; Force input(act);
[ "cormack.zachary@gmail.com" ]
cormack.zachary@gmail.com
3ac138b2071a9ca96e4f68a2c678cbadd84f75e4
954a05a2c7e92c86a685f408c1a779e7e26bb66e
/test1.cpp
d984b6bfd53f2f4a9f190fba04e886f9bc8300c4
[]
no_license
endeavorchan/CC
f5615d989a5457fadcf0f9d4ddf4766b7e7c3d60
e7f8330cb24f70fc776dbc301c6cd621e6f660c6
refs/heads/master
2016-09-08T05:47:24.729067
2014-03-25T08:55:39
2014-03-25T08:55:39
7,713,574
0
0
null
null
null
null
UTF-8
C++
false
false
28
cpp
this is test1 haha hahah
[ "cchenhello@gmail.com" ]
cchenhello@gmail.com
102d5d71d33c9ac752f9ff7a7bf908d307df536a
e99c20155e9b08c7e7598a3f85ccaedbd127f632
/ sjtu-project-pipe/thirdparties/VTK.Net/src/Graphics/vtkEdgePointsDotNet.cxx
593632421a591857df99b5fbffe972c8ae03978c
[ "BSD-3-Clause" ]
permissive
unidevop/sjtu-project-pipe
38f00462d501d9b1134ce736bdfbfe4f9d075e4a
5a09f098db834d5276a2921d861ef549961decbe
refs/heads/master
2020-05-16T21:32:47.772410
2012-03-19T01:24:14
2012-03-19T01:24:14
38,281,086
1
1
null
null
null
null
UTF-8
C++
false
false
3,181
cxx
// managed includes #include "vtkDotNetConvert.h" #include "vtkEdgePointsDotNet.h" // native includes #include "strstream" #include "vtkEdgePoints.h" #include "vtkObject.h" using namespace System; namespace vtk { System::String^ vtkEdgePoints::GetClassName() { const char* retVal = vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->GetClassName(); System::String^ sRetVal = System::Runtime::InteropServices::Marshal::PtrToStringAnsi(IntPtr(const_cast<char*>(retVal))); return sRetVal; } int vtkEdgePoints::IsA(System::String^ name) { char* nameWrap = static_cast<char*>(System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(name).ToPointer()); int retVal = vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->IsA(nameWrap); System::Runtime::InteropServices::Marshal::FreeHGlobal(IntPtr(nameWrap)); return retVal; } vtkEdgePoints^ vtkEdgePoints::NewInstance() { ::vtkEdgePoints* retVal = static_cast<::vtkEdgePoints*>(vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->NewInstance()); return gcnew vtkEdgePoints(IntPtr(retVal), false); } vtkEdgePoints^ vtkEdgePoints::SafeDownCast(vtkObject^ o) { ::vtkObject* oWrap = vtk::ConvertManagedToNative<::vtkObject>(o->GetNativePointer()); ::vtkEdgePoints* retVal = static_cast<::vtkEdgePoints*>(::vtkEdgePoints::SafeDownCast(oWrap)); return gcnew vtkEdgePoints(IntPtr(retVal), false); } /// <summary> /// PrintSelf writes the state of this object to a TextWriter. /// </summary> void vtkEdgePoints::PrintSelf(System::IO::TextWriter^ writer, int indentLevel) { std::ostrstream writeStream; vtkIndent indent(indentLevel); vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->PrintSelf(writeStream,indent); System::String^ sRetVal = System::Runtime::InteropServices::Marshal::PtrToStringAnsi(IntPtr(const_cast<char*>(writeStream.str()))); writer->Write(sRetVal); } /// <summary> /// This returns the state of this object as a string. It is equivalent to PrintSelf. /// </summary> System::String^ vtkEdgePoints::ToString() { std::ostrstream writeStream; vtkIndent indent; vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->PrintSelf(writeStream,indent); System::String^ sRetVal = System::Runtime::InteropServices::Marshal::PtrToStringAnsi(IntPtr(const_cast<char*>(writeStream.str()))); return sRetVal; } void vtkEdgePoints::SetValue(double arg0) { vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->SetValue(arg0); } double vtkEdgePoints::GetValue() { double retVal = vtk::ConvertManagedToNative<::vtkEdgePoints>(m_instance)->GetValue(); return retVal; } vtkEdgePoints::vtkEdgePoints(System::IntPtr native, bool bConst) : vtkPolyDataAlgorithm(native, bConst) {} vtkEdgePoints::vtkEdgePoints(bool donothing) : vtkPolyDataAlgorithm(donothing) {} vtkEdgePoints::vtkEdgePoints() : vtkPolyDataAlgorithm(false) { this->SetNativePointer(IntPtr(::vtkEdgePoints::New())); } vtkEdgePoints::~vtkEdgePoints() { } } // end namespace vtkGraphics
[ "useminmin@gmail.com" ]
useminmin@gmail.com
eb55793fb28350083f1bebf829f3476349938451
8947812c9c0be1f0bb6c30d1bb225d4d6aafb488
/01_Develop/libXMCocos2D-v3/Source/gui/UIWidgets/ScrollWidget/UIPageView.cpp
3329f307778464301f33346baf4ab34d3a1b5922
[ "MIT" ]
permissive
alissastanderwick/OpenKODE-Framework
cbb298974e7464d736a21b760c22721281b9c7ec
d4382d781da7f488a0e7667362a89e8e389468dd
refs/heads/master
2021-10-25T01:33:37.821493
2016-07-12T01:29:35
2016-07-12T01:29:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
16,387
cpp
/* ----------------------------------------------------------------------------------- * * File UIPageView.cpp * Ported By Young-Hwan Mun * Contact xmsoft77@gmail.com * * ----------------------------------------------------------------------------------- * * Copyright (c) 2010-2014 XMSoft * Copyright (c) 2013 cocos2d-x.org * * http://www.cocos2d-x.org * * ----------------------------------------------------------------------------------- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * --------------------------------------------------------------------------------- */ #include "gui/UIWidgets/ScrollWidget/UIPageView.h" namespace gui { UIPageView::UIPageView(): m_nCurPageIdx(0), m_pPages(nullptr), m_tTouchMoveDir(PAGEVIEW_TOUCHLEFT), m_fTouchStartLocation(0.0f), m_fTouchMoveStartLocation(0.0f), m_tMovePagePoint(cocos2d::Point::ZERO), m_pLeftChild(nullptr), m_pRightChild(nullptr), m_fLeftBoundary(0.0f), m_fRightBoundary(0.0f), m_bIsAutoScrolling(false), m_fAutoScrollDistance(0.0f), m_fAutoScrollSpeed(0.0f), m_nAutoScrollDir(0), m_fChildFocusCancelOffset(5.0f), m_pPageViewEventListener(nullptr), m_pPageViewEventSelector(nullptr) { } UIPageView::~UIPageView() { m_pPages->removeAllObjects(); CC_SAFE_RELEASE(m_pPages); m_pPageViewEventListener = nullptr; m_pPageViewEventSelector = nullptr; } UIPageView* UIPageView::create() { UIPageView* widget = new UIPageView(); if (widget && widget->init()) { widget->autorelease(); return widget; } CC_SAFE_DELETE(widget); return nullptr; } bool UIPageView::init() { if (UILayout::init()) { m_pPages = cocos2d::Array::create(); m_pPages->retain(); setClippingEnabled(true); setUpdateEnabled(true); setTouchEnabled(true); return true; } return false; } void UIPageView::addWidgetToPage(UIWidget *widget, int pageIdx, bool forceCreate) { if (!widget) { return; } if (pageIdx < 0) { return; } int pageCount = m_pPages->count(); if (pageIdx < 0 || pageIdx >= pageCount) { if (forceCreate) { if (pageIdx > pageCount) { CCLOG("pageIdx is %d, it will be added as page id [%d]",pageIdx,pageCount); } UILayout* newPage = createPage(); newPage->addChild(widget); addPage(newPage); } } else { UILayout * page = dynamic_cast<UILayout*>(m_pPages->getObjectAtIndex(pageIdx)); if (page) { page->addChild(widget); } } } UILayout* UIPageView::createPage() { UILayout* newPage = UILayout::create(); newPage->setSize(getSize()); return newPage; } void UIPageView::addPage(UILayout* page) { if (!page) { return; } if (page->getWidgetType() != WidgetTypeContainer) { return; } if (m_pPages->containsObject(page)) { return; } cocos2d::Size pSize = page->getSize(); cocos2d::Size pvSize = getSize(); if (!pSize.equals(pvSize)) { CCLOG("page size does not match pageview size, it will be force sized!"); page->setSize(pvSize); } page->setPosition(cocos2d::Point(getPositionXByIndex(m_pPages->count()), 0)); m_pPages->addObject(page); addChild(page); updateBoundaryPages(); } void UIPageView::insertPage(UILayout* page, int idx) { if (idx < 0) { return; } if (!page) { return; } if (page->getWidgetType() != WidgetTypeContainer) { return; } if (m_pPages->containsObject(page)) { return; } int pageCount = m_pPages->count(); if (idx >= pageCount) { addPage(page); } else { m_pPages->insertObject(page, idx); page->setPosition(cocos2d::Point(getPositionXByIndex(idx), 0)); addChild(page); cocos2d::Size pSize = page->getSize(); cocos2d::Size pvSize = getSize(); if (!pSize.equals(pvSize)) { CCLOG("page size does not match pageview size, it will be force sized!"); page->setSize(pvSize); } cocos2d::ccArray* arrayPages = m_pPages->data; int length = arrayPages->num; for (int i=(idx+1); i<length; i++) { UIWidget* behindPage = dynamic_cast<UIWidget*>(arrayPages->arr[i]); cocos2d::Point formerPos = behindPage->getPosition(); behindPage->setPosition(cocos2d::Point(formerPos.x+getSize().width, 0)); } updateBoundaryPages(); } } void UIPageView::removePage(UILayout* page) { if (!page) { return; } removeChild(page); updateChildrenPosition(); updateBoundaryPages(); } void UIPageView::removePageAtIndex(int index) { if (index < 0 || index >= (int)(m_pPages->count())) { return; } UILayout* page = dynamic_cast<UILayout*>(m_pPages->getObjectAtIndex(index)); if (page) { removePage(page); } } void UIPageView::removeAllPages() { removeAllChildren(); } void UIPageView::updateBoundaryPages() { if (m_pPages->count() <= 0) { m_pLeftChild = nullptr; m_pRightChild = nullptr; return; } m_pLeftChild = dynamic_cast<UIWidget*>(m_pPages->getObjectAtIndex(0)); m_pRightChild = dynamic_cast<UIWidget*>(m_pPages->getLastObject()); } float UIPageView::getPositionXByIndex(int idx) { return (getSize().width*(idx-m_nCurPageIdx)); } bool UIPageView::addChild(UIWidget* widget) { return UILayout::addChild(widget); } bool UIPageView::removeChild(UIWidget* widget) { if (m_pPages->containsObject(widget)) { m_pPages->removeObject(widget); } return UILayout::removeChild(widget); } void UIPageView::onSizeChanged() { UILayout::onSizeChanged(); m_fRightBoundary = getSize().width; updateChildrenSize(); updateChildrenPosition(); } void UIPageView::updateChildrenSize() { if (!m_pPages) { return; } cocos2d::Size selfSize = getSize(); for (long i=0; i<m_pPages->count(); i++) { UILayout* page = dynamic_cast<UILayout*>(m_pPages->getObjectAtIndex(i)); page->setSize(selfSize); } } void UIPageView::updateChildrenPosition() { if (!m_pPages) { return; } int pageCount = m_pPages->data->num; if (pageCount <= 0) { m_nCurPageIdx = 0; return; } if (m_nCurPageIdx >= pageCount) { m_nCurPageIdx = pageCount-1; } float pageWidth = getSize().width; cocos2d::ccArray* arrayPages = m_pPages->data; for (int i=0; i<pageCount; i++) { UILayout* page = dynamic_cast<UILayout*>(arrayPages->arr[i]); page->setPosition(cocos2d::Point((i-m_nCurPageIdx)*pageWidth, 0)); } } void UIPageView::removeAllChildren() { m_pPages->removeAllObjects(); UILayout::removeAllChildren(); } void UIPageView::scrollToPage(int idx) { if (idx < 0 || idx >= (int)(m_pPages->count())) { return; } m_nCurPageIdx = idx; UIWidget* curPage = dynamic_cast<UIWidget*>(m_pPages->getObjectAtIndex(idx)); m_fAutoScrollDistance = -(curPage->getPosition().x); m_fAutoScrollSpeed = kdFabsf(m_fAutoScrollDistance)/0.2f; m_nAutoScrollDir = m_fAutoScrollDistance > 0 ? 1 : 0; m_bIsAutoScrolling = true; } void UIPageView::update(float dt) { if (m_bIsAutoScrolling) { switch (m_nAutoScrollDir) { case 0: { float step = m_fAutoScrollSpeed*dt; if (m_fAutoScrollDistance + step >= 0.0f) { step = -m_fAutoScrollDistance; m_fAutoScrollDistance = 0.0f; m_bIsAutoScrolling = false; } else { m_fAutoScrollDistance += step; } scrollPages(-step); if (!m_bIsAutoScrolling) { pageTurningEvent(); } break; } break; case 1: { float step = m_fAutoScrollSpeed*dt; if (m_fAutoScrollDistance - step <= 0.0f) { step = m_fAutoScrollDistance; m_fAutoScrollDistance = 0.0f; m_bIsAutoScrolling = false; } else { m_fAutoScrollDistance -= step; } scrollPages(step); if (!m_bIsAutoScrolling) { pageTurningEvent(); } break; } default: break; } } } bool UIPageView::onTouchBegan(const cocos2d::Point &touchPoint) { bool pass = UILayout::onTouchBegan(touchPoint); handlePressLogic(touchPoint); return pass; } void UIPageView::onTouchMoved(const cocos2d::Point &touchPoint) { m_tTouchMovePos.x = touchPoint.x; m_tTouchMovePos.y = touchPoint.y; handleMoveLogic(touchPoint); if (m_pWidgetParent) { m_pWidgetParent->checkChildInfo(1,this,touchPoint); } moveEvent(); if (!hitTest(touchPoint)) { setFocused(false); onTouchEnded(touchPoint); } } void UIPageView::onTouchEnded(const cocos2d::Point &touchPoint) { UILayout::onTouchEnded(touchPoint); handleReleaseLogic(touchPoint); } void UIPageView::movePages(float offset) { cocos2d::ccArray* arrayPages = m_pPages->data; int length = arrayPages->num; for (int i = 0; i < length; i++) { UIWidget* child = (UIWidget*)(arrayPages->arr[i]); m_tMovePagePoint.x = child->getPosition().x + offset; m_tMovePagePoint.y = child->getPosition().y; child->setPosition(m_tMovePagePoint); } } bool UIPageView::scrollPages(float touchOffset) { if (m_pPages->count() <= 0) { return false; } if (!m_pLeftChild || !m_pRightChild) { return false; } float realOffset = touchOffset; switch (m_tTouchMoveDir) { case PAGEVIEW_TOUCHLEFT: // left if (m_pRightChild->getRightInParent() + touchOffset <= m_fRightBoundary) { realOffset = m_fRightBoundary - m_pRightChild->getRightInParent(); movePages(realOffset); return false; } break; case PAGEVIEW_TOUCHRIGHT: // right if (m_pLeftChild->getLeftInParent() + touchOffset >= m_fLeftBoundary) { realOffset = m_fLeftBoundary - m_pLeftChild->getLeftInParent(); movePages(realOffset); return false; } break; default: break; } movePages(realOffset); return true; } void UIPageView::onTouchCancelled(const cocos2d::Point &touchPoint) { UILayout::onTouchCancelled(touchPoint); } void UIPageView::handlePressLogic(const cocos2d::Point &touchPoint) { cocos2d::Point nsp = m_pRenderer->convertToNodeSpace(touchPoint); m_fTouchMoveStartLocation = nsp.x; m_fTouchStartLocation = nsp.x; } void UIPageView::handleMoveLogic(const cocos2d::Point &touchPoint) { cocos2d::Point nsp = m_pRenderer->convertToNodeSpace(touchPoint); float offset = 0.0; float moveX = nsp.x; offset = moveX - m_fTouchMoveStartLocation; m_fTouchMoveStartLocation = moveX; if (offset < 0) { m_tTouchMoveDir = PAGEVIEW_TOUCHLEFT; } else if (offset > 0) { m_tTouchMoveDir = PAGEVIEW_TOUCHRIGHT; } scrollPages(offset); } void UIPageView::handleReleaseLogic(const cocos2d::Point &touchPoint) { if (m_pPages->count() <= 0) { return; } UIWidget* curPage = dynamic_cast<UIWidget*>(m_pPages->getObjectAtIndex(m_nCurPageIdx)); if (curPage) { cocos2d::Point curPagePos = curPage->getPosition(); int pageCount = m_pPages->count(); float curPageLocation = curPagePos.x; float pageWidth = getSize().width; float boundary = pageWidth/2.0f; if (curPageLocation <= -boundary) { if (m_nCurPageIdx >= pageCount-1) { scrollPages(-curPageLocation); } else { scrollToPage(m_nCurPageIdx+1); } } else if (curPageLocation >= boundary) { if (m_nCurPageIdx <= 0) { scrollPages(-curPageLocation); } else { scrollToPage(m_nCurPageIdx-1); } } else { scrollToPage(m_nCurPageIdx); } } } void UIPageView::checkChildInfo(int handleState,UIWidget* sender, const cocos2d::Point &touchPoint) { interceptTouchEvent(handleState, sender, touchPoint); } void UIPageView::interceptTouchEvent(int handleState, UIWidget *sender, const cocos2d::Point &touchPoint) { switch (handleState) { case 0: handlePressLogic(touchPoint); break; case 1: { float offset = 0; offset = kdFabsf(sender->getTouchStartPos().x - touchPoint.x); if (offset > m_fChildFocusCancelOffset) { sender->setFocused(false); handleMoveLogic(touchPoint); } } break; case 2: handleReleaseLogic(touchPoint); break; case 3: break; } } void UIPageView::pageTurningEvent() { if (m_pPageViewEventListener && m_pPageViewEventSelector) { (m_pPageViewEventListener->*m_pPageViewEventSelector)(this, PAGEVIEW_EVENT_TURNING); } } void UIPageView::addEventListenerPageView(cocos2d::Object *target, SEL_PageViewEvent selector) { m_pPageViewEventListener = target; m_pPageViewEventSelector = selector; } int UIPageView::getCurPageIndex() const { return m_nCurPageIdx; } cocos2d::Array* UIPageView::getPages() { return m_pPages; } UILayout* UIPageView::getPage(int index) { if (index < 0 || index >= (int)(m_pPages->count())) { return nullptr; } return (UILayout*)m_pPages->getObjectAtIndex(index); } const char* UIPageView::getDescription() const { return "PageView"; } UIWidget* UIPageView::createCloneInstance() { return UIPageView::create(); } void UIPageView::copyClonedWidgetChildren(UIWidget* model) { cocos2d::ccArray* arrayPages = dynamic_cast<UIPageView*>(model)->getPages()->data; int length = arrayPages->num; for (int i=0; i<length; i++) { UILayout* page = (UILayout*)(arrayPages->arr[i]); addPage(dynamic_cast<UILayout*>(page->clone())); } } void UIPageView::copySpecialProperties(UIWidget *widget) { UIPageView* pageView = dynamic_cast<UIPageView*>(widget); if (pageView) { UILayout::copySpecialProperties(widget); } } }
[ "mcodegeeks@gmail.com" ]
mcodegeeks@gmail.com
2d72564063851875145b0cd584558f95039971ab
168c5f2a6fe57257185e975c1270fb9f21341cf8
/Phi/StPhiDownMaker/StPhiDownMakerDict.cc
781068e50a30c2ff3adf78d20bbbf5be40f10f0b
[]
no_license
wenliwen64/Omg_Phi_15GeV
ec11afcdf3a6879af9ce9b008037a654ca7e6f08
b2558b295e1823943dd5c049112738850625e021
refs/heads/master
2016-09-16T15:02:17.314763
2016-01-26T23:31:54
2016-01-26T23:31:54
34,693,424
0
0
null
null
null
null
UTF-8
C++
false
false
62,439
cc
// // File generated by rootcint at Wed Nov 25 19:44:53 2015 // Do NOT change. Changes will be lost next time file is generated // #define R__DICTIONARY_FILENAME StPhiDownMakerDict #include "RConfig.h" //rootcint 4834 #if !defined(R__ACCESS_IN_SYMBOL) //Break the privacy of classes -- Disabled for the moment #define private public #define protected public #endif // Since CINT ignores the std namespace, we need to do so in this file. namespace std {} using namespace std; #include "StPhiDownMakerDict.h" #include "TClass.h" #include "TBuffer.h" #include "TMemberInspector.h" #include "TInterpreter.h" #include "TVirtualMutex.h" #include "TError.h" #ifndef G__ROOT #define G__ROOT #endif #include "RtypesImp.h" #include "TIsAProxy.h" #include "TFileMergeInfo.h" // Direct notice to TROOT of the dictionary's loading. namespace { static struct DictInit { DictInit() { ROOT::RegisterModule(); } } __TheDictionaryInitializer; } // START OF SHADOWS namespace ROOTShadow { namespace Shadow { } // of namespace Shadow } // of namespace ROOTShadow // END OF SHADOWS namespace ROOTDict { void StPhiDownMaker_ShowMembers(void *obj, TMemberInspector &R__insp); static void delete_StPhiDownMaker(void *p); static void deleteArray_StPhiDownMaker(void *p); static void destruct_StPhiDownMaker(void *p); static void streamer_StPhiDownMaker(TBuffer &buf, void *obj); // Function generating the singleton type initializer static ROOT::TGenericClassInfo *GenerateInitInstanceLocal(const ::StPhiDownMaker*) { ::StPhiDownMaker *ptr = 0; static ::TVirtualIsAProxy* isa_proxy = new ::TInstrumentedIsAProxy< ::StPhiDownMaker >(0); static ::ROOT::TGenericClassInfo instance("StPhiDownMaker", ::StPhiDownMaker::Class_Version(), "./StPhiDownMaker.hh", 9, typeid(::StPhiDownMaker), ::ROOT::DefineBehavior(ptr, ptr), &::StPhiDownMaker::Dictionary, isa_proxy, 0, sizeof(::StPhiDownMaker) ); instance.SetDelete(&delete_StPhiDownMaker); instance.SetDeleteArray(&deleteArray_StPhiDownMaker); instance.SetDestructor(&destruct_StPhiDownMaker); instance.SetStreamerFunc(&streamer_StPhiDownMaker); return &instance; } ROOT::TGenericClassInfo *GenerateInitInstance(const ::StPhiDownMaker*) { return GenerateInitInstanceLocal((::StPhiDownMaker*)0); } // Static variable to force the class initialization static ::ROOT::TGenericClassInfo *_R__UNIQUE_(Init) = GenerateInitInstanceLocal((const ::StPhiDownMaker*)0x0); R__UseDummy(_R__UNIQUE_(Init)); } // end of namespace ROOTDict //______________________________________________________________________________ atomic_TClass_ptr StPhiDownMaker::fgIsA(0); // static to hold class pointer //______________________________________________________________________________ const char *StPhiDownMaker::Class_Name() { return "StPhiDownMaker"; } //______________________________________________________________________________ const char *StPhiDownMaker::ImplFileName() { return ::ROOTDict::GenerateInitInstanceLocal((const ::StPhiDownMaker*)0x0)->GetImplFileName(); } //______________________________________________________________________________ int StPhiDownMaker::ImplFileLine() { return ::ROOTDict::GenerateInitInstanceLocal((const ::StPhiDownMaker*)0x0)->GetImplFileLine(); } //______________________________________________________________________________ void StPhiDownMaker::Dictionary() { fgIsA = ::ROOTDict::GenerateInitInstanceLocal((const ::StPhiDownMaker*)0x0)->GetClass(); } //______________________________________________________________________________ TClass *StPhiDownMaker::Class() { if (!fgIsA) { R__LOCKGUARD2(gCINTMutex); if(!fgIsA) {fgIsA = ::ROOTDict::GenerateInitInstanceLocal((const ::StPhiDownMaker*)0x0)->GetClass();} } return fgIsA; } //______________________________________________________________________________ void StPhiDownMaker::Streamer(TBuffer &R__b) { // Stream an object of class StPhiDownMaker. UInt_t R__s, R__c; if (R__b.IsReading()) { Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { } TObject::Streamer(R__b); R__b >> mDatFile; R__b >> mLevy; R__b >> mLevyPt; R__b >> mLevyPt2; R__b >> mTotal; R__b >> mBW; R__b >> mPolyBg; int R__i; for (R__i = 0; R__i < 9; R__i++) R__b >> mHFpEffFine[R__i]; for (R__i = 0; R__i < 9; R__i++) R__b >> mHExpEffFine[R__i]; for (int R__i0=0; R__i0<9; ++R__i0 ) { TString R__str; R__str.Streamer(R__b); mCentString[R__i0] = R__str.Data();} for (int R__i0=0; R__i0<9; ++R__i0 ) { TString R__str; R__str.Streamer(R__b); mCentStringBES[R__i0] = R__str.Data();} { TString R__str; R__str.Streamer(R__b); mParticleType = R__str.Data(); } R__b >> pdgmass_phi; R__b >> mKCentBin; R__b >> mKCentBinBES; R__b >> mKCentBin2; R__b >> mKPtBin; R__b.ReadStaticArray((double*)mNEventsUnweighted); R__b.ReadStaticArray((double*)mNEventsWeighted); R__b.ReadStaticArray((double*)mNEventsWeightedBES); R__b >> mBr; R__b >> mSigRangeLeft; R__b >> mSigRangeRight; R__b >> mMixNormLeftLowB; R__b >> mMixNormLeftHighB; R__b >> mMixNormRightLowB; R__b >> mMixNormRightHighB; R__b.ReadStaticArray((double*)mPtBd); R__b.ReadStaticArray((double*)mPtBdOmg); R__b.ReadStaticArray((double*)mFpEff); R__b.ReadStaticArray((double*)mFpEffError); R__b.ReadStaticArray((double*)mExpEff); R__b.ReadStaticArray((double*)mExpEffError); R__b.ReadStaticArray((double*)mEff); R__b.ReadStaticArray((double*)mEffError); R__b.ReadStaticArray((double*)mMixScale_ratio); R__b.ReadStaticArray((double*)mRawSigCounts); R__b.ReadStaticArray((double*)mRawSigCountsError); R__b.ReadStaticArray((double*)mXRawSpectra); R__b.ReadStaticArray((double*)mXRawSpectraError); R__b.ReadStaticArray((double*)mYRawSpectra); R__b.ReadStaticArray((double*)mYRawSpectraScale); R__b.ReadStaticArray((double*)mYRawSpectraError); R__b.ReadStaticArray((double*)mYRawSpectraErrorScale); R__b.ReadStaticArray((double*)mDptSpectra); R__b.ReadStaticArray((double*)mXCorrSpectra); R__b.ReadStaticArray((double*)mYCorrSpectra); R__b.ReadStaticArray((double*)mYCorrSpectraScale); R__b.ReadStaticArray((double*)mYCorrSpectraError); R__b.ReadStaticArray((double*)mYCorrSpectraErrorScale); R__b.ReadStaticArray((double*)mLevyPar); R__b.ReadStaticArray((double*)mLevyParError); R__b.ReadStaticArray((double*)mInvMassPar); R__b.ReadStaticArray((double*)mInvMassParError); R__b.ReadStaticArray((double*)mDndy); R__b.ReadStaticArray((double*)mDndyError); R__b.ReadStaticArray((double*)mDndyFit); R__b.ReadStaticArray((double*)mRawSigCountsBES); R__b.ReadStaticArray((double*)mCorrSigCountsBES); R__b.ReadStaticArray((double*)mRawSigCountsBESError); R__b.ReadStaticArray((double*)mCorrSigCountsBESError); R__b.ReadStaticArray((double*)mXRawSpectraBES); R__b.ReadStaticArray((double*)mXRawSpectraBESError); R__b.ReadStaticArray((double*)mYRawSpectraBES); R__b.ReadStaticArray((double*)mYRawSpectraBESScale); R__b.ReadStaticArray((double*)mYRawSpectraBESError); R__b.ReadStaticArray((double*)mYRawSpectraBESErrorScale); R__b.ReadStaticArray((double*)mXCorrSpectraBES); R__b.ReadStaticArray((double*)mYCorrSpectraBES); R__b.ReadStaticArray((double*)mYCorrSpectraBESScale); R__b.ReadStaticArray((double*)mYCorrSpectraBESError); R__b.ReadStaticArray((double*)mYCorrSpectraBESErrorScale); R__b.ReadStaticArray((double*)mLevyParBES); R__b.ReadStaticArray((double*)mLevyParBESError); R__b.ReadStaticArray((double*)mDndyBES); R__b.ReadStaticArray((double*)mDndyBESError); R__b.ReadStaticArray((double*)mDndyFitBES); R__b.ReadStaticArray((double*)mPhiYields010); R__b.ReadStaticArray((double*)mOmgYields010); R__b.ReadStaticArray((double*)mAntiOmgYields010); R__b.ReadStaticArray((double*)mXRawSpectraOmg); R__b.ReadStaticArray((double*)mOmgPhiRatio010); R__b.ReadStaticArray((double*)mRcp); R__b.ReadStaticArray((double*)mNColl); R__b.ReadStaticArray((double*)mNCollError); R__b.ReadStaticArray((double*)mNCollBES); R__b.ReadStaticArray((double*)mNCollErrorBES); R__b.CheckByteCount(R__s, R__c, StPhiDownMaker::IsA()); } else { R__c = R__b.WriteVersion(StPhiDownMaker::IsA(), kTRUE); TObject::Streamer(R__b); R__b << mDatFile; R__b << mLevy; R__b << mLevyPt; R__b << mLevyPt2; R__b << mTotal; R__b << mBW; R__b << mPolyBg; int R__i; for (R__i = 0; R__i < 9; R__i++) R__b << (TObject*)mHFpEffFine[R__i]; for (R__i = 0; R__i < 9; R__i++) R__b << (TObject*)mHExpEffFine[R__i]; for (int R__i0=0; R__i0<9; ++R__i0 ) { TString R__str(mCentString[R__i0].c_str()); R__str.Streamer(R__b);} for (int R__i0=0; R__i0<9; ++R__i0 ) { TString R__str(mCentStringBES[R__i0].c_str()); R__str.Streamer(R__b);} { TString R__str = mParticleType.c_str(); R__str.Streamer(R__b);} R__b << pdgmass_phi; R__b << mKCentBin; R__b << mKCentBinBES; R__b << mKCentBin2; R__b << mKPtBin; R__b.WriteArray(mNEventsUnweighted, 9); R__b.WriteArray(mNEventsWeighted, 9); R__b.WriteArray(mNEventsWeightedBES, 6); R__b << mBr; R__b << mSigRangeLeft; R__b << mSigRangeRight; R__b << mMixNormLeftLowB; R__b << mMixNormLeftHighB; R__b << mMixNormRightLowB; R__b << mMixNormRightHighB; R__b.WriteArray(mPtBd, 12); R__b.WriteArray(mPtBdOmg, 7); R__b.WriteArray((double*)mFpEff, 99); R__b.WriteArray((double*)mFpEffError, 99); R__b.WriteArray((double*)mExpEff, 99); R__b.WriteArray((double*)mExpEffError, 99); R__b.WriteArray((double*)mEff, 99); R__b.WriteArray((double*)mEffError, 99); R__b.WriteArray((double*)mMixScale_ratio, 99); R__b.WriteArray((double*)mRawSigCounts, 99); R__b.WriteArray((double*)mRawSigCountsError, 99); R__b.WriteArray(mXRawSpectra, 11); R__b.WriteArray(mXRawSpectraError, 11); R__b.WriteArray((double*)mYRawSpectra, 99); R__b.WriteArray((double*)mYRawSpectraScale, 99); R__b.WriteArray((double*)mYRawSpectraError, 99); R__b.WriteArray((double*)mYRawSpectraErrorScale, 99); R__b.WriteArray(mDptSpectra, 11); R__b.WriteArray((double*)mXCorrSpectra, 99); R__b.WriteArray((double*)mYCorrSpectra, 99); R__b.WriteArray((double*)mYCorrSpectraScale, 99); R__b.WriteArray((double*)mYCorrSpectraError, 99); R__b.WriteArray((double*)mYCorrSpectraErrorScale, 99); R__b.WriteArray((double*)mLevyPar, 27); R__b.WriteArray((double*)mLevyParError, 27); R__b.WriteArray((double*)mInvMassPar, 297); R__b.WriteArray((double*)mInvMassParError, 297); R__b.WriteArray(mDndy, 9); R__b.WriteArray(mDndyError, 9); R__b.WriteArray(mDndyFit, 9); R__b.WriteArray((double*)mRawSigCountsBES, 66); R__b.WriteArray((double*)mCorrSigCountsBES, 66); R__b.WriteArray((double*)mRawSigCountsBESError, 66); R__b.WriteArray((double*)mCorrSigCountsBESError, 66); R__b.WriteArray(mXRawSpectraBES, 11); R__b.WriteArray(mXRawSpectraBESError, 11); R__b.WriteArray((double*)mYRawSpectraBES, 66); R__b.WriteArray((double*)mYRawSpectraBESScale, 66); R__b.WriteArray((double*)mYRawSpectraBESError, 66); R__b.WriteArray((double*)mYRawSpectraBESErrorScale, 66); R__b.WriteArray((double*)mXCorrSpectraBES, 66); R__b.WriteArray((double*)mYCorrSpectraBES, 66); R__b.WriteArray((double*)mYCorrSpectraBESScale, 66); R__b.WriteArray((double*)mYCorrSpectraBESError, 66); R__b.WriteArray((double*)mYCorrSpectraBESErrorScale, 66); R__b.WriteArray((double*)mLevyParBES, 18); R__b.WriteArray((double*)mLevyParBESError, 18); R__b.WriteArray(mDndyBES, 6); R__b.WriteArray(mDndyBESError, 6); R__b.WriteArray(mDndyFitBES, 6); R__b.WriteArray(mPhiYields010, 6); R__b.WriteArray(mOmgYields010, 6); R__b.WriteArray(mAntiOmgYields010, 6); R__b.WriteArray(mXRawSpectraOmg, 6); R__b.WriteArray(mOmgPhiRatio010, 6); R__b.WriteArray(mRcp, 11); R__b.WriteArray(mNColl, 9); R__b.WriteArray(mNCollError, 9); R__b.WriteArray(mNCollBES, 6); R__b.WriteArray(mNCollErrorBES, 6); R__b.SetByteCount(R__c, kTRUE); } } //______________________________________________________________________________ void StPhiDownMaker::ShowMembers(TMemberInspector &R__insp) { // Inspect the data members of an object of class StPhiDownMaker. TClass *R__cl = ::StPhiDownMaker::IsA(); if (R__cl || R__insp.IsA()) { } R__insp.Inspect(R__cl, R__insp.GetParent(), "*mDatFile", &mDatFile); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mLevy", &mLevy); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mLevyPt", &mLevyPt); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mLevyPt2", &mLevyPt2); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mTotal", &mTotal); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mBW", &mBW); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mPolyBg", &mPolyBg); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mHFpEffFine[9]", &mHFpEffFine); R__insp.Inspect(R__cl, R__insp.GetParent(), "*mHExpEffFine[9]", &mHExpEffFine); R__insp.Inspect(R__cl, R__insp.GetParent(), "mCentString[9]", mCentString); R__insp.Inspect(R__cl, R__insp.GetParent(), "mCentStringBES[9]", mCentStringBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mParticleType", (void*)&mParticleType); R__insp.InspectMember("string", (void*)&mParticleType, "mParticleType.", false); R__insp.Inspect(R__cl, R__insp.GetParent(), "pdgmass_phi", &pdgmass_phi); R__insp.Inspect(R__cl, R__insp.GetParent(), "mKCentBin", &mKCentBin); R__insp.Inspect(R__cl, R__insp.GetParent(), "mKCentBinBES", &mKCentBinBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mKCentBin2", &mKCentBin2); R__insp.Inspect(R__cl, R__insp.GetParent(), "mKPtBin", &mKPtBin); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNEventsUnweighted[9]", mNEventsUnweighted); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNEventsWeighted[9]", mNEventsWeighted); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNEventsWeightedBES[6]", mNEventsWeightedBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mBr", &mBr); R__insp.Inspect(R__cl, R__insp.GetParent(), "mSigRangeLeft", &mSigRangeLeft); R__insp.Inspect(R__cl, R__insp.GetParent(), "mSigRangeRight", &mSigRangeRight); R__insp.Inspect(R__cl, R__insp.GetParent(), "mMixNormLeftLowB", &mMixNormLeftLowB); R__insp.Inspect(R__cl, R__insp.GetParent(), "mMixNormLeftHighB", &mMixNormLeftHighB); R__insp.Inspect(R__cl, R__insp.GetParent(), "mMixNormRightLowB", &mMixNormRightLowB); R__insp.Inspect(R__cl, R__insp.GetParent(), "mMixNormRightHighB", &mMixNormRightHighB); R__insp.Inspect(R__cl, R__insp.GetParent(), "mPtBd[12]", mPtBd); R__insp.Inspect(R__cl, R__insp.GetParent(), "mPtBdOmg[7]", mPtBdOmg); R__insp.Inspect(R__cl, R__insp.GetParent(), "mFpEff[9][11]", mFpEff); R__insp.Inspect(R__cl, R__insp.GetParent(), "mFpEffError[9][11]", mFpEffError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mExpEff[9][11]", mExpEff); R__insp.Inspect(R__cl, R__insp.GetParent(), "mExpEffError[9][11]", mExpEffError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mEff[9][11]", mEff); R__insp.Inspect(R__cl, R__insp.GetParent(), "mEffError[9][11]", mEffError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mMixScale_ratio[9][11]", mMixScale_ratio); R__insp.Inspect(R__cl, R__insp.GetParent(), "mRawSigCounts[9][11]", mRawSigCounts); R__insp.Inspect(R__cl, R__insp.GetParent(), "mRawSigCountsError[9][11]", mRawSigCountsError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXRawSpectra[11]", mXRawSpectra); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXRawSpectraError[11]", mXRawSpectraError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectra[9][11]", mYRawSpectra); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraScale[9][11]", mYRawSpectraScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraError[9][11]", mYRawSpectraError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraErrorScale[9][11]", mYRawSpectraErrorScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDptSpectra[11]", mDptSpectra); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXCorrSpectra[9][11]", mXCorrSpectra); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectra[9][11]", mYCorrSpectra); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraScale[9][11]", mYCorrSpectraScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraError[9][11]", mYCorrSpectraError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraErrorScale[9][11]", mYCorrSpectraErrorScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mLevyPar[9][3]", mLevyPar); R__insp.Inspect(R__cl, R__insp.GetParent(), "mLevyParError[9][3]", mLevyParError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mInvMassPar[3][9][11]", mInvMassPar); R__insp.Inspect(R__cl, R__insp.GetParent(), "mInvMassParError[3][9][11]", mInvMassParError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDndy[9]", mDndy); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDndyError[9]", mDndyError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDndyFit[9]", mDndyFit); R__insp.Inspect(R__cl, R__insp.GetParent(), "mRawSigCountsBES[6][11]", mRawSigCountsBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mCorrSigCountsBES[6][11]", mCorrSigCountsBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mRawSigCountsBESError[6][11]", mRawSigCountsBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mCorrSigCountsBESError[6][11]", mCorrSigCountsBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXRawSpectraBES[11]", mXRawSpectraBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXRawSpectraBESError[11]", mXRawSpectraBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraBES[6][11]", mYRawSpectraBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraBESScale[6][11]", mYRawSpectraBESScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraBESError[6][11]", mYRawSpectraBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYRawSpectraBESErrorScale[6][11]", mYRawSpectraBESErrorScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXCorrSpectraBES[6][11]", mXCorrSpectraBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraBES[6][11]", mYCorrSpectraBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraBESScale[6][11]", mYCorrSpectraBESScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraBESError[6][11]", mYCorrSpectraBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mYCorrSpectraBESErrorScale[6][11]", mYCorrSpectraBESErrorScale); R__insp.Inspect(R__cl, R__insp.GetParent(), "mLevyParBES[6][3]", mLevyParBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mLevyParBESError[6][3]", mLevyParBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDndyBES[6]", mDndyBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDndyBESError[6]", mDndyBESError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mDndyFitBES[6]", mDndyFitBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mPhiYields010[6]", mPhiYields010); R__insp.Inspect(R__cl, R__insp.GetParent(), "mOmgYields010[6]", mOmgYields010); R__insp.Inspect(R__cl, R__insp.GetParent(), "mAntiOmgYields010[6]", mAntiOmgYields010); R__insp.Inspect(R__cl, R__insp.GetParent(), "mXRawSpectraOmg[6]", mXRawSpectraOmg); R__insp.Inspect(R__cl, R__insp.GetParent(), "mOmgPhiRatio010[6]", mOmgPhiRatio010); R__insp.Inspect(R__cl, R__insp.GetParent(), "mRcp[11]", mRcp); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNColl[9]", mNColl); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNCollError[9]", mNCollError); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNCollBES[6]", mNCollBES); R__insp.Inspect(R__cl, R__insp.GetParent(), "mNCollErrorBES[6]", mNCollErrorBES); TObject::ShowMembers(R__insp); } namespace ROOTDict { // Wrapper around operator delete static void delete_StPhiDownMaker(void *p) { delete ((::StPhiDownMaker*)p); } static void deleteArray_StPhiDownMaker(void *p) { delete [] ((::StPhiDownMaker*)p); } static void destruct_StPhiDownMaker(void *p) { typedef ::StPhiDownMaker current_t; ((current_t*)p)->~current_t(); } // Wrapper around a custom streamer member function. static void streamer_StPhiDownMaker(TBuffer &buf, void *obj) { ((::StPhiDownMaker*)obj)->::StPhiDownMaker::Streamer(buf); } } // end of namespace ROOTDict for class ::StPhiDownMaker /******************************************************** * StPhiDownMakerDict.cc * CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED * FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX(). * CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE. ********************************************************/ #ifdef G__MEMTEST #undef malloc #undef free #endif #if defined(__GNUC__) && __GNUC__ >= 4 && ((__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >= 1) || (__GNUC_MINOR__ >= 3)) #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif extern "C" void G__cpp_reset_tagtableStPhiDownMakerDict(); extern "C" void G__set_cpp_environmentStPhiDownMakerDict() { G__add_compiledheader("TObject.h"); G__add_compiledheader("TMemberInspector.h"); G__add_compiledheader("StPhiDownMaker.hh"); G__cpp_reset_tagtableStPhiDownMakerDict(); } #include <new> extern "C" int G__cpp_dllrevStPhiDownMakerDict() { return(30051515); } /********************************************************* * Member function Interface Method *********************************************************/ /* StPhiDownMaker */ static int G__StPhiDownMakerDict_275_0_33(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { StPhiDownMaker* p = NULL; char* gvp = (char*) G__getgvp(); //m: 1 if ((gvp == (char*)G__PVOID) || (gvp == 0)) { p = new StPhiDownMaker(*((string*) G__int(libp->para[0]))); } else { p = new((void*) gvp) StPhiDownMaker(*((string*) G__int(libp->para[0]))); } result7->obj.i = (long) p; result7->ref = (long) p; G__set_tagnum(result7,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker)); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_34(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { ((StPhiDownMaker*) G__getstructoffset())->Init(*((string*) G__int(libp->para[0]))); G__setnull(result7); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_35(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { ((StPhiDownMaker*) G__getstructoffset())->Analyze(); G__setnull(result7); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_36(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { ((StPhiDownMaker*) G__getstructoffset())->AnalyzeBES(); G__setnull(result7); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_37(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 85, (long) StPhiDownMaker::Class()); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_38(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 67, (long) StPhiDownMaker::Class_Name()); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_39(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 115, (long) StPhiDownMaker::Class_Version()); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_40(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { StPhiDownMaker::Dictionary(); G__setnull(result7); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_44(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { ((StPhiDownMaker*) G__getstructoffset())->StreamerNVirtual(*(TBuffer*) libp->para[0].ref); G__setnull(result7); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_45(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 67, (long) StPhiDownMaker::DeclFileName()); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_46(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 105, (long) StPhiDownMaker::ImplFileLine()); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_47(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 67, (long) StPhiDownMaker::ImplFileName()); return(1 || funcname || hash || result7 || libp) ; } static int G__StPhiDownMakerDict_275_0_48(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { G__letint(result7, 105, (long) StPhiDownMaker::DeclFileLine()); return(1 || funcname || hash || result7 || libp) ; } // automatic copy constructor static int G__StPhiDownMakerDict_275_0_49(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { StPhiDownMaker* p; void* tmp = (void*) G__int(libp->para[0]); p = new StPhiDownMaker(*(StPhiDownMaker*) tmp); result7->obj.i = (long) p; result7->ref = (long) p; G__set_tagnum(result7,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker)); return(1 || funcname || hash || result7 || libp) ; } // automatic destructor typedef StPhiDownMaker G__TStPhiDownMaker; static int G__StPhiDownMakerDict_275_0_50(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { char* gvp = (char*) G__getgvp(); long soff = G__getstructoffset(); int n = G__getaryconstruct(); // //has_a_delete: 1 //has_own_delete1arg: 0 //has_own_delete2arg: 0 // if (!soff) { return(1); } if (n) { if (gvp == (char*)G__PVOID) { delete[] (StPhiDownMaker*) soff; } else { G__setgvp((long) G__PVOID); for (int i = n - 1; i >= 0; --i) { ((StPhiDownMaker*) (soff+(sizeof(StPhiDownMaker)*i)))->~G__TStPhiDownMaker(); } G__setgvp((long)gvp); } } else { if (gvp == (char*)G__PVOID) { delete (StPhiDownMaker*) soff; } else { G__setgvp((long) G__PVOID); ((StPhiDownMaker*) (soff))->~G__TStPhiDownMaker(); G__setgvp((long)gvp); } } G__setnull(result7); return(1 || funcname || hash || result7 || libp) ; } // automatic assignment operator static int G__StPhiDownMakerDict_275_0_51(G__value* result7, G__CONST char* funcname, struct G__param* libp, int hash) { StPhiDownMaker* dest = (StPhiDownMaker*) G__getstructoffset(); *dest = *(StPhiDownMaker*) libp->para[0].ref; const StPhiDownMaker& obj = *dest; result7->ref = (long) (&obj); result7->obj.i = (long) (&obj); return(1 || funcname || hash || result7 || libp) ; } /* Setting up global function */ /********************************************************* * Member function Stub *********************************************************/ /* StPhiDownMaker */ /********************************************************* * Global function Stub *********************************************************/ /********************************************************* * Get size of pointer to member function *********************************************************/ class G__Sizep2memfuncStPhiDownMakerDict { public: G__Sizep2memfuncStPhiDownMakerDict(): p(&G__Sizep2memfuncStPhiDownMakerDict::sizep2memfunc) {} size_t sizep2memfunc() { return(sizeof(p)); } private: size_t (G__Sizep2memfuncStPhiDownMakerDict::*p)(); }; size_t G__get_sizep2memfuncStPhiDownMakerDict() { G__Sizep2memfuncStPhiDownMakerDict a; G__setsizep2memfunc((int)a.sizep2memfunc()); return((size_t)a.sizep2memfunc()); } /********************************************************* * virtual base class offset calculation interface *********************************************************/ /* Setting up class inheritance */ /********************************************************* * Inheritance information setup/ *********************************************************/ extern "C" void G__cpp_setup_inheritanceStPhiDownMakerDict() { /* Setting up class inheritance */ if(0==G__getnumbaseclass(G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker))) { StPhiDownMaker *G__Lderived; G__Lderived=(StPhiDownMaker*)0x1000; { TObject *G__Lpbase=(TObject*)G__Lderived; G__inheritance_setup(G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker),G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TObject),(long)G__Lpbase-(long)G__Lderived,1,1); } } } /********************************************************* * typedef information setup/ *********************************************************/ extern "C" void G__cpp_setup_typetableStPhiDownMakerDict() { /* Setting up typedef entry */ G__search_typename2("Version_t",115,-1,0,-1); G__setnewtype(-1,"Class version identifier (short)",0); G__search_typename2("vector<ROOT::TSchemaHelper>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); G__setnewtype(-1,NULL,0); G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR)); G__setnewtype(-1,NULL,0); G__search_typename2("vector<TVirtualArray*>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("reverse_iterator<const_iterator>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); G__setnewtype(-1,NULL,0); G__search_typename2("reverse_iterator<iterator>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR),0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR)); G__setnewtype(-1,NULL,0); G__search_typename2("TVectorT<Float_t>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TVectorTlEfloatgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("TVectorT<Double_t>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TVectorTlEdoublegR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("iterator<std::bidirectional_iterator_tag,TObject*,std::ptrdiff_t,const TObject**,const TObject*&>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("iterator<bidirectional_iterator_tag,TObject*,std::ptrdiff_t,const TObject**,const TObject*&>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("iterator<bidirectional_iterator_tag,TObject*>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("iterator<bidirectional_iterator_tag,TObject*,long>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); G__setnewtype(-1,NULL,0); G__search_typename2("iterator<bidirectional_iterator_tag,TObject*,long,const TObject**>",117,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR),0,-1); G__setnewtype(-1,NULL,0); } /********************************************************* * Data Member information setup/ *********************************************************/ /* Setting up class,struct,union tag member variable */ /* StPhiDownMaker */ static void G__setup_memvarStPhiDownMaker(void) { G__tag_memvar_setup(G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker)); { StPhiDownMaker *p; p=(StPhiDownMaker*)0x1000; if (p) { } G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TFile),-1,-1,4,"mDatFile=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TF1),-1,-1,4,"mLevy=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TF1),-1,-1,4,"mLevyPt=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TF1),-1,-1,4,"mLevyPt2=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TF1),-1,-1,4,"mTotal=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TF1),-1,-1,4,"mBW=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TF1),-1,-1,4,"mPolyBg=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TH1F),-1,-1,4,"mHFpEffFine[9]=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TH1F),-1,-1,4,"mHExpEffFine[9]=",0,(char*)NULL); G__memvar_setup((void*)0,117,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_string),-1,-1,4,"mCentString[9]=",0,(char*)NULL); G__memvar_setup((void*)0,117,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_string),-1,-1,4,"mCentStringBES[9]=",0,(char*)NULL); G__memvar_setup((void*)0,117,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_string),-1,-1,4,"mParticleType=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"pdgmass_phi=",0,(char*)NULL); G__memvar_setup((void*)0,105,0,0,-1,G__defined_typename("Int_t"),-1,4,"mKCentBin=",0,(char*)NULL); G__memvar_setup((void*)0,105,0,0,-1,G__defined_typename("Int_t"),-1,4,"mKCentBinBES=",0,(char*)NULL); G__memvar_setup((void*)0,105,0,0,-1,G__defined_typename("Int_t"),-1,4,"mKCentBin2=",0,"This no of centrality bin is used for Physics Plots"); G__memvar_setup((void*)0,105,0,0,-1,G__defined_typename("Int_t"),-1,4,"mKPtBin=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNEventsUnweighted[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNEventsWeighted[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNEventsWeightedBES[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mBr=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mSigRangeLeft=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mSigRangeRight=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mMixNormLeftLowB=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mMixNormLeftHighB=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mMixNormRightLowB=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mMixNormRightHighB=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mPtBd[12]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mPtBdOmg[7]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mFpEff[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mFpEffError[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mExpEff[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mExpEffError[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mEff[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mEffError[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mMixScale_ratio[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mRawSigCounts[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mRawSigCountsError[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXRawSpectra[11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXRawSpectraError[11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectra[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraScale[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraError[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraErrorScale[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDptSpectra[11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXCorrSpectra[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectra[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraScale[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraError[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraErrorScale[9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mLevyPar[9][3]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mLevyParError[9][3]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mInvMassPar[3][9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mInvMassParError[3][9][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDndy[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDndyError[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDndyFit[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mRawSigCountsBES[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mCorrSigCountsBES[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mRawSigCountsBESError[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mCorrSigCountsBESError[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXRawSpectraBES[11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXRawSpectraBESError[11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraBES[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraBESScale[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraBESError[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYRawSpectraBESErrorScale[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXCorrSpectraBES[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraBES[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraBESScale[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraBESError[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mYCorrSpectraBESErrorScale[6][11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mLevyParBES[6][3]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mLevyParBESError[6][3]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDndyBES[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDndyBESError[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mDndyFitBES[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mPhiYields010[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mOmgYields010[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mAntiOmgYields010[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mXRawSpectraOmg[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mOmgPhiRatio010[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mRcp[11]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNColl[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNCollError[9]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNCollBES[6]=",0,(char*)NULL); G__memvar_setup((void*)0,100,0,0,-1,G__defined_typename("Double_t"),-1,4,"mNCollErrorBES[6]=",0,(char*)NULL); G__memvar_setup((void*)0,85,0,0,G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TClass),G__defined_typename("atomic_TClass_ptr"),-2,4,"fgIsA=",0,(char*)NULL); } G__tag_memvar_reset(); } extern "C" void G__cpp_setup_memvarStPhiDownMakerDict() { } /*********************************************************** ************************************************************ ************************************************************ ************************************************************ ************************************************************ ************************************************************ ************************************************************ ***********************************************************/ /********************************************************* * Member function information setup for each class *********************************************************/ static void G__setup_memfuncStPhiDownMaker(void) { /* StPhiDownMaker */ G__tag_memfunc_setup(G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker)); G__memfunc_setup("effInit",709,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("levyInit",852,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("bwFuncInit",1017,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("nEventsInit",1143,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("mixBgAnalysisInit",1743,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compMixNormFactor",1752,(G__InterfaceMethod) NULL, 100, -1, G__defined_typename("Double_t"), 0, 4, 1, 4, 0, "i - 'Int_t' 0 - centbin i - 'Int_t' 0 - ptbin " "U 'TH1F' - 0 - hdat U 'TH1F' - 0 - hrot", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotMixInvMassWithData",2244,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 5, 1, 4, 0, "i - 'Int_t' 0 - centbin i - 'Int_t' 0 - ptbin " "U 'TH1F' - 0 - hdat U 'TH1F' - 0 - hrot " "d - 'Double_t' 0 - scale", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotInvMassAfterBgSubtraction",2985,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 5, 1, 4, 0, "i - 'Int_t' 0 - centbin i - 'Int_t' 0 - ptbin " "U 'TH1F' - 0 - hdat U 'TH1F' - 0 - hrot " "d - 'Double_t' 0 - scale", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotInvMassQA",1298,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compRawSigCounts",1656,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 3, 1, 4, 0, "i - 'Int_t' 0 - centbin i - 'Int_t' 0 - ptbin " "d - 'Double_t' 0 - bin_width", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compRawSigCountsBES",1874,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compRawSpectra",1451,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compRawSpectraBES",1669,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotRawSpectra",1467,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotRawSpectraBES",1685,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("analyzeEff",1029,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", "input: eff, levy; Load efficiency raw data file and apply the cuts; output efficiency data; iteratively compute the data points", (void*) NULL, 0); G__memfunc_setup("getCentString",1345,(G__InterfaceMethod) NULL, 117, G__get_linked_tagnum(&G__StPhiDownMakerDictLN_string), -1, 0, 1, 1, 4, 0, "i - 'Int_t' 0 - -", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotEffLinear",1323,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotEff",720,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("getSpectraWeight",1658,(G__InterfaceMethod) NULL, 100, -1, G__defined_typename("Double_t"), 0, 2, 1, 4, 0, "i - 'Int_t' 0 - - d - 'Double_t' 0 - -", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compCorrSigCountsBES",1982,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compCorrSpectra",1559,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", "input: eff, xpos, levy", (void*) NULL, 0); G__memfunc_setup("compCorrSpectraBES",1777,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", "input: eff, xpos, levy", (void*) NULL, 0); G__memfunc_setup("compDndy",830,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", "Integrate the unmeasured range and add up the measured range.", (void*) NULL, 0); G__memfunc_setup("getDndy",719,(G__InterfaceMethod) NULL, 100, -1, G__defined_typename("Double_t"), 0, 1, 1, 4, 0, "i - 'Int_t' 0 - -", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("getDndyError",1241,(G__InterfaceMethod) NULL, 100, -1, G__defined_typename("Double_t"), 0, 1, 1, 4, 0, "i - 'Int_t' 0 - -", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotCorrSpectra",1575,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotCorrSpectraBES",1793,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("printYieldsBES",1393,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("compAndPlotRcp",1414,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotOmegaPhiRatio",1736,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("plotOmgPhiSpectra010",1894,(G__InterfaceMethod) NULL, 121, -1, -1, 0, 0, 1, 4, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("StPhiDownMaker",1392,G__StPhiDownMakerDict_275_0_33, 105, G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker), -1, 0, 1, 1, 1, 0, "u 'string' - 0 - par_type", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("Init",404,G__StPhiDownMakerDict_275_0_34, 121, -1, -1, 0, 1, 1, 1, 0, "u 'string' - 0 - datfile", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("Analyze",724,G__StPhiDownMakerDict_275_0_35, 121, -1, -1, 0, 0, 1, 1, 0, "", "call analyzeEff(); compCorrSpectra(); analyzeEff()", (void*) NULL, 0); G__memfunc_setup("AnalyzeBES",942,G__StPhiDownMakerDict_275_0_36, 121, -1, -1, 0, 0, 1, 1, 0, "", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("Class",502,G__StPhiDownMakerDict_275_0_37, 85, G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TClass), -1, 0, 0, 3, 1, 0, "", (char*)NULL, (void*) G__func2void( (TClass* (*)())(&StPhiDownMaker::Class) ), 0); G__memfunc_setup("Class_Name",982,G__StPhiDownMakerDict_275_0_38, 67, -1, -1, 0, 0, 3, 1, 1, "", (char*)NULL, (void*) G__func2void( (const char* (*)())(&StPhiDownMaker::Class_Name) ), 0); G__memfunc_setup("Class_Version",1339,G__StPhiDownMakerDict_275_0_39, 115, -1, G__defined_typename("Version_t"), 0, 0, 3, 1, 0, "", (char*)NULL, (void*) G__func2void( (Version_t (*)())(&StPhiDownMaker::Class_Version) ), 0); G__memfunc_setup("Dictionary",1046,G__StPhiDownMakerDict_275_0_40, 121, -1, -1, 0, 0, 3, 1, 0, "", (char*)NULL, (void*) G__func2void( (void (*)())(&StPhiDownMaker::Dictionary) ), 0); G__memfunc_setup("IsA",253,(G__InterfaceMethod) NULL,85, G__get_linked_tagnum(&G__StPhiDownMakerDictLN_TClass), -1, 0, 0, 1, 1, 8, "", (char*)NULL, (void*) NULL, 1); G__memfunc_setup("ShowMembers",1132,(G__InterfaceMethod) NULL,121, -1, -1, 0, 1, 1, 1, 0, "u 'TMemberInspector' - 1 - -", (char*)NULL, (void*) NULL, 1); G__memfunc_setup("Streamer",835,(G__InterfaceMethod) NULL,121, -1, -1, 0, 1, 1, 1, 0, "u 'TBuffer' - 1 - -", (char*)NULL, (void*) NULL, 1); G__memfunc_setup("StreamerNVirtual",1656,G__StPhiDownMakerDict_275_0_44, 121, -1, -1, 0, 1, 1, 1, 0, "u 'TBuffer' - 1 - ClassDef_StreamerNVirtual_b", (char*)NULL, (void*) NULL, 0); G__memfunc_setup("DeclFileName",1145,G__StPhiDownMakerDict_275_0_45, 67, -1, -1, 0, 0, 3, 1, 1, "", (char*)NULL, (void*) G__func2void( (const char* (*)())(&StPhiDownMaker::DeclFileName) ), 0); G__memfunc_setup("ImplFileLine",1178,G__StPhiDownMakerDict_275_0_46, 105, -1, -1, 0, 0, 3, 1, 0, "", (char*)NULL, (void*) G__func2void( (int (*)())(&StPhiDownMaker::ImplFileLine) ), 0); G__memfunc_setup("ImplFileName",1171,G__StPhiDownMakerDict_275_0_47, 67, -1, -1, 0, 0, 3, 1, 1, "", (char*)NULL, (void*) G__func2void( (const char* (*)())(&StPhiDownMaker::ImplFileName) ), 0); G__memfunc_setup("DeclFileLine",1152,G__StPhiDownMakerDict_275_0_48, 105, -1, -1, 0, 0, 3, 1, 0, "", (char*)NULL, (void*) G__func2void( (int (*)())(&StPhiDownMaker::DeclFileLine) ), 0); // automatic copy constructor G__memfunc_setup("StPhiDownMaker", 1392, G__StPhiDownMakerDict_275_0_49, (int) ('i'), G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker), -1, 0, 1, 1, 1, 0, "u 'StPhiDownMaker' - 11 - -", (char*) NULL, (void*) NULL, 0); // automatic destructor G__memfunc_setup("~StPhiDownMaker", 1518, G__StPhiDownMakerDict_275_0_50, (int) ('y'), -1, -1, 0, 0, 1, 1, 0, "", (char*) NULL, (void*) NULL, 1); // automatic assignment operator G__memfunc_setup("operator=", 937, G__StPhiDownMakerDict_275_0_51, (int) ('u'), G__get_linked_tagnum(&G__StPhiDownMakerDictLN_StPhiDownMaker), -1, 1, 1, 1, 1, 0, "u 'StPhiDownMaker' - 11 - -", (char*) NULL, (void*) NULL, 0); G__tag_memfunc_reset(); } /********************************************************* * Member function information setup *********************************************************/ extern "C" void G__cpp_setup_memfuncStPhiDownMakerDict() { } /********************************************************* * Global variable information setup for each class *********************************************************/ static void G__cpp_setup_global0() { /* Setting up global variables */ G__resetplocal(); } static void G__cpp_setup_global1() { } static void G__cpp_setup_global2() { } static void G__cpp_setup_global3() { G__resetglobalenv(); } extern "C" void G__cpp_setup_globalStPhiDownMakerDict() { G__cpp_setup_global0(); G__cpp_setup_global1(); G__cpp_setup_global2(); G__cpp_setup_global3(); } /********************************************************* * Global function information setup for each class *********************************************************/ static void G__cpp_setup_func0() { G__lastifuncposition(); } static void G__cpp_setup_func1() { } static void G__cpp_setup_func2() { } static void G__cpp_setup_func3() { } static void G__cpp_setup_func4() { } static void G__cpp_setup_func5() { } static void G__cpp_setup_func6() { } static void G__cpp_setup_func7() { } static void G__cpp_setup_func8() { } static void G__cpp_setup_func9() { } static void G__cpp_setup_func10() { } static void G__cpp_setup_func11() { } static void G__cpp_setup_func12() { } static void G__cpp_setup_func13() { } static void G__cpp_setup_func14() { G__resetifuncposition(); } extern "C" void G__cpp_setup_funcStPhiDownMakerDict() { G__cpp_setup_func0(); G__cpp_setup_func1(); G__cpp_setup_func2(); G__cpp_setup_func3(); G__cpp_setup_func4(); G__cpp_setup_func5(); G__cpp_setup_func6(); G__cpp_setup_func7(); G__cpp_setup_func8(); G__cpp_setup_func9(); G__cpp_setup_func10(); G__cpp_setup_func11(); G__cpp_setup_func12(); G__cpp_setup_func13(); G__cpp_setup_func14(); } /********************************************************* * Class,struct,union,enum tag information setup *********************************************************/ /* Setup class/struct taginfo */ G__linked_taginfo G__StPhiDownMakerDictLN_TClass = { "TClass" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TBuffer = { "TBuffer" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TMemberInspector = { "TMemberInspector" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TObject = { "TObject" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_string = { "string" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR = { "vector<ROOT::TSchemaHelper,allocator<ROOT::TSchemaHelper> >" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR = { "reverse_iterator<vector<ROOT::TSchemaHelper,allocator<ROOT::TSchemaHelper> >::iterator>" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR = { "vector<TVirtualArray*,allocator<TVirtualArray*> >" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR = { "reverse_iterator<vector<TVirtualArray*,allocator<TVirtualArray*> >::iterator>" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TVectorTlEfloatgR = { "TVectorT<float>" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TVectorTlEdoublegR = { "TVectorT<double>" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TF1 = { "TF1" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TH1F = { "TH1F" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR = { "iterator<bidirectional_iterator_tag,TObject*,long,const TObject**,const TObject*&>" , 115 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_TFile = { "TFile" , 99 , -1 }; G__linked_taginfo G__StPhiDownMakerDictLN_StPhiDownMaker = { "StPhiDownMaker" , 99 , -1 }; /* Reset class/struct taginfo */ extern "C" void G__cpp_reset_tagtableStPhiDownMakerDict() { G__StPhiDownMakerDictLN_TClass.tagnum = -1 ; G__StPhiDownMakerDictLN_TBuffer.tagnum = -1 ; G__StPhiDownMakerDictLN_TMemberInspector.tagnum = -1 ; G__StPhiDownMakerDictLN_TObject.tagnum = -1 ; G__StPhiDownMakerDictLN_string.tagnum = -1 ; G__StPhiDownMakerDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR.tagnum = -1 ; G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR.tagnum = -1 ; G__StPhiDownMakerDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR.tagnum = -1 ; G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR.tagnum = -1 ; G__StPhiDownMakerDictLN_TVectorTlEfloatgR.tagnum = -1 ; G__StPhiDownMakerDictLN_TVectorTlEdoublegR.tagnum = -1 ; G__StPhiDownMakerDictLN_TF1.tagnum = -1 ; G__StPhiDownMakerDictLN_TH1F.tagnum = -1 ; G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR.tagnum = -1 ; G__StPhiDownMakerDictLN_TFile.tagnum = -1 ; G__StPhiDownMakerDictLN_StPhiDownMaker.tagnum = -1 ; } extern "C" void G__cpp_setup_tagtableStPhiDownMakerDict() { /* Setting up class,struct,union tag entry */ G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TClass); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TBuffer); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TMemberInspector); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TObject); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_string); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_vectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_reverse_iteratorlEvectorlETVirtualArraymUcOallocatorlETVirtualArraymUgRsPgRcLcLiteratorgR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TVectorTlEfloatgR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TVectorTlEdoublegR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TF1); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TH1F); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_iteratorlEbidirectional_iterator_tagcOTObjectmUcOlongcOconstsPTObjectmUmUcOconstsPTObjectmUaNgR); G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_TFile); G__tagtable_setup(G__get_linked_tagnum_fwd(&G__StPhiDownMakerDictLN_StPhiDownMaker),sizeof(StPhiDownMaker),-1,62464,(char*)NULL,G__setup_memvarStPhiDownMaker,G__setup_memfuncStPhiDownMaker); } extern "C" void G__cpp_setupStPhiDownMakerDict(void) { G__check_setup_version(30051515,"G__cpp_setupStPhiDownMakerDict()"); G__set_cpp_environmentStPhiDownMakerDict(); G__cpp_setup_tagtableStPhiDownMakerDict(); G__cpp_setup_inheritanceStPhiDownMakerDict(); G__cpp_setup_typetableStPhiDownMakerDict(); G__cpp_setup_memvarStPhiDownMakerDict(); G__cpp_setup_memfuncStPhiDownMakerDict(); G__cpp_setup_globalStPhiDownMakerDict(); G__cpp_setup_funcStPhiDownMakerDict(); if(0==G__getsizep2memfunc()) G__get_sizep2memfuncStPhiDownMakerDict(); return; } class G__cpp_setup_initStPhiDownMakerDict { public: G__cpp_setup_initStPhiDownMakerDict() { G__add_setup_func("StPhiDownMakerDict",(G__incsetup)(&G__cpp_setupStPhiDownMakerDict)); G__call_setup_funcs(); } ~G__cpp_setup_initStPhiDownMakerDict() { G__remove_setup_func("StPhiDownMakerDict"); } }; G__cpp_setup_initStPhiDownMakerDict G__cpp_setup_initializerStPhiDownMakerDict;
[ "wenliwen64@gmail.com" ]
wenliwen64@gmail.com
6b1e5e9463d524b9c7faec461e5d2c4cdd8321b4
85042faf55a9631defeaae6a98f9bf727406daa0
/Classes/UIBase.cpp
7cc148ae4af8a250378bca01e21b654e7d9e00fe
[]
no_license
yongjiangbuaa/BGame2
0af7608dc478d7715c1fca42533d3bc796097723
3d3b28967d36238c38fa5441d551fbf653e20173
refs/heads/master
2021-01-10T00:57:13.424193
2015-10-29T02:39:01
2015-10-29T02:39:01
43,340,362
0
1
null
null
null
null
UTF-8
C++
false
false
989
cpp
// // UIBase.cpp // BGame2 // // Created by gengyj on 15-10-2. // // #include "UIBase.h" NS_B_BEGIN //-----------------baseCCBI 方法 bool UIBase::onAssignCCBMemberVariable(Ref *pTarget, const char *pMemberVariableName, Node *pNode) { return false; } SEL_MenuHandler UIBase::onResolveCCBCCMenuItemSelector(Ref *pTarget, const char *pSelectorName) { CCLOG("read MenuItem selector member %s", pSelectorName); return NULL; } Control::Handler UIBase::onResolveCCBCCControlSelector(Ref *pTarget, const char *pSelectorName) { // CCB_SELECTORRESOLVER_CCCONTROL_GLUE(pTarget, pSelectorName, pTarget::pSelectorName); //获得类属性? CCLOG("read CCControl selector member %s", pSelectorName); return NULL; } void UIBase::onNodeLoaded(Node *pNode, NodeLoader *pNodeLoader) { CCLOG("onNodeLoaded"); } void UIBase::initUIReadOver() { CCLOG("init ui read") ; } //-----------------baseCCBI 方法 void UIBase::initData() { } NS_B_END
[ "gengyongjiang@elex-tech.com" ]
gengyongjiang@elex-tech.com
66f1944b1978c6653e27b9cf285071bb019b6c9d
dafd9610da5b95024ba05bfeae2b8acd119ff64d
/Assignment 2/New folder/2.cpp
9e40f849c06eb226ff8134220ab4d0ad6bbe583d
[]
no_license
devanshpgupta/BioInformatics
deee1a619e996547c333e16a9145e98194cf966c
bd4e8f20fc4cc1c898d5c7407a4f57d3dd694972
refs/heads/master
2021-01-19T10:14:56.594057
2017-04-13T17:07:30
2017-04-13T17:07:30
87,843,658
0
0
null
null
null
null
UTF-8
C++
false
false
610
cpp
#include <stdio.h> #include <string.h> int main() { char a, word[50]; int i, freq = 0, flag = 0; printf("Enter character: "); scanf("%s", &a); printf("Now enter the word: "); scanf("%s", word); printf("Positions of '%c' in %s are: ", a, word); for (i = 0; i < strlen(word); i++) { if (word[i] == a) { flag = 1; printf("%d ", i + 1); freq++; } } if (flag) { printf("\nCharacter '%c' occured for %d times.\n", a, freq); } else { printf("None\n"); } return 0; }
[ "devansh.or.guptaest27@gmail.com" ]
devansh.or.guptaest27@gmail.com
0c8a16ed33275c82e5df48972cdc0e5d3fee9d16
c9cf0586ace11aa32fa67606d237a130a06364ee
/circular-cylinder-2-30/3/p
f6d9b8c385cef431ee5d1c2ffb365a431a4f4532
[]
no_license
jezvonek/CFD-Final-Project
c74cfa21f22545c27d97d85cf30eb6dc8c824dc1
7c9a7fb032d74f20888effa0a0b75b212bf899f4
refs/heads/master
2022-07-05T14:43:52.967657
2020-05-14T03:40:56
2020-05-14T03:40:56
262,370,756
1
1
null
null
null
null
UTF-8
C++
false
false
93,965
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6.0 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "3"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField nonuniform List<scalar> 9600 ( -64.1216 -52.5294 -44.3973 -38.0452 -32.5495 -27.8568 -23.88 -20.504 -17.6347 -15.1951 -13.1195 -11.352 -9.84507 -8.55865 -7.45876 -6.5169 -5.709 -5.01382 -4.41387 -3.90573 -64.2166 -52.6387 -44.5065 -38.1469 -32.6426 -27.9422 -23.9587 -20.5771 -17.7031 -15.2597 -13.181 -11.411 -9.90194 -8.61364 -7.51206 -6.56862 -5.7592 -5.06236 -4.46053 -3.95199 -64.3243 -52.7493 -44.6154 -38.249 -32.7366 -28.0286 -24.0386 -20.6516 -17.7733 -15.3263 -13.2448 -11.4723 -9.96121 -8.67115 -7.56798 -6.62307 -5.8122 -5.11376 -4.51011 -4.00126 -64.4413 -52.8644 -44.7259 -38.3521 -32.8316 -28.1161 -24.1198 -20.7276 -17.8451 -15.3947 -13.3104 -11.5357 -10.0227 -8.73104 -7.62641 -6.68013 -5.86792 -5.16795 -4.56257 -4.05357 -64.5649 -52.9836 -44.8384 -38.4566 -32.9278 -28.2049 -24.2023 -20.8051 -17.9185 -15.4649 -13.3779 -11.6011 -10.0865 -8.7933 -7.68735 -6.73983 -5.92637 -5.22496 -4.61795 -4.10894 -64.6931 -53.1063 -44.9532 -38.5625 -33.0252 -28.2947 -24.286 -20.8838 -17.9932 -15.5366 -13.4472 -11.6685 -10.1523 -8.85778 -7.75066 -6.80205 -5.98748 -5.28473 -4.67621 -4.16736 -64.8249 -53.2318 -45.0699 -38.6698 -33.1236 -28.3856 -24.3707 -20.9636 -18.0693 -15.6097 -13.5181 -11.7376 -10.2199 -8.92431 -7.81619 -6.86665 -6.05113 -5.34718 -4.7373 -4.22878 -64.9596 -53.3596 -45.1881 -38.778 -33.2228 -28.4771 -24.456 -21.0442 -18.1463 -15.6839 -13.5902 -11.8081 -10.2893 -8.99265 -7.88371 -6.93344 -6.11715 -5.41216 -4.80109 -4.29311 -65.0965 -53.489 -45.3075 -38.887 -33.3224 -28.569 -24.5418 -21.1253 -18.2239 -15.7589 -13.6633 -11.8798 -10.3598 -9.06246 -7.95292 -7.00212 -6.18527 -5.47945 -4.86739 -4.36021 -65.2352 -53.6196 -45.4276 -38.9963 -33.4221 -28.6609 -24.6277 -21.2065 -18.3017 -15.8342 -13.7368 -11.9521 -10.4313 -9.13333 -8.0234 -7.07231 -6.25514 -5.54873 -4.93594 -4.42986 -65.3754 -53.7511 -45.548 -39.1055 -33.5215 -28.7524 -24.7131 -21.2874 -18.3792 -15.9094 -13.8104 -12.0245 -10.5031 -9.20474 -8.09465 -7.14353 -6.32632 -5.61959 -5.00636 -4.50171 -65.517 -53.883 -45.6682 -39.2142 -33.6202 -28.843 -24.7976 -21.3674 -18.456 -15.9839 -13.8833 -12.0965 -10.5746 -9.27605 -8.16603 -7.21515 -6.3982 -5.69147 -5.07814 -4.57526 -65.66 -54.015 -45.7879 -39.3219 -33.7175 -28.9322 -24.8807 -21.446 -18.5314 -16.0571 -13.9551 -12.1674 -10.645 -9.34651 -8.23678 -7.28641 -6.47005 -5.76371 -5.15066 -4.65003 -65.8044 -54.1468 -45.9066 -39.4282 -33.8132 -29.0195 -24.9618 -21.5226 -18.6048 -16.1283 -14.0248 -12.2363 -10.7136 -9.41517 -8.3059 -7.35631 -6.5409 -5.83537 -5.22312 -4.72551 -65.9497 -54.2776 -46.0237 -39.5326 -33.9067 -29.1046 -25.0405 -21.5968 -18.6757 -16.1969 -14.0919 -12.3024 -10.7793 -9.48098 -8.37221 -7.4235 -6.60927 -5.90495 -5.29414 -4.80044 -66.0965 -54.407 -46.1386 -39.6347 -33.9976 -29.1868 -25.1163 -21.6679 -18.7434 -16.2622 -14.1555 -12.365 -10.8413 -9.54288 -8.43446 -7.48655 -6.67353 -5.97062 -5.36158 -4.87153 -66.2489 -54.5368 -46.2512 -39.7336 -34.0851 -29.2653 -25.1884 -21.7352 -18.8074 -16.3236 -14.2151 -12.4232 -10.8987 -9.5998 -8.49152 -7.54436 -6.73268 -6.03139 -5.42379 -4.93607 -66.4165 -54.6704 -46.361 -39.8279 -34.1678 -29.3394 -25.2561 -21.7984 -18.867 -16.3806 -14.2698 -12.4761 -10.9502 -9.65031 -8.54168 -7.59508 -6.78492 -6.08556 -5.4801 -4.9997 -66.6 -54.8073 -46.4669 -39.9169 -34.2459 -29.4094 -25.32 -21.8577 -18.9228 -16.4334 -14.3199 -12.5236 -10.9952 -9.6929 -8.58218 -7.63407 -6.82285 -6.12323 -5.52327 -5.06653 -66.7577 -54.9332 -46.5679 -40.0027 -34.3218 -29.4777 -25.3824 -21.9154 -18.9766 -16.4838 -14.367 -12.5674 -11.0352 -9.72868 -8.61295 -7.65845 -6.83851 -6.13015 -5.53191 -5.08535 -67.594 -67.621 -67.6209 -67.6193 -67.6159 -67.6056 -67.5861 -67.5576 -67.5208 -67.4762 -67.4244 -67.3658 -67.3013 -67.2318 -67.1582 -67.0821 -67.0054 -66.9313 -66.8645 -66.8107 -55.6382 -55.6837 -55.712 -55.7318 -55.7437 -55.7461 -55.7382 -55.7205 -55.6941 -55.6594 -55.6172 -55.5681 -55.5129 -55.4524 -55.3875 -55.3193 -55.249 -55.1774 -55.1054 -55.0276 -47.1175 -47.1742 -47.2183 -47.2505 -47.2716 -47.2823 -47.2829 -47.2741 -47.2567 -47.2312 -47.1983 -47.1586 -47.1129 -47.0617 -47.0058 -46.9457 -46.882 -46.8144 -46.7419 -46.6613 -40.4342 -40.4933 -40.5416 -40.578 -40.603 -40.6179 -40.6234 -40.62 -40.6084 -40.5891 -40.5628 -40.5299 -40.4912 -40.4472 -40.3983 -40.345 -40.2875 -40.2254 -40.1583 -40.085 -34.6852 -34.7418 -34.789 -34.8254 -34.8512 -34.8673 -34.8745 -34.8734 -34.8645 -34.8484 -34.8257 -34.7968 -34.7623 -34.7229 -34.6789 -34.6306 -34.5782 -34.5218 -34.4608 -34.3951 -29.8134 -29.8658 -29.9098 -29.9439 -29.9682 -29.9833 -29.99 -29.9888 -29.9803 -29.965 -29.9434 -29.9162 -29.8839 -29.8469 -29.8057 -29.7608 -29.7122 -29.6601 -29.6041 -29.5441 -25.7169 -25.7647 -25.8045 -25.8352 -25.8566 -25.8693 -25.8741 -25.8714 -25.8618 -25.8458 -25.824 -25.7968 -25.765 -25.7289 -25.6892 -25.6461 -25.6 -25.551 -25.4987 -25.4432 -22.2639 -22.3071 -22.3425 -22.3692 -22.3872 -22.397 -22.3992 -22.3944 -22.3829 -22.3653 -22.3423 -22.3143 -22.282 -22.2459 -22.2066 -22.1645 -22.1199 -22.073 -22.0236 -21.9717 -19.3466 -19.3853 -19.4165 -19.4394 -19.4539 -19.4606 -19.4601 -19.4527 -19.439 -19.4195 -19.3948 -19.3654 -19.3321 -19.2954 -19.2558 -19.2141 -19.1704 -19.1251 -19.078 -19.0291 -16.8777 -16.9124 -16.9397 -16.959 -16.9702 -16.974 -16.9707 -16.9608 -16.9448 -16.9233 -16.8967 -16.8657 -16.8311 -16.7933 -16.7532 -16.7113 -16.6682 -16.6241 -16.579 -16.5328 -14.7848 -14.816 -14.8398 -14.8558 -14.8641 -14.8651 -14.8592 -14.847 -14.8288 -14.8051 -14.7766 -14.744 -14.7078 -14.6688 -14.6278 -14.5856 -14.5427 -14.4996 -14.4564 -14.4127 -13.0076 -13.0356 -13.0564 -13.0695 -13.0751 -13.0736 -13.0654 -13.0509 -13.0306 -13.005 -12.9747 -12.9402 -12.9024 -12.8621 -12.8201 -12.7772 -12.7343 -12.6921 -12.6506 -12.6096 -11.4961 -11.5213 -11.5393 -11.5498 -11.553 -11.5493 -11.539 -11.5225 -11.5002 -11.4727 -11.4406 -11.4044 -11.365 -11.3231 -11.2798 -11.2361 -11.193 -11.1514 -11.1117 -11.0735 -10.2084 -10.2311 -10.2467 -10.255 -10.256 -10.2503 -10.238 -10.2197 -10.1956 -10.1664 -10.1325 -10.0945 -10.0534 -10.0099 -9.96513 -9.92026 -9.87661 -9.83537 -9.79743 -9.76242 -9.10964 -9.13017 -9.14359 -9.14978 -9.14892 -9.14133 -9.12734 -9.10728 -9.08155 -9.05063 -9.01504 -8.97541 -8.93251 -8.88725 -8.84075 -8.79438 -8.74975 -8.7085 -8.67226 -8.64076 -8.17057 -8.18905 -8.20048 -8.20477 -8.20213 -8.19285 -8.17723 -8.15558 -8.12829 -8.09578 -8.05856 -8.01723 -7.97251 -7.92531 -7.87679 -7.82846 -7.78226 -7.74036 -7.70545 -7.6778 -7.36648 -7.38302 -7.39257 -7.39508 -7.39076 -7.37987 -7.36269 -7.33951 -7.31069 -7.27663 -7.23777 -7.19468 -7.14801 -7.09864 -7.04771 -6.99682 -6.94818 -6.90465 -6.87017 -6.84585 -6.67611 -6.69101 -6.69896 -6.69996 -6.6942 -6.68193 -6.66339 -6.63887 -6.60868 -6.57319 -6.53281 -6.48802 -6.43941 -6.38777 -6.33414 -6.28011 -6.22809 -6.1819 -6.14708 -6.12538 -6.08136 -6.09513 -6.10203 -6.10209 -6.09549 -6.08245 -6.06322 -6.03804 -6.00722 -5.97108 -5.92998 -5.88435 -5.83469 -5.78164 -5.72607 -5.66943 -5.61393 -5.56451 -5.52947 -5.516 -5.57007 -5.58118 -5.58572 -5.58373 -5.57537 -5.56083 -5.54034 -5.51414 -5.48248 -5.44566 -5.40397 -5.35777 -5.30745 -5.25349 -5.1965 -5.13749 -5.07788 -5.02224 -4.97843 -4.9781 -63.683 -63.9595 -64.2049 -64.4601 -64.7233 -64.9838 -65.2364 -65.4794 -65.7123 -65.9344 -66.1446 -66.3424 -66.5272 -66.699 -66.8579 -67.0041 -67.1385 -67.2628 -67.3797 -67.4925 -51.7411 -52.028 -52.3 -52.5701 -52.8378 -53.0985 -53.3496 -53.5903 -53.8203 -54.0393 -54.2467 -54.442 -54.625 -54.7955 -54.9535 -55.0992 -55.2331 -55.3554 -55.4664 -55.5628 -43.3371 -43.6205 -43.8961 -44.1635 -44.423 -44.6739 -44.9153 -45.147 -45.3685 -45.5795 -45.7795 -45.9682 -46.1454 -46.3108 -46.4643 -46.6059 -46.7355 -46.8528 -46.9571 -47.0463 -36.8441 -37.1135 -37.3772 -37.6322 -37.878 -38.1153 -38.3439 -38.5634 -38.7733 -38.9732 -39.1628 -39.3418 -39.5099 -39.6669 -39.8127 -39.947 -40.0697 -40.1805 -40.2788 -40.3639 -31.3148 -31.5672 -31.8153 -32.0556 -32.2873 -32.5107 -32.7257 -32.932 -33.1292 -33.3169 -33.4948 -33.6626 -33.8201 -33.9671 -34.1035 -34.229 -34.3435 -34.4468 -34.5385 -34.6185 -26.6622 -26.8991 -27.1323 -27.3586 -27.5768 -27.7869 -27.9888 -28.1823 -28.367 -28.5425 -28.7087 -28.8653 -29.012 -29.1488 -29.2755 -29.3919 -29.4978 -29.5933 -29.6779 -29.7517 -22.7687 -22.9924 -23.2124 -23.426 -23.6318 -23.8298 -24.0198 -24.2016 -24.3747 -24.5391 -24.6944 -24.8406 -24.9773 -25.1045 -25.222 -25.3297 -25.4275 -25.5154 -25.593 -25.6605 -19.4966 -19.709 -19.9176 -20.1201 -20.3151 -20.5024 -20.6819 -20.8532 -21.0162 -21.1706 -21.3163 -21.4531 -21.5809 -21.6994 -21.8087 -21.9086 -21.999 -22.0798 -22.151 -22.2127 -16.737 -16.9399 -17.139 -17.332 -17.5176 -17.6957 -17.866 -18.0283 -18.1824 -18.3281 -18.4654 -18.594 -18.7138 -18.8248 -18.9268 -19.0197 -19.1036 -19.1783 -19.2437 -19.3001 -14.4045 -14.5995 -14.7906 -14.9756 -15.1533 -15.3233 -15.4857 -15.6401 -15.7865 -15.9246 -16.0545 -16.176 -16.2889 -16.3933 -16.489 -16.5759 -16.6541 -16.7234 -16.7837 -16.8354 -12.4294 -12.6178 -12.8023 -12.9806 -13.1514 -13.3146 -13.4699 -13.6175 -13.757 -13.8885 -14.012 -14.1273 -14.2343 -14.3329 -14.4232 -14.5049 -14.5781 -14.6427 -14.6987 -14.7462 -10.7543 -10.9374 -11.1165 -11.2891 -11.454 -11.611 -11.7602 -11.9016 -12.0351 -12.1608 -12.2786 -12.3885 -12.4903 -12.584 -12.6695 -12.7467 -12.8156 -12.8762 -12.9283 -12.9723 -9.33182 -9.51056 -9.68547 -9.85332 -10.0129 -10.1644 -10.308 -10.4439 -10.572 -10.6925 -10.8053 -10.9104 -11.0077 -11.0971 -11.1784 -11.2517 -11.3169 -11.3739 -11.4228 -11.4636 -8.1224 -8.29783 -8.46968 -8.63343 -8.78811 -8.93446 -9.07296 -9.20379 -9.32709 -9.44293 -9.5513 -9.65218 -9.74546 -9.83102 -9.90874 -9.97859 -10.0405 -10.0944 -10.1404 -10.1785 -7.09294 -7.26627 -7.43611 -7.59614 -7.74616 -7.88769 -8.0214 -8.14757 -8.26644 -8.37811 -8.48253 -8.57966 -8.6694 -8.75159 -8.8261 -8.89289 -8.95188 -9.00306 -9.04639 -9.08202 -6.21531 -6.38877 -6.55769 -6.71397 -6.85935 -6.99624 -7.12544 -7.24729 -7.3621 -7.46997 -7.57082 -7.66457 -7.75109 -7.83022 -7.90181 -7.96581 -8.02214 -8.07079 -8.11171 -8.14506 -5.46249 -5.64109 -5.811 -5.96323 -6.10383 -6.23627 -6.36121 -6.47905 -6.59013 -6.69453 -6.79213 -6.88278 -6.96634 -7.04265 -7.11153 -7.17293 -7.22678 -7.27306 -7.31175 -7.34295 -4.80417 -4.99483 -5.16985 -5.31879 -5.45495 -5.5834 -5.70461 -5.81899 -5.9269 -6.02836 -6.12321 -6.21125 -6.29232 -6.36623 -6.43283 -6.49204 -6.54379 -6.58808 -6.62486 -6.65427 -4.22632 -4.43107 -4.6144 -4.76272 -4.89555 -5.0203 -5.13812 -5.24946 -5.35459 -5.45347 -5.54593 -5.63171 -5.71063 -5.7825 -5.84718 -5.90458 -5.95464 -5.99735 -6.03267 -6.06072 -3.81728 -4.0267 -4.19713 -4.33969 -4.46597 -4.58253 -4.69289 -4.79768 -4.89666 -4.98968 -5.07654 -5.15698 -5.23078 -5.29777 -5.35781 -5.41084 -5.4568 -5.49569 -5.5275 -5.55233 -0.757419 -1.1624 -1.65323 -2.23383 -2.92004 -3.73091 -4.68774 -5.81563 -7.14456 -8.71042 -10.5564 -12.7348 -15.3094 -18.3583 -21.9826 -26.3133 -31.4668 -37.5399 -45.5091 -57.0828 -0.881603 -1.2896 -1.78134 -2.36333 -3.05133 -3.86424 -4.82344 -5.95415 -7.28644 -8.8563 -10.7071 -12.8912 -15.4727 -18.5301 -22.1649 -26.5086 -31.6777 -37.7673 -45.749 -57.3266 -1.01082 -1.42199 -1.91486 -2.49848 -3.18854 -4.00376 -4.96563 -6.09945 -7.43543 -9.00966 -10.8656 -13.056 -15.645 -18.7115 -22.3572 -26.7143 -31.8992 -38.0049 -45.9961 -57.5688 -1.14461 -1.5591 -2.05325 -2.63875 -3.33109 -4.14884 -5.11357 -6.25074 -7.59064 -9.16949 -11.0309 -13.2279 -15.8247 -18.9007 -22.5578 -26.9283 -32.1292 -38.2524 -46.2576 -57.833 -1.28265 -1.70058 -2.19619 -2.78378 -3.47861 -4.29909 -5.26689 -6.40759 -7.75161 -9.3353 -11.2025 -13.4062 -16.0111 -19.0968 -22.7656 -27.1502 -32.3676 -38.5096 -46.5329 -58.1177 -1.42465 -1.84612 -2.34336 -2.93327 -3.63083 -4.45423 -5.42529 -6.56972 -7.91805 -9.50679 -11.3799 -13.5906 -16.204 -19.2998 -22.9807 -27.3797 -32.6143 -38.7759 -46.819 -58.4165 -1.57035 -1.99546 -2.49449 -3.08694 -3.78742 -4.61395 -5.58845 -6.73679 -8.08963 -9.68362 -11.5629 -13.7809 -16.403 -19.5092 -23.2027 -27.6168 -32.869 -39.0507 -47.1141 -58.7257 -1.71954 -2.14837 -2.64931 -3.24452 -3.94813 -4.77795 -5.75606 -6.90847 -8.26599 -9.86541 -11.751 -13.9766 -16.6077 -19.7247 -23.4312 -27.8608 -33.1311 -39.3333 -47.4174 -59.0442 -1.87209 -2.30465 -2.80763 -3.40579 -4.11269 -4.94595 -5.92779 -7.0844 -8.44673 -10.0517 -11.9439 -14.1773 -16.8176 -19.9457 -23.6656 -28.1111 -33.4001 -39.623 -47.7283 -59.371 -2.02793 -2.46421 -2.9693 -3.57055 -4.28087 -5.11767 -6.10334 -7.26424 -8.63147 -10.2422 -12.1411 -14.3823 -17.0321 -20.1717 -23.9052 -28.3671 -33.675 -39.9192 -48.046 -59.7052 -2.1871 -2.627 -3.13421 -3.73864 -4.45244 -5.29283 -6.28236 -7.44759 -8.81979 -10.4363 -12.3419 -14.5913 -17.2508 -20.4019 -24.1495 -28.628 -33.9554 -40.2211 -48.3696 -60.0456 -2.34972 -2.79304 -3.30226 -3.90987 -4.62715 -5.4711 -6.46447 -7.63403 -9.0112 -10.6335 -12.546 -14.8036 -17.4729 -20.6359 -24.3977 -28.8931 -34.2402 -40.5277 -48.6982 -60.3911 -2.51604 -2.9624 -3.47336 -4.08403 -4.80467 -5.65207 -6.64921 -7.82303 -9.20515 -10.8332 -12.7527 -15.0185 -17.6977 -20.8728 -24.649 -29.1617 -34.5289 -40.8385 -49.031 -60.7407 -2.68629 -3.13505 -3.64729 -4.26074 -4.98452 -5.83519 -6.83595 -8.01395 -9.40096 -11.0349 -12.9612 -15.2354 -17.9247 -21.1119 -24.9028 -29.433 -34.8204 -41.1524 -49.3671 -61.0938 -2.86062 -3.31074 -3.82353 -4.43934 -5.16597 -6.0197 -7.02394 -8.20603 -9.59789 -11.2376 -13.1709 -15.4534 -18.1529 -21.3523 -25.158 -29.706 -35.114 -41.4688 -49.706 -61.4498 -3.03865 -3.48851 -4.00089 -4.6186 -5.34785 -6.20453 -7.21222 -8.39838 -9.79509 -11.4406 -13.3809 -15.6718 -18.3814 -21.5932 -25.4139 -29.9797 -35.4087 -41.7867 -50.047 -61.8084 -3.21923 -3.66657 -4.17751 -4.79687 -5.52874 -6.38843 -7.39963 -8.58996 -9.99159 -11.6429 -13.5902 -15.8896 -18.6095 -21.8337 -25.6693 -30.253 -35.7032 -42.1052 -50.3901 -62.17 -3.39732 -3.83912 -4.34886 -4.97107 -5.70654 -6.56986 -7.58499 -8.77977 -10.1865 -11.8438 -13.7982 -16.106 -18.8361 -22.0727 -25.9233 -30.5249 -35.9961 -42.4228 -50.7347 -62.5363 -3.56522 -4.00064 -4.51214 -5.13985 -5.88023 -6.74785 -7.7674 -8.96694 -10.379 -12.0423 -14.0038 -16.32 -19.0602 -22.309 -26.1745 -30.7937 -36.2856 -42.7373 -51.0801 -62.9106 -3.68471 -4.12413 -4.65846 -5.30104 -6.04899 -6.92203 -7.94663 -9.15124 -10.5686 -12.238 -14.2064 -16.531 -19.2812 -22.542 -26.4218 -31.0583 -36.5697 -43.044 -51.4196 -63.2975 0.115341 -0.225279 -0.699462 -1.27221 -1.9464 -2.74175 -3.68075 -4.78825 -6.09357 -7.63164 -9.44422 -11.5814 -14.1037 -17.0847 -20.619 -24.8297 -29.8233 -35.6911 -43.4286 -54.8191 0.117048 -0.230797 -0.706984 -1.2734 -1.94087 -2.73108 -3.66584 -4.7696 -6.07152 -7.60647 -9.41611 -11.5505 -14.07 -17.0484 -20.5806 -24.7898 -29.7828 -35.6488 -43.378 -54.7518 0.154325 -0.212312 -0.694363 -1.26203 -1.92976 -2.71959 -3.65325 -4.75545 -6.05561 -7.58871 -9.39648 -11.529 -14.0468 -17.0235 -20.5542 -24.7624 -29.7551 -35.619 -43.3354 -54.6788 0.182054 -0.191416 -0.676625 -1.2471 -1.91721 -2.70854 -3.64286 -4.74507 -6.04479 -7.57715 -9.38399 -11.5155 -14.0322 -17.008 -20.5378 -24.7455 -29.7383 -35.6024 -43.3138 -54.6401 0.200567 -0.175458 -0.662915 -1.23575 -1.90804 -2.7011 -3.63664 -4.73959 -6.03964 -7.57201 -9.37861 -11.5097 -14.026 -17.0014 -20.5311 -24.7389 -29.7328 -35.5999 -43.3135 -54.6344 0.212692 -0.16611 -0.655594 -1.23034 -1.90453 -2.69931 -3.63628 -4.74033 -6.04118 -7.57407 -9.381 -11.5123 -14.0288 -17.0046 -20.5349 -24.7439 -29.7402 -35.6117 -43.3309 -54.6522 0.216129 -0.165272 -0.656157 -1.23233 -1.90813 -2.70454 -3.643 -4.74836 -6.0503 -7.5841 -9.39181 -11.5239 -14.0412 -17.018 -20.5498 -24.7611 -29.7608 -35.638 -43.3643 -54.6891 0.208753 -0.174504 -0.666068 -1.24312 -1.92016 -2.71796 -3.65783 -4.76455 -6.06775 -7.60274 -9.4116 -11.5449 -14.0635 -17.042 -20.5761 -24.7906 -29.795 -35.6789 -43.4137 -54.7444 0.1901 -0.194458 -0.686175 -1.26367 -1.94157 -2.74049 -3.68162 -4.78965 -6.0942 -7.63054 -9.44082 -11.5756 -14.0961 -17.0769 -20.6141 -24.8328 -29.8429 -35.7347 -43.4794 -54.8182 0.160406 -0.225211 -0.71675 -1.29437 -1.97286 -2.77265 -3.71488 -4.82416 -6.13008 -7.66791 -9.47982 -11.6165 -14.1393 -17.1229 -20.6639 -24.8877 -29.9047 -35.8056 -43.5615 -54.9101 0.120034 -0.266573 -0.75773 -1.33528 -2.01414 -2.81466 -3.75786 -4.86835 -6.17567 -7.71511 -9.52889 -11.6678 -14.1932 -17.1803 -20.7258 -24.9555 -29.9804 -35.8916 -43.66 -55.0195 0.069424 -0.31819 -0.808862 -1.38623 -2.06538 -2.86651 -3.81064 -4.92233 -6.23112 -7.77231 -9.58816 -11.7296 -14.2581 -17.2492 -20.7997 -25.0362 -30.07 -35.9927 -43.7746 -55.1463 0.0090991 -0.37962 -0.86979 -1.44696 -2.12638 -2.92811 -3.87315 -4.98607 -6.29641 -7.8395 -9.65765 -11.8019 -14.3339 -17.3295 -20.8858 -25.1299 -30.1735 -36.1088 -43.9054 -55.29 -0.060371 -0.450358 -0.940079 -1.51711 -2.19683 -2.9992 -3.9452 -5.05943 -6.37144 -7.91659 -9.73727 -11.8846 -14.4206 -17.4212 -20.984 -25.2364 -30.2909 -36.2398 -44.0521 -55.4506 -0.138409 -0.529863 -1.01924 -1.59624 -2.27636 -3.07945 -4.0265 -5.14215 -6.45598 -8.00339 -9.82686 -11.9777 -14.518 -17.5241 -21.094 -25.3556 -30.4219 -36.3856 -44.2148 -55.6281 -0.224459 -0.617604 -1.10678 -1.68389 -2.36455 -3.16849 -4.11673 -5.23395 -6.54977 -8.09965 -9.92619 -12.0808 -14.6259 -17.638 -21.2156 -25.4872 -30.5664 -36.546 -44.3936 -55.8226 -0.317992 -0.71306 -1.2022 -1.7796 -2.46097 -3.26591 -4.21549 -5.33445 -6.65246 -8.20506 -10.0349 -12.1937 -14.7439 -17.7625 -21.3485 -25.6308 -30.7238 -36.7209 -44.5884 -56.0346 -0.418522 -0.815747 -1.30504 -1.88292 -2.56519 -3.37132 -4.32242 -5.44331 -6.76373 -8.31929 -10.1528 -12.316 -14.8718 -17.8975 -21.4924 -25.7861 -30.8936 -36.9094 -44.7993 -56.2652 -0.525564 -0.925166 -1.41478 -1.99335 -2.67673 -3.48424 -4.43705 -5.56008 -6.88312 -8.44189 -10.2793 -12.4473 -15.0091 -18.0422 -21.6465 -25.9522 -31.0749 -37.1105 -45.026 -56.5167 -0.638732 -1.04094 -1.53108 -2.11057 -2.79527 -3.60437 -4.55911 -5.68448 -7.01038 -8.5726 -10.4142 -12.5873 -15.1554 -18.1963 -21.8106 -26.1286 -31.2668 -37.3219 -45.265 -56.7919 0.22301 0.231077 0.190454 0.132726 0.0631184 -0.0148532 -0.0999783 -0.191388 -0.288432 -0.390476 -0.496897 -0.607067 -0.720329 -0.836033 -0.953567 -1.07235 -1.19185 -1.31158 -1.43114 -1.55027 -0.199806 -0.203316 -0.236518 -0.289443 -0.356258 -0.432911 -0.517609 -0.609145 -0.706672 -0.809446 -0.916776 -1.028 -1.14244 -1.25943 -1.37835 -1.49861 -1.61966 -1.74099 -1.86216 -1.98292 -0.683881 -0.696672 -0.730583 -0.782258 -0.847744 -0.923803 -1.00853 -1.10057 -1.19893 -1.30279 -1.41141 -1.52409 -1.64014 -1.75888 -1.8797 -2.00199 -2.12521 -2.24884 -2.37241 -2.49569 -1.26788 -1.28497 -1.31981 -1.37075 -1.43501 -1.51017 -1.59444 -1.68648 -1.78521 -1.88973 -1.99926 -2.11308 -2.23046 -2.35072 -2.47323 -2.59738 -2.72262 -2.84839 -2.97424 -3.09993 -1.95337 -1.97495 -2.0115 -2.06264 -2.12653 -2.20135 -2.28555 -2.37783 -2.47711 -2.58247 -2.69309 -2.80821 -2.92708 -3.04902 -3.17338 -3.29955 -3.42694 -3.55499 -3.68323 -3.81144 -2.75688 -2.78319 -2.82234 -2.87465 -2.93905 -3.01423 -3.09887 -3.19181 -3.292 -3.3985 -3.5105 -3.62719 -3.74784 -3.87173 -3.99821 -4.12665 -4.25645 -4.38703 -4.5179 -4.64888 -3.70184 -3.73252 -3.77469 -3.82883 -3.89442 -3.97054 -4.05611 -4.1501 -4.25151 -4.35947 -4.47312 -4.59167 -4.71435 -4.84047 -4.96934 -5.10033 -5.23282 -5.36619 -5.49996 -5.63399 -4.81419 -4.84888 -4.89422 -4.95064 -5.01796 -5.09552 -5.18248 -5.2779 -5.38091 -5.49065 -5.60627 -5.72698 -5.85203 -5.98069 -6.11228 -6.24614 -6.38163 -6.51812 -6.65511 -6.79253 -6.12371 -6.16218 -6.21077 -6.26981 -6.33931 -6.4188 -6.50759 -6.60489 -6.7099 -6.8218 -6.93978 -7.06303 -7.19082 -7.32241 -7.45711 -7.59425 -7.73315 -7.87315 -8.01376 -8.15497 -7.6656 -7.7077 -7.7596 -7.82155 -7.89363 -7.97549 -8.06659 -8.16623 -8.2737 -8.38822 -8.50899 -8.63526 -8.76626 -8.90125 -9.03955 -9.18045 -9.32326 -9.46726 -9.61199 -9.75753 -9.48179 -9.52742 -9.5827 -9.64778 -9.7228 -9.80747 -9.90133 -10.0038 -10.1143 -10.2319 -10.356 -10.4858 -10.6206 -10.7596 -10.9021 -11.0474 -11.1947 -11.3433 -11.4927 -11.6432 -11.6225 -11.6716 -11.7303 -11.7987 -11.877 -11.9649 -12.062 -12.1678 -12.2818 -12.4032 -12.5312 -12.6652 -12.8044 -12.9481 -13.0954 -13.2458 -13.3984 -13.5523 -13.7072 -13.8634 -14.1481 -14.2006 -14.2627 -14.3346 -14.4164 -14.5078 -14.6087 -14.7184 -14.8365 -14.9622 -15.0948 -15.2337 -15.3781 -15.5272 -15.6803 -15.8366 -15.9952 -16.1554 -16.3166 -16.4793 -17.1323 -17.1879 -17.2534 -17.3287 -17.4142 -17.5094 -17.6144 -17.7285 -17.8512 -17.9819 -18.1198 -18.2644 -18.4148 -18.5702 -18.7298 -18.893 -19.0587 -19.226 -19.3945 -19.5649 -20.6695 -20.7278 -20.7962 -20.8747 -20.9637 -21.0629 -21.1722 -21.291 -21.4188 -21.5551 -21.6991 -21.8501 -22.0072 -22.1698 -22.3371 -22.5082 -22.6821 -22.8577 -23.0346 -23.2136 -24.8821 -24.9422 -25.0128 -25.0939 -25.186 -25.2889 -25.4023 -25.526 -25.6593 -25.8016 -25.9521 -26.1102 -26.2749 -26.4456 -26.6214 -26.8015 -26.9848 -27.17 -27.3565 -27.5448 -29.8764 -29.9371 -30.0081 -30.0902 -30.1841 -30.2897 -30.4068 -30.5349 -30.6735 -30.8218 -30.9791 -31.1446 -31.3175 -31.4969 -31.6821 -31.872 -32.0656 -32.2615 -32.4586 -32.6573 -35.7436 -35.801 -35.868 -35.9475 -36.0404 -36.1468 -36.2661 -36.3977 -36.5408 -36.6946 -36.8582 -37.0309 -37.2118 -37.3999 -37.5943 -37.7941 -37.9984 -38.2063 -38.4165 -38.6279 -43.4675 -43.5086 -43.5627 -43.6345 -43.7233 -43.8281 -43.9478 -44.0812 -44.2272 -44.3851 -44.5538 -44.7325 -44.9204 -45.1165 -45.3198 -45.5293 -45.7453 -45.9689 -46.1993 -46.4279 -54.8035 -54.808 -54.8446 -54.9074 -54.9915 -55.094 -55.2128 -55.3465 -55.494 -55.6542 -55.8263 -56.0095 -56.2032 -56.4065 -56.6184 -56.8386 -57.0686 -57.3131 -57.5722 -57.821 -1.66877 -1.78601 -1.90195 -2.01631 -2.1289 -2.23945 -2.34772 -2.45342 -2.55626 -2.65594 -2.75215 -2.84456 -2.93273 -3.01603 -3.09371 -3.16414 -3.22283 -3.26071 -3.26069 -3.21856 -2.10308 -2.22189 -2.33934 -2.45509 -2.56892 -2.68056 -2.78974 -2.89617 -2.99954 -3.09952 -3.19578 -3.28793 -3.37552 -3.45779 -3.5336 -3.60169 -3.66015 -3.70006 -3.69961 -3.67983 -2.61848 -2.73996 -2.8601 -2.97854 -3.09504 -3.20931 -3.32106 -3.43 -3.5358 -3.63812 -3.7366 -3.83083 -3.92031 -4.00428 -4.08164 -4.1513 -4.21218 -4.25826 -4.27672 -4.28498 -3.22527 -3.34933 -3.47209 -3.59316 -3.71228 -3.82915 -3.94345 -4.05488 -4.1631 -4.26775 -4.36844 -4.46473 -4.55609 -4.64176 -4.72074 -4.79206 -4.85454 -4.9041 -4.936 -4.96444 -3.93944 -4.06616 -4.19162 -4.31538 -4.43718 -4.55668 -4.67356 -4.78749 -4.89813 -5.00508 -5.10795 -5.20626 -5.29946 -5.3868 -5.46743 -5.54052 -5.60483 -5.65767 -5.6985 -5.7385 -4.77977 -4.90939 -5.03777 -5.16445 -5.28914 -5.41148 -5.53114 -5.64777 -5.76101 -5.87045 -5.97566 -6.07618 -6.17142 -6.26071 -6.34333 -6.41858 -6.48542 -6.54229 -6.59028 -6.6373 -5.76806 -5.90087 -6.03244 -6.1623 -6.29014 -6.41558 -6.53828 -6.65786 -6.77395 -6.88612 -6.99395 -7.09694 -7.19456 -7.28619 -7.37124 -7.44914 -7.51912 -7.58047 -7.63474 -7.6872 -6.93012 -7.06643 -7.20152 -7.33488 -7.46619 -7.59505 -7.7211 -7.84396 -7.96321 -8.07846 -8.18925 -8.29512 -8.39555 -8.49001 -8.578 -8.65909 -8.73277 -8.79881 -8.85879 -8.91623 -8.29651 -8.43674 -8.57576 -8.71303 -8.84822 -8.98091 -9.11072 -9.23727 -9.36013 -9.47891 -9.59315 -9.7024 -9.80619 -9.90407 -9.99563 -10.0805 -10.1584 -10.2294 -10.2948 -10.3572 -9.90354 -10.0482 -10.1917 -10.3333 -10.4729 -10.61 -10.7441 -10.8748 -11.0019 -11.1248 -11.2431 -11.3563 -11.4642 -11.5661 -11.662 -11.7513 -11.834 -11.9103 -11.9811 -12.0487 -11.7944 -11.9441 -12.0926 -12.2393 -12.3839 -12.5259 -12.665 -12.8006 -12.9325 -13.0602 -13.1833 -13.3013 -13.414 -13.5208 -13.6217 -13.7162 -13.8044 -13.8863 -13.9629 -14.0361 -14.0204 -14.1759 -14.3302 -14.4827 -14.633 -14.7808 -14.9255 -15.0669 -15.2044 -15.3377 -15.4664 -15.5901 -15.7084 -15.821 -15.9277 -16.0284 -16.1227 -16.2109 -16.2938 -16.3732 -16.6431 -16.8052 -16.9661 -17.1252 -17.2821 -17.4364 -17.5877 -17.7356 -17.8796 -18.0195 -18.1547 -18.2849 -18.4099 -18.5292 -18.6428 -18.7504 -18.8518 -18.947 -19.0368 -19.1233 -19.7364 -19.906 -20.0743 -20.2408 -20.4051 -20.5669 -20.7256 -20.881 -21.0325 -21.1799 -21.3226 -21.4605 -21.5931 -21.7202 -21.8416 -21.9573 -22.0667 -22.1698 -22.2673 -22.3617 -23.3936 -23.5716 -23.7482 -23.9229 -24.0956 -24.2657 -24.4328 -24.5965 -24.7565 -24.9124 -25.0637 -25.2102 -25.3515 -25.4875 -25.6179 -25.7426 -25.8612 -25.9733 -26.0796 -26.1826 -27.7343 -27.9214 -28.107 -28.2907 -28.4724 -28.6515 -28.8279 -29.0009 -29.1703 -29.3356 -29.4964 -29.6525 -29.8036 -29.9494 -30.0898 -30.2247 -30.3538 -30.4761 -30.592 -30.7042 -32.857 -33.0537 -33.2486 -33.4416 -33.6327 -33.8214 -34.0075 -34.1905 -34.37 -34.5455 -34.7166 -34.8832 -35.0448 -35.2014 -35.3528 -35.4988 -35.6392 -35.7728 -35.8994 -36.0213 -38.8382 -39.0437 -39.2465 -39.4478 -39.6478 -39.846 -40.0421 -40.2353 -40.4251 -40.6111 -40.793 -40.9703 -41.143 -41.3107 -41.4731 -41.6303 -41.7823 -41.929 -42.0699 -42.2047 -46.642 -46.8493 -47.0554 -47.2626 -47.4702 -47.6772 -47.8825 -48.0853 -48.2849 -48.4809 -48.6727 -48.8603 -49.0434 -49.2219 -49.3954 -49.5639 -49.7294 -49.8958 -50.0631 -50.2182 -58.0127 -58.2078 -58.4128 -58.6236 -58.8368 -59.0503 -59.2626 -59.4726 -59.6796 -59.883 -60.0827 -60.2786 -60.4708 -60.6595 -60.8447 -61.0272 -61.2115 -61.4074 -61.6164 -61.7982 -61.8753 -50.3413 -42.331 -36.1388 -30.8126 -26.2824 -22.4531 -19.2068 -16.4498 -14.1066 -12.1137 -10.4176 -8.97279 -7.74079 -6.6891 -5.78971 -5.01668 -4.34794 -3.78084 -3.32228 -61.9524 -50.4475 -42.4445 -36.247 -30.9131 -26.375 -22.538 -19.2847 -16.5212 -14.1723 -12.1745 -10.4742 -9.02598 -7.79144 -6.73823 -5.83856 -5.06785 -4.40889 -3.863 -3.41272 -62.0423 -50.5483 -42.5502 -36.3493 -31.0086 -26.463 -22.6187 -19.3585 -16.5888 -14.2345 -12.232 -10.5276 -9.07601 -7.83878 -6.78354 -5.8825 -5.11153 -4.45361 -3.90627 -3.44509 -62.1401 -50.6494 -42.652 -36.4472 -31.0999 -26.5469 -22.6955 -19.4286 -16.6529 -14.2932 -12.286 -10.5776 -9.12247 -7.88221 -6.82431 -5.921 -5.14821 -4.48834 -3.93588 -3.46442 -62.2418 -50.751 -42.7516 -36.542 -31.188 -26.6277 -22.7692 -19.4957 -16.714 -14.349 -12.3372 -10.6246 -9.16575 -7.92212 -6.86108 -5.95475 -5.17899 -4.51568 -3.95745 -3.47846 -62.3453 -50.8529 -42.8499 -36.6346 -31.2735 -26.7059 -22.8402 -19.5602 -16.7726 -14.4023 -12.3858 -10.669 -9.20641 -7.95929 -6.89495 -5.98542 -5.20657 -4.53995 -3.9768 -3.49233 -62.4498 -50.9551 -42.9474 -36.7256 -31.3573 -26.7821 -22.9092 -19.6226 -16.8291 -14.4536 -12.4324 -10.7115 -9.24516 -7.99457 -6.92695 -6.0143 -5.23253 -4.56299 -3.99576 -3.50726 -62.5548 -51.0574 -43.0444 -36.8157 -31.4397 -26.8568 -22.9767 -19.6835 -16.8841 -14.5035 -12.4777 -10.7527 -9.2827 -8.02875 -6.95801 -6.04246 -5.25808 -4.58604 -4.01542 -3.52383 -62.6606 -51.1601 -43.1414 -36.9053 -31.5212 -26.9306 -23.0431 -19.7433 -16.9382 -14.5524 -12.5222 -10.7932 -9.31966 -8.0625 -6.98883 -6.07062 -5.2839 -4.6097 -4.03613 -3.54208 -62.7672 -51.2633 -43.2386 -36.9947 -31.6024 -27.0038 -23.109 -19.8026 -16.9917 -14.6009 -12.5663 -10.8335 -9.35654 -8.09635 -7.01993 -6.09927 -5.31043 -4.63428 -4.05809 -3.56198 -62.8753 -51.3675 -43.3364 -37.0844 -31.6836 -27.0768 -23.1746 -19.8617 -17.045 -14.6493 -12.6105 -10.874 -9.39379 -8.13071 -7.05172 -6.12876 -5.33796 -4.65999 -4.08136 -3.58348 -62.9852 -51.4731 -43.4351 -37.1748 -31.7652 -27.1501 -23.2404 -19.9209 -17.0987 -14.6981 -12.6551 -10.9151 -9.43175 -8.16593 -7.0845 -6.15937 -5.3667 -4.68698 -4.10603 -3.60657 -63.0977 -51.5804 -43.5351 -37.266 -31.8475 -27.224 -23.3068 -19.9807 -17.1529 -14.7476 -12.7006 -10.9571 -9.47074 -8.20229 -7.11851 -6.1913 -5.39683 -4.7154 -4.13219 -3.63131 -63.2133 -51.6897 -43.6366 -37.3584 -31.9307 -27.2986 -23.3739 -20.0414 -17.208 -14.798 -12.7471 -11.0002 -9.511 -8.24002 -7.15399 -6.22477 -5.42853 -4.74538 -4.15996 -3.65778 -63.3322 -51.8012 -43.7398 -37.4523 -32.0151 -27.3743 -23.442 -20.103 -17.2642 -14.8497 -12.7949 -11.0448 -9.55276 -8.27934 -7.19113 -6.25996 -5.46197 -4.77711 -4.18951 -3.68615 -63.4553 -51.9151 -43.8449 -37.5479 -32.1009 -27.4513 -23.5113 -20.1659 -17.3217 -14.9027 -12.8442 -11.0909 -9.59623 -8.32044 -7.23012 -6.29704 -5.49734 -4.81074 -4.22099 -3.71656 -63.5854 -52.0329 -43.952 -37.6449 -32.1879 -27.5293 -23.5817 -20.23 -17.3806 -14.9572 -12.8951 -11.1388 -9.64153 -8.36347 -7.27112 -6.33619 -5.53478 -4.84646 -4.25459 -3.74919 -63.7285 -52.1567 -44.0613 -37.7428 -32.2757 -27.6082 -23.6531 -20.2952 -17.4407 -15.0133 -12.9477 -11.1885 -9.68876 -8.40854 -7.31424 -6.37751 -5.57446 -4.88442 -4.29046 -3.78421 -63.8854 -52.2867 -44.1723 -37.8414 -32.3644 -27.6883 -23.7259 -20.362 -17.5026 -15.0711 -13.0022 -11.2402 -9.7381 -8.4558 -7.35962 -6.42118 -5.61651 -4.92477 -4.32879 -3.82181 -64.0319 -52.415 -44.2848 -37.9423 -32.4558 -27.7713 -23.8016 -20.4316 -17.5672 -15.1316 -13.0594 -11.2946 -9.79011 -8.50574 -7.4077 -6.46755 -5.66126 -4.96781 -4.36984 -3.86225 -2.59001 -1.52716 -1.01068 -0.678382 -0.491497 -0.360444 -0.27353 -0.209681 -0.162316 -0.12516 -0.0950333 -0.0699212 -0.0490222 -0.0321376 -0.0192048 -0.00996261 -0.00386909 -0.000211014 0.00173592 0.00258572 0.00279423 0.00266599 0.00238787 0.00206533 0.0017523 0.00147296 0.00123507 0.00103798 0.000876712 0.000745446 0.000637152 0.000546695 0.000468138 0.000399769 0.00033537 0.000277848 0.000216211 0.000164215 9.35966e-05 5.02647e-05 -2.64855 -1.55648 -1.03596 -0.692711 -0.500748 -0.365334 -0.275721 -0.210003 -0.161542 -0.123858 -0.0936887 -0.0688685 -0.0484412 -0.0320569 -0.0195542 -0.0106282 -0.00473598 -0.00118382 0.000727897 0.00159167 0.0018461 0.00178325 0.00158103 0.00133852 0.00110608 0.000903909 0.000739023 0.000609374 0.000509769 0.000433752 0.000375341 0.000327816 0.000288383 0.000253815 0.000219728 0.000187908 0.000149878 0.00011858 6.72734e-05 4.4696e-05 -2.71077 -1.58954 -1.06396 -0.709441 -0.511754 -0.371747 -0.279143 -0.211377 -0.161649 -0.12329 -0.0929378 -0.0682812 -0.0482142 -0.0322405 -0.0200985 -0.0114362 -0.00570578 -0.00223009 -0.000331827 0.000561468 0.000872848 0.000883065 0.000762056 0.000603357 0.000453649 0.000330744 0.000240092 0.000178795 0.000141286 0.000121127 0.000112458 0.000108996 0.000108285 0.000107746 0.000103398 9.80171e-05 8.28359e-05 7.32699e-05 3.97205e-05 3.95264e-05 -2.7768 -1.62641 -1.09472 -0.728661 -0.524568 -0.379726 -0.283825 -0.21382 -0.162649 -0.123466 -0.0927873 -0.068164 -0.048344 -0.0326891 -0.0208372 -0.0123853 -0.00677715 -0.00334859 -0.00144235 -0.000504123 -0.00012492 -3.40761e-05 -6.86631e-05 -0.000139968 -0.00020446 -0.000246392 -0.000261641 -0.000253745 -0.000228566 -0.000192451 -0.000151091 -0.000110289 -7.21305e-05 -3.85438e-05 -1.30769e-05 7.98754e-06 1.57361e-05 2.79032e-05 1.21343e-05 3.42927e-05 -2.84674 -1.66715 -1.12829 -0.750451 -0.539237 -0.389302 -0.289792 -0.217346 -0.164551 -0.12439 -0.0932411 -0.0685196 -0.0488322 -0.0334032 -0.0217695 -0.0134745 -0.00794878 -0.00453815 -0.0026027 -0.00160434 -0.00114662 -0.000967741 -0.000910809 -0.000891219 -0.000868074 -0.000827371 -0.000766069 -0.000688166 -0.000599723 -0.000506932 -0.000415262 -0.000330009 -0.000252841 -0.000185037 -0.000129687 -8.2156e-05 -5.14221e-05 -1.7523e-05 -1.54729e-05 2.89806e-05 -2.92067 -1.71181 -1.1647 -0.774891 -0.555805 -0.400506 -0.297065 -0.221968 -0.167363 -0.126067 -0.0943017 -0.0693501 -0.04968 -0.0343828 -0.0228949 -0.0147025 -0.00921942 -0.00579766 -0.00381195 -0.00273846 -0.00219169 -0.0019175 -0.00176406 -0.00165016 -0.00153702 -0.00141207 -0.00127309 -0.00112439 -0.000972123 -0.000822264 -0.000680009 -0.000550129 -0.000433823 -0.000331715 -0.000246419 -0.000172389 -0.00011864 -6.30122e-05 -4.30888e-05 2.35752e-05 -2.99863 -1.76046 -1.20395 -0.802057 -0.57432 -0.413364 -0.305666 -0.227695 -0.171088 -0.128498 -0.0959705 -0.0706566 -0.0508883 -0.0356284 -0.0242127 -0.0160684 -0.010588 -0.00712608 -0.00506924 -0.00390578 -0.00325959 -0.00288294 -0.00262811 -0.00241654 -0.00221111 -0.00200033 -0.00178258 -0.00156233 -0.0013457 -0.0011384 -0.000945296 -0.000770621 -0.000615056 -0.000478565 -0.000363265 -0.000262708 -0.000185915 -0.000108567 -7.07136e-05 1.80632e-05 -3.08068 -1.81318 -1.24603 -0.83202 -0.594834 -0.4279 -0.315616 -0.234535 -0.175732 -0.131684 -0.0982476 -0.0724397 -0.0524578 -0.03714 -0.0257228 -0.0175714 -0.0120535 -0.00852247 -0.00637374 -0.00510562 -0.00434976 -0.00386361 -0.0035026 -0.00319011 -0.00289015 -0.00259202 -0.00229445 -0.00200189 -0.00172039 -0.00145528 -0.00121108 -0.000991456 -0.000796518 -0.000625571 -0.000480214 -0.000353106 -0.000253247 -0.000154189 -9.83474e-05 1.24317e-05 -3.16685 -1.87007 -1.2909 -0.864833 -0.617394 -0.444132 -0.326932 -0.242495 -0.181296 -0.135625 -0.101133 -0.0746995 -0.054389 -0.0389182 -0.027425 -0.0192111 -0.0136153 -0.00998601 -0.00772468 -0.00633732 -0.00546167 -0.0048591 -0.0043872 -0.0039706 -0.00357393 -0.00318697 -0.00280856 -0.002443 -0.00209611 -0.00177285 -0.00147732 -0.0012126 -0.000978185 -0.000772715 -0.000597255 -0.000443576 -0.000320632 -0.000199879 -0.00012599 6.66861e-06 -3.2571 -1.93115 -1.33842 -0.900504 -0.642044 -0.462073 -0.33963 -0.251582 -0.187782 -0.14032 -0.104624 -0.0774354 -0.0566821 -0.0409634 -0.0293195 -0.0209871 -0.0152727 -0.011516 -0.00912138 -0.00760025 -0.00659479 -0.00586895 -0.00528156 -0.00475773 -0.00426224 -0.00378502 -0.00332477 -0.00288553 -0.00247279 -0.00209104 -0.00174396 -0.00143401 -0.00116003 -0.000919978 -0.000714373 -0.000534109 -0.000388065 -0.000245638 -0.000153638 7.61734e-07 -3.35122 -1.99642 -1.38845 -0.939033 -0.668833 -0.481737 -0.353724 -0.261799 -0.19519 -0.145766 -0.10872 -0.080646 -0.059337 -0.0432759 -0.0314067 -0.0228995 -0.0170254 -0.0131119 -0.0105632 -0.00889383 -0.00774858 -0.00689274 -0.00618533 -0.00555123 -0.00495485 -0.00438598 -0.00384297 -0.00332938 -0.00285035 -0.00240981 -0.00201097 -0.00165567 -0.00134203 -0.00106734 -0.000831559 -0.000624699 -0.000455544 -0.000291466 -0.000181292 -5.29958e-06 -3.44892 -2.06624 -1.44114 -0.980558 -0.697891 -0.503167 -0.369241 -0.273157 -0.203523 -0.151961 -0.113418 -0.0843301 -0.0623536 -0.0458562 -0.033687 -0.0249483 -0.0188731 -0.0147733 -0.0120496 -0.0102175 -0.0089225 -0.00793001 -0.00709813 -0.00635078 -0.0056515 -0.00498965 -0.00436303 -0.0037745 -0.00322872 -0.00272909 -0.00227832 -0.00187754 -0.00152417 -0.0012148 -0.000948814 -0.000715406 -0.000523062 -0.00033737 -0.000208977 -1.15322e-05 -3.55059 -2.14191 -1.49713 -1.02539 -0.729447 -0.526472 -0.386248 -0.285694 -0.2128 -0.158915 -0.118722 -0.0884903 -0.0657339 -0.0487066 -0.0361623 -0.0271347 -0.0208164 -0.0164999 -0.0135802 -0.0115707 -0.010116 -0.00898027 -0.00801954 -0.00715603 -0.0063519 -0.0055958 -0.00488479 -0.00422075 -0.00360781 -0.00304885 -0.00254598 -0.00209963 -0.00170646 -0.00136235 -0.00106614 -0.000806239 -0.000590628 -0.000383359 -0.000236697 -1.79511e-05 -3.65728 -2.22424 -1.5562 -1.07328 -0.763498 -0.551668 -0.404771 -0.299433 -0.223036 -0.166638 -0.124639 -0.0931331 -0.0694851 -0.0518332 -0.0388364 -0.0294613 -0.0228565 -0.0182929 -0.0151547 -0.012953 -0.0113289 -0.0100428 -0.00894893 -0.00796607 -0.00705689 -0.00620451 -0.00540717 -0.00466727 -0.00398738 -0.00336913 -0.0028145 -0.0023202 -0.00188849 -0.0015092 -0.00118551 -0.000896572 -0.000661108 -0.000427388 -0.000268234 -2.35289e-05 -3.76621 -2.30891 -1.61484 -1.12224 -0.799139 -0.57828 -0.42455 -0.314222 -0.234138 -0.175067 -0.131129 -0.0982318 -0.0735909 -0.0552273 -0.041707 -0.0319277 -0.0249939 -0.0201521 -0.0167745 -0.0143656 -0.0125619 -0.0111192 -0.00988753 -0.00878271 -0.0077649 -0.0068158 -0.00593235 -0.00511578 -0.00436799 -0.00368997 -0.00308293 -0.00254287 -0.00207115 -0.00165703 -0.00130305 -0.000987652 -0.000728884 -0.000473672 -0.000296021 -3.04019e-05 -3.86702 -2.38893 -1.66972 -1.17049 -0.83541 -0.605645 -0.445119 -0.32974 -0.245875 -0.184035 -0.138067 -0.103696 -0.0779864 -0.058844 -0.0447428 -0.0345134 -0.0272155 -0.0220697 -0.0184343 -0.0158054 -0.0138133 -0.012208 -0.0108346 -0.00960513 -0.00847691 -0.00742989 -0.00645943 -0.00556559 -0.00474952 -0.00401145 -0.00335178 -0.00276581 -0.00225401 -0.00180501 -0.00142071 -0.00107878 -0.000796765 -0.000520054 -0.000323829 -3.74817e-05 -3.9628 -2.4792 -1.73302 -1.22486 -0.876006 -0.635756 -0.467575 -0.346607 -0.258607 -0.19375 -0.145574 -0.109593 -0.0827059 -0.0626967 -0.0479446 -0.0372112 -0.0295097 -0.0240322 -0.0201205 -0.0172599 -0.0150721 -0.0132998 -0.0117823 -0.0104271 -0.00918796 -0.00804279 -0.00698524 -0.00601423 -0.00513003 -0.00433203 -0.00361987 -0.00298816 -0.00243641 -0.00195268 -0.00153817 -0.00116972 -0.000864608 -0.000566452 -0.000351615 -4.47608e-05 -4.10629 -2.6274 -1.83357 -1.30172 -0.931082 -0.675198 -0.496267 -0.367778 -0.274387 -0.205671 -0.154703 -0.116688 -0.0883067 -0.0671842 -0.051588 -0.0402017 -0.0319861 -0.0260992 -0.0218595 -0.018735 -0.0163331 -0.0143845 -0.0127188 -0.0112366 -0.00988701 -0.00864487 -0.00750168 -0.00645498 -0.00550405 -0.00464741 -0.00388385 -0.00320732 -0.00261643 -0.00209861 -0.00165442 -0.00125989 -0.000931965 -0.000612617 -0.000379283 -5.21947e-05 -4.30437 -2.81158 -1.94976 -1.38807 -0.994578 -0.721339 -0.530148 -0.392987 -0.293324 -0.22008 -0.165817 -0.125383 -0.0951961 -0.0726981 -0.0560304 -0.0437951 -0.034902 -0.0284755 -0.0238095 -0.0203505 -0.0176858 -0.0155282 -0.013693 -0.0120702 -0.0106012 -0.00925636 -0.00802384 -0.00689908 -0.00587992 -0.0049637 -0.0041482 -0.00342653 -0.00279635 -0.00224439 -0.00177052 -0.00134994 -0.000999247 -0.000658781 -0.00040693 -5.98519e-05 -4.26218 -2.80935 -1.93786 -1.3937 -1.00856 -0.735734 -0.543042 -0.40395 -0.302326 -0.227418 -0.171851 -0.130449 -0.0995606 -0.0765475 -0.0594746 -0.046888 -0.0376657 -0.0309218 -0.0259532 -0.0222132 -0.0192945 -0.016912 -0.0148799 -0.0130856 -0.0114674 -0.00999281 -0.00864735 -0.0074244 -0.00632006 -0.00533014 -0.00445107 -0.00367481 -0.00299774 -0.00240565 -0.00189746 -0.00144726 -0.00107118 -0.000707692 -0.00043579 -6.83898e-05 -3.77493 -2.55029 -1.74667 -1.27678 -0.937939 -0.689372 -0.511053 -0.380849 -0.284739 -0.213503 -0.160631 -0.121461 -0.0926292 -0.0716042 -0.0564209 -0.0455192 -0.0376675 -0.0319203 -0.0275816 -0.0241631 -0.021339 -0.018903 -0.0167322 -0.0147577 -0.0129453 -0.0112785 -0.00975141 -0.00836168 -0.00710725 -0.00598431 -0.00498877 -0.00411173 -0.00334807 -0.00268222 -0.00211169 -0.00160851 -0.00118819 -0.00078571 -0.000480575 -8.25896e-05 -3.35513 -2.36924 -1.65056 -1.23121 -0.923387 -0.688101 -0.51555 -0.387964 -0.29262 -0.221273 -0.167928 -0.128165 -0.0987252 -0.0771214 -0.0614028 -0.0500107 -0.0417087 -0.0355448 -0.0308175 -0.0270361 -0.0238744 -0.021127 -0.0186716 -0.0164394 -0.0143955 -0.0125222 -0.010812 -0.00926069 -0.00786454 -0.00661792 -0.00551488 -0.00454487 -0.00370083 -0.00296577 -0.00233554 -0.00178066 -0.00131539 -0.000872335 -0.000531347 -9.72522e-05 -2.95044 -2.17878 -1.55429 -1.17873 -0.902423 -0.68376 -0.518897 -0.395129 -0.301384 -0.230427 -0.176879 -0.136619 -0.106526 -0.0841872 -0.0676989 -0.0555451 -0.0465256 -0.0397126 -0.0344147 -0.0301389 -0.0265507 -0.0234346 -0.0206589 -0.0181474 -0.0158592 -0.0137723 -0.0118752 -0.0101608 -0.00862267 -0.00725275 -0.00604288 -0.00498061 -0.00405678 -0.00325291 -0.00256309 -0.00195642 -0.00144574 -0.000961525 -0.000583802 -0.000112249 -2.5933 -1.9968 -1.46618 -1.12836 -0.878819 -0.676602 -0.519902 -0.400401 -0.308726 -0.238518 -0.18502 -0.144455 -0.113876 -0.0909617 -0.0738595 -0.0610847 -0.0514608 -0.0440767 -0.0382509 -0.0334949 -0.0294744 -0.0259716 -0.0228517 -0.0200353 -0.0174778 -0.0151538 -0.013049 -0.0111531 -0.00945683 -0.00794978 -0.00662129 -0.00545679 -0.00444481 -0.00356514 -0.0028099 -0.0021466 -0.00158642 -0.00105769 -0.000640056 -0.000128686 -2.28235 -1.82089 -1.37875 -1.07814 -0.853223 -0.667742 -0.52001 -0.405276 -0.316065 -0.24687 -0.193556 -0.152733 -0.121669 -0.0981609 -0.080423 -0.0670075 -0.0567596 -0.0487817 -0.0424012 -0.0371344 -0.032649 -0.0287272 -0.0252328 -0.0220836 -0.019232 -0.0166493 -0.0143179 -0.0122243 -0.0103561 -0.00870019 -0.00724313 -0.00596801 -0.00486084 -0.00389949 -0.00307386 -0.00234979 -0.00173651 -0.0011603 -0.000699799 -0.000146458 -2.01484 -1.65622 -1.29241 -1.02818 -0.826106 -0.657138 -0.519107 -0.409733 -0.323454 -0.255623 -0.202702 -0.161719 -0.130187 -0.106051 -0.0876158 -0.0734863 -0.0625399 -0.0538985 -0.0469005 -0.0410679 -0.0360705 -0.0316896 -0.0277867 -0.024276 -0.021106 -0.0182444 -0.0156692 -0.0133634 -0.0113113 -0.00949641 -0.00790234 -0.00650952 -0.00530124 -0.00425324 -0.00335302 -0.00256465 -0.0018951 -0.00126883 -0.000762739 -0.000165465 -1.78511 -1.50439 -1.20725 -0.978001 -0.797637 -0.644751 -0.516964 -0.413532 -0.33065 -0.264555 -0.21228 -0.171279 -0.139338 -0.114574 -0.0954041 -0.0805035 -0.0687941 -0.0594249 -0.0517496 -0.0452978 -0.0397416 -0.0348614 -0.0305155 -0.0266141 -0.0231011 -0.0199395 -0.0171031 -0.0145705 -0.0123222 -0.0103382 -0.00859863 -0.00708104 -0.00576573 -0.00462615 -0.00364715 -0.00279099 -0.00206205 -0.00138319 -0.00082881 -0.000185728 -1.5866 -1.36557 -1.12399 -0.927525 -0.767986 -0.63066 -0.513442 -0.41648 -0.337447 -0.273461 -0.222109 -0.181264 -0.149004 -0.123643 -0.103726 -0.0880176 -0.0754962 -0.0653459 -0.056941 -0.0498212 -0.0436622 -0.0382438 -0.0334208 -0.0290995 -0.0252185 -0.0217358 -0.0186203 -0.0158461 -0.0133892 -0.0112256 -0.0093319 -0.00768236 -0.00625407 -0.00501798 -0.00395602 -0.00302862 -0.00223719 -0.00150326 -0.000897915 -0.000207256 -1.41373 -1.23921 -1.04348 -0.876986 -0.737348 -0.615003 -0.508466 -0.418407 -0.343645 -0.282138 -0.232001 -0.191513 -0.159058 -0.13316 -0.112511 -0.095979 -0.0826117 -0.071638 -0.0624584 -0.0546268 -0.0478241 -0.0418304 -0.0364979 -0.0317281 -0.0274547 -0.0236302 -0.0202182 -0.0171876 -0.0145099 -0.0121567 -0.0101005 -0.00831204 -0.00676504 -0.00542768 -0.0042788 -0.00327685 -0.00242 -0.00162869 -0.000969841 -0.00023001 -1.26235 -1.12457 -0.966586 -0.826896 -0.706008 -0.597979 -0.502034 -0.419172 -0.349047 -0.290366 -0.241741 -0.201837 -0.169341 -0.142997 -0.12166 -0.104313 -0.0900849 -0.0782595 -0.0682707 -0.0596905 -0.0522085 -0.0456064 -0.0397344 -0.0344899 -0.0298012 -0.0256154 -0.0218904 -0.0185898 -0.0156798 -0.0131275 -0.010901 -0.00896734 -0.00729637 -0.00585343 -0.00461401 -0.00353457 -0.00260965 -0.00175889 -0.00104425 -0.0002539 -1.12953 -1.02103 -0.894073 -0.777928 -0.674366 -0.57985 -0.494221 -0.418685 -0.35348 -0.297928 -0.251101 -0.212018 -0.179658 -0.15299 -0.131038 -0.112912 -0.0978327 -0.0851463 -0.0743278 -0.0649733 -0.0567843 -0.0495466 -0.0431098 -0.0373677 -0.0322438 -0.0276795 -0.023627 -0.0200441 -0.0168918 -0.0141322 -0.0117286 -0.00964411 -0.00784466 -0.00629247 -0.00495947 -0.00380006 -0.00280488 -0.00189299 -0.00112065 -0.000278776 -1.01326 -0.928123 -0.826618 -0.73082 -0.642927 -0.560954 -0.485183 -0.416931 -0.35681 -0.30463 -0.259855 -0.221828 -0.189795 -0.162948 -0.140483 -0.121641 -0.105744 -0.0922091 -0.0805583 -0.0704177 -0.061505 -0.0536132 -0.0465929 -0.0403359 -0.0347611 -0.0298046 -0.0254129 -0.0215381 -0.0181354 -0.0151619 -0.0125759 -0.0103364 -0.0084051 -0.00674092 -0.00531212 -0.00407097 -0.00300396 -0.00202978 -0.00119836 -0.000304412 -0.912118 -0.845523 -0.764782 -0.686294 -0.612266 -0.541705 -0.475163 -0.413974 -0.358973 -0.310317 -0.267801 -0.231041 -0.199527 -0.17266 -0.149804 -0.130337 -0.113681 -0.0993321 -0.0868665 -0.0759449 -0.0663057 -0.0577525 -0.0501395 -0.0433576 -0.0373223 -0.0319652 -0.0272269 -0.0230539 -0.0193959 -0.0162045 -0.0134331 -0.0110361 -0.00897102 -0.00719345 -0.00566776 -0.00434406 -0.00320451 -0.00216762 -0.00127648 -0.000330496 -0.824987 -0.772974 -0.709018 -0.645019 -0.582993 -0.522587 -0.464489 -0.409975 -0.35998 -0.314898 -0.274773 -0.239452 -0.208634 -0.181907 -0.158796 -0.13881 -0.121477 -0.106372 -0.0931307 -0.0814522 -0.0711003 -0.0618925 -0.0536892 -0.0463824 -0.0398856 -0.0341262 -0.0290399 -0.0245676 -0.0206534 -0.0172435 -0.0142865 -0.0117321 -0.00953356 -0.00764296 -0.00602082 -0.00461505 -0.0034034 -0.00230433 -0.00135378 -0.000356607 -0.750958 -0.710262 -0.659693 -0.607602 -0.555731 -0.504142 -0.45357 -0.405186 -0.359936 -0.318353 -0.280663 -0.246891 -0.216909 -0.190468 -0.167239 -0.146853 -0.128942 -0.11316 -0.0992016 -0.0868108 -0.0757787 -0.0659398 -0.0571633 -0.0493443 -0.0423956 -0.0362415 -0.0308134 -0.0260472 -0.0218815 -0.0182574 -0.0151185 -0.0124101 -0.0100811 -0.00808023 -0.00636407 -0.00487839 -0.00359657 -0.0024371 -0.0014287 -0.000382203 -0.689283 -0.65722 -0.61713 -0.574608 -0.531108 -0.486956 -0.44289 -0.399949 -0.359034 -0.320743 -0.285423 -0.253229 -0.22417 -0.198131 -0.174906 -0.154241 -0.135861 -0.119496 -0.104901 -0.0918634 -0.080204 -0.0697766 -0.0604614 -0.0521583 -0.0447809 -0.0382515 -0.032498 -0.0274516 -0.0230464 -0.0192184 -0.0159065 -0.0130517 -0.010599 -0.00849347 -0.00668829 -0.00512702 -0.00377884 -0.00256238 -0.00149923 -0.0004066 -0.639409 -0.61377 -0.581658 -0.546598 -0.509768 -0.471661 -0.432998 -0.394687 -0.357552 -0.322209 -0.289072 -0.258388 -0.230265 -0.204693 -0.181569 -0.160735 -0.141996 -0.125155 -0.110021 -0.0964222 -0.0842103 -0.0732586 -0.0634593 -0.0547186 -0.0469521 -0.0400812 -0.034031 -0.0287292 -0.0241054 -0.0200914 -0.0166219 -0.0136338 -0.0110685 -0.00886795 -0.00698195 -0.00535212 -0.00394378 -0.00267575 -0.00156289 -0.000428951 -0.601075 -0.580015 -0.553708 -0.524186 -0.492399 -0.45894 -0.424507 -0.389893 -0.355842 -0.322956 -0.291684 -0.262328 -0.235065 -0.209961 -0.186994 -0.166077 -0.147087 -0.129882 -0.11432 -0.100267 -0.0875998 -0.0762115 -0.066006 -0.0568959 -0.0487996 -0.0416383 -0.0353356 -0.029816 -0.0250058 -0.0208333 -0.0172295 -0.014128 -0.0114668 -0.00918553 -0.00723088 -0.00554288 -0.00408347 -0.00277176 -0.00161659 -0.000448238 -0.574407 -0.556346 -0.533896 -0.508116 -0.479783 -0.449547 -0.418088 -0.386115 -0.354302 -0.323231 -0.293361 -0.265026 -0.238446 -0.213736 -0.190926 -0.169986 -0.150838 -0.133386 -0.117522 -0.10314 -0.0901402 -0.0784294 -0.0679218 -0.0585355 -0.0501916 -0.042812 -0.0363189 -0.030635 -0.0256843 -0.0213921 -0.0176869 -0.0144998 -0.0117665 -0.00942432 -0.007418 -0.00568626 -0.00418835 -0.00284393 -0.0016565 -0.000463252 -0.5602 -0.543665 -0.523214 -0.499392 -0.472878 -0.444353 -0.414487 -0.383942 -0.353354 -0.323287 -0.294201 -0.266446 -0.24026 -0.215785 -0.193079 -0.172138 -0.152914 -0.135332 -0.119306 -0.104745 -0.091562 -0.0796727 -0.0689969 -0.0594564 -0.0509739 -0.0434718 -0.0368717 -0.0310956 -0.0260657 -0.0217062 -0.017944 -0.0147088 -0.0119348 -0.00955848 -0.00752307 -0.00576686 -0.0042471 -0.00288469 -0.00167805 -0.000472388 -4.84954 -4.84752 -4.83974 -4.82624 -4.80712 -4.78253 -4.75262 -4.71757 -4.67755 -4.63274 -4.58332 -4.52945 -4.47131 -4.40903 -4.34266 -4.27225 -4.19729 -4.11852 -4.03069 -3.98001 -4.08149 -4.07895 -4.07186 -4.06033 -4.04449 -4.02449 -4.00055 -3.97287 -3.94164 -3.90708 -3.86941 -3.82881 -3.78546 -3.7395 -3.69098 -3.63992 -3.58602 -3.52996 -3.46851 -3.4347 -3.48716 -3.48346 -3.47638 -3.46602 -3.45249 -3.43594 -3.41653 -3.39442 -3.36976 -3.34273 -3.31345 -3.28209 -3.24877 -3.2136 -3.17667 -3.13807 -3.09772 -3.05594 -3.01048 -2.98351 -3.00692 -3.00299 -2.99639 -2.9872 -2.97553 -2.96148 -2.9452 -2.9268 -2.9064 -2.88415 -2.86016 -2.83456 -2.80746 -2.77901 -2.7493 -2.71846 -2.68658 -2.65387 -2.61935 -2.59889 -2.61017 -2.60699 -2.60167 -2.59428 -2.58489 -2.57362 -2.56057 -2.54584 -2.52954 -2.51179 -2.49269 -2.47237 -2.45093 -2.42849 -2.40516 -2.38103 -2.35623 -2.33077 -2.30413 -2.28722 -2.27647 -2.27441 -2.27062 -2.26517 -2.25811 -2.24953 -2.23951 -2.22815 -2.21552 -2.20172 -2.18684 -2.17097 -2.15421 -2.13663 -2.11834 -2.09942 -2.07997 -2.05994 -2.03914 -2.02516 -1.99184 -1.99094 -1.98863 -1.98497 -1.98001 -1.9738 -1.96641 -1.95792 -1.9484 -1.93791 -1.92653 -1.91433 -1.9014 -1.8878 -1.87363 -1.85895 -1.84384 -1.82826 -1.81224 -1.8009 -1.74725 -1.74739 -1.74639 -1.74427 -1.74107 -1.73684 -1.73164 -1.72552 -1.71853 -1.71074 -1.7022 -1.69298 -1.68314 -1.67275 -1.66186 -1.65055 -1.63888 -1.6268 -1.6145 -1.60535 -1.53631 -1.53734 -1.53741 -1.53654 -1.53477 -1.53213 -1.52867 -1.52442 -1.51944 -1.51377 -1.50746 -1.50055 -1.49311 -1.48518 -1.47682 -1.46808 -1.45902 -1.44961 -1.44011 -1.43268 -1.35436 -1.3561 -1.35702 -1.35713 -1.35647 -1.35507 -1.35295 -1.35015 -1.3467 -1.34265 -1.33803 -1.33288 -1.32725 -1.32118 -1.31471 -1.3079 -1.30077 -1.29333 -1.28583 -1.27966 -1.19781 -1.20008 -1.20163 -1.20249 -1.20267 -1.20219 -1.20108 -1.19937 -1.19707 -1.19423 -1.19088 -1.18704 -1.18276 -1.17806 -1.17298 -1.16757 -1.16185 -1.15583 -1.14974 -1.14446 -1.06369 -1.06634 -1.06835 -1.06975 -1.07054 -1.07074 -1.07037 -1.06945 -1.06801 -1.06606 -1.06363 -1.06076 -1.05746 -1.05377 -1.04971 -1.04532 -1.04062 -1.03562 -1.03052 -1.02588 -0.949509 -0.952401 -0.954727 -0.956494 -0.957712 -0.958393 -0.958553 -0.958208 -0.957375 -0.956074 -0.954326 -0.952152 -0.949574 -0.946616 -0.943304 -0.939661 -0.935706 -0.931455 -0.927056 -0.922882 -0.853085 -0.856122 -0.858644 -0.860655 -0.862161 -0.863173 -0.863701 -0.863759 -0.863362 -0.862524 -0.861263 -0.859597 -0.857544 -0.855123 -0.852356 -0.849263 -0.845859 -0.84216 -0.838276 -0.834459 -0.772575 -0.775682 -0.778313 -0.78047 -0.78216 -0.783389 -0.784166 -0.784502 -0.784409 -0.783899 -0.782986 -0.781686 -0.780013 -0.777986 -0.77562 -0.772934 -0.769942 -0.766658 -0.763161 -0.759622 -0.706491 -0.709613 -0.712291 -0.714526 -0.716323 -0.717688 -0.718627 -0.719149 -0.719263 -0.718981 -0.718314 -0.717276 -0.715878 -0.714137 -0.712066 -0.709681 -0.706996 -0.704023 -0.700819 -0.697495 -0.653666 -0.656769 -0.659453 -0.661721 -0.663574 -0.665018 -0.666058 -0.666701 -0.666955 -0.666829 -0.666334 -0.665481 -0.664281 -0.662746 -0.660891 -0.658728 -0.65627 -0.65353 -0.650546 -0.647386 -0.613481 -0.616545 -0.619211 -0.62148 -0.623355 -0.624839 -0.625937 -0.626654 -0.626998 -0.626976 -0.626596 -0.625869 -0.624805 -0.623415 -0.62171 -0.619702 -0.617404 -0.614828 -0.611998 -0.608951 -0.585645 -0.58867 -0.591313 -0.593575 -0.595457 -0.596963 -0.598096 -0.598861 -0.599263 -0.59931 -0.599009 -0.598369 -0.597397 -0.596105 -0.594502 -0.592598 -0.590406 -0.587937 -0.585205 -0.582231 -0.571032 -0.574011 -0.57662 -0.578861 -0.580735 -0.582243 -0.58339 -0.584179 -0.584615 -0.584702 -0.584447 -0.583857 -0.582939 -0.5817 -0.580149 -0.578295 -0.576148 -0.573717 -0.571013 -0.568044 -3.65699 -3.84306 -3.89649 -3.98562 -4.08117 -4.16619 -4.24696 -4.32548 -4.4 -4.46954 -4.53384 -4.59262 -4.64562 -4.69264 -4.73358 -4.76836 -4.79696 -4.81937 -4.83559 -4.84566 -3.20301 -3.33913 -3.33234 -3.3804 -3.46085 -3.53363 -3.59897 -3.66269 -3.724 -3.78104 -3.83332 -3.88079 -3.92335 -3.96089 -3.99335 -4.02069 -4.04294 -4.0601 -4.07221 -4.07934 -2.77921 -2.91609 -2.91166 -2.94734 -3.01873 -3.08395 -3.13748 -3.1868 -3.23374 -3.27696 -3.31589 -3.35071 -3.38156 -3.40846 -3.43138 -3.45034 -3.46538 -3.47652 -3.48382 -3.48736 -2.43069 -2.56414 -2.56478 -2.5887 -2.64501 -2.69896 -2.74188 -2.77989 -2.81605 -2.84964 -2.87989 -2.90681 -2.93053 -2.95108 -2.96844 -2.98261 -2.9936 -3.00147 -3.00627 -3.00808 -2.14059 -2.25662 -2.25953 -2.27514 -2.31781 -2.36137 -2.39652 -2.4271 -2.45606 -2.48317 -2.50772 -2.52955 -2.54874 -2.56533 -2.57932 -2.59072 -2.59955 -2.60586 -2.60969 -2.61111 -1.88712 -1.98093 -1.98613 -1.99876 -2.03221 -2.06768 -2.09711 -2.1226 -2.14647 -2.16883 -2.18915 -2.20726 -2.2232 -2.23703 -2.24876 -2.2584 -2.26598 -2.27153 -2.2751 -2.27673 -1.66225 -1.73617 -1.74353 -1.75573 -1.78299 -1.81202 -1.83672 -1.85823 -1.87822 -1.89692 -1.91399 -1.92931 -1.94288 -1.95475 -1.96494 -1.97346 -1.98032 -1.98556 -1.9892 -1.99128 -1.46389 -1.52185 -1.53037 -1.54235 -1.56499 -1.58886 -1.60959 -1.62788 -1.64488 -1.66078 -1.6754 -1.68863 -1.70047 -1.71096 -1.72009 -1.72788 -1.73434 -1.73948 -1.74333 -1.74591 -1.28891 -1.33438 -1.34316 -1.35462 -1.37368 -1.39353 -1.4111 -1.42687 -1.4416 -1.45542 -1.46823 -1.47993 -1.49052 -1.50003 -1.50844 -1.51576 -1.52199 -1.52715 -1.53124 -1.53429 -1.13416 -1.17012 -1.17887 -1.18974 -1.20608 -1.22292 -1.23811 -1.25197 -1.265 -1.27729 -1.28875 -1.29933 -1.30902 -1.31782 -1.32572 -1.33272 -1.33883 -1.34403 -1.34835 -1.35179 -0.99788 -1.02676 -1.03555 -1.04594 -1.06025 -1.07487 -1.08829 -1.1007 -1.11245 -1.12359 -1.13406 -1.1438 -1.1528 -1.16107 -1.16858 -1.17535 -1.18135 -1.18659 -1.19108 -1.19482 -0.879119 -0.902731 -0.911673 -0.921724 -0.934509 -0.947486 -0.959568 -0.970884 -0.981654 -0.991908 -1.0016 -1.01068 -1.01915 -1.02699 -1.03419 -1.04074 -1.04664 -1.05189 -1.05648 -1.06041 -0.776993 -0.796638 -0.805747 -0.81555 -0.827194 -0.838925 -0.849985 -0.860445 -0.870445 -0.879997 -0.889064 -0.897616 -0.905635 -0.91311 -0.920031 -0.926387 -0.93217 -0.937375 -0.942001 -0.946045 -0.69044 -0.70706 -0.716285 -0.725884 -0.736656 -0.747429 -0.757686 -0.767461 -0.776837 -0.785815 -0.794366 -0.802466 -0.810098 -0.81725 -0.823909 -0.830065 -0.835711 -0.840839 -0.845445 -0.849527 -0.618295 -0.632589 -0.641849 -0.651253 -0.661343 -0.671366 -0.680977 -0.690189 -0.699044 -0.707539 -0.715651 -0.723358 -0.730646 -0.737501 -0.743911 -0.749866 -0.755358 -0.760378 -0.764924 -0.76899 -0.559404 -0.571915 -0.581134 -0.590338 -0.599885 -0.609311 -0.618396 -0.627137 -0.635554 -0.643638 -0.651371 -0.658735 -0.665714 -0.672298 -0.678472 -0.684229 -0.689559 -0.694455 -0.698911 -0.702924 -0.512726 -0.523887 -0.533008 -0.542015 -0.551128 -0.560079 -0.568735 -0.577085 -0.585134 -0.592871 -0.60028 -0.607345 -0.614053 -0.620391 -0.626349 -0.631918 -0.637088 -0.641853 -0.646207 -0.650146 -0.477531 -0.487723 -0.496733 -0.505567 -0.51435 -0.522941 -0.531265 -0.539306 -0.547061 -0.554517 -0.561661 -0.568478 -0.574957 -0.581085 -0.586854 -0.592253 -0.597275 -0.601914 -0.606164 -0.610021 -0.453405 -0.462964 -0.47188 -0.480583 -0.489134 -0.497472 -0.505555 -0.513368 -0.520903 -0.528147 -0.535088 -0.541714 -0.548013 -0.553976 -0.559593 -0.564856 -0.569758 -0.574292 -0.578454 -0.582239 -0.440806 -0.450125 -0.459052 -0.467734 -0.476206 -0.484441 -0.492417 -0.50012 -0.507537 -0.51466 -0.521477 -0.527977 -0.534152 -0.539994 -0.545495 -0.550648 -0.555448 -0.55989 -0.56397 -0.567685 0.739611 0.738642 0.736188 0.732078 0.725809 0.71674 0.703959 0.686243 0.661928 0.628775 0.583667 0.522422 0.438928 0.325161 0.168146 -0.0484681 -0.357081 -0.8026 -1.48602 -2.67794 0.709838 0.708546 0.705602 0.700631 0.693155 0.682509 0.667754 0.647631 0.620438 0.583897 0.534873 0.469175 0.38079 0.26179 0.099795 -0.121084 -0.429537 -0.865862 -1.5013 -2.4947 0.678281 0.676829 0.673522 0.667858 0.659374 0.647407 0.63102 0.608958 0.579545 0.540558 0.48898 0.420822 0.330463 0.210635 0.0503163 -0.163904 -0.454627 -0.848504 -1.38973 -2.13459 0.644855 0.643192 0.63944 0.633016 0.623465 0.610133 0.592089 0.568099 0.536529 0.495239 0.44137 0.3712 0.279602 0.160138 0.00331373 -0.201386 -0.471637 -0.819593 -1.28573 -1.84569 0.609624 0.607736 0.603519 0.596332 0.585725 0.571057 0.551417 0.525599 0.492029 0.448672 0.392851 0.321156 0.228984 0.110786 -0.0415109 -0.235556 -0.486379 -0.794029 -1.20721 -1.64925 0.572697 0.570601 0.565945 0.558049 0.546465 0.530579 0.509508 0.482096 0.446851 0.401872 0.344706 0.272295 0.180598 0.0650035 -0.0812978 -0.263229 -0.494608 -0.766297 -1.13189 -1.49564 0.534227 0.531944 0.526888 0.518356 0.505904 0.488954 0.46667 0.437962 0.401445 0.355385 0.297585 0.225382 0.135323 0.0237459 -0.11502 -0.283491 -0.494401 -0.732952 -1.04991 -1.35593 0.494425 0.491978 0.486572 0.47749 0.464303 0.446473 0.423227 0.393558 0.356212 0.309643 0.251939 0.180852 0.0935204 -0.012822 -0.142773 -0.296991 -0.486539 -0.694903 -0.964311 -1.22396 0.453575 0.450992 0.445295 0.435768 0.422 0.403504 0.379579 0.34932 0.311615 0.265127 0.208239 0.139117 0.0554751 -0.044667 -0.164869 -0.304621 -0.4727 -0.654093 -0.880041 -1.09992 0.412037 0.409348 0.403432 0.393581 0.379407 0.360482 0.336187 0.305727 0.268147 0.222324 0.166935 0.100542 0.021395 -0.0718407 -0.181737 -0.307249 -0.454611 -0.611934 -0.799928 -0.984495 0.370251 0.367493 0.361436 0.351392 0.337 0.317896 0.293548 0.263282 0.226298 0.181687 0.128407 0.0653797 -0.00866023 -0.094551 -0.193976 -0.305783 -0.433842 -0.569547 -0.725344 -0.878783 0.328743 0.325953 0.319837 0.309734 0.295317 0.276284 0.252195 0.222495 0.186539 0.143617 0.0929498 0.0337667 -0.0347788 -0.113156 -0.202312 -0.301187 -0.411781 -0.528149 -0.657174 -0.783984 0.288121 0.285337 0.279243 0.269213 0.254954 0.236227 0.212682 0.183878 0.149315 0.108464 0.0607745 0.00573512 -0.0571616 -0.128114 -0.207519 -0.294449 -0.389631 -0.488992 -0.596053 -0.700756 0.249078 0.246334 0.240337 0.230498 0.216561 0.198345 0.175583 0.147939 0.115044 0.0765269 0.0320254 -0.0187612 -0.076081 -0.139937 -0.210353 -0.286511 -0.368387 -0.453131 -0.542345 -0.629105 0.212388 0.209712 0.203874 0.194324 0.18084 0.163291 0.141488 0.115184 0.0841243 0.0480655 0.00679866 -0.0398161 -0.0918392 -0.149138 -0.211506 -0.278208 -0.34883 -0.421311 -0.496177 -0.568631 0.178907 0.176321 0.170686 0.16149 0.148544 0.131759 0.11101 0.0861273 0.0569455 0.0233252 -0.0148275 -0.057534 -0.104727 -0.156184 -0.211574 -0.270222 -0.331545 -0.393999 -0.457509 -0.518758 0.149585 0.147099 0.141687 0.132873 0.120494 0.104497 0.0848044 0.0613109 0.033919 0.00256683 -0.0327565 -0.0719903 -0.114986 -0.161466 -0.211039 -0.263085 -0.316963 -0.371478 -0.426224 -0.478905 0.125487 0.123099 0.117902 0.109452 0.0976053 0.0823355 0.0636026 0.0413457 0.0155178 -0.0138891 -0.0468298 -0.0831903 -0.122773 -0.165273 -0.210275 -0.257204 -0.305418 -0.353954 -0.402229 -0.448637 0.107838 0.10553 0.10051 0.092357 0.0809388 0.0662474 0.0482677 0.0269689 0.00233663 -0.0256032 -0.0567712 -0.0910221 -0.128132 -0.167784 -0.209559 -0.252914 -0.297226 -0.341677 -0.385596 -0.427794 0.0981033 0.0958414 0.0909241 0.0829477 0.0717824 0.0574278 0.0398824 0.0191317 -0.00482225 -0.0319369 -0.0621166 -0.0952016 -0.130957 -0.169061 -0.209097 -0.250541 -0.292784 -0.335085 -0.37674 -0.416781 1.06356 1.06489 1.06812 1.07348 1.08076 1.08987 1.10065 1.1129 1.12631 1.14041 1.15461 1.16777 1.17869 1.1843 1.18268 1.164 1.12568 1.02133 0.808536 0.21304 1.04846 1.04967 1.05258 1.05747 1.06409 1.07234 1.08204 1.09293 1.10467 1.11672 1.12839 1.13845 1.14547 1.14635 1.13849 1.11258 1.06323 0.949037 0.713939 0.114522 1.0332 1.0343 1.03688 1.04129 1.04725 1.05465 1.06325 1.07277 1.08282 1.09279 1.10188 1.10877 1.11182 1.10786 1.09357 1.06019 0.999374 0.874784 0.616359 0.011922 1.0178 1.01878 1.02104 1.02498 1.03027 1.0368 1.0443 1.05245 1.06078 1.06863 1.07511 1.07879 1.07777 1.06886 1.04794 1.00687 0.93418 0.798703 0.515975 -0.0943877 1.00227 1.00313 1.00507 1.00853 1.01317 1.01883 1.02522 1.03197 1.03857 1.04429 1.0481 1.04851 1.04336 1.02937 1.00167 0.952678 0.867727 0.72091 0.412948 -0.204078 0.986626 0.987374 0.988994 0.991986 0.99596 1.00074 1.00602 1.01137 1.01622 1.01978 1.0209 1.01799 1.00861 0.989444 0.954785 0.897661 0.80009 0.641508 0.30744 -0.316869 0.970875 0.971512 0.972824 0.975346 0.97866 0.982572 0.986727 0.990667 0.993756 0.995127 0.993521 0.987232 0.973559 0.949109 0.907344 0.841861 0.73135 0.560588 0.199622 -0.432521 0.955033 0.955565 0.956576 0.958634 0.961291 0.964331 0.967363 0.969886 0.971199 0.970363 0.965996 0.956282 0.938244 0.9084 0.859387 0.785318 0.661589 0.478222 0.0896887 -0.550846 0.939115 0.939546 0.940266 0.941866 0.943871 0.946041 0.947949 0.949049 0.948575 0.945512 0.938354 0.925165 0.902696 0.867347 0.81096 0.72807 0.590893 0.39446 -0.0221329 -0.67173 0.923133 0.923469 0.923909 0.92506 0.926419 0.927722 0.928507 0.928178 0.925908 0.920598 0.91062 0.893909 0.866946 0.825983 0.762104 0.670144 0.519356 0.309322 -0.135574 -0.795171 0.9071 0.907348 0.907523 0.908232 0.908953 0.909394 0.909056 0.907296 0.90322 0.895646 0.882821 0.862542 0.831024 0.784337 0.712862 0.611565 0.447073 0.222794 -0.250309 -0.921325 0.891028 0.891197 0.891122 0.8914 0.891491 0.891075 0.889617 0.886424 0.880535 0.870682 0.854984 0.83109 0.794959 0.742434 0.663268 0.552354 0.374142 0.134827 -0.365941 -1.05056 0.874931 0.875031 0.874722 0.87458 0.874051 0.872785 0.870209 0.865583 0.857875 0.845727 0.827132 0.799579 0.758777 0.7003 0.613358 0.492527 0.30066 0.0453396 -0.481987 -1.18354 0.85882 0.858862 0.858337 0.857789 0.85665 0.854542 0.850855 0.844795 0.835262 0.820806 0.79929 0.768034 0.722506 0.657962 0.563161 0.432101 0.226717 -0.0457703 -0.597884 -1.32131 0.842706 0.842703 0.841982 0.841041 0.839303 0.836362 0.831568 0.824077 0.812715 0.795937 0.771478 0.736474 0.686165 0.615439 0.512696 0.371088 0.152381 -0.138614 -0.713006 -1.46535 0.826599 0.826564 0.825667 0.824346 0.822022 0.818256 0.812362 0.803439 0.790245 0.771133 0.743707 0.704914 0.649767 0.572748 0.461976 0.309508 0.077689 -0.233289 -0.826736 -1.61769 0.810512 0.810463 0.809416 0.807732 0.804837 0.800259 0.793272 0.782923 0.767895 0.746438 0.716026 0.673403 0.613362 0.529941 0.411048 0.247435 0.0026962 -0.329778 -0.938545 -1.78093 0.794462 0.794439 0.793285 0.791273 0.787837 0.782473 0.774417 0.76266 0.74581 0.72201 0.688598 0.642107 0.577109 0.487167 0.360032 0.185038 -0.0724253 -0.427676 -1.04775 -1.95818 0.778453 0.778486 0.777267 0.774955 0.771005 0.764876 0.755767 0.74261 0.723935 0.697773 0.661322 0.610886 0.540809 0.444148 0.308528 0.121843 -0.148309 -0.527246 -1.15457 -2.15239 0.762403 0.762329 0.7609 0.75814 0.753524 0.746477 0.736156 0.721433 0.700759 0.672053 0.632375 0.577805 0.502461 0.398886 0.254511 0.0556208 -0.228699 -0.634225 -1.2753 -2.38648 1.3157 1.31872 1.32647 1.33934 1.35729 1.38053 1.40931 1.44394 1.48476 1.53216 1.58648 1.64787 1.71616 1.78976 1.86486 1.93175 1.9719 1.93912 1.66462 0.688886 1.30581 1.30874 1.31635 1.32894 1.3465 1.3692 1.39729 1.43105 1.47081 1.5169 1.56964 1.6291 1.69496 1.76539 1.83617 1.89642 1.92638 1.8774 1.62312 0.639968 1.29565 1.29856 1.30608 1.3184 1.33552 1.35763 1.38494 1.4177 1.45624 1.50086 1.55184 1.60922 1.67277 1.74089 1.81053 1.87252 1.91068 1.87705 1.69044 0.76524 1.28517 1.28805 1.29546 1.30751 1.32422 1.34576 1.37232 1.40415 1.44155 1.48479 1.53415 1.58965 1.65113 1.7172 1.78571 1.84861 1.89367 1.87091 1.73437 0.846825 1.27438 1.27721 1.28449 1.29626 1.31254 1.33349 1.3593 1.3902 1.42646 1.46834 1.51608 1.56968 1.62903 1.69277 1.75931 1.82082 1.86836 1.84654 1.73803 0.882852 1.26327 1.26605 1.27317 1.28464 1.30048 1.32083 1.34586 1.3758 1.41088 1.45133 1.49739 1.549 1.60609 1.66725 1.73134 1.79039 1.83869 1.81471 1.7262 0.909108 1.25185 1.25457 1.26153 1.27268 1.28805 1.30777 1.33201 1.36095 1.39481 1.4338 1.47811 1.52765 1.58238 1.6408 1.70221 1.75836 1.80685 1.78073 1.70817 0.92936 1.24014 1.24279 1.24956 1.26038 1.27526 1.29434 1.31775 1.34567 1.37828 1.41575 1.45827 1.50568 1.55794 1.61349 1.67202 1.72484 1.77275 1.74428 1.68218 0.937931 1.22812 1.2307 1.23727 1.24774 1.26213 1.28054 1.3031 1.32996 1.36129 1.39721 1.43788 1.48308 1.53279 1.58532 1.64072 1.68978 1.73609 1.70464 1.64727 0.933721 1.21581 1.21831 1.22467 1.23477 1.24864 1.26637 1.28807 1.31384 1.34386 1.37818 1.41694 1.45986 1.50691 1.55629 1.6083 1.6532 1.69688 1.66195 1.6046 0.918115 1.20322 1.20563 1.21176 1.22149 1.23482 1.25185 1.27265 1.29732 1.32598 1.35867 1.39547 1.43604 1.48033 1.52639 1.57476 1.61517 1.65525 1.61649 1.5554 0.892251 1.19035 1.19266 1.19855 1.20789 1.22068 1.23698 1.25686 1.2804 1.30767 1.33868 1.37347 1.41161 1.45304 1.49565 1.54013 1.57575 1.61131 1.56839 1.50045 0.856851 1.17721 1.17943 1.18506 1.19399 1.20621 1.22178 1.24072 1.2631 1.28895 1.31824 1.35095 1.3866 1.42506 1.46408 1.50441 1.53498 1.56513 1.51766 1.44025 0.812597 1.16381 1.16592 1.17129 1.1798 1.19145 1.20625 1.22424 1.24543 1.26983 1.29736 1.32794 1.36101 1.3964 1.43169 1.46763 1.49289 1.51681 1.46431 1.37523 0.760191 1.15015 1.15217 1.15725 1.16534 1.17639 1.19042 1.20743 1.22741 1.25033 1.27605 1.30445 1.33488 1.36708 1.39851 1.4298 1.44951 1.46642 1.40838 1.30574 0.700293 1.13626 1.13816 1.14295 1.15061 1.16106 1.1743 1.19031 1.20905 1.23046 1.25433 1.28049 1.30822 1.33712 1.36457 1.39095 1.40487 1.41407 1.34988 1.23208 0.633495 1.12213 1.12393 1.12842 1.13563 1.14546 1.1579 1.1729 1.19038 1.21024 1.23223 1.2561 1.28104 1.30655 1.32988 1.35112 1.359 1.35982 1.28888 1.15449 0.560325 1.10779 1.10947 1.11365 1.12041 1.12962 1.14124 1.1552 1.1714 1.18969 1.20977 1.23129 1.25339 1.2754 1.29448 1.31034 1.31194 1.30378 1.22544 1.07316 0.48126 1.09324 1.0948 1.09867 1.10497 1.11354 1.12433 1.13725 1.15215 1.16884 1.18696 1.20609 1.22527 1.24368 1.25839 1.26864 1.26372 1.24602 1.15963 0.988276 0.39674 1.07849 1.07994 1.08349 1.08932 1.09725 1.1072 1.11906 1.13264 1.1477 1.16383 1.18052 1.19672 1.21143 1.22165 1.22607 1.21439 1.18662 1.09155 0.899999 0.307172 1.46897 1.46857 1.46765 1.46608 1.46375 1.4605 1.45615 1.45046 1.44313 1.43383 1.42219 1.40779 1.39017 1.36886 1.34334 1.31313 1.27775 1.23679 1.18985 1.13685 1.47085 1.47055 1.46984 1.4686 1.46671 1.46403 1.46034 1.45539 1.44887 1.44043 1.42967 1.41611 1.39928 1.37862 1.35358 1.32361 1.28815 1.24674 1.19892 1.14461 1.47387 1.47375 1.47341 1.47277 1.47171 1.47005 1.46758 1.46402 1.45903 1.45221 1.4431 1.43117 1.41585 1.39649 1.37243 1.34297 1.30745 1.26526 1.21584 1.15898 1.47719 1.47732 1.4775 1.47769 1.47778 1.47756 1.4768 1.4752 1.47238 1.46788 1.46118 1.45165 1.43859 1.42122 1.39869 1.37014 1.33469 1.29151 1.23994 1.17944 1.48007 1.48048 1.48131 1.48253 1.48402 1.4856 1.48698 1.48786 1.48779 1.48629 1.48273 1.47636 1.46635 1.45173 1.43141 1.40426 1.36916 1.32488 1.27074 1.20547 1.48183 1.48259 1.48414 1.48653 1.48966 1.4933 1.49719 1.50098 1.5042 1.50631 1.50658 1.50417 1.49804 1.48699 1.46966 1.44454 1.4102 1.36482 1.30786 1.23656 1.48198 1.4831 1.48544 1.48911 1.49402 1.49994 1.5066 1.51365 1.5206 1.52686 1.53162 1.53391 1.53251 1.52592 1.51246 1.49014 1.45708 1.41067 1.35082 1.27199 1.48017 1.48167 1.48482 1.48982 1.49659 1.50491 1.51452 1.52506 1.53607 1.54691 1.55673 1.56442 1.56857 1.56738 1.55874 1.54009 1.50895 1.46166 1.39894 1.31092 1.47622 1.47808 1.48205 1.48838 1.49702 1.50777 1.52038 1.53454 1.5498 1.56552 1.58083 1.59452 1.60499 1.61013 1.60732 1.5933 1.56477 1.51686 1.45132 1.3527 1.47007 1.47228 1.47702 1.48465 1.4951 1.5082 1.52377 1.54153 1.56109 1.58183 1.6029 1.62304 1.64049 1.65285 1.6569 1.64858 1.62336 1.5753 1.50692 1.39718 1.46179 1.46433 1.46979 1.4786 1.49075 1.50608 1.52445 1.54567 1.56941 1.59513 1.62204 1.64889 1.67383 1.69418 1.70615 1.70466 1.68354 1.63605 1.56461 1.44408 1.45155 1.45437 1.46047 1.47036 1.48403 1.50137 1.52231 1.54673 1.57439 1.60488 1.6375 1.67109 1.7038 1.73277 1.75364 1.76021 1.74417 1.6983 1.62322 1.4918 1.43956 1.44262 1.44927 1.46009 1.47509 1.49419 1.51739 1.54465 1.57586 1.61072 1.6487 1.6888 1.7293 1.76727 1.79794 1.81386 1.80421 1.76144 1.68141 1.5366 1.42609 1.42934 1.43645 1.44805 1.46415 1.48472 1.50983 1.53952 1.57379 1.6125 1.65529 1.70141 1.74937 1.7964 1.83755 1.86416 1.86263 1.8248 1.73725 1.57245 1.41142 1.41482 1.42229 1.43451 1.45149 1.47324 1.49988 1.53154 1.56833 1.61025 1.65715 1.70854 1.76329 1.81901 1.87092 1.90945 1.91818 1.88726 1.78771 1.59038 1.39583 1.39933 1.40708 1.41976 1.43739 1.46002 1.48783 1.521 1.55973 1.60417 1.65435 1.71006 1.7706 1.83413 1.89648 1.9477 1.96892 1.94678 1.82857 1.57806 1.37958 1.38315 1.39108 1.40408 1.42216 1.44541 1.47402 1.50826 1.54837 1.59462 1.64721 1.70616 1.77119 1.84114 1.91283 1.97671 2.01225 2.00033 1.85581 1.52227 1.36294 1.36654 1.37459 1.3878 1.40616 1.42977 1.45889 1.49378 1.53477 1.58218 1.63631 1.69739 1.76545 1.84001 1.91926 1.99533 2.04729 2.04675 1.86847 1.41372 1.34614 1.34975 1.35791 1.37124 1.38973 1.41353 1.44288 1.47808 1.51949 1.56745 1.62235 1.68445 1.754 1.83104 1.91551 2.0034 2.07658 2.09194 1.87431 1.25372 1.3293 1.3328 1.34095 1.35423 1.37263 1.39633 1.42557 1.46066 1.50197 1.54985 1.60468 1.6667 1.73609 1.81282 1.89749 1.98956 2.07842 2.11429 1.88217 1.08226 1.09934 1.08387 1.06811 1.05202 1.03556 1.01875 1.00159 0.984102 0.966293 0.948181 0.929778 0.911102 0.89217 0.873 0.853613 0.834029 0.814269 0.794355 0.774312 0.754161 1.10611 1.09029 1.07413 1.05766 1.04079 1.02352 1.00586 0.987824 0.969431 0.950691 0.93162 0.912236 0.892557 0.872604 0.8524 0.831968 0.811332 0.790518 0.769553 0.748465 1.11837 1.10154 1.08431 1.0668 1.0489 1.03055 1.01176 0.992561 0.972966 0.952989 0.932648 0.91196 0.890946 0.869629 0.848033 0.826183 0.804106 0.781829 0.759383 0.736797 1.13597 1.11759 1.09872 1.07965 1.06018 1.04021 1.01976 0.998838 0.97748 0.955695 0.933501 0.910917 0.887965 0.864669 0.841054 0.817147 0.792979 0.768578 0.743977 0.719208 1.15844 1.13798 1.11684 1.09565 1.07406 1.05191 1.02919 1.00596 0.982234 0.95803 0.933362 0.908252 0.882723 0.856801 0.830511 0.803884 0.776949 0.74974 0.72229 0.694634 1.18577 1.16275 1.13873 1.11479 1.0905 1.06555 1.03996 1.01378 0.987041 0.959755 0.931941 0.90362 0.874817 0.84556 0.815876 0.785797 0.755355 0.724585 0.693523 0.662205 1.21813 1.19219 1.16455 1.13716 1.10949 1.08109 1.05193 1.02209 0.99161 0.960509 0.928807 0.896527 0.863696 0.830346 0.796509 0.762218 0.72751 0.692422 0.656994 0.621269 1.25646 1.22745 1.19523 1.16346 1.13163 1.09901 1.0655 1.03121 0.996203 0.96051 0.924152 0.887158 0.849566 0.811412 0.772738 0.733585 0.693999 0.654027 0.613716 0.573117 1.30292 1.2709 1.23274 1.19537 1.15848 1.12081 1.08213 1.04258 1.0023 0.961325 0.919677 0.877401 0.834552 0.791187 0.747361 0.703137 0.658578 0.613746 0.568709 0.523532 1.36083 1.32602 1.28023 1.23598 1.19319 1.14978 1.10528 1.05995 1.01398 0.96742 0.92031 0.872718 0.824723 0.776411 0.727866 0.679175 0.630426 0.581705 0.533097 0.484678 1.43299 1.39586 1.34114 1.2894 1.24055 1.1913 1.14099 1.09005 1.03868 0.98695 0.934913 0.882666 0.830318 0.77798 0.725765 0.673783 0.622135 0.57092 0.520222 0.47011 1.51905 1.48054 1.41733 1.3592 1.30531 1.25109 1.19588 1.14021 1.08429 1.02819 0.971975 0.915787 0.859763 0.804042 0.748755 0.694027 0.639964 0.586658 0.534177 0.482558 1.61277 1.57443 1.5057 1.44405 1.38695 1.32911 1.27012 1.21057 1.15066 1.09047 1.03015 0.969886 0.909861 0.850247 0.791202 0.732865 0.675351 0.618744 0.563097 0.508417 1.70043 1.66386 1.59414 1.53213 1.4734 1.41301 1.35096 1.28783 1.22385 1.1592 1.09413 1.02889 0.963726 0.898857 0.834485 0.770779 0.707872 0.645858 0.584787 0.52465 1.76216 1.72833 1.6616 1.60126 1.5418 1.4795 1.41474 1.34808 1.27981 1.21026 1.13976 1.06864 0.997215 0.925771 0.854557 0.783786 0.713623 0.644189 0.575549 0.507701 1.77643 1.74547 1.68359 1.62541 1.56553 1.50171 1.43452 1.36445 1.29191 1.2173 1.14104 1.06353 0.985149 0.906258 0.827165 0.748135 0.669382 0.591069 0.513291 0.436069 1.72379 1.69497 1.63709 1.57988 1.51894 1.4532 1.38324 1.3095 1.23244 1.15253 1.07022 0.985988 0.900267 0.813468 0.725955 0.638049 0.550011 0.462048 0.374296 0.286804 1.58121 1.55096 1.49298 1.43412 1.37076 1.30233 1.22916 1.15157 1.06994 0.984714 0.89637 0.805391 0.712257 0.617432 0.521344 0.424376 0.326859 0.229066 0.131189 0.0333275 1.35019 1.31709 1.25377 1.18905 1.11976 1.04542 0.965947 0.881463 0.792257 0.698741 0.601405 0.500786 0.397446 0.291936 0.184782 0.0764684 -0.0325741 -0.141978 -0.251468 -0.360873 1.02137 0.977526 0.899514 0.820011 0.735873 0.647006 0.553204 0.454547 0.351272 0.243754 0.132462 0.0179205 -0.0993087 -0.218661 -0.339595 -0.461609 -0.584247 -0.707111 -0.829896 -0.952414 0.733928 0.713638 0.693315 0.672985 0.652674 0.632407 0.61221 0.592108 0.572128 0.552293 0.532628 0.513158 0.493906 0.474895 0.456146 0.437681 0.419519 0.401681 0.384182 0.367037 0.727282 0.706034 0.684751 0.663462 0.642197 0.620987 0.599863 0.578854 0.557989 0.537298 0.516807 0.496546 0.476539 0.456812 0.437388 0.418291 0.39954 0.381156 0.363155 0.345546 0.714103 0.691333 0.668518 0.645693 0.62289 0.600142 0.577482 0.554942 0.532556 0.510354 0.488368 0.466627 0.445159 0.423993 0.403154 0.382669 0.362559 0.342848 0.323548 0.304685 0.694307 0.669307 0.644243 0.619153 0.594073 0.569038 0.544087 0.519254 0.494575 0.470087 0.445822 0.421816 0.398099 0.374704 0.351661 0.328998 0.306745 0.28492 0.263524 0.242687 0.666809 0.638852 0.610801 0.582696 0.554574 0.526477 0.498443 0.470512 0.442724 0.415116 0.387727 0.360593 0.333753 0.30724 0.28109 0.255337 0.230014 0.205133 0.180631 0.156988 0.630672 0.598963 0.567118 0.535178 0.503188 0.471188 0.439221 0.407332 0.375561 0.343952 0.312547 0.281387 0.250515 0.21997 0.189792 0.160025 0.130716 0.101842 0.0731652 0.0460542 0.585287 0.549093 0.512731 0.476249 0.439691 0.403105 0.366539 0.330039 0.293656 0.257435 0.221427 0.18568 0.150244 0.115168 0.0805032 0.0463085 0.0126578 -0.0205535 -0.0539277 -0.0841715 0.532277 0.491255 0.450101 0.408869 0.367613 0.326388 0.285249 0.24425 0.203448 0.162897 0.122654 0.0827759 0.0433202 0.00434525 -0.0340888 -0.0718974 -0.108976 -0.14566 -0.183124 -0.214307 0.478272 0.433009 0.387802 0.342713 0.297801 0.253125 0.208742 0.164705 0.121064 0.0778672 0.0351623 -0.00700612 -0.0485937 -0.089558 -0.129848 -0.169351 -0.207959 -0.246513 -0.286646 -0.315398 0.436511 0.388688 0.341264 0.294286 0.247795 0.201828 0.156409 0.111554 0.0672743 0.0235732 -0.0195457 -0.0620768 -0.104009 -0.145322 -0.185949 -0.225676 -0.264416 -0.303639 -0.344647 -0.368307 0.420622 0.371838 0.323767 0.276406 0.229742 0.183748 0.138384 0.0936042 0.0493579 0.00560221 -0.0376915 -0.0805286 -0.122887 -0.164702 -0.205787 -0.245731 -0.284503 -0.324122 -0.364684 -0.382846 0.431796 0.381934 0.332919 0.284679 0.237138 0.190202 0.143772 0.0977521 0.0520589 0.00663676 -0.0385303 -0.0834103 -0.127923 -0.171906 -0.214966 -0.256452 -0.296568 -0.338099 -0.379726 -0.394159 0.454661 0.401836 0.349832 0.298528 0.247794 0.197495 0.147497 0.0976847 0.0479774 -0.00165419 -0.0511722 -0.100477 -0.149422 -0.197739 -0.24476 -0.289553 -0.332969 -0.379611 -0.427005 -0.439845 0.465387 0.406987 0.349308 0.292203 0.235523 0.17912 0.122862 0.0666512 0.0104416 -0.0457384 -0.101775 -0.157508 -0.212791 -0.26732 -0.32009 -0.369762 -0.418422 -0.474309 -0.533919 -0.546098 0.440588 0.374212 0.308424 0.243083 0.178055 0.113211 0.0484529 -0.0162762 -0.0809715 -0.145543 -0.209805 -0.273572 -0.336806 -0.399299 -0.459592 -0.515547 -0.570921 -0.639877 -0.717929 -0.728006 0.359373 0.283241 0.207539 0.132164 0.057013 -0.0179957 -0.0929112 -0.167736 -0.242418 -0.316813 -0.39067 -0.463773 -0.536241 -0.608109 -0.677373 -0.740368 -0.802281 -0.885623 -0.986431 -0.992152 0.199582 0.112725 0.026131 -0.0602583 -0.146492 -0.232597 -0.318559 -0.404316 -0.489754 -0.574676 -0.658743 -0.741623 -0.823491 -0.904748 -0.983136 -1.0529 -1.11932 -1.21482 -1.34096 -1.34534 -0.0644466 -0.161947 -0.259234 -0.356297 -0.453125 -0.549678 -0.64587 -0.741567 -0.836592 -0.930706 -1.02354 -1.11466 -1.20416 -1.29297 -1.37965 -1.45716 -1.52854 -1.63432 -1.78826 -1.80212 -0.47002 -0.578597 -0.6866 -0.793932 -0.900504 -1.0062 -1.11087 -1.21433 -1.3164 -1.41688 -1.51558 -1.61224 -1.70697 -1.80106 -1.89508 -1.98328 -2.06376 -2.17507 -2.34515 -2.36324 -1.07445 -1.19558 -1.3158 -1.43495 -1.55286 -1.66937 -1.78427 -1.89734 -2.00834 -2.11706 -2.22332 -2.32692 -2.42758 -2.52554 -2.62162 -2.71309 -2.79243 -2.87413 -2.98685 -2.9501 0.326144 0.266229 0.211475 0.163064 0.121893 0.0884888 0.0629835 0.0450794 0.0340576 0.0288556 0.0281951 0.0307223 0.0351395 0.0403102 0.0453297 0.0495538 0.0525926 0.0542758 0.054605 0.053701 0.0517567 0.048997 0.0456497 0.0419263 0.0380108 0.034054 0.0301737 0.0264567 0.0229629 0.0197297 0.0167758 0.0141053 0.0117109 0.00957486 0.00767627 0.00598013 0.00446573 0.00306689 0.00179969 0.000507771 0.302772 0.241779 0.18697 0.138934 0.098499 0.0663089 0.0425126 0.0267007 0.0179949 0.0151818 0.0168523 0.0215449 0.0278835 0.0346883 0.0410443 0.0463235 0.0501689 0.0524515 0.0532154 0.0526214 0.0508961 0.0482918 0.045057 0.0414181 0.0375689 0.033667 0.0298341 0.0261593 0.0227039 0.0195059 0.0165843 0.0139433 0.0115756 0.0094637 0.00758695 0.00591018 0.00441403 0.00303064 0.0017808 0.000499698 0.25807 0.195149 0.140384 0.0931686 0.0542726 0.0245773 0.00421356 -0.00747807 -0.0116843 -0.00990439 -0.00379799 0.00496989 0.0148835 0.0246943 0.0334819 0.04066 0.0459417 0.0492806 0.0508034 0.0507457 0.0493969 0.0470587 0.0440163 0.040522 0.0367872 0.0329805 0.0292305 0.0256301 0.0222427 0.0191071 0.016243 0.0136544 0.0113344 0.00926551 0.00742765 0.00578561 0.00432155 0.00296651 0.00174543 0.000486803 0.19143 0.126287 0.0718002 0.0260503 -0.0101394 -0.0356734 -0.0505857 -0.0559304 -0.0533323 -0.044713 -0.0321086 -0.0174743 -0.0025046 0.0114841 0.023594 0.0333234 0.040504 0.0452181 0.0477149 0.0483372 0.0474612 0.0454554 0.0426534 0.0393411 0.0357517 0.0320679 0.0284262 0.024924 0.0216268 0.0185745 0.0157869 0.0132684 0.0110122 0.00900079 0.00721489 0.00561932 0.00419795 0.00288096 0.00169756 0.000470443 0.102942 0.0354498 -0.0191796 -0.0627783 -0.0945415 -0.11375 -0.120886 -0.117441 -0.105564 -0.0877655 -0.0666055 -0.044406 -0.0230518 -0.00389761 0.0122343 0.0249892 0.0343768 0.0406588 0.0442467 0.0456189 0.0452586 0.0436133 0.041073 0.0379608 0.0345343 0.0309905 0.0274741 0.0240868 0.020896 0.0179422 0.0152456 0.0128103 0.0106299 0.0086868 0.00696259 0.00542219 0.00405138 0.00277959 0.0016405 0.00045159 -0.00277636 -0.0734784 -0.130805 -0.171947 -0.197184 -0.207765 -0.204873 -0.190253 -0.166653 -0.137399 -0.105749 -0.0744569 -0.0455911 -0.0204935 0.000161398 0.0162409 0.0279989 0.035928 0.0406387 0.042769 0.0429235 0.0416369 0.0393584 0.0364501 0.0331932 0.0297985 0.0264179 0.0231566 0.0200833 0.017239 0.0146436 0.012301 0.0102049 0.00833795 0.00668236 0.00520332 0.00388861 0.00266711 0.00157688 0.000431072 -0.111848 -0.189103 -0.254367 -0.293529 -0.31107 -0.312039 -0.298017 -0.270709 -0.233636 -0.191231 -0.147634 -0.106118 -0.0689463 -0.0374063 -0.0119555 0.00756815 0.0217235 0.0312789 0.037073 0.0399209 0.0405565 0.0396044 0.0375734 0.0348624 0.0317744 0.0285319 0.0252927 0.0221643 0.0192159 0.0164883 0.014001 0.0117576 0.00975172 0.00796608 0.00638374 0.0049702 0.00371519 0.00254737 0.0015089 0.000409577 -0.203273 -0.293755 -0.371549 -0.409812 -0.421557 -0.415159 -0.391459 -0.35206 -0.301556 -0.245714 -0.189753 -0.137628 -0.0918878 -0.0537856 -0.0235334 -0.000632548 0.0158196 0.0268952 0.0336778 0.0371669 0.0382275 0.037572 0.0357647 0.0332381 0.0303134 0.0272224 0.0241267 0.0211348 0.0183157 0.0157092 0.0133344 0.0111941 0.00928197 0.00758082 0.00607449 0.00472889 0.00353565 0.00242352 0.00143829 0.000387661 -0.261274 -0.372197 -0.460443 -0.499321 -0.510858 -0.502491 -0.473315 -0.42518 -0.363815 -0.2963 -0.229075 -0.167016 -0.113162 -0.0688445 -0.0340827 -0.00805709 0.0104773 0.0228982 0.030534 0.0345651 0.0359815 0.035577 0.0339654 0.031607 0.0288375 0.0258947 0.0229422 0.020088 0.0174001 0.0149171 0.0126568 0.0106216 0.00880504 0.00718988 0.00576079 0.00448425 0.00335358 0.00229806 0.00136648 0.000365765 -0.286419 -0.420579 -0.509139 -0.55104 -0.568451 -0.563425 -0.533846 -0.482004 -0.414251 -0.338585 -0.262643 -0.192408 -0.131633 -0.0819198 -0.0432266 -0.0144954 0.0058136 0.0193555 0.0276842 0.0321462 0.0338442 0.0336431 0.0321979 0.0299908 0.0273671 0.024568 0.0217567 0.0190398 0.0164832 0.014124 0.0119788 0.0100491 0.00832831 0.00679933 0.00544754 0.00424008 0.00317182 0.00217295 0.00129457 0.000344227 -0.294326 -0.4485 -0.524522 -0.571651 -0.596372 -0.59648 -0.569917 -0.518868 -0.449377 -0.369706 -0.288378 -0.212439 -0.146479 -0.0925526 -0.0507272 -0.0198328 0.00188034 0.0162903 0.025141 0.0299207 0.0318273 0.0317837 0.0304772 0.0284049 0.0259176 0.0232568 0.0205837 0.0180022 0.0155758 0.0133395 0.0113084 0.00948342 0.00785755 0.00641389 0.00513852 0.00399935 0.00299257 0.00204972 0.00122342 0.000323303 -0.307754 -0.473942 -0.526016 -0.577056 -0.604125 -0.607345 -0.584488 -0.53671 -0.468911 -0.388886 -0.305477 -0.226493 -0.15731 -0.100536 -0.0564952 -0.0240443 -0.00132559 0.0136918 0.0228958 0.0278854 0.029933 0.0300056 0.0288126 0.0268601 0.0245003 0.0219721 0.0194335 0.0169847 0.0146863 0.0125708 0.010652 0.00892985 0.00739716 0.00603717 0.0048366 0.0037643 0.00281749 0.00192953 0.00115372 0.000303172 -0.348472 -0.513689 -0.5318 -0.580423 -0.601628 -0.604033 -0.583299 -0.539164 -0.474861 -0.397068 -0.314303 -0.234682 -0.164164 -0.105903 -0.0605761 -0.0271797 -0.0038488 0.0115262 0.0209266 0.026029 0.0281582 0.028311 0.02721 0.0253642 0.0231234 0.0207223 0.0183139 0.0159944 0.0138208 0.0118234 0.0100143 0.00839235 0.00695042 0.00567184 0.00454393 0.00353659 0.00264782 0.00181323 0.00108595 0.000283956 -0.431773 -0.576184 -0.552169 -0.588802 -0.596489 -0.59369 -0.572252 -0.530712 -0.47033 -0.396213 -0.316004 -0.237649 -0.167406 -0.108878 -0.0631185 -0.0293421 -0.00576064 0.00974655 0.0192052 0.0243368 0.0264975 0.0267005 0.0256732 0.0239226 0.0217933 0.0195136 0.017231 0.0150367 0.0129844 0.0111014 0.00939869 0.00787387 0.00651975 0.00531987 0.00426205 0.00331741 0.00248445 0.00170142 0.0010205 0.000265724 -0.56527 -0.660971 -0.590537 -0.604711 -0.593273 -0.581164 -0.556045 -0.515473 -0.458558 -0.388636 -0.312098 -0.236335 -0.167604 -0.109805 -0.0643347 -0.0306661 -0.00714629 0.00830013 0.0177006 0.0227921 0.0249434 0.025172 0.0242034 0.0225384 0.0205136 0.0183499 0.0161884 0.014115 0.0121799 0.0104076 0.00880748 0.00737627 0.00610668 0.00498249 0.00399197 0.00310753 0.00232797 0.00159449 0.000957618 0.000248504 -0.756238 -0.766425 -0.647497 -0.6285 -0.593765 -0.56894 -0.537722 -0.496515 -0.442239 -0.376446 -0.304087 -0.231732 -0.165382 -0.109065 -0.0644603 -0.0312981 -0.00809802 0.00712851 0.0163759 0.0213719 0.0234816 0.0237173 0.022796 0.021209 0.0192833 0.0172311 0.0151864 0.01323 0.011408 0.00974257 0.00824134 0.00690018 0.00571177 0.00466018 0.00373409 0.00290727 0.00217863 0.00149261 0.000897441 0.000232282 -1.03106 -0.906577 -0.728438 -0.663032 -0.600108 -0.559322 -0.519916 -0.476476 -0.423733 -0.361539 -0.293357 -0.224779 -0.16134 -0.107034 -0.0637236 -0.0313777 -0.00870159 0.0061789 0.0151989 0.0200571 0.0221014 0.0223307 0.0214487 0.0199343 0.0181034 0.0161585 0.0142267 0.0123832 0.0106703 0.00910761 0.00770134 0.00644647 0.00533572 0.00435349 0.00348882 0.00271695 0.00203666 0.00139591 0.000840084 0.00021704 -1.43382 -1.11273 -0.844725 -0.716183 -0.618228 -0.557609 -0.507639 -0.459962 -0.406984 -0.346994 -0.282109 -0.21693 -0.156377 -0.10422 -0.0623823 -0.0310039 -0.00896143 0.00549849 0.0142402 0.0189242 0.0208758 0.0210771 0.020217 0.0187605 0.0170115 0.0151628 0.0133338 0.011594 0.00998188 0.00851439 0.00719635 0.00602176 0.0049834 0.00406591 0.00325863 0.0025382 0.00190317 0.00130504 0.000785903 0.000202884 -1.93494 -1.37086 -0.982334 -0.783295 -0.647443 -0.565512 -0.504002 -0.450897 -0.396116 -0.336553 -0.273327 -0.210301 -0.151819 -0.101339 -0.0607214 -0.0301912 -0.00874326 0.00528503 0.0137079 0.0181636 0.0199662 0.0200875 0.0192043 0.0177682 0.0160703 0.014292 0.0125443 0.0108901 0.00936358 0.00797847 0.00673783 0.00563438 0.00466074 0.00380159 0.00304633 0.00237287 0.00177931 0.00122062 0.00073527 0.000189946 -2.28977 -1.53076 -1.04616 -0.806462 -0.648022 -0.554701 -0.486964 -0.431664 -0.377346 -0.320065 -0.260034 -0.200411 -0.145013 -0.0970278 -0.0582705 -0.0290606 -0.00852584 0.00488242 0.0128981 0.0171049 0.0187776 0.0188565 0.0179929 0.0166177 0.0150063 0.0133279 0.0116855 0.010136 0.00870989 0.00741857 0.00626394 0.00523796 0.00433354 0.00353583 0.00283452 0.00220915 0.00165739 0.00113808 0.000685946 0.000177137 -2.16999 -1.43515 -0.937504 -0.716746 -0.568441 -0.483982 -0.420417 -0.369001 -0.320519 -0.271927 -0.222345 -0.17338 -0.127579 -0.0874 -0.0544121 -0.0290564 -0.0107972 0.0014984 0.00916916 0.0134792 0.0154764 0.0159598 0.0155038 0.0145049 0.0132268 0.0118381 0.0104453 0.0091096 0.00786608 0.00672983 0.00570637 0.00479062 0.00397855 0.00325809 0.00262073 0.00204944 0.00154173 0.00106196 0.000641651 0.000164194 -2.10027 -1.42505 -0.914757 -0.701206 -0.551632 -0.466865 -0.402035 -0.350232 -0.302216 -0.255121 -0.207773 -0.161474 -0.118445 -0.0808663 -0.050105 -0.0265063 -0.00953379 0.00188305 0.008994 0.012975 0.0148004 0.0152144 0.0147532 0.0137876 0.0125644 0.0112411 0.00991726 0.00864981 0.00747103 0.0063945 0.00542506 0.0045573 0.00378751 0.00310409 0.00249875 0.0019557 0.00147208 0.00101493 0.000613438 0.000156564 -2.0738 -1.43198 -0.906822 -0.696872 -0.544915 -0.459328 -0.393488 -0.341698 -0.294054 -0.247518 -0.200734 -0.155075 -0.112827 -0.0761783 -0.0464225 -0.0238062 -0.00770953 0.00298489 0.00953901 0.0131173 0.0146701 0.0149142 0.0143592 0.0133533 0.0121255 0.01082 0.00952707 0.0082972 0.0071586 0.00612212 0.00519103 0.0043589 0.00362176 0.00296795 0.00238904 0.00187001 0.00140753 0.000970826 0.000586566 0.000149801 -2.06202 -1.43461 -0.89883 -0.690267 -0.536152 -0.449733 -0.383124 -0.331541 -0.284595 -0.239094 -0.193413 -0.148855 -0.107693 -0.0721104 -0.0433716 -0.021675 -0.00635961 0.00371178 0.00979918 0.0130498 0.0143893 0.0145079 0.0138915 0.0128682 0.0116519 0.0103753 0.00912086 0.00793375 0.00683885 0.0058448 0.00495369 0.00415826 0.00345451 0.00283081 0.0022787 0.00178392 0.00134275 0.000926633 0.000559641 0.000143229 -2.06166 -1.4343 -0.892061 -0.682847 -0.526719 -0.439149 -0.371669 -0.320093 -0.27374 -0.22935 -0.185045 -0.141965 -0.102254 -0.0680256 -0.0404853 -0.0197956 -0.00528115 0.00418741 0.00984637 0.0128117 0.0139765 0.0140018 0.013349 0.0123274 0.0111367 0.0098994 0.00869131 0.00755284 0.00650608 0.00555784 0.00470929 0.00395249 0.0032836 0.00269114 0.00216663 0.00169674 0.0012773 0.00088211 0.000532556 0.00013678 -2.06958 -1.43192 -0.886998 -0.675504 -0.517698 -0.428771 -0.36044 -0.308771 -0.262918 -0.219568 -0.176629 -0.135062 -0.096855 -0.0640236 -0.0377063 -0.0180291 -0.00430752 0.00457355 0.00982147 0.0125178 0.0135217 0.0134646 0.0127836 0.0117698 0.0106091 0.00941431 0.00825483 0.00716673 0.0061694 0.00526796 0.0044627 0.00374513 0.00311156 0.00255066 0.00205404 0.0016092 0.00121167 0.000837536 0.000505399 0.000130505 -2.08366 -1.42821 -0.88354 -0.668344 -0.509189 -0.418733 -0.349614 -0.297804 -0.252417 -0.210068 -0.168474 -0.128407 -0.0916861 -0.0602252 -0.0350981 -0.016399 -0.00343851 0.00488189 0.00974011 0.0121838 0.0130389 0.0129079 0.0122048 0.0112029 0.0100752 0.00892484 0.00781524 0.00677841 0.00583111 0.00497691 0.00421524 0.00353714 0.00293907 0.00240988 0.00194124 0.00152151 0.00114599 0.000792982 0.0004782 0.000124408 -2.10234 -1.42392 -0.881604 -0.661497 -0.501244 -0.409072 -0.339202 -0.287187 -0.242221 -0.200831 -0.160567 -0.121996 -0.0867565 -0.056649 -0.0326834 -0.0149285 -0.00269479 0.0050953 0.00958981 0.0118002 0.0125212 0.0123268 0.0116095 0.0106247 0.00953206 0.0084298 0.00737133 0.00638752 0.00549048 0.00468487 0.0039657 0.00333029 0.00276633 0.00226853 0.00182732 0.00143347 0.00107971 0.000747493 0.000449207 0.000119386 -2.12455 -1.41974 -0.881141 -0.655145 -0.493968 -0.39989 -0.329285 -0.276987 -0.232385 -0.191893 -0.152924 -0.115833 -0.0820655 -0.0532931 -0.0304615 -0.0136173 -0.00207748 0.00521214 0.00936685 0.0113637 0.0119653 0.0117186 0.0109947 0.0100327 0.00898037 0.00792774 0.0069228 0.00599279 0.00514755 0.0043904 0.00371571 0.00312046 0.00259255 0.00212685 0.00171389 0.00134537 0.00101371 0.000702839 0.000421826 0.000113581 -2.14959 -1.41626 -0.882136 -0.649474 -0.487458 -0.391291 -0.319947 -0.267284 -0.222985 -0.183321 -0.145598 -0.109951 -0.077628 -0.0501626 -0.0284325 -0.0124641 -0.00158418 0.00523486 0.00907439 0.0108769 0.0113736 0.0110853 0.0103622 0.0094282 0.00841993 0.00741948 0.00646987 0.00559489 0.00480234 0.00409428 0.00346454 0.00290978 0.00241816 0.00198476 0.00160018 0.00125714 0.000947611 0.00065815 0.000394451 0.000107908 -2.17705 -1.41399 -0.88461 -0.644668 -0.48181 -0.383373 -0.311265 -0.258152 -0.214087 -0.175174 -0.138633 -0.104382 -0.0734625 -0.0472663 -0.0265991 -0.0114681 -0.00121275 0.00516594 0.00871476 0.0103418 0.0107476 0.0104278 0.00971281 0.00881185 0.00785108 0.00690527 0.00601271 0.00519396 0.00445497 0.00379661 0.00321227 0.00269834 0.00224321 0.0018423 0.00148622 0.00116879 0.000881429 0.000613432 0.000367088 0.000102354 -2.20673 -1.41334 -0.888613 -0.640902 -0.477113 -0.376231 -0.303305 -0.24965 -0.205746 -0.167499 -0.132067 -0.0991488 -0.0695832 -0.044611 -0.0249633 -0.010629 -0.000961901 0.00500702 0.00828948 0.00975965 0.0100883 0.00974686 0.00904698 0.00818396 0.0072741 0.00638531 0.00555146 0.00479012 0.00410551 0.00349744 0.00295894 0.00248615 0.00206775 0.00169947 0.00137202 0.00108029 0.000815171 0.000568695 0.000339704 9.69151e-05 -2.23861 -1.4147 -0.894221 -0.638344 -0.473456 -0.369955 -0.29613 -0.241835 -0.198008 -0.160336 -0.12593 -0.0942728 -0.0660017 -0.0422015 -0.0235264 -0.00994621 -0.000830184 0.00475967 0.00779997 0.0091316 0.0093966 0.00904316 0.00836518 0.00754485 0.00668921 0.00585974 0.00508623 0.00438342 0.00375401 0.00319683 0.00270457 0.00227325 0.00189178 0.0015563 0.00125759 0.000991656 0.000748837 0.000523937 0.000312298 9.15764e-05 -2.27275 -1.41835 -0.901534 -0.637154 -0.470926 -0.364632 -0.289802 -0.234761 -0.190919 -0.153723 -0.12025 -0.0897722 -0.0627276 -0.0400419 -0.022289 -0.00941861 -0.000815981 0.00442556 0.00724771 0.00845884 0.00867335 0.00831735 0.00766788 0.00689486 0.00609665 0.00532876 0.00461713 0.00397399 0.00340054 0.00289481 0.00244921 0.00205965 0.00171532 0.00141279 0.00114294 0.000902884 0.000682429 0.000479156 0.000284871 8.63237e-05 -2.3093 -1.42458 -0.910666 -0.637478 -0.469608 -0.360345 -0.284377 -0.228477 -0.184518 -0.147691 -0.115051 -0.085663 -0.0597698 -0.0381356 -0.0212513 -0.00904505 -0.000917652 0.00400631 0.00663409 0.0077425 0.00791942 0.00757004 0.00695553 0.00623432 0.00549665 0.00479251 0.00414431 0.00356189 0.00304518 0.00259145 0.00219289 0.00184539 0.00153841 0.00126896 0.00102808 0.000813981 0.000615949 0.000434348 0.000257423 8.11427e-05 -2.34843 -1.4336 -0.92174 -0.639456 -0.469583 -0.357172 -0.279908 -0.22303 -0.17884 -0.142271 -0.110356 -0.0819595 -0.0571356 -0.0364852 -0.0204134 -0.00882427 -0.00113356 0.00350349 0.00596045 0.00698363 0.00713562 0.00680182 0.00622854 0.00556352 0.00488943 0.00425117 0.00366786 0.00314722 0.00268799 0.00228679 0.00193566 0.00163049 0.00136104 0.00112483 0.000913011 0.00072495 0.000549398 0.000389512 0.000229954 7.60191e-05 -2.39034 -1.44562 -0.934882 -0.643213 -0.470929 -0.355187 -0.276444 -0.21846 -0.173917 -0.137489 -0.106184 -0.0786742 -0.0548315 -0.0350929 -0.0197749 -0.00875492 -0.00146208 0.00291863 0.00522807 0.00618324 0.0063227 0.00601325 0.00548733 0.00488274 0.00427519 0.00370486 0.0031879 0.00273006 0.00232903 0.00198088 0.00167753 0.00141499 0.00118326 0.000980398 0.000797747 0.000635795 0.000482776 0.000344644 0.000202463 7.09385e-05 -2.43523 -1.46082 -0.950218 -0.64887 -0.473722 -0.354458 -0.274032 -0.214806 -0.169778 -0.133367 -0.102551 -0.075818 -0.0528631 -0.0339605 -0.0193353 -0.00883554 -0.00190156 0.00225322 0.00443819 0.00534228 0.00548137 0.00520484 0.00473226 0.00419226 0.00365412 0.00315375 0.00270453 0.00231048 0.00196836 0.00167375 0.00141856 0.00119889 0.00100506 0.000835688 0.000682292 0.000546518 0.000416084 0.00029974 0.00017495 6.58859e-05 -2.48335 -1.47937 -0.967876 -0.656541 -0.478032 -0.355049 -0.272714 -0.212103 -0.166449 -0.129925 -0.0994718 -0.0734006 -0.0512352 -0.0330893 -0.0190941 -0.00906463 -0.00245033 0.00150876 0.003592 0.00446169 0.00461232 0.0043771 0.0039637 0.00349234 0.00302642 0.00259795 0.00221786 0.00188856 0.00160602 0.00136546 0.00115876 0.000982229 0.000826474 0.000690702 0.000566651 0.000457133 0.000349315 0.000254791 0.000147425 6.08446e-05 -2.53492 -1.50145 -0.987994 -0.666343 -0.483934 -0.357025 -0.272533 -0.210385 -0.163954 -0.127183 -0.0969612 -0.0714317 -0.049953 -0.0324809 -0.0190506 -0.00944079 -0.00310678 0.00068674 0.00269077 0.00354244 0.00371632 0.00353062 0.00318209 0.00278332 0.00239233 0.00203765 0.00172803 0.0014644 0.0012421 0.00105604 0.000898186 0.000765027 0.000647509 0.000545452 0.000450826 0.00036766 0.000282461 0.000209791 0.000119896 5.57984e-05 ) ; boundaryField { inlet { type freestreamPressure; freestreamValue uniform 0; supersonic false; value nonuniform List<scalar> 80 ( 0.739611 0.709838 0.678281 0.644855 0.609624 0.572697 0.534227 0.494425 0.453575 0.412037 0.370251 0.328743 0.288121 0.249078 0.212388 0.178907 0.149585 0.125487 0.107838 0.0981033 1.06356 1.04846 1.0332 1.0178 1.00227 0.986626 0.970875 0.955033 0.939115 0.923133 0.9071 0.891028 0.874931 0.85882 0.842706 0.826599 0.810512 0.794462 0.778453 0.762403 1.3157 1.30581 1.29565 1.28517 1.27438 1.26327 1.25185 1.24014 1.22812 1.21581 1.20322 1.19035 1.17721 1.16381 1.15015 1.13626 1.12213 1.10779 1.09324 1.07849 1.46897 1.47085 1.47387 1.47719 1.48007 1.48183 1.48198 1.48017 1.47622 1.47007 1.46179 1.45155 1.43956 1.42609 1.41142 1.39583 1.37958 1.36294 1.34614 1.3293 ) ; } outlet { type freestreamPressure; freestreamValue uniform 0; supersonic false; value nonuniform List<scalar> 80 ( -1.62446e-10 -1.86592e-10 -2.09216e-10 -2.31942e-10 -2.53825e-10 -2.73873e-10 -2.9122e-10 -3.04889e-10 -3.13756e-10 -3.16617e-10 -3.12277e-10 -2.99683e-10 -2.78105e-10 -2.47377e-10 -2.08181e-10 -1.62369e-10 -1.13252e-10 -6.57847e-11 -2.65197e-11 -3.17789e-12 1.12703e-10 9.99861e-11 8.81806e-11 7.62635e-11 6.42199e-11 5.20334e-11 3.96919e-11 2.71855e-11 1.45064e-11 1.64765e-12 -1.13935e-11 -2.46321e-11 -3.80779e-11 -4.95443e-11 -6.35222e-11 -7.76775e-11 -9.19695e-11 -1.06285e-10 -1.20742e-10 -1.36606e-10 3.5218e-10 3.37987e-10 3.25294e-10 3.12732e-10 3.00163e-10 2.87718e-10 2.75423e-10 2.65291e-10 2.53222e-10 2.41261e-10 2.29399e-10 2.1764e-10 2.0597e-10 1.94372e-10 1.82832e-10 1.71331e-10 1.59852e-10 1.48377e-10 1.36882e-10 1.25347e-10 4.36174e-12 3.63899e-11 9.03164e-11 1.55752e-10 2.24027e-10 2.88709e-10 3.45602e-10 3.92429e-10 4.28394e-10 4.53739e-10 4.69361e-10 4.76507e-10 4.76556e-10 4.7087e-10 4.60699e-10 4.47111e-10 4.31039e-10 4.13577e-10 3.9581e-10 3.75946e-10 ) ; } top { type symmetryPlane; } bottom { type symmetryPlane; } cylinder { type zeroGradient; } frontandback { type empty; } } // ************************************************************************* //
[ "danieler@login3.stampede2.tacc.utexas.edu" ]
danieler@login3.stampede2.tacc.utexas.edu
6a50e93bed1c155fb7ed1943fdd907b45f787cc5
3da71d1fa6693ca85fa6c38d49e94b9c80974ca4
/libraries/chain/include/fiberchain/chain/util/reward.hpp
994c46c311a845ec24dfcac82c347fffff4cf967
[ "MIT" ]
permissive
FiberChain/FiberChain
371a7d62fe23a28251416ddbac25ab4bcfcb7db0
f4640dfa71cdc57c56d9e299b4f369750dc760ec
refs/heads/master
2022-07-26T05:01:26.963612
2020-05-20T14:23:43
2020-05-20T14:23:43
243,013,377
0
0
NOASSERTION
2020-05-20T14:23:45
2020-02-25T14:00:26
C++
UTF-8
C++
false
false
718
hpp
#pragma once #include <fiberchain/chain/util/asset.hpp> #include <fiberchain/chain/fiberchain_objects.hpp> #include <fiberchain/protocol/asset.hpp> #include <fiberchain/protocol/config.hpp> #include <fiberchain/protocol/types.hpp> #include <fc/reflect/reflect.hpp> #include <fc/uint128.hpp> namespace fiberchain { namespace chain { namespace util { using fiberchain::protocol::asset; using fiberchain::protocol::price; using fiberchain::protocol::share_type; using fc::uint128_t; struct comment_reward_context { asset max_snac; price current_pia_price; }; } } } // fiberchain::chain::util FC_REFLECT( fiberchain::chain::util::comment_reward_context, (max_snac) (current_pia_price) )
[ "noreply@github.com" ]
noreply@github.com
2a6f2c94b980b928da2a641182e19fa2606ac6f4
7f88017452bb875476d0e3edf236adf24d79ae58
/libcutl/cutl/details/boost/iterator/detail/enable_if.hpp
23f67ef177874aa04e0837acc750457c8d50abbe
[ "BSL-1.0", "MIT" ]
permissive
iamfork/xsde-cmake
da8a72a496a57c3df94868c1fad337068e1f0f78
515e35ed5314dbf15fd45d78d9148bf72a97a51a
refs/heads/master
2022-01-13T02:00:09.883465
2018-12-26T12:05:23
2018-12-26T12:05:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,089
hpp
// (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // 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) #ifndef BOOST_ENABLE_IF_23022003THW_HPP #define BOOST_ENABLE_IF_23022003THW_HPP #include <cutl/details/boost/detail/workaround.hpp> #include <cutl/details/boost/mpl/identity.hpp> #include <cutl/details/boost/iterator/detail/config_def.hpp> // // Boost iterators uses its own enable_if cause we need // special semantics for deficient compilers. // 23/02/03 thw // namespace cutl_details_boost { namespace iterators { // // Base machinery for all kinds of enable if // template<bool> struct enabled { template<typename T> struct base { typedef T type; }; }; // // For compilers that don't support "Substitution Failure Is Not An Error" // enable_if falls back to always enabled. See comments // on operator implementation for consequences. // template<> struct enabled<false> { template<typename T> struct base { #ifdef BOOST_NO_SFINAE typedef T type; // This way to do it would give a nice error message containing // invalid overload, but has the big disadvantage that // there is no reference to user code in the error message. // // struct invalid_overload; // typedef invalid_overload type; // #endif }; }; template <class Cond, class Return> struct enable_if # if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE) : enabled<(Cond::value)>::template base<Return> # else : mpl::identity<Return> # endif { # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) typedef Return type; # endif }; } // namespace iterators } // namespace cutl_details_boost #include <cutl/details/boost/iterator/detail/config_undef.hpp> #endif // BOOST_ENABLE_IF_23022003THW_HPP
[ "yadykin_a@mail.ru" ]
yadykin_a@mail.ru
2074728b4deb2326ad275d12714deadec4c0fe0c
428989cb9837b6fedeb95e4fcc0a89f705542b24
/erle/ros2_ws/build/pendulum_msgs/rosidl_typesupport_introspection_cpp/pendulum_msgs/msg/rttest_results__type_support.cpp
d4a83a296a792f7604700dd2dd0c94caafd683d5
[]
no_license
swift-nav/ros_rover
70406572cfcf413ce13cf6e6b47a43d5298d64fc
308f10114b35c70b933ee2a47be342e6c2f2887a
refs/heads/master
2020-04-14T22:51:38.911378
2016-07-08T21:44:22
2016-07-08T21:44:22
60,873,336
1
2
null
null
null
null
UTF-8
C++
false
false
7,468
cpp
// generated from rosidl_typesupport_introspection_cpp/resource/msg__type_support.cpp.template #ifndef __pendulum_msgs__msg__rttest_results__type_support__h__ #define __pendulum_msgs__msg__rttest_results__type_support__h__ // providing offsetof() #include <cstddef> #include <rosidl_generator_c/message_type_support.h> // this is defined in the rosidl_typesupport_introspection_cpp package and // is in the include/rosidl_typesupport_introspection_cpp/impl folder #include <rosidl_generator_cpp/message_type_support.hpp> #include "pendulum_msgs/msg/rttest_results__struct.hpp" #include "rosidl_typesupport_introspection_cpp/field_types.hpp" #include "rosidl_typesupport_introspection_cpp/identifier.hpp" #include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" #include "rosidl_typesupport_introspection_cpp/visibility_control.h" namespace pendulum_msgs { namespace msg { namespace rosidl_typesupport_introspection_cpp { static const ::rosidl_typesupport_introspection_cpp::MessageMember RttestResults_message_member_array[9] = { { "stamp", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type 0, // upper bound of string ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle_introspection<builtin_interfaces::msg::Time>(), // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, stamp), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "command", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type 0, // upper bound of string ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle_introspection<pendulum_msgs::msg::JointCommand>(), // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, command), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "state", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type 0, // upper bound of string ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle_introspection<pendulum_msgs::msg::JointState>(), // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, state), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "cur_latency", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type 0, // upper bound of string nullptr, // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, cur_latency), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "mean_latency", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT64, // type 0, // upper bound of string nullptr, // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, mean_latency), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "min_latency", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type 0, // upper bound of string nullptr, // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, min_latency), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "max_latency", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type 0, // upper bound of string nullptr, // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, max_latency), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "minor_pagefaults", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type 0, // upper bound of string nullptr, // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, minor_pagefaults), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer }, { "major_pagefaults", // name ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type 0, // upper bound of string nullptr, // members of sub message false, // is array 0, // array size false, // is upper bound offsetof(pendulum_msgs::msg::RttestResults, major_pagefaults), // bytes offset in struct nullptr, // default value nullptr, // size() function pointer nullptr, // get_const(index) function pointer nullptr, // get(index) function pointer nullptr // resize(index) function pointer } }; static const ::rosidl_typesupport_introspection_cpp::MessageMembers RttestResults_message_members = { "pendulum_msgs", // package name "RttestResults", // message name 9, // number of fields RttestResults_message_member_array // message members }; static const rosidl_message_type_support_t RttestResults_message_type_support_handle = { ::rosidl_typesupport_introspection_cpp::typesupport_introspection_identifier, &RttestResults_message_members }; } // namespace rosidl_typesupport_introspection_cpp } // namespace msg } // namespace pendulum_msgs namespace rosidl_typesupport_introspection_cpp { template<> ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC const rosidl_message_type_support_t * get_message_type_support_handle_introspection<pendulum_msgs::msg::RttestResults>() { return &::pendulum_msgs::msg::rosidl_typesupport_introspection_cpp::RttestResults_message_type_support_handle; } } // namespace rosidl_typesupport_introspection_cpp #endif // __pendulum_msgs__msg__rttest_results__type_support__h__
[ "igdoty@swiftnav.com" ]
igdoty@swiftnav.com
74095b471a166f866fdb9945f8ce017f01c45bbf
fcac28fd92f16fddac25099ef25caf49bf428b5e
/04-15 Lesson - 1 과제 포함/player.h
bfa4010e21ddbb5b5436b6c0b1fef72c1738182a
[]
no_license
wakeup5/Learning-Lesson
272ccc98bbddd7fba982c59d66660052ed4fffbf
c611a2ff642c470f3550a47c1f2b46cdebec96c4
refs/heads/master
2021-10-19T15:16:01.369359
2019-02-22T01:53:09
2019-02-22T01:53:09
171,406,449
0
0
null
null
null
null
UTF-8
C++
false
false
202
h
#pragma once #include "inven.h" class player { private: int _fund; inven* _inven; public: player(void); ~player(void); inven* getInven(); int getFund(); void setFund(int); };
[ "wakeup5@outlook.kr" ]
wakeup5@outlook.kr
ee3feab4d8e2341dc4514e86efe5c14a2b61215a
0d58975ec0c98b5693659c04d1cfdf4519f68bba
/operatorTest.cpp
4bc5e8080cd4bb1795322b8c6b549121f48bac6c
[]
no_license
92m/cpp-learn-project
d3244ee7b16b8b8d115b55a4570f9199c353bcd4
08cd28a52afe9c906459e3db490843b19f298b7a
refs/heads/master
2023-08-02T05:53:06.457897
2020-12-17T01:38:04
2020-12-17T01:38:04
274,820,741
0
0
null
null
null
null
GB18030
C++
false
false
464
cpp
#include <iostream> #include <stdlib.h> using namespace std; class cls { private: int ar[6]; public: cls(); int &operator[](int i); //重载"[]"操作符 }; cls::cls() { int i; for (i = 0; i < 6; i++) { ar[i] = i + 1; } } int &cls::operator[](int i) //返回引用,这样才可以对返回值赋值 { return ar[i]; } int main(void) { cls c; printf("c[1] = %d\n", c[1]); c[4] = 16; printf("c[4] = %d\n", c[4]); return 0; }
[ "mmmmmn.lzm@gmail.com" ]
mmmmmn.lzm@gmail.com
64e41bfc5905659301cf7cceab759b5615085194
08b8cf38e1936e8cec27f84af0d3727321cec9c4
/data/crawl/git/old_hunk_3097.cpp
053664e578c9e4163a7cdb626442025767611a70
[]
no_license
ccdxc/logSurvey
eaf28e9c2d6307140b17986d5c05106d1fd8e943
6b80226e1667c1e0760ab39160893ee19b0e9fb1
refs/heads/master
2022-01-07T21:31:55.446839
2018-04-21T14:12:43
2018-04-21T14:12:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
90
cpp
return 0; } while (argc--) { unsigned char sha1[20]; const char *name = *argv++;
[ "993273596@qq.com" ]
993273596@qq.com
2a96c8b4bd7331073b3fe57e42711c1bf2172b2b
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5695413893988352_0/C++/mcsharma1990/main.cpp
4a65dd65c070fcb9fc0e758500bd2f92688d20c3
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
2,805
cpp
#include <vector> #include <string> #include <map> #include <set> #include <queue> #include <algorithm> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <cctype> #include <cstring> #include <memory.h> #include <cassert> #include <sstream> using namespace std; #define ford(i, a, b, c) for(int i=(a); i<(b); i+=(c)) #define fori(i, a, b) ford(i,a,b,1) #define rep(i, n) fori(i,0,n) #define ifor(i, a, b) for(int i=(a); i>=(b); i--) #define iter(i, a) for(typeof(a.begin()) i=(a).begin(); i!=(a).end(); i++) #define si(x) ((int)x.size()) #define SS ({int x;scanf("%d",&x);x;}) #define pb push_back #define mp make_pair #define all(a) a.begin(),a.end() #define fill(a, v) memset(a, v, sizeof(a)) #define inf (int)1e9 #define linf (long long)1e18 #define V vector #define S string #define XX first #define YY second #define P(v) rep(i, si(v)) cout<<v[i]<<" "; puts("") typedef V<int> vi; typedef V<S> vs; typedef long long ll; typedef pair<int,int> pii; int N; pii ans = mp(inf, 0); int ff(vi a) { int x = 0; rep(i, N) { x = 10*x + a[i]; } return x; } void solve(vi a, vi b) { if (count(all(a), -1) == 0 && count(all(b), -1) == 0) { int A = ff(a), B = ff(b); if (abs(A-B) < abs(ans.XX-ans.YY) || (abs(A-B) == abs(ans.XX - ans.YY) && A < ans.XX)) { ans = mp(A, B); } } rep(i, N) { if (a[i] == -1) { rep(d, 10) { a[i] = d; solve(a, b); } return; } } rep(i, N) { if (b[i] == -1) { rep(d, 10) { b[i] = d; solve(a, b); } return; } } } int di(int n) { if (n==0) return 1; int d = 0; while (n) { n/=10; d++; } return d; } int main() { freopen("/Users/mahesh/Desktop/in.in", "r", stdin); freopen("/Users/mahesh/Desktop/out.txt", "w", stdout); int t = SS; rep(_, t) { ans = mp(inf, 0); S s1, s2; cin>>s1>>s2; N = si(s1); vi a(N), b(N); rep(i, si(s1)) { a[i] = s1[i] == '?' ? -1 : (s1[i] - '0'); } rep(i, si(s2)) { b[i] = s2[i] == '?' ? -1 : (s2[i] - '0'); } solve(a, b); S ss1(N - di(ans.XX), '0'), ss2(N - di(ans.YY), '0'); printf("Case #%d: %s%d %s%d\n",_+1, ss1.c_str(), ans.XX, ss2.c_str(), ans.YY); } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
4a184b75b96b18fb507c62fd1653d14de9dfbae1
05e7d01132501b37bcdb3cbbdf8f75512a678f84
/inc/TextureManager.h
4cecdf1c1bff6e62d7d3e0dd17a03d65c3ce514a
[ "MIT" ]
permissive
hpe95/JogoAviaoIndividual
5167de3aa1d3bc99fae2a4e9b861205d027f53f4
5711c37cbfcedb6351a5c74650c6ab7ac2856c2b
refs/heads/master
2021-06-18T02:28:00.228966
2017-06-21T17:53:34
2017-06-21T17:53:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,033
h
#ifndef TEXTUREMANAGER_H #define TEXTUREMANAGER_H #include <SDL2/SDL.h> #include <string> #include <map> class TextureManager{ public: bool load(std::string, std::string, SDL_Renderer*); void draw(std::string, int, int, int, int, SDL_Renderer*, SDL_RendererFlip flip = SDL_FLIP_NONE); void drawFrame(std::string, int, int, int, int, int, int, SDL_Renderer*, SDL_RendererFlip flip = SDL_FLIP_NONE); void drawTile(std::string, int, int, int, int, int, int, int, int, SDL_Renderer *pRenderer); static TextureManager& Instance(){ static TextureManager instance; return instance; } TextureManager(TextureManager const&) = delete; void operator=(TextureManager const&) = delete; void clearFromTextureMap(std::string id){ m_textureMap.erase(id); } bool loadText(std::string message, const char* fontFile, std::string id, SDL_Color color, int fontSize, SDL_Renderer* renderer); private: std::map<std::string, SDL_Texture*> m_textureMap; TextureManager() { } }; typedef TextureManager TheTextureManager; #endif
[ "hpedro1195@gmail.com" ]
hpedro1195@gmail.com
e3a7d83153b193fb8af45425112412fb6cb3771a
770056a788b1478f977b79648f16fe4219816768
/src/reverselock.h
2f07478cbc20e4968513041308ce2871f818ce7c
[ "MIT" ]
permissive
StipendClassic/spdz
4356334f685c21f4388e2972254abf33f0fcb06f
27c30658982d8f5ade462902a2ae0ce40b98c507
refs/heads/master
2020-03-19T02:15:46.286346
2018-05-31T19:20:32
2018-05-31T19:20:32
135,613,310
0
0
null
null
null
null
UTF-8
C++
false
false
801
h
// Copyright (c) 2015 The Bitcoin Core developers // Copyright (c) 2017 The SPDZ developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_REVERSELOCK_H #define BITCOIN_REVERSELOCK_H /** * An RAII-style reverse lock. Unlocks on construction and locks on destruction. */ template<typename Lock> class reverse_lock { public: explicit reverse_lock(Lock& lock) : lock(lock) { lock.unlock(); lock.swap(templock); } ~reverse_lock() { templock.lock(); templock.swap(lock); } private: reverse_lock(reverse_lock const&); reverse_lock& operator=(reverse_lock const&); Lock& lock; Lock templock; }; #endif // BITCOIN_REVERSELOCK_H
[ "paul.brooks2091@gmail.com" ]
paul.brooks2091@gmail.com
2364e306a8748d49e135051262b7087864c96880
7fe3e44cf771a7a811890a7d2ac78ed6708ddedf
/Engine/source/T3D/physics/physicsWorld.h
1b89a7d9a64e76b65e2551b926820f75636a19c4
[]
no_license
konradkiss/meshloop
988ee721fb6463fbfece183c70f678c047215dd5
25b98ce223d21e232593a6c4dc2d6d863aace02c
refs/heads/master
2021-03-19T13:36:21.104735
2015-05-21T13:00:55
2015-05-21T13:00:55
36,012,137
0
0
null
null
null
null
UTF-8
C++
false
false
1,291
h
//----------------------------------------------------------------------------- // Torque 3D // Copyright (C) GarageGames.com, Inc. //----------------------------------------------------------------------------- #ifndef _T3D_PHYSICS_PHYSICSWORLD_H_ #define _T3D_PHYSICS_PHYSICSWORLD_H_ #ifndef _TORQUE_TYPES_H_ #include "platform/types.h" #endif class ProcessList; class Point3F; struct RayInfo; class PhysicsWorld { public: virtual ~PhysicsWorld() {}; virtual bool initWorld( bool isServer, ProcessList *processList ) = 0; virtual void destroyWorld() = 0; /// An abstract way to raycast into any type of PhysicsWorld, in a way /// that mirrors a Torque-style raycast. // /// This method is not fully developed or very sophisticated. For example, /// there is no system of collision groups or raycast masks, which could /// be very complex to write in a PhysicsPlugin-Abstract way... // // Optional forceAmt parameter will also apply a force to hit objects. virtual bool castRay( const Point3F &startPnt, const Point3F &endPnt, RayInfo *ri, const Point3F &impulse ) = 0; virtual void explosion( const Point3F &pos, F32 radius, F32 forceMagnitude ) = 0; }; #endif // _T3D_PHYSICS_PHYSICSWORLD_H_
[ "konrad@konradkiss.com" ]
konrad@konradkiss.com
41fb7017b130865102461ffccb971d3992dd8b48
dc1a3876bc2b6883f252599768b12d6d4b30b17d
/allergy/entry.h
c368dfb5c5810a39bd52db0ac826c91df6689bb5
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause" ]
permissive
kjgrahn/allergy
b7862015bc39b3ef62870b40d47a63e06b4daafa
e8621e6ecbc54104fa856bd080abd9b9d40fe3ea
refs/heads/master
2023-08-29T04:17:11.343674
2021-11-07T22:29:19
2021-11-08T21:53:23
359,939,140
0
0
null
null
null
null
ISO-8859-1
C++
false
false
1,721
h
/* -*- c++ -*- * * Copyright (c) 2020 Jörgen Grahn * All rights reserved. * */ #ifndef ALLERGY_ENTRY_H #define ALLERGY_ENTRY_H #include "keys.h" #include "photo.h" #include "timestamp.h" #include "keyword.h" #include "../join.h" #include <string> #include <vector> #include <set> #include <iosfwd> class Root; namespace allergy { /** * An entry from an allergy(1) picture information file: * - the Photo, i.e. a (date, serial) unique identifier * - filename * - timestamp * - optional descriptive text * - keywords from the text * * Entries are ordered by timestamp. The Photo is synthesized from * the file name, and the Day part of the Photo should match the * Day part of the timestamp, but the Entries are not necessarily * also ordered by Photo. */ class Entry { public: template <class It> Entry(const std::string& filename, It begin, It end, const Timestamp& timestamp, const Entry* prev); explicit operator bool() const { return bool {photo}; } bool operator< (const Entry& other) const { return timestamp < other.timestamp; } Photo photo; std::string filename; Timestamp timestamp; std::string text; std::set<Key> keywords; }; std::ostream& operator<< (std::ostream& os, const Entry& val); inline std::string url(const Entry& e) { return e.photo.url(); } inline std::string pageurl(const Entry& e) { return e.photo.pageurl(); } inline std::string thumburl(const Entry& e) { return e.photo.thumburl(); } inline std::string dir(const Entry& e) { return e.photo.dir(); } std::string path(const Entry&); } int open(const Root& r, const allergy::Entry&); #endif
[ "grahn+src@snipabacken.se" ]
grahn+src@snipabacken.se
c031c08f9d6c7bd9dff5fc7a1809736dcdba7d7c
f02b056ec402f6ff2e144b65ef6ca179170a2863
/mainview.cpp
f376d2e1e4f62d78b539ab0d23237e836ce5751d
[]
no_license
josharoon/visAssignment
1531a697c0ff522285ca2ded09654ffed22d75d5
f2b8ac9fa579efc16ba6ef02e092b82ace57831b
refs/heads/master
2023-03-23T06:34:05.901569
2021-03-22T21:38:15
2021-03-22T21:38:15
343,221,594
0
0
null
null
null
null
UTF-8
C++
false
false
2,821
cpp
#include "mainview.h" #include "scenebasic.h" #include "glutils.h" #include "uiinput.h" #include <iostream> #include <cstdio> #include <QDebug> using std::cout; using std::endl; MainView::MainView(const QGLFormat & format, QWidget *parent) : QGLWidget(format, parent) { // This tells the widget to accept keyboard focus when the widget is clicked. this->setFocusPolicy(Qt::ClickFocus); timer = new QTimer(this); connect( timer, SIGNAL(timeout()), this, SLOT(timerUpdate()) ); timer->start(50); this->setMinimumSize(800,600); } void MainView::calcLine() { /** * calculate line points based on formula. */ this->line[3]=this->line[0]+(this->Mu.x*d); this->line[4]=this->line[1]+(this->Mu.y*d); this->line[5]=this->line[2]+(this->Mu.z*d); qDebug() << "p1.xyz = " << this->line[0] << this->line[1] << this->line[2]; qDebug() << "p2.xyz = " << this->line[3] << this->line[4] << this->line[5]; } void MainView::calcRot() { scene->setAlpha(this->alpha); scene->setRot(); } void MainView::setSamples(int samples) { QGLFormat newFormat; qDebug() << "current samples" << this->format().samples(); this->format().setSamples(32); qDebug() << "samples changed to " << samples; qDebug() << "current samples" << this->format().samples(); } void MainView::initializeGL() { //////////////// PLUG IN SCENE HERE ///////////////// scene = new SceneBasic(); //////////////////////////////////////////////////// GLenum err = glewInit(); if( GLEW_OK != err ) { cout <<"Error initializing GLEW: " << glewGetErrorString(err) << endl; } // GLUtils::checkForOpenGLError(__FILE__,__LINE__); GLUtils::checkForOpenGLError(); QGLFormat format = this->format(); printf("QGLFormat reports profile: "); if( format.profile() == QGLFormat::CompatibilityProfile ) printf("compatability.\n"); else if( format.profile() == QGLFormat::CoreProfile ) printf("core.\n"); else printf("none.\n"); GLUtils::dumpGLInfo(); glClearColor(0.0f,0.0f,0.0f,1.0f); scene->initScene(); } void MainView::paintGL() { GLUtils::checkForOpenGLError(); scene->setMaterialContributions(ambientReflection,diffuseReflection,specularReflection,constantAttenuation,linearAttenuation,quadraticAttenuation,spotCutoff,spotExponent,ambientColor,diffuseColor1,specularColor1); scene->setLineData(line); scene->setMatricesLight1(lightX,lightY); scene->render(eye,point); } void MainView::resizeGL(int w, int h ) { scene->resize(w,h); } void MainView::toggleAnimation() { if( timer->isActive() ) timer->stop(); else timer->start(); } void MainView::timerUpdate() { scene->update(1.0f); updateGL(); }
[ "josh@touchsurgery.com" ]
josh@touchsurgery.com
b099e63d5cc0823854e1da05331009126e7e0f82
7d3fc89b490143a27eb31d44212f7d123467eb4e
/include/Graphics/DavidMeshLib/Geometry/Point.h
c37468b5e453b487cd6f65f1a3fced9f00da19f7
[]
no_license
crazysnowboy/DG_Pro
892462aae719be500fc73bf034b7317ec1a89a8d
773524c48644096433501db25706ae855d3b6be6
refs/heads/master
2021-09-06T15:26:43.429243
2018-02-08T02:02:26
2018-02-08T02:02:26
119,364,870
1
0
null
null
null
null
UTF-8
C++
false
false
5,447
h
/*! * \file Point.h * \brief Three dimensional point class * \author David Gu * \date 10/07/2010 * */ #ifndef _MESHLIB_POINT_H_ #define _MESHLIB_POINT_H_ #include <assert.h> #include <math.h> #include <string> #include <sstream> namespace MeshLib { /*! * \brief CPoint class, three dimensional point * * Three dimensional point or vector \f$(x,y,z)\f$, inner product, cross product, scale multiplication etc. */ class CPoint { public: /*! * CPoint constructor, specifying \f$(x,y,z)\f$ */ CPoint( double x, double y, double z ) { v[0] = x; v[1] = y; v[2] = z; }; /*! * CPoint default constructor, initialized as (0,0,0) */ CPoint() { v[0] = v[1] = v[2] = 0; }; /*! * CPoint destructor */ ~CPoint() {}; /*! * reference to \f$(x,y,z)\f$ value * \param i index * \return CPoint[i] */ double & operator[]( int i) { assert( 0<=i && i<3 ); return v[i]; }; /*! * constant (x,y,z) value * \param i index * \return CPoint[i] */ double operator()( int i) const { assert( 0<=i && i<3 ); return v[i]; }; /*! * constant \f$(x,y,z)\f$ value * \param i index * \return CPoint[i] */ double operator[]( int i) const { assert( 0<=i && i<3 ); return v[i]; }; /*! * norm of the CPoint \f$\sqrt{x^2+y^2+z^2}\f$ */ double norm() const { return sqrt( fabs( v[0] * v[0] + v[1] * v[1] + v[2] * v[2] ) ); }; /*! * Add another point to the current point * \param p * \return cuccrent point is added by p. */ CPoint & operator += ( const CPoint & p) { v[0] += p(0); v[1] += p(1); v[2] += p(2); return *this; }; /*! * Substract another point to the current point * \param p * \return cuccrent point is substracted by p. */ CPoint & operator -= ( const CPoint & p) { v[0] -= p(0); v[1] -= p(1); v[2] -= p(2); return *this; }; /*! * Multiply by a scalar * \param s scalar * \return current point is multipolied by s. */ CPoint & operator *= ( const double s) { v[0] *= s ; v[1] *= s; v[2] *= s; return *this; }; /*! * Divide by a scalar * \param s scalar * \return current point is divided by s. */ CPoint & operator /= ( const double s) { v[0] /= s ; v[1] /= s; v[2] /= s; return *this; }; /*! * dot product * \param p another point * \return dot product of current point with p. */ double operator*( const CPoint & p ) const { return v[0] * p[0] + v[1] * p[1] + v[2] * p[2]; }; /*! * Add another point to the current point * \param p * \return cuccrent point is added by p. */ CPoint operator+( const CPoint & p ) const { CPoint r( v[0] + p[0], v[1] + p[1], v[2] + p[2] ); return r; }; /*! * Substract another point to the current point * \param p * \return cuccrent point is substracted by p. */ CPoint operator-( const CPoint & p ) const { CPoint r( v[0] - p[0], v[1] - p[1], v[2] - p[2] ); return r; }; /*! * Multiply by a scalar * \param s scalar * \return current point is multipolied by s. */ CPoint operator*( const double s ) const { CPoint r( v[0] * s, v[1] * s, v[2] * s ); return r; }; /*! * Divide by a scalar * \param s scalar * \return current point is divided by s. */ CPoint operator/( const double s ) const { CPoint r( v[0] / s, v[1] / s, v[2] / s ); return r; }; /*! * Cross product * \param p2 another point * \return cross product of the current point with p2. * \f[ * \left| \begin{array}{ccc} x_1& y_1 & z_1\\ x_2 &y_2 & z_2\\ \mathbf{e}_1 & \mathbf{e}_2 & \mathbf{e}_3\\ \end{array} * \right| * \f] */ CPoint operator^( const CPoint & p2) const { CPoint r( v[1] * p2[2] - v[2] * p2[1], v[2] * p2[0] - v[0] * p2[2], v[0] * p2[1] - v[1] * p2[0]); return r; }; /*! * negate the point * \return the negative of the current point */ CPoint operator-() const { CPoint p(-v[0],-v[1],-v[2]); return p; }; protected: /*! * \f$(x,y,z)\f$ value */ double v[3]; }; /*! * Read a CPoint from a string * \param str string * \param p three dimenionsal point * \return the (x,y,z) value is read from str and assigned to p. */ inline void operator>>(const std::string & str, CPoint &p ) { std::string t = str; t.erase(0, t.find_first_not_of("()") ); t.erase(t.find_last_not_of("()") + 1); std::istringstream iss( t ); iss >> p[0] >> p[1] >> p[2]; } }//name space MeshLib #endif //_MESHLIB_POINT_H_ defined
[ "kailin@ulsee.com" ]
kailin@ulsee.com
6ef412696027a7c2dd3d5a2a8fb622851a901a74
e800ddc8aa6317f7314bd60f0444912e456e5361
/Tenta/2016-03-22/upg1/uppgift1.cc
22a7bcbd1c503c99283d4638f7004e769a8f3d63
[]
no_license
Leczez/TDIU20
290aa4645e05a68f9c2e87c2c0ee20ed6d70f777
2731c3f4aea9531b557999a8e2a9c4778acd4040
refs/heads/master
2020-12-19T02:58:32.303414
2020-05-14T11:08:47
2020-05-14T11:08:47
235,598,575
0
0
null
null
null
null
UTF-8
C++
false
false
1,886
cc
#include <vector> #include <iostream> #include <string> #include <iomanip> class Product_Line { public: Product_Line(std::string const& p, int a, double s): produktnamn{p}, antal{a}, styckpris{s} {} std::string produktnamn; int antal; double styckpris; }; class Receipt { public: Receipt(int i): kvittonummer{i}, kvittorader{} {} void add_product(Product_Line const& produkt) { kvittorader.push_back(produkt); } double purchase_value() { double total{}; for(auto x : kvittorader) { total += x.styckpris*x.antal; } return total; } void print_receipt() { std::cout << "Receipt no " << kvittonummer << ":\n"; for(auto x : kvittorader) { std::cout << x.produktnamn << ": " << x.antal << "st * " << std::setprecision(2) << std::fixed << x.styckpris << std::endl; } std::cout << "===\n" << "Köpeskilling: " << purchase_value() << "kr" << std::endl; } private: int kvittonummer; std::vector<Product_Line> kvittorader; }; int main() { Receipt kvitto1{1}; kvitto1.add_product(Product_Line{"apelsin", 2, 5.00}); kvitto1.add_product(Product_Line{"banan", 5, 7.50}); kvitto1.add_product(Product_Line{"citron", 1, 15.00}); kvitto1.print_receipt(); std::cout << std::endl; Receipt kvitto2{2}; kvitto2.add_product(Product_Line{"gurka", 1, 9.00}); kvitto2.add_product(Product_Line{"tomat", 5, 18.50}); kvitto2.add_product(Product_Line{"sallad", 1, 11.00}); kvitto2.print_receipt(); std::cout << std::endl; Receipt kvitto3{3}; kvitto3.add_product(Product_Line{"smör", 1, 19.00}); kvitto3.add_product(Product_Line{"bröd", 10, 24.50}); kvitto3.add_product(Product_Line{"ost", 1, 48.00}); kvitto3.print_receipt(); return 0; }
[ "johol842@tlhw-5-4.ad.liu.se" ]
johol842@tlhw-5-4.ad.liu.se
1604104a612d6926c255e9f74ca5b2afb6c5e934
30b8561243cff67f758633327004cb378e5c5cef
/source/include/NGE/Geometry/Ray.hpp
791e087212d380e9d42d1e6fb91ef17063d29aad
[]
no_license
tkubicz/ngengine
56a7235de0c799f541d47841380da6fd90d3abed
75413c8b77587e5ec8f03164fa9b5dcd7697c0c6
refs/heads/master
2021-01-12T06:02:57.202296
2016-06-15T16:42:43
2016-06-15T16:42:43
77,282,542
2
0
null
null
null
null
UTF-8
C++
false
false
1,008
hpp
/* * File: Ray.hpp * Author: tku * * Created on 30 maj 2012, 18:11 */ #ifndef RAY_HPP #define RAY_HPP #include "NGE/Math/Vector3.hpp" #include "NGE/Math/MathUtils.hpp" namespace NGE { namespace Geometry { template <typename T> class Ray { public: Math::Vector3<T> direction; Math::Vector3<T> position; Ray() { } Ray(Math::Vector3<T> direction, Math::Vector3<T> position) : direction(direction), position(position) { } bool IntersectSphere(const T& radius, const Math::Vector3<T>& center) { float t0, t1; Math::vec3f L = position - center; float a = direction.DotProduct(direction); float b = 2 * direction.DotProduct(L); float c = L.DotProduct(L) - (radius * radius); if (!Math::MathUtils::SolveQuadratic(a, b, c, t0, t1)) return false; // TODO: Do poprawki, zrobić tak, by możliwe było przekazanie obu punktów przecięcia, a nie tylko jednego. //pointOfIntersection = t0; return true; } }; } } #endif /* RAY_HPP */
[ "tymoteusz.kubicz@gmail.com" ]
tymoteusz.kubicz@gmail.com
12e8c0e082d2aacb9978d01d59ce8d68c8b2ed50
16258d7e37559e19be87bef91deefa804e6d2994
/Homework_Solutions/Homework 8.1-2 (List Iterator and STL containers).cpp
77a9b343cfd265687a8eed3fbc265602f8a059bf
[ "MIT" ]
permissive
ChenpoHU/CPP-Excercies_OOP
0ec454c3ad7c6a79b25f33a51cfcdeb1778245b6
b009b5a8da82fda6b3918f9f77b1d62ad0a1f876
refs/heads/master
2020-06-23T17:38:07.653152
2019-07-24T21:08:02
2019-07-24T21:08:02
198,700,585
1
0
null
2019-07-24T20:33:20
2019-07-24T19:50:22
C++
ISO-8859-1
C++
false
false
9,587
cpp
#include <iostream> #include <cstddef> #include <algorithm> #include <iterator> template <typename T> class Liste { public: Liste() = default; //this enables the standard constructor, which is used in main Liste<int> einContainner. //Adds an element to top of list void push_front(const T& value) { anfang = new ListElement(value, anfang); } private: struct ListElement { T daten; ListElement* naechstes; ListElement(const T& value, ListElement* p) : daten{ value }, naechstes{ p } { } //ListElement* p are the pointers between the elements (chained list) }; //define the first pointer which point from the list object to the first element //the other pointers are pointed from one element to another. The last element pointed to null (nullptr) ListElement* anfang{ nullptr }; public: class Iterator { //declared in scope of List friend class Liste;//Without this, the error "kein Zugriff auf private Member, dessen Deklaration in der Liste<int>::Iterator-Klasse erfolgte. public: // required by find() interface: using iterator_category = std::forward_iterator_tag; using value_type = T; using pointer = T *; using reference = T &; using difference_type = ptrdiff_t; Iterator(ListElement* init = nullptr) : aktuellesElement{ init } { } T& operator*() { // Dereference return aktuellesElement->daten; } const T& operator*() const { // Dereference return aktuellesElement->daten; } Iterator& operator++() { // Prefix if (aktuellesElement) {// not reached end yet? aktuellesElement = aktuellesElement->naechstes; } return *this; } Iterator operator++(int) { // Postfix Iterator temp{ *this }; ++* this; return temp; } bool operator==(const Iterator& x) const { return aktuellesElement == x.aktuellesElement; } bool operator!=(const Iterator& x) const { return aktuellesElement != x.aktuellesElement; } private: ListElement* aktuellesElement; // Reference to current element }; // iterator scope end Iterator begin() const { return Iterator(anfang); } Iterator end() const { return Iterator(); } Liste(const Liste& liste) { // Kopierkonstruktor if (liste.anfang) { Iterator i{ liste.begin() }; push_front(*i++); // erstes Element anlegen, anfang ist danach // != nullptr ListElement* letztes{ anfang }; while (i != liste.end()) { // Elemente am Ende einfügen, damit die // Reihenfolge erhalten bleibt letztes->naechstes = new ListElement(*i++, nullptr); letztes = letztes->naechstes; } } } Liste& operator=(Liste temp) { // Zuweisungsoperator std::swap(temp.anfang, anfang); return *this; } //Homework 8 1.1 //or use void pop_front() { erase(begin()); } void pop_front() { if (!anfang) //or anfang == nullptr throw std::underflow_error("no elements left"); ListElement* zweites = anfang->naechstes; // *anfang. delete anfang; anfang = zweites; } //Homwork 8.1.2 //Implement a method Iterator erase(Iterator p) which removes the element at position p. Iterator erase(Iterator p) { if (empty()) { return Iterator(); // leere Liste } ListElement* zuLoeschen{ p.aktuellesElement }; // Vorgänger suchen ListElement* vorgaenger{ anfang }; if (zuLoeschen != anfang) { while (vorgaenger->naechstes != zuLoeschen) { vorgaenger = vorgaenger->naechstes; } // Zeiger verbiegen vorgaenger->naechstes = zuLoeschen->naechstes; } else { // am Anfang löschen anfang = zuLoeschen->naechstes; // Zeiger verbiegen } Iterator nachfolger{ ++p }; delete zuLoeschen; return nachfolger; } //Homwork 8.1.4 //Write a destructor for Liste class. It should do a safe destruction of list and leave no memory footprint if the variable goes out of scope. void clear() { while (!(anfang == nullptr)) { //or !empty() pop_front(); } } bool empty() const { return anfang == nullptr; } virtual ~Liste() { // Destruktor clear(); } size_t size() const { size_t anzahl{ 0 }; ListElement* temp{ anfang }; while (temp) { ++anzahl; temp = temp->naechstes; } return anzahl; } }; using namespace std; int main() { Liste<int> einContainer; // Container definieren // Container mit beliebigen Werten füllen (hier: gerade Zahlen) for (int i = 0; i < 100; ++i) { einContainer.push_front(2 * i); } int zahl{ 0 }; while (zahl != -1) { cout << " gesuchte Zahl eingeben (-1 = Ende):"; cin >> zahl; if (zahl != -1) { // weitermachen? // std::find() benutzen auto position = find(einContainer.begin(), // Container-Methoden einContainer.end(), zahl); if (position == einContainer.end()) { cout << " nicht gefunden!\n"; } else { cout << *position // Dereferenzierung des Iterators << " gefunden!\n"; } } } // Liste kopieren Liste<int> kopie(einContainer); cout << "Kopie: \n"; while (!kopie.empty()) { cout << *kopie.begin() << " size()=" << kopie.size() << '\n'; kopie.pop_front(); } // Liste zuweisen kopie = einContainer; cout << "zugewiesene Kopie:\n"; while (!kopie.empty()) { cout << *kopie.begin() << " size()=" << kopie.size() << '\n'; kopie.pop_front(); } // Test von erase zahl = 6; auto position = find(einContainer.begin(), // Container-Methoden einContainer.end(), zahl); auto next = einContainer.erase(position); cout << "Wert nach dem gelöschten: " << *next << '\n'; } /* 2. STL 2.1. Consider the STL containers vector, list, map, array, forward list. Mention which of the containers support each of these operators : ++, --, []. vector: ++ -- [] array: ++ -- [] map: ++ -- [] : assoziative array list: ++ -- forward_list: ++ 2.2. Why you can not sort a std::set with std::sort? std::sort requires random access iterators while std::set provides only bidirectional iterators. Generally speaking, any try to sort a std::set contradicts to the design of this container, because it stores its elements in the sorted order. std::set is an associative container that contains a sorted set of unique objects of type Key. 2.3. Mention the most appropriate class of container you would use for the following scenarios: (a) Count number of characters in a string array (knows the size of the string) (b) Require fast insertion and deletion at end, but no traversal and requires less memory stack (end, less mem) (c) Pick the highest bidder from a bidding queue for an auction site map(key and value) or set (only key) (d) We want to store some date but order of data is not important and duplicates are not allowed. unordered set (only multi-set have man duplicates) */ /* gesuchte Zahl eingeben (-1 = Ende):-1 Kopie: 198 size()=100 196 size()=99 194 size()=98 192 size()=97 190 size()=96 188 size()=95 186 size()=94 184 size()=93 182 size()=92 180 size()=91 178 size()=90 176 size()=89 174 size()=88 172 size()=87 170 size()=86 168 size()=85 166 size()=84 164 size()=83 162 size()=82 160 size()=81 158 size()=80 156 size()=79 154 size()=78 152 size()=77 150 size()=76 148 size()=75 146 size()=74 144 size()=73 142 size()=72 140 size()=71 138 size()=70 136 size()=69 134 size()=68 132 size()=67 130 size()=66 128 size()=65 126 size()=64 124 size()=63 122 size()=62 120 size()=61 118 size()=60 116 size()=59 114 size()=58 112 size()=57 110 size()=56 108 size()=55 106 size()=54 104 size()=53 102 size()=52 100 size()=51 98 size()=50 96 size()=49 94 size()=48 92 size()=47 90 size()=46 88 size()=45 86 size()=44 84 size()=43 82 size()=42 80 size()=41 78 size()=40 76 size()=39 74 size()=38 72 size()=37 70 size()=36 68 size()=35 66 size()=34 64 size()=33 62 size()=32 60 size()=31 58 size()=30 56 size()=29 54 size()=28 52 size()=27 50 size()=26 48 size()=25 46 size()=24 44 size()=23 42 size()=22 40 size()=21 38 size()=20 36 size()=19 34 size()=18 32 size()=17 30 size()=16 28 size()=15 26 size()=14 24 size()=13 22 size()=12 20 size()=11 18 size()=10 16 size()=9 14 size()=8 12 size()=7 10 size()=6 8 size()=5 6 size()=4 4 size()=3 2 size()=2 0 size()=1 zugewiesene Kopie: 198 size()=100 196 size()=99 194 size()=98 192 size()=97 190 size()=96 188 size()=95 186 size()=94 184 size()=93 182 size()=92 180 size()=91 178 size()=90 176 size()=89 174 size()=88 172 size()=87 170 size()=86 168 size()=85 166 size()=84 164 size()=83 162 size()=82 160 size()=81 158 size()=80 156 size()=79 154 size()=78 152 size()=77 150 size()=76 148 size()=75 146 size()=74 144 size()=73 142 size()=72 140 size()=71 138 size()=70 136 size()=69 134 size()=68 132 size()=67 130 size()=66 128 size()=65 126 size()=64 124 size()=63 122 size()=62 120 size()=61 118 size()=60 116 size()=59 114 size()=58 112 size()=57 110 size()=56 108 size()=55 106 size()=54 104 size()=53 102 size()=52 100 size()=51 98 size()=50 96 size()=49 94 size()=48 92 size()=47 90 size()=46 88 size()=45 86 size()=44 84 size()=43 82 size()=42 80 size()=41 78 size()=40 76 size()=39 74 size()=38 72 size()=37 70 size()=36 68 size()=35 66 size()=34 64 size()=33 62 size()=32 60 size()=31 58 size()=30 56 size()=29 54 size()=28 52 size()=27 50 size()=26 48 size()=25 46 size()=24 44 size()=23 42 size()=22 40 size()=21 38 size()=20 36 size()=19 34 size()=18 32 size()=17 30 size()=16 28 size()=15 26 size()=14 24 size()=13 22 size()=12 20 size()=11 18 size()=10 16 size()=9 14 size()=8 12 size()=7 10 size()=6 8 size()=5 6 size()=4 4 size()=3 2 size()=2 0 size()=1 Wert nach dem gel÷schten: 4 */
[ "maodauibe@gmail.com" ]
maodauibe@gmail.com
4f9696d5b4bbbd731d8e8d1fd1d38ecfcbada389
9f6360d643cc803bcf6abe5d05ca39b12c40e799
/REYES/REYES/Mesh.cpp
4dc7002172cb2038980bf7d9b1b12b801b4cb82d
[]
no_license
christiandaley/Renderman
9612be4cd493ec2d911cb636df60f572f9b8af71
ef7b37d99a92a85ecb7d9c6595d3a2d5dac94cc7
refs/heads/master
2020-07-10T06:58:21.527355
2019-08-24T18:57:21
2019-08-24T18:57:21
204,198,377
0
0
null
null
null
null
UTF-8
C++
false
false
2,421
cpp
#include "stdafx.h" #include <iostream> #include "Mesh.h" #include "shaders.h" Mesh::Mesh(int width, int height) { this->width = width; this->height = height; this->points = new MeshEntry_t[width * height](); for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { MeshEntry_t &e = this->at(i, j); } } } MeshEntry_t &Mesh::at(int x, int y) { return points[y * width + x]; } void Mesh::normalAt(int x, int y, RtNormal N) { if (x == width - 1) { normalAt(width - 2, y, N); return; } else if (x == 0) { normalAt(1, y, N); return; } else if (y == height - 1) { normalAt(x, height - 2, N); return; } else if (y == 0) { normalAt(x, 1, N); return; } RtVector du, dv; MeshEntry_t &curr = this->at(x, y); MeshEntry_t &right = this->at(x + 1, y); MeshEntry_t &down = this->at(x, y + 1); du[0] = right.p[0] - curr.p[0]; du[1] = right.p[1] - curr.p[1]; du[2] = right.p[2] - curr.p[2]; dv[0] = down.p[0] - curr.p[0]; dv[1] = down.p[1] - curr.p[1]; dv[2] = down.p[2] - curr.p[2]; cross_product(du, dv, N); normalize(N); /*normalize(du); normalize(dv); print_point(du); print_point(dv); print_point(curr.p);*/ } void Mesh::color(RtColor c) { for (int i = 0; i < width * height; i++) { memcpy(points[i].c, c, sizeof(RtColor)); } } void Mesh::opacity(RtColor o) { for (int i = 0; i < width * height; i++) { memcpy(points[i].o, o, sizeof(RtColor)); } } void Mesh::shade(const void(*shader)(void)) { if (shader == NULL) return; RtNormal N; for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { MeshEntry_t &e = this->at(i, j); this->normalAt(i, j, N); /*if (i == 0 && j == 0) { this->normalAt(i, j, N); print_point(N); std::cout << ".." << std::endl; }*/ shaderInfo.p = &e.p; shaderInfo.c = &e.c; shaderInfo.o = &e.o; shaderInfo.N = &N; shaderInfo.u = (RtFloat)i / (width - 1); shaderInfo.v = (RtFloat)j / (height - 1); shader(); } } } void Mesh::transform(RtMatrix transform) { RtPoint p; for (int i = 0; i < width * height; i++) { point_transform(transform, points[i].p, p); memcpy(points[i].p, p, sizeof(RtPoint)); } } void Mesh::print() { for (int i = 0; i < width * height; i++) { print_point(points[i].p); print_point(points[i].c); } } unsigned int Mesh::size() { return width * height * sizeof(MeshEntry_t) / 1e6; } Mesh::~Mesh() { delete[] points; }
[ "christiandaley@gmail.com" ]
christiandaley@gmail.com
46d4f6e9eb94cf7e25eb3bf1e01544471a473cc9
74f97c25580ea8e3d5d8a350daa992cdbcb7ea9a
/More C++/Labs/Wk7/RiegerL_CIS247C_LabWk7/RiegerL_CIS247C_LabWk7/Source.cpp
c58f63205358eddc663f8742c7f8a4563f2d616a
[]
no_license
LRieger13/Learning
ef7b02f184c4ae3b9f6091f7a23d8089a398d94e
21e7ead4f19d5dc2f2c48a2e34d808637559c4b8
refs/heads/master
2021-07-21T23:24:07.873316
2020-04-28T21:08:52
2020-04-28T21:08:52
151,147,092
0
0
null
2019-10-19T23:51:02
2018-10-01T19:32:48
C++
UTF-8
C++
false
false
1,328
cpp
/* Leah Rieger CIS247C Lab Wk7 12/11/2019 */ #include <iostream> #include <string> #include <conio.h> #include "ArrayList.h" using namespace std; //constants //prototypes ///Entry point to application int main(void) { // checking for memory leaks #if defined(DEBUG) | defined(_DEBUG) _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); #endif //creating int ArrayList ArrayList<int> intList; // data type in <> intList.add(15); intList.add(30); intList.add(50); intList.add(4); intList.add(75); intList.add(21); // for loop showing data items for (int i = 0; i < intList.getCount(); i++) { cout << intList.get(i) << ", "; } cout << "\n" << endl; cout << "Count: " << intList.getCount() << endl; // show count cout << "Capacity: " << intList.getCapacity() << endl; // show capacity cout << "\n\n" << endl; // ArrayList holding string data items ArrayList<string> strList; strList.add("Lennon"); strList.add("Janice"); strList.add("John"); strList.add("Lisa"); // display list data for (int i = 0; i < strList.getCount(); i++) { cout << strList.get(i) << ", "; } cout << "\n" << endl; cout << "Count: " << strList.getCount() << endl; cout << "Capacity: " << strList.getCapacity() << endl; // pause cout << "\nPress any key to continue..."; _getch(); return 0; }
[ "leastuart92@gmail.com" ]
leastuart92@gmail.com
3a77b6727eb0ee9ef201cb0732d0995b15f40208
df88fe7229c70e2fdc7f1a138545eca51930d813
/src/init/cudnn.hpp
e3f23386d0e6e3449db8aa152cfe8520b5bd64b7
[]
no_license
simongdg/microbench
5a3a3436ac7b5d17448f2fee7b56040a28f358a1
135c6a89a53c3697a929c96d53686f88b8487370
refs/heads/master
2020-03-19T21:31:58.834979
2018-06-06T21:33:37
2018-06-06T21:33:37
112,533,314
0
0
null
2017-11-29T22:06:00
2017-11-29T22:05:59
null
UTF-8
C++
false
false
89
hpp
#pragma once #include <cudnn.h> extern cudnnHandle_t cudnn_handle; bool init_cudnn();
[ "abduld@wolfram.com" ]
abduld@wolfram.com
13017fa07734bd32f5c1565a635ef2284983f45d
0b10d8ab1d838824a8b3dc6f9684f0b9584c6a58
/hackton-2018-bus-server/bin/solve.cpp
1688cb5552c9d64db807c061053abb262b8c6d62
[]
no_license
jyxk/New_bus_route_planning_system
30b5420a40069cadbd78f2e5bd6bf60015b12fdd
3625bf1806650de389373b5f364af2b269bda9de
refs/heads/master
2020-08-09T10:08:23.030362
2019-01-19T06:16:20
2019-01-19T06:16:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,433
cpp
#include <cmath> #include <ctime> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <fstream> #include <algorithm> #define double long double typedef long long ll ; #define rep(i, a, b) for (int i = a; i <= b; ++ i) const int N = 5050, M = 3e7 + 5 ; const double inf = 1e17 ; const int RandBase = 9971, RandMo = 1e9 + 7 ; // const double MaxDist = 0.027084599965936 ; // k // using namespace std ; struct poi { double x, y ; int id, d ; poi() {} poi(double _x, double _y) { x = _x ; y = _y ; } } a[N], b[N] ; int n, G[N][N], e, ter[M], nxt[M], lnk[N], B[N], P[N], Ans[N], ans ; bool vis[N] ; // double sqr(double x) { return x * x ; } double GetDist(poi a, poi b) { return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y)) ; } // inline int Rand() { int res = 0 ; rep(i, 1, 20) { res = ((ll) res * RandBase + rand()) % RandMo + 1 ; } return res ; } void Init(const char * filename) { freopen(filename, "r", stdin) ; scanf("%d", &n) ; rep(i, 1, n) { scanf("%Lf%Lf", &a[i].x, &a[i].y) ; } rep(i, 1, n) rep(j, 1, n) { scanf("%d", &G[i][j]) ; } // printf("%.15Lf\n", 3.0 / 6.801 * GetDist(a[1], a[2])) ; } void Add(int x, int y) { ter[++ e] = y ; nxt[e] = lnk[x] ; lnk[x] = e ; } void Pre(int s) { rep(i, 1, n) lnk[i] = 0 ; rep(i, 1, e) nxt[i] = 0 ; e = 0 ; rep(i, 1, n) rep(j, 1, n) { if (i == j) continue ; if (GetDist(a[i], a[j]) > MaxDist) continue ; if (GetDist(a[i], a[s]) >= GetDist(a[j], a[s])) continue ; Add(i, j) ; } } void Upd() { int tmp = 0 ; rep(i, 1, B[0]) rep(j, i + 1, B[0]) { tmp += G[B[i]][B[j]] ; } if (tmp > ans) { ans = tmp ; rep(i, 0, B[0]) { Ans[i] = B[i] ; } } } void Run(int s) { Pre(s) ; rep(L, 1, 1000) { // 1000 B[0] = 1 ; B[1] = s ; for ( ; ; ) { int u = B[B[0]] ; int Sum = 0 ; for (int i = lnk[u] ; i; i = nxt[i]) { int v = ter[i] ; double Mn = inf, o = GetDist(a[v], a[u]) ; vis[v] = true ; rep(j, 1, B[0] - 1) if (GetDist(a[B[j]], a[v]) <= o) { vis[v] = false ; break ; } if (!vis[v]) { continue ; } int res = 0 ; rep(j, 1, B[0]) { res += G[B[j]][v] ; } Sum += res ; P[v] = res ; } if (!Sum) break ; int x = Rand() % Sum + 1 ; for (int i = lnk[u] ; i ; i = nxt[i]) { int v = ter[i] ; if (!vis[v]) continue ; if (x <= P[v]) { B[++ B[0]] = v ; break ; } x -= P[v] ; } } Upd() ; } } void Solve() { // 找k个起点 rep(i, 1, n) { a[i].id = i ; } int k = 100 ; rep(i, 1, n) { a[i].d = 0 ; rep(j, 1, n) { a[i].d += G[i][j] ; } } rep(i, 1, n) { b[i] = a[i] ; } int Sum = 0 ; rep(i, 1, n) { Sum += b[i].d ; } rep(t, 1, k) { if (!Sum) break ; int x = Rand() % Sum + 1 ; rep(i, 1, n) { if (x <= b[i].d) { Run(b[i].id) ; Sum -= b[i].d ; rep(j, i + 1, n) { b[j - 1] = b[j] ; } break ; } x -= b[i].d ; } } } void Print(const char * outputfile) { /*int Sum = 0 ; rep(i, 1, n) rep(j, 1, n) { Sum += G[i][j] ; } cout << Sum << endl ; */ FILE* fp= fopen(outputfile,"w"); if(fp) fclose(fp); fstream fs; fs.open(outputfile,fstream::out|fstream::app); fs.precision(16); rep(i, 1, Ans[0]) { fs<< a[Ans[i]].x << "," << a[Ans[i]].y <<endl; } /*rep(i, 1, Ans[0] - 1) { printf("%.15Lf\n", GetDist(a[Ans[i]], a[Ans[i + 1]]) * 6.801 / GetDist(a[1], a[2])) ; }*/ // cout << endl << ans << endl ; fs.close(); } int main(int argc,char* argv[]) { srand(time(NULL)); Init(argv[1]); Solve() ; Print(argv[2]) ; return 0 ; }
[ "purityfan@163.com" ]
purityfan@163.com
0b3ca6611434b2dc5d0a4cb91fcc97b2e7b5d7d0
9e81bdf5e33b8b947de517257e577c57bedcc7cc
/src/media/audio/audio_core/packet_queue.cc
846a24a393aed4960a98015a69a945515a0d9c20
[ "BSD-2-Clause" ]
permissive
xzlinux/fuchsia
750ed2354445cba7404ef4cf34fa13df60a39461
5332db5dc3d81ed8ea8e75ec849232ae073a3843
refs/heads/master
2023-07-14T20:17:05.485952
2021-08-19T11:51:25
2021-08-19T11:51:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
11,818
cc
// Copyright 2016 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/media/audio/audio_core/packet_queue.h" #include <lib/syslog/cpp/macros.h> #include <lib/trace/event.h> #include <iomanip> #include "src/media/audio/audio_core/audio_object.h" #include "src/media/audio/audio_core/mixer/gain.h" #include "src/media/audio/lib/clock/audio_clock.h" #include "src/media/audio/lib/format/format.h" namespace media::audio { namespace { // To what extent should client-side underflows be logged? (A "client-side underflow" refers to when // all or part of a packet's data is discarded because its start timestamp has already passed.) // For each packet queue, we will log the first underflow. For subsequent occurrences, depending on // audio_core's logging level, we throttle how frequently these are displayed. If log_level is set // to TRACE or SPEW, all client-side underflows are logged -- at log_level -1: VLOG TRACE -- as // specified by kUnderflowTraceInterval. If set to INFO, we log less often, at log_level 1: INFO, // throttling by the factor kUnderflowInfoInterval. If set to WARNING or higher, we throttle these // even more, specified by kUnderflowWarningInterval. Note: by default we set NDEBUG builds to // WARNING and DEBUG builds to INFO. To disable all logging of client-side underflows, set // kLogUnderflow to false. static constexpr bool kLogUnderflow = true; static constexpr uint16_t kUnderflowTraceInterval = 1; static constexpr uint16_t kUnderflowInfoInterval = 10; static constexpr uint16_t kUnderflowWarningInterval = 100; } // namespace PacketQueue::PacketQueue(Format format, std::unique_ptr<AudioClock> audio_clock) : PacketQueue(format, nullptr, std::move(audio_clock)) {} PacketQueue::PacketQueue(Format format, fbl::RefPtr<VersionedTimelineFunction> timeline_function, std::unique_ptr<AudioClock> audio_clock) : ReadableStream(std::move(format)), timeline_function_(std::move(timeline_function)), audio_clock_(std::move(audio_clock)) {} PacketQueue::~PacketQueue() { pending_flush_packet_queue_.clear(); pending_packet_queue_.clear(); pending_flush_token_queue_.clear(); } void PacketQueue::PushPacket(const fbl::RefPtr<Packet>& packet) { TRACE_DURATION("audio", "PacketQueue::PushPacket"); std::lock_guard<std::mutex> locker(pending_mutex_); pending_packet_queue_.emplace_back(std::move(packet)); } void PacketQueue::Flush(const fbl::RefPtr<PendingFlushToken>& flush_token) { TRACE_DURATION("audio", "PacketQueue::Flush"); std::deque<fbl::RefPtr<Packet>> flushed_packets; { std::lock_guard<std::mutex> locker(pending_mutex_); flushed_ = true; if (processing_in_progress_) { // Is the sink currently mixing? If so, the flush cannot complete until the mix operation has // finished. Move the 'waiting to be rendered' packets to the back of the 'waiting to be // flushed queue', and append our flush token (if any) to the pending flush token queue. The // sink's thread will take care of releasing these objects back to the service thread for // cleanup when it has finished its current job. for (auto& packet : pending_packet_queue_) { pending_flush_packet_queue_.emplace_back(std::move(packet)); } pending_packet_queue_.clear(); if (flush_token != nullptr) { pending_flush_token_queue_.emplace_back(std::move(flush_token)); } return; } else { // If the sink is not currently mixing, then we just swap the contents the pending packet // queues with out local queue and release the packets in the proper order once we have left // the pending mutex lock. FX_DCHECK(pending_flush_packet_queue_.empty()); FX_DCHECK(pending_flush_token_queue_.empty()); flushed_packets.swap(pending_packet_queue_); } } // Release the packets, front to back. for (auto& ptr : flushed_packets) { ptr = nullptr; } } std::optional<ReadableStream::Buffer> PacketQueue::ReadLock(Fixed frame, int64_t frame_count) { TRACE_DURATION("audio", "PacketQueue::ReadLock"); std::lock_guard<std::mutex> locker(pending_mutex_); FX_DCHECK(!processing_in_progress_); if (!pending_packet_queue_.size()) { return std::nullopt; } // TODO(fxbug.dev/50669): Obey ReadLock API. processing_in_progress_ = true; auto& packet = pending_packet_queue_.front(); bool is_continuous = !flushed_; flushed_ = false; return std::make_optional<ReadableStream::Buffer>( packet->start(), packet->length(), packet->payload(), is_continuous, usage_mask_, Gain::kUnityGainDb, [this](bool fully_consumed) { this->ReadUnlock(fully_consumed); }); } void PacketQueue::ReadUnlock(bool fully_consumed) { TRACE_DURATION("audio", "PacketQueue::ReadUnlock"); std::lock_guard<std::mutex> locker(pending_mutex_); FX_DCHECK(processing_in_progress_); processing_in_progress_ = false; // Did a flush take place while we were working? If so release each of the packets waiting to // be flushed back to the service thread, then release each of the flush tokens. if (!pending_flush_packet_queue_.empty() || !pending_flush_token_queue_.empty()) { for (auto& ptr : pending_flush_packet_queue_) { ptr = nullptr; } for (auto& ptr : pending_flush_token_queue_) { ptr = nullptr; } pending_flush_packet_queue_.clear(); pending_flush_token_queue_.clear(); return; } // If the buffer was fully consumed, release the first packet. The queue must not be empty, // unless the queue was flushed between ReadLock and ReadUnlock, but that case is handled above. if (fully_consumed) { FX_DCHECK(!pending_packet_queue_.empty()); pending_packet_queue_.pop_front(); } } void PacketQueue::Trim(Fixed frame) { TRACE_DURATION("audio", "PacketQueue::Trim"); std::lock_guard<std::mutex> locker(pending_mutex_); while (!pending_packet_queue_.empty()) { auto packet = pending_packet_queue_.front(); if (packet->end() > frame) { return; } pending_packet_queue_.pop_front(); } } BaseStream::TimelineFunctionSnapshot PacketQueue::ref_time_to_frac_presentation_frame() const { if (!timeline_function_) { return { .timeline_function = TimelineFunction(), .generation = kInvalidGenerationId, }; } auto [timeline_function, generation] = timeline_function_->get(); return { .timeline_function = timeline_function, .generation = generation, }; } void PacketQueue::ReportUnderflow(Fixed frac_source_start, Fixed frac_source_mix_point, zx::duration underflow_duration) { TRACE_INSTANT("audio", "PacketQueue::ReportUnderflow", TRACE_SCOPE_THREAD, "floor(frac_source_start)", frac_source_start.Floor(), "floor(frac_source_mix_point)", frac_source_mix_point.Floor(), "duration_ns", underflow_duration.to_nsecs()); TRACE_ALERT("audio", "audiounderflow"); uint16_t underflow_count = std::atomic_fetch_add<uint16_t>(&underflow_count_, 1u); if (underflow_reporter_) { zx::time start_mono_time; // If the renderer is paused concurrently with a mix, the timeline_function may be zeroed. // If that happens, estimate start_mono_time using now - underflow_duration. auto ref_time_to_fixed = timeline_function_->get().first; if (ref_time_to_fixed.invertible()) { auto fixed_to_ref_time = ref_time_to_fixed.Inverse(); auto start_ref_time = zx::time(fixed_to_ref_time.Apply(frac_source_start.raw_value())); start_mono_time = reference_clock().MonotonicTimeFromReferenceTime(start_ref_time); } else { start_mono_time = zx::clock::get_monotonic() - underflow_duration; } underflow_reporter_(start_mono_time, start_mono_time + underflow_duration); } if constexpr (kLogUnderflow) { auto underflow_msec = static_cast<double>(underflow_duration.to_nsecs()) / ZX_MSEC(1); if ((kUnderflowWarningInterval > 0) && (underflow_count % kUnderflowWarningInterval == 0)) { FX_LOGS(WARNING) << "PACKET QUEUE UNDERFLOW #" << underflow_count + 1 << " (1/" << kUnderflowWarningInterval << "): source-start " << ffl::String::DecRational << frac_source_start << " missed mix-point " << frac_source_mix_point << " by " << std::dec << std::setprecision(4) << underflow_msec << " ms"; } else if ((kUnderflowInfoInterval > 0) && (underflow_count % kUnderflowInfoInterval == 0)) { FX_LOGS(INFO) << "PACKET QUEUE UNDERFLOW #" << underflow_count + 1 << " (1/" << kUnderflowInfoInterval << "): source-start " << ffl::String::DecRational << frac_source_start << " missed mix-point " << frac_source_mix_point << " by " << std::dec << std::setprecision(4) << underflow_msec << " ms"; } else if ((kUnderflowTraceInterval > 0) && (underflow_count % kUnderflowTraceInterval == 0)) { FX_LOGS(TRACE) << "PACKET QUEUE UNDERFLOW #" << underflow_count + 1 << " (1/" << kUnderflowTraceInterval << "): source-start " << ffl::String::DecRational << frac_source_start << " missed mix-point " << frac_source_mix_point << " by " << std::dec << std::setprecision(4) << underflow_msec << " ms"; } } } void PacketQueue::ReportPartialUnderflow(Fixed frac_source_offset, int64_t dest_mix_offset) { TRACE_INSTANT("audio", "PacketQueue::ReportPartialUnderflow", TRACE_SCOPE_THREAD, "floor(frac_source_offset)", frac_source_offset.Floor(), "dest_mix_offset", dest_mix_offset); // Shifts by less than four source frames do not necessarily indicate underflow. A shift of this // duration can be caused by the round-to-nearest-dest-frame step, when our rate-conversion ratio // is sufficiently large (it can be as large as 4:1). if (frac_source_offset >= 4) { auto partial_underflow_count = std::atomic_fetch_add<uint16_t>(&partial_underflow_count_, 1u); if constexpr (kLogUnderflow) { if ((kUnderflowWarningInterval > 0) && (partial_underflow_count % kUnderflowWarningInterval == 0)) { FX_LOGS(WARNING) << "PACKET QUEUE SHIFT #" << partial_underflow_count + 1 << " (1/" << kUnderflowWarningInterval << "): shifted by " << ffl::String::DecRational << frac_source_offset << " source frames and " << dest_mix_offset << " mix (output) frames"; } else if ((kUnderflowInfoInterval > 0) && (partial_underflow_count % kUnderflowInfoInterval == 0)) { FX_LOGS(INFO) << "PACKET QUEUE SHIFT #" << partial_underflow_count + 1 << " (1/" << kUnderflowInfoInterval << "): shifted by " << ffl::String::DecRational << frac_source_offset << " source frames and " << dest_mix_offset << " mix (output) frames"; } else if ((kUnderflowTraceInterval > 0) && (partial_underflow_count % kUnderflowTraceInterval == 0)) { FX_LOGS(TRACE) << "PACKET QUEUE SHIFT #" << partial_underflow_count + 1 << " (1/" << kUnderflowTraceInterval << "): shifted by " << ffl::String::DecRational << frac_source_offset << " source frames and " << dest_mix_offset << " mix (output) frames"; } } } else { if constexpr (kLogUnderflow) { FX_LOGS(TRACE) << "shifted " << dest_mix_offset << " mix (output) frames to align with source packet"; } } } } // namespace media::audio
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
dbf1bbde3562e7854f23aa42ea633c75758ed4c0
24147d62cfb25b5a3a303764c85d563cc4753ee4
/SRM/504/ComparerInator.cpp
b5e8e9bc45bd917863309373886ec278721c7cfc
[]
no_license
shuaib/topcoder
3686243fc3a21948e96763273c70138a17e1e8a1
bbce5f6accc13fce867875a048f9be61fd29d269
refs/heads/master
2021-01-13T01:40:10.095629
2012-05-24T17:28:57
2012-05-24T17:28:57
1,601,737
0
0
null
null
null
null
UTF-8
C++
false
false
4,797
cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> using namespace std; class ComparerInator { public: int makeProgram(vector <int> A, vector <int> B, vector <int> wanted) { vector<int> r1; vector<int> r2; if(A==wanted) return 1; else if(B==wanted) return 1; else { for(int i=0;i<A.size();i++) { A[i]<B[i]?r1.push_back(A[i]):r1.push_back(B[i]); } for(int i=0;i<A.size();i++) { A[i]<B[i]?r2.push_back(B[i]):r2.push_back(A[i]); } if(r1==wanted || r2 == wanted) return 7; else return -1; } } }; // BEGIN KAWIGIEDIT TESTING // Generated by KawigiEdit 2.1.4 (beta) modified by pivanof bool KawigiEdit_RunTest(int testNum, vector <int> p0, vector <int> p1, vector <int> p2, bool hasAnswer, int p3) { cout << "Test " << testNum << ": [" << "{"; for (int i = 0; int(p0.size()) > i; ++i) { if (i > 0) { cout << ","; } cout << p0[i]; } cout << "}" << "," << "{"; for (int i = 0; int(p1.size()) > i; ++i) { if (i > 0) { cout << ","; } cout << p1[i]; } cout << "}" << "," << "{"; for (int i = 0; int(p2.size()) > i; ++i) { if (i > 0) { cout << ","; } cout << p2[i]; } cout << "}"; cout << "]" << endl; ComparerInator *obj; int answer; obj = new ComparerInator(); clock_t startTime = clock(); answer = obj->makeProgram(p0, p1, p2); clock_t endTime = clock(); delete obj; bool res; res = true; cout << "Time: " << double(endTime - startTime) / CLOCKS_PER_SEC << " seconds" << endl; if (hasAnswer) { cout << "Desired answer:" << endl; cout << "\t" << p3 << endl; } cout << "Your answer:" << endl; cout << "\t" << answer << endl; if (hasAnswer) { res = answer == p3; } if (!res) { cout << "DOESN'T MATCH!!!!" << endl; } else if (double(endTime - startTime) / CLOCKS_PER_SEC >= 2) { cout << "FAIL the timeout" << endl; res = false; } else if (hasAnswer) { cout << "Match :-)" << endl; } else { cout << "OK, but is it right?" << endl; } cout << "" << endl; return res; } int main() { bool all_right; all_right = true; vector <int> p0; vector <int> p1; vector <int> p2; int p3; { // ----- test 0 ----- int t0[] = {1}; p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0])); int t1[] = {2}; p1.assign(t1, t1 + sizeof(t1) / sizeof(t1[0])); int t2[] = {2}; p2.assign(t2, t2 + sizeof(t2) / sizeof(t2[0])); p3 = 1; all_right = KawigiEdit_RunTest(0, p0, p1, p2, true, p3) && all_right; // ------------------ } { // ----- test 1 ----- int t0[] = {1,3}; p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0])); int t1[] = {2,1}; p1.assign(t1, t1 + sizeof(t1) / sizeof(t1[0])); int t2[] = {2,3}; p2.assign(t2, t2 + sizeof(t2) / sizeof(t2[0])); p3 = 7; all_right = KawigiEdit_RunTest(1, p0, p1, p2, true, p3) && all_right; // ------------------ } { // ----- test 2 ----- int t0[] = {1,3,5}; p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0])); int t1[] = {2,1,7}; p1.assign(t1, t1 + sizeof(t1) / sizeof(t1[0])); int t2[] = {2,3,5}; p2.assign(t2, t2 + sizeof(t2) / sizeof(t2[0])); p3 = -1; all_right = KawigiEdit_RunTest(2, p0, p1, p2, true, p3) && all_right; // ------------------ } { // ----- test 3 ----- int t0[] = {1,3,5}; p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0])); int t1[] = {2,1,7}; p1.assign(t1, t1 + sizeof(t1) / sizeof(t1[0])); int t2[] = {1,3,5}; p2.assign(t2, t2 + sizeof(t2) / sizeof(t2[0])); p3 = 1; all_right = KawigiEdit_RunTest(3, p0, p1, p2, true, p3) && all_right; // ------------------ } { // ----- test 4 ----- int t0[] = {1,2,3,4,5,6,7,8,9,10,11}; p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0])); int t1[] = {5,4,7,8,3,1,1,2,3,4,6}; p1.assign(t1, t1 + sizeof(t1) / sizeof(t1[0])); int t2[] = {1,2,3,4,3,1,1,2,3,4,6}; p2.assign(t2, t2 + sizeof(t2) / sizeof(t2[0])); p3 = 7; all_right = KawigiEdit_RunTest(4, p0, p1, p2, true, p3) && all_right; // ------------------ } { // ----- test 5 ----- int t0[] = {1,5,6,7,8}; p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0])); int t1[] = {1,5,6,7,8}; p1.assign(t1, t1 + sizeof(t1) / sizeof(t1[0])); int t2[] = {1,5,6,7,8}; p2.assign(t2, t2 + sizeof(t2) / sizeof(t2[0])); p3 = 1; all_right = KawigiEdit_RunTest(5, p0, p1, p2, true, p3) && all_right; // ------------------ } if (all_right) { cout << "You're a stud (at least on the example cases)!" << endl; } else { cout << "Some of the test cases had errors." << endl; } return 0; } // END KAWIGIEDIT TESTING //Powered by KawigiEdit 2.1.4 (beta) modified by pivanof!
[ "shuaib@bytehood.com" ]
shuaib@bytehood.com
3a4c76fa09ac0baf73e67c03c6db61c1d348e093
1e5774c55ee87bb9c7f94759c414ace8081c79b4
/SumDigits.cpp
66f6f6a3dabd898146a5c186ba54ec843f2f41b1
[]
no_license
RogerHunter313/Recursion
ea18b1f86031008c9d580d87df6997f159cf3a5d
7ea1a60165bd7911cb54ec5d19f799bc56fbc276
refs/heads/main
2023-04-12T19:46:54.267592
2021-05-04T21:53:14
2021-05-04T21:53:14
344,813,150
0
0
null
null
null
null
UTF-8
C++
false
false
264
cpp
#include <iostream> using namespace std; int sumDigits(int n) { // base if (n==0) return 0; int smallAns = sumDigits(n/10); return smallAns + n%10; } int main() { int input = 12345; cout << sumDigits(input); return 0; }
[ "rogerhunter313@gmail.com" ]
rogerhunter313@gmail.com
eda75782fef29299b98348971fec701e213a468d
bf76ebe02527b728313664a9f6dfdfe1411e6a81
/infer/tests/codetoanalyze/cpp/starvation/crossfile-1.h
7258cbe48848dc1bebc08735aa132df1fc8c9a0a
[ "MIT", "GPL-1.0-or-later" ]
permissive
facebook/infer
30d13fd15e1d1c333800369b9120ac14c1e0c9e5
80a888ee5c534a40d4a178e5da3eaa61a3334ad1
refs/heads/main
2023-08-31T11:34:35.419621
2023-08-31T08:56:41
2023-08-31T08:56:41
29,857,799
15,855
2,632
MIT
2023-08-24T09:51:53
2015-01-26T11:19:13
OCaml
UTF-8
C++
false
false
695
h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #ifndef CROSS_FILE_ONE #define CROSS_FILE_ONE /* The goal of this test is to demonstrate that the per-file type environments don't prevent the deadlock report here */ // unused include to distinguish the two per-file type environments #include <vector> #include <mutex> class CrossFileOne; #include "crossfile-2.h" class CrossFileOne { public: CrossFileOne() {} void lock_my_mutex_first_then_the_other(CrossFileTwo* other); void just_lock_my_mutex(); private: std::mutex _mutex; }; #endif
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
ad30fba757b1143d2d5ca938010d1e0895b28515
70412245895c571c6dfafa4c7b6b9cfd7c019d47
/Composition in c++/src/people.cpp
968277c3e5ec528d2c4e484bb1079b079f6caae6
[]
no_license
Jeetuyadav82/CPP-Learn-From-Scratch-All-Programs-and-Concepts
bb7e795469411e75323867d067461b0ee4f4f55c
8c74a755fcccb093c66b3c30986a04bd73230ee0
refs/heads/master
2022-04-28T07:13:44.068379
2020-04-28T09:07:51
2020-04-28T09:07:51
259,579,260
0
0
null
null
null
null
UTF-8
C++
false
false
261
cpp
#include "people.h" #include "Birthday.h" #include <iostream> using namespace std; People::People(string x,Birthday bo) :name(x),DateOfBirth(bo) { } void People::printInfo() { cout << name <<"was born on "; DateOfBirth.printDate(); }
[ "noreply@github.com" ]
noreply@github.com
e1de0f636a6af1cb0b7a05449ae0aca0417a6f45
c2c3939c18d9e9d05030f36d322cb394e9293283
/cpp_src/core/ft/idrelset.h
8b07027a3dd0238ef17fd0883577cbcd6615276d
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
InteLigent/reindexer
b4973a7f00b3ddb4545aaa3bc591e77438c877e1
ea987eb769a5de1dd2df9452d5592ab121e64e42
refs/heads/master
2021-04-03T06:49:51.221016
2018-03-02T20:55:02
2018-03-02T20:55:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,592
h
#pragma once #include <limits.h> #include "estl/h_vector.h" #include "estl/packed_vector.h" namespace reindexer { typedef int VDocIdType; struct IdRelType { // Disable copy - enable only move IdRelType() = default; IdRelType(IdRelType&&) noexcept = default; IdRelType(const IdRelType&) = delete; IdRelType& operator=(IdRelType&&) noexcept = default; IdRelType& operator=(const IdRelType&) = delete; int pos2rank(int pos) const { if (pos <= 10) return 100 - pos; if (pos <= 100) return 90 - (pos / 10); if (pos <= 1000) return 80 - (pos / 100); return 70; } int rank() const { return !pos.size() ? 0 : pos2rank(pos.front().pos()) + std::max(10, int(pos.size())); } int distance(const IdRelType& other, int max) const; int wordsInField(int field); // packed_vector callbacks size_t pack(uint8_t* buf) const; size_t unpack(const uint8_t* buf, unsigned len); size_t maxpackedsize() const { return 2 * (sizeof(VDocIdType) + 1) + (pos.size() * (sizeof(uint16_t) + 1)); } struct PosType { static const int posBits = 24; PosType() = default; PosType(int pos, int field) : fpos(pos | (field << posBits)) {} int pos() const { return fpos & ((1 << posBits) - 1); } int field() const { return fpos >> posBits; } unsigned fpos; }; VDocIdType id = 0; h_vector<PosType, 6> pos; }; class IdRelSet : public h_vector<IdRelType, 0> { public: int Add(VDocIdType id, int pos, int field); void Commit(); void SimpleCommit(); VDocIdType max_id_ = 0; VDocIdType min_id_ = INT_MAX; }; using PackedIdRelSet = packed_vector<IdRelType>; } // namespace reindexer
[ "ogerasimov@gmail.com" ]
ogerasimov@gmail.com
9572f03167cd150eeca1508be0ab08ee7bbf4b44
1767a66f84a8006f72adc796c57c25e63c4dc0fe
/source/code/core/collections/tests/test_shard_container.cxx
e8cb4196c21247f0669cd5cf80fd995b3eb7d1f9
[ "MIT" ]
permissive
iceshard-engine/engine
9baa3bceec55390b65ebf94f5730f5f21a4cfcee
fd2e0f8e739da48a05d8820a0c5d8161956e731d
refs/heads/master
2023-08-07T13:10:45.783710
2023-05-14T06:41:46
2023-05-14T06:41:46
191,127,270
50
1
MIT
2023-08-01T14:37:22
2019-06-10T08:24:10
C++
UTF-8
C++
false
false
16,475
cxx
/// Copyright 2022 - 2023, Dandielo <dandielo@iceshard.net> /// SPDX-License-Identifier: MIT #include <catch2/catch_test_macros.hpp> #include <ice/mem_allocator_host.hxx> #include <ice/shard.hxx> #include <ice/shard_container.hxx> SCENARIO("collections 'ice/shard_container.hxx'", "[shard][collection]") { using ice::operator""_shard; static constexpr ice::Shard test_shard_1 = "shard_1"_shard; static constexpr ice::Shard test_shard_2 = "shard_2"_shard; ice::HostAllocator alloc{ }; ice::ShardContainer test_container{ alloc }; GIVEN("an empty shard container") { REQUIRE(ice::shards::empty(test_container)); REQUIRE(ice::shards::capacity(test_container) == 0); WHEN("shard 'one' is pushed without a payload") { ice::shards::push_back(test_container, test_shard_1); CHECK(ice::shards::size(test_container) == 1); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 1); CHECK(ice::shards::count(test_container, test_shard_2) == 0); THEN("shards of type 'one' are removed") { ice::shards::remove_all_of(test_container, test_shard_1); CHECK(ice::shards::size(test_container) == 0); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 0); CHECK(ice::shards::count(test_container, test_shard_2) == 0); } THEN("shards of type 'two' are removed") { ice::shards::remove_all_of(test_container, test_shard_2); CHECK(ice::shards::size(test_container) == 1); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 1); CHECK(ice::shards::count(test_container, test_shard_2) == 0); } THEN("inspecting the container returns no results") { ice::Array<ice::u32> payloads{ alloc }; ice::u32 const payload_count = ice::shards::inspect_all(test_container, test_shard_1, payloads); CHECK(payload_count == 0); } } WHEN("shard 'two' is pushed with a payload") { constexpr ice::u32 test_payload_value = 0xD00D00; ice::shards::push_back(test_container, test_shard_2 | test_payload_value); CHECK(ice::shards::size(test_container) == 1); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 0); CHECK(ice::shards::count(test_container, test_shard_2) == 1); THEN("shards of type 'one' are removed") { ice::shards::remove_all_of(test_container, test_shard_1); CHECK(ice::shards::size(test_container) == 1); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 0); CHECK(ice::shards::count(test_container, test_shard_2) == 1); } THEN("shards of type 'two' are removed") { ice::shards::remove_all_of(test_container, test_shard_2); CHECK(ice::shards::size(test_container) == 0); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 0); CHECK(ice::shards::count(test_container, test_shard_2) == 0); } THEN("inspecting the container returns one result") { ice::Array<ice::u32> payloads{ alloc }; ice::u32 const payload_count = ice::shards::inspect_all(test_container, test_shard_2, payloads); REQUIRE(payload_count == 1); CHECK(payloads[0] == test_payload_value); } } WHEN("multiple shards are pushed with payloads") { constexpr ice::i32 test_i32_payload_value1 = 0x103232; constexpr ice::i32 test_i32_payload_value2 = -0x103232; constexpr ice::u32 test_u32_payload_value1 = 0x103232; constexpr ice::u32 test_u32_payload_value2 = ~0x103232u; constexpr ice::i64 test_i64_payload_value1 = 0x7f000000'000000ff; constexpr ice::i64 test_i64_payload_value2 = 0xff000000'000000ff; static constexpr ice::Shard test_shard_3 = "shard_3"_shard; static constexpr ice::Shard test_shard_4 = "shard_4"_shard; ice::shards::push_back(test_container, test_shard_1 | test_i32_payload_value1); ice::shards::push_back(test_container, test_shard_1 | test_u32_payload_value1); ice::shards::push_back(test_container, test_shard_2 | test_i64_payload_value1); ice::shards::push_back(test_container, test_shard_3 | test_i32_payload_value2); ice::shards::push_back(test_container, test_shard_3 | test_u32_payload_value2); ice::shards::push_back(test_container, test_shard_4 | test_i64_payload_value2); CHECK(ice::shards::size(test_container) == 6); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 2); CHECK(ice::shards::count(test_container, test_shard_2) == 1); CHECK(ice::shards::count(test_container, test_shard_3) == 2); CHECK(ice::shards::count(test_container, test_shard_4) == 1); THEN("we add even more shards (without shard+payload duplicates)") { ice::shards::push_back(test_container, test_shard_1 | test_i64_payload_value1); ice::shards::push_back(test_container, test_shard_2 | test_i32_payload_value2); ice::shards::push_back(test_container, test_shard_3 | test_i64_payload_value2); ice::shards::push_back(test_container, test_shard_4 | test_u32_payload_value1); CHECK(ice::shards::size(test_container) == 10); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 3); CHECK(ice::shards::count(test_container, test_shard_2) == 2); CHECK(ice::shards::count(test_container, test_shard_3) == 3); CHECK(ice::shards::count(test_container, test_shard_4) == 2); THEN("inspect using shards without payload-id's") { ice::i32 payload_i32 = 1; ice::u32 payload_u32 = 1; ice::i64 payload_i64 = 1; bool inspect_1 = ice::shards::inspect_first(test_container, test_shard_1, payload_i32); bool inspect_2 = ice::shards::inspect_first(test_container, test_shard_2, payload_u32); bool inspect_3 = ice::shards::inspect_first(test_container, test_shard_3, payload_i64); CHECK(inspect_1 == true); CHECK(inspect_2 == false); CHECK(inspect_3 == false); CHECK(payload_i32 == test_i32_payload_value1); CHECK(payload_u32 == 1); CHECK(payload_i64 == 1); inspect_1 = ice::shards::inspect_last(test_container, test_shard_4, payload_i32); inspect_2 = ice::shards::inspect_last(test_container, test_shard_3, payload_u32); inspect_3 = ice::shards::inspect_last(test_container, test_shard_2, payload_i64); CHECK(inspect_1 == false); CHECK(inspect_2 == false); CHECK(inspect_3 == false); } THEN("inspect using shards with payload-id's") { ice::i32 payload_i32 = 1; ice::u32 payload_u32 = 1; ice::i64 payload_i64 = 1; bool inspect_1 = ice::shards::inspect_first(test_container, test_shard_1 | ice::i32{}, payload_i32); bool inspect_2 = ice::shards::inspect_first(test_container, test_shard_2 | ice::u32{}, payload_u32); bool inspect_3 = ice::shards::inspect_first(test_container, test_shard_3 | ice::u64{}, payload_i64); CHECK(inspect_1 == true); CHECK(inspect_2 == false); CHECK(inspect_3 == false); CHECK(payload_i32 == test_i32_payload_value1); CHECK(payload_u32 == 1); CHECK(payload_i64 == 1); inspect_1 = ice::shards::inspect_last(test_container, test_shard_4 | ice::i32{}, payload_i32); inspect_2 = ice::shards::inspect_last(test_container, test_shard_3 | ice::u32{}, payload_u32); inspect_3 = ice::shards::inspect_last(test_container, test_shard_2 | ice::u64{}, payload_i64); CHECK(inspect_1 == false); CHECK(inspect_2 == true); CHECK(inspect_3 == false); CHECK(payload_u32 == test_u32_payload_value2); } THEN("we can remove all shards of a specific type (without payload-id)") { ice::shards::remove_all_of(test_container, test_shard_1); CHECK(ice::shards::size(test_container) == 7); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 0); CHECK(ice::shards::count(test_container, test_shard_2) == 2); CHECK(ice::shards::count(test_container, test_shard_3) == 3); CHECK(ice::shards::count(test_container, test_shard_4) == 2); CHECK(ice::shards::contains(test_container, test_shard_1) == false); CHECK(ice::shards::contains(test_container, test_shard_2) == true); CHECK(ice::shards::contains(test_container, test_shard_3) == true); CHECK(ice::shards::contains(test_container, test_shard_4) == true); } THEN("we can remove shards of a specific type (without a payload-id)") { ice::shards::remove_all_of(test_container, test_shard_1 | ice::u32{}); ice::shards::remove_all_of(test_container, test_shard_2 | ice::u32{}); ice::shards::remove_all_of(test_container, test_shard_3 | ice::u32{}); ice::shards::remove_all_of(test_container, test_shard_4 | ice::u32{}); CHECK(ice::shards::size(test_container) == 7); CHECK(ice::shards::count(test_container, ice::Shard_Invalid) == 0); CHECK(ice::shards::count(test_container, test_shard_1) == 2); CHECK(ice::shards::count(test_container, test_shard_2) == 2); CHECK(ice::shards::count(test_container, test_shard_3) == 2); CHECK(ice::shards::count(test_container, test_shard_4) == 1); CHECK(ice::shards::contains(test_container, test_shard_1) == true); CHECK(ice::shards::contains(test_container, test_shard_2) == true); CHECK(ice::shards::contains(test_container, test_shard_3) == true); CHECK(ice::shards::contains(test_container, test_shard_4) == true); CHECK(ice::shards::contains(test_container, test_shard_1 | ice::u32{}) == false); CHECK(ice::shards::contains(test_container, test_shard_2 | ice::u32{}) == false); CHECK(ice::shards::contains(test_container, test_shard_3 | ice::u32{}) == false); CHECK(ice::shards::contains(test_container, test_shard_4 | ice::u32{}) == false); } } THEN("we add even more shards (with shard+payload duplicates)") { ice::u32 const pre_push_size = ice::shards::size(test_container); ice::shards::push_back(test_container, test_shard_1 | test_i64_payload_value2); ice::shards::push_back(test_container, test_shard_1 | test_i32_payload_value2); ice::shards::push_back(test_container, test_shard_1 | test_u32_payload_value2); ice::shards::push_back(test_container, test_shard_2 | test_i32_payload_value1); ice::shards::push_back(test_container, test_shard_2 | test_i64_payload_value2); ice::shards::push_back(test_container, test_shard_3 | test_i32_payload_value1); ice::shards::push_back(test_container, test_shard_3 | test_u32_payload_value1); ice::shards::push_back(test_container, test_shard_4 | test_u32_payload_value2); ice::shards::push_back(test_container, test_shard_4 | test_i64_payload_value1); CHECK(ice::shards::count(test_container, test_shard_1) == 5); CHECK(ice::shards::count(test_container, test_shard_2) == 3); CHECK(ice::shards::count(test_container, test_shard_3) == 4); CHECK(ice::shards::count(test_container, test_shard_4) == 3); THEN("we can inspect multiple payloads") { CHECK(ice::shards::count(test_container, test_shard_1 | ice::u32{ }) == 2); CHECK(ice::shards::count(test_container, test_shard_2 | ice::u32{ }) == 0); CHECK(ice::shards::count(test_container, test_shard_3 | ice::u32{ }) == 2); CHECK(ice::shards::count(test_container, test_shard_4 | ice::u32{ }) == 1); ice::Array<ice::u32> payloads{ alloc }; ice::shards::inspect_all(test_container, test_shard_1, payloads); REQUIRE(ice::array::count(payloads) == 2); CHECK(payloads[0] == test_u32_payload_value1); CHECK(payloads[1] == test_u32_payload_value2); THEN("we check if we can find these payloads") { ice::u32 payload = 0; ice::Shard first_shard = ice::shards::find_first_of(test_container, test_shard_1 | ice::u32{ }, 0); ice::Shard last_shard = ice::shards::find_first_of(test_container, test_shard_1 | ice::u32{ }, pre_push_size); ice::shard_inspect(first_shard, payload); CHECK(payload == payloads[0]); ice::shard_inspect(last_shard, payload); CHECK(payload == payloads[1]); first_shard = ice::shards::find_last_of(test_container, test_shard_1 | ice::u32{ }, 0); last_shard = ice::shards::find_last_of(test_container, test_shard_1 | ice::u32{ }, ice::shards::size(test_container) - pre_push_size); ice::shard_inspect(first_shard, payload); CHECK(payload == payloads[1]); ice::shard_inspect(last_shard, payload); CHECK(payload == payloads[0]); } ice::array::clear(payloads); ice::shards::inspect_all(test_container, test_shard_2, payloads); REQUIRE(ice::array::count(payloads) == 0); ice::array::clear(payloads); ice::shards::inspect_all(test_container, test_shard_3, payloads); REQUIRE(ice::array::count(payloads) == 2); CHECK(payloads[0] == test_u32_payload_value2); CHECK(payloads[1] == test_u32_payload_value1); ice::array::clear(payloads); ice::shards::inspect_all(test_container, test_shard_4, payloads); REQUIRE(ice::array::count(payloads) == 1); CHECK(payloads[0] == test_u32_payload_value2); } } } } }
[ "noreply@github.com" ]
noreply@github.com
2a97663a4a20b13ed9ce7492b656e362c895ce5d
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
/NT/windows/appcompat/shims/specific/printmaster4.cpp
09a8e5da795ec33c0fd3f44e399d508b7f6c6af8
[]
no_license
jjzhang166/WinNT5_src_20201004
712894fcf94fb82c49e5cd09d719da00740e0436
b2db264153b80fbb91ef5fc9f57b387e223dbfc2
refs/heads/Win2K3
2023-08-12T01:31:59.670176
2021-10-14T15:14:37
2021-10-14T15:14:37
586,134,273
1
0
null
2023-01-07T03:47:45
2023-01-07T03:47:44
null
UTF-8
C++
false
false
1,299
cpp
/*++ Copyright (c) 2002 Microsoft Corporation Module Name: PrintMaster4.cpp Abstract: Force mfcans32.dll to not have the read-only bit. Many HP systems shipped with this turned on as a kind of lightweight SFP. However, the unpleasant consequence is that PrintMaster doesn't install. Notes: This is an app specific shim. History: 02/20/2002 linstev Created --*/ #include "precomp.h" IMPLEMENT_SHIM_BEGIN(PrintMaster4) #include "ShimHookMacro.h" APIHOOK_ENUM_BEGIN APIHOOK_ENUM_END /*++ Run Notify function only --*/ BOOL NOTIFY_FUNCTION( DWORD fdwReason) { if (fdwReason == DLL_PROCESS_ATTACH) { CSTRING_TRY { CString csFileName; csFileName.GetSystemDirectory(); csFileName += L"\\mfcans32.dll"; DWORD dwAttr = GetFileAttributesW(csFileName); // Remove the read-only if (dwAttr != 0xffffffff) { SetFileAttributesW(csFileName, dwAttr & ~FILE_ATTRIBUTE_READONLY); } } CSTRING_CATCH { // Don't care about exception } } return TRUE; } HOOK_BEGIN CALL_NOTIFY_FUNCTION HOOK_END IMPLEMENT_SHIM_END
[ "seta7D5@protonmail.com" ]
seta7D5@protonmail.com
ede6750c978f8f8e6158737d54cebb4368349524
e5416b0e6cf5d64cb454437b24af18a6a18503aa
/liero-crust/gfx/texture.cpp
1cddd95d001e1c3471b0057240820802a0b8f014
[]
no_license
gliptic/liero-crust
0c9c0b8e1a880af7d284761b27314a217ec25ea0
4c9bd955bd351947374aa48ae058cbab5af6ecf2
refs/heads/master
2021-07-13T22:37:42.365006
2020-08-01T19:58:29
2020-08-01T19:58:29
64,968,520
1
0
null
null
null
null
UTF-8
C++
false
false
1,036
cpp
#include "texture.hpp" namespace gfx { Texture::Texture(u32 width, u32 height, bool linear) { GLint unpack_alignment; glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glGenTextures(1, &this->id); glBindTexture(GL_TEXTURE_2D, id); glTexImage2D(GL_TEXTURE_2D, 0, 4, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); GLenum filtering = linear ? GL_LINEAR : GL_NEAREST; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filtering); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filtering); glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); } void Texture::upload_subimage(tl::ImageSlice const& slice, tl::VectorU2 pos) { this->bind(); glPixelStorei(GL_UNPACK_ROW_LENGTH, slice.pitch / slice.bpp); glTexSubImage2D(GL_TEXTURE_2D, 0, pos.x, pos.y, slice.dim.x, slice.dim.y, slice.bpp == 4 ? GL_RGBA : GL_RED, GL_UNSIGNED_BYTE, slice.pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } Texture::~Texture() { glDeleteTextures(1, &this->id); } }
[ "gliptic@gmail.com" ]
gliptic@gmail.com
e826c4b148f5e60d224e7b97305c69faa2c32f33
f0198085be4f32ad737067c8aa0efffceb1c618d
/src/KxPhysics/kxrigidbodycon.cpp
799676f04be7c36b16ce2a2e7599765ecfe16a96
[]
no_license
dzurikmiroslav/kix-engine
150aee40cb91c729535dc12b6b1d5d549b20295b
ad106e911272b360defb8d29507db55d782b879e
refs/heads/master
2020-04-06T05:49:07.578825
2011-05-01T16:46:32
2011-05-01T16:46:32
32,132,448
0
0
null
null
null
null
UTF-8
C++
false
false
1,773
cpp
/* * This file is part of Kix Engine * * Copyright (C) 2011 - Miroslav Dzurik * * Kix Engine 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. * * Kix Engine 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, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "kxrigidbodycon.h" #include "kxrigidbody.h" #include "KxEntity/kxentity.h" #include <QtCore/qdebug.h> KxRigidBodyCon::KxRigidBodyCon(QObject *parent) : QObject(parent) { m_collisionShape = NULL; m_group = 1; m_mask = 1; m_mass = 0; m_friction = 0.5; } QVariant KxRigidBodyCon::create(const QVariant &parent) const { if (parent.value<QObject*>()) { return QVariant::fromValue(create(parent.value<QObject*>())); } else { qWarning() << "KxRigidBodyCon::create parent is not QObject"; return QVariant::fromValue(create()); } } KxRigidBody *KxRigidBodyCon::create(QObject *parent) const { if (!m_collisionShape) { qWarning() << "KxRigidBodyCon::create collisionShape is NULL"; return NULL; } KxRigidBody *rb = new KxRigidBody(m_collisionShape, m_mass, parent); rb->setFriction(m_friction); rb->setPosition(m_position); rb->setRotation(m_rotation); return rb; }
[ "dzurik.miroslav@gmail.com@a7d3afad-237d-3476-d860-7674f7dc5041" ]
dzurik.miroslav@gmail.com@a7d3afad-237d-3476-d860-7674f7dc5041
6bad24b30c533b5efb5ed989130f1fe01a5cf197
cef4db2d526089a3800f3b03dab79731be8378d7
/74.AddWithOutFuHao.cpp
da7e01f0e1c1f6198b9a09e1268dd39e85f5874c
[]
no_license
likohank/mianshiti_2018
cf848679281a81fbdb7ecd5230fdb42b8605606d
132467b9a90b069aa6d7e28b43622fef684215b7
refs/heads/master
2022-11-15T06:49:42.333912
2020-07-07T12:30:17
2020-07-07T12:30:17
277,810,441
0
0
null
null
null
null
UTF-8
C++
false
false
177
cpp
int add(int num1,int num2) { int sum = 0; int carry = 0; do { sum = num1^num2; carry = (num & num2) <<1; num1 = sum; num2 = carry; }while(num2!=0) return num1; }
[ "likang216651@sogou-inc.com" ]
likang216651@sogou-inc.com
9d79bdfe2c87c999194dca6a8de3e28639831a0d
beb058363e2e028b28c6669de587d08049c05ae3
/chenclient/main.cpp
fdeb0f058c179ea1bae7128db4319627afe87989
[]
no_license
TimmyT123/chenard
dd961d43360fcb9c99d1430b5607bc7ea6a7a1f9
34754b8c0e657359bd81837b1f3f9a84729a83a2
refs/heads/master
2020-07-09T02:57:13.406540
2018-03-06T21:12:41
2018-03-06T21:12:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,153
cpp
/* main.cpp - Sample client for ChenServer, by Don Cross. https://github.com/cosinekitty/chenard/wiki/ChenServer */ #define CHENARD_LINUX (defined(__linux__) || defined(__APPLE__)) #include <stdlib.h> #include <string> #include <iostream> #if CHENARD_LINUX #include <stdlib.h> #include <unistd.h> #include <cstring> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> // Hacks to help WinSock code build on Linux. typedef int SOCKET; typedef sockaddr_in SOCKADDR_IN; typedef sockaddr *LPSOCKADDR; const int INVALID_SOCKET = -1; inline bool IsValidSocket(SOCKET s) { return s >= 0; } inline int closesocket(SOCKET s) { return close(s); } #else #ifdef _MSC_VER // Windows? #define _WINSOCK_DEPRECATED_NO_WARNINGS #include <WinSock2.h> #include <WS2tcpip.h> inline bool IsValidSocket(SOCKET s) { return s != INVALID_SOCKET; } #else #error We do not know how to do socket programming on this platform. #endif #endif bool SendCommand(const std::string& server, int port, const std::string& command, std::string& response); int main(int argc, const char *argv[]) { if (argc != 4) { std::cerr << "USAGE: chenclient server port \"message\"" << std::endl; std::cerr << std::endl; std::cerr << "For more information, visit:" << std::endl; std::cerr << "https://github.com/cosinekitty/chenard/wiki/ChenServer" << std::endl; return 1; } const char *server = argv[1]; int port = atoi(argv[2]); const char *message = argv[3]; if (port <= 0 || port > 0xffff) { std::cerr << "ERROR: Invalid port number '" << argv[2] << "'" << std::endl; return 1; } #ifdef _MSC_VER WSADATA data; const WORD versionRequested = MAKEWORD(2, 2); int result = WSAStartup(versionRequested, &data); if (result == 0) { if (data.wVersion == versionRequested) { #endif std::string response; if (SendCommand(server, port, message, response)) { std::cout << response << std::endl; } #ifdef _MSC_VER } else { std::cerr << "ERROR: Wrong version of WinSock." << std::endl; } WSACleanup(); } else { std::cerr << "ERROR: Could not initialize WinSock." << std::endl; } #endif return 1; } bool SendCommand(const std::string& server, int port, const std::string& command, std::string& response) { bool success = false; response.clear(); hostent *host = gethostbyname(server.c_str()); if (host == nullptr) { std::cerr << "ERROR: Cannot resolve host '" << server << "'" << std::endl; } else { const std::string iptext = inet_ntoa(**(in_addr **)host->h_addr_list); //std::cout << "Resolved host '" << host->h_name << "' = " << iptext << std::endl; SOCKADDR_IN target; target.sin_family = AF_INET; target.sin_port = htons(port); target.sin_addr.s_addr = inet_addr(iptext.c_str()); SOCKET sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock == INVALID_SOCKET) { std::cerr << "Cannot open socket to host" << std::endl; } else { if (0 != connect(sock, (LPSOCKADDR)&target, sizeof(target))) { std::cerr << "Cannot connect to host" << std::endl; } else { send(sock, command.c_str(), static_cast<int>(command.length()), 0); send(sock, "\n", 1, 0); while (true) // keep looping and reading blocks of memory until we find "\n" or hit an error. { const int BUFFERSIZE = 128; char buffer[BUFFERSIZE]; int bytesRead = recv(sock, buffer, BUFFERSIZE, 0); if (bytesRead < 0) { std::cerr << "ERROR: Problem reading response from socket." << std::endl; break; } if (bytesRead == 0) { std::cerr << "ERROR: Incomplete response." << std::endl; break; } for (int i = 0; i < bytesRead; ++i) { if (buffer[i] == '\n') { // We found the end of the message. success = true; goto end_of_message; // break out of both loops } response.push_back(buffer[i]); } } } end_of_message: closesocket(sock); } } if (!success) { response.clear(); } return success; }
[ "cosinekitty@gmail.com" ]
cosinekitty@gmail.com
3a01b8f77e7e875fde7ddff31621c14ac0000207
396c981281cc352f44dac3e39eeae31419c2716c
/Espresso_Brain_By_Weight_Alternatetiming_Simplified/Espresso_Brain_By_Weight_Alternatetiming_Simplified.ino
d7b1e9e505d38328729aad9dfae995046727fda8
[]
no_license
rkorpu/RancilioBrain_RAK
e94ddfa401c93124e05b4a5bdb02288813fb6876
2004e96a76519a7ca2b1c7c65908f172b24fca52
refs/heads/master
2023-03-17T15:02:52.641788
2021-01-18T16:59:38
2021-01-18T16:59:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
16,055
ino
// OLED control library #include <Adafruit_SSD1306.h> // Arduino flash memory control library // This is being used to store the target weight so when arduino power cycles it retains last used weight #include <EEPROM.h> // this is the little board that comes with each load cell // URL: https://github.com/RobTillaart/HX711 #include "HX711.h" // OLED-screen setup #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 // Reset pin # (or -1 if sharing Arduino reset pin) #define OLED_RESET 4 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // Scale setup HX711 scale; uint8_t dataPin = 5; uint8_t clockPin = 6; // This is the calibration value for each load cell, you need to calibrate // them with a known weight The good thing is that the value is linear so if // you know something weights 100g you can calculate what the value should be. #define scaleCalibration 170 // the variable to hold a value for each load cell (float because it is a decimal) float w1; // Weight control variables int currentWeight; int lastWeight; bool weightReached = false; int targetWeight; int weightOffset = 0; // This value is how many decigrams before the target should the pump shut off, you need to test /* Macros and globals needed for the offset hashtable based on flowrate */ // The interval over which the flow is calculated #define flowTime 2 // Maximum flowrate to remember offset for in centigrams per second #define maxFlow 500 // Flow rate bucketsize in centigrams per second #define flowInterval 20 // starting postion in EEPROM to write the offset hashtable #define hashOffset 10 // Delta in offsets to warrant a new write to EEPROM #define offsetPrecision 20 int hashMax = maxFlow / flowInterval; int hashStep = flowInterval; int weightFlow[flowTime] = {0}; // Flow of coffee measured as centigram per flowTime - 1 int currentFlow; int lastFlow; // Timing control variables const unsigned long eventInterval = 100; const unsigned long reachedInterval = 5000; // DEPRECATED: (will be changed into flowrate) how long to keep reading and updating the weight after the target weight is reached in milliseconds unsigned long previousTime = 0; unsigned long startCounting; unsigned long currentTime; unsigned int currentSecond = 0; // NOTE: tV is interchangeable with elapsedTime; why do both exist? unsigned long elapsedTime; unsigned long tV = 0; // This is the weight that arduino will default to when powered on int storedWeight; // This is rudimentary state logic bool started = false; bool preStarted = false; // The rotary encoder int buttonPin = 4; int buttonPinState = 1; int buttonPinLast = 1; bool buttonPressed = 0; int pinA = 2; int pinB = 3; int pinAStateCurrent = HIGH; int pinAStateLast = pinAStateCurrent; bool turnDetected = false; // The Relays int pump = 9; // Helper functions that turn the relays on and off void extractOn() { digitalWrite(pump, HIGH); } void extractOff() { digitalWrite(pump, LOW); } /*** These are the different layouts for each screen that we will use, helps keep our code more readable to break them out like this ***/ /* When you first turn the machine on */ void preStartedDisplay() { display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 0); display.print("Target Weight"); display.setTextSize(3); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 14); display.print(targetWeight * 0.01, 1); // if you've pulled a shot already put the info on screen (if TV isnt 0 you've pulled a shot) if (tV != 0) { display.setTextSize(1); // this is size.. 1 is 8 pixels tall, 2 is 16, and so on display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 44); // this is position in (x,y) display.print("Previous Weight"); //display.print sends this to buffer display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(98, 44); display.print(lastWeight * 0.01, 1); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 56); display.print("Previous Time"); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(98, 56); display.print(tV / 1000.0, 1); } } /* When the shot is being pulled this is what is shown */ void startedDisplay() { display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 0); display.print("Target Weight"); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(85, 0); display.print(targetWeight * 0.01, 1); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 22); display.print("Weight"); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(80, 22); display.print(currentWeight * 0.01, 1); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 46); display.print("Time"); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(80, 46); display.print(tV / 1000.0, 1); } /* This is identical to when a shot is pulled only we switch to a more precise method of reading the scale (called lastWeight) NOTE: This can be merged somehow with startedDisplay() */ void justEndedDisplay() { display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 0); display.print("Target Weight"); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(85, 0); display.print(targetWeight * 0.01, 1); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 22); display.print("Weight"); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(80, 22); display.print(lastWeight * 0.01, 1); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(0, 46); display.print("Time"); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(80, 46); display.print(tV / 1000.0, 1); } /* This is just that text "starting" that appears after you click the encoder but before the pump is on. */ void startingDisplay() { display.clearDisplay(); display.setTextSize(2); display.setTextColor(SSD1306_WHITE); // Draw white text display.setCursor(15, 18); display.print("Starting"); display.display(); } /* This function adds or subtracts .1 to the target weight if you turn left or right */ void increment() { // NOTE: What is this for? Does not seem to be used anywhere. turnDetected = true; // Rotation pinAStateCurrent = digitalRead(pinA); if ((pinAStateLast == LOW) && (pinAStateCurrent == HIGH)) { if (digitalRead(pinB) == HIGH) { targetWeight -= 100; delay(15); } else { targetWeight += 100; delay(15); } } pinAStateLast = pinAStateCurrent; } /* This function checks to see if the button was pressed */ void buttonDetect() { buttonPinState = digitalRead(buttonPin); if (buttonPinState != buttonPinLast) { // Extraction just started if ((buttonPinState == 1) && (!started)) { preStarted = false; startingDisplay(); tareScales(); delay(250); tV = 0; currentWeight = 0; elapsedTime = 0; preStarted = false; started = true; extractOn(); startCounting = millis(); display.clearDisplay(); } // Manual stop on extraction if ((elapsedTime > 1.0) && (buttonPinState == 1) && (started)) { weightReached = true; } buttonPinLast = buttonPinState; } } /* This is the interupt that we create in our setup, the conditional statement means if you rotate the encoder while a shot is extracting it wont run any code and cause lag */ void update() { if (preStarted) { increment(); } } // --------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//-------------- // --------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//-------------- void setup() { Serial.begin(9600); // display setup if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x32 Serial.println(F("SSD1306 allocation failed")); for (;;); // Don't proceed, loop forever } // This is seeing if this is the first time you are writing to the eeprom and if it is just put a 0 for now if (EEPROM.read(256) != 123) { EEPROM.write(256, 123); storedWeight = 0; } // This code runs every time the arduino powers back on... it sets the target weight to the last weight used so that it "remembers" else { EEPROM.get(0, storedWeight); } targetWeight = storedWeight; // setting up the relays pinMode(pump, OUTPUT); // making sure the pump and valve are off, probably dont need but just in case extractOff(); // initial display display.clearDisplay(); preStartedDisplay(); display.display(); // This is our rotary encoder setup pinMode(buttonPin, INPUT_PULLUP); // initialize the button pin as a input pinMode(pinA, INPUT_PULLUP); pinMode(pinB, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(pinA), update, CHANGE); // This initializes the scales scale.begin(dataPin, clockPin); // Calibrate to initially weighted value scale.set_scale(scaleCalibration); // set the scales to 0 scale.tare(); // Set the state of the system preStarted = true; } // --------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//-------------- // --------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//-------------- void loop() { // check to see if extraction is running and perform a get weight if it is if ((preStarted == false) && (!weightReached)) { scaleFunc(); } // check to see if the shot just ended and switch to doing multiple averaged readings for more accuracy if ((preStarted == false) && (weightReached)) { precisionScale(); } currentTime = millis(); // check if button is pressed and run the button detect code we defined earlier buttonDetect(); // Updates the time and weight value while the extraction is happening if (started) { updateWeightFlow(); if (!weightReached) { elapsedTime = currentTime - startCounting; tV = elapsedTime; previousTime = currentTime; display.clearDisplay(); startedDisplay(); display.display(); } } // Updates the weight for a few more moments just after the shot has stopped extracting and timer has stopped if (weightReached && started) { extractOff(); display.clearDisplay(); justEndedDisplay(); display.display(); if (currentWeight > lastWeight) { lastWeight = currentWeight; } if (lastFlow == 0) { lastFlow = currentFlow; } } // Goes back to the initial standby screen when you are finished extracting so you can set another weight if (!started) { display.clearDisplay(); preStartedDisplay(); display.display(); } // This is the code to stop the extraction once the target weight is reached. // I added the conditional to only runs 5s after extraction starts because // sometimes you need to reposition your cup and that would trip // the weight and stop extraction and ruin your shot :( if (tV > 5000) { readWeightOffset(); if ((currentWeight) > (targetWeight - weightOffset)) { lastWeight = currentWeight; weightReached = true; if (storedWeight != targetWeight) { storedWeight = targetWeight; EEPROM.put(0, storedWeight); } } } /* this code runs after your weight is reached AND a certain extra amount of time has passed, you know for the last few drips... it resets the states so you are ready to brew again... e.g you can change it to 5s if you update your reached interval value to 5000 at the top. currentTime - previousTime >= reachedInterval */ if (weightReached && currentFlow < 30) { started = 0; weightReached = false; preStarted = true; writeWeightOffset(); clearWeightFlow(); lastFlow = 0; currentWeight = 0; } } // --------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//-------------- // --------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//--------------//-------------- /*** A few helper functions */ /* This asks the scales to get the weight and add them up */ void scaleFunc() { w1 = scale.get_units(); if ((w1) > 1) { currentWeight = round((w1 * 100)); } } /* This asks the scales to check the weight twice so in theory its more accurate, this is how the shot is weighed just after the pump is off */ void precisionScale() { w1 = scale.get_units(2); currentWeight = round((w1 * 100)); } /* We tare the cells just after the rotary knob is clicked */ void tareScales() { scale.tare(); } /* Keeps track of the last N seconds of weights and recalculateds the flow */ void updateWeightFlow() { if (currentTime / 1000 != currentSecond) { currentSecond = currentTime / 1000; weightFlow[currentSecond % flowTime] = currentWeight; calcCurrentWeightFlow(); } } /* Clears the weightFlow array for a new extraction */ void clearWeightFlow() { for (int i = 0; i < flowTime; i++) { weightFlow[i] = 0; } } /* Returns the flow over an interval of N seconds (measurements taken at the start of each second) */ void calcCurrentWeightFlow() { int minVal = weightFlow[0]; int maxVal = weightFlow[0]; for (int i = 1; i < flowTime; i++) { minVal = min(minVal, weightFlow[i]); maxVal = max(maxVal, weightFlow[i]); } // Average weight difference over interval flowTime // (e.g. when flowTime is 2 you have measured 1 second of weight difference) currentFlow = (maxVal - minVal) / (flowTime - 1); } /* Calculates an index in EEPROM memory based on the current flowrate */ uint8_t hashFlow() { uint8_t hash = (currentFlow / hashStep); return (hash < hashMax ? hash : hashMax) + hashOffset; } /* Calculates an index in EEPROM memory based on the last flowrate during extraction */ uint8_t hashLastFlow() { uint8_t hash = (lastFlow / hashStep); return (hash < hashMax ? hash : hashMax) + hashOffset; } /* Reads the weightOffset from EEPROM memory related to the current flowrate */ void readWeightOffset() { int offset = EEPROM.read(hashFlow()); // Convert offset from decigrams to centigrams weightOffset = offset != 255 ? offset * 10 : 0; } /* Writes the final weight overflow (drip) to EEPROM memory based on the flowrate before target weight was reached */ void writeWeightOffset() { uint8_t offset = EEPROM.read(hashLastFlow()); int currentOffset = currentWeight - targetWeight; /* The final weight was less than the weight during extraction (e.g. someone took away the cup) Or the overflow too great (e.g. someone leaned on the scale) */ if (currentOffset <= 0 || currentOffset > 1.5 * targetWeight) { return; } int deltaOffset = currentOffset - offset; // Write the average of both values to EEPROM in decigrams if (abs(deltaOffset) > offsetPrecision) { int writeOffset = (currentOffset + offset) / 10; writeOffset = writeOffset != 255 ? writeOffset : 254; EEPROM.write(hashLastFlow(), writeOffset); } }
[ "qvdpost@gmail.com" ]
qvdpost@gmail.com
402ba0affe0e27c41a10a2dd1f2acc590f356504
efb87e4ac44f9cc98eab0dc162266fa1b99b7e5a
/Codeforces/CF1491-D12-E.cpp
58fc4dd660291a82e15cf2aea10a661af5fe7f1d
[]
no_license
farmerboy95/CompetitiveProgramming
fe4eef85540d3e91c42ff6ec265a3262e5b97d1f
1998d5ae764d47293f2cd71020bec1dbf5b470aa
refs/heads/master
2023-08-29T16:42:28.109183
2023-08-24T07:00:19
2023-08-24T07:00:19
206,353,615
12
1
null
null
null
null
UTF-8
C++
false
false
4,934
cpp
/* Author: Nguyen Tan Bao Status: AC Idea: - https://codeforces.com/blog/entry/88248 */ #include <bits/stdc++.h> #define FI first #define SE second #define ALL(a) a.begin(), a.end() #define SZ(a) int((a).size()) #define MS(s, n) memset(s, n, sizeof(s)) #define FOR(i,a,b) for (int i = (a); i <= (b); i++) #define FORE(i,a,b) for (int i = (a); i >= (b); i--) #define FORALL(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++) #define TRAV(x, a) for (auto &x : a) using namespace std; using ll = long long; using ld = double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; using cd = complex<ld>; using vcd = vector<cd>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vs = vector<string>; using vpi = vector<pi>; using vpl = vector<pl>; using vpd = vector<pd>; // vector<pair> template<class T> using min_pq = priority_queue<T, vector<T>, greater<T> >; template<class T> inline int ckmin(T& a, const T& val) { return val < a ? a = val, 1 : 0; } template<class T> inline int ckmax(T& a, const T& val) { return a < val ? a = val, 1 : 0; } template<class T> void remDup(vector<T>& v) { sort(ALL(v)); v.erase(unique(ALL(v)), end(v)); } constexpr int pct(int x) { return __builtin_popcount(x); } // # of bits set constexpr int bits(int x) { return x == 0 ? 0 : 31-__builtin_clz(x); } // floor(log2(x)) constexpr int p2(int x) { return 1<<x; } constexpr int msk2(int x) { return p2(x)-1; } ll ceilDiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); } // divide a by b rounded up ll floorDiv(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); } // divide a by b rounded down void setPrec(int x) { cout << fixed << setprecision(x); } // TO_STRING #define ts to_string string ts(char c) { return string(1, c); } string ts(const char* s) { return (string) s; } string ts(string s) { return s; } string ts(bool b) { return ts((int)b); } template<class T> string ts(complex<T> c) { stringstream ss; ss << c; return ss.str(); } template<class T> using V = vector<T>; string ts(V<bool> v) {string res = "{"; FOR(i,0,SZ(v)-1) res += char('0'+v[i]); res += "}"; return res; } template<size_t sz> string ts(bitset<sz> b) { string res = ""; FOR(i,0,SZ(b)-1) res += char('0'+b[i]); return res; } template<class T, class U> string ts(pair<T,U> p); template<class T> string ts(T v) { // containers with begin(), end() bool fst = 1; string res = ""; for (const auto& x: v) { if (!fst) res += " "; fst = 0; res += ts(x); } return res; } template<class T, class U> string ts(pair<T,U> p) { return "("+ts(p.FI)+", "+ts(p.SE)+")"; } // OUTPUT template<class T> void pr(T x) { cout << ts(x); } template<class T, class ...U> void pr(const T& t, const U&... u) { pr(t); pr(u...); } void ps() { pr("\n"); } // print w/ spaces template<class T, class ...U> void ps(const T& t, const U&... u) { pr(t); if (sizeof...(u)) pr(" "); ps(u...); } // DEBUG void DBG() { cerr << "]" << endl; } template<class T, class ...U> void DBG(const T& t, const U&... u) { cerr << ts(t); if (sizeof...(u)) cerr << ", "; DBG(u...); } #define dbg(...) cerr << "Line(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__) #define chk(...) if (!(__VA_ARGS__)) cerr << "Line(" << __LINE__ << ") -> function(" \ << __FUNCTION__ << ") -> CHK FAILED: (" << #__VA_ARGS__ << ")" << "\n", exit(0); const ld PI = acos(-1.0); const int dx[4] = {1,0,-1,0}, dy[4] = {0,1,0,-1}; const ld EPS = 1e-9; const ll MODBASE = 1000000007LL; const int INF = 0x3f3f3f3f; const int MAXN = 200010; const int MAXM = 1000; const int MAXK = 16; const int MAXQ = 200010; int n, f[35], sz[MAXN], par[MAXN]; vi a[MAXN]; void dfs(int u, int p, vi &b) { b.push_back(u); sz[u] = 1; TRAV(v, a[u]) { if (v == p) continue; dfs(v, u, b); sz[u] += sz[v]; par[v] = u; } } bool check(int u, int idx) { vi b; dfs(u, 0, b); if (sz[u] == 1) return 1; if (sz[u] != f[idx]) return 0; TRAV(v, b) { // if we can find an edge to divide it somewhere, just cut it. // proof in the editorial if (sz[v] == f[idx-1] || sz[v] == f[idx-2]) { int U = par[v]; a[U].erase(find(ALL(a[U]), v)); a[v].erase(find(ALL(a[v]), U)); if (sz[v] == f[idx-1]) return check(v, idx-1) && check(U, idx-2); return check(v, idx-2) && check(U, idx-1); } } return 0; } int main() { ios::sync_with_stdio(0); cin.tie(nullptr); f[0] = f[1] = 1; FOR(i,2,30) f[i] = f[i-1] + f[i-2]; cin >> n; FOR(i,1,n-1) { int u, v; cin >> u >> v; a[u].push_back(v); a[v].push_back(u); } FOR(i,1,30) if (f[i] == n) { if (check(1, i)) { cout << "YES\n"; return 0; } break; } cout << "NO"; return 0; }
[ "jerry.stone.manutd@gmail.com" ]
jerry.stone.manutd@gmail.com
8c00ca4b0fb14a27800981d5fac455530b7bbc30
3b15754e438697f5aed71dabe3a9f95323e82e0b
/main.cpp
93075063bbfe2c6693447318ba6d01aa63dae643
[]
no_license
Jorgel48/Unit5_Assignment_Camacho
c1e791c09256d4c23b28ed5cfc9519f3ad83a2ee
022ea8d5a868cc1554b3a27cc7879e4ca486269e
refs/heads/master
2022-04-24T22:18:18.591417
2020-04-26T00:09:04
2020-04-26T00:09:04
258,900,818
0
0
null
null
null
null
UTF-8
C++
false
false
7,678
cpp
//A Restaurant Project Struct style Dr_T Dr. Tyson McMillan 10-2-2019 #include <iostream> #include<string> #include<vector> #include<iomanip> #include <fstream> using namespace std; /* struct MenuItem { string name; double itemCost; string desc; char addLetter; char removeLetter; int count; }; */ class MenuItem { private: string name; double itemCost; string desc; char addLetter; char removeLetter; int count; public: MenuItem() { name = "Green Tea"; itemCost = 3.00; desc = "delicious"; addLetter = 'A'; removeLetter = 'a'; count = 0; } MenuItem(string name, double itemCost, string desc, char addLetter, char removeLetter, int count) { this->name = name; this->itemCost = itemCost; this->desc = desc; this->addLetter = addLetter; this->removeLetter = removeLetter; this->count = count; } //Setter for name void setName(string name) { this->name = name; } void setitemCost(double itemCost){ this->itemCost = itemCost; } double getitemCost() { return itemCost; } void setdesc(string desc){ this->desc = desc; } string getdesc() { return desc; } void setaddLetter(char addLetter) { this->addLetter = addLetter; } char getaddLetter() { return addLetter; } void setremoveLetter(char removeLetter) { this->removeLetter = removeLetter; } char getremoveLetter() { return removeLetter; } void setcount(int count) { this->count = count; } int getcount() { return count; } //Getter for name string getName() { return name; } }; //function definitions void populateMenu(vector<MenuItem> &entireMenu) { //put some default values in our Menu const int numItems = 7; MenuItem Item1; MenuItem Item2; MenuItem Item3; MenuItem Item4; MenuItem Item5; MenuItem Item6; MenuItem Item7; entireMenu.push_back(Item1); //add to the end of list the Item1 entireMenu.push_back(Item2); //add to the end of list the Item2 entireMenu.push_back(Item3); //add to the end of list the Item3 entireMenu.push_back(Item4); //add to the end of list the Item4 entireMenu.push_back(Item5); //add to the end of list the Item5 entireMenu.push_back(Item6); //add to the end of list the Item6 entireMenu.push_back(Item7); //add to the end of list the Item7 vector<string> defaultMenuNames = {"Green Tea", " Deshebrada", " Bistec Ranchero", "Carnitas", " Chilaquiles", "Horchata", " Albondigas"}; vector<char> defaultAddLetters = {'A', 'B', 'C', 'D', 'E', 'F', 'G'}; vector<char> defaultRemoveLetters = {'a', 'b', 'c', 'd', 'e', 'f', 'g'}; for(int i = 0; i < numItems; i++) { //add each item to the default list efficiently entireMenu[i].setName(defaultMenuNames[i]); entireMenu[i].setaddLetter(defaultAddLetters[i]); entireMenu[i].setremoveLetter(defaultRemoveLetters[i]); entireMenu[i].setitemCost((3.00 + i)); //set a random starter cost for each item entireMenu[i].setcount(0); //initialze all counts to 0 entireMenu[i].setdesc("delicious"); //set all default desc to "delicous" } } void showMenu(vector<MenuItem> &m) { cout << fixed << setprecision(2);//set doubles to 2 decimal places cout << "DrT's Effcient Menu" << endl; cout << "ADD \tNAME \t COST \tREMOVE\tCOUNT\tDESC"<<endl; for(int i = 0; i < m.size(); i++) { cout << m[i].getaddLetter() << ")" << setw(10) << m[i].getName() << setw(5) << "$" << m[i].getitemCost() << setw(5) << "(" << m[i].getremoveLetter() << ")" << setw(7) << m[i].getcount() << setw(13) << m[i].getdesc() <<endl; } } void acceptOrder(vector<MenuItem> & m) { char option = '\0';// the user-selected menu item double subtotal = 0.0; double tip; double total; double tender; double change; string payment; do { cout << "\nPlease choose an item (x to Exit): "; cin >> option; for(int i=0; i < m.size(); i++) { if(option == m[i].getaddLetter()) { cout << "\nMenu Item " << m[i].getaddLetter() << " selected."; m[i].setcount(m[i].getcount() + 1); //increment the count by 1 cout << "\033[2J\033[1;1H"; //clear screen cout << "\n1 UP on " << m[i].getName() << endl; subtotal += m[i].getitemCost(); //increment the subtotal by the cost of the item showMenu(m); //show the updated menu cout << "\nSubtotal: $" << subtotal << endl; } else if(option == m[i].getremoveLetter()) { cout << "\nRemove Item " << m[i].getremoveLetter() << " selected."; if(m[i].getcount() > 0) //subtract if and only if the count is > 0 { m[i].setcount(m[i].getcount() - 1); //decrement the count by 1 cout << "\033[2J\033[1;1H"; //clear screen cout << "\n1 DOWN on " << m[i].getName() << endl; subtotal -= m[i].getitemCost(); //decrement the subtotal by the cost of the item showMenu(m); //show the updated menu cout << "\nSubtotal: $" << subtotal << endl; } else //the the user why you blocked item removal { cout << "\nItem count must be > 0 to remove: " << m[i].getName() << endl; } } else if( option != m[i].getaddLetter() && option != m[i].getremoveLetter() && option != 'x' && option != 'X' ) //test for all of my valid inputs { if(i == 0) { cout << "\nInvalid input (" << option << "). Please try again." << endl; } } } }while(option != 'x' && option != 'X'); cout << "\nThank you for placing your order." << endl; //handle the tip process here cout << "What is your tip percentage?: "; cin >> tip; total = subtotal + (subtotal * 0.0825) + (subtotal * (tip / 100)); //accept payment cout << "A: Cash" << endl; cout << "B: Credit Card" << endl; cout << "What is your payment option?: "; cin >> payment; //process payment if (payment == "A" || payment == "a") { do { cout << "What is the tender amount?: "; cin >> tender; }while (tender < total); change = tender - total; } else if (payment == "B" || payment == "b") { cout << "Credit card processed! :)" << endl; tender = total; change = 0; } //handle reciept generation here for (MenuItem mi : m) { cout << mi.getName() << ": " << mi.getcount() << endl; } cout << "Subtotal: $" << subtotal << endl; cout << "Tip: $" << tip << endl; cout << "Tax: $" << subtotal * 0.0825 << endl; cout << "Change: $" << change << endl; cout << "Total: $" << total << endl; ofstream file; file.open("reciept.html", ios::out); file << "<h1>Reciept<h1>"; file << "<p>Subtotal: $" << subtotal << "<p>"; file << "<p>Tip: $" << tip << "<p>"; file << "<p>Tax: $" << subtotal * 0.0825 << "<p>"; file << "<p>Change: $" << change << "<p>"; file << "<p>Total: $" << total << "<p>"; file.close(); } int main() { vector<MenuItem> wholeMenu; populateMenu(wholeMenu); //put some default values in the menu showMenu(wholeMenu); //print the current data of the menu on screen acceptOrder(wholeMenu); return 0; }
[ "jorge.camacho@my.tccd.edu" ]
jorge.camacho@my.tccd.edu
558617af6858812116952d8af8af9df7e2cab796
6c77cf237697f252d48b287ae60ccf61b3220044
/aws-cpp-sdk-waf-regional/include/aws/waf-regional/model/ListByteMatchSetsRequest.h
3cc30b039efa6b395b29a1e728f64b7a58017a20
[ "MIT", "Apache-2.0", "JSON" ]
permissive
Gohan/aws-sdk-cpp
9a9672de05a96b89d82180a217ccb280537b9e8e
51aa785289d9a76ac27f026d169ddf71ec2d0686
refs/heads/master
2020-03-26T18:48:43.043121
2018-11-09T08:44:41
2018-11-09T08:44:41
145,232,234
1
0
Apache-2.0
2018-08-30T13:42:27
2018-08-18T15:42:39
C++
UTF-8
C++
false
false
7,775
h
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/waf-regional/WAFRegional_EXPORTS.h> #include <aws/waf-regional/WAFRegionalRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace WAFRegional { namespace Model { /** */ class AWS_WAFREGIONAL_API ListByteMatchSetsRequest : public WAFRegionalRequest { public: ListByteMatchSetsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ListByteMatchSets"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline const Aws::String& GetNextMarker() const{ return m_nextMarker; } /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline void SetNextMarker(const Aws::String& value) { m_nextMarkerHasBeenSet = true; m_nextMarker = value; } /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline void SetNextMarker(Aws::String&& value) { m_nextMarkerHasBeenSet = true; m_nextMarker = std::move(value); } /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline void SetNextMarker(const char* value) { m_nextMarkerHasBeenSet = true; m_nextMarker.assign(value); } /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline ListByteMatchSetsRequest& WithNextMarker(const Aws::String& value) { SetNextMarker(value); return *this;} /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline ListByteMatchSetsRequest& WithNextMarker(Aws::String&& value) { SetNextMarker(std::move(value)); return *this;} /** * <p>If you specify a value for <code>Limit</code> and you have more * <code>ByteMatchSets</code> than the value of <code>Limit</code>, AWS WAF returns * a <code>NextMarker</code> value in the response that allows you to list another * group of <code>ByteMatchSets</code>. For the second and subsequent * <code>ListByteMatchSets</code> requests, specify the value of * <code>NextMarker</code> from the previous response to get information about * another batch of <code>ByteMatchSets</code>.</p> */ inline ListByteMatchSetsRequest& WithNextMarker(const char* value) { SetNextMarker(value); return *this;} /** * <p>Specifies the number of <code>ByteMatchSet</code> objects that you want AWS * WAF to return for this request. If you have more <code>ByteMatchSets</code> * objects than the number you specify for <code>Limit</code>, the response * includes a <code>NextMarker</code> value that you can use to get another batch * of <code>ByteMatchSet</code> objects.</p> */ inline int GetLimit() const{ return m_limit; } /** * <p>Specifies the number of <code>ByteMatchSet</code> objects that you want AWS * WAF to return for this request. If you have more <code>ByteMatchSets</code> * objects than the number you specify for <code>Limit</code>, the response * includes a <code>NextMarker</code> value that you can use to get another batch * of <code>ByteMatchSet</code> objects.</p> */ inline void SetLimit(int value) { m_limitHasBeenSet = true; m_limit = value; } /** * <p>Specifies the number of <code>ByteMatchSet</code> objects that you want AWS * WAF to return for this request. If you have more <code>ByteMatchSets</code> * objects than the number you specify for <code>Limit</code>, the response * includes a <code>NextMarker</code> value that you can use to get another batch * of <code>ByteMatchSet</code> objects.</p> */ inline ListByteMatchSetsRequest& WithLimit(int value) { SetLimit(value); return *this;} private: Aws::String m_nextMarker; bool m_nextMarkerHasBeenSet; int m_limit; bool m_limitHasBeenSet; }; } // namespace Model } // namespace WAFRegional } // namespace Aws
[ "henso@amazon.com" ]
henso@amazon.com
604a88b7588a4503bdb0a7e8e20324c4ef53dc67
1e006c14837be0e7b6ed9a0f5870907638dfd402
/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include/boost/algorithm/cxx11/one_of.hpp
8a84780ebfcaf46b35556e951cf457586c781852
[]
no_license
slowfranklin/synology-ds
b9cd512d86ffc4d61949e6d72012b8cff8d58813
5a6dc5e1cfde5be3104f412e5a368bc8d615dfa6
refs/heads/master
2021-10-24T01:38:38.120574
2019-03-20T13:01:12
2019-03-20T13:01:12
176,933,470
1
1
null
null
null
null
UTF-8
C++
false
false
2,801
hpp
/* Copyright (c) Marshall Clow 2008-2012. 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) */ /// \file one_of.hpp /// \brief Test ranges to see if only one element matches a value or predicate. /// \author Marshall Clow #ifndef BOOST_ALGORITHM_ONE_OF_HPP #define BOOST_ALGORITHM_ONE_OF_HPP #include <algorithm> // for std::find and std::find_if #include <boost/algorithm/cxx11/none_of.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> namespace boost { namespace algorithm { /// \fn one_of ( InputIterator first, InputIterator last, Predicate p ) /// \return true if the predicate 'p' is true for exactly one item in [first, last). /// /// \param first The start of the input sequence /// \param last One past the end of the input sequence /// \param p A predicate for testing the elements of the sequence /// template<typename InputIterator, typename Predicate> bool one_of ( InputIterator first, InputIterator last, Predicate p ) { InputIterator i = std::find_if (first, last, p); if (i == last) return false; // Didn't occur at all return boost::algorithm::none_of (++i, last, p); } /// \fn one_of ( const Range &r, Predicate p ) /// \return true if the predicate 'p' is true for exactly one item in the range. /// /// \param r The input range /// \param p A predicate for testing the elements of the range /// template<typename Range, typename Predicate> bool one_of ( const Range &r, Predicate p ) { return boost::algorithm::one_of ( boost::begin (r), boost::end (r), p ); } /// \fn one_of_equal ( InputIterator first, InputIterator last, const V &val ) /// \return true if the value 'val' exists only once in [first, last). /// /// \param first The start of the input sequence /// \param last One past the end of the input sequence /// \param val A value to compare against /// template<typename InputIterator, typename V> bool one_of_equal ( InputIterator first, InputIterator last, const V &val ) { InputIterator i = std::find (first, last, val); // find first occurrence of 'val' if (i == last) return false; // Didn't occur at all return boost::algorithm::none_of_equal (++i, last, val); } /// \fn one_of_equal ( const Range &r, const V &val ) /// \return true if the value 'val' exists only once in the range. /// /// \param r The input range /// \param val A value to compare against /// template<typename Range, typename V> bool one_of_equal ( const Range &r, const V &val ) { return boost::algorithm::one_of_equal ( boost::begin (r), boost::end (r), val ); } }} // namespace boost and algorithm #endif // BOOST_ALGORITHM_ALL_HPP
[ "slow@samba.org" ]
slow@samba.org
501b868e703bca67f1c024217a4494f9203ce64a
00628440eadff715ccae8f7f3429c5182401692b
/LightHouse/LightHouse.cpp
264d6e2b44d0096130658420b04b9bd123dca6ef
[]
no_license
dagangwood163/TsingHuaDataStructOj
90f9274fae8f64e0d8d9ed81da2fed81abf08b2f
067c3a8c9d1381f9a59aa97d5e6b347f8b08e448
refs/heads/master
2020-12-29T01:00:39.859376
2016-04-26T07:29:35
2016-04-26T07:29:35
57,153,824
0
1
null
2016-04-26T18:53:15
2016-04-26T18:53:14
null
UTF-8
C++
false
false
2,300
cpp
#include <iostream> #include <cstdio> #define MAX 1000001 int point_x[MAX]; int point_y[MAX]; int tempL[MAX]; int tempR[MAX]; char buffer[10000];//缓冲区,减少IO操作,缩短读入数据时间 long sum = 0; using namespace std; void quickSort(int *array_x,int* array_y,int l,int r) { if(l<r) { int i=l,j=r; int temp = array_x[l]; int temp1 = array_y[l]; while(i<j) { while(i<j && array_x[j]>=temp) j--; if(i<j) { array_x[i] = array_x[j]; array_y[i] = array_y[j]; ++i; } while(i<j && array_x[i]<=temp) i++; if(i<j) { array_x[j] = array_x[i]; array_y[j] = array_y[i]; --j; } } array_x[i] = temp; array_y[i] = temp1; quickSort(array_x,array_y,l,i-1); quickSort(array_x,array_y,i+1,r); } } void Merge(int* array,int l,int mid,int r) { int i,j,k,n1,n2; n1 = mid - l +1; n2 = r - mid; for(i = 0;i<n1;i++) { tempL[i] = array[l+i]; } for(i=0;i<n2;i++) { tempR[i] = array[mid+1+i]; } i = 0; j = 0; for(k=l;k<r && i<n1 && j<n2;k++) { if(tempL[i]>tempR[j])//题意各点互异,不会有相等情况 { array[k] = tempR[j++];//x大y小 不符合条件 } else { array[k] = tempL[i++]; sum += n2 - j; } } while(i<n1) { array[k++] = tempL[i++]; } while(j<n2) { array[k++] = tempR[j++]; } } void MergeSort(int *array,int l,int r) { int mid; if(l == r) return; // mid = l+((r-1)>>1); mid = (l+r)>>1; MergeSort(array,l,mid); MergeSort(array,mid+1,r); Merge(array,l,mid,r); } int main() { int n; scanf("%d",&n); setvbuf(stdin,buffer,_IOFBF,10000); for(int i=0;i<n;++i) { scanf("%d %d",&point_x[i],&point_y[i]); } quickSort(point_x,point_y,0,n-1); MergeSort(point_y,0,n-1); printf("%ld",sum); return 0; }
[ "zhouzhongtaosoft@163.com" ]
zhouzhongtaosoft@163.com
30dea03ca2483eed1bea53844bbca74ae680c7c9
1acb7c3813cacd378956d031bafa6d85caf65412
/source/math/plane3f.h
e88e2b5efa0b9cf1828eb8fb377921d5373de180
[]
no_license
dmdware/sped
238f05e79410d5f5d086c3b9795de59a29ed7a89
70c03c6effcb4893004b352ecd19d2f971634aa6
refs/heads/master
2021-01-12T06:05:50.691915
2017-03-04T09:09:30
2017-03-04T09:09:30
77,298,291
1
0
null
null
null
null
UTF-8
C++
false
false
1,209
h
#ifndef PLANE3F_H #define PLANE3F_H #include "vec3f.h" #include "physics.h" class Plane3f { public: Vec3f m_normal; float m_d; bool operator==(const Plane3f p) const { //if(fabs(m_normal.x - p.m_normal.x) <= EPSILON && fabs(m_normal.y - p.m_normal.y) <= EPSILON && fabs(m_normal.z - p.m_normal.z) <= EPSILON && fabs(m_d - p.m_d) <= EPSILON) // return true; if(m_normal.x == p.m_normal.x && m_normal.y == p.m_normal.y && m_normal.z == p.m_normal.z && m_d == p.m_d) return true; return false; } Plane3f(); Plane3f(float x, float y, float z, float d); ~Plane3f(); }; bool Close(Plane3f a, Plane3f b); Vec3f PointOnPlane(Plane3f p); float PlaneDistance(Vec3f normal, Vec3f point); bool PointBehindPlane(Vec3f point, Plane3f plane); bool PointOnOrBehindPlane(Vec3f point, Plane3f plane, float epsilon=CLOSE_EPSILON); bool PointOnOrBehindPlane(Vec3f point, Vec3f normal, float dist, float epsilon=CLOSE_EPSILON); void RotatePlane(Plane3f& p, Vec3f about, float radians, Vec3f axis); void MakePlane(Vec3f* norm, float* d, Vec3f point, Vec3f setnorm); void ParamLine(Vec3f* line, Vec3f* change); bool LineInterPlane(const Vec3f* line, const Vec3f norm, const float d, Vec3f* inter); #endif
[ "polyfrag@hotmail.com" ]
polyfrag@hotmail.com
8c439f33da5b15796ad9ede47027b84d126d6de3
fd1d5e0f3d62bd38426991ce7b78e4ba4347e050
/Лаба3-3семестр.cpp
721314e96cbaf104f0026b42686b415b7c1b1bc8
[]
no_license
EraserH/Lab_3-3-sem
54f2034eb342b060fc56f2a2767df23f94118e76
71362db5e5889d68a322efc97d7185e1a2d0926d
refs/heads/main
2023-01-30T18:30:44.113192
2020-12-10T04:16:37
2020-12-10T04:16:37
320,156,065
0
0
null
null
null
null
UTF-8
C++
false
false
13,521
cpp
#include <iostream> #include <list> #include <vector> #include "list.h" #include "vector.h" using namespace std; template<typename T> //using CollectionType = Vector<T>; using CollectionType = List<T>; //template<typename Z> //using _CollectionType = List<Z>; template<typename T> void printCollection(CollectionType<T>& container) { for (auto i = container.begin(); i != container.end(); ++i) { cout << " " << *i; } } template<typename T> void fillCollection(CollectionType<T>& container, int size, int a) { //int a; for (int i = 0; i < size; ++i) { a = a - i; container.insert(container.begin(), a); } } template<typename T> void userClear(CollectionType<T>& container) { for (size_t i = 0; i < container.size(); ++i) { container.erase(container.begin()); } } template<typename T> void reverseCollection(CollectionType<T>& container) { return reverse(container.begin(), container.end()); } int main() { //ВЕКТОРЫ /*CollectionType<int> v1; fillCollection(v1, 15, 30); cout << endl << "Vector1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << " Capacity: " << v1.capacity() << endl; userClear(v1); cout << endl << endl << "Vector1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << " Capacity: " << v1.capacity() << endl; CollectionType<int> v2; v2 = v1; cout << endl << endl << "Vector1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << " Capacity: " << v1.capacity() << endl; cout << endl << endl << "Vector2: "; printCollection(v2); cout << endl << "Size: " << v2.size() << " Capacity: " << v2.capacity() << endl; v1.clear(); cout << endl << endl << "Vector1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << " Capacity: " << v1.capacity() << endl; v1.reserve(10); cout << endl << "Size: " << v1.size() << " Capacity: " << v1.capacity() << endl; v1 = move(v2); cout << endl << endl << "Vector1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << " Capacity: " << v1.capacity() << endl; cout << endl << endl << "Vector2: "; printCollection(v2); cout << endl << "Size: " << v2.size() << " Capacity: " << v2.capacity() << endl; v2 = v1; reverseCollection(v2); cout << endl << endl << "Vector2: "; printCollection(v2); cout << endl << "Size: " << v2.size() << " Capacity: " << v2.capacity() << endl; */ //СПИСКИ CollectionType<int> v1; fillCollection(v1, 15, 30); cout << endl << "List1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << endl; userClear(v1); cout << endl << endl << "List1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << endl; CollectionType<int> v2; v2 = v1; cout << endl << endl << "List1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << endl; cout << endl << endl << "List2: "; printCollection(v2); cout << endl << "Size: " << v2.size() << endl; v1.clear(); cout << endl << endl << "List1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << endl; v1 = move(v2); cout << endl << endl << "List1: "; printCollection(v1); cout << endl << "Size: " << v1.size() << endl; cout << endl << endl << "List2: "; printCollection(v2); cout << endl << "Size: " << v2.size() << endl; v2 = v1; //reverseCollection(v2); cout << endl << endl << "List2: "; printCollection(v2); cout << endl << "Size: " << v2.size() << endl; //У ВЕКТОРА ПРОВЕРИТЬ end() и вообще итераторы /*vector<double> v1; std::cout << v1.size() << std::endl << v1.capacity() << std::endl; std::cout << std::endl << (v1.begin()) << " " << (v1.end()) << std::endl; v1.insert(v1.begin(), 15); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 16); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 17); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 18); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 19); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 25); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 26); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 27); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 28); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.insert(v1.begin(), 29); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; try { for (size_t i = 0; i < 15; ++i) { v1.insert(v1.begin(), i); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; } } catch (std::logic_error) { std::cout << std::endl << "DEBUG: An exception was caught" << std::endl; } try { v1.insert(v1.begin() + 2, 120); v1.insert(v1.begin() - 190, 180); } catch (std::logic_error) { std::cout << std::endl << "DEBUG: An exception was caught" << std::endl; } std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; v1.erase(v1.begin()); v1.erase(v1.begin() + 7); v1.erase(v1.begin() + 5); v1.erase(v1.begin()); v1.erase(v1.begin()); try { for (size_t i = 0; i < 6; ++i) { v1.erase(v1.begin()); } } catch (std::logic_error) { std::cout << std::endl << "DEBUG: An exception was caught while Erase" << std::endl; } try { v1.erase(v1.begin() + 7); v1.erase(v1.begin() + 5); v1.erase(v1.begin() + 100); } catch (std::logic_error) { std::cout << std::endl << "DEBUG: _____An exception was caught while Erase" << std::endl; } std::cout << std::endl << "Vector 1 ( before Erase end() ): "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; try { v1.erase(v1.end()); //v1.erase(v1.begin() - 1); } catch (std::logic_error) { std::cout << std::endl << "DEBUG: __An exception was caught while Erase" << std::endl; } std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; vector <double>v2; v2.insert(v2.begin(), 119.3); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v2.insert(v2.begin(), 120.5); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v2.insert(v2.begin(), 121.7); std::cout << std::endl << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; v1.swap(v2); //смена местами std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; v1 = v2; //присваивание копированием std::cout << std::endl << std::endl; std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; v2.clear(); v2 = std::move(v1); //присваивание перемещением std::cout << std::endl << std::endl; std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; /*v1.resize(20); std::cout << std::endl << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.resize(30); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.resize(10); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.resize(70); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; v1.resize(200); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; //std::cout << std::endl << v1[0] << " " << v1[1] << " " << v1[2] << std::endl; std::cout << std::endl; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; */ /* CollectionType<int> v1; cout << v1.size() << endl << v1.capacity() << endl; cout << endl << (v1.begin()) << " " << (v1.end()) << endl; for (size_t i = 0; i < 15; ++i) { v1.insert(v1.begin(), i); std::cout << std::endl << v1.size() << std::endl << v1.capacity() << std::endl; } try { v1.insert(v1.begin() + 2, 120); v1.insert(v1.begin() - 190, 180); } catch (std::logic_error) { std::cout << std::endl << "DEBUG: An exception was caught" << std::endl; } cout << endl << v1.size() << endl << v1.capacity() << endl; std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; for (size_t i = 0; i < 6; ++i) v1.erase(v1.begin()); try { v1.erase(v1.begin() + 7); v1.erase(v1.begin() + 5); v1.erase(v1.begin() + 100); } catch (std::logic_error) { std::cout << std::endl << "DEBUG: _____An exception was caught while Erase" << std::endl; } std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; CollectionType<int> v2; for (size_t i = 0; i < 20; ++i) { v2.insert(v2.begin(), 100 - i); std::cout << std::endl << v2.size() << std::endl << v2.capacity() << std::endl; } std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; v1.swap(v2); std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; v2 = v1; std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; cout << endl << v1.size() << endl << v1.capacity() << endl; cout << endl << v2.size() << endl << v2.capacity() << endl; v1.clear(); std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; cout << endl << v1.size() << endl << v1.capacity() << endl; v1 = move(v2); std::cout << std::endl << "Vector 1: "; for (size_t i = 0; i < v1.size(); ++i) std::cout << v1[i] << " "; std::cout << std::endl << "Vector 2: "; for (size_t i = 0; i < v2.size(); ++i) std::cout << v2[i] << " "; cout << endl << v1.size() << endl << v1.capacity() << endl; cout << endl << v2.size() << endl << v2.capacity() << endl; // --------- ДАЛЕЕ ИДУТ СПИСКИ --------- _CollectionType<int> l1, l2; //_CollectionType<int>::ConstIterator it0 = l1.begin(); for (int i = 0; i < 15; ++i) { l1.insert(l1.begin(), i); //it0 = l1.begin(); cout << endl << "data: " << *(l1.begin()); std::cout << std::endl << l1.size() << std::endl; } cout << endl << endl << "List 1: "; _CollectionType<int>::ConstIterator it1 = l1.begin(); for (size_t i = 0; i < l1.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } //УДАЛЕНИЕ ПОЭЛЕМЕНТНО ИЗ СПИСКА l1 ( erase() ) /* for (size_t i = 0; i < l1.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); l1.erase(l1.begin()); } //ПОСЛЕ ЭТОГО ЧТО_ТО РАБОТАЕТ НЕПРАВИЛЬНО: РАЗМЕР УМЕНЬШАЕТСЯ, НО НЕ ДО НУЛЯ cout << endl << endl << "List 1: "; for (size_t i = 0; i < l1.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } for (int i = 15; i < 30; ++i) { l1.insert(l1.begin(), i); //it0 = l1.begin(); cout << endl << "data: " << *(l1.begin()); std::cout << std::endl << l1.size() << std::endl; } //ПРИСВАИВАНИЕ КОПИРОВАНИЕМ l2 = l1; it1 = l1.begin(); cout << endl << endl << "List 1: "; for (size_t i = 0; i < l1.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } cout << endl << endl << "List 2: "; it1 = l2.begin(); for (size_t i = 0; i < l2.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } //УДАЛЕНИЕ ВСЕГО СПИСКА l1 l1.clear(); it1 = l1.begin(); cout << endl << endl << "List 1: "; for (size_t i = 0; i < l1.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } //ОПЕРАЦИЯ ПРИСВАИВАНИЯ ПЕРЕМЕЩЕНИЕМ l1 = move(l2); it1 = l1.begin(); cout << endl << endl << "List 1: "; for (size_t i = 0; i < l1.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } it1 = l2.begin(); cout << endl << endl << "List 2: "; for (size_t i = 0; i < l2.size(); ++i) { //_CollectionType<int>::ConstIterator = l1.begin(); std::cout << *it1 << " "; ++it1; } */ return 0; }
[ "73231661+EraserH@users.noreply.github.com" ]
73231661+EraserH@users.noreply.github.com
c1ccd06e7fb4d7fe9e91985ce1a51686138aba09
3001fad786bce606def16f5817a20774f1295362
/slowlap_planner/src/cone.cpp
9ff13769a84db5acb532850b3f1c4fd2d7843a73
[]
no_license
Forrest-Z/slowlap_control
da512fa2e63e3aa060c32c327c40d75322cc247f
0eb04d0bef3e361aac4b34a9d2b06cf8cb670c3d
refs/heads/main
2023-06-27T08:51:51.870140
2021-07-29T01:28:42
2021-07-29T01:28:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
142
cpp
#include "cone.h" #include "path_point.h" Cone::Cone(float X, float Y, char col, int ID) : position(PathPoint(X, Y)), colour(col), id(ID) {}
[ "noreply@github.com" ]
noreply@github.com
a56118019cfc4e77bde0a84fb9742019ff74d836
5046dc43d09120461fa3431882d547cad891d3c3
/PRTConstants.h
f1f04cd04be131798ad7ccc6e1fb809bbc51865c
[]
no_license
bingbin83/PRT-1
99eed5689be18ee57f41844b9f7c10d7f00e2114
bf4bf88204338217a0850bc00c7994a722378909
refs/heads/master
2022-01-15T16:57:20.812205
2019-02-21T05:33:36
2019-02-21T05:33:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
300
h
// // Created by Im YoungMin on 2019-02-15. // #ifndef PRT_PRTCONSTANTS_H #define PRT_PRTCONSTANTS_H namespace prt { const int PRT_ELEMENTS_PER_VERTEX = 3; const int PRT_ELEMENTS_PER_MATRIX = 16; const int N_BANDS = 4; // Number of Spherical-Harmonics bands. } #endif //PRT_PRTCONSTANTS_H
[ "ultimate_luis@hotmail.com" ]
ultimate_luis@hotmail.com
03039a421012d0c94a70a8d627b20343a4720415
5418ad61a7735f8344e7e191c2e24b3b26fa79db
/BoardInterface.h
e98af945cf129c9d784de5e38c80738fadc41f81
[]
no_license
erkanoguz/Flood-Fill
4215d20145730b8ff3a3571a064bf2db35277ef7
a5745f901bc599eb5b0ca1cd746d33887957e83d
refs/heads/master
2020-07-20T02:41:13.930085
2019-09-05T12:37:19
2019-09-05T12:37:19
206,557,870
1
0
null
null
null
null
UTF-8
C++
false
false
525
h
#ifndef BOARDINTERFACE_H #define BOARDINTERFACE_H class BoardInterface { public: virtual ~BoardInterface() {} virtual void SetSize(const int numRows, const int numCols) = 0; virtual void GetSize(int & numRows, int & numCols) = 0; virtual void SetZero(const int row, const int col) = 0; virtual void SetOne(const int row, const int col) = 0; virtual bool isFilled (const int row, const int col) = 0; virtual void Print() = 0; }; #endif // !BOARDINTERFACE_H
[ "ooguzerkan@gmail.com" ]
ooguzerkan@gmail.com
f6b8b24ffc3d230de537ebfb5598bfef7e1cac45
8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a
/3rdParty/boost/1.78.0/libs/log/example/doc/sinks_async.cpp
75f804665f2b1d19f03774454c88cad07674ad66
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception-2.2", "LicenseRef-scancode...
permissive
arangodb/arangodb
0980625e76c56a2449d90dcb8d8f2c485e28a83b
43c40535cee37fc7349a21793dc33b1833735af5
refs/heads/devel
2023-08-31T09:34:47.451950
2023-08-31T07:25:02
2023-08-31T07:25:02
2,649,214
13,385
982
Apache-2.0
2023-09-14T17:02:16
2011-10-26T06:42:00
C++
UTF-8
C++
false
false
2,808
cpp
/* * Copyright Andrey Semashev 2007 - 2015. * 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) */ #include <string> #include <fstream> #include <iostream> #include <boost/smart_ptr/shared_ptr.hpp> #include <boost/core/null_deleter.hpp> #include <boost/log/core.hpp> #include <boost/log/expressions.hpp> #include <boost/log/sinks/async_frontend.hpp> #include <boost/log/sinks/text_ostream_backend.hpp> #include <boost/log/sources/severity_channel_logger.hpp> #include <boost/log/sources/record_ostream.hpp> namespace logging = boost::log; namespace src = boost::log::sources; namespace expr = boost::log::expressions; namespace sinks = boost::log::sinks; namespace keywords = boost::log::keywords; //[ example_sinks_async_init enum severity_level { normal, warning, error }; // Complete sink type typedef sinks::asynchronous_sink< sinks::text_ostream_backend > sink_t; boost::shared_ptr< sink_t > init_logging() { boost::shared_ptr< logging::core > core = logging::core::get(); // Create a backend and initialize it with a stream boost::shared_ptr< sinks::text_ostream_backend > backend = boost::make_shared< sinks::text_ostream_backend >(); backend->add_stream( boost::shared_ptr< std::ostream >(&std::clog, boost::null_deleter())); // Wrap it into the frontend and register in the core boost::shared_ptr< sink_t > sink(new sink_t(backend)); core->add_sink(sink); // You can manage filtering and formatting through the sink interface sink->set_filter(expr::attr< severity_level >("Severity") >= warning); sink->set_formatter ( expr::stream << "Level: " << expr::attr< severity_level >("Severity") << " Message: " << expr::message ); // You can also manage backend in a thread-safe manner { sink_t::locked_backend_ptr p = sink->locked_backend(); p->add_stream(boost::make_shared< std::ofstream >("sample.log")); } // the backend gets released here return sink; } //] //[ example_sinks_async_stop void stop_logging(boost::shared_ptr< sink_t >& sink) { boost::shared_ptr< logging::core > core = logging::core::get(); // Remove the sink from the core, so that no records are passed to it core->remove_sink(sink); // Break the feeding loop sink->stop(); // Flush all log records that may have left buffered sink->flush(); sink.reset(); } //] int main(int, char*[]) { boost::shared_ptr< sink_t > sink = init_logging(); src::severity_channel_logger< severity_level > lg(keywords::channel = "net"); BOOST_LOG_SEV(lg, warning) << "Hello world!"; stop_logging(sink); return 0; }
[ "noreply@github.com" ]
noreply@github.com
4a280c95854d6a2ce57b872100a856759556b544
c8b0e1ef426bd400b83011a3e390f27e7e66e24a
/Artifice/Source/Artifice/math/Frustum.cpp
68654ff144ac605216e6f7b6233f05793587e719
[]
no_license
christophercheng-projects/Artifice
f521854619332d8ad7533370bf29ce54be96f730
a9fb661f28e943cafe8c21e5b1b60cff6440df8e
refs/heads/master
2023-06-30T01:12:20.557073
2020-08-30T19:38:27
2021-07-27T23:33:08
291,538,441
1
0
null
null
null
null
UTF-8
C++
false
false
2,180
cpp
#include "Frustum.h" void Frustum::ExtractPlanes(const mat4& m) { planes[LEFT].x = m.elements[0 + 3 * 4] + m.elements[0 + 0 * 4]; planes[LEFT].y = m.elements[1 + 3 * 4] + m.elements[1 + 0 * 4]; planes[LEFT].z = m.elements[2 + 3 * 4] + m.elements[2 + 0 * 4]; planes[LEFT].w = m.elements[3 + 3 * 4] + m.elements[3 + 0 * 4]; planes[RIGHT].x = m.elements[0 + 3 * 4] - m.elements[0 + 0 * 4]; planes[RIGHT].y = m.elements[1 + 3 * 4] - m.elements[1 + 0 * 4]; planes[RIGHT].z = m.elements[2 + 3 * 4] - m.elements[2 + 0 * 4]; planes[RIGHT].w = m.elements[3 + 3 * 4] - m.elements[3 + 0 * 4]; planes[TOP].x = m.elements[0 + 3 * 4] - m.elements[0 + 1 * 4]; planes[TOP].y = m.elements[1 + 3 * 4] - m.elements[1 + 1 * 4]; planes[TOP].z = m.elements[2 + 3 * 4] - m.elements[2 + 1 * 4]; planes[TOP].w = m.elements[3 + 3 * 4] - m.elements[3 + 1 * 4]; planes[BOTTOM].x = m.elements[0 + 3 * 4] + m.elements[0 + 1 * 4]; planes[BOTTOM].y = m.elements[1 + 3 * 4] + m.elements[1 + 1 * 4]; planes[BOTTOM].z = m.elements[2 + 3 * 4] + m.elements[2 + 1 * 4]; planes[BOTTOM].w = m.elements[3 + 3 * 4] + m.elements[3 + 1 * 4]; planes[NEAR].x = m.elements[0 + 3 * 4] + m.elements[0 + 2 * 4]; planes[NEAR].y = m.elements[1 + 3 * 4] + m.elements[1 + 2 * 4]; planes[NEAR].z = m.elements[2 + 3 * 4] + m.elements[2 + 2 * 4]; planes[NEAR].w = m.elements[3 + 3 * 4] + m.elements[3 + 2 * 4]; planes[FAR].x = m.elements[0 + 3 * 4] - m.elements[0 + 2 * 4]; planes[FAR].y = m.elements[1 + 3 * 4] - m.elements[1 + 2 * 4]; planes[FAR].z = m.elements[2 + 3 * 4] - m.elements[2 + 2 * 4]; planes[FAR].w = m.elements[3 + 3 * 4] - m.elements[3 + 2 * 4]; for (unsigned int i = 0; i < 6; i++) { planes[i].Normalize(); } } bool Frustum::IsSphereVisible(const Sphere& sphere) { for (unsigned int i = 0; i < 6; i++) { if (planes[i].x * sphere.center.x + planes[i].y * sphere.center.y + planes[i].z * sphere.center.z + planes[i].w + sphere.radius <= 0) { return false; } } return true; }
[ "chengcw@icloud.com" ]
chengcw@icloud.com
4e1f54fef2ddbd986072dab6733b40cf1b27c714
71c1c86b30c1518e21728f7d5e0f09b5e602baac
/Algo_Engine/ROM_Handler/FIXServer/FIXCLIENT/OmExecution.cpp
8a0836353ebecbc46e0a5a18c43a8fc789f3352f
[]
no_license
ssh352/ronin
3ddf360fec5f106015c6902b5107aedefe934836
33301b6c5e68fa9d02c7d54bc86f6b7732985fc2
refs/heads/master
2023-05-03T11:00:39.368460
2021-05-17T18:41:08
2021-05-17T18:41:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,994
cpp
// OmExecution.cpp: implementation of the COmExecution class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "fixclient.h" #include "OmExecution.h" #include <time.h> #include "FIX42_Messages.h" #include "Values.h" #include "string_util.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// COmExecution::COmExecution( const FIX42::ExecutionReport & report ) :m_szTraderAcr("") ,m_szClearingID("") ,m_szExeTime("") ,m_nQty(0) ,m_fPrice(0.0f) ,m_szOrderTag("") ,m_szExchange("") ,m_szSymbol("") ,m_szSecType("") ,m_szBase("") ,m_fStrike(0.0f) ,m_szCallPut("") ,m_szExpire("") ,m_nSide(0) ,m_nOpenClose(-1) ,m_szLocalAcct("") ,m_szRetailAcct("") ,m_szFirm("") { std::string acct = report.get(FIX::Account()); std::vector<std::string> vFields; string_util::parse( acct, vFields, ' ' ); m_szTraderAcr = vFields[0]; m_szClearingID = vFields[1]; m_szFirm = vFields[2]; m_szLocalAcct = vFields[3]; m_szRetailAcct = vFields[4]; try { FIX::TransactTime tran = report.get(FIX::TransactTime()); m_szExeTime = tran.getString(); } catch(...) { m_szExeTime = ""; } m_nQty = report.get(FIX::LastShares()); m_fPrice = report.get(FIX::LastPx()); m_szOrderTag = report.get(FIX::OrderID()); m_szSymbol = report.get(FIX::Symbol()); // m_szExchange = report.get(FIX::SecurityExchange()); m_szExchange = report.get(FIX::LastMkt()); std::string szSecType = report.get(FIX::SecurityType()); if( szSecType == FIX::SecurityType_PREFERRED_STOCK ) { m_szSecType = "E"; } else if( szSecType == FIX::SecurityType_OPTION ) { m_szSecType = "OE"; char openclose = report.get(FIX::OpenClose()); if( openclose == FIX::OpenClose_OPEN ) { m_nOpenClose = 1; } else if( openclose == FIX::OpenClose_CLOSE ) { m_nOpenClose = 0; } char callput = report.get(FIX::PutOrCall()); if( callput == FIX::PutOrCall_CALL ) { m_szCallPut = "C"; } else if( callput == FIX::PutOrCall_PUT ) { m_szCallPut = "P"; } m_szExpire = report.get( FIX::MaturityMonthYear() ); m_fStrike = report.get( FIX::StrikePrice() ); m_szBase = report.get(FIX::SymbolSfx()); } else if( szSecType == FIX::SecurityType_FUTURE ) { m_szSecType = "F"; } char side = report.get(FIX::Side()); switch( side ) { case '1': m_nSide = 1; break; case '2': m_nSide = 2; break; case '5': m_nSide = 5; break; default: m_nSide = -1; break; } float fAvgPrice = report.get(FIX::AvgPx()); int nCumQty = report.get(FIX::CumQty()); int nLeaveQty = report.get(FIX::LeavesQty()); m_szExecID = report.get(FIX::ExecID()); } COmExecution::~COmExecution() { }
[ "pflynn@sumocap.com" ]
pflynn@sumocap.com
dd2c69674f9d941341610d24150ae4d8837b4a58
214dbcc732e0f6a49336164c793bd4af4754a6f7
/Algorithmics/Problems from various contests/vintage.cpp
d3e0c3089aaf7868b05c9b7d32dcdf37843d228c
[]
no_license
IrinaMBejan/Personal-work-contests
f878c25507a8bfdab3f7af8d55b780d7632efecb
4ab2841244a55d074d25e721aefa56431e508c43
refs/heads/master
2021-01-20T08:24:47.492233
2017-05-03T12:22:26
2017-05-03T12:22:26
90,142,452
1
0
null
null
null
null
UTF-8
C++
false
false
652
cpp
#include <fstream> #include<algorithm> using namespace std; ifstream fin("vintage.in"); ofstream fout("vintage.out"); struct masina { int val; int cost; int nr; }a[1001]; int compare(masina a, masina b) { return(a.val>b.val||(a.val==b.val&&a.cost<b.cost)); } int main() { int n,m,i; long long int vmax=0,cmin=0; fin>>n>>m; for(i=1;i<=n;i++) { fin>>a[i].cost>>a[i].val; a[i].nr=i; } sort(a+1,a+n+1,compare); for(i=1;i<=m;i++) { vmax+=a[i].val; cmin+=a[i].cost; } fout<<vmax<<" "<<cmin<<'\n'; for(i=1;i<=m;i++) fout<<a[i].nr<<" "; return 0; }
[ "irinam.bejan@gmail.com" ]
irinam.bejan@gmail.com
3366477546a2defc31eeceb98d309c6812a96ad4
10a2a809bdb53e8100bbd94fc4c4a1e70cfc797c
/walk/walk.cpp
306ab3e31d71ef89793b813433f22c4c1c9086b8
[]
no_license
u8y7541/usaco
20bcbedcecced7b89363fc94175ccb6f8b758428
77c026ee431d38a2f111d65d8a79133f864a5f35
refs/heads/master
2021-03-28T06:22:33.001821
2020-03-17T00:41:05
2020-03-17T00:41:05
247,845,688
0
0
null
null
null
null
UTF-8
C++
false
false
367
cpp
#include <bits/stdc++.h> using namespace std; int dfs() { int main(void) { /*ifstream fin; ofstream fout; fin.open("walk.in"); fout.open("walk.out");*/ int N, K; cin>>N>>K; int list[(N*(N-1))/2]; int count = 0; for (int x = 1; x<N; i++) { for (int y = y+1; y<=N; y++) { list[count] = 84*x+48*y; count++; } } sort(list, list+(N*(N-1))/2);
[ "surya.subbarao1@gmail.com" ]
surya.subbarao1@gmail.com
3da5b5ee050ffb05fd7906e36b96c81a591e4b94
03d17e60cc17f0df9cef4682683ccc601b408116
/LEDComm.h
3ca33ac3e32d77c5647fab30e548af8f1cc66aa1
[]
no_license
chunkmunk01/LEDComm
f9b73e47127257a2b9ad06d4eb2e1ed420fee03c
f3b7da0946a9c62d562f2a8b318c64d805c0e901
refs/heads/master
2021-01-10T13:08:46.804623
2016-01-18T13:16:58
2016-01-18T13:16:58
49,734,184
1
0
null
null
null
null
UTF-8
C++
false
false
1,470
h
/* LEDComm library by Joshua Case. Offer void in Utah create led comm instance LEDComm talk; setup talk for led talk.Setup(cathode pin, anode pin); illuminate led for time in microseconds talk.LightOn(on time in microseconds); listen for another device, and return the length of time light was detected in microseconds. talk.Listen(brightThresh,timeOut); bright threshold is how long the led waits to "see" another device, in microseconds. This is the decay time of the led, which depends on the brightness of the light falling on it. timeOut is how long the led will check for a device before exiting the loop. If a device is detected within this time in microseconds, it will reset the timeout, and instead wait until this device "turns off", essentially waiting indefinately as long as light is detected at the intensity defined by "brightThresh" */ #ifndef LEDComm_h #define LEDComm_h #include "Arduino.h" #include <utility/lcuTimer.h> class LEDComm { public: //LEDComm(); void Setup(int cathode2, int anode2); void LightOn(unsigned long lightOnTime); unsigned long Listen(unsigned long brightThresh, unsigned long timeOut); int cathode2; int anode2; void LightOff(); private: int _cathode; int _anode; unsigned long _bitTime; int _deviceAttached; unsigned long _highTime; unsigned long _startTime; lcuTimer _watchforLight; lcuTimer _recieveTime; lcuTimer _onTimr; }; #endif
[ "chunkmunk01@gmaill.com" ]
chunkmunk01@gmaill.com
66c4571bdf2e8781f8595ab3202ecac85c773c54
911de659a702b6e235f25fefed3d8fa52b8fecd7
/streamingDemoSource/src/hdf5Testing/main.cpp
a16a2b912e86d2d78a7d3a32e4d7d9d632af929b
[ "BSD-3-Clause" ]
permissive
ocommowi/RPI
84fc03150cb0db9cb77ff0eb3719e041e36624c2
7d4af25e57a728def72528428962026c1f65d1ff
refs/heads/master
2021-01-18T06:31:26.848387
2012-09-14T16:24:37
2012-09-14T16:24:37
9,098,423
0
0
null
null
null
null
UTF-8
C++
false
false
7,195
cpp
#include <itkImageToVTKImageFilter.h> #include <itkImageFileReader.h> #include <itkImage.h> #include <itkImageFileWriter.h> #include <vtkImageData.h> #include <iostream> #include <stdexcept> typedef itk::Image<unsigned short, 3> ImageType; #include <hdf5.h> int writeExample( ImageType::ConstPointer image, const std::string & filename, const std::string & dataName ) { const ImageType::RegionType region = image->GetLargestPossibleRegion(); herr_t status; const unsigned int ndims = 3; hsize_t dims[ndims], chunk[ndims]; unsigned int filter_info; for ( int i(0); i<ndims; ++i ) { dims[i] = region.GetSize(i); } /* * Check if gzip compression is available and can be used for both * compression and decompression. Normally we do not perform error * checking in these examples for the sake of clarity, but in this * case we will make an exception because this filter is an * optional part of the hdf5 library. */ htri_t avail = H5Zfilter_avail(H5Z_FILTER_DEFLATE); if (!avail) { printf ("gzip filter not available.\n"); return 1; } status = H5Zget_filter_info (H5Z_FILTER_DEFLATE, &filter_info); if ( !(filter_info & H5Z_FILTER_CONFIG_ENCODE_ENABLED) || !(filter_info & H5Z_FILTER_CONFIG_DECODE_ENABLED) ) { printf ("gzip filter not available for encoding and decoding.\n"); return 1; } /* * Create a new file using the default properties. */ hid_t outfileId = H5Fcreate (filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /* * Create dataspace. Setting maximum size to NULL sets the maximum * size to be the current size. */ hid_t space = H5Screate_simple (ndims, dims, NULL); /* * Create the dataset creation property list, add the gzip * compression filter and set the chunk size. */ chunk[0] = 16; chunk[1] = 16; chunk[2] = 16; hid_t dcpl = H5Pcreate (H5P_DATASET_CREATE); status = H5Pset_deflate (dcpl, 7); status = H5Pset_chunk (dcpl, ndims, chunk); hid_t dataType; if ( typeid( ImageType::PixelType ) == typeid( short ) ) { dataType = H5T_NATIVE_SHORT; } else if ( typeid( ImageType::PixelType ) == typeid( unsigned short ) ) { dataType = H5T_NATIVE_USHORT; } else { throw( std::runtime_error("Unknown data type for image") ); } /* * Create the dataset. */ hid_t dset = H5Dcreate (outfileId, dataName.c_str(), dataType, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); /* * Write the data to the dataset. */ status = H5Dwrite (dset, dataType, H5S_ALL, H5S_ALL, H5P_DEFAULT, image->GetBufferPointer() ) ; /* * Close and release resources. */ status = H5Pclose (dcpl); status = H5Dclose (dset); status = H5Sclose (space); status = H5Fclose (outfileId); return 0; } ImageType::Pointer readExample(const std::string & filename, const std::string & dataName) { herr_t status; /* * Open file and dataset using the default properties. */ hid_t file = H5Fopen (filename.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT); hid_t dset = H5Dopen (file, dataName.c_str(), H5P_DEFAULT); /* * Retrieve dataset creation property list. */ hid_t dcpl = H5Dget_create_plist (dset); /* * Retrieve and print the filter type. Here we only retrieve the * first filter because we know that we only added one filter. */ size_t nelmts = 0; unsigned int filter_info; unsigned int flags; H5Z_filter_t filter_type = H5Pget_filter (dcpl, 0, &flags, &nelmts, NULL, 0, NULL, &filter_info); printf ("Filter type is: "); switch (filter_type) { case H5Z_FILTER_DEFLATE: printf ("H5Z_FILTER_DEFLATE\n"); break; case H5Z_FILTER_SHUFFLE: printf ("H5Z_FILTER_SHUFFLE\n"); break; case H5Z_FILTER_FLETCHER32: printf ("H5Z_FILTER_FLETCHER32\n"); break; case H5Z_FILTER_SZIP: printf ("H5Z_FILTER_SZIP\n"); break; case H5Z_FILTER_NBIT: printf ("H5Z_FILTER_NBIT\n"); break; case H5Z_FILTER_SCALEOFFSET: printf ("H5Z_FILTER_SCALEOFFSET\n"); } // DEtermine dimension of data. hid_t space = H5Dget_space( dset ); const int ndims = H5Sget_simple_extent_ndims( space ); if ( ImageType::ImageDimension != ndims ) { throw ( std::runtime_error("Bad dimension") ); } std::vector<hsize_t> dims(ndims), maxdims(ndims); status = H5Sget_simple_extent_dims(space, &(dims[0]), &(maxdims[0]) ); ImageType::Pointer ret = ImageType::New(); ImageType::RegionType largestRegion; for (int i(0); i<ndims; ++i ) { largestRegion.SetSize(i, maxdims[i]); } ret->SetLargestPossibleRegion(largestRegion); ret->SetBufferedRegion(largestRegion); ret->Allocate(); //TODO ret->SetSpacing(spacing); //TODO ret->SetDirection(direction); /* * Read the data using the default properties. */ hid_t dataType; if (typeid( ImageType::PixelType ) == typeid( short ) ) { dataType = H5T_NATIVE_SHORT; } else { throw( std::runtime_error( " Bad data type " ) ) ; } status = H5Dread (dset, dataType, H5S_ALL, H5S_ALL, H5P_DEFAULT, ret->GetBufferPointer() ); /* * Close and release resources. */ status = H5Pclose (dcpl); status = H5Dclose (dset); status = H5Sclose (space); status = H5Fclose (file); return ret; } ImageType::Pointer readRaw( const std::string & filename, int xdim, int ydim, int zdim ) { ImageType::Pointer ret = ImageType::New(); ImageType::RegionType region; region.SetSize(0,xdim); region.SetSize(1,ydim); region.SetSize(2,zdim); ret->SetLargestPossibleRegion( region ); ret->SetBufferedRegion( region ); ret->Allocate(); std::ifstream is( filename, std::ifstream::binary ); size_t buffSize = ret->GetOffsetTable()[ ret->GetImageDimension() ]; is.read( reinterpret_cast<char *>(ret->GetBufferPointer()), buffSize * sizeof(ImageType::PixelType)); return ret; } int main(int argc, char * argv[]) { const std::string inputFilename = "c:/Temp/brebix.mha"; typedef itk::ImageFileReader<ImageType> ReaderType; ReaderType::Pointer Reader = ReaderType::New(); Reader->SetFileName( inputFilename ); ImageType::Pointer image = Reader->GetOutput(); image->Update(); const std::string outfile = "c:/Temp/testFile.hdf5"; const std::string dataName = "imageData"; const std::string infileRaw = "c:/Temp/highres400x400x100.raw"; const std::string outfilemha = "c:/Temp/testFile.mha"; image = readRaw(infileRaw, 400, 400, 100 ); typedef itk::ImageFileWriter< ImageType > WriterType; WriterType::Pointer writer = WriterType::New(); writer->SetInput( image ); writer->SetFileName(outfilemha); writer->Write(); writeExample( ImageType::ConstPointer(image), outfile, dataName); return 0; }
[ "John.Stark@inria.fr" ]
John.Stark@inria.fr
2100f9e1343dc35236b635e85e43e92bb28cab90
90f9789d0618d88c845b14c80d8907700f306dfb
/mang/array 2.cpp
9d0eb91f1c2bfacc9bf902e1130c1ca7530f94c5
[]
no_license
NguyenMinhThuan24112001/CPP_PTIT
839251a8db4f78a8ef92e6983e5d05d38cc0dde8
8dbd00ed503a966c754881010882bc97d07570f9
refs/heads/master
2023-05-07T12:57:31.741372
2021-06-02T11:13:47
2021-06-02T11:13:47
373,137,713
0
0
null
null
null
null
UTF-8
C++
false
false
335
cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; long long a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int c1=0; for(int i=0;i<n;i++){ if(a[i]!=0){ cout<<a[i]<<" "; }else{ c1++; } } for(int i=0;i<c1;i++){ cout<<0<<" "; } cout<<endl; } }
[ "nguyenminhthuan24112001@gmail.com" ]
nguyenminhthuan24112001@gmail.com
31e7f15f40e26b6f759f3d694d9c2c480ef5e2b4
043cc9551ab2dd7662db18e094a2028bd44d6314
/Beavergnaw.cpp
e06fe9013594ce84bd201c64eda0c85080ca7329
[]
no_license
Norskeaksel/My-solutions-to-Kattis-problems
916d96215e80f44c2dd28ca3b789154756fbaefe
d35ceb8dccd804d630b284438209534bad3a32c1
refs/heads/master
2023-05-25T11:34:08.899042
2023-05-20T09:28:16
2023-05-20T09:28:16
172,513,199
0
0
null
null
null
null
UTF-8
C++
false
false
312
cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { double D=1, v=1; while (1) { cin >> D >> v; if (D == 0 && v == 0) break; double d3 = D * D*D - 6 * v / acos(-1); double d = pow(d3, 1 / 3.0); cout << fixed << setprecision(14) << d << endl;; } return 0; }
[ "ahsorbye@gmail.com" ]
ahsorbye@gmail.com
22bae7d2f2e2c774338bc1326bb488996b51fe31
6403e33509f54c25f2864cf284a1753b3baaf3bc
/src/fragmentLengthModel.cpp
db851d592fc7bdd615e77c107feff6e0d719a9df
[ "MIT" ]
permissive
bhurwitz33/bayesembler
37c903a039700f43b84b8bb26df933f878be1089
b1d8200d5ffa2ae3476391d9f35f26e5f14f517f
refs/heads/master
2021-01-14T12:40:23.465396
2014-10-22T13:48:42
2014-10-22T13:48:42
26,366,258
1
0
null
null
null
null
UTF-8
C++
false
false
6,233
cpp
/* fragmentLengthModel.cpp - This file is part of the Bayesembler (v1.1.1) The MIT License (MIT) Copyright (c) 2014 Lasse Maretty and Jonas Andreas Sibbesen 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. */ #include "fragmentLengthModel.h" #include <math.h> #include <fstream> #include <sstream> #include "boost/math/constants/constants.hpp" #include <boost/filesystem.hpp> GaussianFragmentLengthModel::GaussianFragmentLengthModel() {} GaussianFragmentLengthModel::GaussianFragmentLengthModel(double mean_in, double sd_in) { mean = mean_in; sd = sd_in; var = pow(sd, 2); norm_const = 1/(sd*sqrt(2*boost::math::constants::pi<double>())); cout << "[" << getLocalTime() << "] Using Gaussian fragment length distribution with parameters: Mean=" << mean << " and SD=" << sd << endl; } GaussianFragmentLengthModel::GaussianFragmentLengthModel(map<uint,uint> fragment_lengths) { pair<double,double> parameters = estimateParameters(fragment_lengths); mean = parameters.first; sd = 1.4826 * parameters.second; var = pow(sd, 2); norm_const = 1/(sd*sqrt(2*boost::math::constants::pi<double>())); cout << "[" << getLocalTime() << "] Using Gaussian fragment length distribution with parameters: Mean=" << mean << " and SD=" << sd << endl; } double GaussianFragmentLengthModel::pmf(uint fragment_length) { return norm_const * exp(-(pow((double) fragment_length - mean, 2)/(2*var))); } template <typename DataType> double GaussianFragmentLengthModel::estimateMedian(map<DataType,uint> observations) { int observation_count = 0; for (typename map<DataType,uint>::iterator observation_iter = observations.begin(); observation_iter != observations.end(); observation_iter++) { observation_count += observation_iter->second; } assert(observation_count > 0); // Find median observation index for uneven observation number and first median observation for even observation number int median_observation_idx; if (observation_count % 2 == 0) { median_observation_idx = (int) round((double) observation_count/2.0); } else { median_observation_idx = (int) ceil((double) observation_count/2.0); } // Iterate to median observation index typename map<DataType,uint>::iterator observation_iter = observations.begin(); int observation_count_running = observation_iter->second; while (observation_count_running < median_observation_idx) { observation_iter++; observation_count_running += observation_iter->second; } if (observation_count % 2 == 0 and observation_count_running == median_observation_idx) { DataType median = observation_iter->first; observation_iter++; assert(observation_iter != observations.end()); median += observation_iter->first; return (double) median / 2; } else { assert(observation_count_running >= median_observation_idx); return (double) observation_iter->first; } } pair<double,double> GaussianFragmentLengthModel::estimateParameters(map<uint,uint> fragment_lengths) { double median = estimateMedian(fragment_lengths); map<double,uint> abs_distances; int observation_count = 0; for (map<uint,uint>::iterator fragment_lengths_iter = fragment_lengths.begin(); fragment_lengths_iter != fragment_lengths.end(); fragment_lengths_iter++) { assert(fragment_lengths_iter->first > 0); observation_count += fragment_lengths_iter->second; double distance = abs((double) fragment_lengths_iter->first - median); if (abs_distances.count(distance) == 0) { abs_distances[distance] = fragment_lengths_iter->second; } else { abs_distances[distance] += fragment_lengths_iter->second; } } double median_abs_deviation = estimateMedian(abs_distances); if (observation_count < 10000) { cout << "\n[" << getLocalTime() << "] WARNING: Only " << observation_count << " observation(s) were used for estimation of the fragment length distribution!\n" << endl; } cout << "[" << getLocalTime() << "] Estimated fragment length \"median\"=" << median << " and \"median absolute deviation\"=" << median_abs_deviation << " using " << observation_count << " observations" << endl; return pair<double,double> (median, median_abs_deviation); } EmpiricalFragmentLengthModel::EmpiricalFragmentLengthModel(string distribution_filename) { assert(boost::filesystem::exists(distribution_filename)); ifstream distribution_file(distribution_filename.c_str()); assert(distribution_file.is_open()); string distribution_line; uint fragment_length; double probability; uint line_count = 0; while (getline(distribution_file, distribution_line)) { line_count++; stringstream linestream(distribution_line); // Read the integers using the operator >> linestream >> fragment_length >> probability; assert(distribution.count(fragment_length) == 0); distribution[fragment_length] = probability; } cout << "[" << getLocalTime() << "] Loaded empirical fragment length distribution containing " << line_count << " fragment length values - the remaining will have point-zero probability " << endl; } double EmpiricalFragmentLengthModel::pmf(uint fragment_length) { if (distribution.count(fragment_length)) { return distribution[fragment_length]; } else { return 0; } }
[ "jasi@hestia.binf.ku.dk" ]
jasi@hestia.binf.ku.dk
54354994935632f9e7d8b536573fd7389365bbba
1791461e6740f81c2dd6704ae6a899a6707ee6b1
/COGS/guarda.cpp
6b5e5e33f664f56f3620ae4f4abc8a0c9306b899
[ "MIT" ]
permissive
HeRaNO/OI-ICPC-Codes
b12569caa94828c4bedda99d88303eb6344f5d6e
4f542bb921914abd4e2ee7e17d8d93c1c91495e4
refs/heads/master
2023-08-06T10:46:32.714133
2023-07-26T08:10:44
2023-07-26T08:10:44
163,658,110
22
6
null
null
null
null
UTF-8
C++
false
false
971
cpp
#include <cstdio> #include <cstring> #define MAXN 210 #define positive 200 using namespace std; double dp[2][MAXN][2*MAXN]; double p[MAXN]; int a[MAXN]; int n,kk,l; double ans=0.0; int mymax(int a,int b) { return a>b?a:b; } int mymin(int a,int b) { return a<b?a:b; } int main() { freopen("guarda.in","r",stdin);freopen("guarda.out","w",stdout); scanf("%d %d %d",&n,&l,&kk); for (int i=1;i<=n;i++) scanf("%lf",&p[i]); for (int i=1;i<=n;i++) scanf("%d",&a[i]); dp[1][1][mymax(kk+positive+a[1],n)]=p[1]/100.0; dp[1][0][kk+positive]=(100.0-p[1])/100.0; for (int i=2;i<=n;i++) { memset(dp[i&1],0,sizeof(double)*MAXN*MAXN*2); for (int j=0;j<=n;j++) for (int k=positive-i;k<=400;k++) { if (j>0) dp[i&1][j][k]+=(dp[i-1&1][j-1][mymin(k-a[i],400)]*p[i]/100.0); dp[i&1][j][k]+=(dp[i-1&1][j][k]*(100.0-p[i])/100.0); } } for (int i=l;i<=n;i++) for (int j=positive;j<=400;j++) ans+=dp[n&1][i][j]; printf("%.6lf\n",ans); return 0; }
[ "heran55@126.com" ]
heran55@126.com
a366e8812317e9d786c8e3b79fab4bd197a4ac1e
40745339d02332fc4a52049752100eff8f69d27b
/01.单片机程序/ebox/hardware/cortex-m3/Peripherals/ebox_encoder.h
5764dd7a023e569454822645e10e00910a000b3d
[ "MIT" ]
permissive
JJL-FW-Caocao/eBoxTransmitter8Ch
1e1ddf9242c565171a9c4bba943fe25ef849fb7f
ef90421c4e4b98a11b584cdb73313d4b1af2d879
refs/heads/master
2021-09-24T17:25:05.201898
2018-10-12T09:24:58
2018-10-12T09:24:58
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,530
h
/** ****************************************************************************** * @file incapture.h * @author shentq * @version V2.1 * @date 2017/07/23 * @brief ****************************************************************************** * @attention * * No part of this software may be used for any commercial activities by any form * or means, without the prior written consent of shentq. This specification is * preliminary and is subject to change at any time without notice. shentq assumes * no responsibility for any errors contained herein. * <h2><center>&copy; Copyright 2015 shentq. All Rights Reserved.</center></h2> ****************************************************************************** */ #ifndef __EBOX_ENCODER_H #define __EBOX_ENCODER_H #include "ebox_core.h" #include "mcu.h" class Encoder { public: Encoder(TIM_TypeDef *timer,Gpio *a,Gpio *b); Encoder(TIM_TypeDef *timer,Gpio *a); bool begin(uint32_t pulse_per_circle,uint8_t mode = TIM_EncoderMode_TI12); double read_speed();//µ¥Î»£ºpulse/second; uint16_t read_counter(); bool read_direction(); private: void base_init(uint16_t period, uint16_t prescaler); void set_encoder(uint8_t mode = TIM_EncoderMode_TI12); private: TIM_TypeDef *TIMx; Gpio *a; Gpio *b; uint16_t period; uint64_t last_read_speed_time; uint32_t pulse_per_circle; }; #endif
[ "shentqlf@163.com" ]
shentqlf@163.com
f2319a8a072ccbe60eab74f199e30c3dd27d442a
fbcbbcf05334b4c7310a9d6ed6aa925f1f9dd9a8
/export/release/windows/obj/src/__ASSET__flixel_flixel_ui_img_radio_dot_png.cpp
5fc3ba83e38b1909a46bb8ecbd8b431a1ffd8e14
[ "Apache-2.0" ]
permissive
Schizine/Keigo-modGame
bff5e75fd3c7c3793a037608dc53b29cc3d1429d
36cef5a3b44208625980caea5a85c978872a2dbd
refs/heads/master
2023-07-03T11:24:37.604635
2021-08-05T19:50:28
2021-08-05T19:50:28
393,148,973
0
0
null
null
null
null
UTF-8
C++
false
true
7,064
cpp
// Generated by Haxe 4.1.5 #include <hxcpp.h> #ifndef INCLUDED___ASSET__flixel_flixel_ui_img_radio_dot_png #include <__ASSET__flixel_flixel_ui_img_radio_dot_png.h> #endif #ifndef INCLUDED_haxe_Resource #include <haxe/Resource.h> #endif #ifndef INCLUDED_haxe_io_Bytes #include <haxe/io/Bytes.h> #endif #ifndef INCLUDED_lime_graphics_Image #include <lime/graphics/Image.h> #endif #ifndef INCLUDED_lime_graphics_ImageBuffer #include <lime/graphics/ImageBuffer.h> #endif #ifndef INCLUDED_lime_graphics_ImageType #include <lime/graphics/ImageType.h> #endif HX_DEFINE_STACK_FRAME(_hx_pos_33a6e591ff1083a8_346_new,"__ASSET__flixel_flixel_ui_img_radio_dot_png","new",0x523706ea,"__ASSET__flixel_flixel_ui_img_radio_dot_png.new","lime/_internal/macros/AssetsMacro.hx",346,0xc651f030) HX_LOCAL_STACK_FRAME(_hx_pos_74f5afc7c25ce0e6_669_boot,"__ASSET__flixel_flixel_ui_img_radio_dot_png","boot",0x96080668,"__ASSET__flixel_flixel_ui_img_radio_dot_png.boot","ManifestResources.hx",669,0xf77aa668) void __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__construct( ::lime::graphics::ImageBuffer buffer, ::Dynamic offsetX, ::Dynamic offsetY, ::Dynamic width, ::Dynamic height, ::Dynamic color, ::lime::graphics::ImageType type){ HX_STACKFRAME(&_hx_pos_33a6e591ff1083a8_346_new) HXLINE( 375) super::__construct(null(),null(),null(),null(),null(),null(),null()); HXLINE( 377) this->_hx___fromBytes(::haxe::Resource_obj::getBytes(::__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::resourceName),null()); } Dynamic __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__CreateEmpty() { return new __ASSET__flixel_flixel_ui_img_radio_dot_png_obj; } void *__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::_hx_vtable = 0; Dynamic __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__Create(::hx::DynamicArray inArgs) { ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_radio_dot_png_obj > _hx_result = new __ASSET__flixel_flixel_ui_img_radio_dot_png_obj(); _hx_result->__construct(inArgs[0],inArgs[1],inArgs[2],inArgs[3],inArgs[4],inArgs[5],inArgs[6]); return _hx_result; } bool __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::_hx_isInstanceOf(int inClassId) { if (inClassId<=(int)0x0cd9d054) { return inClassId==(int)0x00000001 || inClassId==(int)0x0cd9d054; } else { return inClassId==(int)0x33f052f7; } } ::String __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::resourceName; ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_radio_dot_png_obj > __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__new( ::lime::graphics::ImageBuffer buffer, ::Dynamic offsetX, ::Dynamic offsetY, ::Dynamic width, ::Dynamic height, ::Dynamic color, ::lime::graphics::ImageType type) { ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_radio_dot_png_obj > __this = new __ASSET__flixel_flixel_ui_img_radio_dot_png_obj(); __this->__construct(buffer,offsetX,offsetY,width,height,color,type); return __this; } ::hx::ObjectPtr< __ASSET__flixel_flixel_ui_img_radio_dot_png_obj > __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__alloc(::hx::Ctx *_hx_ctx, ::lime::graphics::ImageBuffer buffer, ::Dynamic offsetX, ::Dynamic offsetY, ::Dynamic width, ::Dynamic height, ::Dynamic color, ::lime::graphics::ImageType type) { __ASSET__flixel_flixel_ui_img_radio_dot_png_obj *__this = (__ASSET__flixel_flixel_ui_img_radio_dot_png_obj*)(::hx::Ctx::alloc(_hx_ctx, sizeof(__ASSET__flixel_flixel_ui_img_radio_dot_png_obj), true, "__ASSET__flixel_flixel_ui_img_radio_dot_png")); *(void **)__this = __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::_hx_vtable; __this->__construct(buffer,offsetX,offsetY,width,height,color,type); return __this; } __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__ASSET__flixel_flixel_ui_img_radio_dot_png_obj() { } bool __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__GetStatic(const ::String &inName, Dynamic &outValue, ::hx::PropertyAccess inCallProp) { switch(inName.length) { case 12: if (HX_FIELD_EQ(inName,"resourceName") ) { outValue = ( resourceName ); return true; } } return false; } bool __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__SetStatic(const ::String &inName,Dynamic &ioValue,::hx::PropertyAccess inCallProp) { switch(inName.length) { case 12: if (HX_FIELD_EQ(inName,"resourceName") ) { resourceName=ioValue.Cast< ::String >(); return true; } } return false; } #ifdef HXCPP_SCRIPTABLE static ::hx::StorageInfo *__ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sMemberStorageInfo = 0; static ::hx::StaticInfo __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sStaticStorageInfo[] = { {::hx::fsString,(void *) &__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::resourceName,HX_("resourceName",39,7a,62,90)}, { ::hx::fsUnknown, 0, null()} }; #endif static void __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sMarkStatics(HX_MARK_PARAMS) { HX_MARK_MEMBER_NAME(__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::resourceName,"resourceName"); }; #ifdef HXCPP_VISIT_ALLOCS static void __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sVisitStatics(HX_VISIT_PARAMS) { HX_VISIT_MEMBER_NAME(__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::resourceName,"resourceName"); }; #endif ::hx::Class __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__mClass; static ::String __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sStaticFields[] = { HX_("resourceName",39,7a,62,90), ::String(null()) }; void __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__register() { __ASSET__flixel_flixel_ui_img_radio_dot_png_obj _hx_dummy; __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::_hx_vtable = *(void **)&_hx_dummy; ::hx::Static(__mClass) = new ::hx::Class_obj(); __mClass->mName = HX_("__ASSET__flixel_flixel_ui_img_radio_dot_png",f8,09,63,df); __mClass->mSuper = &super::__SGetClass(); __mClass->mConstructEmpty = &__CreateEmpty; __mClass->mConstructArgs = &__Create; __mClass->mGetStaticField = &__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__GetStatic; __mClass->mSetStaticField = &__ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__SetStatic; __mClass->mMarkFunc = __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sMarkStatics; __mClass->mStatics = ::hx::Class_obj::dupFunctions(__ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sStaticFields); __mClass->mMembers = ::hx::Class_obj::dupFunctions(0 /* sMemberFields */); __mClass->mCanCast = ::hx::TCanCast< __ASSET__flixel_flixel_ui_img_radio_dot_png_obj >; #ifdef HXCPP_VISIT_ALLOCS __mClass->mVisitFunc = __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sVisitStatics; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mMemberStorageInfo = __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sMemberStorageInfo; #endif #ifdef HXCPP_SCRIPTABLE __mClass->mStaticStorageInfo = __ASSET__flixel_flixel_ui_img_radio_dot_png_obj_sStaticStorageInfo; #endif ::hx::_hx_RegisterClass(__mClass->mName, __mClass); } void __ASSET__flixel_flixel_ui_img_radio_dot_png_obj::__boot() { { HX_STACKFRAME(&_hx_pos_74f5afc7c25ce0e6_669_boot) HXDLIN( 669) resourceName = HX_("__ASSET__:image___ASSET__flixel_flixel_ui_img_radio_dot_png",2a,28,60,f8); } }
[ "dasharseniy@gmail.com" ]
dasharseniy@gmail.com
fbc399cfa19b5c68881db54944b981cf05e95c15
7221884f323b1f4460bd6c1ae1626124264a0127
/xyzzy/src/statarea.h
1f91e47e4248ad54f49077a5218b914a56163802
[ "MIT", "MS-PL" ]
permissive
xyzzy-022/xyzzy-unicode
8333f30b7a65029e098f730d9abfd8f65093c266
46cab03de1fb939835ffbf65f335bac23514ef71
refs/heads/master
2021-01-23T18:52:28.301898
2012-03-20T00:04:48
2012-03-20T00:04:48
3,770,801
2
1
null
null
null
null
UTF-8
C++
false
false
1,303
h
#ifndef _statarea_h_ #define _statarea_h_ class status_area { enum {ST_TIME, ST_POS, ST_CODE, ST_UNICODE, ST_MAX}; HWND s_hwnd; HFONT s_hfont; int s_flags; int s_clwidth; int s_borders[3]; int s_min_ext[ST_MAX]; int s_extent[ST_MAX]; int s_order[ST_MAX]; int s_nitems; int s_dow; TCHAR *s_lbuf[ST_MAX]; TCHAR s_timeb[16]; // " XX/XX XX:XX " TCHAR s_posb[32]; // " XXXXXXXXXX:XXXXXXXXXX " TCHAR s_codeb[8]; // " XXXX " TCHAR s_unicodeb[12]; // " U+XXXX " static const TCHAR s_nil[]; static const TCHAR s_eof[]; void clear_cache (); int get_extent (const TCHAR *) const; int calc_extent (int, const TCHAR *); void set_parts () const; void update (int) const; void update_all (); int position (); int char_code (); int char_unicode (); int time (); void parse_format (const Char *, int); static lisp format_modified_p (); static int char_ext (HDC hdc, TCHAR c) { SIZE sz; GetTextExtentPoint32 (hdc, &c, 1, &sz); return sz.cx; } static int char_max_ext (HDC, TCHAR, TCHAR); public: void init (HWND); void resize (); void update (); void timer (); void reload_settings (); }; #endif /* _statarea_h_ */
[ "none@none" ]
none@none
50e13b2a50837830ce9fb366ba8d9e49362e9843
eb37be6487cb323806d2187fc45eb2a9304420ca
/count.cpp
55a072f0140b95d899e14228dd0dfa17ddcc7c1b
[]
no_license
ArturD/code
3ea8edfda4cdb6b1b7964c6af27d2e961e495256
6f070dac1319482d792de2f6b62c0efb17e5bc2a
refs/heads/master
2021-01-19T08:31:22.765973
2012-12-07T11:17:54
2012-12-07T11:17:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,392
cpp
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int maxn = 42; const int maxp = maxn*maxn/2; int DP[maxp][maxn][maxn]; int Epoch[maxp][maxn][maxn]; int C[maxn]; int C_max; int e,n; long long FACT[maxn][maxn]; long long fact(int pp, int jj) { if(FACT[pp][jj] != -1) return FACT[pp][jj]; long long ff = 1; int fdiv = 1; //for(int f=1; f<=jj; f++) ff/=f; for(int f = pp+1; f<=pp+jj; f++) { long long backup = ff; ff*=f; if(ff/f != backup) cerr << "WARN !" << ff << " " << f << " " << backup <<endl; while(fdiv <= jj && ff%fdiv == 0) { ff/=fdiv++; } if(fdiv>jj) { ff %= 1000000007; } } FACT[pp][jj] = ff; return ff; } long long get(int used, int level, int pos, int ctotal) { if(used + (n-pos)*level > n*(n-1)/2) return 0; if(Epoch[used][level][pos] == e) return DP[used][level][pos]; long long result = 0; if(used < pos*(pos-1)/2) { result = 0; } else if(pos == n) { //cerr << "C_max" << C_max << endl; if(used == n*(n-1)/2 && level > C_max) result = 1; else result = 0; } else { for(int i=level; i<n; i++) { int jump = 1; jump = max(jump, C[i]); //if(n==2) cerr << " jump" << jump << endl; for(jump; pos+jump <= n; jump++) { long long rr = get(used+jump*i, i+1, pos+jump, ctotal+C[i]); int jj = jump - C[i]; int pp = pos - ctotal; //if(n == 3) { cerr << "pos = " << pos << " jj=" << jj << " ff " << ff << endl; } result +=rr * fact(pp,jj); result %= 1000000007; } //if(n==2) cerr << " result" << result << endl; if(C[i]) break; // must use !! } } //if(n==4)cerr << used << " " << level << " " << pos << " = " << result << endl; result %= 1000000007; Epoch[used][level][pos] = e; DP[used][level][pos] = result; return result; } int main() { for(int i=0; i<maxn; i++) for(int j=0; j<maxn; j++) FACT[i][j] = -1; //cerr << fact(40,20) << endl; int t; scanf("%d", &t); for(e = 1; e<=t ;e++) { memset(C, 0, sizeof(int) * maxn); scanf("%d", &n); C_max = 0; for(int i=0; i<n; i++) { int x; scanf("%d", &x); if(x!=-1) C[x]++; C_max = max(C_max, x); } int result = get(0,0,0,0); printf("%d\n", result); } return 0; }
[ "Artur.Dwornik@gmail.com" ]
Artur.Dwornik@gmail.com
434e0ad849d7b4643ac4eab4583ab2f32c492880
baa1ae2afa8968d726f8cfd12135f8f9b691832e
/code/game-1943/src/entities/explosions/ScrapExplosion.h
41434fe4e175f5e84a7c3271d7d6e8745fa6cda1
[]
no_license
germix/germix-games
ffaf1ebb360c389463a7438ee3c6cc33b031280c
db315cd54f06a7a646bc6789b9651ef39816643d
refs/heads/master
2022-04-05T07:32:56.040835
2019-11-19T11:06:03
2019-11-19T11:06:03
222,627,542
0
0
null
null
null
null
WINDOWS-1250
C++
false
false
713
h
//////////////////////////////////////////////////////////////////////////////////////////////////// // // ScrapExplosion // // Germán Martínez // //////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef ___ScrapExplosion_h___ #define ___ScrapExplosion_h___ #include <src/entities/explosions/Explosion.h> #include <gamelib/TimeClock.h> class Sprite; class ScrapExplosion : public Explosion { TimeClock clock; double angle; // En radianes Sprite* sprite; int spriteIndex; public: ScrapExplosion(Scene* s, double x, double y, char type, double angle); ~ScrapExplosion(); public: void update(double dt); void render(Graphics* gr); }; #endif
[ "german.m7186@gmail.com" ]
german.m7186@gmail.com
a6abddbe7393330c299f2a5ffaaf90a0079a701a
30e1dc84fe8c54d26ef4a1aff000a83af6f612be
/src/external/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/ObjectLockRetention.cpp
775c8c2710a6bc7b01793cd063a6424dfcc2e001
[ "BSD-3-Clause", "JSON", "MIT", "Apache-2.0" ]
permissive
Sitispeaks/turicreate
0bda7c21ee97f5ae7dc09502f6a72abcb729536d
d42280b16cb466a608e7e723d8edfbe5977253b6
refs/heads/main
2023-05-19T17:55:21.938724
2021-06-14T17:53:17
2021-06-14T17:53:17
385,034,849
1
0
BSD-3-Clause
2021-07-11T19:23:21
2021-07-11T19:23:20
null
UTF-8
C++
false
false
2,613
cpp
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #include <aws/s3/model/ObjectLockRetention.h> #include <aws/core/utils/xml/XmlSerializer.h> #include <aws/core/utils/StringUtils.h> #include <aws/core/utils/memory/stl/AWSStringStream.h> #include <utility> using namespace Aws::Utils::Xml; using namespace Aws::Utils; namespace Aws { namespace S3 { namespace Model { ObjectLockRetention::ObjectLockRetention() : m_mode(ObjectLockRetentionMode::NOT_SET), m_modeHasBeenSet(false), m_retainUntilDateHasBeenSet(false) { } ObjectLockRetention::ObjectLockRetention(const XmlNode& xmlNode) : m_mode(ObjectLockRetentionMode::NOT_SET), m_modeHasBeenSet(false), m_retainUntilDateHasBeenSet(false) { *this = xmlNode; } ObjectLockRetention& ObjectLockRetention::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode modeNode = resultNode.FirstChild("Mode"); if(!modeNode.IsNull()) { m_mode = ObjectLockRetentionModeMapper::GetObjectLockRetentionModeForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(modeNode.GetText()).c_str()).c_str()); m_modeHasBeenSet = true; } XmlNode retainUntilDateNode = resultNode.FirstChild("RetainUntilDate"); if(!retainUntilDateNode.IsNull()) { m_retainUntilDate = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(retainUntilDateNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601); m_retainUntilDateHasBeenSet = true; } } return *this; } void ObjectLockRetention::AddToNode(XmlNode& parentNode) const { Aws::StringStream ss; if(m_modeHasBeenSet) { XmlNode modeNode = parentNode.CreateChildElement("Mode"); modeNode.SetText(ObjectLockRetentionModeMapper::GetNameForObjectLockRetentionMode(m_mode)); } if(m_retainUntilDateHasBeenSet) { XmlNode retainUntilDateNode = parentNode.CreateChildElement("RetainUntilDate"); retainUntilDateNode.SetText(m_retainUntilDate.ToGmtString(DateFormat::ISO_8601)); } } } // namespace Model } // namespace S3 } // namespace Aws
[ "noreply@github.com" ]
noreply@github.com
9dba7ba76f46ee71d9e331aaffa5ea65dbe4ee75
915be5e4a1c296d5254b8459eb32f04c527ecf18
/include/BlsSource.h
1dd2aaa878d10b8bb0c2cb7a59eddd753c460f6a
[]
no_license
alaeri/bls
7b096bfb0a952143c5a7717414e3b9b7e3f2a176
fe702e0845be2316904ff754ec61e0bdad57241c
refs/heads/master
2021-01-11T16:17:53.849750
2017-01-19T05:31:19
2017-01-19T05:31:19
80,059,358
0
0
null
2017-01-25T21:24:31
2017-01-25T21:24:31
null
UTF-8
C++
false
false
4,029
h
/* * BlsSource.h * * Created on: 2014-11-11 * Author: chenyuliang01 * * Copyright (c) 2014, chenyuliang01@baidu.com baiducam All Rights Reserved. */ #ifndef BLSSOURCE_H_ #define BLSSOURCE_H_ #include <BlsConsumer.h> #include <RtmpChunkPool.h> #include <node/uv-private/ngx-queue.h> #include <stdlib.h> #include <string> /** * 默认的source数量,表示允许同时多少个流在发布 */ #define DEFAULT_SOURCE_POOL_SIZE 3000 /** * metadata的最大长度 */ #define MAX_METADATA_BUF_LEN 3000 /** * gop中缓存的帧的最大数量 */ #define MAX_GOP_LEN 1000 /** * source表示在直播时,管理直播数据分发的中心 */ class BlsSource { public: BlsSource(uint32_t video, uint32_t audio); virtual ~BlsSource(); /** * 在source中创建一个consumer * @param consumer */ void add_consumer(bls_consumer_t *consumer); /** * 从source中删除一个consumer * @param consumer */ void delete_consumer(bls_consumer_t *consumer); /** * 处理音视频数据chunk * @param channel * @param chunk */ void on_av_chunk(rtmp_channel_t *channel, chunk_bucket_t* chunk); /** * 处理视频sh * @param channel */ void on_video_msg(rtmp_channel_t *channel); /** * 处理音频sh * @param channel */ void on_audio_msg(rtmp_channel_t *channel); /** * 处理metadata * @param channel * @param buffer metadata内容的buffer */ void on_metadata(rtmp_channel_t *channel, uint8_t *buffer = NULL); /** * 在缓存的metadata中找到absRecordTime的位置 */ void find_abs_time_in_metadata(); /** * 更新metadata buf里的absrecordtime * @param time_add 增加的时间大小 */ void update_abs_record_time(size_t time_add); /** * 删除所有相关的consumer,并且删除所有旧信息,只保留chunkid */ void clear_consumer(); /** * 判断是否有consumer * @return */ bool consumer_is_empty(); /** * 在gop中添加新的msg * @param channel */ void add_msg_to_gop(rtmp_channel_t *channel); /** * 清理gop中的数据 */ void clear_gop(); /** * 提取aac sequence header数据 * @param target 将数据拷贝到的目标地址 * @return -1表示失败, 否则返回数据大小 */ int copy_aac_sh_data(uint8_t *target); /** * 提取avc sequence header数据 * @param target 将数据拷贝到的目标地址 * @return -1表示失败, 否则返回数据大小 */ int copy_avc_sh_data(uint8_t *target); //发布的流名称 std::string stream_name; //标志是否正在发布 bool is_publishing; //source使用的音视频chunkid,不同的source使用不同的chunkid uint32_t video_chunkid; uint32_t audio_chunkid; //用于缓存metadata信息 char metadata_buf[MAX_METADATA_BUF_LEN]; size_t metadata_len; double abs_record_time; size_t time_index; private: av_buffer_t key_cache; uint32_t video_time; uint32_t audio_time; ngx_queue_t consumer_queue; }; typedef struct source_bucket_s source_bucket_t; struct source_bucket_s { BlsSource *source; ngx_queue_t queue; }; /** * 改变一个channel的chuankid * @param channel */ void change_channel_chunkid(rtmp_channel_t *channel, uint32_t new_id); /** * 初始化source pool */ void init_source_pool(); /** * 从pool中申请一个source * @return */ source_bucket_t *apply_source(); /** * 回收一个source * @param source */ void collect_source(source_bucket_t *source); /** * 申请一个用来publish的source * @param stream_name 流的名字 * @return */ source_bucket_t *get_publish_source(std::string stream_name); /** * 申请一个用来play的source * @param stream_name 流的名字 * @return */ source_bucket_t *get_play_source(std::string stream_name); #endif /* BLSSOURCE_H_ */
[ "chenyuliang01@baidu.com" ]
chenyuliang01@baidu.com
1ab7d79503e28f14a3dc50c0bd186266a1805fac
8dc84558f0058d90dfc4955e905dab1b22d12c08
/third_party/unrar/src/suballoc.cpp
f1704e23c1dd30a941d50507b9bf81ebe56b1bb3
[ "LicenseRef-scancode-unrar", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
C++
false
false
7,911
cpp
/**************************************************************************** * This file is part of PPMd project * * Written and distributed to public domain by Dmitry Shkarin 1997, * * 1999-2000 * * Contents: memory allocation routines * ****************************************************************************/ static const uint UNIT_SIZE=Max(sizeof(RARPPM_CONTEXT),sizeof(RARPPM_MEM_BLK)); static const uint FIXED_UNIT_SIZE=12; SubAllocator::SubAllocator() { Clean(); } void SubAllocator::Clean() { SubAllocatorSize=0; } inline void SubAllocator::InsertNode(void* p,int indx) { ((RAR_NODE*) p)->next=FreeList[indx].next; FreeList[indx].next=(RAR_NODE*) p; } inline void* SubAllocator::RemoveNode(int indx) { RAR_NODE* RetVal=FreeList[indx].next; FreeList[indx].next=RetVal->next; return RetVal; } inline uint SubAllocator::U2B(int NU) { // We calculate the size of units in bytes based on real UNIT_SIZE. // In original implementation it was 8*NU+4*NU. return UNIT_SIZE*NU; } // Calculate RARPPM_MEM_BLK+Items address. Real RARPPM_MEM_BLK size must be // equal to UNIT_SIZE, so we cannot just add Items to RARPPM_MEM_BLK address. inline RARPPM_MEM_BLK* SubAllocator::MBPtr(RARPPM_MEM_BLK *BasePtr,int Items) { return((RARPPM_MEM_BLK*)( ((byte *)(BasePtr))+U2B(Items) )); } inline void SubAllocator::SplitBlock(void* pv,int OldIndx,int NewIndx) { int i, UDiff=Indx2Units[OldIndx]-Indx2Units[NewIndx]; byte* p=((byte*) pv)+U2B(Indx2Units[NewIndx]); if (Indx2Units[i=Units2Indx[UDiff-1]] != UDiff) { InsertNode(p,--i); p += U2B(i=Indx2Units[i]); UDiff -= i; } InsertNode(p,Units2Indx[UDiff-1]); } void SubAllocator::StopSubAllocator() { if ( SubAllocatorSize ) { SubAllocatorSize=0; free(HeapStart); } } bool SubAllocator::StartSubAllocator(int SASize) { uint t=SASize << 20; if (SubAllocatorSize == t) return TRUE; StopSubAllocator(); // Original algorithm expects FIXED_UNIT_SIZE, but actual structure size // can be larger. So let's recalculate the allocated size and add two more // units: one as reserve for HeapEnd overflow checks and another // to provide the space to correctly align UnitsStart. uint AllocSize=t/FIXED_UNIT_SIZE*UNIT_SIZE+2*UNIT_SIZE; if ((HeapStart=(byte *)malloc(AllocSize)) == NULL) { ErrHandler.MemoryError(); return FALSE; } // HeapEnd did not present in original algorithm. We added it to control // invalid memory access attempts when processing corrupt archived data. HeapEnd=HeapStart+AllocSize-UNIT_SIZE; SubAllocatorSize=t; return TRUE; } void SubAllocator::InitSubAllocator() { int i, k; memset(FreeList,0,sizeof(FreeList)); pText=HeapStart; // Original algorithm operates with 12 byte FIXED_UNIT_SIZE, but actual // size of RARPPM_MEM_BLK and RARPPM_CONTEXT structures can exceed this value // because of alignment and larger pointer fields size. // So we define UNIT_SIZE for this larger size and adjust memory // pointers accordingly. // Size2 is (HiUnit-LoUnit) memory area size to allocate as originally // supposed by compression algorithm. It is 7/8 of total allocated size. uint Size2=FIXED_UNIT_SIZE*(SubAllocatorSize/8/FIXED_UNIT_SIZE*7); // RealSize2 is the real adjusted size of (HiUnit-LoUnit) memory taking // into account that our UNIT_SIZE can be larger than FIXED_UNIT_SIZE. uint RealSize2=Size2/FIXED_UNIT_SIZE*UNIT_SIZE; // Size1 is the size of memory area from HeapStart to FakeUnitsStart // as originally supposed by compression algorithm. This area can contain // different data types, both single symbols and structures. uint Size1=SubAllocatorSize-Size2; // Real size of this area. We correct it according to UNIT_SIZE vs // FIXED_UNIT_SIZE difference. Also we add one more UNIT_SIZE // to compensate a possible reminder from Size1/FIXED_UNIT_SIZE, // which would be lost otherwise. We add UNIT_SIZE instead of // this Size1%FIXED_UNIT_SIZE reminder, because it allows to align // UnitsStart easily and adding more than reminder is ok for algorithm. uint RealSize1=Size1/FIXED_UNIT_SIZE*UNIT_SIZE+UNIT_SIZE; // RealSize1 must be divided by UNIT_SIZE without a reminder, so UnitsStart // is aligned to UNIT_SIZE. It is important for those architectures, // where a proper memory alignment is mandatory. Since we produce RealSize1 // multiplying by UNIT_SIZE, this condition is always true. So LoUnit, // UnitsStart, HeapStart are properly aligned, LoUnit=UnitsStart=HeapStart+RealSize1; // When we reach FakeUnitsStart, we restart the model. It is where // the original algorithm expected to see UnitsStart. Real UnitsStart // can have a larger value. FakeUnitsStart=HeapStart+Size1; HiUnit=LoUnit+RealSize2; for (i=0,k=1;i < N1 ;i++,k += 1) Indx2Units[i]=k; for (k++;i < N1+N2 ;i++,k += 2) Indx2Units[i]=k; for (k++;i < N1+N2+N3 ;i++,k += 3) Indx2Units[i]=k; for (k++;i < N1+N2+N3+N4;i++,k += 4) Indx2Units[i]=k; for (GlueCount=k=i=0;k < 128;k++) { i += (Indx2Units[i] < k+1); Units2Indx[k]=i; } } inline void SubAllocator::GlueFreeBlocks() { RARPPM_MEM_BLK s0, * p, * p1; int i, k, sz; if (LoUnit != HiUnit) *LoUnit=0; for (i=0, s0.next=s0.prev=&s0;i < N_INDEXES;i++) while ( FreeList[i].next ) { p=(RARPPM_MEM_BLK*)RemoveNode(i); p->insertAt(&s0); p->Stamp=0xFFFF; p->NU=Indx2Units[i]; } for (p=s0.next;p != &s0;p=p->next) while ((p1=MBPtr(p,p->NU))->Stamp == 0xFFFF && int(p->NU)+p1->NU < 0x10000) { p1->remove(); p->NU += p1->NU; } while ((p=s0.next) != &s0) { for (p->remove(), sz=p->NU;sz > 128;sz -= 128, p=MBPtr(p,128)) InsertNode(p,N_INDEXES-1); if (Indx2Units[i=Units2Indx[sz-1]] != sz) { k=sz-Indx2Units[--i]; InsertNode(MBPtr(p,sz-k),k-1); } InsertNode(p,i); } } void* SubAllocator::AllocUnitsRare(int indx) { if ( !GlueCount ) { GlueCount = 255; GlueFreeBlocks(); if ( FreeList[indx].next ) return RemoveNode(indx); } int i=indx; do { if (++i == N_INDEXES) { GlueCount--; i=U2B(Indx2Units[indx]); int j=FIXED_UNIT_SIZE*Indx2Units[indx]; if (FakeUnitsStart - pText > j) { FakeUnitsStart -= j; UnitsStart -= i; return UnitsStart; } return NULL; } } while ( !FreeList[i].next ); void* RetVal=RemoveNode(i); SplitBlock(RetVal,i,indx); return RetVal; } inline void* SubAllocator::AllocUnits(int NU) { int indx=Units2Indx[NU-1]; if ( FreeList[indx].next ) return RemoveNode(indx); void* RetVal=LoUnit; LoUnit += U2B(Indx2Units[indx]); if (LoUnit <= HiUnit) return RetVal; LoUnit -= U2B(Indx2Units[indx]); return AllocUnitsRare(indx); } void* SubAllocator::AllocContext() { if (HiUnit != LoUnit) return (HiUnit -= UNIT_SIZE); if ( FreeList->next ) return RemoveNode(0); return AllocUnitsRare(0); } void* SubAllocator::ExpandUnits(void* OldPtr,int OldNU) { int i0=Units2Indx[OldNU-1], i1=Units2Indx[OldNU-1+1]; if (i0 == i1) return OldPtr; void* ptr=AllocUnits(OldNU+1); if ( ptr ) { memcpy(ptr,OldPtr,U2B(OldNU)); InsertNode(OldPtr,i0); } return ptr; } void* SubAllocator::ShrinkUnits(void* OldPtr,int OldNU,int NewNU) { int i0=Units2Indx[OldNU-1], i1=Units2Indx[NewNU-1]; if (i0 == i1) return OldPtr; if ( FreeList[i1].next ) { void* ptr=RemoveNode(i1); memcpy(ptr,OldPtr,U2B(NewNU)); InsertNode(OldPtr,i0); return ptr; } else { SplitBlock(OldPtr,i0,i1); return OldPtr; } } void SubAllocator::FreeUnits(void* ptr,int OldNU) { InsertNode(ptr,Units2Indx[OldNU-1]); }
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
c3a7cc62c42ca7403667ab1e1dc580aa3f1760a8
091afb7001e86146209397ea362da70ffd63a916
/inst/include/nt2/include/functions/transpose.hpp
93d685a593c2a2f836a0537a5a359c5217ab4da6
[]
no_license
RcppCore/RcppNT2
f156b58c08863243f259d1e609c9a7a8cf669990
cd7e548daa2d679b6ccebe19744b9a36f1e9139c
refs/heads/master
2021-01-10T16:15:16.861239
2016-02-02T22:18:25
2016-02-02T22:18:25
50,460,545
15
1
null
2019-11-15T22:08:50
2016-01-26T21:29:34
C++
UTF-8
C++
false
false
167
hpp
#ifndef NT2_INCLUDE_FUNCTIONS_TRANSPOSE_HPP_INCLUDED #define NT2_INCLUDE_FUNCTIONS_TRANSPOSE_HPP_INCLUDED #include <nt2/core/include/functions/transpose.hpp> #endif
[ "kevinushey@gmail.com" ]
kevinushey@gmail.com