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
4210f2e8f29f30f9b5cdd2371bab6d6865a6e9ce
b10a3a4582f532cc6c2370c24b61b2ddb909d36d
/common/src/packet_utils.cpp
08570e285381e68a62f3ca23e954a88599cc7746
[ "CC0-1.0" ]
permissive
lunarpulse/stm32template
b595f08761d09ce8204c2ad34cff7d9a5f931a11
c7a55661c21a3ea0266b1e3950c6fb5210ccff25
refs/heads/main
2023-07-03T04:45:08.170976
2021-07-22T18:08:53
2021-07-22T18:08:53
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,975
cpp
/* * Functions for working with packets */ #include "packet_utils.h" #include "basic.h" #include "software_crc.h" #include <stdio.h> // fwrite #include <string.h> // memmove #include <unistd.h> // write #ifdef HOST_APP #define println(format, ...) printf(format "\n", ##__VA_ARGS__) #else #define println(format, ...) (void)0 #endif /* * Helper-function for pre-populating some packet fields. * Sets: * - origin * - ID * - Minimum length * - Must increment after adding data to variable-length field. */ void initializePacket(Packet& packet, PacketID id) { packet.origin = PacketOrigin::Internal; packet.id = id; packet.length = packetSizeFromID(id); } // A version of initializePacket() that just sets id and length fields void setPacketIdAndLength(Packet& packet, PacketID id) { packet.id = id; packet.length = packetSizeFromID(id); } /* * Sets wrapper fields */ WrappedPacket& setPacketWrapper(WrappedPacket& wrap) { wrap.magicStart = startWord; wrap.crc = crc32(reinterpret_cast<const uint8_t*>(&wrap.packet), wrap.packet.length); return wrap; } /* * More helper functions for populating packets */ void fillFreqPacket(WrappedPacket& wrap, uint32_t seq, uint32_t node, uint32_t freq) { initializePacket(wrap.packet, PacketID::VfdSetFrequency); wrap.packet.sequenceNum = seq; wrap.packet.body.vfdSetFrequency.node = node; wrap.packet.body.vfdSetFrequency.frequency = freq; setPacketWrapper(wrap); } void fillLengthErrorPacket(WrappedPacket& wrap, uint32_t len) { initializePacket(wrap.packet, PacketID::ParsingErrorInvalidLength); wrap.packet.body.parsingError.invalidLength = len; setPacketWrapper(wrap); } void fillDropErrorPacket(WrappedPacket& wrap, uint32_t drop) { initializePacket(wrap.packet, PacketID::ParsingErrorDroppedBytes); wrap.packet.body.parsingError.droppedBytes = drop; setPacketWrapper(wrap); } // Same as memcpy, but returns length of bytes written uint32_t mymemcpy(void* dst, const void* src, uint32_t len) { memcpy(dst, src, len); return len; } // Writes the entire wrapped packet to a file. // Returns 1 if successfully written. size_t fwriteWrapped(FILE* fp, WrappedPacket& wrap) { return fwrite(&wrap, wrapperLength + wrap.packet.length, 1, fp); } // Writes the entire wrapped packet to a file. // Returns -1 for error. ssize_t writeWrapped(int fd, WrappedPacket& wrap) { return write(fd, &wrap, wrapperLength + wrap.packet.length); } // Copies the entire wrapped packet to a buffer uint32_t copyWrapped(void* buf, WrappedPacket& wrap) { return mymemcpy(buf, &wrap, wrapperLength + wrap.packet.length); } // Copies just the inner unwrapped packet to a buffer uint32_t copyInner(void* buf, WrappedPacket& wrap) { return mymemcpy(buf, &wrap.packet, wrap.packet.length); } /* * Takes a buffer and its length. * Looks for any complete packets. * Sends these complete packets to processPacket callback. * Moves remaining unprocessed bytes to beginning of buf. * Returns index of next free spot in buf, for example: * - Returns 0 if ALL bytes processed. * - Returns len if NO bytes processed. * - Returns n where n is the number of trailing bytes * (shifted to the start of the buffer) that have * not yet formed a completed Packet. * If parsing errors occur, will generate and send one or more * of the following error packets to processPacket callback. * These packets will have sequence number 0, which indicates they are * generated internally. * * Todos to think about: * Additional error packet allocated locally. * If we made a packetExtractor object, could statically allocate * the errorPacket. * Could have sequence number history too, to enable that error message. * There will likely need to be more than one of these extractors, so * can't just do non-object static. */ uint32_t PacketParser::extractPackets(void* bufArg, uint32_t len) { uint32_t offset = 0; uint32_t skippedBytes = 0; uint8_t* buf = (uint8_t*)bufArg; // Keep checking while there are still enough bytes to read while (len >= offset + minWrappedPacketLength) { // Check if this is a valid packet auto wrap = (WrappedPacket*)(buf + offset); Packet& packet = wrap->packet; // Check for start word if (wrap->magicStart != startWord) { // Mismatch, try next byte offset++; skippedBytes++; continue; } // Check if length is reasonable if (packet.length < minPacketLength || // packet.length > sizeof(Packet)) { // Report length mismatch initializePacket(errorPacket, PacketID::ParsingErrorInvalidLength); errorPacket.body.parsingError.invalidLength = packet.length; processer.processPacket(errorPacket); // Mismatch, try next byte offset++; skippedBytes++; continue; } // Check if id is reasonable if (packet.id >= PacketID::NumIDs) { // Report id mismatch initializePacket(errorPacket, PacketID::ParsingErrorInvalidID); errorPacket.body.parsingError.invalidID = static_cast<uint32_t>(packet.id); processer.processPacket(errorPacket); // Mismatch, try next byte offset++; skippedBytes++; continue; } // Check if we have enough bytes of data for this packet if (len < offset + wrapperLength + packet.length) { // This is just an informative print, rather than an error. // println("Waiting for remaining bytes of packet. Have %d, need %d.", // len, offset + wrapperLength + packet.length); // We likely have an incomplete packet. // Need more data to be sure, so done with parsing for now. // Should hopefully receive the rest of the packet on next parsing call. break; } // Check crc uint32_t calculatedCRC = crc32(reinterpret_cast<const uint8_t*>(&packet), packet.length); if (calculatedCRC != wrap->crc) { // Report crc mismatch initializePacket(errorPacket, PacketID::ParsingErrorInvalidCRC); errorPacket.body.parsingError.invalidCRC.provided = wrap->crc; errorPacket.body.parsingError.invalidCRC.calculated = calculatedCRC; processer.processPacket(errorPacket); // Mismatch, try next byte offset++; skippedBytes++; continue; } // We have a valid packet // First, report how many bytes we had to skip (if any) if (skippedBytes) { // Report skipped bytes initializePacket(errorPacket, PacketID::ParsingErrorDroppedBytes); errorPacket.body.parsingError.droppedBytes = skippedBytes; processer.processPacket(errorPacket); // Reset skipped bytes skippedBytes = 0; } // Check if sequence number is out of order if (packet.sequenceNum != lastSeqNum + 1) { // Report unexpected sequence number initializePacket(errorPacket, PacketID::ParsingErrorInvalidSequence); errorPacket.body.parsingError.invalidSequence.provided = packet.sequenceNum; errorPacket.body.parsingError.invalidSequence.expected = lastSeqNum + 1; processer.processPacket(errorPacket); } lastSeqNum = packet.sequenceNum; // Send valid packet to callback processer.processPacket(packet); // Adjust offset offset += wrapperLength + packet.length; } // Do a final reporting of skipped bytes if (skippedBytes) { // Report skipped bytes initializePacket(errorPacket, PacketID::ParsingErrorDroppedBytes); errorPacket.body.parsingError.droppedBytes = skippedBytes; processer.processPacket(errorPacket); } // Shift out any consumed bytes if (offset) { len -= offset; // Move leftover bytes to beginning of buffer memmove(buf, buf + offset, len); } // Return number of leftover bytes return len; } /* * Returns rewrapped packet with updated sequence number. * Updates internally-tracked sequence number. */ WrappedPacket& PacketSequencer::rewrap(WrappedPacket& wrap) { wrap.packet.sequenceNum = num++; return setPacketWrapper(wrap); } /* * Generates human-readable string for packets */ uint32_t snprintPacket(char* buf, uint32_t len, const Packet& packet) { uint32_t n = 0; n += snprintf(buf + n, len - n, // "Sequence %u, Origin %u %s, ID %u %s: ", packet.sequenceNum, static_cast<uint32_t>(packet.origin), packetOriginToString(packet.origin), static_cast<uint32_t>(packet.id), packetIdToString(packet.id)); switch (packet.id) { case PacketID::LogMessage: { return snprintf(buf + n, len - n, // "%s", packet.body.logMessage.msg); } case PacketID::Heartbeat: return n; case PacketID::ParsingErrorInvalidLength: { return n + snprintf(buf + n, len - n, // "%u", packet.body.parsingError.invalidLength); } case PacketID::ParsingErrorInvalidCRC: { return n + snprintf(buf + n, len - n, // "provided 0x%08X, calculated 0x%08X", packet.body.parsingError.invalidCRC.provided, packet.body.parsingError.invalidCRC.calculated); } case PacketID::ParsingErrorInvalidID: { return n + snprintf(buf + n, len - n, // "%u", packet.body.parsingError.invalidID); } case PacketID::ParsingErrorInvalidSequence: { return n + snprintf(buf + n, len - n, // "provided %u, expected %u", packet.body.parsingError.invalidSequence.provided, packet.body.parsingError.invalidSequence.expected); } case PacketID::ParsingErrorDroppedBytes: { return n + snprintf(buf + n, len - n, // "%u", packet.body.parsingError.droppedBytes); } case PacketID::WatchdogTimeout: { n += snprintf(buf + n, // min<size_t>(len - n, sizeof(WatchdogTimeout::name) + 1), "%s", packet.body.watchdogTimeout.name); return n + snprintf(buf + n, // len - n, " unresponsive for %d ticks", packet.body.watchdogTimeout.unresponsiveTicks); } case PacketID::VfdSetFrequency: { return n + snprintf(buf + n, len - n, // "node %u, frequency %u.%u Hz", packet.body.vfdSetFrequency.node, packet.body.vfdSetFrequency.frequency / 10, packet.body.vfdSetFrequency.frequency % 10); } case PacketID::VfdStatus: { // todo conversions and improve readability return n + snprintf(buf + n, len - n, // "node %u" " error 0x%04X," " state 0x%04X," " freqCmd %u.%u Hz," " freqOut %u.%u Hz," " currentOut %u A," " dcBusVoltage %u.%u V," " motorOutputVoltage %u.%u V," " rpm %u", packet.body.vfdStatus.nodeAddress, packet.body.vfdStatus.payload.error, packet.body.vfdStatus.payload.state, packet.body.vfdStatus.payload.freqCmd / 10, packet.body.vfdStatus.payload.freqCmd % 10, packet.body.vfdStatus.payload.freqOut / 10, packet.body.vfdStatus.payload.freqOut % 10, packet.body.vfdStatus.payload.currentOut, packet.body.vfdStatus.payload.dcBusVoltage / 10, packet.body.vfdStatus.payload.dcBusVoltage % 10, packet.body.vfdStatus.payload.motorOutputVoltage / 10, packet.body.vfdStatus.payload.motorOutputVoltage % 10, packet.body.vfdStatus.payload.rpm); } case PacketID::ModbusError: { n += snprintf(buf + n, // len - n, "node %u, cmd 0x%x, %s: ", packet.body.modbusError.node, (uint8_t)packet.body.modbusError.command, modbusErrorIdToString(packet.body.modbusError.id)); switch (packet.body.modbusError.id) { case ModbusErrorID::BadEchoNotEnoughBytes: case ModbusErrorID::BadResponseNotEnoughBytes: case ModbusErrorID::ExtraBytes: return n + snprintf(buf + n, // len - n, "actual %u, expected %u", packet.body.modbusError.bytes.actual, packet.body.modbusError.bytes.expected); case ModbusErrorID::ResponseException: return n + snprintf(buf + n, // len - n, "0x%x %s", (uint8_t)packet.body.modbusError.exceptionCode, exceptionCodeToString(packet.body.modbusError.exceptionCode)); case ModbusErrorID::BadEchoMismatchedContents: case ModbusErrorID::BadResponseMalformedPacket: return n; } } case PacketID::DummyPacket: { return n + snprintf(buf + n, len - n, // "%u", packet.body.dummy.outId); } // This should not be called case PacketID::NumIDs: return n; } // This is never reached return n; }
[ "noreply@github.com" ]
noreply@github.com
3f5a7d0107b1ff6630d8b9ed708d6e7df27002de
4a4fa14852862b5ccf2ae24a50c4a161ffa4e6ea
/src/page_02/task063.cpp
cb481de00ceefa88363be37baae70e812eea96e6
[ "MIT" ]
permissive
berlios/pe
0c7b103cd44c68dad2b34fb0554e4276fd49776f
5edd686481666c86a14804cfeae354a267d468be
refs/heads/master
2021-05-16T02:09:08.423620
2017-09-27T16:31:06
2017-09-27T16:31:06
16,478,206
0
0
null
null
null
null
UTF-8
C++
false
false
519
cpp
#include <gmpxx.h> #include "base/task.h" // The key observation here is that 10^n always has n+1 digits so if 9^n has // fewer than n digits then there's no solutions for a particlar n. // 9^n > 10^(n-1) <=> n < 21.854... TASK(63) { int counter = 0; for (int n = 1; n <= 21; ++n) { for (int i = 9; i > 0; --i) { mpz_class num; mpz_ui_pow_ui(num.get_mpz_t(), i, n); if (num.get_str().size() < static_cast<size_t>(n)) { break; } counter++; } } return counter; }
[ "berlios@users.noreply.github.com" ]
berlios@users.noreply.github.com
d649f2a06d09b9bd69b5eb7d7ae0490ab54154c1
600df3590cce1fe49b9a96e9ca5b5242884a2a70
/sandbox/win/src/registry_policy.h
ddea1bf5a14ea22fa090daab2b452eab4082c292
[ "BSD-3-Clause" ]
permissive
metux/chromium-suckless
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
72a05af97787001756bae2511b7985e61498c965
refs/heads/orig
2022-12-04T23:53:58.681218
2017-04-30T10:59:06
2017-04-30T23:35:58
89,884,931
5
3
BSD-3-Clause
2022-11-23T20:52:53
2017-05-01T00:09:08
null
UTF-8
C++
false
false
2,299
h
// Copyright (c) 2006-2008 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 SANDBOX_SRC_REGISTRY_POLICY_H__ #define SANDBOX_SRC_REGISTRY_POLICY_H__ #include <stdint.h> #include <string> #include "base/strings/string16.h" #include "sandbox/win/src/crosscall_server.h" #include "sandbox/win/src/nt_internals.h" #include "sandbox/win/src/policy_low_level.h" #include "sandbox/win/src/sandbox_policy.h" namespace sandbox { enum EvalResult; // This class centralizes most of the knowledge related to registry policy class RegistryPolicy { public: // Creates the required low-level policy rules to evaluate a high-level // policy rule for registry IO, in particular open or create actions. static bool GenerateRules(const wchar_t* name, TargetPolicy::Semantics semantics, LowLevelPolicy* policy); // Performs the desired policy action on a create request with an // API that is compatible with the IPC-received parameters. static bool CreateKeyAction(EvalResult eval_result, const ClientInfo& client_info, const base::string16& key, uint32_t attributes, HANDLE root_directory, uint32_t desired_access, uint32_t title_index, uint32_t create_options, HANDLE* handle, NTSTATUS* nt_status, ULONG* disposition); // Performs the desired policy action on an open request with an // API that is compatible with the IPC-received parameters. static bool OpenKeyAction(EvalResult eval_result, const ClientInfo& client_info, const base::string16& key, uint32_t attributes, HANDLE root_directory, uint32_t desired_access, HANDLE* handle, NTSTATUS* nt_status); }; } // namespace sandbox #endif // SANDBOX_SRC_REGISTRY_POLICY_H__
[ "enrico.weigelt@gr13.net" ]
enrico.weigelt@gr13.net
dee18f893637c2abe3650c7ac28f505eb3478848
3f8d751f953482a8b90b9688b3ea83f4312232ed
/Recon3dX/CameraObj.hpp
79d6751727da80ff18e9b489f9474097265a4f99
[]
no_license
unnameuestc/3D-Reconstruction
e99c2df7acb0875762aff7c5385f43669019d94b
21b58a6d0ec97c9e16746504298c51d73a5e2dea
refs/heads/master
2020-06-09T12:32:25.428780
2016-12-09T13:59:01
2016-12-09T13:59:01
76,038,566
6
0
null
null
null
null
UTF-8
C++
false
false
909
hpp
#ifndef __CAMERAOBJ_H__ #define __CAMERAOBJ_H__ #include <QObject> #include <QComboBox> #include <QLabel> #include "ImageLabel.hpp" #include "VideoInput.hpp" #include "io_util.hpp" class CameraObj : public QObject { Q_OBJECT public: explicit CameraObj(QObject *parent = 0); ~CameraObj(); int update_camera_combo(void); void init_camera_combo(void);//by zhy;list all options bool start_camera(void); void stop_camera(void); static void wait(int msecs); void setUIControls(QComboBox *combox, QLabel *label, ImageLabel *imagelabel); void saveImage(QString fileName); signals: public slots: void _on_new_camera_image(cv::Mat image); void on_camera_combo_currentIndexChanged(int index); private: QComboBox *camera_combo; QLabel *camera_resolution_label; ImageLabel *camera_image; VideoInput _video_input; }; #endif // __CAMERAOBJ_H__
[ "1213635898@qq.com" ]
1213635898@qq.com
10c5c6d2ff26f4dacf56c3dd6af2c1dca53d09e2
d4da977bb5f060d6b4edebfdf32b98ee91561b16
/Archive/Project Euler/504/A.cpp
5ff0ceba1ef0817130cad1455c24cbfedc4a14dd
[]
no_license
lychees/ACM-Training
37f9087f636d9e4eead6c82c7570e743d82cf68e
29fb126ad987c21fa204c56f41632e65151c6c23
refs/heads/master
2023-08-05T11:21:22.362564
2023-07-21T17:49:53
2023-07-21T17:49:53
42,499,880
100
22
null
null
null
null
UTF-8
C++
false
false
556
cpp
#include <lastweapon/number> using namespace lastweapon; const int N = int(1e5) + 9; bool isSquare[N]; int main() { #ifndef ONLINE_JUDGE //freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); #endif int m = 100, z = 0; FOR_1(i, 1, 100*2) isSquare[i*i] = 1; REP_1(a, m) REP_1(b, m) REP_1(c, m) REP_1(d, m) { int A = (a+c) * (b+d); int B = gcd(a, b) + gcd(b, c) + gcd(c, d) + gcd(d, a); int i = (A-B)/2 + 1; if (isSquare[i]) { ++z; } } cout << z << endl; }
[ "lychees67@gmail.com" ]
lychees67@gmail.com
ac6784a13a016cad8957bb60161242b893ba2e32
4e939cfa6a5dc2d890ea5b7763725d4a93517189
/Arrays/swapAdjacentBits.cpp
8c75053888d9a63df0f35f2bcba49c887f49ab3f
[]
no_license
roshnista/APC
75e46a079d773bb8393c90e6771761a275fed758
e13c1573bb62f884cf2ba3af3f436843a7b887bd
refs/heads/master
2020-09-15T10:45:00.522170
2019-12-05T11:12:10
2019-12-05T11:12:10
223,424,517
0
0
null
null
null
null
UTF-8
C++
false
false
192
cpp
//swap adjacent bits #include<iostream> using namespace std; int main() { int n,y,x; cin>>n; x=(n>>1)&(0b01010101); // 0x55 y=(n<<1)&(0b10101010); // 0xAA cout<< (x|y); return 0; }
[ "Roshni21cool@gmail.com" ]
Roshni21cool@gmail.com
46413a9d48f670fa909dcdf42ca2ac4d858b1c2e
ba7707734e366326a7deaed69e0d22c883f64230
/cpp-code/SKEWB-12730138-src.cpp
8c09fe35c758020a46031745f196722326eaf8ac
[]
no_license
aseemchopra25/spoj
2712ed84b860b7842b8f0ee863678ba54888eb59
3c785eb4141b35bc3ea42ffc07ff95136503a184
refs/heads/master
2023-08-13T14:07:58.461480
2021-10-18T12:26:44
2021-10-18T12:26:44
390,030,214
1
0
null
null
null
null
UTF-8
C++
false
false
499
cpp
#include<cstdio> #include<cstring> using namespace std; inline int powers(int n,int x) { int mul=1; while(x>0) { if(x%2==1)mul=((mul)*n); n=((n)*n); x/=2; } return mul; } int main() { char s[100]; int len,sum; gets(s); while(s[0]!='0') { sum=0; len=(int)strlen(s); for(int i=len-1;i>=0;i--) sum+=(powers(2,len-i)-1)*(s[i]-'0'); printf("%d\n",sum); gets(s); } return 0; }
[ "aseemchopra@protonmail.com" ]
aseemchopra@protonmail.com
80af19be60277913c0da58c40d5c2fa8bb8dccd8
ececbde36cb769a89843c8bed2a2dc549ace9337
/new/Macros/newLogLikFitter_drawchannel.h
734fa7c0ed62a3970cf8d9632b57f2a01f091af6
[]
no_license
edbird/150Nd
0121dc45fd1ff1df79b723393b49ea85114e0684
4c21f5651ac5d6a41281d6a1e089a7efa2a4fda1
refs/heads/master
2023-01-10T14:53:42.124439
2020-07-17T18:38:27
2020-07-17T18:38:27
263,668,541
0
0
null
null
null
null
UTF-8
C++
false
false
16,559
h
#ifndef NEWLOGLIKFITTER_DRAWCHANNEL_H #define NEWLOGLIKFITTER_DRAWCHANNEL_H void draw_channel(const int channel, const Double_t *const p, const double fval, const std::string& saveas_filename, const std::string& saveas_dir = ".") { THStack *stacks1D; TH1D *h_2nubb = nullptr; TH1D *h_tl208_int = nullptr; TH1D *h_bi214_int = nullptr; TH1D *h_bi207_int = nullptr; TH1D *h_internal = nullptr; TH1D *h_external = nullptr; TH1D *h_radon = nullptr; TH1D *h_neighbours = nullptr; TH1D *h_other = nullptr; TCanvas *c; TPad *p0; TPad *p1; TH1D *hRatio; TH1D *hAllMC1D; TH1D *data1D; std::cout << "debug: number of data samples: " << allDataSamples1D->GetEntries() << std::endl; std::cout << "debug: number of MC samples: " << allMCSamples1D[0]->GetEntries() << std::endl; // additional array index data1D = (TH1D*)allDataSamples1D->At(channel)->Clone(); TString channel_str; channel_str.Form("%i", channel); c = new TCanvas("c" + channel_str, "c" + channel_str); c->SetFillColor(kWhite); stacks1D = new THStack("stacks1D" + channel_str, channel_str); TH1D *tmpHist_draw1D; // TODO i should be channel here? for(int j = 0; j < allMCSamples1D[channel]->GetEntries(); j++) { TString j_str; j_str.Form("%i", j); tmpHist_draw1D = (TH1D*)allMCSamples1D[channel]->At(j)->Clone(); TString tmpName = tmpHist_draw1D->GetName(); //std::cout << "looking for " << tmpName << std::endl; int which_param = -1; bool found_param = false; // used later //double activity_scale_branching_ratio = 1.0; // get index for parameter { std::string tmp_hist_name(tmpName); auto i_start = tmp_hist_name.find('_') + 1; auto i_end = tmp_hist_name.rfind('_'); if(i_end - i_start > 0) { std::string tmp_sample_name = tmp_hist_name.substr(i_start, i_end - i_start); // set branching ratio fraction /* if(tmp_sample_name == std::string("tl208_int_rot") || tmp_sample_name == std::string("tl208_feShield") || tmp_sample_name == std::string("tl208_pmt")) { activity_scale_branching_ratio = 0.36; } */ if(MCNameToParamNumberMap.count(tmp_sample_name) > 0) { int paramNumber = MCNameToParamNumberMap.at(tmp_sample_name); // TODO: removed std::string, change tmpName type to be std::string from TString //std::cout << "paramNumber=" << paramNumber << " -> tmp_sample_name=" << tmp_sample_name << " ~> tmpName=" << tmpName << std::endl; which_param = paramNumberToMinuitParamNumberMap.at(paramNumber); found_param = true; } else { std::cout << "ERROR: could not find " << tmp_sample_name << " in MCNameToParamNumberMap" << std::endl; } } } if(found_param == true) { //std::cout << "found histogram: tmpName=" << tmpName << " which_param=" << which_param << std::endl; // scale histogram to correct size using output parameter // from fit if(which_param >= numberEnabledParams) { std::cout << "throwing exception, which_param=" << which_param << std::endl; throw std::runtime_error("which_param invalid value"); } // no error thrown, which_param is presumably the correct index //Double_t activity_scale = AdjustActs[which_param] * activity_scale_branching_ratio; Double_t activity_scale = p[which_param]; // * activity_scale_branching_ratio; // TODO: caution: changed from AdjustActs to p tmpHist_draw1D->Scale(activity_scale); if(tmpHist_draw1D->Integral() > 0) { stacks1D->Add((TH1D*)tmpHist_draw1D->Clone()); stacker_helper(tmpHist_draw1D, h_2nubb, h_tl208_int, h_bi214_int, h_bi207_int, h_internal, h_neighbours, h_radon, h_external, h_other); if(j == 0) { hAllMC1D = (TH1D*)tmpHist_draw1D->Clone("Total MC"); //hAllMC1D[i] = (TH1D*)tmpHist_drawpointer->Clone("Total MC"); } else { hAllMC1D->Add((TH1D*)tmpHist_draw1D); //hAllMC1D[i]->Add((TH1D*)tmpHist_drawpointer); } } else { //std::cout << "not adding to stack, Integral() <= 0: " << tmpHist_draw1D->GetName() << std::endl; } } else { std::cout << "error could not find histogram: tmpName=" << tmpName << std::endl; } } //stacks1D[i]->SetMaximum(350.); //stacks1D[i]->Draw("hist"); //stacks1D_2nubb[i]->SetMaximum(350.0); //stacks1D_2nubb[i]->Draw("hist"); //stacks1D_tl208_int[i]->Draw("histsame"); //stacks1D_bi214_int[i]->Draw("histsame"); //stacks1D_bi207_int[i]->Draw("histsame"); //stacks1D_internal[i]->Draw("histsame"); //stacks1D_external[i]->Draw("histsame"); //stacks1D_radon[i]->Draw("histsame"); //stacks1D_neighbours[i]->Draw("histsame"); //stacks1D_other[i]->Draw("histsame"); THStack *stacks1D_major; stacks1D_major = new THStack("stacks1D_major" + channel_str, channel_str); stacker_helper_2(stacks1D_major, h_2nubb, h_tl208_int, h_bi214_int, h_bi207_int, h_internal, h_neighbours, h_radon, h_external, h_other); double PAD_U_Y_MIN = 0.0; double PAD_U_Y_MAX = 500.0; double PAD_L_Y_MAX = 3.0; double PAD_L_Y_MIN = 0.0; if(channel == 0) { PAD_U_Y_MAX = 350.0; } else if(channel == 1) { PAD_U_Y_MAX = 1000.0; PAD_U_Y_MAX = 1200.0; } else if(channel == 2) { PAD_U_Y_MAX = 450.0; } else if(channel == 3) { PAD_U_Y_MAX = 1000.0; } else if(channel == 4) { PAD_U_Y_MAX = 400.0; } else if(channel == 5) { PAD_U_Y_MAX = 600.0; } else { PAD_U_Y_MAX = 350.0; } //stacks1D_major[i]->Draw("hist"); //stacks1D_major[i]->SetMaximum(PAD_U_Y_MAX); //stacks1D_major[i]->SetMinimum(PAD_U_Y_MIN); // stacks1D_major->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); // TODO moved // hAllMC1D->SetMaximum(PAD_U_Y_MAX); // hAllMC1D->SetMinimum(PAD_U_Y_MIN); hAllMC1D->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); // data1D->SetMaximum(PAD_U_Y_MAX); // data1D->SetMinimum(PAD_U_Y_MIN); data1D->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); hRatio = (TH1D*)data1D->Clone(); hRatio->Sumw2(); hRatio->Divide(hAllMC1D); hRatio->SetTitle(""); if(channel == 0) { hRatio->GetXaxis()->SetTitle("2e Electron Energy [MeV]"); } else if(channel == 1) { hRatio->GetXaxis()->SetTitle("Single Electron Energy [MeV]"); } else if(channel == 2) { hRatio->GetXaxis()->SetTitle("High Energy Electron [MeV]"); } else if(channel == 3) { hRatio->GetXaxis()->SetTitle("Low Energy Electron [MeV]"); } else if(channel == 4) { hRatio->GetXaxis()->SetTitle("Energy Sum [MeV]"); } else if(channel == 5) { hRatio->GetXaxis()->SetTitle("Energy Diff [MeV]"); } //hRatio[i]->SetMaximum(PAD_L_Y_MAX); //hRatio[i]->SetMinimum(PAD_L_Y_MIN); hRatio->GetYaxis()->SetRangeUser(PAD_L_Y_MIN, PAD_L_Y_MAX); hRatio->GetXaxis()->SetTickSize(0.1); //hRatio->GetXaxis()->SetTitle("Electron Energy [MeV]"); hRatio->GetXaxis()->SetTitleFont(43); hRatio->GetXaxis()->SetTitleSize(20); hRatio->GetXaxis()->SetTitleOffset(3.0); hRatio->GetYaxis()->SetTitle("data / MC"); hRatio->GetYaxis()->SetTitleFont(43); hRatio->GetYaxis()->SetTitleSize(20); hRatio->GetYaxis()->SetTitleOffset(1.0); hRatio->GetYaxis()->SetLabelFont(43); hRatio->GetYaxis()->SetLabelSize(0.0 * 31); hRatio->GetYaxis()->SetTickSize(0.0); hRatio->GetXaxis()->SetLabelFont(43); hRatio->GetXaxis()->SetLabelSize(15); // in code copying from, canvas alloc. here c->cd(); c->SetBottomMargin(0.0); p0 = new TPad("pad0", "pad0", 0.0, 0.3, 1.0, 1.0); p0->SetBottomMargin(0.0); //p0->SetGridx(1); //p0->SetGridy(1); p0->SetGrid(0, 0); p0->SetTicks(2, 2); p0->Draw(); c->cd(); p1 = new TPad("pad1", "pad1", 0.0, 0.0, 1.0, 0.3); p1->SetTopMargin(0.0); p1->SetBottomMargin(0.4); //p1->SetGridx(1); //p1->SetGridy(1); p1->SetGrid(1, 1); p1->SetTicks(2, 2); p1->Draw(); p0->cd(); // draw regular pad1 // leave alone for now // TODO: axis // copy code from other file hAllMC1D->SetTitle(""); stacks1D_major->Draw("hist"); // this didn't used to be here stacks1D_major->SetMaximum(PAD_U_Y_MAX); stacks1D_major->SetMinimum(PAD_U_Y_MIN); //stacks1D_major->Draw("hist"); // this used to be uncommented stacks1D_major->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); // this used to be commented //stacks1D_major->Draw("hist"); //p0->Update(); // stacks1D_major->SetMaximum(PAD_U_Y_MAX); // stacks1D_major->SetMinimum(PAD_U_Y_MIN); // stacks1D_major->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); stacks1D_major->SetTitle(""); stacks1D_major->GetYaxis()->SetTickSize(0.0); //stacks1D_major->GetXaxis()->SetTickSize(0.0); stacks1D_major->GetYaxis()->SetTitle("Spectrum"); stacks1D_major->GetYaxis()->SetTitleSize(20); stacks1D_major->GetYaxis()->SetTitleFont(43); stacks1D_major->GetYaxis()->SetTitleOffset(1.0); stacks1D_major->GetYaxis()->SetLabelFont(43); stacks1D_major->GetYaxis()->SetLabelSize(0.0 * 31); stacks1D_major->GetXaxis()->SetTitle(""); stacks1D_major->GetXaxis()->SetTitleSize(0); stacks1D_major->GetXaxis()->SetTitleFont(43); stacks1D_major->GetXaxis()->SetTitleOffset(1.0); stacks1D_major->GetXaxis()->SetLabelSize(0); stacks1D_major->GetXaxis()->SetLabelFont(63); hAllMC1D->SetLineWidth(2); hAllMC1D->SetLineColor(kBlack); hAllMC1D->SetFillColor(kWhite); hAllMC1D->SetFillStyle(0); //hAllMC1D->Sumw2(); //hAllMC1D->Draw("hist sames"); TString Nmc_str; Nmc_str.Form("%i", (int)hAllMC1D->Integral()); // TODO: float? hAllMC1D->SetTitle("Total MC (" + Nmc_str + ")"); hAllMC1D->Draw("hist same"); hAllMC1D->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); data1D->SetLineWidth(2); data1D->SetMarkerStyle(20); data1D->SetMarkerSize(1.0); TString Ndata_str; Ndata_str.Form("%i", (int)data1D->Integral()); // TODO: float? data1D->SetTitle("Data (" + Ndata_str + ")"); //data1D->Draw("PEsames"); data1D->Draw("PEsame"); data1D->GetYaxis()->SetRangeUser(PAD_U_Y_MIN, PAD_U_Y_MAX); double chi2; int ndf; int igood; TString chi2_str; TString ndf_str; TString fval_str; TString mychi2_str; // TODO: should chisquare value include the constraints? because at // the moment it does not // TODO: chi2 value is different from fit_2e code //double prob = data1D->Chi2TestX(hAllMC1D, chi2, ndf, igood, "UW"); //std::cout << "1: prob=" << prob << " chi2=" << chi2 << " igood=" << igood << " ndf=" << ndf << std::endl; /* double prob = data1D->Chi2TestX(hAllMC1D, chi2, ndf, igood, "UU"); std::cout << "2: prob=" << prob << " chi2=" << chi2 << " igood=" << igood << " ndf=" << ndf << std::endl; */ //prob = data1D->Chi2TestX(hAllMC1D, chi2, ndf, igood, "WU"); //std::cout << "3: prob=" << prob << " chi2=" << chi2 << " igood=" << igood << " ndf=" << ndf << std::endl; //prob = data1D->Chi2TestX(hAllMC1D, chi2, ndf, igood, "WW"); //std::cout << "4: prob=" << prob << " chi2=" << chi2 << " igood=" << igood << " ndf=" << ndf << std::endl; /* double mychi2 = 0.0; for(int i = 1; i <= data1D->GetNbinsX(); ++ i) { double content1 = data1D->GetBinContent(i); if(content1 <= 0.0) continue; double content2 = hAllMC1D->GetBinContent(i); double error1 = data1D->GetBinError(i); double error2 = hAllMC1D->GetBinError(i); //std::cout << "i=" << i << " " << content1 << " " << content2 << " " << error1 << " " << error2 << std::endl; mychi2 += std::pow((content1 - content2) / error1, 2.0); } std::cout << "mychi2=" << mychi2 << std::endl; */ // std::cout << "ROOT: chi2=" << chi2 // TODO: check if I can get fcn value from the minuit fit object /* chi2_str.Form("%4.3f", chi2); */ ndf_str.Form("%i", ndf); fval_str.Form("%4.3f", fval); /* mychi2_str.Form("%4.3f", mychi2); */ TGaxis *axis = new TGaxis(0.0, PAD_U_Y_MIN + 0.01, 0.0, PAD_U_Y_MAX, PAD_U_Y_MIN + 0.01, PAD_U_Y_MAX, 510, ""); axis->SetLabelFont(43); axis->SetLabelSize(15); axis->Draw(); TGaxis *axis2 = new TGaxis(5.0, PAD_U_Y_MIN + 0.01, 5.0, PAD_U_Y_MAX, PAD_U_Y_MIN + 0.01, PAD_U_Y_MAX, 510, "+"); axis2->SetLabelFont(43); axis2->SetLabelSize(0); axis2->Draw(); TLegend *leg = new TLegend(0.6, 0.1, 0.85, 0.85); leg->AddEntry(data1D, "Data (" + Ndata_str + ")", "PE"); leg->AddEntry(hAllMC1D, "Total MC (" + Nmc_str + ")", "L"); leg->AddEntry(h_2nubb, "2#nu#beta#beta", "F"); leg->AddEntry(h_tl208_int, "^{208}Tl Int", "F"); leg->AddEntry(h_bi214_int, "^{214}Bi Int", "F"); leg->AddEntry(h_bi207_int, "^{207}Bi Int", "F"); leg->AddEntry(h_internal, "Internal", "F"); leg->AddEntry(h_neighbours, "Neighbour Foil", "F"); leg->AddEntry(h_radon, "Radon", "F"); leg->AddEntry(h_external, "External", "F"); //leg->AddEntry((TObject*)nullptr, "#chi^{2}/ndf=" + chi2_str + "/" + ndf_str, ""); //leg->AddEntry((TObject*)nullptr, "fval #chi^{2}/ndf=" + fval_str + "/" + ndf_str, ""); leg->AddEntry((TObject*)nullptr, "#chi^{2}/ndf=" + fval_str + "/" + ndf_str, ""); //leg->AddEntry((TObject*)nullptr, "my #chi^{2}/ndf=" + mychi2_str + "/" + ndf_str, ""); //leg->AddEntry(h_other, "other", "f"); leg->SetBorderSize(0); leg->SetFillColor(0); //leg->SetTextFont(62); leg->SetTextFont(63); //leg->SetTextSize(0.035); leg->SetTextSize(15); leg->SetShadowColor(kGray + 2); leg->SetBorderSize(5); leg->Draw("BR"); //TLatex latexlabel; //latexlabel.SetNDC(); //latexlabel.SetTextFont(62); //latexlabel.SetTextSize(0.035); //latexlabel.DrawLatex(0.63, 0.23, "#frac{#chi^{2}}{ndf} = #frac{" + chi2_str + "}{" + ndf_str + "}"); // second pad p1->cd(); hRatio->SetMarkerStyle(20); hRatio->SetMarkerSize(1.0); hRatio->Draw("EP"); TGaxis *axis3 = new TGaxis(0.0, PAD_L_Y_MIN, 0.0, PAD_L_Y_MAX - 0.0001, PAD_L_Y_MIN, PAD_L_Y_MAX - 0.0001, 503, ""); axis3->SetLabelFont(43); axis3->SetLabelSize(15); axis3->Draw(); TGaxis *axis4 = new TGaxis(5.0, PAD_L_Y_MIN, 5.0, PAD_L_Y_MAX - 0.0001, PAD_L_Y_MIN, PAD_L_Y_MAX - 0.0001, 503, "+"); axis4->SetLabelFont(43); axis4->SetLabelSize(0); axis4->Draw(); c->Show(); if(saveas_filename != "NOSAVE") { std::string base_name; std::string extension; filename_split_extension(saveas_filename, base_name, extension); //std::string dir = base_name + "_c" + "_" + std::string(channel_str); std::string dir = saveas_dir; std::string name = base_name + "_c" + "_" + std::string(channel_str) + extension; canvas_saveas_helper(dir, name, c); } } #endif //NEWLOGLIKFITTER_DRAWCHANNEL_H
[ "edward.birdsall@postgraduade.manchester.ac.uk" ]
edward.birdsall@postgraduade.manchester.ac.uk
4201229ce8bc40d3b23b15b26908ede2a1a6e747
b898bf5c6bfc92a652fae3f4174f7326554767fa
/solvers/mosek_solver_common.cc
e0f2c054fa733db2593507db916b3b75eb8fe191
[ "BSD-3-Clause" ]
permissive
rcory/drake
98ee71c89431b50cc405c2504a08e39637fe78b4
d6537f094d1141dd84d5f2dbb5bafa4042797fa9
refs/heads/master
2023-06-08T09:00:01.526990
2018-02-22T15:27:31
2018-02-22T15:27:31
88,185,612
1
0
NOASSERTION
2020-04-30T21:53:10
2017-04-13T16:36:33
C++
UTF-8
C++
false
false
429
cc
/* clang-format off to disable clang-format-includes */ #include "drake/solvers/mosek_solver.h" /* clang-format on */ #include "drake/common/never_destroyed.h" namespace drake { namespace solvers { SolverId MosekSolver::solver_id() const { return id(); } SolverId MosekSolver::id() { static const never_destroyed<SolverId> singleton{"Mosek"}; return singleton.access(); } } // namespace solvers } // namespace drake
[ "jeremy.nimmer@tri.global" ]
jeremy.nimmer@tri.global
0a9e00367e5cae4d3acd519349ed356164cb00f9
eb8d36a89dbaeffeedd8584d970aa2b33a8b2c6e
/CQ-0058/variance/variance.cpp
bd5be49406ae83dbfe314f0d6ca0763409ba75bf
[]
no_license
mcfx0/CQ-NOIP-2021
fe3f3a88c8b0cd594eb05b0ea71bfa2505818919
774d04aab2955fc4d8e833deabe43e91b79632c2
refs/heads/main
2023-09-05T12:41:42.711401
2021-11-20T08:59:40
2021-11-20T08:59:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,488
cpp
#include<bits/stdc++.h> #define ll long long #define getchar gc using namespace std; const int Mxdt=1e5; inline char gc() { static char buf[Mxdt+5],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1,Mxdt,stdin),p1==p2)?EOF:*p1++; } inline int Rd() { int s=0; char fl=0,c=getchar(); while(c<'0'||c>'9') fl|=(c=='-'),c=getchar(); while(c>='0'&&c<='9') s=(s<<3)+(s<<1)+(c^48),c=getchar(); return fl?-s:s; } const int N=1e4+5,M=605; int n,mx,a[N],c[N],lbot[M],rbot[M]; inline ll Getans() { int val=a[1]; ll sum1=a[1],sum2=1ll*a[1]*a[1]; // b[1]=a[1]; int num=1; for(int i=mx; ~i; --i) { for(int j=1; j<=lbot[i]; ++j) { val+=i;// b[++num]=val; sum1+=val; sum2+=1ll*val*val; } } for(int i=0; i<=mx; ++i) { for(int j=1; j<=rbot[i]; ++j) { val+=i;// b[++num]=val; sum1+=val; sum2+=1ll*val*val; } } // int ave=0; ll sum=0; // for(int i=1; i<=n; ++i) ave+=b[i]; // for(int i=1; i<=n; ++i) sum+=(1ll*n*b[i]-ave)*(1ll*n*b[i]-ave); // sum/=n; // return sum; // puts(""); // cout<<sum1<<' '<<sum2<<'\n'; return sum2*n-sum1*sum1; } int main() { // system("fc variance.out variance3.ans"); freopen("variance.in","r",stdin); freopen("variance.out","w",stdout); n=Rd(); for(int i=1; i<=n; ++i) a[i]=Rd(); mx=a[n]-a[1]; for(int i=1; i<n; ++i) c[i]=a[i+1]-a[i],++rbot[c[i]];//,cout<<c[i]<<' '; puts(""); ll ans=Getans(); for(int mid=1; mid<n; ++mid) { --rbot[c[mid]],++lbot[c[mid]]; ans=min(ans,Getans()); } printf("%lld\n",ans); return 0; }
[ "3286767741@qq.com" ]
3286767741@qq.com
686e5ef21ffe345a91d09a093a73559a922f4ccb
3b6c5f141780319f4b635c81e3b35c926343444a
/tree_pruning.cpp
c3f69b401d315ac4d7cf7e4bc889c54d8d9df305
[]
no_license
hiteshkansal/MiscProgram
eabc0db185462fef8edfba763eb87267ff0aa689
6b4dc3b8598eab95f08cafbbaf93a65ebfbe1713
refs/heads/master
2021-01-21T20:38:51.631888
2017-05-24T07:58:03
2017-05-24T07:58:03
92,263,943
0
0
null
null
null
null
UTF-8
C++
false
false
1,739
cpp
#include<iostream> #include<stdlib.h> using namespace std; typedef struct Node { int data; struct Node *left, *right; }node; // A utility function to create a new Binary Tree node with given data struct Node* newNode(int data) { struct Node* node = (struct Node*) malloc(sizeof(struct Node)); node->data = data; node->left = node->right = NULL; return node; } // print the tree in LVR (Inorder traversal) way. void print(struct Node *root) { if (root != NULL) { print(root->left); printf("%d ",root->data); print(root->right); } } int prune(node **root,int k, int sum) { if(!(*root) && sum>=k) return 1; if(!(*root)) return 0; int l,r; sum+=(*root)->data; l = prune(&(*root)->left,k,sum); r = prune(&(*root)->right,k,sum); if(!l && !r) { free(*root); *root = NULL; } return (l||r); } int main() { int k = 45; struct Node *root = newNode(1); root->left = newNode(2); root->right = newNode(3); root->left->left = newNode(4); root->left->right = newNode(5); root->right->left = newNode(6); root->right->right = newNode(7); root->left->left->left = newNode(8); root->left->left->right = newNode(9); root->left->right->left = newNode(12); root->right->right->left = newNode(10); root->right->right->left->right = newNode(11); root->left->left->right->left = newNode(13); root->left->left->right->right = newNode(14); root->left->left->right->right->left = newNode(15); printf("Tree before truncation\n"); print(root); prune(&root, k,0); // k is 45 printf("\n\nTree after truncation\n"); print(root); return 0; }
[ "hiteshkansal@outlook.com" ]
hiteshkansal@outlook.com
913e69e7c8ed6e8b6a25df38938fb6bf0d760b10
0402d64fa06062658b03ffebd709c5f60ef61962
/src/test/test_bitcoin.cpp
86527d3abc8780ea0f6426adf685c0bc91efc93f
[ "MIT" ]
permissive
Humaway/bencoin
d414e9173e9b634953664ae721a91f7cf69bc115
e39e7b6e378c7fed3b1d5afc138f535c64555588
refs/heads/main
2023-04-24T17:12:26.773950
2021-05-12T14:07:33
2021-05-12T14:07:33
366,708,500
0
0
null
null
null
null
UTF-8
C++
false
false
1,751
cpp
#define BOOST_TEST_MODULE Bencoin Test Suite #include <boost/test/unit_test.hpp> #include <boost/filesystem.hpp> #include "db.h" #include "txdb.h" #include "main.h" #include "wallet.h" #include "util.h" CWallet* pwalletMain; CClientUIInterface uiInterface; extern bool fPrintToConsole; extern void noui_connect(); struct TestingSetup { CCoinsViewDB *pcoinsdbview; boost::filesystem::path pathTemp; boost::thread_group threadGroup; TestingSetup() { fPrintToDebugger = true; // don't want to write to debug.log file noui_connect(); bitdb.MakeMock(); pathTemp = GetTempPath() / strprintf("test_bencoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000))); boost::filesystem::create_directories(pathTemp); mapArgs["-datadir"] = pathTemp.string(); pblocktree = new CBlockTreeDB(1 << 20, true); pcoinsdbview = new CCoinsViewDB(1 << 23, true); pcoinsTip = new CCoinsViewCache(*pcoinsdbview); InitBlockIndex(); bool fFirstRun; pwalletMain = new CWallet("wallet.dat"); pwalletMain->LoadWallet(fFirstRun); RegisterWallet(pwalletMain); nScriptCheckThreads = 3; for (int i=0; i < nScriptCheckThreads-1; i++) threadGroup.create_thread(&ThreadScriptCheck); } ~TestingSetup() { threadGroup.interrupt_all(); threadGroup.join_all(); delete pwalletMain; pwalletMain = NULL; delete pcoinsTip; delete pcoinsdbview; delete pblocktree; bitdb.Flush(true); boost::filesystem::remove_all(pathTemp); } }; BOOST_GLOBAL_FIXTURE(TestingSetup); void Shutdown(void* parg) { exit(0); } void StartShutdown() { exit(0); }
[ "69836238+Humaway@users.noreply.github.com" ]
69836238+Humaway@users.noreply.github.com
36563fd2c36276f3a13ca3e924f803face230b23
c51febc209233a9160f41913d895415704d2391f
/library/ATF/CGopherLocator.hpp
4e276805341674ecaf7a397fc95df6e2bff636ae
[ "MIT" ]
permissive
roussukke/Yorozuya
81f81e5e759ecae02c793e65d6c3acc504091bc3
d9a44592b0714da1aebf492b64fdcb3fa072afe5
refs/heads/master
2023-07-08T03:23:00.584855
2023-06-29T08:20:25
2023-06-29T08:20:25
463,330,454
0
0
MIT
2022-02-24T23:15:01
2022-02-24T23:15:00
null
UTF-8
C++
false
false
418
hpp
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> #include <ATL__CStringT.hpp> #include <CObject.hpp> START_ATF_NAMESPACE #pragma pack(push, 8) struct CGopherLocator : CObject { ATL::CStringT<char> m_Locator; unsigned int m_dwBufferLength; }; #pragma pack(pop) END_ATF_NAMESPACE
[ "b1ll.cipher@yandex.ru" ]
b1ll.cipher@yandex.ru
056ca77cc9184348bce278e0b2ebda12866e9765
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_1482494_1/C++/chasingdream/Untitled1.cpp
6fcd6c0db451c15866846d09ac52c7119d5ae539
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
1,660
cpp
#include<iostream> #include<string.h> using namespace std; int A[1000+10]; int B[1000+10]; int flag[1000+10]; int main() { int t; cin>>t; freopen("n.txt","w",stdout); for(int ca=1;ca<=t;ca++) { int n; cin>>n; for(int i=0;i<n;i++) { scanf("%d%d",&A[i],&B[i]); } memset(flag,0,sizeof(flag)); int sum=0; int atp=0; int star=0; while(sum<n) { atp++; int ff=0; for(int i=0;i<n;i++) { if(star>=B[i]) { if(flag[i]==0) { ff=1,star+=2; flag[i]=2; sum++; break; } else if(flag[i]==1) { ff=1,star++; flag[i]=2; sum++; break; } } } if(ff==1) continue; int hehe=-1,gai; for(int i=0;i<n;i++) { if(flag[i]==0&&star>=A[i]) { ff=1; if(B[i]>hehe) hehe=B[i],gai=i; //break; } } if(ff==0) break; flag[gai]++; star++; } if(sum<n) printf("Case #%d: Too Bad\n",ca); else printf("Case #%d: %d\n",ca,atp); } return 0; }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
e4e2ee16b87f74c4fc565e795daf74ebf0f923b7
391d6ed3ce2f2cdf644ac27a6ced0ce61282a536
/test_2019_12_31/test_2019_12_31/test.cpp
f6486bb0b32c25c6e1510fb7ba1120c1ee3b55fe
[]
no_license
wangbiy/C-3
08de4ab948659eab2b8c60097a4a95f432f67478
2e3436b24ca7ff0095ad05444cd5e643e8f478fa
refs/heads/master
2020-08-30T19:59:19.363306
2020-01-04T12:38:23
2020-01-04T12:38:23
218,474,562
0
0
null
null
null
null
GB18030
C++
false
false
2,014
cpp
#include <iostream> using namespace std; #include <vector> //求左上角到右下角的路径总数 int uniquePaths(int m, int n) { if (m<1 || n<1) return 0; vector<vector<int>> arr(m, vector<int>(n, 1)); for (int i = 1; i<m; ++i) { for (int j = 1; j<n; ++j) { arr[i][j] = arr[i][j - 1] + arr[i - 1][j]; } } return arr[m - 1][n - 1]; } //加上障碍 int uniquePathsWithObstacles(vector<vector<int> > &obstacleGrid) { if (obstacleGrid.empty() || obstacleGrid[0].empty()) return 0; int row = obstacleGrid.size(); int col = obstacleGrid[0].size(); vector<vector<int>> ret(row, vector<int>(col, 0)); for (int i = 0; i<row; ++i)//考虑第一列的情况 { if (obstacleGrid[i][0] == 1) break; else ret[i][0] = 1; } for (int i = 0; i<col; ++i)//考虑第一行的情况 { if (obstacleGrid[0][i] == 1) break; else ret[0][i] = 1; } for (int i = 1; i<row; ++i) { for (int j = 1; j<col; ++j) { if (obstacleGrid[i][j] == 1) ret[i][j] = 0; else ret[i][j] = ret[i][j - 1] + ret[i - 1][j]; } } return ret[row - 1][col - 1]; } //最短路径 #include <functional> #define min(x,y) x<y ? x:y int minPathSum(vector<vector<int> > &grid) { if (grid.empty() || grid[0].empty()) return 0; int m = grid.size(); int n = grid[0].size(); vector<vector<int>> ret(m, vector<int>(n, 0)); ret[0][0] = grid[0][0]; for (int i = 1; i<m; ++i)//第一列 { ret[i][0] = ret[i - 1][0] + grid[i][0]; } for (int i = 1; i<n; ++i) { ret[0][i] = ret[0][i - 1] + grid[0][i]; } for (int i = 1; i<m; ++i) { for (int j = 1; j<n; ++j) { ret[i][j] = min(ret[i - 1][j], ret[i][j - 1]) + grid[i][j]; } } return ret[m - 1][n - 1]; } int main() { int m = 10; int n = 10; int ret = uniquePaths(m, n); cout << ret << endl; vector<vector<int>> arr(m, vector<int>(n, 0)); ret = uniquePathsWithObstacles(arr); cout << ret << endl; vector<vector<int>> grid{{ 1, 4, 5 }, { 2, 7, 8 }, { 3, 9, 0 }}; ret = minPathSum(grid); cout << ret << endl; return 0; }
[ "2487036948@qq.com" ]
2487036948@qq.com
d2f450e45eddbc4e61302ad01429143c3ed16de3
0c8c8564d44def3b09aba82b9c6cdc469dae018b
/a1.cpp
afa381632dadffc269188426f69e7e9ea095397b
[]
no_license
odd-incubus/tic-tac-toe
c9b656b6447618495c2814698f82321d8e8d8138
1f13e34c1d09ebdda5131375b24b82542366242d
refs/heads/master
2023-02-01T15:31:30.135229
2020-12-21T20:15:39
2020-12-21T20:15:39
323,439,189
0
0
null
null
null
null
UTF-8
C++
false
false
5,401
cpp
#include<iostream> using namespace std; int main() { int arr[3][3], i, j, k=1,p,q=1, a=1; for(i=0; i<3; i++) { for(j=0; j<3; j++) { arr[i][j]=0; } } // cout<<"---------------"<<"\n"; // for(i=0;i<=2;i++) // { // for(j=0; j<=2; j++) // { // if(arr[i][j]%3==0) // { // cout<<"| |"<<"\n"; // cout<<"---------------"<<"\n"; // } // else // { // cout<<"| |"; // } // } // } while(q<=9) { cin>>p; a=1; // update the matrix for(i=0;i<3;i++) { for(j=0; j<3; j++) { if(a == p ) { if(arr[i][j]==0) { if(q%2!=0) { arr[i][j] = 1; } else { arr[i][j] = 2; } } else { cout<<"\nTry another place.\n"; cin>>p; --q; } } a++; } } // print the matrix for(i=0;i<3;i++) { for(j=0; j<3; j++) { cout<<" "<<arr[i][j]<<" "; } cout<<"\n"; } if(i==j) { if(( i && j) == 1) { if( ((arr[1][1] == arr[2][2]) && (arr[1][1] == arr[0][0])) || ((arr[1][1] == arr[0][2]) && (arr[1][1] == arr[2][0])) && (arr[1][1] !=0 )) { if(arr[1][1]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[1][1]==2) { cout<<"\nPlayer two wins\n"; break; } } else if( ((arr[1][1] == arr[2][2]) && (arr[1][1] == arr[0][0])) || ((arr[1][1] == arr[0][2]) && (arr[1][1] == arr[2][0])) && (arr[1][1] !=0 )) { if(arr[1][1]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[1][1]==2) { cout<<"\nPlayer two wins\n"; break; } } else if( ((arr[i][j] == arr[i+1][j]) && (arr[i][j] == arr[i-1][j])) || ((arr[i][j] == arr[i][j-1]) && (arr[i][j] == arr[i][j+1])) && (arr[i][j] !=0 )) { if(arr[1][1]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[1][1]==2) { cout<<"\nPlayer two wins\n"; break; } } } else if((i && j) == 0 && arr[i][j] != 0) { if((arr[i+1][j] == arr[i][j]) && (arr[i+2][j] == arr[i][j]) ) { if(arr[i][j]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[i][j]==2) { cout<<"\nPlayer two wins\n"; break; } } else if((arr[i][j+1] == arr[i][j]) && (arr[i][j+2] == arr[i][j])) { if(arr[i][j]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[i][j]==2) { cout<<"\nPlayer two wins\n"; break; } } } else if((i && j) == 2 ) { if((arr[i-1][j] == arr[i][j]) && (arr[i-2][j] == arr[i][j])) { if(arr[i][j]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[i][j]==2) { cout<<"\nPlayer two wins\n"; break; } } else if((arr[i][j-1] == arr[i][j]) && (arr[i][j-2] == arr[i][j])) { if(arr[i][j]==1) { cout<<"\nPlayer one wins\n"; break; } else if(arr[i][j]==2) { cout<<"\nPlayer two wins\n"; break; } } } } else if(q==9) { cout<<"\nIt's a DRAW!\n"; break; } q++; } }
[ "aanjaneygupta19@gmail.com" ]
aanjaneygupta19@gmail.com
1fc7d6db5124d76a8c92d1737b9bc056d3950109
77da1658633275d77b36455d7ec9b7a139c4e82e
/src/hello.cpp
ce295a9f2a2ded84f8b3fdd2ebbc3df6abbd7ac0
[]
no_license
bsnacks000/helloboiler
ec28976e7c85c673c150d08613ff57da03c3db74
55ea61f08be4f3714d95e48031c866b4104ce649
refs/heads/master
2020-08-24T10:24:23.033158
2019-10-22T12:50:40
2019-10-22T12:50:40
216,810,097
0
0
null
null
null
null
UTF-8
C++
false
false
129
cpp
#include "helloboiler/hello.hpp" #include <string> std::string Hello::say_hello(){ std::string s = "oh hai"; return s; }
[ "bsnacks000@gmail.com" ]
bsnacks000@gmail.com
8c372cb6d353fa47ea255dfa43156d6b90ce7464
136b2710349523800dc553e7fe315277e3beb602
/Projects/Engine/src/Utils/Imgui/imgui_demo.cpp
6124ce70f031234e18cf8d5fc523c37cf20bc1f8
[]
no_license
jonathan2222/VulkanEngine
f5f16daaed2f37f0c78447314c68318da61dd61c
2c3650682ad6c014bc9d560681f33daf251435d1
refs/heads/master
2023-08-28T02:44:01.624870
2021-10-05T14:17:06
2021-10-05T14:17:06
235,889,779
0
0
null
null
null
null
UTF-8
C++
false
false
274,586
cpp
// dear imgui, v1.79 WIP // (demo code) #include "stdafx.h" // Help: // - Read FAQ at http://dearimgui.org/faq // - Newcomers, read 'Programmer guide' in imgui.cpp for notes on how to setup Dear ImGui in your codebase. // - Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp. All applications in examples/ are doing that. // Read imgui.cpp for more details, documentation and comments. // Get latest version at https://github.com/ocornut/imgui // Message to the person tempted to delete this file when integrating Dear ImGui into their code base: // Do NOT remove this file from your project! Think again! It is the most useful reference code that you and other // coders will want to refer to and call. Have the ImGui::ShowDemoWindow() function wired in an always-available // debug menu of your game/app! Removing this file from your project is hindering access to documentation for everyone // in your team, likely leading you to poorer usage of the library. // Everything in this file will be stripped out by the linker if you don't call ImGui::ShowDemoWindow(). // If you want to link core Dear ImGui in your shipped builds but want a thorough guarantee that the demo will not be // linked, you can setup your imconfig.h with #define IMGUI_DISABLE_DEMO_WINDOWS and those functions will be empty. // In other situation, whenever you have Dear ImGui available you probably want this to be available for reference. // Thank you, // -Your beloved friend, imgui_demo.cpp (which you won't delete) // Message to beginner C/C++ programmers about the meaning of the 'static' keyword: // In this demo code, we frequently we use 'static' variables inside functions. A static variable persist across calls, // so it is essentially like a global variable but declared inside the scope of the function. We do this as a way to // gather code and data in the same place, to make the demo source code faster to read, faster to write, and smaller // in size. It also happens to be a convenient way of storing simple UI related information as long as your function // doesn't need to be reentrant or used in multiple threads. This might be a pattern you will want to use in your code, // but most of the real data you would be editing is likely going to be stored outside your functions. // The Demo code in this file is designed to be easy to copy-and-paste in into your application! // Because of this: // - We never omit the ImGui:: prefix when calling functions, even though most code here is in the same namespace. // - We try to declare static variables in the local scope, as close as possible to the code using them. // - We never use any of the helpers/facilities used internally by Dear ImGui, unless available in the public API. // - We never use maths operators on ImVec2/ImVec4. For our other sources files we use them, and they are provided // by imgui_internal.h using the IMGUI_DEFINE_MATH_OPERATORS define. For your own sources file they are optional // and require you either enable those, either provide your own via IM_VEC2_CLASS_EXTRA in imconfig.h. // Because we can't assume anything about your support of maths operators, we cannot use them in imgui_demo.cpp. /* Index of this file: // [SECTION] Forward Declarations, Helpers // [SECTION] Demo Window / ShowDemoWindow() // [SECTION] About Window / ShowAboutWindow() // [SECTION] Style Editor / ShowStyleEditor() // [SECTION] Example App: Main Menu Bar / ShowExampleAppMainMenuBar() // [SECTION] Example App: Debug Console / ShowExampleAppConsole() // [SECTION] Example App: Debug Log / ShowExampleAppLog() // [SECTION] Example App: Simple Layout / ShowExampleAppLayout() // [SECTION] Example App: Property Editor / ShowExampleAppPropertyEditor() // [SECTION] Example App: Long Text / ShowExampleAppLongText() // [SECTION] Example App: Auto Resize / ShowExampleAppAutoResize() // [SECTION] Example App: Constrained Resize / ShowExampleAppConstrainedResize() // [SECTION] Example App: Simple Overlay / ShowExampleAppSimpleOverlay() // [SECTION] Example App: Manipulating Window Titles / ShowExampleAppWindowTitles() // [SECTION] Example App: Custom Rendering using ImDrawList API / ShowExampleAppCustomRendering() // [SECTION] Example App: Documents Handling / ShowExampleAppDocuments() */ #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS #endif #include "imgui.h" #ifndef IMGUI_DISABLE #include <ctype.h> // toupper #include <limits.h> // INT_MIN, INT_MAX #include <math.h> // sqrtf, powf, cosf, sinf, floorf, ceilf #include <stdio.h> // vsnprintf, sscanf, printf #include <stdlib.h> // NULL, malloc, free, atoi #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier #include <stddef.h> // intptr_t #else #include <stdint.h> // intptr_t #endif // Visual Studio warnings #ifdef _MSC_VER #pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen #endif // Clang/GCC warnings with -Weverything #if defined(__clang__) #if __has_warning("-Wunknown-warning-option") #pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx' // not all warnings are known by all Clang versions and they tend to be rename-happy.. so ignoring warnings triggers new warnings on some configuration. Great! #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' #pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast // yes, they are more terse. #pragma clang diagnostic ignored "-Wdeprecated-declarations" // warning: 'xx' is deprecated: The POSIX name for this.. // for strdup used in demo code (so user can copy & paste the code) #pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" // warning: cast to 'void *' from smaller integer type #pragma clang diagnostic ignored "-Wformat-security" // warning: format string is not a string literal #pragma clang diagnostic ignored "-Wexit-time-destructors" // warning: declaration requires an exit-time destructor // exit-time destruction order is undefined. if MemFree() leads to users code that has been disabled before exit it might cause problems. ImGui coding style welcomes static/globals. #pragma clang diagnostic ignored "-Wunused-macros" // warning: macro is not used // we define snprintf/vsnprintf on Windows so they are available, but not always used. #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" // warning: zero as null pointer constant // some standard header variations use #define NULL 0 #pragma clang diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function // using printf() is a misery with this as C++ va_arg ellipsis changes float to double. #pragma clang diagnostic ignored "-Wreserved-id-macro" // warning: macro name is a reserved identifier #pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision #elif defined(__GNUC__) #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind #pragma GCC diagnostic ignored "-Wint-to-pointer-cast" // warning: cast to pointer from integer of different size #pragma GCC diagnostic ignored "-Wformat-security" // warning: format string is not a string literal (potentially insecure) #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function #pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value #pragma GCC diagnostic ignored "-Wmisleading-indentation" // [__GNUC__ >= 6] warning: this 'if' clause does not guard this statement // GCC 6.0+ only. See #883 on GitHub. #endif // Play it nice with Windows users (Update: May 2018, Notepad now supports Unix-style carriage returns!) #ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" #endif // Helpers #if defined(_MSC_VER) && !defined(snprintf) #define snprintf _snprintf #endif #if defined(_MSC_VER) && !defined(vsnprintf) #define vsnprintf _vsnprintf #endif // Helpers macros // We normally try to not use many helpers in imgui_demo.cpp in order to make code easier to copy and paste, // but making an exception here as those are largely simplifying code... // In other imgui sources we can use nicer internal functions from imgui_internal.h (ImMin/ImMax) but not in the demo. #define IM_MIN(A, B) (((A) < (B)) ? (A) : (B)) #define IM_MAX(A, B) (((A) >= (B)) ? (A) : (B)) #define IM_CLAMP(V, MN, MX) ((V) < (MN) ? (MN) : (V) > (MX) ? (MX) : (V)) //----------------------------------------------------------------------------- // [SECTION] Forward Declarations, Helpers //----------------------------------------------------------------------------- #if !defined(IMGUI_DISABLE_DEMO_WINDOWS) // Forward Declarations static void ShowExampleAppDocuments(bool* p_open); static void ShowExampleAppMainMenuBar(); static void ShowExampleAppConsole(bool* p_open); static void ShowExampleAppLog(bool* p_open); static void ShowExampleAppLayout(bool* p_open); static void ShowExampleAppPropertyEditor(bool* p_open); static void ShowExampleAppLongText(bool* p_open); static void ShowExampleAppAutoResize(bool* p_open); static void ShowExampleAppConstrainedResize(bool* p_open); static void ShowExampleAppSimpleOverlay(bool* p_open); static void ShowExampleAppWindowTitles(bool* p_open); static void ShowExampleAppCustomRendering(bool* p_open); static void ShowExampleMenuFile(); // Helper to display a little (?) mark which shows a tooltip when hovered. // In your own code you may want to display an actual icon if you are using a merged icon fonts (see docs/FONTS.md) static void HelpMarker(const char* desc) { ImGui::TextDisabled("(?)"); if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); ImGui::TextUnformatted(desc); ImGui::PopTextWrapPos(); ImGui::EndTooltip(); } } // Helper to display basic user controls. void ImGui::ShowUserGuide() { ImGuiIO& io = ImGui::GetIO(); ImGui::BulletText("Double-click on title bar to collapse window."); ImGui::BulletText( "Click and drag on lower corner to resize window\n" "(double-click to auto fit window to its contents)."); ImGui::BulletText("CTRL+Click on a slider or drag box to input value as text."); ImGui::BulletText("TAB/SHIFT+TAB to cycle through keyboard editable fields."); if (io.FontAllowUserScaling) ImGui::BulletText("CTRL+Mouse Wheel to zoom window contents."); ImGui::BulletText("While inputing text:\n"); ImGui::Indent(); ImGui::BulletText("CTRL+Left/Right to word jump."); ImGui::BulletText("CTRL+A or double-click to select all."); ImGui::BulletText("CTRL+X/C/V to use clipboard cut/copy/paste."); ImGui::BulletText("CTRL+Z,CTRL+Y to undo/redo."); ImGui::BulletText("ESCAPE to revert."); ImGui::BulletText("You can apply arithmetic operators +,*,/ on numerical values.\nUse +- to subtract."); ImGui::Unindent(); ImGui::BulletText("With keyboard navigation enabled:"); ImGui::Indent(); ImGui::BulletText("Arrow keys to navigate."); ImGui::BulletText("Space to activate a widget."); ImGui::BulletText("Return to input text into a widget."); ImGui::BulletText("Escape to deactivate a widget, close popup, exit child window."); ImGui::BulletText("Alt to jump to the menu layer of a window."); ImGui::BulletText("CTRL+Tab to select a window."); ImGui::Unindent(); } //----------------------------------------------------------------------------- // [SECTION] Demo Window / ShowDemoWindow() //----------------------------------------------------------------------------- // - ShowDemoWindowWidgets() // - ShowDemoWindowLayout() // - ShowDemoWindowPopups() // - ShowDemoWindowColumns() // - ShowDemoWindowMisc() //----------------------------------------------------------------------------- // We split the contents of the big ShowDemoWindow() function into smaller functions // (because the link time of very large functions grow non-linearly) static void ShowDemoWindowWidgets(); static void ShowDemoWindowLayout(); static void ShowDemoWindowPopups(); static void ShowDemoWindowColumns(); static void ShowDemoWindowMisc(); // Demonstrate most Dear ImGui features (this is big function!) // You may execute this function to experiment with the UI and understand what it does. // You may then search for keywords in the code when you are interested by a specific feature. void ImGui::ShowDemoWindow(bool* p_open) { // Exceptionally add an extra assert here for people confused about initial Dear ImGui setup // Most ImGui functions would normally just crash if the context is missing. IM_ASSERT(ImGui::GetCurrentContext() != NULL && "Missing dear imgui context. Refer to examples app!"); // Examples Apps (accessible from the "Examples" menu) static bool show_app_main_menu_bar = false; static bool show_app_documents = false; static bool show_app_console = false; static bool show_app_log = false; static bool show_app_layout = false; static bool show_app_property_editor = false; static bool show_app_long_text = false; static bool show_app_auto_resize = false; static bool show_app_constrained_resize = false; static bool show_app_simple_overlay = false; static bool show_app_window_titles = false; static bool show_app_custom_rendering = false; if (show_app_main_menu_bar) ShowExampleAppMainMenuBar(); if (show_app_documents) ShowExampleAppDocuments(&show_app_documents); if (show_app_console) ShowExampleAppConsole(&show_app_console); if (show_app_log) ShowExampleAppLog(&show_app_log); if (show_app_layout) ShowExampleAppLayout(&show_app_layout); if (show_app_property_editor) ShowExampleAppPropertyEditor(&show_app_property_editor); if (show_app_long_text) ShowExampleAppLongText(&show_app_long_text); if (show_app_auto_resize) ShowExampleAppAutoResize(&show_app_auto_resize); if (show_app_constrained_resize) ShowExampleAppConstrainedResize(&show_app_constrained_resize); if (show_app_simple_overlay) ShowExampleAppSimpleOverlay(&show_app_simple_overlay); if (show_app_window_titles) ShowExampleAppWindowTitles(&show_app_window_titles); if (show_app_custom_rendering) ShowExampleAppCustomRendering(&show_app_custom_rendering); // Dear ImGui Apps (accessible from the "Tools" menu) static bool show_app_metrics = false; static bool show_app_style_editor = false; static bool show_app_about = false; if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); } if (show_app_about) { ImGui::ShowAboutWindow(&show_app_about); } if (show_app_style_editor) { ImGui::Begin("Dear ImGui Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); } // Demonstrate the various window flags. Typically you would just use the default! static bool no_titlebar = false; static bool no_scrollbar = false; static bool no_menu = false; static bool no_move = false; static bool no_resize = false; static bool no_collapse = false; static bool no_close = false; static bool no_nav = false; static bool no_background = false; static bool no_bring_to_front = false; ImGuiWindowFlags window_flags = 0; if (no_titlebar) window_flags |= ImGuiWindowFlags_NoTitleBar; if (no_scrollbar) window_flags |= ImGuiWindowFlags_NoScrollbar; if (!no_menu) window_flags |= ImGuiWindowFlags_MenuBar; if (no_move) window_flags |= ImGuiWindowFlags_NoMove; if (no_resize) window_flags |= ImGuiWindowFlags_NoResize; if (no_collapse) window_flags |= ImGuiWindowFlags_NoCollapse; if (no_nav) window_flags |= ImGuiWindowFlags_NoNav; if (no_background) window_flags |= ImGuiWindowFlags_NoBackground; if (no_bring_to_front) window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus; if (no_close) p_open = NULL; // Don't pass our bool* to Begin // We specify a default position/size in case there's no data in the .ini file. // We only do it to make the demo applications a little more welcoming, but typically this isn't required. ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); ImGui::SetNextWindowSize(ImVec2(550, 680), ImGuiCond_FirstUseEver); // Main body of the Demo window starts here. if (!ImGui::Begin("Dear ImGui Demo", p_open, window_flags)) { // Early out if the window is collapsed, as an optimization. ImGui::End(); return; } // Most "big" widgets share a common width settings by default. See 'Demo->Layout->Widgets Width' for details. // e.g. Use 2/3 of the space for widgets and 1/3 for labels (default) //ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.65f); // e.g. Leave a fixed amount of width for labels (by passing a negative value), the rest goes to widgets. ImGui::PushItemWidth(ImGui::GetFontSize() * -12); // Menu Bar if (ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("Menu")) { ShowExampleMenuFile(); ImGui::EndMenu(); } if (ImGui::BeginMenu("Examples")) { ImGui::MenuItem("Main menu bar", NULL, &show_app_main_menu_bar); ImGui::MenuItem("Console", NULL, &show_app_console); ImGui::MenuItem("Log", NULL, &show_app_log); ImGui::MenuItem("Simple layout", NULL, &show_app_layout); ImGui::MenuItem("Property editor", NULL, &show_app_property_editor); ImGui::MenuItem("Long text display", NULL, &show_app_long_text); ImGui::MenuItem("Auto-resizing window", NULL, &show_app_auto_resize); ImGui::MenuItem("Constrained-resizing window", NULL, &show_app_constrained_resize); ImGui::MenuItem("Simple overlay", NULL, &show_app_simple_overlay); ImGui::MenuItem("Manipulating window titles", NULL, &show_app_window_titles); ImGui::MenuItem("Custom rendering", NULL, &show_app_custom_rendering); ImGui::MenuItem("Documents", NULL, &show_app_documents); ImGui::EndMenu(); } if (ImGui::BeginMenu("Tools")) { ImGui::MenuItem("Metrics", NULL, &show_app_metrics); ImGui::MenuItem("Style Editor", NULL, &show_app_style_editor); ImGui::MenuItem("About Dear ImGui", NULL, &show_app_about); ImGui::EndMenu(); } ImGui::EndMenuBar(); } ImGui::Text("dear imgui says hello. (%s)", IMGUI_VERSION); ImGui::Spacing(); if (ImGui::CollapsingHeader("Help")) { ImGui::Text("ABOUT THIS DEMO:"); ImGui::BulletText("Sections below are demonstrating many aspects of the library."); ImGui::BulletText("The \"Examples\" menu above leads to more demo contents."); ImGui::BulletText("The \"Tools\" menu above gives access to: About Box, Style Editor,\n" "and Metrics (general purpose Dear ImGui debugging tool)."); ImGui::Separator(); ImGui::Text("PROGRAMMER GUIDE:"); ImGui::BulletText("See the ShowDemoWindow() code in imgui_demo.cpp. <- you are here!"); ImGui::BulletText("See comments in imgui.cpp."); ImGui::BulletText("See example applications in the examples/ folder."); ImGui::BulletText("Read the FAQ at http://www.dearimgui.org/faq/"); ImGui::BulletText("Set 'io.ConfigFlags |= NavEnableKeyboard' for keyboard controls."); ImGui::BulletText("Set 'io.ConfigFlags |= NavEnableGamepad' for gamepad controls."); ImGui::Separator(); ImGui::Text("USER GUIDE:"); ImGui::ShowUserGuide(); } if (ImGui::CollapsingHeader("Configuration")) { ImGuiIO& io = ImGui::GetIO(); if (ImGui::TreeNode("Configuration##2")) { ImGui::CheckboxFlags("io.ConfigFlags: NavEnableKeyboard", (unsigned int*)&io.ConfigFlags, ImGuiConfigFlags_NavEnableKeyboard); ImGui::CheckboxFlags("io.ConfigFlags: NavEnableGamepad", (unsigned int*)&io.ConfigFlags, ImGuiConfigFlags_NavEnableGamepad); ImGui::SameLine(); HelpMarker("Required back-end to feed in gamepad inputs in io.NavInputs[] and set io.BackendFlags |= ImGuiBackendFlags_HasGamepad.\n\nRead instructions in imgui.cpp for details."); ImGui::CheckboxFlags("io.ConfigFlags: NavEnableSetMousePos", (unsigned int*)&io.ConfigFlags, ImGuiConfigFlags_NavEnableSetMousePos); ImGui::SameLine(); HelpMarker("Instruct navigation to move the mouse cursor. See comment for ImGuiConfigFlags_NavEnableSetMousePos."); ImGui::CheckboxFlags("io.ConfigFlags: NoMouse", (unsigned int*)&io.ConfigFlags, ImGuiConfigFlags_NoMouse); // The "NoMouse" option above can get us stuck with a disable mouse! Provide an alternative way to fix it: if (io.ConfigFlags & ImGuiConfigFlags_NoMouse) { if (fmodf((float)ImGui::GetTime(), 0.40f) < 0.20f) { ImGui::SameLine(); ImGui::Text("<<PRESS SPACE TO DISABLE>>"); } if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_Space))) io.ConfigFlags &= ~ImGuiConfigFlags_NoMouse; } ImGui::CheckboxFlags("io.ConfigFlags: NoMouseCursorChange", (unsigned int*)&io.ConfigFlags, ImGuiConfigFlags_NoMouseCursorChange); ImGui::SameLine(); HelpMarker("Instruct back-end to not alter mouse cursor shape and visibility."); ImGui::Checkbox("io.ConfigInputTextCursorBlink", &io.ConfigInputTextCursorBlink); ImGui::SameLine(); HelpMarker("Set to false to disable blinking cursor, for users who consider it distracting"); ImGui::Checkbox("io.ConfigWindowsResizeFromEdges", &io.ConfigWindowsResizeFromEdges); ImGui::SameLine(); HelpMarker("Enable resizing of windows from their edges and from the lower-left corner.\nThis requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback."); ImGui::Checkbox("io.ConfigWindowsMoveFromTitleBarOnly", &io.ConfigWindowsMoveFromTitleBarOnly); ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor); ImGui::SameLine(); HelpMarker("Instruct Dear ImGui to render a mouse cursor itself. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something)."); ImGui::Text("Also see Style->Rendering for rendering options."); ImGui::TreePop(); ImGui::Separator(); } if (ImGui::TreeNode("Backend Flags")) { HelpMarker( "Those flags are set by the back-ends (imgui_impl_xxx files) to specify their capabilities.\n" "Here we expose then as read-only fields to avoid breaking interactions with your back-end."); // Make a local copy to avoid modifying actual back-end flags. ImGuiBackendFlags backend_flags = io.BackendFlags; ImGui::CheckboxFlags("io.BackendFlags: HasGamepad", (unsigned int*)&backend_flags, ImGuiBackendFlags_HasGamepad); ImGui::CheckboxFlags("io.BackendFlags: HasMouseCursors", (unsigned int*)&backend_flags, ImGuiBackendFlags_HasMouseCursors); ImGui::CheckboxFlags("io.BackendFlags: HasSetMousePos", (unsigned int*)&backend_flags, ImGuiBackendFlags_HasSetMousePos); ImGui::CheckboxFlags("io.BackendFlags: RendererHasVtxOffset", (unsigned int*)&backend_flags, ImGuiBackendFlags_RendererHasVtxOffset); ImGui::TreePop(); ImGui::Separator(); } if (ImGui::TreeNode("Style")) { HelpMarker("The same contents can be accessed in 'Tools->Style Editor' or by calling the ShowStyleEditor() function."); ImGui::ShowStyleEditor(); ImGui::TreePop(); ImGui::Separator(); } if (ImGui::TreeNode("Capture/Logging")) { HelpMarker( "The logging API redirects all text output so you can easily capture the content of " "a window or a block. Tree nodes can be automatically expanded.\n" "Try opening any of the contents below in this window and then click one of the \"Log To\" button."); ImGui::LogButtons(); HelpMarker("You can also call ImGui::LogText() to output directly to the log without a visual output."); if (ImGui::Button("Copy \"Hello, world!\" to clipboard")) { ImGui::LogToClipboard(); ImGui::LogText("Hello, world!"); ImGui::LogFinish(); } ImGui::TreePop(); } } if (ImGui::CollapsingHeader("Window options")) { ImGui::Checkbox("No titlebar", &no_titlebar); ImGui::SameLine(150); ImGui::Checkbox("No scrollbar", &no_scrollbar); ImGui::SameLine(300); ImGui::Checkbox("No menu", &no_menu); ImGui::Checkbox("No move", &no_move); ImGui::SameLine(150); ImGui::Checkbox("No resize", &no_resize); ImGui::SameLine(300); ImGui::Checkbox("No collapse", &no_collapse); ImGui::Checkbox("No close", &no_close); ImGui::SameLine(150); ImGui::Checkbox("No nav", &no_nav); ImGui::SameLine(300); ImGui::Checkbox("No background", &no_background); ImGui::Checkbox("No bring to front", &no_bring_to_front); } // All demo contents ShowDemoWindowWidgets(); ShowDemoWindowLayout(); ShowDemoWindowPopups(); ShowDemoWindowColumns(); ShowDemoWindowMisc(); // End of ShowDemoWindow() ImGui::End(); } static void ShowDemoWindowWidgets() { if (!ImGui::CollapsingHeader("Widgets")) return; if (ImGui::TreeNode("Basic")) { static int clicked = 0; if (ImGui::Button("Button")) clicked++; if (clicked & 1) { ImGui::SameLine(); ImGui::Text("Thanks for clicking me!"); } static bool check = true; ImGui::Checkbox("checkbox", &check); static int e = 0; ImGui::RadioButton("radio a", &e, 0); ImGui::SameLine(); ImGui::RadioButton("radio b", &e, 1); ImGui::SameLine(); ImGui::RadioButton("radio c", &e, 2); // Color buttons, demonstrate using PushID() to add unique identifier in the ID stack, and changing style. for (int i = 0; i < 7; i++) { if (i > 0) ImGui::SameLine(); ImGui::PushID(i); ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)ImColor::HSV(i / 7.0f, 0.6f, 0.6f)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV(i / 7.0f, 0.7f, 0.7f)); ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV(i / 7.0f, 0.8f, 0.8f)); ImGui::Button("Click"); ImGui::PopStyleColor(3); ImGui::PopID(); } // Use AlignTextToFramePadding() to align text baseline to the baseline of framed widgets elements // (otherwise a Text+SameLine+Button sequence will have the text a little too high by default!) // See 'Demo->Layout->Text Baseline Alignment' for details. ImGui::AlignTextToFramePadding(); ImGui::Text("Hold to repeat:"); ImGui::SameLine(); // Arrow buttons with Repeater static int counter = 0; float spacing = ImGui::GetStyle().ItemInnerSpacing.x; ImGui::PushButtonRepeat(true); if (ImGui::ArrowButton("##left", ImGuiDir_Left)) { counter--; } ImGui::SameLine(0.0f, spacing); if (ImGui::ArrowButton("##right", ImGuiDir_Right)) { counter++; } ImGui::PopButtonRepeat(); ImGui::SameLine(); ImGui::Text("%d", counter); ImGui::Text("Hover over me"); if (ImGui::IsItemHovered()) ImGui::SetTooltip("I am a tooltip"); ImGui::SameLine(); ImGui::Text("- or me"); if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); ImGui::Text("I am a fancy tooltip"); static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f }; ImGui::PlotLines("Curve", arr, IM_ARRAYSIZE(arr)); ImGui::EndTooltip(); } ImGui::Separator(); ImGui::LabelText("label", "Value"); { // Using the _simplified_ one-liner Combo() api here // See "Combo" section for examples of how to use the more complete BeginCombo()/EndCombo() api. const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD", "EEEE", "FFFF", "GGGG", "HHHH", "IIIIIII", "JJJJ", "KKKKKKK" }; static int item_current = 0; ImGui::Combo("combo", &item_current, items, IM_ARRAYSIZE(items)); ImGui::SameLine(); HelpMarker( "Refer to the \"Combo\" section below for an explanation of the full BeginCombo/EndCombo API, " "and demonstration of various flags.\n"); } { // To wire InputText() with std::string or any other custom string type, // see the "Text Input > Resize Callback" section of this demo, and the misc/cpp/imgui_stdlib.h file. static char str0[128] = "Hello, world!"; ImGui::InputText("input text", str0, IM_ARRAYSIZE(str0)); ImGui::SameLine(); HelpMarker( "USER:\n" "Hold SHIFT or use mouse to select text.\n" "CTRL+Left/Right to word jump.\n" "CTRL+A or double-click to select all.\n" "CTRL+X,CTRL+C,CTRL+V clipboard.\n" "CTRL+Z,CTRL+Y undo/redo.\n" "ESCAPE to revert.\n\n" "PROGRAMMER:\n" "You can use the ImGuiInputTextFlags_CallbackResize facility if you need to wire InputText() " "to a dynamic string type. See misc/cpp/imgui_stdlib.h for an example (this is not demonstrated " "in imgui_demo.cpp)."); static char str1[128] = ""; ImGui::InputTextWithHint("input text (w/ hint)", "enter text here", str1, IM_ARRAYSIZE(str1)); static int i0 = 123; ImGui::InputInt("input int", &i0); ImGui::SameLine(); HelpMarker( "You can apply arithmetic operators +,*,/ on numerical values.\n" " e.g. [ 100 ], input \'*2\', result becomes [ 200 ]\n" "Use +- to subtract."); static float f0 = 0.001f; ImGui::InputFloat("input float", &f0, 0.01f, 1.0f, "%.3f"); static double d0 = 999999.00000001; ImGui::InputDouble("input double", &d0, 0.01f, 1.0f, "%.8f"); static float f1 = 1.e10f; ImGui::InputFloat("input scientific", &f1, 0.0f, 0.0f, "%e"); ImGui::SameLine(); HelpMarker( "You can input value using the scientific notation,\n" " e.g. \"1e+8\" becomes \"100000000\"."); static float vec4a[4] = { 0.10f, 0.20f, 0.30f, 0.44f }; ImGui::InputFloat3("input float3", vec4a); } { static int i1 = 50, i2 = 42; ImGui::DragInt("drag int", &i1, 1); ImGui::SameLine(); HelpMarker( "Click and drag to edit value.\n" "Hold SHIFT/ALT for faster/slower edit.\n" "Double-click or CTRL+click to input value."); ImGui::DragInt("drag int 0..100", &i2, 1, 0, 100, "%d%%"); static float f1 = 1.00f, f2 = 0.0067f; ImGui::DragFloat("drag float", &f1, 0.005f); ImGui::DragFloat("drag small float", &f2, 0.0001f, 0.0f, 0.0f, "%.06f ns"); } { static int i1 = 0; ImGui::SliderInt("slider int", &i1, -1, 3); ImGui::SameLine(); HelpMarker("CTRL+click to input value."); static float f1 = 0.123f, f2 = 0.0f; ImGui::SliderFloat("slider float", &f1, 0.0f, 1.0f, "ratio = %.3f"); ImGui::SliderFloat("slider float (log)", &f2, -10.0f, 10.0f, "%.4f", ImGuiSliderFlags_Logarithmic); static float angle = 0.0f; ImGui::SliderAngle("slider angle", &angle); // Using the format string to display a name instead of an integer. // Here we completely omit '%d' from the format string, so it'll only display a name. // This technique can also be used with DragInt(). enum Element { Element_Fire, Element_Earth, Element_Air, Element_Water, Element_COUNT }; static int elem = Element_Fire; const char* elems_names[Element_COUNT] = { "Fire", "Earth", "Air", "Water" }; const char* elem_name = (elem >= 0 && elem < Element_COUNT) ? elems_names[elem] : "Unknown"; ImGui::SliderInt("slider enum", &elem, 0, Element_COUNT - 1, elem_name); ImGui::SameLine(); HelpMarker("Using the format string parameter to display a name instead of the underlying integer."); } { static float col1[3] = { 1.0f, 0.0f, 0.2f }; static float col2[4] = { 0.4f, 0.7f, 0.0f, 0.5f }; ImGui::ColorEdit3("color 1", col1); ImGui::SameLine(); HelpMarker( "Click on the colored square to open a color picker.\n" "Click and hold to use drag and drop.\n" "Right-click on the colored square to show options.\n" "CTRL+click on individual component to input value.\n"); ImGui::ColorEdit4("color 2", col2); } { // List box const char* items[] = { "Apple", "Banana", "Cherry", "Kiwi", "Mango", "Orange", "Pineapple", "Strawberry", "Watermelon" }; static int item_current = 1; ImGui::ListBox("listbox\n(single select)", &item_current, items, IM_ARRAYSIZE(items), 4); //static int listbox_item_current2 = 2; //ImGui::SetNextItemWidth(-1); //ImGui::ListBox("##listbox2", &listbox_item_current2, listbox_items, IM_ARRAYSIZE(listbox_items), 4); } ImGui::TreePop(); } // Testing ImGuiOnceUponAFrame helper. //static ImGuiOnceUponAFrame once; //for (int i = 0; i < 5; i++) // if (once) // ImGui::Text("This will be displayed only once."); if (ImGui::TreeNode("Trees")) { if (ImGui::TreeNode("Basic trees")) { for (int i = 0; i < 5; i++) { // Use SetNextItemOpen() so set the default state of a node to be open. We could // also use TreeNodeEx() with the ImGuiTreeNodeFlags_DefaultOpen flag to achieve the same thing! if (i == 0) ImGui::SetNextItemOpen(true, ImGuiCond_Once); if (ImGui::TreeNode((void*)(intptr_t)i, "Child %d", i)) { ImGui::Text("blah blah"); ImGui::SameLine(); if (ImGui::SmallButton("button")) {} ImGui::TreePop(); } } ImGui::TreePop(); } if (ImGui::TreeNode("Advanced, with Selectable nodes")) { HelpMarker( "This is a more typical looking tree with selectable nodes.\n" "Click to select, CTRL+Click to toggle, click on arrows or double-click to open."); static ImGuiTreeNodeFlags base_flags = ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_SpanAvailWidth; static bool align_label_with_current_x_position = false; static bool test_drag_and_drop = false; ImGui::CheckboxFlags("ImGuiTreeNodeFlags_OpenOnArrow", (unsigned int*)&base_flags, ImGuiTreeNodeFlags_OpenOnArrow); ImGui::CheckboxFlags("ImGuiTreeNodeFlags_OpenOnDoubleClick", (unsigned int*)&base_flags, ImGuiTreeNodeFlags_OpenOnDoubleClick); ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanAvailWidth", (unsigned int*)&base_flags, ImGuiTreeNodeFlags_SpanAvailWidth); ImGui::SameLine(); HelpMarker("Extend hit area to all available width instead of allowing more items to be laid out after the node."); ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanFullWidth", (unsigned int*)&base_flags, ImGuiTreeNodeFlags_SpanFullWidth); ImGui::Checkbox("Align label with current X position", &align_label_with_current_x_position); ImGui::Checkbox("Test tree node as drag source", &test_drag_and_drop); ImGui::Text("Hello!"); if (align_label_with_current_x_position) ImGui::Unindent(ImGui::GetTreeNodeToLabelSpacing()); // 'selection_mask' is dumb representation of what may be user-side selection state. // You may retain selection state inside or outside your objects in whatever format you see fit. // 'node_clicked' is temporary storage of what node we have clicked to process selection at the end /// of the loop. May be a pointer to your own node type, etc. static int selection_mask = (1 << 2); int node_clicked = -1; for (int i = 0; i < 6; i++) { // Disable the default "open on single-click behavior" + set Selected flag according to our selection. ImGuiTreeNodeFlags node_flags = base_flags; const bool is_selected = (selection_mask & (1 << i)) != 0; if (is_selected) node_flags |= ImGuiTreeNodeFlags_Selected; if (i < 3) { // Items 0..2 are Tree Node bool node_open = ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable Node %d", i); if (ImGui::IsItemClicked()) node_clicked = i; if (test_drag_and_drop && ImGui::BeginDragDropSource()) { ImGui::SetDragDropPayload("_TREENODE", NULL, 0); ImGui::Text("This is a drag and drop source"); ImGui::EndDragDropSource(); } if (node_open) { ImGui::BulletText("Blah blah\nBlah Blah"); ImGui::TreePop(); } } else { // Items 3..5 are Tree Leaves // The only reason we use TreeNode at all is to allow selection of the leaf. Otherwise we can // use BulletText() or advance the cursor by GetTreeNodeToLabelSpacing() and call Text(). node_flags |= ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen; // ImGuiTreeNodeFlags_Bullet ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable Leaf %d", i); if (ImGui::IsItemClicked()) node_clicked = i; if (test_drag_and_drop && ImGui::BeginDragDropSource()) { ImGui::SetDragDropPayload("_TREENODE", NULL, 0); ImGui::Text("This is a drag and drop source"); ImGui::EndDragDropSource(); } } } if (node_clicked != -1) { // Update selection state // (process outside of tree loop to avoid visual inconsistencies during the clicking frame) if (ImGui::GetIO().KeyCtrl) selection_mask ^= (1 << node_clicked); // CTRL+click to toggle else //if (!(selection_mask & (1 << node_clicked))) // Depending on selection behavior you want, may want to preserve selection when clicking on item that is part of the selection selection_mask = (1 << node_clicked); // Click to single-select } if (align_label_with_current_x_position) ImGui::Indent(ImGui::GetTreeNodeToLabelSpacing()); ImGui::TreePop(); } ImGui::TreePop(); } if (ImGui::TreeNode("Collapsing Headers")) { static bool closable_group = true; ImGui::Checkbox("Show 2nd header", &closable_group); if (ImGui::CollapsingHeader("Header", ImGuiTreeNodeFlags_None)) { ImGui::Text("IsItemHovered: %d", ImGui::IsItemHovered()); for (int i = 0; i < 5; i++) ImGui::Text("Some content %d", i); } if (ImGui::CollapsingHeader("Header with a close button", &closable_group)) { ImGui::Text("IsItemHovered: %d", ImGui::IsItemHovered()); for (int i = 0; i < 5; i++) ImGui::Text("More content %d", i); } /* if (ImGui::CollapsingHeader("Header with a bullet", ImGuiTreeNodeFlags_Bullet)) ImGui::Text("IsItemHovered: %d", ImGui::IsItemHovered()); */ ImGui::TreePop(); } if (ImGui::TreeNode("Bullets")) { ImGui::BulletText("Bullet point 1"); ImGui::BulletText("Bullet point 2\nOn multiple lines"); if (ImGui::TreeNode("Tree node")) { ImGui::BulletText("Another bullet point"); ImGui::TreePop(); } ImGui::Bullet(); ImGui::Text("Bullet point 3 (two calls)"); ImGui::Bullet(); ImGui::SmallButton("Button"); ImGui::TreePop(); } if (ImGui::TreeNode("Text")) { if (ImGui::TreeNode("Colored Text")) { // Using shortcut. You can use PushStyleColor()/PopStyleColor() for more flexibility. ImGui::TextColored(ImVec4(1.0f, 0.0f, 1.0f, 1.0f), "Pink"); ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "Yellow"); ImGui::TextDisabled("Disabled"); ImGui::SameLine(); HelpMarker("The TextDisabled color is stored in ImGuiStyle."); ImGui::TreePop(); } if (ImGui::TreeNode("Word Wrapping")) { // Using shortcut. You can use PushTextWrapPos()/PopTextWrapPos() for more flexibility. ImGui::TextWrapped( "This text should automatically wrap on the edge of the window. The current implementation " "for text wrapping follows simple rules suitable for English and possibly other languages."); ImGui::Spacing(); static float wrap_width = 200.0f; ImGui::SliderFloat("Wrap width", &wrap_width, -20, 600, "%.0f"); ImDrawList* draw_list = ImGui::GetWindowDrawList(); for (int n = 0; n < 2; n++) { ImGui::Text("Test paragraph %d:", n); ImVec2 pos = ImGui::GetCursorScreenPos(); ImVec2 marker_min = ImVec2(pos.x + wrap_width, pos.y); ImVec2 marker_max = ImVec2(pos.x + wrap_width + 10, pos.y + ImGui::GetTextLineHeight()); ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + wrap_width); if (n == 0) ImGui::Text("The lazy dog is a good dog. This paragraph should fit within %.0f pixels. Testing a 1 character word. The quick brown fox jumps over the lazy dog.", wrap_width); if (n == 1) ImGui::Text("aaaaaaaa bbbbbbbb, c cccccccc,dddddddd. d eeeeeeee ffffffff. gggggggg!hhhhhhhh"); // Draw actual text bounding box, following by marker of our expected limit (should not overlap!) draw_list->AddRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), IM_COL32(255, 255, 0, 255)); draw_list->AddRectFilled(marker_min, marker_max, IM_COL32(255, 0, 255, 255)); ImGui::PopTextWrapPos(); } ImGui::TreePop(); } if (ImGui::TreeNode("UTF-8 Text")) { // UTF-8 test with Japanese characters // (Needs a suitable font? Try "Google Noto" or "Arial Unicode". See docs/FONTS.md for details.) // - From C++11 you can use the u8"my text" syntax to encode literal strings as UTF-8 // - For earlier compiler, you may be able to encode your sources as UTF-8 (e.g. in Visual Studio, you // can save your source files as 'UTF-8 without signature'). // - FOR THIS DEMO FILE ONLY, BECAUSE WE WANT TO SUPPORT OLD COMPILERS, WE ARE *NOT* INCLUDING RAW UTF-8 // CHARACTERS IN THIS SOURCE FILE. Instead we are encoding a few strings with hexadecimal constants. // Don't do this in your application! Please use u8"text in any language" in your application! // Note that characters values are preserved even by InputText() if the font cannot be displayed, // so you can safely copy & paste garbled characters into another application. ImGui::TextWrapped( "CJK text will only appears if the font was loaded with the appropriate CJK character ranges. " "Call io.Font->AddFontFromFileTTF() manually to load extra character ranges. " "Read docs/FONTS.md for details."); ImGui::Text("Hiragana: \xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x93 (kakikukeko)"); // Normally we would use u8"blah blah" with the proper characters directly in the string. ImGui::Text("Kanjis: \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e (nihongo)"); static char buf[32] = "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e"; //static char buf[32] = u8"NIHONGO"; // <- this is how you would write it with C++11, using real kanjis ImGui::InputText("UTF-8 input", buf, IM_ARRAYSIZE(buf)); ImGui::TreePop(); } ImGui::TreePop(); } if (ImGui::TreeNode("Images")) { ImGuiIO& io = ImGui::GetIO(); ImGui::TextWrapped( "Below we are displaying the font texture (which is the only texture we have access to in this demo). " "Use the 'ImTextureID' type as storage to pass pointers or identifier to your own texture data. " "Hover the texture for a zoomed view!"); // Below we are displaying the font texture because it is the only texture we have access to inside the demo! // Remember that ImTextureID is just storage for whatever you want it to be. It is essentially a value that // will be passed to the rendering back-end via the ImDrawCmd structure. // If you use one of the default imgui_impl_XXXX.cpp rendering back-end, they all have comments at the top // of their respective source file to specify what they expect to be stored in ImTextureID, for example: // - The imgui_impl_dx11.cpp renderer expect a 'ID3D11ShaderResourceView*' pointer // - The imgui_impl_opengl3.cpp renderer expect a GLuint OpenGL texture identifier, etc. // More: // - If you decided that ImTextureID = MyEngineTexture*, then you can pass your MyEngineTexture* pointers // to ImGui::Image(), and gather width/height through your own functions, etc. // - You can use ShowMetricsWindow() to inspect the draw data that are being passed to your renderer, // it will help you debug issues if you are confused about it. // - Consider using the lower-level ImDrawList::AddImage() API, via ImGui::GetWindowDrawList()->AddImage(). // - Read https://github.com/ocornut/imgui/blob/master/docs/FAQ.md // - Read https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples ImTextureID my_tex_id = io.Fonts->TexID; float my_tex_w = (float)io.Fonts->TexWidth; float my_tex_h = (float)io.Fonts->TexHeight; { ImGui::Text("%.0fx%.0f", my_tex_w, my_tex_h); ImVec2 pos = ImGui::GetCursorScreenPos(); ImVec2 uv_min = ImVec2(0.0f, 0.0f); // Top-left ImVec2 uv_max = ImVec2(1.0f, 1.0f); // Lower-right ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); // No tint ImVec4 border_col = ImVec4(1.0f, 1.0f, 1.0f, 0.5f); // 50% opaque white ImGui::Image(my_tex_id, ImVec2(my_tex_w, my_tex_h), uv_min, uv_max, tint_col, border_col); if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); float region_sz = 32.0f; float region_x = io.MousePos.x - pos.x - region_sz * 0.5f; float region_y = io.MousePos.y - pos.y - region_sz * 0.5f; float zoom = 4.0f; if (region_x < 0.0f) { region_x = 0.0f; } else if (region_x > my_tex_w - region_sz) { region_x = my_tex_w - region_sz; } if (region_y < 0.0f) { region_y = 0.0f; } else if (region_y > my_tex_h - region_sz) { region_y = my_tex_h - region_sz; } ImGui::Text("Min: (%.2f, %.2f)", region_x, region_y); ImGui::Text("Max: (%.2f, %.2f)", region_x + region_sz, region_y + region_sz); ImVec2 uv0 = ImVec2((region_x) / my_tex_w, (region_y) / my_tex_h); ImVec2 uv1 = ImVec2((region_x + region_sz) / my_tex_w, (region_y + region_sz) / my_tex_h); ImGui::Image(my_tex_id, ImVec2(region_sz * zoom, region_sz * zoom), uv0, uv1, tint_col, border_col); ImGui::EndTooltip(); } } ImGui::TextWrapped("And now some textured buttons.."); static int pressed_count = 0; for (int i = 0; i < 8; i++) { ImGui::PushID(i); int frame_padding = -1 + i; // -1 == uses default padding (style.FramePadding) ImVec2 size = ImVec2(32.0f, 32.0f); // Size of the image we want to make visible ImVec2 uv0 = ImVec2(0.0f, 0.0f); // UV coordinates for lower-left ImVec2 uv1 = ImVec2(32.0f / my_tex_w, 32 / my_tex_h); // UV coordinates for (32,32) in our texture ImVec4 bg_col = ImVec4(0.0f, 0.0f, 0.0f, 1.0f); // Black background ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); // No tint if (ImGui::ImageButton(my_tex_id, size, uv0, uv1, frame_padding, bg_col, tint_col)) pressed_count += 1; ImGui::PopID(); ImGui::SameLine(); } ImGui::NewLine(); ImGui::Text("Pressed %d times.", pressed_count); ImGui::TreePop(); } if (ImGui::TreeNode("Combo")) { // Expose flags as checkbox for the demo static ImGuiComboFlags flags = 0; ImGui::CheckboxFlags("ImGuiComboFlags_PopupAlignLeft", (unsigned int*)&flags, ImGuiComboFlags_PopupAlignLeft); ImGui::SameLine(); HelpMarker("Only makes a difference if the popup is larger than the combo"); if (ImGui::CheckboxFlags("ImGuiComboFlags_NoArrowButton", (unsigned int*)&flags, ImGuiComboFlags_NoArrowButton)) flags &= ~ImGuiComboFlags_NoPreview; // Clear the other flag, as we cannot combine both if (ImGui::CheckboxFlags("ImGuiComboFlags_NoPreview", (unsigned int*)&flags, ImGuiComboFlags_NoPreview)) flags &= ~ImGuiComboFlags_NoArrowButton; // Clear the other flag, as we cannot combine both // Using the generic BeginCombo() API, you have full control over how to display the combo contents. // (your selection data could be an index, a pointer to the object, an id for the object, a flag intrusively // stored in the object itself, etc.) const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD", "EEEE", "FFFF", "GGGG", "HHHH", "IIII", "JJJJ", "KKKK", "LLLLLLL", "MMMM", "OOOOOOO" }; static int item_current_idx = 0; // Here our selection data is an index. const char* combo_label = items[item_current_idx]; // Label to preview before opening the combo (technically could be anything)( if (ImGui::BeginCombo("combo 1", combo_label, flags)) { for (int n = 0; n < IM_ARRAYSIZE(items); n++) { const bool is_selected = (item_current_idx == n); if (ImGui::Selectable(items[n], is_selected)) item_current_idx = n; // Set the initial focus when opening the combo (scrolling + keyboard navigation focus) if (is_selected) ImGui::SetItemDefaultFocus(); } ImGui::EndCombo(); } // Simplified one-liner Combo() API, using values packed in a single constant string static int item_current_2 = 0; ImGui::Combo("combo 2 (one-liner)", &item_current_2, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0"); // Simplified one-liner Combo() using an array of const char* static int item_current_3 = -1; // If the selection isn't within 0..count, Combo won't display a preview ImGui::Combo("combo 3 (array)", &item_current_3, items, IM_ARRAYSIZE(items)); // Simplified one-liner Combo() using an accessor function struct Funcs { static bool ItemGetter(void* data, int n, const char** out_str) { *out_str = ((const char**)data)[n]; return true; } }; static int item_current_4 = 0; ImGui::Combo("combo 4 (function)", &item_current_4, &Funcs::ItemGetter, items, IM_ARRAYSIZE(items)); ImGui::TreePop(); } if (ImGui::TreeNode("Selectables")) { // Selectable() has 2 overloads: // - The one taking "bool selected" as a read-only selection information. // When Selectable() has been clicked it returns true and you can alter selection state accordingly. // - The one taking "bool* p_selected" as a read-write selection information (convenient in some cases) // The earlier is more flexible, as in real application your selection may be stored in many different ways // and not necessarily inside a bool value (e.g. in flags within objects, as an external list, etc). if (ImGui::TreeNode("Basic")) { static bool selection[5] = { false, true, false, false, false }; ImGui::Selectable("1. I am selectable", &selection[0]); ImGui::Selectable("2. I am selectable", &selection[1]); ImGui::Text("3. I am not selectable"); ImGui::Selectable("4. I am selectable", &selection[3]); if (ImGui::Selectable("5. I am double clickable", selection[4], ImGuiSelectableFlags_AllowDoubleClick)) if (ImGui::IsMouseDoubleClicked(0)) selection[4] = !selection[4]; ImGui::TreePop(); } if (ImGui::TreeNode("Selection State: Single Selection")) { static int selected = -1; for (int n = 0; n < 5; n++) { char buf[32]; sprintf(buf, "Object %d", n); if (ImGui::Selectable(buf, selected == n)) selected = n; } ImGui::TreePop(); } if (ImGui::TreeNode("Selection State: Multiple Selection")) { HelpMarker("Hold CTRL and click to select multiple items."); static bool selection[5] = { false, false, false, false, false }; for (int n = 0; n < 5; n++) { char buf[32]; sprintf(buf, "Object %d", n); if (ImGui::Selectable(buf, selection[n])) { if (!ImGui::GetIO().KeyCtrl) // Clear selection when CTRL is not held memset(selection, 0, sizeof(selection)); selection[n] ^= 1; } } ImGui::TreePop(); } if (ImGui::TreeNode("Rendering more text into the same line")) { // Using the Selectable() override that takes "bool* p_selected" parameter, // this function toggle your bool value automatically. static bool selected[3] = { false, false, false }; ImGui::Selectable("main.c", &selected[0]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes"); ImGui::Selectable("Hello.cpp", &selected[1]); ImGui::SameLine(300); ImGui::Text("12,345 bytes"); ImGui::Selectable("Hello.h", &selected[2]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes"); ImGui::TreePop(); } if (ImGui::TreeNode("In columns")) { ImGui::Columns(3, NULL, false); static bool selected[16] = {}; for (int i = 0; i < 16; i++) { char label[32]; sprintf(label, "Item %d", i); if (ImGui::Selectable(label, &selected[i])) {} ImGui::NextColumn(); } ImGui::Columns(1); ImGui::TreePop(); } if (ImGui::TreeNode("Grid")) { static int selected[4 * 4] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; for (int i = 0; i < 4 * 4; i++) { ImGui::PushID(i); if (ImGui::Selectable("Sailor", selected[i] != 0, 0, ImVec2(50, 50))) { // Toggle selected[i] = !selected[i]; // Note: We _unnecessarily_ test for both x/y and i here only to silence some static analyzer. // The second part of each test is unnecessary. int x = i % 4; int y = i / 4; if (x > 0) { selected[i - 1] ^= 1; } if (x < 3 && i < 15) { selected[i + 1] ^= 1; } if (y > 0 && i > 3) { selected[i - 4] ^= 1; } if (y < 3 && i < 12) { selected[i + 4] ^= 1; } } if ((i % 4) < 3) ImGui::SameLine(); ImGui::PopID(); } ImGui::TreePop(); } if (ImGui::TreeNode("Alignment")) { HelpMarker( "By default, Selectables uses style.SelectableTextAlign but it can be overridden on a per-item " "basis using PushStyleVar(). You'll probably want to always keep your default situation to " "left-align otherwise it becomes difficult to layout multiple items on a same line"); static bool selected[3 * 3] = { true, false, true, false, true, false, true, false, true }; for (int y = 0; y < 3; y++) { for (int x = 0; x < 3; x++) { ImVec2 alignment = ImVec2((float)x / 2.0f, (float)y / 2.0f); char name[32]; sprintf(name, "(%.1f,%.1f)", alignment.x, alignment.y); if (x > 0) ImGui::SameLine(); ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, alignment); ImGui::Selectable(name, &selected[3 * y + x], ImGuiSelectableFlags_None, ImVec2(80, 80)); ImGui::PopStyleVar(); } } ImGui::TreePop(); } ImGui::TreePop(); } // To wire InputText() with std::string or any other custom string type, // see the "Text Input > Resize Callback" section of this demo, and the misc/cpp/imgui_stdlib.h file. if (ImGui::TreeNode("Text Input")) { if (ImGui::TreeNode("Multi-line Text Input")) { // Note: we are using a fixed-sized buffer for simplicity here. See ImGuiInputTextFlags_CallbackResize // and the code in misc/cpp/imgui_stdlib.h for how to setup InputText() for dynamically resizing strings. static char text[1024 * 16] = "/*\n" " The Pentium F00F bug, shorthand for F0 0F C7 C8,\n" " the hexadecimal encoding of one offending instruction,\n" " more formally, the invalid operand with locked CMPXCHG8B\n" " instruction bug, is a design flaw in the majority of\n" " Intel Pentium, Pentium MMX, and Pentium OverDrive\n" " processors (all in the P5 microarchitecture).\n" "*/\n\n" "label:\n" "\tlock cmpxchg8b eax\n"; static ImGuiInputTextFlags flags = ImGuiInputTextFlags_AllowTabInput; HelpMarker("You can use the ImGuiInputTextFlags_CallbackResize facility if you need to wire InputTextMultiline() to a dynamic string type. See misc/cpp/imgui_stdlib.h for an example. (This is not demonstrated in imgui_demo.cpp because we don't want to include <string> in here)"); ImGui::CheckboxFlags("ImGuiInputTextFlags_ReadOnly", (unsigned int*)&flags, ImGuiInputTextFlags_ReadOnly); ImGui::CheckboxFlags("ImGuiInputTextFlags_AllowTabInput", (unsigned int*)&flags, ImGuiInputTextFlags_AllowTabInput); ImGui::CheckboxFlags("ImGuiInputTextFlags_CtrlEnterForNewLine", (unsigned int*)&flags, ImGuiInputTextFlags_CtrlEnterForNewLine); ImGui::InputTextMultiline("##source", text, IM_ARRAYSIZE(text), ImVec2(-FLT_MIN, ImGui::GetTextLineHeight() * 16), flags); ImGui::TreePop(); } if (ImGui::TreeNode("Filtered Text Input")) { struct TextFilters { // Return 0 (pass) if the character is 'i' or 'm' or 'g' or 'u' or 'i' static int FilterImGuiLetters(ImGuiInputTextCallbackData* data) { if (data->EventChar < 256 && strchr("imgui", (char)data->EventChar)) return 0; return 1; } }; static char buf1[64] = ""; ImGui::InputText("default", buf1, 64); static char buf2[64] = ""; ImGui::InputText("decimal", buf2, 64, ImGuiInputTextFlags_CharsDecimal); static char buf3[64] = ""; ImGui::InputText("hexadecimal", buf3, 64, ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase); static char buf4[64] = ""; ImGui::InputText("uppercase", buf4, 64, ImGuiInputTextFlags_CharsUppercase); static char buf5[64] = ""; ImGui::InputText("no blank", buf5, 64, ImGuiInputTextFlags_CharsNoBlank); static char buf6[64] = ""; ImGui::InputText("\"imgui\" letters", buf6, 64, ImGuiInputTextFlags_CallbackCharFilter, TextFilters::FilterImGuiLetters); ImGui::TreePop(); } if (ImGui::TreeNode("Password Input")) { static char password[64] = "password123"; ImGui::InputText("password", password, IM_ARRAYSIZE(password), ImGuiInputTextFlags_Password); ImGui::SameLine(); HelpMarker("Display all characters as '*'.\nDisable clipboard cut and copy.\nDisable logging.\n"); ImGui::InputTextWithHint("password (w/ hint)", "<password>", password, IM_ARRAYSIZE(password), ImGuiInputTextFlags_Password); ImGui::InputText("password (clear)", password, IM_ARRAYSIZE(password)); ImGui::TreePop(); } if (ImGui::TreeNode("Completion, History, Edit Callbacks")) { struct Funcs { static int MyCallback(ImGuiInputTextCallbackData* data) { if (data->EventFlag == ImGuiInputTextFlags_CallbackCompletion) { data->InsertChars(data->CursorPos, ".."); } else if (data->EventFlag == ImGuiInputTextFlags_CallbackHistory) { if (data->EventKey == ImGuiKey_UpArrow) { data->DeleteChars(0, data->BufTextLen); data->InsertChars(0, "Pressed Up!"); data->SelectAll(); } else if (data->EventKey == ImGuiKey_DownArrow) { data->DeleteChars(0, data->BufTextLen); data->InsertChars(0, "Pressed Down!"); data->SelectAll(); } } else if (data->EventFlag == ImGuiInputTextFlags_CallbackEdit) { // Toggle casing of first character char c = data->Buf[0]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) data->Buf[0] ^= 32; data->BufDirty = true; // Increment a counter int* p_int = (int*)data->UserData; *p_int = *p_int + 1; } return 0; } }; static char buf1[64]; ImGui::InputText("Completion", buf1, 64, ImGuiInputTextFlags_CallbackCompletion, Funcs::MyCallback); ImGui::SameLine(); HelpMarker("Here we append \"..\" each time Tab is pressed. See 'Examples>Console' for a more meaningful demonstration of using this callback."); static char buf2[64]; ImGui::InputText("History", buf2, 64, ImGuiInputTextFlags_CallbackHistory, Funcs::MyCallback); ImGui::SameLine(); HelpMarker("Here we replace and select text each time Up/Down are pressed. See 'Examples>Console' for a more meaningful demonstration of using this callback."); static char buf3[64]; static int edit_count = 0; ImGui::InputText("Edit", buf3, 64, ImGuiInputTextFlags_CallbackEdit, Funcs::MyCallback, (void*)&edit_count); ImGui::SameLine(); HelpMarker("Here we toggle the casing of the first character on every edits + count edits."); ImGui::SameLine(); ImGui::Text("(%d)", edit_count); ImGui::TreePop(); } if (ImGui::TreeNode("Resize Callback")) { // To wire InputText() with std::string or any other custom string type, // you can use the ImGuiInputTextFlags_CallbackResize flag + create a custom ImGui::InputText() wrapper // using your preferred type. See misc/cpp/imgui_stdlib.h for an implementation of this using std::string. HelpMarker( "Using ImGuiInputTextFlags_CallbackResize to wire your custom string type to InputText().\n\n" "See misc/cpp/imgui_stdlib.h for an implementation of this for std::string."); struct Funcs { static int MyResizeCallback(ImGuiInputTextCallbackData* data) { if (data->EventFlag == ImGuiInputTextFlags_CallbackResize) { ImVector<char>* my_str = (ImVector<char>*)data->UserData; IM_ASSERT(my_str->begin() == data->Buf); my_str->resize(data->BufSize); // NB: On resizing calls, generally data->BufSize == data->BufTextLen + 1 data->Buf = my_str->begin(); } return 0; } // Note: Because ImGui:: is a namespace you would typically add your own function into the namespace. // For example, you code may declare a function 'ImGui::InputText(const char* label, MyString* my_str)' static bool MyInputTextMultiline(const char* label, ImVector<char>* my_str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0) { IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); return ImGui::InputTextMultiline(label, my_str->begin(), (size_t)my_str->size(), size, flags | ImGuiInputTextFlags_CallbackResize, Funcs::MyResizeCallback, (void*)my_str); } }; // For this demo we are using ImVector as a string container. // Note that because we need to store a terminating zero character, our size/capacity are 1 more // than usually reported by a typical string class. static ImVector<char> my_str; if (my_str.empty()) my_str.push_back(0); Funcs::MyInputTextMultiline("##MyStr", &my_str, ImVec2(-FLT_MIN, ImGui::GetTextLineHeight() * 16)); ImGui::Text("Data: %p\nSize: %d\nCapacity: %d", (void*)my_str.begin(), my_str.size(), my_str.capacity()); ImGui::TreePop(); } ImGui::TreePop(); } // Plot/Graph widgets are currently fairly limited. // Consider writing your own plotting widget, or using a third-party one // (for third-party Plot widgets, see 'Wiki->Useful Widgets' or https://github.com/ocornut/imgui/labels/plot%2Fgraph) if (ImGui::TreeNode("Plots Widgets")) { static bool animate = true; ImGui::Checkbox("Animate", &animate); static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f }; ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr)); // Fill an array of contiguous float values to plot // Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float // and the sizeof() of your structure in the "stride" parameter. static float values[90] = {}; static int values_offset = 0; static double refresh_time = 0.0; if (!animate || refresh_time == 0.0) refresh_time = ImGui::GetTime(); while (refresh_time < ImGui::GetTime()) // Create data at fixed 60 Hz rate for the demo { static float phase = 0.0f; values[values_offset] = cosf(phase); values_offset = (values_offset + 1) % IM_ARRAYSIZE(values); phase += 0.10f * values_offset; refresh_time += 1.0f / 60.0f; } // Plots can display overlay texts // (in this example, we will display an average value) { float average = 0.0f; for (int n = 0; n < IM_ARRAYSIZE(values); n++) average += values[n]; average /= (float)IM_ARRAYSIZE(values); char overlay[32]; sprintf(overlay, "avg %f", average); ImGui::PlotLines("Lines", values, IM_ARRAYSIZE(values), values_offset, overlay, -1.0f, 1.0f, ImVec2(0, 80.0f)); } ImGui::PlotHistogram("Histogram", arr, IM_ARRAYSIZE(arr), 0, NULL, 0.0f, 1.0f, ImVec2(0, 80.0f)); // Use functions to generate output // FIXME: This is rather awkward because current plot API only pass in indices. // We probably want an API passing floats and user provide sample rate/count. struct Funcs { static float Sin(void*, int i) { return sinf(i * 0.1f); } static float Saw(void*, int i) { return (i & 1) ? 1.0f : -1.0f; } }; static int func_type = 0, display_count = 70; ImGui::Separator(); ImGui::SetNextItemWidth(100); ImGui::Combo("func", &func_type, "Sin\0Saw\0"); ImGui::SameLine(); ImGui::SliderInt("Sample count", &display_count, 1, 400); float (*func)(void*, int) = (func_type == 0) ? Funcs::Sin : Funcs::Saw; ImGui::PlotLines("Lines", func, NULL, display_count, 0, NULL, -1.0f, 1.0f, ImVec2(0, 80)); ImGui::PlotHistogram("Histogram", func, NULL, display_count, 0, NULL, -1.0f, 1.0f, ImVec2(0, 80)); ImGui::Separator(); // Animate a simple progress bar static float progress = 0.0f, progress_dir = 1.0f; if (animate) { progress += progress_dir * 0.4f * ImGui::GetIO().DeltaTime; if (progress >= +1.1f) { progress = +1.1f; progress_dir *= -1.0f; } if (progress <= -0.1f) { progress = -0.1f; progress_dir *= -1.0f; } } // Typically we would use ImVec2(-1.0f,0.0f) or ImVec2(-FLT_MIN,0.0f) to use all available width, // or ImVec2(width,0.0f) for a specified width. ImVec2(0.0f,0.0f) uses ItemWidth. ImGui::ProgressBar(progress, ImVec2(0.0f, 0.0f)); ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x); ImGui::Text("Progress Bar"); float progress_saturated = IM_CLAMP(progress, 0.0f, 1.0f); char buf[32]; sprintf(buf, "%d/%d", (int)(progress_saturated * 1753), 1753); ImGui::ProgressBar(progress, ImVec2(0.f, 0.f), buf); ImGui::TreePop(); } if (ImGui::TreeNode("Color/Picker Widgets")) { static ImVec4 color = ImVec4(114.0f / 255.0f, 144.0f / 255.0f, 154.0f / 255.0f, 200.0f / 255.0f); static bool alpha_preview = true; static bool alpha_half_preview = false; static bool drag_and_drop = true; static bool options_menu = true; static bool hdr = false; ImGui::Checkbox("With Alpha Preview", &alpha_preview); ImGui::Checkbox("With Half Alpha Preview", &alpha_half_preview); ImGui::Checkbox("With Drag and Drop", &drag_and_drop); ImGui::Checkbox("With Options Menu", &options_menu); ImGui::SameLine(); HelpMarker("Right-click on the individual color widget to show options."); ImGui::Checkbox("With HDR", &hdr); ImGui::SameLine(); HelpMarker("Currently all this does is to lift the 0..1 limits on dragging widgets."); ImGuiColorEditFlags misc_flags = (hdr ? ImGuiColorEditFlags_HDR : 0) | (drag_and_drop ? 0 : ImGuiColorEditFlags_NoDragDrop) | (alpha_half_preview ? ImGuiColorEditFlags_AlphaPreviewHalf : (alpha_preview ? ImGuiColorEditFlags_AlphaPreview : 0)) | (options_menu ? 0 : ImGuiColorEditFlags_NoOptions); ImGui::Text("Color widget:"); ImGui::SameLine(); HelpMarker( "Click on the colored square to open a color picker.\n" "CTRL+click on individual component to input value.\n"); ImGui::ColorEdit3("MyColor##1", (float*)&color, misc_flags); ImGui::Text("Color widget HSV with Alpha:"); ImGui::ColorEdit4("MyColor##2", (float*)&color, ImGuiColorEditFlags_DisplayHSV | misc_flags); ImGui::Text("Color widget with Float Display:"); ImGui::ColorEdit4("MyColor##2f", (float*)&color, ImGuiColorEditFlags_Float | misc_flags); ImGui::Text("Color button with Picker:"); ImGui::SameLine(); HelpMarker( "With the ImGuiColorEditFlags_NoInputs flag you can hide all the slider/text inputs.\n" "With the ImGuiColorEditFlags_NoLabel flag you can pass a non-empty label which will only " "be used for the tooltip and picker popup."); ImGui::ColorEdit4("MyColor##3", (float*)&color, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | misc_flags); ImGui::Text("Color button with Custom Picker Popup:"); // Generate a default palette. The palette will persist and can be edited. static bool saved_palette_init = true; static ImVec4 saved_palette[32] = {}; if (saved_palette_init) { for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++) { ImGui::ColorConvertHSVtoRGB(n / 31.0f, 0.8f, 0.8f, saved_palette[n].x, saved_palette[n].y, saved_palette[n].z); saved_palette[n].w = 1.0f; // Alpha } saved_palette_init = false; } static ImVec4 backup_color; bool open_popup = ImGui::ColorButton("MyColor##3b", color, misc_flags); ImGui::SameLine(0, ImGui::GetStyle().ItemInnerSpacing.x); open_popup |= ImGui::Button("Palette"); if (open_popup) { ImGui::OpenPopup("mypicker"); backup_color = color; } if (ImGui::BeginPopup("mypicker")) { ImGui::Text("MY CUSTOM COLOR PICKER WITH AN AMAZING PALETTE!"); ImGui::Separator(); ImGui::ColorPicker4("##picker", (float*)&color, misc_flags | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoSmallPreview); ImGui::SameLine(); ImGui::BeginGroup(); // Lock X position ImGui::Text("Current"); ImGui::ColorButton("##current", color, ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_AlphaPreviewHalf, ImVec2(60, 40)); ImGui::Text("Previous"); if (ImGui::ColorButton("##previous", backup_color, ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_AlphaPreviewHalf, ImVec2(60, 40))) color = backup_color; ImGui::Separator(); ImGui::Text("Palette"); for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++) { ImGui::PushID(n); if ((n % 8) != 0) ImGui::SameLine(0.0f, ImGui::GetStyle().ItemSpacing.y); ImGuiColorEditFlags palette_button_flags = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_NoTooltip; if (ImGui::ColorButton("##palette", saved_palette[n], palette_button_flags, ImVec2(20, 20))) color = ImVec4(saved_palette[n].x, saved_palette[n].y, saved_palette[n].z, color.w); // Preserve alpha! // Allow user to drop colors into each palette entry. Note that ColorButton() is already a // drag source by default, unless specifying the ImGuiColorEditFlags_NoDragDrop flag. if (ImGui::BeginDragDropTarget()) { if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F)) memcpy((float*)&saved_palette[n], payload->Data, sizeof(float) * 3); if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F)) memcpy((float*)&saved_palette[n], payload->Data, sizeof(float) * 4); ImGui::EndDragDropTarget(); } ImGui::PopID(); } ImGui::EndGroup(); ImGui::EndPopup(); } ImGui::Text("Color button only:"); static bool no_border = false; ImGui::Checkbox("ImGuiColorEditFlags_NoBorder", &no_border); ImGui::ColorButton("MyColor##3c", *(ImVec4*)&color, misc_flags | (no_border ? ImGuiColorEditFlags_NoBorder : 0), ImVec2(80, 80)); ImGui::Text("Color picker:"); static bool alpha = true; static bool alpha_bar = true; static bool side_preview = true; static bool ref_color = false; static ImVec4 ref_color_v(1.0f, 0.0f, 1.0f, 0.5f); static int display_mode = 0; static int picker_mode = 0; ImGui::Checkbox("With Alpha", &alpha); ImGui::Checkbox("With Alpha Bar", &alpha_bar); ImGui::Checkbox("With Side Preview", &side_preview); if (side_preview) { ImGui::SameLine(); ImGui::Checkbox("With Ref Color", &ref_color); if (ref_color) { ImGui::SameLine(); ImGui::ColorEdit4("##RefColor", &ref_color_v.x, ImGuiColorEditFlags_NoInputs | misc_flags); } } ImGui::Combo("Display Mode", &display_mode, "Auto/Current\0None\0RGB Only\0HSV Only\0Hex Only\0"); ImGui::SameLine(); HelpMarker( "ColorEdit defaults to displaying RGB inputs if you don't specify a display mode, " "but the user can change it with a right-click.\n\nColorPicker defaults to displaying RGB+HSV+Hex " "if you don't specify a display mode.\n\nYou can change the defaults using SetColorEditOptions()."); ImGui::Combo("Picker Mode", &picker_mode, "Auto/Current\0Hue bar + SV rect\0Hue wheel + SV triangle\0"); ImGui::SameLine(); HelpMarker("User can right-click the picker to change mode."); ImGuiColorEditFlags flags = misc_flags; if (!alpha) flags |= ImGuiColorEditFlags_NoAlpha; // This is by default if you call ColorPicker3() instead of ColorPicker4() if (alpha_bar) flags |= ImGuiColorEditFlags_AlphaBar; if (!side_preview) flags |= ImGuiColorEditFlags_NoSidePreview; if (picker_mode == 1) flags |= ImGuiColorEditFlags_PickerHueBar; if (picker_mode == 2) flags |= ImGuiColorEditFlags_PickerHueWheel; if (display_mode == 1) flags |= ImGuiColorEditFlags_NoInputs; // Disable all RGB/HSV/Hex displays if (display_mode == 2) flags |= ImGuiColorEditFlags_DisplayRGB; // Override display mode if (display_mode == 3) flags |= ImGuiColorEditFlags_DisplayHSV; if (display_mode == 4) flags |= ImGuiColorEditFlags_DisplayHex; ImGui::ColorPicker4("MyColor##4", (float*)&color, flags, ref_color ? &ref_color_v.x : NULL); ImGui::Text("Set defaults in code:"); ImGui::SameLine(); HelpMarker( "SetColorEditOptions() is designed to allow you to set boot-time default.\n" "We don't have Push/Pop functions because you can force options on a per-widget basis if needed," "and the user can change non-forced ones with the options menu.\nWe don't have a getter to avoid" "encouraging you to persistently save values that aren't forward-compatible."); if (ImGui::Button("Default: Uint8 + HSV + Hue Bar")) ImGui::SetColorEditOptions(ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_PickerHueBar); if (ImGui::Button("Default: Float + HDR + Hue Wheel")) ImGui::SetColorEditOptions(ImGuiColorEditFlags_Float | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_PickerHueWheel); // HSV encoded support (to avoid RGB<>HSV round trips and singularities when S==0 or V==0) static ImVec4 color_hsv(0.23f, 1.0f, 1.0f, 1.0f); // Stored as HSV! ImGui::Spacing(); ImGui::Text("HSV encoded colors"); ImGui::SameLine(); HelpMarker( "By default, colors are given to ColorEdit and ColorPicker in RGB, but ImGuiColorEditFlags_InputHSV" "allows you to store colors as HSV and pass them to ColorEdit and ColorPicker as HSV. This comes with the" "added benefit that you can manipulate hue values with the picker even when saturation or value are zero."); ImGui::Text("Color widget with InputHSV:"); ImGui::ColorEdit4("HSV shown as RGB##1", (float*)&color_hsv, ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputHSV | ImGuiColorEditFlags_Float); ImGui::ColorEdit4("HSV shown as HSV##1", (float*)&color_hsv, ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_InputHSV | ImGuiColorEditFlags_Float); ImGui::DragFloat4("Raw HSV values", (float*)&color_hsv, 0.01f, 0.0f, 1.0f); ImGui::TreePop(); } if (ImGui::TreeNode("Drag/Slider Flags")) { // Demonstrate using advanced flags for DragXXX and SliderXXX functions. Note that the flags are the same! static ImGuiSliderFlags flags = ImGuiSliderFlags_None; ImGui::CheckboxFlags("ImGuiSliderFlags_ClampOnInput", (unsigned int*)&flags, ImGuiSliderFlags_ClampOnInput); ImGui::SameLine(); HelpMarker("Always clamp value to min/max bounds (if any) when input manually with CTRL+Click."); ImGui::CheckboxFlags("ImGuiSliderFlags_Logarithmic", (unsigned int*)&flags, ImGuiSliderFlags_Logarithmic); ImGui::SameLine(); HelpMarker("Enable logarithmic editing (more precision for small values)."); ImGui::CheckboxFlags("ImGuiSliderFlags_NoRoundToFormat", (unsigned int*)&flags, ImGuiSliderFlags_NoRoundToFormat); ImGui::SameLine(); HelpMarker("Disable rounding underlying value to match precision of the format string (e.g. %.3f values are rounded to those 3 digits)."); ImGui::CheckboxFlags("ImGuiSliderFlags_NoInput", (unsigned int*)&flags, ImGuiSliderFlags_NoInput); ImGui::SameLine(); HelpMarker("Disable CTRL+Click or Enter key allowing to input text directly into the widget."); // Drags static float drag_f = 0.5f; static int drag_i = 50; ImGui::Text("Underlying float value: %f", drag_f); ImGui::DragFloat("DragFloat (0 -> 1)", &drag_f, 0.005f, 0.0f, 1.0f, "%.3f", flags); ImGui::DragFloat("DragFloat (0 -> +inf)", &drag_f, 0.005f, 0.0f, FLT_MAX, "%.3f", flags); ImGui::DragFloat("DragFloat (-inf -> 1)", &drag_f, 0.005f, -FLT_MAX, 1.0f, "%.3f", flags); ImGui::DragFloat("DragFloat (-inf -> +inf)", &drag_f, 0.005f, -FLT_MAX, +FLT_MAX, "%.3f", flags); ImGui::DragInt("DragInt (0 -> 100)", &drag_i, 0.5f, 0, 100, "%d", flags); // Sliders static float slider_f = 0.5f; static int slider_i = 50; ImGui::Text("Underlying float value: %f", slider_f); ImGui::SliderFloat("SliderFloat (0 -> 1)", &slider_f, 0.0f, 1.0f, "%.3f", flags); ImGui::SliderInt("SliderInt (0 -> 100)", &slider_i, 0, 100, "%d", flags); ImGui::TreePop(); } if (ImGui::TreeNode("Range Widgets")) { static float begin = 10, end = 90; static int begin_i = 100, end_i = 1000; ImGui::DragFloatRange2("range float", &begin, &end, 0.25f, 0.0f, 100.0f, "Min: %.1f %%", "Max: %.1f %%", ImGuiSliderFlags_ClampOnInput); ImGui::DragIntRange2("range int", &begin_i, &end_i, 5, 0, 1000, "Min: %d units", "Max: %d units"); ImGui::DragIntRange2("range int (no bounds)", &begin_i, &end_i, 5, 0, 0, "Min: %d units", "Max: %d units"); ImGui::TreePop(); } if (ImGui::TreeNode("Data Types")) { // DragScalar/InputScalar/SliderScalar functions allow various data types // - signed/unsigned // - 8/16/32/64-bits // - integer/float/double // To avoid polluting the public API with all possible combinations, we use the ImGuiDataType enum // to pass the type, and passing all arguments by pointer. // This is the reason the test code below creates local variables to hold "zero" "one" etc. for each types. // In practice, if you frequently use a given type that is not covered by the normal API entry points, // you can wrap it yourself inside a 1 line function which can take typed argument as value instead of void*, // and then pass their address to the generic function. For example: // bool MySliderU64(const char *label, u64* value, u64 min = 0, u64 max = 0, const char* format = "%lld") // { // return SliderScalar(label, ImGuiDataType_U64, value, &min, &max, format); // } // Setup limits (as helper variables so we can take their address, as explained above) // Note: SliderScalar() functions have a maximum usable range of half the natural type maximum, hence the /2. #ifndef LLONG_MIN ImS64 LLONG_MIN = -9223372036854775807LL - 1; ImS64 LLONG_MAX = 9223372036854775807LL; ImU64 ULLONG_MAX = (2ULL * 9223372036854775807LL + 1); #endif const char s8_zero = 0, s8_one = 1, s8_fifty = 50, s8_min = -128, s8_max = 127; const ImU8 u8_zero = 0, u8_one = 1, u8_fifty = 50, u8_min = 0, u8_max = 255; const short s16_zero = 0, s16_one = 1, s16_fifty = 50, s16_min = -32768, s16_max = 32767; const ImU16 u16_zero = 0, u16_one = 1, u16_fifty = 50, u16_min = 0, u16_max = 65535; const ImS32 s32_zero = 0, s32_one = 1, s32_fifty = 50, s32_min = INT_MIN/2, s32_max = INT_MAX/2, s32_hi_a = INT_MAX/2 - 100, s32_hi_b = INT_MAX/2; const ImU32 u32_zero = 0, u32_one = 1, u32_fifty = 50, u32_min = 0, u32_max = UINT_MAX/2, u32_hi_a = UINT_MAX/2 - 100, u32_hi_b = UINT_MAX/2; const ImS64 s64_zero = 0, s64_one = 1, s64_fifty = 50, s64_min = LLONG_MIN/2, s64_max = LLONG_MAX/2, s64_hi_a = LLONG_MAX/2 - 100, s64_hi_b = LLONG_MAX/2; const ImU64 u64_zero = 0, u64_one = 1, u64_fifty = 50, u64_min = 0, u64_max = ULLONG_MAX/2, u64_hi_a = ULLONG_MAX/2 - 100, u64_hi_b = ULLONG_MAX/2; const float f32_zero = 0.f, f32_one = 1.f, f32_lo_a = -10000000000.0f, f32_hi_a = +10000000000.0f; const double f64_zero = 0., f64_one = 1., f64_lo_a = -1000000000000000.0, f64_hi_a = +1000000000000000.0; // State static char s8_v = 127; static ImU8 u8_v = 255; static short s16_v = 32767; static ImU16 u16_v = 65535; static ImS32 s32_v = -1; static ImU32 u32_v = (ImU32)-1; static ImS64 s64_v = -1; static ImU64 u64_v = (ImU64)-1; static float f32_v = 0.123f; static double f64_v = 90000.01234567890123456789; const float drag_speed = 0.2f; static bool drag_clamp = false; ImGui::Text("Drags:"); ImGui::Checkbox("Clamp integers to 0..50", &drag_clamp); ImGui::SameLine(); HelpMarker( "As with every widgets in dear imgui, we never modify values unless there is a user interaction.\n" "You can override the clamping limits by using CTRL+Click to input a value."); ImGui::DragScalar("drag s8", ImGuiDataType_S8, &s8_v, drag_speed, drag_clamp ? &s8_zero : NULL, drag_clamp ? &s8_fifty : NULL); ImGui::DragScalar("drag u8", ImGuiDataType_U8, &u8_v, drag_speed, drag_clamp ? &u8_zero : NULL, drag_clamp ? &u8_fifty : NULL, "%u ms"); ImGui::DragScalar("drag s16", ImGuiDataType_S16, &s16_v, drag_speed, drag_clamp ? &s16_zero : NULL, drag_clamp ? &s16_fifty : NULL); ImGui::DragScalar("drag u16", ImGuiDataType_U16, &u16_v, drag_speed, drag_clamp ? &u16_zero : NULL, drag_clamp ? &u16_fifty : NULL, "%u ms"); ImGui::DragScalar("drag s32", ImGuiDataType_S32, &s32_v, drag_speed, drag_clamp ? &s32_zero : NULL, drag_clamp ? &s32_fifty : NULL); ImGui::DragScalar("drag u32", ImGuiDataType_U32, &u32_v, drag_speed, drag_clamp ? &u32_zero : NULL, drag_clamp ? &u32_fifty : NULL, "%u ms"); ImGui::DragScalar("drag s64", ImGuiDataType_S64, &s64_v, drag_speed, drag_clamp ? &s64_zero : NULL, drag_clamp ? &s64_fifty : NULL); ImGui::DragScalar("drag u64", ImGuiDataType_U64, &u64_v, drag_speed, drag_clamp ? &u64_zero : NULL, drag_clamp ? &u64_fifty : NULL); ImGui::DragScalar("drag float", ImGuiDataType_Float, &f32_v, 0.005f, &f32_zero, &f32_one, "%f"); ImGui::DragScalar("drag float log", ImGuiDataType_Float, &f32_v, 0.005f, &f32_zero, &f32_one, "%f", ImGuiSliderFlags_Logarithmic); ImGui::DragScalar("drag double", ImGuiDataType_Double, &f64_v, 0.0005f, &f64_zero, NULL, "%.10f grams"); ImGui::DragScalar("drag double log",ImGuiDataType_Double, &f64_v, 0.0005f, &f64_zero, &f64_one, "0 < %.10f < 1", ImGuiSliderFlags_Logarithmic); ImGui::Text("Sliders"); ImGui::SliderScalar("slider s8 full", ImGuiDataType_S8, &s8_v, &s8_min, &s8_max, "%d"); ImGui::SliderScalar("slider u8 full", ImGuiDataType_U8, &u8_v, &u8_min, &u8_max, "%u"); ImGui::SliderScalar("slider s16 full", ImGuiDataType_S16, &s16_v, &s16_min, &s16_max, "%d"); ImGui::SliderScalar("slider u16 full", ImGuiDataType_U16, &u16_v, &u16_min, &u16_max, "%u"); ImGui::SliderScalar("slider s32 low", ImGuiDataType_S32, &s32_v, &s32_zero, &s32_fifty,"%d"); ImGui::SliderScalar("slider s32 high", ImGuiDataType_S32, &s32_v, &s32_hi_a, &s32_hi_b, "%d"); ImGui::SliderScalar("slider s32 full", ImGuiDataType_S32, &s32_v, &s32_min, &s32_max, "%d"); ImGui::SliderScalar("slider u32 low", ImGuiDataType_U32, &u32_v, &u32_zero, &u32_fifty,"%u"); ImGui::SliderScalar("slider u32 high", ImGuiDataType_U32, &u32_v, &u32_hi_a, &u32_hi_b, "%u"); ImGui::SliderScalar("slider u32 full", ImGuiDataType_U32, &u32_v, &u32_min, &u32_max, "%u"); ImGui::SliderScalar("slider s64 low", ImGuiDataType_S64, &s64_v, &s64_zero, &s64_fifty,"%I64d"); ImGui::SliderScalar("slider s64 high", ImGuiDataType_S64, &s64_v, &s64_hi_a, &s64_hi_b, "%I64d"); ImGui::SliderScalar("slider s64 full", ImGuiDataType_S64, &s64_v, &s64_min, &s64_max, "%I64d"); ImGui::SliderScalar("slider u64 low", ImGuiDataType_U64, &u64_v, &u64_zero, &u64_fifty,"%I64u ms"); ImGui::SliderScalar("slider u64 high", ImGuiDataType_U64, &u64_v, &u64_hi_a, &u64_hi_b, "%I64u ms"); ImGui::SliderScalar("slider u64 full", ImGuiDataType_U64, &u64_v, &u64_min, &u64_max, "%I64u ms"); ImGui::SliderScalar("slider float low", ImGuiDataType_Float, &f32_v, &f32_zero, &f32_one); ImGui::SliderScalar("slider float low log", ImGuiDataType_Float, &f32_v, &f32_zero, &f32_one, "%.10f", ImGuiSliderFlags_Logarithmic); ImGui::SliderScalar("slider float high", ImGuiDataType_Float, &f32_v, &f32_lo_a, &f32_hi_a, "%e"); ImGui::SliderScalar("slider double low", ImGuiDataType_Double, &f64_v, &f64_zero, &f64_one, "%.10f grams"); ImGui::SliderScalar("slider double low log",ImGuiDataType_Double, &f64_v, &f64_zero, &f64_one, "%.10f", ImGuiSliderFlags_Logarithmic); ImGui::SliderScalar("slider double high", ImGuiDataType_Double, &f64_v, &f64_lo_a, &f64_hi_a, "%e grams"); static bool inputs_step = true; ImGui::Text("Inputs"); ImGui::Checkbox("Show step buttons", &inputs_step); ImGui::InputScalar("input s8", ImGuiDataType_S8, &s8_v, inputs_step ? &s8_one : NULL, NULL, "%d"); ImGui::InputScalar("input u8", ImGuiDataType_U8, &u8_v, inputs_step ? &u8_one : NULL, NULL, "%u"); ImGui::InputScalar("input s16", ImGuiDataType_S16, &s16_v, inputs_step ? &s16_one : NULL, NULL, "%d"); ImGui::InputScalar("input u16", ImGuiDataType_U16, &u16_v, inputs_step ? &u16_one : NULL, NULL, "%u"); ImGui::InputScalar("input s32", ImGuiDataType_S32, &s32_v, inputs_step ? &s32_one : NULL, NULL, "%d"); ImGui::InputScalar("input s32 hex", ImGuiDataType_S32, &s32_v, inputs_step ? &s32_one : NULL, NULL, "%08X", ImGuiInputTextFlags_CharsHexadecimal); ImGui::InputScalar("input u32", ImGuiDataType_U32, &u32_v, inputs_step ? &u32_one : NULL, NULL, "%u"); ImGui::InputScalar("input u32 hex", ImGuiDataType_U32, &u32_v, inputs_step ? &u32_one : NULL, NULL, "%08X", ImGuiInputTextFlags_CharsHexadecimal); ImGui::InputScalar("input s64", ImGuiDataType_S64, &s64_v, inputs_step ? &s64_one : NULL); ImGui::InputScalar("input u64", ImGuiDataType_U64, &u64_v, inputs_step ? &u64_one : NULL); ImGui::InputScalar("input float", ImGuiDataType_Float, &f32_v, inputs_step ? &f32_one : NULL); ImGui::InputScalar("input double", ImGuiDataType_Double, &f64_v, inputs_step ? &f64_one : NULL); ImGui::TreePop(); } if (ImGui::TreeNode("Multi-component Widgets")) { static float vec4f[4] = { 0.10f, 0.20f, 0.30f, 0.44f }; static int vec4i[4] = { 1, 5, 100, 255 }; ImGui::InputFloat2("input float2", vec4f); ImGui::DragFloat2("drag float2", vec4f, 0.01f, 0.0f, 1.0f); ImGui::SliderFloat2("slider float2", vec4f, 0.0f, 1.0f); ImGui::InputInt2("input int2", vec4i); ImGui::DragInt2("drag int2", vec4i, 1, 0, 255); ImGui::SliderInt2("slider int2", vec4i, 0, 255); ImGui::Spacing(); ImGui::InputFloat3("input float3", vec4f); ImGui::DragFloat3("drag float3", vec4f, 0.01f, 0.0f, 1.0f); ImGui::SliderFloat3("slider float3", vec4f, 0.0f, 1.0f); ImGui::InputInt3("input int3", vec4i); ImGui::DragInt3("drag int3", vec4i, 1, 0, 255); ImGui::SliderInt3("slider int3", vec4i, 0, 255); ImGui::Spacing(); ImGui::InputFloat4("input float4", vec4f); ImGui::DragFloat4("drag float4", vec4f, 0.01f, 0.0f, 1.0f); ImGui::SliderFloat4("slider float4", vec4f, 0.0f, 1.0f); ImGui::InputInt4("input int4", vec4i); ImGui::DragInt4("drag int4", vec4i, 1, 0, 255); ImGui::SliderInt4("slider int4", vec4i, 0, 255); ImGui::TreePop(); } if (ImGui::TreeNode("Vertical Sliders")) { const float spacing = 4; ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(spacing, spacing)); static int int_value = 0; ImGui::VSliderInt("##int", ImVec2(18, 160), &int_value, 0, 5); ImGui::SameLine(); static float values[7] = { 0.0f, 0.60f, 0.35f, 0.9f, 0.70f, 0.20f, 0.0f }; ImGui::PushID("set1"); for (int i = 0; i < 7; i++) { if (i > 0) ImGui::SameLine(); ImGui::PushID(i); ImGui::PushStyleColor(ImGuiCol_FrameBg, (ImVec4)ImColor::HSV(i / 7.0f, 0.5f, 0.5f)); ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, (ImVec4)ImColor::HSV(i / 7.0f, 0.6f, 0.5f)); ImGui::PushStyleColor(ImGuiCol_FrameBgActive, (ImVec4)ImColor::HSV(i / 7.0f, 0.7f, 0.5f)); ImGui::PushStyleColor(ImGuiCol_SliderGrab, (ImVec4)ImColor::HSV(i / 7.0f, 0.9f, 0.9f)); ImGui::VSliderFloat("##v", ImVec2(18, 160), &values[i], 0.0f, 1.0f, ""); if (ImGui::IsItemActive() || ImGui::IsItemHovered()) ImGui::SetTooltip("%.3f", values[i]); ImGui::PopStyleColor(4); ImGui::PopID(); } ImGui::PopID(); ImGui::SameLine(); ImGui::PushID("set2"); static float values2[4] = { 0.20f, 0.80f, 0.40f, 0.25f }; const int rows = 3; const ImVec2 small_slider_size(18, (float)(int)((160.0f - (rows - 1) * spacing) / rows)); for (int nx = 0; nx < 4; nx++) { if (nx > 0) ImGui::SameLine(); ImGui::BeginGroup(); for (int ny = 0; ny < rows; ny++) { ImGui::PushID(nx * rows + ny); ImGui::VSliderFloat("##v", small_slider_size, &values2[nx], 0.0f, 1.0f, ""); if (ImGui::IsItemActive() || ImGui::IsItemHovered()) ImGui::SetTooltip("%.3f", values2[nx]); ImGui::PopID(); } ImGui::EndGroup(); } ImGui::PopID(); ImGui::SameLine(); ImGui::PushID("set3"); for (int i = 0; i < 4; i++) { if (i > 0) ImGui::SameLine(); ImGui::PushID(i); ImGui::PushStyleVar(ImGuiStyleVar_GrabMinSize, 40); ImGui::VSliderFloat("##v", ImVec2(40, 160), &values[i], 0.0f, 1.0f, "%.2f\nsec"); ImGui::PopStyleVar(); ImGui::PopID(); } ImGui::PopID(); ImGui::PopStyleVar(); ImGui::TreePop(); } if (ImGui::TreeNode("Drag and Drop")) { if (ImGui::TreeNode("Drag and drop in standard widgets")) { // ColorEdit widgets automatically act as drag source and drag target. // They are using standardized payload strings IMGUI_PAYLOAD_TYPE_COLOR_3F and IMGUI_PAYLOAD_TYPE_COLOR_4F // to allow your own widgets to use colors in their drag and drop interaction. // Also see 'Demo->Widgets->Color/Picker Widgets->Palette' demo. HelpMarker("You can drag from the colored squares."); static float col1[3] = { 1.0f, 0.0f, 0.2f }; static float col2[4] = { 0.4f, 0.7f, 0.0f, 0.5f }; ImGui::ColorEdit3("color 1", col1); ImGui::ColorEdit4("color 2", col2); ImGui::TreePop(); } if (ImGui::TreeNode("Drag and drop to copy/swap items")) { enum Mode { Mode_Copy, Mode_Move, Mode_Swap }; static int mode = 0; if (ImGui::RadioButton("Copy", mode == Mode_Copy)) { mode = Mode_Copy; } ImGui::SameLine(); if (ImGui::RadioButton("Move", mode == Mode_Move)) { mode = Mode_Move; } ImGui::SameLine(); if (ImGui::RadioButton("Swap", mode == Mode_Swap)) { mode = Mode_Swap; } static const char* names[9] = { "Bobby", "Beatrice", "Betty", "Brianna", "Barry", "Bernard", "Bibi", "Blaine", "Bryn" }; for (int n = 0; n < IM_ARRAYSIZE(names); n++) { ImGui::PushID(n); if ((n % 3) != 0) ImGui::SameLine(); ImGui::Button(names[n], ImVec2(60, 60)); // Our buttons are both drag sources and drag targets here! if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_None)) { // Set payload to carry the index of our item (could be anything) ImGui::SetDragDropPayload("DND_DEMO_CELL", &n, sizeof(int)); // Display preview (could be anything, e.g. when dragging an image we could decide to display // the filename and a small preview of the image, etc.) if (mode == Mode_Copy) { ImGui::Text("Copy %s", names[n]); } if (mode == Mode_Move) { ImGui::Text("Move %s", names[n]); } if (mode == Mode_Swap) { ImGui::Text("Swap %s", names[n]); } ImGui::EndDragDropSource(); } if (ImGui::BeginDragDropTarget()) { if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("DND_DEMO_CELL")) { IM_ASSERT(payload->DataSize == sizeof(int)); int payload_n = *(const int*)payload->Data; if (mode == Mode_Copy) { names[n] = names[payload_n]; } if (mode == Mode_Move) { names[n] = names[payload_n]; names[payload_n] = ""; } if (mode == Mode_Swap) { const char* tmp = names[n]; names[n] = names[payload_n]; names[payload_n] = tmp; } } ImGui::EndDragDropTarget(); } ImGui::PopID(); } ImGui::TreePop(); } if (ImGui::TreeNode("Drag to reorder items (simple)")) { // Simple reordering HelpMarker( "We don't use the drag and drop api at all here! " "Instead we query when the item is held but not hovered, and order items accordingly."); static const char* item_names[] = { "Item One", "Item Two", "Item Three", "Item Four", "Item Five" }; for (int n = 0; n < IM_ARRAYSIZE(item_names); n++) { const char* item = item_names[n]; ImGui::Selectable(item); if (ImGui::IsItemActive() && !ImGui::IsItemHovered()) { int n_next = n + (ImGui::GetMouseDragDelta(0).y < 0.f ? -1 : 1); if (n_next >= 0 && n_next < IM_ARRAYSIZE(item_names)) { item_names[n] = item_names[n_next]; item_names[n_next] = item; ImGui::ResetMouseDragDelta(); } } } ImGui::TreePop(); } ImGui::TreePop(); } if (ImGui::TreeNode("Querying Status (Active/Focused/Hovered etc.)")) { // Select an item type const char* item_names[] = { "Text", "Button", "Button (w/ repeat)", "Checkbox", "SliderFloat", "InputText", "InputFloat", "InputFloat3", "ColorEdit4", "MenuItem", "TreeNode", "TreeNode (w/ double-click)", "ListBox" }; static int item_type = 1; ImGui::Combo("Item Type", &item_type, item_names, IM_ARRAYSIZE(item_names), IM_ARRAYSIZE(item_names)); ImGui::SameLine(); HelpMarker("Testing how various types of items are interacting with the IsItemXXX functions."); // Submit selected item item so we can query their status in the code following it. bool ret = false; static bool b = false; static float col4f[4] = { 1.0f, 0.5, 0.0f, 1.0f }; static char str[16] = {}; if (item_type == 0) { ImGui::Text("ITEM: Text"); } // Testing text items with no identifier/interaction if (item_type == 1) { ret = ImGui::Button("ITEM: Button"); } // Testing button if (item_type == 2) { ImGui::PushButtonRepeat(true); ret = ImGui::Button("ITEM: Button"); ImGui::PopButtonRepeat(); } // Testing button (with repeater) if (item_type == 3) { ret = ImGui::Checkbox("ITEM: Checkbox", &b); } // Testing checkbox if (item_type == 4) { ret = ImGui::SliderFloat("ITEM: SliderFloat", &col4f[0], 0.0f, 1.0f); } // Testing basic item if (item_type == 5) { ret = ImGui::InputText("ITEM: InputText", &str[0], IM_ARRAYSIZE(str)); } // Testing input text (which handles tabbing) if (item_type == 6) { ret = ImGui::InputFloat("ITEM: InputFloat", col4f, 1.0f); } // Testing +/- buttons on scalar input if (item_type == 7) { ret = ImGui::InputFloat3("ITEM: InputFloat3", col4f); } // Testing multi-component items (IsItemXXX flags are reported merged) if (item_type == 8) { ret = ImGui::ColorEdit4("ITEM: ColorEdit4", col4f); } // Testing multi-component items (IsItemXXX flags are reported merged) if (item_type == 9) { ret = ImGui::MenuItem("ITEM: MenuItem"); } // Testing menu item (they use ImGuiButtonFlags_PressedOnRelease button policy) if (item_type == 10){ ret = ImGui::TreeNode("ITEM: TreeNode"); if (ret) ImGui::TreePop(); } // Testing tree node if (item_type == 11){ ret = ImGui::TreeNodeEx("ITEM: TreeNode w/ ImGuiTreeNodeFlags_OpenOnDoubleClick", ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_NoTreePushOnOpen); } // Testing tree node with ImGuiButtonFlags_PressedOnDoubleClick button policy. if (item_type == 12){ const char* items[] = { "Apple", "Banana", "Cherry", "Kiwi" }; static int current = 1; ret = ImGui::ListBox("ITEM: ListBox", &current, items, IM_ARRAYSIZE(items), IM_ARRAYSIZE(items)); } // Display the values of IsItemHovered() and other common item state functions. // Note that the ImGuiHoveredFlags_XXX flags can be combined. // Because BulletText is an item itself and that would affect the output of IsItemXXX functions, // we query every state in a single call to avoid storing them and to simplify the code. ImGui::BulletText( "Return value = %d\n" "IsItemFocused() = %d\n" "IsItemHovered() = %d\n" "IsItemHovered(_AllowWhenBlockedByPopup) = %d\n" "IsItemHovered(_AllowWhenBlockedByActiveItem) = %d\n" "IsItemHovered(_AllowWhenOverlapped) = %d\n" "IsItemHovered(_RectOnly) = %d\n" "IsItemActive() = %d\n" "IsItemEdited() = %d\n" "IsItemActivated() = %d\n" "IsItemDeactivated() = %d\n" "IsItemDeactivatedAfterEdit() = %d\n" "IsItemVisible() = %d\n" "IsItemClicked() = %d\n" "IsItemToggledOpen() = %d\n" "GetItemRectMin() = (%.1f, %.1f)\n" "GetItemRectMax() = (%.1f, %.1f)\n" "GetItemRectSize() = (%.1f, %.1f)", ret, ImGui::IsItemFocused(), ImGui::IsItemHovered(), ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup), ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem), ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenOverlapped), ImGui::IsItemHovered(ImGuiHoveredFlags_RectOnly), ImGui::IsItemActive(), ImGui::IsItemEdited(), ImGui::IsItemActivated(), ImGui::IsItemDeactivated(), ImGui::IsItemDeactivatedAfterEdit(), ImGui::IsItemVisible(), ImGui::IsItemClicked(), ImGui::IsItemToggledOpen(), ImGui::GetItemRectMin().x, ImGui::GetItemRectMin().y, ImGui::GetItemRectMax().x, ImGui::GetItemRectMax().y, ImGui::GetItemRectSize().x, ImGui::GetItemRectSize().y ); static bool embed_all_inside_a_child_window = false; ImGui::Checkbox("Embed everything inside a child window (for additional testing)", &embed_all_inside_a_child_window); if (embed_all_inside_a_child_window) ImGui::BeginChild("outer_child", ImVec2(0, ImGui::GetFontSize() * 20.0f), true); // Testing IsWindowFocused() function with its various flags. // Note that the ImGuiFocusedFlags_XXX flags can be combined. ImGui::BulletText( "IsWindowFocused() = %d\n" "IsWindowFocused(_ChildWindows) = %d\n" "IsWindowFocused(_ChildWindows|_RootWindow) = %d\n" "IsWindowFocused(_RootWindow) = %d\n" "IsWindowFocused(_AnyWindow) = %d\n", ImGui::IsWindowFocused(), ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows), ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows | ImGuiFocusedFlags_RootWindow), ImGui::IsWindowFocused(ImGuiFocusedFlags_RootWindow), ImGui::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)); // Testing IsWindowHovered() function with its various flags. // Note that the ImGuiHoveredFlags_XXX flags can be combined. ImGui::BulletText( "IsWindowHovered() = %d\n" "IsWindowHovered(_AllowWhenBlockedByPopup) = %d\n" "IsWindowHovered(_AllowWhenBlockedByActiveItem) = %d\n" "IsWindowHovered(_ChildWindows) = %d\n" "IsWindowHovered(_ChildWindows|_RootWindow) = %d\n" "IsWindowHovered(_ChildWindows|_AllowWhenBlockedByPopup) = %d\n" "IsWindowHovered(_RootWindow) = %d\n" "IsWindowHovered(_AnyWindow) = %d\n", ImGui::IsWindowHovered(), ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup), ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem), ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows), ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_RootWindow), ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_AllowWhenBlockedByPopup), ImGui::IsWindowHovered(ImGuiHoveredFlags_RootWindow), ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow)); ImGui::BeginChild("child", ImVec2(0, 50), true); ImGui::Text("This is another child window for testing the _ChildWindows flag."); ImGui::EndChild(); if (embed_all_inside_a_child_window) ImGui::EndChild(); static char unused_str[] = "This widget is only here to be able to tab-out of the widgets above."; ImGui::InputText("unused", unused_str, IM_ARRAYSIZE(unused_str), ImGuiInputTextFlags_ReadOnly); // Calling IsItemHovered() after begin returns the hovered status of the title bar. // This is useful in particular if you want to create a context menu associated to the title bar of a window. static bool test_window = false; ImGui::Checkbox("Hovered/Active tests after Begin() for title bar testing", &test_window); if (test_window) { ImGui::Begin("Title bar Hovered/Active tests", &test_window); if (ImGui::BeginPopupContextItem()) // <-- This is using IsItemHovered() { if (ImGui::MenuItem("Close")) { test_window = false; } ImGui::EndPopup(); } ImGui::Text( "IsItemHovered() after begin = %d (== is title bar hovered)\n" "IsItemActive() after begin = %d (== is window being clicked/moved)\n", ImGui::IsItemHovered(), ImGui::IsItemActive()); ImGui::End(); } ImGui::TreePop(); } } static void ShowDemoWindowLayout() { if (!ImGui::CollapsingHeader("Layout & Scrolling")) return; if (ImGui::TreeNode("Child windows")) { HelpMarker("Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window."); static bool disable_mouse_wheel = false; static bool disable_menu = false; ImGui::Checkbox("Disable Mouse Wheel", &disable_mouse_wheel); ImGui::Checkbox("Disable Menu", &disable_menu); // Child 1: no border, enable horizontal scrollbar { ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar; if (disable_mouse_wheel) window_flags |= ImGuiWindowFlags_NoScrollWithMouse; ImGui::BeginChild("ChildL", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.5f, 260), false, window_flags); for (int i = 0; i < 100; i++) ImGui::Text("%04d: scrollable region", i); ImGui::EndChild(); } ImGui::SameLine(); // Child 2: rounded border { ImGuiWindowFlags window_flags = ImGuiWindowFlags_None; if (disable_mouse_wheel) window_flags |= ImGuiWindowFlags_NoScrollWithMouse; if (!disable_menu) window_flags |= ImGuiWindowFlags_MenuBar; ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f); ImGui::BeginChild("ChildR", ImVec2(0, 260), true, window_flags); if (!disable_menu && ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("Menu")) { ShowExampleMenuFile(); ImGui::EndMenu(); } ImGui::EndMenuBar(); } ImGui::Columns(2); for (int i = 0; i < 100; i++) { char buf[32]; sprintf(buf, "%03d", i); ImGui::Button(buf, ImVec2(-FLT_MIN, 0.0f)); ImGui::NextColumn(); } ImGui::EndChild(); ImGui::PopStyleVar(); } ImGui::Separator(); // Demonstrate a few extra things // - Changing ImGuiCol_ChildBg (which is transparent black in default styles) // - Using SetCursorPos() to position child window (the child window is an item from the POV of parent window) // You can also call SetNextWindowPos() to position the child window. The parent window will effectively // layout from this position. // - Using ImGui::GetItemRectMin/Max() to query the "item" state (because the child window is an item from // the POV of the parent window). See 'Demo->Querying Status (Active/Focused/Hovered etc.)' for details. { static int offset_x = 0; ImGui::SetNextItemWidth(100); ImGui::DragInt("Offset X", &offset_x, 1.0f, -1000, 1000); ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (float)offset_x); ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 0, 0, 100)); ImGui::BeginChild("Red", ImVec2(200, 100), true, ImGuiWindowFlags_None); for (int n = 0; n < 50; n++) ImGui::Text("Some test %d", n); ImGui::EndChild(); bool child_is_hovered = ImGui::IsItemHovered(); ImVec2 child_rect_min = ImGui::GetItemRectMin(); ImVec2 child_rect_max = ImGui::GetItemRectMax(); ImGui::PopStyleColor(); ImGui::Text("Hovered: %d", child_is_hovered); ImGui::Text("Rect of child window is: (%.0f,%.0f) (%.0f,%.0f)", child_rect_min.x, child_rect_min.y, child_rect_max.x, child_rect_max.y); } ImGui::TreePop(); } if (ImGui::TreeNode("Widgets Width")) { // Use SetNextItemWidth() to set the width of a single upcoming item. // Use PushItemWidth()/PopItemWidth() to set the width of a group of items. // In real code use you'll probably want to choose width values that are proportional to your font size // e.g. Using '20.0f * GetFontSize()' as width instead of '200.0f', etc. static float f = 0.0f; ImGui::Text("SetNextItemWidth/PushItemWidth(100)"); ImGui::SameLine(); HelpMarker("Fixed width."); ImGui::SetNextItemWidth(100); ImGui::DragFloat("float##1", &f); ImGui::Text("SetNextItemWidth/PushItemWidth(GetWindowWidth() * 0.5f)"); ImGui::SameLine(); HelpMarker("Half of window width."); ImGui::SetNextItemWidth(ImGui::GetWindowWidth() * 0.5f); ImGui::DragFloat("float##2", &f); ImGui::Text("SetNextItemWidth/PushItemWidth(GetContentRegionAvail().x * 0.5f)"); ImGui::SameLine(); HelpMarker("Half of available width.\n(~ right-cursor_pos)\n(works within a column set)"); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x * 0.5f); ImGui::DragFloat("float##3", &f); ImGui::Text("SetNextItemWidth/PushItemWidth(-100)"); ImGui::SameLine(); HelpMarker("Align to right edge minus 100"); ImGui::SetNextItemWidth(-100); ImGui::DragFloat("float##4", &f); // Demonstrate using PushItemWidth to surround three items. // Calling SetNextItemWidth() before each of them would have the same effect. ImGui::Text("SetNextItemWidth/PushItemWidth(-1)"); ImGui::SameLine(); HelpMarker("Align to right edge"); ImGui::PushItemWidth(-1); ImGui::DragFloat("##float5a", &f); ImGui::DragFloat("##float5b", &f); ImGui::DragFloat("##float5c", &f); ImGui::PopItemWidth(); ImGui::TreePop(); } if (ImGui::TreeNode("Basic Horizontal Layout")) { ImGui::TextWrapped("(Use ImGui::SameLine() to keep adding items to the right of the preceding item)"); // Text ImGui::Text("Two items: Hello"); ImGui::SameLine(); ImGui::TextColored(ImVec4(1,1,0,1), "Sailor"); // Adjust spacing ImGui::Text("More spacing: Hello"); ImGui::SameLine(0, 20); ImGui::TextColored(ImVec4(1,1,0,1), "Sailor"); // Button ImGui::AlignTextToFramePadding(); ImGui::Text("Normal buttons"); ImGui::SameLine(); ImGui::Button("Banana"); ImGui::SameLine(); ImGui::Button("Apple"); ImGui::SameLine(); ImGui::Button("Corniflower"); // Button ImGui::Text("Small buttons"); ImGui::SameLine(); ImGui::SmallButton("Like this one"); ImGui::SameLine(); ImGui::Text("can fit within a text block."); // Aligned to arbitrary position. Easy/cheap column. ImGui::Text("Aligned"); ImGui::SameLine(150); ImGui::Text("x=150"); ImGui::SameLine(300); ImGui::Text("x=300"); ImGui::Text("Aligned"); ImGui::SameLine(150); ImGui::SmallButton("x=150"); ImGui::SameLine(300); ImGui::SmallButton("x=300"); // Checkbox static bool c1 = false, c2 = false, c3 = false, c4 = false; ImGui::Checkbox("My", &c1); ImGui::SameLine(); ImGui::Checkbox("Tailor", &c2); ImGui::SameLine(); ImGui::Checkbox("Is", &c3); ImGui::SameLine(); ImGui::Checkbox("Rich", &c4); // Various static float f0 = 1.0f, f1 = 2.0f, f2 = 3.0f; ImGui::PushItemWidth(80); const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD" }; static int item = -1; ImGui::Combo("Combo", &item, items, IM_ARRAYSIZE(items)); ImGui::SameLine(); ImGui::SliderFloat("X", &f0, 0.0f, 5.0f); ImGui::SameLine(); ImGui::SliderFloat("Y", &f1, 0.0f, 5.0f); ImGui::SameLine(); ImGui::SliderFloat("Z", &f2, 0.0f, 5.0f); ImGui::PopItemWidth(); ImGui::PushItemWidth(80); ImGui::Text("Lists:"); static int selection[4] = { 0, 1, 2, 3 }; for (int i = 0; i < 4; i++) { if (i > 0) ImGui::SameLine(); ImGui::PushID(i); ImGui::ListBox("", &selection[i], items, IM_ARRAYSIZE(items)); ImGui::PopID(); //if (ImGui::IsItemHovered()) ImGui::SetTooltip("ListBox %d hovered", i); } ImGui::PopItemWidth(); // Dummy ImVec2 button_sz(40, 40); ImGui::Button("A", button_sz); ImGui::SameLine(); ImGui::Dummy(button_sz); ImGui::SameLine(); ImGui::Button("B", button_sz); // Manually wrapping // (we should eventually provide this as an automatic layout feature, but for now you can do it manually) ImGui::Text("Manually wrapping:"); ImGuiStyle& style = ImGui::GetStyle(); int buttons_count = 20; float window_visible_x2 = ImGui::GetWindowPos().x + ImGui::GetWindowContentRegionMax().x; for (int n = 0; n < buttons_count; n++) { ImGui::PushID(n); ImGui::Button("Box", button_sz); float last_button_x2 = ImGui::GetItemRectMax().x; float next_button_x2 = last_button_x2 + style.ItemSpacing.x + button_sz.x; // Expected position if next button was on same line if (n + 1 < buttons_count && next_button_x2 < window_visible_x2) ImGui::SameLine(); ImGui::PopID(); } ImGui::TreePop(); } if (ImGui::TreeNode("Tabs")) { if (ImGui::TreeNode("Basic")) { ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_None; if (ImGui::BeginTabBar("MyTabBar", tab_bar_flags)) { if (ImGui::BeginTabItem("Avocado")) { ImGui::Text("This is the Avocado tab!\nblah blah blah blah blah"); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Broccoli")) { ImGui::Text("This is the Broccoli tab!\nblah blah blah blah blah"); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Cucumber")) { ImGui::Text("This is the Cucumber tab!\nblah blah blah blah blah"); ImGui::EndTabItem(); } ImGui::EndTabBar(); } ImGui::Separator(); ImGui::TreePop(); } if (ImGui::TreeNode("Advanced & Close Button")) { // Expose a couple of the available flags. In most cases you may just call BeginTabBar() with no flags (0). static ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_Reorderable; ImGui::CheckboxFlags("ImGuiTabBarFlags_Reorderable", (unsigned int*)&tab_bar_flags, ImGuiTabBarFlags_Reorderable); ImGui::CheckboxFlags("ImGuiTabBarFlags_AutoSelectNewTabs", (unsigned int*)&tab_bar_flags, ImGuiTabBarFlags_AutoSelectNewTabs); ImGui::CheckboxFlags("ImGuiTabBarFlags_TabListPopupButton", (unsigned int*)&tab_bar_flags, ImGuiTabBarFlags_TabListPopupButton); ImGui::CheckboxFlags("ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", (unsigned int*)&tab_bar_flags, ImGuiTabBarFlags_NoCloseWithMiddleMouseButton); if ((tab_bar_flags & ImGuiTabBarFlags_FittingPolicyMask_) == 0) tab_bar_flags |= ImGuiTabBarFlags_FittingPolicyDefault_; if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyResizeDown", (unsigned int*)&tab_bar_flags, ImGuiTabBarFlags_FittingPolicyResizeDown)) tab_bar_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyResizeDown); if (ImGui::CheckboxFlags("ImGuiTabBarFlags_FittingPolicyScroll", (unsigned int*)&tab_bar_flags, ImGuiTabBarFlags_FittingPolicyScroll)) tab_bar_flags &= ~(ImGuiTabBarFlags_FittingPolicyMask_ ^ ImGuiTabBarFlags_FittingPolicyScroll); // Tab Bar const char* names[4] = { "Artichoke", "Beetroot", "Celery", "Daikon" }; static bool opened[4] = { true, true, true, true }; // Persistent user state for (int n = 0; n < IM_ARRAYSIZE(opened); n++) { if (n > 0) { ImGui::SameLine(); } ImGui::Checkbox(names[n], &opened[n]); } // Passing a bool* to BeginTabItem() is similar to passing one to Begin(): // the underlying bool will be set to false when the tab is closed. if (ImGui::BeginTabBar("MyTabBar", tab_bar_flags)) { for (int n = 0; n < IM_ARRAYSIZE(opened); n++) if (opened[n] && ImGui::BeginTabItem(names[n], &opened[n], ImGuiTabItemFlags_None)) { ImGui::Text("This is the %s tab!", names[n]); if (n & 1) ImGui::Text("I am an odd tab."); ImGui::EndTabItem(); } ImGui::EndTabBar(); } ImGui::Separator(); ImGui::TreePop(); } ImGui::TreePop(); } if (ImGui::TreeNode("Groups")) { HelpMarker( "BeginGroup() basically locks the horizontal position for new line. " "EndGroup() bundles the whole group so that you can use \"item\" functions such as " "IsItemHovered()/IsItemActive() or SameLine() etc. on the whole group."); ImGui::BeginGroup(); { ImGui::BeginGroup(); ImGui::Button("AAA"); ImGui::SameLine(); ImGui::Button("BBB"); ImGui::SameLine(); ImGui::BeginGroup(); ImGui::Button("CCC"); ImGui::Button("DDD"); ImGui::EndGroup(); ImGui::SameLine(); ImGui::Button("EEE"); ImGui::EndGroup(); if (ImGui::IsItemHovered()) ImGui::SetTooltip("First group hovered"); } // Capture the group size and create widgets using the same size ImVec2 size = ImGui::GetItemRectSize(); const float values[5] = { 0.5f, 0.20f, 0.80f, 0.60f, 0.25f }; ImGui::PlotHistogram("##values", values, IM_ARRAYSIZE(values), 0, NULL, 0.0f, 1.0f, size); ImGui::Button("ACTION", ImVec2((size.x - ImGui::GetStyle().ItemSpacing.x) * 0.5f, size.y)); ImGui::SameLine(); ImGui::Button("REACTION", ImVec2((size.x - ImGui::GetStyle().ItemSpacing.x) * 0.5f, size.y)); ImGui::EndGroup(); ImGui::SameLine(); ImGui::Button("LEVERAGE\nBUZZWORD", size); ImGui::SameLine(); if (ImGui::ListBoxHeader("List", size)) { ImGui::Selectable("Selected", true); ImGui::Selectable("Not Selected", false); ImGui::ListBoxFooter(); } ImGui::TreePop(); } if (ImGui::TreeNode("Text Baseline Alignment")) { { ImGui::BulletText("Text baseline:"); ImGui::SameLine(); HelpMarker( "This is testing the vertical alignment that gets applied on text to keep it aligned with widgets. " "Lines only composed of text or \"small\" widgets use less vertical space than lines with framed widgets."); ImGui::Indent(); ImGui::Text("KO Blahblah"); ImGui::SameLine(); ImGui::Button("Some framed item"); ImGui::SameLine(); HelpMarker("Baseline of button will look misaligned with text.."); // If your line starts with text, call AlignTextToFramePadding() to align text to upcoming widgets. // (because we don't know what's coming after the Text() statement, we need to move the text baseline // down by FramePadding.y ahead of time) ImGui::AlignTextToFramePadding(); ImGui::Text("OK Blahblah"); ImGui::SameLine(); ImGui::Button("Some framed item"); ImGui::SameLine(); HelpMarker("We call AlignTextToFramePadding() to vertically align the text baseline by +FramePadding.y"); // SmallButton() uses the same vertical padding as Text ImGui::Button("TEST##1"); ImGui::SameLine(); ImGui::Text("TEST"); ImGui::SameLine(); ImGui::SmallButton("TEST##2"); // If your line starts with text, call AlignTextToFramePadding() to align text to upcoming widgets. ImGui::AlignTextToFramePadding(); ImGui::Text("Text aligned to framed item"); ImGui::SameLine(); ImGui::Button("Item##1"); ImGui::SameLine(); ImGui::Text("Item"); ImGui::SameLine(); ImGui::SmallButton("Item##2"); ImGui::SameLine(); ImGui::Button("Item##3"); ImGui::Unindent(); } ImGui::Spacing(); { ImGui::BulletText("Multi-line text:"); ImGui::Indent(); ImGui::Text("One\nTwo\nThree"); ImGui::SameLine(); ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("Banana"); ImGui::Text("Banana"); ImGui::SameLine(); ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("One\nTwo\nThree"); ImGui::Button("HOP##1"); ImGui::SameLine(); ImGui::Text("Banana"); ImGui::SameLine(); ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("Banana"); ImGui::Button("HOP##2"); ImGui::SameLine(); ImGui::Text("Hello\nWorld"); ImGui::SameLine(); ImGui::Text("Banana"); ImGui::Unindent(); } ImGui::Spacing(); { ImGui::BulletText("Misc items:"); ImGui::Indent(); // SmallButton() sets FramePadding to zero. Text baseline is aligned to match baseline of previous Button. ImGui::Button("80x80", ImVec2(80, 80)); ImGui::SameLine(); ImGui::Button("50x50", ImVec2(50, 50)); ImGui::SameLine(); ImGui::Button("Button()"); ImGui::SameLine(); ImGui::SmallButton("SmallButton()"); // Tree const float spacing = ImGui::GetStyle().ItemInnerSpacing.x; ImGui::Button("Button##1"); ImGui::SameLine(0.0f, spacing); if (ImGui::TreeNode("Node##1")) { // Placeholder tree data for (int i = 0; i < 6; i++) ImGui::BulletText("Item %d..", i); ImGui::TreePop(); } // Vertically align text node a bit lower so it'll be vertically centered with upcoming widget. // Otherwise you can use SmallButton() (smaller fit). ImGui::AlignTextToFramePadding(); // Common mistake to avoid: if we want to SameLine after TreeNode we need to do it before we add // other contents below the node. bool node_open = ImGui::TreeNode("Node##2"); ImGui::SameLine(0.0f, spacing); ImGui::Button("Button##2"); if (node_open) { // Placeholder tree data for (int i = 0; i < 6; i++) ImGui::BulletText("Item %d..", i); ImGui::TreePop(); } // Bullet ImGui::Button("Button##3"); ImGui::SameLine(0.0f, spacing); ImGui::BulletText("Bullet text"); ImGui::AlignTextToFramePadding(); ImGui::BulletText("Node"); ImGui::SameLine(0.0f, spacing); ImGui::Button("Button##4"); ImGui::Unindent(); } ImGui::TreePop(); } if (ImGui::TreeNode("Scrolling")) { // Vertical scroll functions HelpMarker("Use SetScrollHereY() or SetScrollFromPosY() to scroll to a given vertical position."); static int track_item = 50; static bool enable_track = true; static bool enable_extra_decorations = false; static float scroll_to_off_px = 0.0f; static float scroll_to_pos_px = 200.0f; ImGui::Checkbox("Decoration", &enable_extra_decorations); ImGui::Checkbox("Track", &enable_track); ImGui::PushItemWidth(100); ImGui::SameLine(140); enable_track |= ImGui::DragInt("##item", &track_item, 0.25f, 0, 99, "Item = %d"); bool scroll_to_off = ImGui::Button("Scroll Offset"); ImGui::SameLine(140); scroll_to_off |= ImGui::DragFloat("##off", &scroll_to_off_px, 1.00f, 0, FLT_MAX, "+%.0f px"); bool scroll_to_pos = ImGui::Button("Scroll To Pos"); ImGui::SameLine(140); scroll_to_pos |= ImGui::DragFloat("##pos", &scroll_to_pos_px, 1.00f, -10, FLT_MAX, "X/Y = %.0f px"); ImGui::PopItemWidth(); if (scroll_to_off || scroll_to_pos) enable_track = false; ImGuiStyle& style = ImGui::GetStyle(); float child_w = (ImGui::GetContentRegionAvail().x - 4 * style.ItemSpacing.x) / 5; if (child_w < 1.0f) child_w = 1.0f; ImGui::PushID("##VerticalScrolling"); for (int i = 0; i < 5; i++) { if (i > 0) ImGui::SameLine(); ImGui::BeginGroup(); const char* names[] = { "Top", "25%", "Center", "75%", "Bottom" }; ImGui::TextUnformatted(names[i]); const ImGuiWindowFlags child_flags = enable_extra_decorations ? ImGuiWindowFlags_MenuBar : 0; const ImGuiID child_id = ImGui::GetID((void*)(intptr_t)i); const bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(child_w, 200.0f), true, child_flags); if (ImGui::BeginMenuBar()) { ImGui::TextUnformatted("abc"); ImGui::EndMenuBar(); } if (scroll_to_off) ImGui::SetScrollY(scroll_to_off_px); if (scroll_to_pos) ImGui::SetScrollFromPosY(ImGui::GetCursorStartPos().y + scroll_to_pos_px, i * 0.25f); if (child_is_visible) // Avoid calling SetScrollHereY when running with culled items { for (int item = 0; item < 100; item++) { if (enable_track && item == track_item) { ImGui::TextColored(ImVec4(1, 1, 0, 1), "Item %d", item); ImGui::SetScrollHereY(i * 0.25f); // 0.0f:top, 0.5f:center, 1.0f:bottom } else { ImGui::Text("Item %d", item); } } } float scroll_y = ImGui::GetScrollY(); float scroll_max_y = ImGui::GetScrollMaxY(); ImGui::EndChild(); ImGui::Text("%.0f/%.0f", scroll_y, scroll_max_y); ImGui::EndGroup(); } ImGui::PopID(); // Horizontal scroll functions ImGui::Spacing(); HelpMarker( "Use SetScrollHereX() or SetScrollFromPosX() to scroll to a given horizontal position.\n\n" "Because the clipping rectangle of most window hides half worth of WindowPadding on the " "left/right, using SetScrollFromPosX(+1) will usually result in clipped text whereas the " "equivalent SetScrollFromPosY(+1) wouldn't."); ImGui::PushID("##HorizontalScrolling"); for (int i = 0; i < 5; i++) { float child_height = ImGui::GetTextLineHeight() + style.ScrollbarSize + style.WindowPadding.y * 2.0f; ImGuiWindowFlags child_flags = ImGuiWindowFlags_HorizontalScrollbar | (enable_extra_decorations ? ImGuiWindowFlags_AlwaysVerticalScrollbar : 0); ImGuiID child_id = ImGui::GetID((void*)(intptr_t)i); bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(-100, child_height), true, child_flags); if (scroll_to_off) ImGui::SetScrollX(scroll_to_off_px); if (scroll_to_pos) ImGui::SetScrollFromPosX(ImGui::GetCursorStartPos().x + scroll_to_pos_px, i * 0.25f); if (child_is_visible) // Avoid calling SetScrollHereY when running with culled items { for (int item = 0; item < 100; item++) { if (enable_track && item == track_item) { ImGui::TextColored(ImVec4(1, 1, 0, 1), "Item %d", item); ImGui::SetScrollHereX(i * 0.25f); // 0.0f:left, 0.5f:center, 1.0f:right } else { ImGui::Text("Item %d", item); } ImGui::SameLine(); } } float scroll_x = ImGui::GetScrollX(); float scroll_max_x = ImGui::GetScrollMaxX(); ImGui::EndChild(); ImGui::SameLine(); const char* names[] = { "Left", "25%", "Center", "75%", "Right" }; ImGui::Text("%s\n%.0f/%.0f", names[i], scroll_x, scroll_max_x); ImGui::Spacing(); } ImGui::PopID(); // Miscellaneous Horizontal Scrolling Demo HelpMarker( "Horizontal scrolling for a window is enabled via the ImGuiWindowFlags_HorizontalScrollbar flag.\n\n" "You may want to also explicitly specify content width by using SetNextWindowContentWidth() before Begin()."); static int lines = 7; ImGui::SliderInt("Lines", &lines, 1, 15); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 3.0f); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2.0f, 1.0f)); ImVec2 scrolling_child_size = ImVec2(0, ImGui::GetFrameHeightWithSpacing() * 7 + 30); ImGui::BeginChild("scrolling", scrolling_child_size, true, ImGuiWindowFlags_HorizontalScrollbar); for (int line = 0; line < lines; line++) { // Display random stuff. For the sake of this trivial demo we are using basic Button() + SameLine() // If you want to create your own time line for a real application you may be better off manipulating // the cursor position yourself, aka using SetCursorPos/SetCursorScreenPos to position the widgets // yourself. You may also want to use the lower-level ImDrawList API. int num_buttons = 10 + ((line & 1) ? line * 9 : line * 3); for (int n = 0; n < num_buttons; n++) { if (n > 0) ImGui::SameLine(); ImGui::PushID(n + line * 1000); char num_buf[16]; sprintf(num_buf, "%d", n); const char* label = (!(n % 15)) ? "FizzBuzz" : (!(n % 3)) ? "Fizz" : (!(n % 5)) ? "Buzz" : num_buf; float hue = n * 0.05f; ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)ImColor::HSV(hue, 0.6f, 0.6f)); ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV(hue, 0.7f, 0.7f)); ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV(hue, 0.8f, 0.8f)); ImGui::Button(label, ImVec2(40.0f + sinf((float)(line + n)) * 20.0f, 0.0f)); ImGui::PopStyleColor(3); ImGui::PopID(); } } float scroll_x = ImGui::GetScrollX(); float scroll_max_x = ImGui::GetScrollMaxX(); ImGui::EndChild(); ImGui::PopStyleVar(2); float scroll_x_delta = 0.0f; ImGui::SmallButton("<<"); if (ImGui::IsItemActive()) scroll_x_delta = -ImGui::GetIO().DeltaTime * 1000.0f; ImGui::SameLine(); ImGui::Text("Scroll from code"); ImGui::SameLine(); ImGui::SmallButton(">>"); if (ImGui::IsItemActive()) scroll_x_delta = +ImGui::GetIO().DeltaTime * 1000.0f; ImGui::SameLine(); ImGui::Text("%.0f/%.0f", scroll_x, scroll_max_x); if (scroll_x_delta != 0.0f) { // Demonstrate a trick: you can use Begin to set yourself in the context of another window // (here we are already out of your child window) ImGui::BeginChild("scrolling"); ImGui::SetScrollX(ImGui::GetScrollX() + scroll_x_delta); ImGui::EndChild(); } ImGui::Spacing(); static bool show_horizontal_contents_size_demo_window = false; ImGui::Checkbox("Show Horizontal contents size demo window", &show_horizontal_contents_size_demo_window); if (show_horizontal_contents_size_demo_window) { static bool show_h_scrollbar = true; static bool show_button = true; static bool show_tree_nodes = true; static bool show_text_wrapped = false; static bool show_columns = true; static bool show_tab_bar = true; static bool show_child = false; static bool explicit_content_size = false; static float contents_size_x = 300.0f; if (explicit_content_size) ImGui::SetNextWindowContentSize(ImVec2(contents_size_x, 0.0f)); ImGui::Begin("Horizontal contents size demo window", &show_horizontal_contents_size_demo_window, show_h_scrollbar ? ImGuiWindowFlags_HorizontalScrollbar : 0); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2, 0)); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 0)); HelpMarker("Test of different widgets react and impact the work rectangle growing when horizontal scrolling is enabled.\n\nUse 'Metrics->Tools->Show windows rectangles' to visualize rectangles."); ImGui::Checkbox("H-scrollbar", &show_h_scrollbar); ImGui::Checkbox("Button", &show_button); // Will grow contents size (unless explicitly overwritten) ImGui::Checkbox("Tree nodes", &show_tree_nodes); // Will grow contents size and display highlight over full width ImGui::Checkbox("Text wrapped", &show_text_wrapped);// Will grow and use contents size ImGui::Checkbox("Columns", &show_columns); // Will use contents size ImGui::Checkbox("Tab bar", &show_tab_bar); // Will use contents size ImGui::Checkbox("Child", &show_child); // Will grow and use contents size ImGui::Checkbox("Explicit content size", &explicit_content_size); ImGui::Text("Scroll %.1f/%.1f %.1f/%.1f", ImGui::GetScrollX(), ImGui::GetScrollMaxX(), ImGui::GetScrollY(), ImGui::GetScrollMaxY()); if (explicit_content_size) { ImGui::SameLine(); ImGui::SetNextItemWidth(100); ImGui::DragFloat("##csx", &contents_size_x); ImVec2 p = ImGui::GetCursorScreenPos(); ImGui::GetWindowDrawList()->AddRectFilled(p, ImVec2(p.x + 10, p.y + 10), IM_COL32_WHITE); ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(p.x + contents_size_x - 10, p.y), ImVec2(p.x + contents_size_x, p.y + 10), IM_COL32_WHITE); ImGui::Dummy(ImVec2(0, 10)); } ImGui::PopStyleVar(2); ImGui::Separator(); if (show_button) { ImGui::Button("this is a 300-wide button", ImVec2(300, 0)); } if (show_tree_nodes) { bool open = true; if (ImGui::TreeNode("this is a tree node")) { if (ImGui::TreeNode("another one of those tree node...")) { ImGui::Text("Some tree contents"); ImGui::TreePop(); } ImGui::TreePop(); } ImGui::CollapsingHeader("CollapsingHeader", &open); } if (show_text_wrapped) { ImGui::TextWrapped("This text should automatically wrap on the edge of the work rectangle."); } if (show_columns) { ImGui::Columns(4); for (int n = 0; n < 4; n++) { ImGui::Text("Width %.2f", ImGui::GetColumnWidth()); ImGui::NextColumn(); } ImGui::Columns(1); } if (show_tab_bar && ImGui::BeginTabBar("Hello")) { if (ImGui::BeginTabItem("OneOneOne")) { ImGui::EndTabItem(); } if (ImGui::BeginTabItem("TwoTwoTwo")) { ImGui::EndTabItem(); } if (ImGui::BeginTabItem("ThreeThreeThree")) { ImGui::EndTabItem(); } if (ImGui::BeginTabItem("FourFourFour")) { ImGui::EndTabItem(); } ImGui::EndTabBar(); } if (show_child) { ImGui::BeginChild("child", ImVec2(0, 0), true); ImGui::EndChild(); } ImGui::End(); } ImGui::TreePop(); } if (ImGui::TreeNode("Clipping")) { static ImVec2 size(100.0f, 100.0f); static ImVec2 offset(30.0f, 30.0f); ImGui::DragFloat2("size", (float*)&size, 0.5f, 1.0f, 200.0f, "%.0f"); ImGui::TextWrapped("(Click and drag to scroll)"); for (int n = 0; n < 3; n++) { if (n > 0) ImGui::SameLine(); ImGui::PushID(n); ImGui::BeginGroup(); // Lock X position ImGui::InvisibleButton("##empty", size); if (ImGui::IsItemActive() && ImGui::IsMouseDragging(ImGuiMouseButton_Left)) { offset.x += ImGui::GetIO().MouseDelta.x; offset.y += ImGui::GetIO().MouseDelta.y; } const ImVec2 p0 = ImGui::GetItemRectMin(); const ImVec2 p1 = ImGui::GetItemRectMax(); const char* text_str = "Line 1 hello\nLine 2 clip me!"; const ImVec2 text_pos = ImVec2(p0.x + offset.x, p0.y + offset.y); ImDrawList* draw_list = ImGui::GetWindowDrawList(); switch (n) { case 0: HelpMarker( "Using ImGui::PushClipRect():\n" "Will alter ImGui hit-testing logic + ImDrawList rendering.\n" "(use this if you want your clipping rectangle to affect interactions)"); ImGui::PushClipRect(p0, p1, true); draw_list->AddRectFilled(p0, p1, IM_COL32(90, 90, 120, 255)); draw_list->AddText(text_pos, IM_COL32_WHITE, text_str); ImGui::PopClipRect(); break; case 1: HelpMarker( "Using ImDrawList::PushClipRect():\n" "Will alter ImDrawList rendering only.\n" "(use this as a shortcut if you are only using ImDrawList calls)"); draw_list->PushClipRect(p0, p1, true); draw_list->AddRectFilled(p0, p1, IM_COL32(90, 90, 120, 255)); draw_list->AddText(text_pos, IM_COL32_WHITE, text_str); draw_list->PopClipRect(); break; case 2: HelpMarker( "Using ImDrawList::AddText() with a fine ClipRect:\n" "Will alter only this specific ImDrawList::AddText() rendering.\n" "(this is often used internally to avoid altering the clipping rectangle and minimize draw calls)"); ImVec4 clip_rect(p0.x, p0.y, p1.x, p1.y); // AddText() takes a ImVec4* here so let's convert. draw_list->AddRectFilled(p0, p1, IM_COL32(90, 90, 120, 255)); draw_list->AddText(ImGui::GetFont(), ImGui::GetFontSize(), text_pos, IM_COL32_WHITE, text_str, NULL, 0.0f, &clip_rect); break; } ImGui::EndGroup(); ImGui::PopID(); } ImGui::TreePop(); } } static void ShowDemoWindowPopups() { if (!ImGui::CollapsingHeader("Popups & Modal windows")) return; // The properties of popups windows are: // - They block normal mouse hovering detection outside them. (*) // - Unless modal, they can be closed by clicking anywhere outside them, or by pressing ESCAPE. // - Their visibility state (~bool) is held internally by Dear ImGui instead of being held by the programmer as // we are used to with regular Begin() calls. User can manipulate the visibility state by calling OpenPopup(). // (*) One can use IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup) to bypass it and detect hovering even // when normally blocked by a popup. // Those three properties are connected. The library needs to hold their visibility state BECAUSE it can close // popups at any time. // Typical use for regular windows: // bool my_tool_is_active = false; if (ImGui::Button("Open")) my_tool_is_active = true; [...] if (my_tool_is_active) Begin("My Tool", &my_tool_is_active) { [...] } End(); // Typical use for popups: // if (ImGui::Button("Open")) ImGui::OpenPopup("MyPopup"); if (ImGui::BeginPopup("MyPopup") { [...] EndPopup(); } // With popups we have to go through a library call (here OpenPopup) to manipulate the visibility state. // This may be a bit confusing at first but it should quickly make sense. Follow on the examples below. if (ImGui::TreeNode("Popups")) { ImGui::TextWrapped( "When a popup is active, it inhibits interacting with windows that are behind the popup. " "Clicking outside the popup closes it."); static int selected_fish = -1; const char* names[] = { "Bream", "Haddock", "Mackerel", "Pollock", "Tilefish" }; static bool toggles[] = { true, false, false, false, false }; // Simple selection popup (if you want to show the current selection inside the Button itself, // you may want to build a string using the "###" operator to preserve a constant ID with a variable label) if (ImGui::Button("Select..")) ImGui::OpenPopup("my_select_popup"); ImGui::SameLine(); ImGui::TextUnformatted(selected_fish == -1 ? "<None>" : names[selected_fish]); if (ImGui::BeginPopup("my_select_popup")) { ImGui::Text("Aquarium"); ImGui::Separator(); for (int i = 0; i < IM_ARRAYSIZE(names); i++) if (ImGui::Selectable(names[i])) selected_fish = i; ImGui::EndPopup(); } // Showing a menu with toggles if (ImGui::Button("Toggle..")) ImGui::OpenPopup("my_toggle_popup"); if (ImGui::BeginPopup("my_toggle_popup")) { for (int i = 0; i < IM_ARRAYSIZE(names); i++) ImGui::MenuItem(names[i], "", &toggles[i]); if (ImGui::BeginMenu("Sub-menu")) { ImGui::MenuItem("Click me"); ImGui::EndMenu(); } ImGui::Separator(); ImGui::Text("Tooltip here"); if (ImGui::IsItemHovered()) ImGui::SetTooltip("I am a tooltip over a popup"); if (ImGui::Button("Stacked Popup")) ImGui::OpenPopup("another popup"); if (ImGui::BeginPopup("another popup")) { for (int i = 0; i < IM_ARRAYSIZE(names); i++) ImGui::MenuItem(names[i], "", &toggles[i]); if (ImGui::BeginMenu("Sub-menu")) { ImGui::MenuItem("Click me"); if (ImGui::Button("Stacked Popup")) ImGui::OpenPopup("another popup"); if (ImGui::BeginPopup("another popup")) { ImGui::Text("I am the last one here."); ImGui::EndPopup(); } ImGui::EndMenu(); } ImGui::EndPopup(); } ImGui::EndPopup(); } // Call the more complete ShowExampleMenuFile which we use in various places of this demo if (ImGui::Button("File Menu..")) ImGui::OpenPopup("my_file_popup"); if (ImGui::BeginPopup("my_file_popup")) { ShowExampleMenuFile(); ImGui::EndPopup(); } ImGui::TreePop(); } if (ImGui::TreeNode("Context menus")) { // BeginPopupContextItem() is a helper to provide common/simple popup behavior of essentially doing: // if (IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right)) // OpenPopup(id); // return BeginPopup(id); // For more advanced uses you may want to replicate and customize this code. // See details in BeginPopupContextItem(). static float value = 0.5f; ImGui::Text("Value = %.3f (<-- right-click here)", value); if (ImGui::BeginPopupContextItem("item context menu")) { if (ImGui::Selectable("Set to zero")) value = 0.0f; if (ImGui::Selectable("Set to PI")) value = 3.1415f; ImGui::SetNextItemWidth(-1); ImGui::DragFloat("##Value", &value, 0.1f, 0.0f, 0.0f); ImGui::EndPopup(); } // We can also use OpenPopupContextItem() which is the same as BeginPopupContextItem() but without the // Begin() call. So here we will make it that clicking on the text field with the right mouse button (1) // will toggle the visibility of the popup above. ImGui::Text("(You can also right-click me to open the same popup as above.)"); ImGui::OpenPopupContextItem("item context menu", 1); // When used after an item that has an ID (e.g.Button), we can skip providing an ID to BeginPopupContextItem(). // BeginPopupContextItem() will use the last item ID as the popup ID. // In addition here, we want to include your editable label inside the button label. // We use the ### operator to override the ID (read FAQ about ID for details) static char name[32] = "Label1"; char buf[64]; sprintf(buf, "Button: %s###Button", name); // ### operator override ID ignoring the preceding label ImGui::Button(buf); if (ImGui::BeginPopupContextItem()) { ImGui::Text("Edit name:"); ImGui::InputText("##edit", name, IM_ARRAYSIZE(name)); if (ImGui::Button("Close")) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); } ImGui::SameLine(); ImGui::Text("(<-- right-click here)"); ImGui::TreePop(); } if (ImGui::TreeNode("Modals")) { ImGui::TextWrapped("Modal windows are like popups but the user cannot close them by clicking outside."); if (ImGui::Button("Delete..")) ImGui::OpenPopup("Delete?"); // Always center this window when appearing ImVec2 center(ImGui::GetIO().DisplaySize.x * 0.5f, ImGui::GetIO().DisplaySize.y * 0.5f); ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); if (ImGui::BeginPopupModal("Delete?", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::Text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n"); ImGui::Separator(); //static int unused_i = 0; //ImGui::Combo("Combo", &unused_i, "Delete\0Delete harder\0"); static bool dont_ask_me_next_time = false; ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0)); ImGui::Checkbox("Don't ask me next time", &dont_ask_me_next_time); ImGui::PopStyleVar(); if (ImGui::Button("OK", ImVec2(120, 0))) { ImGui::CloseCurrentPopup(); } ImGui::SetItemDefaultFocus(); ImGui::SameLine(); if (ImGui::Button("Cancel", ImVec2(120, 0))) { ImGui::CloseCurrentPopup(); } ImGui::EndPopup(); } if (ImGui::Button("Stacked modals..")) ImGui::OpenPopup("Stacked 1"); if (ImGui::BeginPopupModal("Stacked 1", NULL, ImGuiWindowFlags_MenuBar)) { if (ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("File")) { if (ImGui::MenuItem("Some menu item")) {} ImGui::EndMenu(); } ImGui::EndMenuBar(); } ImGui::Text("Hello from Stacked The First\nUsing style.Colors[ImGuiCol_ModalWindowDimBg] behind it."); // Testing behavior of widgets stacking their own regular popups over the modal. static int item = 1; static float color[4] = { 0.4f, 0.7f, 0.0f, 0.5f }; ImGui::Combo("Combo", &item, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0"); ImGui::ColorEdit4("color", color); if (ImGui::Button("Add another modal..")) ImGui::OpenPopup("Stacked 2"); // Also demonstrate passing a bool* to BeginPopupModal(), this will create a regular close button which // will close the popup. Note that the visibility state of popups is owned by imgui, so the input value // of the bool actually doesn't matter here. bool unused_open = true; if (ImGui::BeginPopupModal("Stacked 2", &unused_open)) { ImGui::Text("Hello from Stacked The Second!"); if (ImGui::Button("Close")) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); } if (ImGui::Button("Close")) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); } ImGui::TreePop(); } if (ImGui::TreeNode("Menus inside a regular window")) { ImGui::TextWrapped("Below we are testing adding menu items to a regular window. It's rather unusual but should work!"); ImGui::Separator(); // Note: As a quirk in this very specific example, we want to differentiate the parent of this menu from the // parent of the various popup menus above. To do so we are encloding the items in a PushID()/PopID() block // to make them two different menusets. If we don't, opening any popup above and hovering our menu here would // open it. This is because once a menu is active, we allow to switch to a sibling menu by just hovering on it, // which is the desired behavior for regular menus. ImGui::PushID("foo"); ImGui::MenuItem("Menu item", "CTRL+M"); if (ImGui::BeginMenu("Menu inside a regular window")) { ShowExampleMenuFile(); ImGui::EndMenu(); } ImGui::PopID(); ImGui::Separator(); ImGui::TreePop(); } } static void ShowDemoWindowColumns() { if (!ImGui::CollapsingHeader("Columns")) return; ImGui::PushID("Columns"); static bool disable_indent = false; ImGui::Checkbox("Disable tree indentation", &disable_indent); ImGui::SameLine(); HelpMarker("Disable the indenting of tree nodes so demo columns can use the full window width."); if (disable_indent) ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, 0.0f); // Basic columns if (ImGui::TreeNode("Basic")) { ImGui::Text("Without border:"); ImGui::Columns(3, "mycolumns3", false); // 3-ways, no border ImGui::Separator(); for (int n = 0; n < 14; n++) { char label[32]; sprintf(label, "Item %d", n); if (ImGui::Selectable(label)) {} //if (ImGui::Button(label, ImVec2(-FLT_MIN,0.0f))) {} ImGui::NextColumn(); } ImGui::Columns(1); ImGui::Separator(); ImGui::Text("With border:"); ImGui::Columns(4, "mycolumns"); // 4-ways, with border ImGui::Separator(); ImGui::Text("ID"); ImGui::NextColumn(); ImGui::Text("Name"); ImGui::NextColumn(); ImGui::Text("Path"); ImGui::NextColumn(); ImGui::Text("Hovered"); ImGui::NextColumn(); ImGui::Separator(); const char* names[3] = { "One", "Two", "Three" }; const char* paths[3] = { "/path/one", "/path/two", "/path/three" }; static int selected = -1; for (int i = 0; i < 3; i++) { char label[32]; sprintf(label, "%04d", i); if (ImGui::Selectable(label, selected == i, ImGuiSelectableFlags_SpanAllColumns)) selected = i; bool hovered = ImGui::IsItemHovered(); ImGui::NextColumn(); ImGui::Text(names[i]); ImGui::NextColumn(); ImGui::Text(paths[i]); ImGui::NextColumn(); ImGui::Text("%d", hovered); ImGui::NextColumn(); } ImGui::Columns(1); ImGui::Separator(); ImGui::TreePop(); } if (ImGui::TreeNode("Borders")) { // NB: Future columns API should allow automatic horizontal borders. static bool h_borders = true; static bool v_borders = true; static int columns_count = 4; const int lines_count = 3; ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8); ImGui::DragInt("##columns_count", &columns_count, 0.1f, 2, 10, "%d columns"); if (columns_count < 2) columns_count = 2; ImGui::SameLine(); ImGui::Checkbox("horizontal", &h_borders); ImGui::SameLine(); ImGui::Checkbox("vertical", &v_borders); ImGui::Columns(columns_count, NULL, v_borders); for (int i = 0; i < columns_count * lines_count; i++) { if (h_borders && ImGui::GetColumnIndex() == 0) ImGui::Separator(); ImGui::Text("%c%c%c", 'a' + i, 'a' + i, 'a' + i); ImGui::Text("Width %.2f", ImGui::GetColumnWidth()); ImGui::Text("Avail %.2f", ImGui::GetContentRegionAvail().x); ImGui::Text("Offset %.2f", ImGui::GetColumnOffset()); ImGui::Text("Long text that is likely to clip"); ImGui::Button("Button", ImVec2(-FLT_MIN, 0.0f)); ImGui::NextColumn(); } ImGui::Columns(1); if (h_borders) ImGui::Separator(); ImGui::TreePop(); } // Create multiple items in a same cell before switching to next column if (ImGui::TreeNode("Mixed items")) { ImGui::Columns(3, "mixed"); ImGui::Separator(); ImGui::Text("Hello"); ImGui::Button("Banana"); ImGui::NextColumn(); ImGui::Text("ImGui"); ImGui::Button("Apple"); static float foo = 1.0f; ImGui::InputFloat("red", &foo, 0.05f, 0, "%.3f"); ImGui::Text("An extra line here."); ImGui::NextColumn(); ImGui::Text("Sailor"); ImGui::Button("Corniflower"); static float bar = 1.0f; ImGui::InputFloat("blue", &bar, 0.05f, 0, "%.3f"); ImGui::NextColumn(); if (ImGui::CollapsingHeader("Category A")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn(); if (ImGui::CollapsingHeader("Category B")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn(); if (ImGui::CollapsingHeader("Category C")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn(); ImGui::Columns(1); ImGui::Separator(); ImGui::TreePop(); } // Word wrapping if (ImGui::TreeNode("Word-wrapping")) { ImGui::Columns(2, "word-wrapping"); ImGui::Separator(); ImGui::TextWrapped("The quick brown fox jumps over the lazy dog."); ImGui::TextWrapped("Hello Left"); ImGui::NextColumn(); ImGui::TextWrapped("The quick brown fox jumps over the lazy dog."); ImGui::TextWrapped("Hello Right"); ImGui::Columns(1); ImGui::Separator(); ImGui::TreePop(); } // Scrolling columns /* if (ImGui::TreeNode("Vertical Scrolling")) { ImGui::BeginChild("##header", ImVec2(0, ImGui::GetTextLineHeightWithSpacing()+ImGui::GetStyle().ItemSpacing.y)); ImGui::Columns(3); ImGui::Text("ID"); ImGui::NextColumn(); ImGui::Text("Name"); ImGui::NextColumn(); ImGui::Text("Path"); ImGui::NextColumn(); ImGui::Columns(1); ImGui::Separator(); ImGui::EndChild(); ImGui::BeginChild("##scrollingregion", ImVec2(0, 60)); ImGui::Columns(3); for (int i = 0; i < 10; i++) { ImGui::Text("%04d", i); ImGui::NextColumn(); ImGui::Text("Foobar"); ImGui::NextColumn(); ImGui::Text("/path/foobar/%04d/", i); ImGui::NextColumn(); } ImGui::Columns(1); ImGui::EndChild(); ImGui::TreePop(); } */ if (ImGui::TreeNode("Horizontal Scrolling")) { ImGui::SetNextWindowContentSize(ImVec2(1500.0f, 0.0f)); ImVec2 child_size = ImVec2(0, ImGui::GetFontSize() * 20.0f); ImGui::BeginChild("##ScrollingRegion", child_size, false, ImGuiWindowFlags_HorizontalScrollbar); ImGui::Columns(10); int ITEMS_COUNT = 2000; ImGuiListClipper clipper(ITEMS_COUNT); // Also demonstrate using the clipper for large list while (clipper.Step()) { for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) for (int j = 0; j < 10; j++) { ImGui::Text("Line %d Column %d...", i, j); ImGui::NextColumn(); } } ImGui::Columns(1); ImGui::EndChild(); ImGui::TreePop(); } if (ImGui::TreeNode("Tree")) { ImGui::Columns(2, "tree", true); for (int x = 0; x < 3; x++) { bool open1 = ImGui::TreeNode((void*)(intptr_t)x, "Node%d", x); ImGui::NextColumn(); ImGui::Text("Node contents"); ImGui::NextColumn(); if (open1) { for (int y = 0; y < 3; y++) { bool open2 = ImGui::TreeNode((void*)(intptr_t)y, "Node%d.%d", x, y); ImGui::NextColumn(); ImGui::Text("Node contents"); if (open2) { ImGui::Text("Even more contents"); if (ImGui::TreeNode("Tree in column")) { ImGui::Text("The quick brown fox jumps over the lazy dog"); ImGui::TreePop(); } } ImGui::NextColumn(); if (open2) ImGui::TreePop(); } ImGui::TreePop(); } } ImGui::Columns(1); ImGui::TreePop(); } if (disable_indent) ImGui::PopStyleVar(); ImGui::PopID(); } static void ShowDemoWindowMisc() { if (ImGui::CollapsingHeader("Filtering")) { // Helper class to easy setup a text filter. // You may want to implement a more feature-full filtering scheme in your own application. static ImGuiTextFilter filter; ImGui::Text("Filter usage:\n" " \"\" display all lines\n" " \"xxx\" display lines containing \"xxx\"\n" " \"xxx,yyy\" display lines containing \"xxx\" or \"yyy\"\n" " \"-xxx\" hide lines containing \"xxx\""); filter.Draw(); const char* lines[] = { "aaa1.c", "bbb1.c", "ccc1.c", "aaa2.cpp", "bbb2.cpp", "ccc2.cpp", "abc.h", "hello, world" }; for (int i = 0; i < IM_ARRAYSIZE(lines); i++) if (filter.PassFilter(lines[i])) ImGui::BulletText("%s", lines[i]); } if (ImGui::CollapsingHeader("Inputs, Navigation & Focus")) { ImGuiIO& io = ImGui::GetIO(); // Display ImGuiIO output flags ImGui::Text("WantCaptureMouse: %d", io.WantCaptureMouse); ImGui::Text("WantCaptureKeyboard: %d", io.WantCaptureKeyboard); ImGui::Text("WantTextInput: %d", io.WantTextInput); ImGui::Text("WantSetMousePos: %d", io.WantSetMousePos); ImGui::Text("NavActive: %d, NavVisible: %d", io.NavActive, io.NavVisible); // Display Keyboard/Mouse state if (ImGui::TreeNode("Keyboard, Mouse & Navigation State")) { if (ImGui::IsMousePosValid()) ImGui::Text("Mouse pos: (%g, %g)", io.MousePos.x, io.MousePos.y); else ImGui::Text("Mouse pos: <INVALID>"); ImGui::Text("Mouse delta: (%g, %g)", io.MouseDelta.x, io.MouseDelta.y); ImGui::Text("Mouse down:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (io.MouseDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]); } ImGui::Text("Mouse clicked:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseClicked(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } ImGui::Text("Mouse dblclick:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseDoubleClicked(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } ImGui::Text("Mouse released:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseReleased(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } ImGui::Text("Mouse wheel: %.1f", io.MouseWheel); ImGui::Text("Keys down:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (io.KeysDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("%d (0x%X) (%.02f secs)", i, i, io.KeysDownDuration[i]); } ImGui::Text("Keys pressed:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyPressed(i)) { ImGui::SameLine(); ImGui::Text("%d (0x%X)", i, i); } ImGui::Text("Keys release:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyReleased(i)) { ImGui::SameLine(); ImGui::Text("%d (0x%X)", i, i); } ImGui::Text("Keys mods: %s%s%s%s", io.KeyCtrl ? "CTRL " : "", io.KeyShift ? "SHIFT " : "", io.KeyAlt ? "ALT " : "", io.KeySuper ? "SUPER " : ""); ImGui::Text("Chars queue:"); for (int i = 0; i < io.InputQueueCharacters.Size; i++) { ImWchar c = io.InputQueueCharacters[i]; ImGui::SameLine(); ImGui::Text("\'%c\' (0x%04X)", (c > ' ' && c <= 255) ? (char)c : '?', c); } // FIXME: We should convert 'c' to UTF-8 here but the functions are not public. ImGui::Text("NavInputs down:"); for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++) if (io.NavInputs[i] > 0.0f) { ImGui::SameLine(); ImGui::Text("[%d] %.2f", i, io.NavInputs[i]); } ImGui::Text("NavInputs pressed:"); for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++) if (io.NavInputsDownDuration[i] == 0.0f) { ImGui::SameLine(); ImGui::Text("[%d]", i); } ImGui::Text("NavInputs duration:"); for (int i = 0; i < IM_ARRAYSIZE(io.NavInputs); i++) if (io.NavInputsDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("[%d] %.2f", i, io.NavInputsDownDuration[i]); } ImGui::Button("Hovering me sets the\nkeyboard capture flag"); if (ImGui::IsItemHovered()) ImGui::CaptureKeyboardFromApp(true); ImGui::SameLine(); ImGui::Button("Holding me clears the\nthe keyboard capture flag"); if (ImGui::IsItemActive()) ImGui::CaptureKeyboardFromApp(false); ImGui::TreePop(); } if (ImGui::TreeNode("Tabbing")) { ImGui::Text("Use TAB/SHIFT+TAB to cycle through keyboard editable fields."); static char buf[32] = "hello"; ImGui::InputText("1", buf, IM_ARRAYSIZE(buf)); ImGui::InputText("2", buf, IM_ARRAYSIZE(buf)); ImGui::InputText("3", buf, IM_ARRAYSIZE(buf)); ImGui::PushAllowKeyboardFocus(false); ImGui::InputText("4 (tab skip)", buf, IM_ARRAYSIZE(buf)); //ImGui::SameLine(); HelpMarker("Use ImGui::PushAllowKeyboardFocus(bool) to disable tabbing through certain widgets."); ImGui::PopAllowKeyboardFocus(); ImGui::InputText("5", buf, IM_ARRAYSIZE(buf)); ImGui::TreePop(); } if (ImGui::TreeNode("Focus from code")) { bool focus_1 = ImGui::Button("Focus on 1"); ImGui::SameLine(); bool focus_2 = ImGui::Button("Focus on 2"); ImGui::SameLine(); bool focus_3 = ImGui::Button("Focus on 3"); int has_focus = 0; static char buf[128] = "click on a button to set focus"; if (focus_1) ImGui::SetKeyboardFocusHere(); ImGui::InputText("1", buf, IM_ARRAYSIZE(buf)); if (ImGui::IsItemActive()) has_focus = 1; if (focus_2) ImGui::SetKeyboardFocusHere(); ImGui::InputText("2", buf, IM_ARRAYSIZE(buf)); if (ImGui::IsItemActive()) has_focus = 2; ImGui::PushAllowKeyboardFocus(false); if (focus_3) ImGui::SetKeyboardFocusHere(); ImGui::InputText("3 (tab skip)", buf, IM_ARRAYSIZE(buf)); if (ImGui::IsItemActive()) has_focus = 3; ImGui::PopAllowKeyboardFocus(); if (has_focus) ImGui::Text("Item with focus: %d", has_focus); else ImGui::Text("Item with focus: <none>"); // Use >= 0 parameter to SetKeyboardFocusHere() to focus an upcoming item static float f3[3] = { 0.0f, 0.0f, 0.0f }; int focus_ahead = -1; if (ImGui::Button("Focus on X")) { focus_ahead = 0; } ImGui::SameLine(); if (ImGui::Button("Focus on Y")) { focus_ahead = 1; } ImGui::SameLine(); if (ImGui::Button("Focus on Z")) { focus_ahead = 2; } if (focus_ahead != -1) ImGui::SetKeyboardFocusHere(focus_ahead); ImGui::SliderFloat3("Float3", &f3[0], 0.0f, 1.0f); ImGui::TextWrapped("NB: Cursor & selection are preserved when refocusing last used item in code."); ImGui::TreePop(); } if (ImGui::TreeNode("Dragging")) { ImGui::TextWrapped("You can use ImGui::GetMouseDragDelta(0) to query for the dragged amount on any widget."); for (int button = 0; button < 3; button++) { ImGui::Text("IsMouseDragging(%d):", button); ImGui::Text(" w/ default threshold: %d,", ImGui::IsMouseDragging(button)); ImGui::Text(" w/ zero threshold: %d,", ImGui::IsMouseDragging(button, 0.0f)); ImGui::Text(" w/ large threshold: %d,", ImGui::IsMouseDragging(button, 20.0f)); } ImGui::Button("Drag Me"); if (ImGui::IsItemActive()) ImGui::GetForegroundDrawList()->AddLine(io.MouseClickedPos[0], io.MousePos, ImGui::GetColorU32(ImGuiCol_Button), 4.0f); // Draw a line between the button and the mouse cursor // Drag operations gets "unlocked" when the mouse has moved past a certain threshold // (the default threshold is stored in io.MouseDragThreshold). You can request a lower or higher // threshold using the second parameter of IsMouseDragging() and GetMouseDragDelta(). ImVec2 value_raw = ImGui::GetMouseDragDelta(0, 0.0f); ImVec2 value_with_lock_threshold = ImGui::GetMouseDragDelta(0); ImVec2 mouse_delta = io.MouseDelta; ImGui::Text("GetMouseDragDelta(0):"); ImGui::Text(" w/ default threshold: (%.1f, %.1f)", value_with_lock_threshold.x, value_with_lock_threshold.y); ImGui::Text(" w/ zero threshold: (%.1f, %.1f)", value_raw.x, value_raw.y); ImGui::Text("io.MouseDelta: (%.1f, %.1f)", mouse_delta.x, mouse_delta.y); ImGui::TreePop(); } if (ImGui::TreeNode("Mouse cursors")) { const char* mouse_cursors_names[] = { "Arrow", "TextInput", "ResizeAll", "ResizeNS", "ResizeEW", "ResizeNESW", "ResizeNWSE", "Hand", "NotAllowed" }; IM_ASSERT(IM_ARRAYSIZE(mouse_cursors_names) == ImGuiMouseCursor_COUNT); ImGuiMouseCursor current = ImGui::GetMouseCursor(); ImGui::Text("Current mouse cursor = %d: %s", current, mouse_cursors_names[current]); ImGui::Text("Hover to see mouse cursors:"); ImGui::SameLine(); HelpMarker( "Your application can render a different mouse cursor based on what ImGui::GetMouseCursor() returns. " "If software cursor rendering (io.MouseDrawCursor) is set ImGui will draw the right cursor for you, " "otherwise your backend needs to handle it."); for (int i = 0; i < ImGuiMouseCursor_COUNT; i++) { char label[32]; sprintf(label, "Mouse cursor %d: %s", i, mouse_cursors_names[i]); ImGui::Bullet(); ImGui::Selectable(label, false); if (ImGui::IsItemHovered() || ImGui::IsItemFocused()) ImGui::SetMouseCursor(i); } ImGui::TreePop(); } } } //----------------------------------------------------------------------------- // [SECTION] About Window / ShowAboutWindow() // Access from Dear ImGui Demo -> Tools -> About //----------------------------------------------------------------------------- void ImGui::ShowAboutWindow(bool* p_open) { if (!ImGui::Begin("About Dear ImGui", p_open, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::End(); return; } ImGui::Text("Dear ImGui %s", ImGui::GetVersion()); ImGui::Separator(); ImGui::Text("By Omar Cornut and all Dear ImGui contributors."); ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information."); static bool show_config_info = false; ImGui::Checkbox("Config/Build Information", &show_config_info); if (show_config_info) { ImGuiIO& io = ImGui::GetIO(); ImGuiStyle& style = ImGui::GetStyle(); bool copy_to_clipboard = ImGui::Button("Copy to clipboard"); ImVec2 child_size = ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 18); ImGui::BeginChildFrame(ImGui::GetID("cfg_infos"), child_size, ImGuiWindowFlags_NoMove); if (copy_to_clipboard) { ImGui::LogToClipboard(); ImGui::LogText("```\n"); // Back quotes will make text appears without formatting when pasting on GitHub } ImGui::Text("Dear ImGui %s (%d)", IMGUI_VERSION, IMGUI_VERSION_NUM); ImGui::Separator(); ImGui::Text("sizeof(size_t): %d, sizeof(ImDrawIdx): %d, sizeof(ImDrawVert): %d", (int)sizeof(size_t), (int)sizeof(ImDrawIdx), (int)sizeof(ImDrawVert)); ImGui::Text("define: __cplusplus=%d", (int)__cplusplus); #ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_OBSOLETE_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_WIN32_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_WIN32_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_FILE_FUNCTIONS ImGui::Text("define: IMGUI_DISABLE_FILE_FUNCTIONS"); #endif #ifdef IMGUI_DISABLE_DEFAULT_ALLOCATORS ImGui::Text("define: IMGUI_DISABLE_DEFAULT_ALLOCATORS"); #endif #ifdef IMGUI_USE_BGRA_PACKED_COLOR ImGui::Text("define: IMGUI_USE_BGRA_PACKED_COLOR"); #endif #ifdef _WIN32 ImGui::Text("define: _WIN32"); #endif #ifdef _WIN64 ImGui::Text("define: _WIN64"); #endif #ifdef __linux__ ImGui::Text("define: __linux__"); #endif #ifdef __APPLE__ ImGui::Text("define: __APPLE__"); #endif #ifdef _MSC_VER ImGui::Text("define: _MSC_VER=%d", _MSC_VER); #endif #ifdef __MINGW32__ ImGui::Text("define: __MINGW32__"); #endif #ifdef __MINGW64__ ImGui::Text("define: __MINGW64__"); #endif #ifdef __GNUC__ ImGui::Text("define: __GNUC__=%d", (int)__GNUC__); #endif #ifdef __clang_version__ ImGui::Text("define: __clang_version__=%s", __clang_version__); #endif ImGui::Separator(); ImGui::Text("io.BackendPlatformName: %s", io.BackendPlatformName ? io.BackendPlatformName : "NULL"); ImGui::Text("io.BackendRendererName: %s", io.BackendRendererName ? io.BackendRendererName : "NULL"); ImGui::Text("io.ConfigFlags: 0x%08X", io.ConfigFlags); if (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) ImGui::Text(" NavEnableKeyboard"); if (io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) ImGui::Text(" NavEnableGamepad"); if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) ImGui::Text(" NavEnableSetMousePos"); if (io.ConfigFlags & ImGuiConfigFlags_NavNoCaptureKeyboard) ImGui::Text(" NavNoCaptureKeyboard"); if (io.ConfigFlags & ImGuiConfigFlags_NoMouse) ImGui::Text(" NoMouse"); if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange) ImGui::Text(" NoMouseCursorChange"); if (io.MouseDrawCursor) ImGui::Text("io.MouseDrawCursor"); if (io.ConfigMacOSXBehaviors) ImGui::Text("io.ConfigMacOSXBehaviors"); if (io.ConfigInputTextCursorBlink) ImGui::Text("io.ConfigInputTextCursorBlink"); if (io.ConfigWindowsResizeFromEdges) ImGui::Text("io.ConfigWindowsResizeFromEdges"); if (io.ConfigWindowsMoveFromTitleBarOnly) ImGui::Text("io.ConfigWindowsMoveFromTitleBarOnly"); if (io.ConfigWindowsMemoryCompactTimer >= 0.0f) ImGui::Text("io.ConfigWindowsMemoryCompactTimer = %.1ff", io.ConfigWindowsMemoryCompactTimer); ImGui::Text("io.BackendFlags: 0x%08X", io.BackendFlags); if (io.BackendFlags & ImGuiBackendFlags_HasGamepad) ImGui::Text(" HasGamepad"); if (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) ImGui::Text(" HasMouseCursors"); if (io.BackendFlags & ImGuiBackendFlags_HasSetMousePos) ImGui::Text(" HasSetMousePos"); if (io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset) ImGui::Text(" RendererHasVtxOffset"); ImGui::Separator(); ImGui::Text("io.Fonts: %d fonts, Flags: 0x%08X, TexSize: %d,%d", io.Fonts->Fonts.Size, io.Fonts->Flags, io.Fonts->TexWidth, io.Fonts->TexHeight); ImGui::Text("io.DisplaySize: %.2f,%.2f", io.DisplaySize.x, io.DisplaySize.y); ImGui::Text("io.DisplayFramebufferScale: %.2f,%.2f", io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y); ImGui::Separator(); ImGui::Text("style.WindowPadding: %.2f,%.2f", style.WindowPadding.x, style.WindowPadding.y); ImGui::Text("style.WindowBorderSize: %.2f", style.WindowBorderSize); ImGui::Text("style.FramePadding: %.2f,%.2f", style.FramePadding.x, style.FramePadding.y); ImGui::Text("style.FrameRounding: %.2f", style.FrameRounding); ImGui::Text("style.FrameBorderSize: %.2f", style.FrameBorderSize); ImGui::Text("style.ItemSpacing: %.2f,%.2f", style.ItemSpacing.x, style.ItemSpacing.y); ImGui::Text("style.ItemInnerSpacing: %.2f,%.2f", style.ItemInnerSpacing.x, style.ItemInnerSpacing.y); if (copy_to_clipboard) { ImGui::LogText("\n```\n"); ImGui::LogFinish(); } ImGui::EndChildFrame(); } ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Style Editor / ShowStyleEditor() //----------------------------------------------------------------------------- // - ShowStyleSelector() // - ShowFontSelector() // - ShowStyleEditor() //----------------------------------------------------------------------------- // Demo helper function to select among default colors. See ShowStyleEditor() for more advanced options. // Here we use the simplified Combo() api that packs items into a single literal string. // Useful for quick combo boxes where the choices are known locally. bool ImGui::ShowStyleSelector(const char* label) { static int style_idx = -1; if (ImGui::Combo(label, &style_idx, "Classic\0Dark\0Light\0")) { switch (style_idx) { case 0: ImGui::StyleColorsClassic(); break; case 1: ImGui::StyleColorsDark(); break; case 2: ImGui::StyleColorsLight(); break; } return true; } return false; } // Demo helper function to select among loaded fonts. // Here we use the regular BeginCombo()/EndCombo() api which is more the more flexible one. void ImGui::ShowFontSelector(const char* label) { ImGuiIO& io = ImGui::GetIO(); ImFont* font_current = ImGui::GetFont(); if (ImGui::BeginCombo(label, font_current->GetDebugName())) { for (int n = 0; n < io.Fonts->Fonts.Size; n++) { ImFont* font = io.Fonts->Fonts[n]; ImGui::PushID((void*)font); if (ImGui::Selectable(font->GetDebugName(), font == font_current)) io.FontDefault = font; ImGui::PopID(); } ImGui::EndCombo(); } ImGui::SameLine(); HelpMarker( "- Load additional fonts with io.Fonts->AddFontFromFileTTF().\n" "- The font atlas is built when calling io.Fonts->GetTexDataAsXXXX() or io.Fonts->Build().\n" "- Read FAQ and docs/FONTS.md for more details.\n" "- If you need to add/remove fonts at runtime (e.g. for DPI change), do it before calling NewFrame()."); } // [Internal] Display details for a single font, called by ShowStyleEditor(). static void NodeFont(ImFont* font) { ImGuiIO& io = ImGui::GetIO(); ImGuiStyle& style = ImGui::GetStyle(); bool font_details_opened = ImGui::TreeNode(font, "Font: \"%s\"\n%.2f px, %d glyphs, %d file(s)", font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size, font->ConfigDataCount); ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) { io.FontDefault = font; } if (!font_details_opened) return; ImGui::PushFont(font); ImGui::Text("The quick brown fox jumps over the lazy dog"); ImGui::PopFont(); ImGui::DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); // Scale only this font ImGui::SameLine(); HelpMarker( "Note than the default embedded font is NOT meant to be scaled.\n\n" "Font are currently rendered into bitmaps at a given size at the time of building the atlas. " "You may oversample them to get some flexibility with scaling. " "You can also render at multiple sizes and select which one to use at runtime.\n\n" "(Glimmer of hope: the atlas system will be rewritten in the future to make scaling more flexible.)"); ImGui::InputFloat("Font offset", &font->DisplayOffset.y, 1, 1, "%.0f"); ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent); ImGui::Text("Fallback character: '%c' (U+%04X)", font->FallbackChar, font->FallbackChar); ImGui::Text("Ellipsis character: '%c' (U+%04X)", font->EllipsisChar, font->EllipsisChar); const int surface_sqrt = (int)sqrtf((float)font->MetricsTotalSurface); ImGui::Text("Texture Area: about %d px ~%dx%d px", font->MetricsTotalSurface, surface_sqrt, surface_sqrt); for (int config_i = 0; config_i < font->ConfigDataCount; config_i++) if (font->ConfigData) if (const ImFontConfig* cfg = &font->ConfigData[config_i]) ImGui::BulletText("Input %d: \'%s\', Oversample: (%d,%d), PixelSnapH: %d", config_i, cfg->Name, cfg->OversampleH, cfg->OversampleV, cfg->PixelSnapH); if (ImGui::TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size)) { // Display all glyphs of the fonts in separate pages of 256 characters const ImU32 glyph_col = ImGui::GetColorU32(ImGuiCol_Text); for (unsigned int base = 0; base <= IM_UNICODE_CODEPOINT_MAX; base += 256) { // Skip ahead if a large bunch of glyphs are not present in the font (test in chunks of 4k) // This is only a small optimization to reduce the number of iterations when IM_UNICODE_MAX_CODEPOINT // is large // (if ImWchar==ImWchar32 we will do at least about 272 queries here) if (!(base & 4095) && font->IsGlyphRangeUnused(base, base + 4095)) { base += 4096 - 256; continue; } int count = 0; for (unsigned int n = 0; n < 256; n++) if (font->FindGlyphNoFallback((ImWchar)(base + n))) count++; if (count <= 0) continue; if (!ImGui::TreeNode((void*)(intptr_t)base, "U+%04X..U+%04X (%d %s)", base, base + 255, count, count > 1 ? "glyphs" : "glyph")) continue; float cell_size = font->FontSize * 1; float cell_spacing = style.ItemSpacing.y; ImVec2 base_pos = ImGui::GetCursorScreenPos(); ImDrawList* draw_list = ImGui::GetWindowDrawList(); for (unsigned int n = 0; n < 256; n++) { // We use ImFont::RenderChar as a shortcut because we don't have UTF-8 conversion functions // available here and thus cannot easily generate a zero-terminated UTF-8 encoded string. ImVec2 cell_p1(base_pos.x + (n % 16) * (cell_size + cell_spacing), base_pos.y + (n / 16) * (cell_size + cell_spacing)); ImVec2 cell_p2(cell_p1.x + cell_size, cell_p1.y + cell_size); const ImFontGlyph* glyph = font->FindGlyphNoFallback((ImWchar)(base + n)); draw_list->AddRect(cell_p1, cell_p2, glyph ? IM_COL32(255, 255, 255, 100) : IM_COL32(255, 255, 255, 50)); if (glyph) font->RenderChar(draw_list, cell_size, cell_p1, glyph_col, (ImWchar)(base + n)); if (glyph && ImGui::IsMouseHoveringRect(cell_p1, cell_p2)) { ImGui::BeginTooltip(); ImGui::Text("Codepoint: U+%04X", base + n); ImGui::Separator(); ImGui::Text("Visible: %d", glyph->Visible); ImGui::Text("AdvanceX: %.1f", glyph->AdvanceX); ImGui::Text("Pos: (%.2f,%.2f)->(%.2f,%.2f)", glyph->X0, glyph->Y0, glyph->X1, glyph->Y1); ImGui::Text("UV: (%.3f,%.3f)->(%.3f,%.3f)", glyph->U0, glyph->V0, glyph->U1, glyph->V1); ImGui::EndTooltip(); } } ImGui::Dummy(ImVec2((cell_size + cell_spacing) * 16, (cell_size + cell_spacing) * 16)); ImGui::TreePop(); } ImGui::TreePop(); } ImGui::TreePop(); } void ImGui::ShowStyleEditor(ImGuiStyle* ref) { // You can pass in a reference ImGuiStyle structure to compare to, revert to and save to // (without a reference style pointer, we will use one compared locally as a reference) ImGuiStyle& style = ImGui::GetStyle(); static ImGuiStyle ref_saved_style; // Default to using internal storage as reference static bool init = true; if (init && ref == NULL) ref_saved_style = style; init = false; if (ref == NULL) ref = &ref_saved_style; ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.50f); if (ImGui::ShowStyleSelector("Colors##Selector")) ref_saved_style = style; ImGui::ShowFontSelector("Fonts##Selector"); // Simplified Settings (expose floating-pointer border sizes as boolean representing 0.0f or 1.0f) if (ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 12.0f, "%.0f")) style.GrabRounding = style.FrameRounding; // Make GrabRounding always the same value as FrameRounding { bool border = (style.WindowBorderSize > 0.0f); if (ImGui::Checkbox("WindowBorder", &border)) { style.WindowBorderSize = border ? 1.0f : 0.0f; } } ImGui::SameLine(); { bool border = (style.FrameBorderSize > 0.0f); if (ImGui::Checkbox("FrameBorder", &border)) { style.FrameBorderSize = border ? 1.0f : 0.0f; } } ImGui::SameLine(); { bool border = (style.PopupBorderSize > 0.0f); if (ImGui::Checkbox("PopupBorder", &border)) { style.PopupBorderSize = border ? 1.0f : 0.0f; } } // Save/Revert button if (ImGui::Button("Save Ref")) *ref = ref_saved_style = style; ImGui::SameLine(); if (ImGui::Button("Revert Ref")) style = *ref; ImGui::SameLine(); HelpMarker( "Save/Revert in local non-persistent storage. Default Colors definition are not affected. " "Use \"Export\" below to save them somewhere."); ImGui::Separator(); if (ImGui::BeginTabBar("##tabs", ImGuiTabBarFlags_None)) { if (ImGui::BeginTabItem("Sizes")) { ImGui::Text("Main"); ImGui::SliderFloat2("WindowPadding", (float*)&style.WindowPadding, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("FramePadding", (float*)&style.FramePadding, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f"); ImGui::SliderFloat("IndentSpacing", &style.IndentSpacing, 0.0f, 30.0f, "%.0f"); ImGui::SliderFloat("ScrollbarSize", &style.ScrollbarSize, 1.0f, 20.0f, "%.0f"); ImGui::SliderFloat("GrabMinSize", &style.GrabMinSize, 1.0f, 20.0f, "%.0f"); ImGui::Text("Borders"); ImGui::SliderFloat("WindowBorderSize", &style.WindowBorderSize, 0.0f, 1.0f, "%.0f"); ImGui::SliderFloat("ChildBorderSize", &style.ChildBorderSize, 0.0f, 1.0f, "%.0f"); ImGui::SliderFloat("PopupBorderSize", &style.PopupBorderSize, 0.0f, 1.0f, "%.0f"); ImGui::SliderFloat("FrameBorderSize", &style.FrameBorderSize, 0.0f, 1.0f, "%.0f"); ImGui::SliderFloat("TabBorderSize", &style.TabBorderSize, 0.0f, 1.0f, "%.0f"); ImGui::Text("Rounding"); ImGui::SliderFloat("WindowRounding", &style.WindowRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("ChildRounding", &style.ChildRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("PopupRounding", &style.PopupRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("ScrollbarRounding", &style.ScrollbarRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("GrabRounding", &style.GrabRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("LogSliderDeadzone", &style.LogSliderDeadzone, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("TabRounding", &style.TabRounding, 0.0f, 12.0f, "%.0f"); ImGui::Text("Alignment"); ImGui::SliderFloat2("WindowTitleAlign", (float*)&style.WindowTitleAlign, 0.0f, 1.0f, "%.2f"); int window_menu_button_position = style.WindowMenuButtonPosition + 1; if (ImGui::Combo("WindowMenuButtonPosition", (int*)&window_menu_button_position, "None\0Left\0Right\0")) style.WindowMenuButtonPosition = window_menu_button_position - 1; ImGui::Combo("ColorButtonPosition", (int*)&style.ColorButtonPosition, "Left\0Right\0"); ImGui::SliderFloat2("ButtonTextAlign", (float*)&style.ButtonTextAlign, 0.0f, 1.0f, "%.2f"); ImGui::SameLine(); HelpMarker("Alignment applies when a button is larger than its text content."); ImGui::SliderFloat2("SelectableTextAlign", (float*)&style.SelectableTextAlign, 0.0f, 1.0f, "%.2f"); ImGui::SameLine(); HelpMarker("Alignment applies when a selectable is larger than its text content."); ImGui::Text("Safe Area Padding"); ImGui::SameLine(); HelpMarker("Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured)."); ImGui::SliderFloat2("DisplaySafeAreaPadding", (float*)&style.DisplaySafeAreaPadding, 0.0f, 30.0f, "%.0f"); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Colors")) { static int output_dest = 0; static bool output_only_modified = true; if (ImGui::Button("Export")) { if (output_dest == 0) ImGui::LogToClipboard(); else ImGui::LogToTTY(); ImGui::LogText("ImVec4* colors = ImGui::GetStyle().Colors;" IM_NEWLINE); for (int i = 0; i < ImGuiCol_COUNT; i++) { const ImVec4& col = style.Colors[i]; const char* name = ImGui::GetStyleColorName(i); if (!output_only_modified || memcmp(&col, &ref->Colors[i], sizeof(ImVec4)) != 0) ImGui::LogText("colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 23 - (int)strlen(name), "", col.x, col.y, col.z, col.w); } ImGui::LogFinish(); } ImGui::SameLine(); ImGui::SetNextItemWidth(120); ImGui::Combo("##output_type", &output_dest, "To Clipboard\0To TTY\0"); ImGui::SameLine(); ImGui::Checkbox("Only Modified Colors", &output_only_modified); static ImGuiTextFilter filter; filter.Draw("Filter colors", ImGui::GetFontSize() * 16); static ImGuiColorEditFlags alpha_flags = 0; if (ImGui::RadioButton("Opaque", alpha_flags == ImGuiColorEditFlags_None)) { alpha_flags = ImGuiColorEditFlags_None; } ImGui::SameLine(); if (ImGui::RadioButton("Alpha", alpha_flags == ImGuiColorEditFlags_AlphaPreview)) { alpha_flags = ImGuiColorEditFlags_AlphaPreview; } ImGui::SameLine(); if (ImGui::RadioButton("Both", alpha_flags == ImGuiColorEditFlags_AlphaPreviewHalf)) { alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; } ImGui::SameLine(); HelpMarker( "In the color list:\n" "Left-click on colored square to open color picker,\n" "Right-click to open edit options menu."); ImGui::BeginChild("##colors", ImVec2(0, 0), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened); ImGui::PushItemWidth(-160); for (int i = 0; i < ImGuiCol_COUNT; i++) { const char* name = ImGui::GetStyleColorName(i); if (!filter.PassFilter(name)) continue; ImGui::PushID(i); ImGui::ColorEdit4("##color", (float*)&style.Colors[i], ImGuiColorEditFlags_AlphaBar | alpha_flags); if (memcmp(&style.Colors[i], &ref->Colors[i], sizeof(ImVec4)) != 0) { // Tips: in a real user application, you may want to merge and use an icon font into the main font, // so instead of "Save"/"Revert" you'd use icons! // Read the FAQ and docs/FONTS.md about using icon fonts. It's really easy and super convenient! ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Save")) { ref->Colors[i] = style.Colors[i]; } ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Revert")) { style.Colors[i] = ref->Colors[i]; } } ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); ImGui::TextUnformatted(name); ImGui::PopID(); } ImGui::PopItemWidth(); ImGui::EndChild(); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Fonts")) { ImGuiIO& io = ImGui::GetIO(); ImFontAtlas* atlas = io.Fonts; HelpMarker("Read FAQ and docs/FONTS.md for details on font loading."); ImGui::PushItemWidth(120); for (int i = 0; i < atlas->Fonts.Size; i++) { ImFont* font = atlas->Fonts[i]; ImGui::PushID(font); NodeFont(font); ImGui::PopID(); } if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight)) { ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); ImVec4 border_col = ImVec4(1.0f, 1.0f, 1.0f, 0.5f); ImGui::Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0, 0), ImVec2(1, 1), tint_col, border_col); ImGui::TreePop(); } // Post-baking font scaling. Note that this is NOT the nice way of scaling fonts, read below. // (we enforce hard clamping manually as by default DragFloat/SliderFloat allows CTRL+Click text to get out of bounds). const float MIN_SCALE = 0.3f; const float MAX_SCALE = 2.0f; HelpMarker( "Those are old settings provided for convenience.\n" "However, the _correct_ way of scaling your UI is currently to reload your font at the designed size, " "rebuild the font atlas, and call style.ScaleAllSizes() on a reference ImGuiStyle structure.\n" "Using those settings here will give you poor quality results."); static float window_scale = 1.0f; if (ImGui::DragFloat("window scale", &window_scale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_ClampOnInput)) // Scale only this window ImGui::SetWindowFontScale(window_scale); ImGui::DragFloat("global scale", &io.FontGlobalScale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_ClampOnInput); // Scale everything ImGui::PopItemWidth(); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Rendering")) { ImGui::Checkbox("Anti-aliased lines", &style.AntiAliasedLines); ImGui::SameLine(); HelpMarker("When disabling anti-aliasing lines, you'll probably want to disable borders in your style as well."); ImGui::Checkbox("Anti-aliased lines use texture", &style.AntiAliasedLinesUseTex); ImGui::SameLine(); HelpMarker("Faster lines using texture data. Require back-end to render with bilinear filtering (not point/nearest filtering)."); ImGui::Checkbox("Anti-aliased fill", &style.AntiAliasedFill); ImGui::PushItemWidth(100); ImGui::DragFloat("Curve Tessellation Tolerance", &style.CurveTessellationTol, 0.02f, 0.10f, 10.0f, "%.2f"); if (style.CurveTessellationTol < 0.10f) style.CurveTessellationTol = 0.10f; // When editing the "Circle Segment Max Error" value, draw a preview of its effect on auto-tessellated circles. ImGui::DragFloat("Circle Segment Max Error", &style.CircleSegmentMaxError, 0.01f, 0.10f, 10.0f, "%.2f"); if (ImGui::IsItemActive()) { ImGui::SetNextWindowPos(ImGui::GetCursorScreenPos()); ImGui::BeginTooltip(); ImVec2 p = ImGui::GetCursorScreenPos(); ImDrawList* draw_list = ImGui::GetWindowDrawList(); float RAD_MIN = 10.0f, RAD_MAX = 80.0f; float off_x = 10.0f; for (int n = 0; n < 7; n++) { const float rad = RAD_MIN + (RAD_MAX - RAD_MIN) * (float)n / (7.0f - 1.0f); draw_list->AddCircle(ImVec2(p.x + off_x + rad, p.y + RAD_MAX), rad, ImGui::GetColorU32(ImGuiCol_Text), 0); off_x += 10.0f + rad * 2.0f; } ImGui::Dummy(ImVec2(off_x, RAD_MAX * 2.0f)); ImGui::EndTooltip(); } ImGui::SameLine(); HelpMarker("When drawing circle primitives with \"num_segments == 0\" tesselation will be calculated automatically."); ImGui::DragFloat("Global Alpha", &style.Alpha, 0.005f, 0.20f, 1.0f, "%.2f"); // Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero. ImGui::PopItemWidth(); ImGui::EndTabItem(); } ImGui::EndTabBar(); } ImGui::PopItemWidth(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Main Menu Bar / ShowExampleAppMainMenuBar() //----------------------------------------------------------------------------- // - ShowExampleAppMainMenuBar() // - ShowExampleMenuFile() //----------------------------------------------------------------------------- // Demonstrate creating a "main" fullscreen menu bar and populating it. // Note the difference between BeginMainMenuBar() and BeginMenuBar(): // - BeginMenuBar() = menu-bar inside current window (which needs the ImGuiWindowFlags_MenuBar flag!) // - BeginMainMenuBar() = helper to create menu-bar-sized window at the top of the main viewport + call BeginMenuBar() into it. static void ShowExampleAppMainMenuBar() { if (ImGui::BeginMainMenuBar()) { if (ImGui::BeginMenu("File")) { ShowExampleMenuFile(); ImGui::EndMenu(); } if (ImGui::BeginMenu("Edit")) { if (ImGui::MenuItem("Undo", "CTRL+Z")) {} if (ImGui::MenuItem("Redo", "CTRL+Y", false, false)) {} // Disabled item ImGui::Separator(); if (ImGui::MenuItem("Cut", "CTRL+X")) {} if (ImGui::MenuItem("Copy", "CTRL+C")) {} if (ImGui::MenuItem("Paste", "CTRL+V")) {} ImGui::EndMenu(); } ImGui::EndMainMenuBar(); } } // Note that shortcuts are currently provided for display only // (future version will add explicit flags to BeginMenu() to request processing shortcuts) static void ShowExampleMenuFile() { ImGui::MenuItem("(demo menu)", NULL, false, false); if (ImGui::MenuItem("New")) {} if (ImGui::MenuItem("Open", "Ctrl+O")) {} if (ImGui::BeginMenu("Open Recent")) { ImGui::MenuItem("fish_hat.c"); ImGui::MenuItem("fish_hat.inl"); ImGui::MenuItem("fish_hat.h"); if (ImGui::BeginMenu("More..")) { ImGui::MenuItem("Hello"); ImGui::MenuItem("Sailor"); if (ImGui::BeginMenu("Recurse..")) { ShowExampleMenuFile(); ImGui::EndMenu(); } ImGui::EndMenu(); } ImGui::EndMenu(); } if (ImGui::MenuItem("Save", "Ctrl+S")) {} if (ImGui::MenuItem("Save As..")) {} ImGui::Separator(); if (ImGui::BeginMenu("Options")) { static bool enabled = true; ImGui::MenuItem("Enabled", "", &enabled); ImGui::BeginChild("child", ImVec2(0, 60), true); for (int i = 0; i < 10; i++) ImGui::Text("Scrolling Text %d", i); ImGui::EndChild(); static float f = 0.5f; static int n = 0; ImGui::SliderFloat("Value", &f, 0.0f, 1.0f); ImGui::InputFloat("Input", &f, 0.1f); ImGui::Combo("Combo", &n, "Yes\0No\0Maybe\0\0"); ImGui::EndMenu(); } if (ImGui::BeginMenu("Colors")) { float sz = ImGui::GetTextLineHeight(); for (int i = 0; i < ImGuiCol_COUNT; i++) { const char* name = ImGui::GetStyleColorName((ImGuiCol)i); ImVec2 p = ImGui::GetCursorScreenPos(); ImGui::GetWindowDrawList()->AddRectFilled(p, ImVec2(p.x + sz, p.y + sz), ImGui::GetColorU32((ImGuiCol)i)); ImGui::Dummy(ImVec2(sz, sz)); ImGui::SameLine(); ImGui::MenuItem(name); } ImGui::EndMenu(); } // Here we demonstrate appending again to the "Options" menu (which we already created above) // Of course in this demo it is a little bit silly that this function calls BeginMenu("Options") twice. // In a real code-base using it would make senses to use this feature from very different code locations. if (ImGui::BeginMenu("Options")) // <-- Append! { static bool b = true; ImGui::Checkbox("SomeOption", &b); ImGui::EndMenu(); } if (ImGui::BeginMenu("Disabled", false)) // Disabled { IM_ASSERT(0); } if (ImGui::MenuItem("Checked", NULL, true)) {} if (ImGui::MenuItem("Quit", "Alt+F4")) {} } //----------------------------------------------------------------------------- // [SECTION] Example App: Debug Console / ShowExampleAppConsole() //----------------------------------------------------------------------------- // Demonstrate creating a simple console window, with scrolling, filtering, completion and history. // For the console example, we are using a more C++ like approach of declaring a class to hold both data and functions. struct ExampleAppConsole { char InputBuf[256]; ImVector<char*> Items; ImVector<const char*> Commands; ImVector<char*> History; int HistoryPos; // -1: new line, 0..History.Size-1 browsing history. ImGuiTextFilter Filter; bool AutoScroll; bool ScrollToBottom; ExampleAppConsole() { ClearLog(); memset(InputBuf, 0, sizeof(InputBuf)); HistoryPos = -1; // "CLASSIFY" is here to provide the test case where "C"+[tab] completes to "CL" and display multiple matches. Commands.push_back("HELP"); Commands.push_back("HISTORY"); Commands.push_back("CLEAR"); Commands.push_back("CLASSIFY"); AutoScroll = true; ScrollToBottom = false; AddLog("Welcome to Dear ImGui!"); } ~ExampleAppConsole() { ClearLog(); for (int i = 0; i < History.Size; i++) free(History[i]); } // Portable helpers static int Stricmp(const char* s1, const char* s2) { int d; while ((d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; } return d; } static int Strnicmp(const char* s1, const char* s2, int n) { int d = 0; while (n > 0 && (d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; n--; } return d; } static char* Strdup(const char* s) { size_t len = strlen(s) + 1; void* buf = malloc(len); IM_ASSERT(buf); return (char*)memcpy(buf, (const void*)s, len); } static void Strtrim(char* s) { char* str_end = s + strlen(s); while (str_end > s && str_end[-1] == ' ') str_end--; *str_end = 0; } void ClearLog() { for (int i = 0; i < Items.Size; i++) free(Items[i]); Items.clear(); } void AddLog(const char* fmt, ...) IM_FMTARGS(2) { // FIXME-OPT char buf[1024]; va_list args; va_start(args, fmt); vsnprintf(buf, IM_ARRAYSIZE(buf), fmt, args); buf[IM_ARRAYSIZE(buf)-1] = 0; va_end(args); Items.push_back(Strdup(buf)); } void Draw(const char* title, bool* p_open) { ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); if (!ImGui::Begin(title, p_open)) { ImGui::End(); return; } // As a specific feature guaranteed by the library, after calling Begin() the last Item represent the title bar. // So e.g. IsItemHovered() will return true when hovering the title bar. // Here we create a context menu only available from the title bar. if (ImGui::BeginPopupContextItem()) { if (ImGui::MenuItem("Close Console")) *p_open = false; ImGui::EndPopup(); } ImGui::TextWrapped( "This example implements a console with basic coloring, completion and history. A more elaborate " "implementation may want to store entries along with extra data such as timestamp, emitter, etc."); ImGui::TextWrapped("Enter 'HELP' for help, press TAB to use text completion."); // TODO: display items starting from the bottom if (ImGui::SmallButton("Add Debug Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); } ImGui::SameLine(); if (ImGui::SmallButton("Add Debug Error")) { AddLog("[error] something went wrong"); } ImGui::SameLine(); if (ImGui::SmallButton("Clear")) { ClearLog(); } ImGui::SameLine(); bool copy_to_clipboard = ImGui::SmallButton("Copy"); //static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); } ImGui::Separator(); // Options menu if (ImGui::BeginPopup("Options")) { ImGui::Checkbox("Auto-scroll", &AutoScroll); ImGui::EndPopup(); } // Options, Filter if (ImGui::Button("Options")) ImGui::OpenPopup("Options"); ImGui::SameLine(); Filter.Draw("Filter (\"incl,-excl\") (\"error\")", 180); ImGui::Separator(); // Reserve enough left-over height for 1 separator + 1 input text const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing(); ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), false, ImGuiWindowFlags_HorizontalScrollbar); if (ImGui::BeginPopupContextWindow()) { if (ImGui::Selectable("Clear")) ClearLog(); ImGui::EndPopup(); } // Display every line as a separate entry so we can change their color or add custom widgets. // If you only want raw text you can use ImGui::TextUnformatted(log.begin(), log.end()); // NB- if you have thousands of entries this approach may be too inefficient and may require user-side clipping // to only process visible items. The clipper will automatically measure the height of your first item and then // "seek" to display only items in the visible area. // To use the clipper we can replace your standard loop: // for (int i = 0; i < Items.Size; i++) // With: // ImGuiListClipper clipper(Items.Size); // while (clipper.Step()) // for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) // - That your items are evenly spaced (same height) // - That you have cheap random access to your elements (you can access them given their index, // without processing all the ones before) // You cannot this code as-is if a filter is active because it breaks the 'cheap random-access' property. // We would need random-access on the post-filtered list. // A typical application wanting coarse clipping and filtering may want to pre-compute an array of indices // or offsets of items that passed the filtering test, recomputing this array when user changes the filter, // and appending newly elements as they are inserted. This is left as a task to the user until we can manage // to improve this example code! // If your items are of variable height: // - Split them into same height items would be simpler and facilitate random-seeking into your list. // - Consider using manual call to IsRectVisible() and skipping extraneous decoration from your items. ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4, 1)); // Tighten spacing if (copy_to_clipboard) ImGui::LogToClipboard(); for (int i = 0; i < Items.Size; i++) { const char* item = Items[i]; if (!Filter.PassFilter(item)) continue; // Normally you would store more information in your item than just a string. // (e.g. make Items[] an array of structure, store color/type etc.) ImVec4 color; bool has_color = false; if (strstr(item, "[error]")) { color = ImVec4(1.0f, 0.4f, 0.4f, 1.0f); has_color = true; } else if (strncmp(item, "# ", 2) == 0) { color = ImVec4(1.0f, 0.8f, 0.6f, 1.0f); has_color = true; } if (has_color) ImGui::PushStyleColor(ImGuiCol_Text, color); ImGui::TextUnformatted(item); if (has_color) ImGui::PopStyleColor(); } if (copy_to_clipboard) ImGui::LogFinish(); if (ScrollToBottom || (AutoScroll && ImGui::GetScrollY() >= ImGui::GetScrollMaxY())) ImGui::SetScrollHereY(1.0f); ScrollToBottom = false; ImGui::PopStyleVar(); ImGui::EndChild(); ImGui::Separator(); // Command-line bool reclaim_focus = false; ImGuiInputTextFlags input_text_flags = ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_CallbackCompletion | ImGuiInputTextFlags_CallbackHistory; if (ImGui::InputText("Input", InputBuf, IM_ARRAYSIZE(InputBuf), input_text_flags, &TextEditCallbackStub, (void*)this)) { char* s = InputBuf; Strtrim(s); if (s[0]) ExecCommand(s); strcpy(s, ""); reclaim_focus = true; } // Auto-focus on window apparition ImGui::SetItemDefaultFocus(); if (reclaim_focus) ImGui::SetKeyboardFocusHere(-1); // Auto focus previous widget ImGui::End(); } void ExecCommand(const char* command_line) { AddLog("# %s\n", command_line); // Insert into history. First find match and delete it so it can be pushed to the back. // This isn't trying to be smart or optimal. HistoryPos = -1; for (int i = History.Size - 1; i >= 0; i--) if (Stricmp(History[i], command_line) == 0) { free(History[i]); History.erase(History.begin() + i); break; } History.push_back(Strdup(command_line)); // Process command if (Stricmp(command_line, "CLEAR") == 0) { ClearLog(); } else if (Stricmp(command_line, "HELP") == 0) { AddLog("Commands:"); for (int i = 0; i < Commands.Size; i++) AddLog("- %s", Commands[i]); } else if (Stricmp(command_line, "HISTORY") == 0) { int first = History.Size - 10; for (int i = first > 0 ? first : 0; i < History.Size; i++) AddLog("%3d: %s\n", i, History[i]); } else { AddLog("Unknown command: '%s'\n", command_line); } // On command input, we scroll to bottom even if AutoScroll==false ScrollToBottom = true; } // In C++11 you'd be better off using lambdas for this sort of forwarding callbacks static int TextEditCallbackStub(ImGuiInputTextCallbackData* data) { ExampleAppConsole* console = (ExampleAppConsole*)data->UserData; return console->TextEditCallback(data); } int TextEditCallback(ImGuiInputTextCallbackData* data) { //AddLog("cursor: %d, selection: %d-%d", data->CursorPos, data->SelectionStart, data->SelectionEnd); switch (data->EventFlag) { case ImGuiInputTextFlags_CallbackCompletion: { // Example of TEXT COMPLETION // Locate beginning of current word const char* word_end = data->Buf + data->CursorPos; const char* word_start = word_end; while (word_start > data->Buf) { const char c = word_start[-1]; if (c == ' ' || c == '\t' || c == ',' || c == ';') break; word_start--; } // Build a list of candidates ImVector<const char*> candidates; for (int i = 0; i < Commands.Size; i++) if (Strnicmp(Commands[i], word_start, (int)(word_end - word_start)) == 0) candidates.push_back(Commands[i]); if (candidates.Size == 0) { // No match AddLog("No match for \"%.*s\"!\n", (int)(word_end - word_start), word_start); } else if (candidates.Size == 1) { // Single match. Delete the beginning of the word and replace it entirely so we've got nice casing. data->DeleteChars((int)(word_start - data->Buf), (int)(word_end - word_start)); data->InsertChars(data->CursorPos, candidates[0]); data->InsertChars(data->CursorPos, " "); } else { // Multiple matches. Complete as much as we can.. // So inputing "C"+Tab will complete to "CL" then display "CLEAR" and "CLASSIFY" as matches. int match_len = (int)(word_end - word_start); for (;;) { int c = 0; bool all_candidates_matches = true; for (int i = 0; i < candidates.Size && all_candidates_matches; i++) if (i == 0) c = toupper(candidates[i][match_len]); else if (c == 0 || c != toupper(candidates[i][match_len])) all_candidates_matches = false; if (!all_candidates_matches) break; match_len++; } if (match_len > 0) { data->DeleteChars((int)(word_start - data->Buf), (int)(word_end - word_start)); data->InsertChars(data->CursorPos, candidates[0], candidates[0] + match_len); } // List matches AddLog("Possible matches:\n"); for (int i = 0; i < candidates.Size; i++) AddLog("- %s\n", candidates[i]); } break; } case ImGuiInputTextFlags_CallbackHistory: { // Example of HISTORY const int prev_history_pos = HistoryPos; if (data->EventKey == ImGuiKey_UpArrow) { if (HistoryPos == -1) HistoryPos = History.Size - 1; else if (HistoryPos > 0) HistoryPos--; } else if (data->EventKey == ImGuiKey_DownArrow) { if (HistoryPos != -1) if (++HistoryPos >= History.Size) HistoryPos = -1; } // A better implementation would preserve the data on the current input line along with cursor position. if (prev_history_pos != HistoryPos) { const char* history_str = (HistoryPos >= 0) ? History[HistoryPos] : ""; data->DeleteChars(0, data->BufTextLen); data->InsertChars(0, history_str); } } } return 0; } }; static void ShowExampleAppConsole(bool* p_open) { static ExampleAppConsole console; console.Draw("Example: Console", p_open); } //----------------------------------------------------------------------------- // [SECTION] Example App: Debug Log / ShowExampleAppLog() //----------------------------------------------------------------------------- // Usage: // static ExampleAppLog my_log; // my_log.AddLog("Hello %d world\n", 123); // my_log.Draw("title"); struct ExampleAppLog { ImGuiTextBuffer Buf; ImGuiTextFilter Filter; ImVector<int> LineOffsets; // Index to lines offset. We maintain this with AddLog() calls. bool AutoScroll; // Keep scrolling if already at the bottom. ExampleAppLog() { AutoScroll = true; Clear(); } void Clear() { Buf.clear(); LineOffsets.clear(); LineOffsets.push_back(0); } void AddLog(const char* fmt, ...) IM_FMTARGS(2) { int old_size = Buf.size(); va_list args; va_start(args, fmt); Buf.appendfv(fmt, args); va_end(args); for (int new_size = Buf.size(); old_size < new_size; old_size++) if (Buf[old_size] == '\n') LineOffsets.push_back(old_size + 1); } void Draw(const char* title, bool* p_open = NULL) { if (!ImGui::Begin(title, p_open)) { ImGui::End(); return; } // Options menu if (ImGui::BeginPopup("Options")) { ImGui::Checkbox("Auto-scroll", &AutoScroll); ImGui::EndPopup(); } // Main window if (ImGui::Button("Options")) ImGui::OpenPopup("Options"); ImGui::SameLine(); bool clear = ImGui::Button("Clear"); ImGui::SameLine(); bool copy = ImGui::Button("Copy"); ImGui::SameLine(); Filter.Draw("Filter", -100.0f); ImGui::Separator(); ImGui::BeginChild("scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar); if (clear) Clear(); if (copy) ImGui::LogToClipboard(); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); const char* buf = Buf.begin(); const char* buf_end = Buf.end(); if (Filter.IsActive()) { // In this example we don't use the clipper when Filter is enabled. // This is because we don't have a random access on the result on our filter. // A real application processing logs with ten of thousands of entries may want to store the result of // search/filter.. especially if the filtering function is not trivial (e.g. reg-exp). for (int line_no = 0; line_no < LineOffsets.Size; line_no++) { const char* line_start = buf + LineOffsets[line_no]; const char* line_end = (line_no + 1 < LineOffsets.Size) ? (buf + LineOffsets[line_no + 1] - 1) : buf_end; if (Filter.PassFilter(line_start, line_end)) ImGui::TextUnformatted(line_start, line_end); } } else { // The simplest and easy way to display the entire buffer: // ImGui::TextUnformatted(buf_begin, buf_end); // And it'll just work. TextUnformatted() has specialization for large blob of text and will fast-forward // to skip non-visible lines. Here we instead demonstrate using the clipper to only process lines that are // within the visible area. // If you have tens of thousands of items and their processing cost is non-negligible, coarse clipping them // on your side is recommended. Using ImGuiListClipper requires // - A) random access into your data // - B) items all being the same height, // both of which we can handle since we an array pointing to the beginning of each line of text. // When using the filter (in the block of code above) we don't have random access into the data to display // anymore, which is why we don't use the clipper. Storing or skimming through the search result would make // it possible (and would be recommended if you want to search through tens of thousands of entries). ImGuiListClipper clipper; clipper.Begin(LineOffsets.Size); while (clipper.Step()) { for (int line_no = clipper.DisplayStart; line_no < clipper.DisplayEnd; line_no++) { const char* line_start = buf + LineOffsets[line_no]; const char* line_end = (line_no + 1 < LineOffsets.Size) ? (buf + LineOffsets[line_no + 1] - 1) : buf_end; ImGui::TextUnformatted(line_start, line_end); } } clipper.End(); } ImGui::PopStyleVar(); if (AutoScroll && ImGui::GetScrollY() >= ImGui::GetScrollMaxY()) ImGui::SetScrollHereY(1.0f); ImGui::EndChild(); ImGui::End(); } }; // Demonstrate creating a simple log window with basic filtering. static void ShowExampleAppLog(bool* p_open) { static ExampleAppLog log; // For the demo: add a debug button _BEFORE_ the normal log window contents // We take advantage of a rarely used feature: multiple calls to Begin()/End() are appending to the _same_ window. // Most of the contents of the window will be added by the log.Draw() call. ImGui::SetNextWindowSize(ImVec2(500, 400), ImGuiCond_FirstUseEver); ImGui::Begin("Example: Log", p_open); if (ImGui::SmallButton("[Debug] Add 5 entries")) { static int counter = 0; const char* categories[3] = { "info", "warn", "error" }; const char* words[] = { "Bumfuzzled", "Cattywampus", "Snickersnee", "Abibliophobia", "Absquatulate", "Nincompoop", "Pauciloquent" }; for (int n = 0; n < 5; n++) { const char* category = categories[counter % IM_ARRAYSIZE(categories)]; const char* word = words[counter % IM_ARRAYSIZE(words)]; log.AddLog("[%05d] [%s] Hello, current time is %.1f, here's a word: '%s'\n", ImGui::GetFrameCount(), category, ImGui::GetTime(), word); counter++; } } ImGui::End(); // Actually call in the regular Log helper (which will Begin() into the same window as we just did) log.Draw("Example: Log", p_open); } //----------------------------------------------------------------------------- // [SECTION] Example App: Simple Layout / ShowExampleAppLayout() //----------------------------------------------------------------------------- // Demonstrate create a window with multiple child windows. static void ShowExampleAppLayout(bool* p_open) { ImGui::SetNextWindowSize(ImVec2(500, 440), ImGuiCond_FirstUseEver); if (ImGui::Begin("Example: Simple layout", p_open, ImGuiWindowFlags_MenuBar)) { if (ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("File")) { if (ImGui::MenuItem("Close")) *p_open = false; ImGui::EndMenu(); } ImGui::EndMenuBar(); } // Left static int selected = 0; { ImGui::BeginChild("left pane", ImVec2(150, 0), true); for (int i = 0; i < 100; i++) { char label[128]; sprintf(label, "MyObject %d", i); if (ImGui::Selectable(label, selected == i)) selected = i; } ImGui::EndChild(); } ImGui::SameLine(); // Right { ImGui::BeginGroup(); ImGui::BeginChild("item view", ImVec2(0, -ImGui::GetFrameHeightWithSpacing())); // Leave room for 1 line below us ImGui::Text("MyObject: %d", selected); ImGui::Separator(); if (ImGui::BeginTabBar("##Tabs", ImGuiTabBarFlags_None)) { if (ImGui::BeginTabItem("Description")) { ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Details")) { ImGui::Text("ID: 0123456789"); ImGui::EndTabItem(); } ImGui::EndTabBar(); } ImGui::EndChild(); if (ImGui::Button("Revert")) {} ImGui::SameLine(); if (ImGui::Button("Save")) {} ImGui::EndGroup(); } } ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Property Editor / ShowExampleAppPropertyEditor() //----------------------------------------------------------------------------- static void ShowPlaceholderObject(const char* prefix, int uid) { // Use object uid as identifier. Most commonly you could also use the object pointer as a base ID. ImGui::PushID(uid); // Text and Tree nodes are less high than framed widgets, using AlignTextToFramePadding() we add vertical spacing to make the tree lines equal high. ImGui::AlignTextToFramePadding(); bool node_open = ImGui::TreeNode("Object", "%s_%u", prefix, uid); ImGui::NextColumn(); ImGui::AlignTextToFramePadding(); ImGui::Text("my sailor is rich"); ImGui::NextColumn(); if (node_open) { static float placeholder_members[8] = { 0.0f, 0.0f, 1.0f, 3.1416f, 100.0f, 999.0f }; for (int i = 0; i < 8; i++) { ImGui::PushID(i); // Use field index as identifier. if (i < 2) { ShowPlaceholderObject("Child", 424242); } else { // Here we use a TreeNode to highlight on hover (we could use e.g. Selectable as well) ImGui::AlignTextToFramePadding(); ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_Bullet; ImGui::TreeNodeEx("Field", flags, "Field_%d", i); ImGui::NextColumn(); ImGui::SetNextItemWidth(-1); if (i >= 5) ImGui::InputFloat("##value", &placeholder_members[i], 1.0f); else ImGui::DragFloat("##value", &placeholder_members[i], 0.01f); ImGui::NextColumn(); } ImGui::PopID(); } ImGui::TreePop(); } ImGui::PopID(); } // Demonstrate create a simple property editor. static void ShowExampleAppPropertyEditor(bool* p_open) { ImGui::SetNextWindowSize(ImVec2(430, 450), ImGuiCond_FirstUseEver); if (!ImGui::Begin("Example: Property editor", p_open)) { ImGui::End(); return; } HelpMarker( "This example shows how you may implement a property editor using two columns.\n" "All objects/fields data are dummies here.\n" "Remember that in many simple cases, you can use ImGui::SameLine(xxx) to position\n" "your cursor horizontally instead of using the Columns() API."); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2)); ImGui::Columns(2); ImGui::Separator(); // Iterate placeholder objects (all the same data) for (int obj_i = 0; obj_i < 3; obj_i++) ShowPlaceholderObject("Object", obj_i); ImGui::Columns(1); ImGui::Separator(); ImGui::PopStyleVar(); ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Long Text / ShowExampleAppLongText() //----------------------------------------------------------------------------- // Demonstrate/test rendering huge amount of text, and the incidence of clipping. static void ShowExampleAppLongText(bool* p_open) { ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver); if (!ImGui::Begin("Example: Long text display", p_open)) { ImGui::End(); return; } static int test_type = 0; static ImGuiTextBuffer log; static int lines = 0; ImGui::Text("Printing unusually long amount of text."); ImGui::Combo("Test type", &test_type, "Single call to TextUnformatted()\0" "Multiple calls to Text(), clipped\0" "Multiple calls to Text(), not clipped (slow)\0"); ImGui::Text("Buffer contents: %d lines, %d bytes", lines, log.size()); if (ImGui::Button("Clear")) { log.clear(); lines = 0; } ImGui::SameLine(); if (ImGui::Button("Add 1000 lines")) { for (int i = 0; i < 1000; i++) log.appendf("%i The quick brown fox jumps over the lazy dog\n", lines + i); lines += 1000; } ImGui::BeginChild("Log"); switch (test_type) { case 0: // Single call to TextUnformatted() with a big buffer ImGui::TextUnformatted(log.begin(), log.end()); break; case 1: { // Multiple calls to Text(), manually coarsely clipped - demonstrate how to use the ImGuiListClipper helper. ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); ImGuiListClipper clipper(lines); while (clipper.Step()) for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) ImGui::Text("%i The quick brown fox jumps over the lazy dog", i); ImGui::PopStyleVar(); break; } case 2: // Multiple calls to Text(), not clipped (slow) ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); for (int i = 0; i < lines; i++) ImGui::Text("%i The quick brown fox jumps over the lazy dog", i); ImGui::PopStyleVar(); break; } ImGui::EndChild(); ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Auto Resize / ShowExampleAppAutoResize() //----------------------------------------------------------------------------- // Demonstrate creating a window which gets auto-resized according to its content. static void ShowExampleAppAutoResize(bool* p_open) { if (!ImGui::Begin("Example: Auto-resizing window", p_open, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::End(); return; } static int lines = 10; ImGui::TextUnformatted( "Window will resize every-frame to the size of its content.\n" "Note that you probably don't want to query the window size to\n" "output your content because that would create a feedback loop."); ImGui::SliderInt("Number of lines", &lines, 1, 20); for (int i = 0; i < lines; i++) ImGui::Text("%*sThis is line %d", i * 4, "", i); // Pad with space to extend size horizontally ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Constrained Resize / ShowExampleAppConstrainedResize() //----------------------------------------------------------------------------- // Demonstrate creating a window with custom resize constraints. static void ShowExampleAppConstrainedResize(bool* p_open) { struct CustomConstraints { // Helper functions to demonstrate programmatic constraints static void Square(ImGuiSizeCallbackData* data) { data->DesiredSize.x = data->DesiredSize.y = IM_MAX(data->DesiredSize.x, data->DesiredSize.y); } static void Step(ImGuiSizeCallbackData* data) { float step = (float)(int)(intptr_t)data->UserData; data->DesiredSize = ImVec2((int)(data->DesiredSize.x / step + 0.5f) * step, (int)(data->DesiredSize.y / step + 0.5f) * step); } }; const char* test_desc[] = { "Resize vertical only", "Resize horizontal only", "Width > 100, Height > 100", "Width 400-500", "Height 400-500", "Custom: Always Square", "Custom: Fixed Steps (100)", }; static bool auto_resize = false; static int type = 0; static int display_lines = 10; if (type == 0) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 0), ImVec2(-1, FLT_MAX)); // Vertical only if (type == 1) ImGui::SetNextWindowSizeConstraints(ImVec2(0, -1), ImVec2(FLT_MAX, -1)); // Horizontal only if (type == 2) ImGui::SetNextWindowSizeConstraints(ImVec2(100, 100), ImVec2(FLT_MAX, FLT_MAX)); // Width > 100, Height > 100 if (type == 3) ImGui::SetNextWindowSizeConstraints(ImVec2(400, -1), ImVec2(500, -1)); // Width 400-500 if (type == 4) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 400), ImVec2(-1, 500)); // Height 400-500 if (type == 5) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square if (type == 6) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)(intptr_t)100); // Fixed Step ImGuiWindowFlags flags = auto_resize ? ImGuiWindowFlags_AlwaysAutoResize : 0; if (ImGui::Begin("Example: Constrained Resize", p_open, flags)) { if (ImGui::Button("200x200")) { ImGui::SetWindowSize(ImVec2(200, 200)); } ImGui::SameLine(); if (ImGui::Button("500x500")) { ImGui::SetWindowSize(ImVec2(500, 500)); } ImGui::SameLine(); if (ImGui::Button("800x200")) { ImGui::SetWindowSize(ImVec2(800, 200)); } ImGui::SetNextItemWidth(200); ImGui::Combo("Constraint", &type, test_desc, IM_ARRAYSIZE(test_desc)); ImGui::SetNextItemWidth(200); ImGui::DragInt("Lines", &display_lines, 0.2f, 1, 100); ImGui::Checkbox("Auto-resize", &auto_resize); for (int i = 0; i < display_lines; i++) ImGui::Text("%*sHello, sailor! Making this line long enough for the example.", i * 4, ""); } ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Simple Overlay / ShowExampleAppSimpleOverlay() //----------------------------------------------------------------------------- // Demonstrate creating a simple static window with no decoration // + a context-menu to choose which corner of the screen to use. static void ShowExampleAppSimpleOverlay(bool* p_open) { const float DISTANCE = 10.0f; static int corner = 0; ImGuiIO& io = ImGui::GetIO(); if (corner != -1) { ImVec2 window_pos = ImVec2((corner & 1) ? io.DisplaySize.x - DISTANCE : DISTANCE, (corner & 2) ? io.DisplaySize.y - DISTANCE : DISTANCE); ImVec2 window_pos_pivot = ImVec2((corner & 1) ? 1.0f : 0.0f, (corner & 2) ? 1.0f : 0.0f); ImGui::SetNextWindowPos(window_pos, ImGuiCond_Always, window_pos_pivot); } ImGui::SetNextWindowBgAlpha(0.35f); // Transparent background ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav; if (corner != -1) window_flags |= ImGuiWindowFlags_NoMove; if (ImGui::Begin("Example: Simple overlay", p_open, window_flags)) { ImGui::Text("Simple overlay\n" "in the corner of the screen.\n" "(right-click to change position)"); ImGui::Separator(); if (ImGui::IsMousePosValid()) ImGui::Text("Mouse Position: (%.1f,%.1f)", io.MousePos.x, io.MousePos.y); else ImGui::Text("Mouse Position: <invalid>"); if (ImGui::BeginPopupContextWindow()) { if (ImGui::MenuItem("Custom", NULL, corner == -1)) corner = -1; if (ImGui::MenuItem("Top-left", NULL, corner == 0)) corner = 0; if (ImGui::MenuItem("Top-right", NULL, corner == 1)) corner = 1; if (ImGui::MenuItem("Bottom-left", NULL, corner == 2)) corner = 2; if (ImGui::MenuItem("Bottom-right", NULL, corner == 3)) corner = 3; if (p_open && ImGui::MenuItem("Close")) *p_open = false; ImGui::EndPopup(); } } ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Manipulating Window Titles / ShowExampleAppWindowTitles() //----------------------------------------------------------------------------- // Demonstrate using "##" and "###" in identifiers to manipulate ID generation. // This apply to all regular items as well. // Read FAQ section "How can I have multiple widgets with the same label?" for details. static void ShowExampleAppWindowTitles(bool*) { // By default, Windows are uniquely identified by their title. // You can use the "##" and "###" markers to manipulate the display/ID. // Using "##" to display same title but have unique identifier. ImGui::SetNextWindowPos(ImVec2(100, 100), ImGuiCond_FirstUseEver); ImGui::Begin("Same title as another window##1"); ImGui::Text("This is window 1.\nMy title is the same as window 2, but my identifier is unique."); ImGui::End(); ImGui::SetNextWindowPos(ImVec2(100, 200), ImGuiCond_FirstUseEver); ImGui::Begin("Same title as another window##2"); ImGui::Text("This is window 2.\nMy title is the same as window 1, but my identifier is unique."); ImGui::End(); // Using "###" to display a changing title but keep a static identifier "AnimatedTitle" char buf[128]; sprintf(buf, "Animated title %c %d###AnimatedTitle", "|/-\\"[(int)(ImGui::GetTime() / 0.25f) & 3], ImGui::GetFrameCount()); ImGui::SetNextWindowPos(ImVec2(100, 300), ImGuiCond_FirstUseEver); ImGui::Begin(buf); ImGui::Text("This window has a changing title."); ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Custom Rendering using ImDrawList API / ShowExampleAppCustomRendering() //----------------------------------------------------------------------------- // Demonstrate using the low-level ImDrawList to draw custom shapes. static void ShowExampleAppCustomRendering(bool* p_open) { if (!ImGui::Begin("Example: Custom rendering", p_open)) { ImGui::End(); return; } // Tip: If you do a lot of custom rendering, you probably want to use your own geometrical types and benefit of // overloaded operators, etc. Define IM_VEC2_CLASS_EXTRA in imconfig.h to create implicit conversions between your // types and ImVec2/ImVec4. Dear ImGui defines overloaded operators but they are internal to imgui.cpp and not // exposed outside (to avoid messing with your types) In this example we are not using the maths operators! if (ImGui::BeginTabBar("##TabBar")) { if (ImGui::BeginTabItem("Primitives")) { ImGui::PushItemWidth(-ImGui::GetFontSize() * 10); ImDrawList* draw_list = ImGui::GetWindowDrawList(); // Draw gradients // (note that those are currently exacerbating our sRGB/Linear issues) // Calling ImGui::GetColorU32() multiplies the given colors by the current Style Alpha, but you may pass the IM_COL32() directly as well.. ImGui::Text("Gradients"); ImVec2 gradient_size = ImVec2(ImGui::CalcItemWidth(), ImGui::GetFrameHeight()); { ImVec2 p0 = ImGui::GetCursorScreenPos(); ImVec2 p1 = ImVec2(p0.x + gradient_size.x, p0.y + gradient_size.y); ImU32 col_a = ImGui::GetColorU32(IM_COL32(0, 0, 0, 255)); ImU32 col_b = ImGui::GetColorU32(IM_COL32(255, 255, 255, 255)); draw_list->AddRectFilledMultiColor(p0, p1, col_a, col_b, col_b, col_a); ImGui::InvisibleButton("##gradient1", gradient_size); } { ImVec2 p0 = ImGui::GetCursorScreenPos(); ImVec2 p1 = ImVec2(p0.x + gradient_size.x, p0.y + gradient_size.y); ImU32 col_a = ImGui::GetColorU32(IM_COL32(0, 255, 0, 255)); ImU32 col_b = ImGui::GetColorU32(IM_COL32(255, 0, 0, 255)); draw_list->AddRectFilledMultiColor(p0, p1, col_a, col_b, col_b, col_a); ImGui::InvisibleButton("##gradient2", gradient_size); } // Draw a bunch of primitives ImGui::Text("All primitives"); static float sz = 36.0f; static float thickness = 3.0f; static int ngon_sides = 6; static bool circle_segments_override = false; static int circle_segments_override_v = 12; static ImVec4 colf = ImVec4(1.0f, 1.0f, 0.4f, 1.0f); ImGui::DragFloat("Size", &sz, 0.2f, 2.0f, 72.0f, "%.0f"); ImGui::DragFloat("Thickness", &thickness, 0.05f, 1.0f, 8.0f, "%.02f"); ImGui::SliderInt("N-gon sides", &ngon_sides, 3, 12); ImGui::Checkbox("##circlesegmentoverride", &circle_segments_override); ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x); if (ImGui::SliderInt("Circle segments", &circle_segments_override_v, 3, 40)) circle_segments_override = true; ImGui::ColorEdit4("Color", &colf.x); const ImVec2 p = ImGui::GetCursorScreenPos(); const ImU32 col = ImColor(colf); const float spacing = 10.0f; const ImDrawCornerFlags corners_none = 0; const ImDrawCornerFlags corners_all = ImDrawCornerFlags_All; const ImDrawCornerFlags corners_tl_br = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotRight; const int circle_segments = circle_segments_override ? circle_segments_override_v : 0; float x = p.x + 4.0f; float y = p.y + 4.0f; for (int n = 0; n < 2; n++) { // First line uses a thickness of 1.0f, second line uses the configurable thickness float th = (n == 0) ? 1.0f : thickness; draw_list->AddNgon(ImVec2(x + sz*0.5f, y + sz*0.5f), sz*0.5f, col, ngon_sides, th); x += sz + spacing; // N-gon draw_list->AddCircle(ImVec2(x + sz*0.5f, y + sz*0.5f), sz*0.5f, col, circle_segments, th); x += sz + spacing; // Circle draw_list->AddRect(ImVec2(x, y), ImVec2(x + sz, y + sz), col, 0.0f, corners_none, th); x += sz + spacing; // Square draw_list->AddRect(ImVec2(x, y), ImVec2(x + sz, y + sz), col, 10.0f, corners_all, th); x += sz + spacing; // Square with all rounded corners draw_list->AddRect(ImVec2(x, y), ImVec2(x + sz, y + sz), col, 10.0f, corners_tl_br, th); x += sz + spacing; // Square with two rounded corners draw_list->AddTriangle(ImVec2(x+sz*0.5f,y), ImVec2(x+sz, y+sz-0.5f), ImVec2(x, y+sz-0.5f), col, th);x += sz + spacing; // Triangle //draw_list->AddTriangle(ImVec2(x+sz*0.2f,y), ImVec2(x, y+sz-0.5f), ImVec2(x+sz*0.4f, y+sz-0.5f), col, th);x+= sz*0.4f + spacing; // Thin triangle draw_list->AddLine(ImVec2(x, y), ImVec2(x + sz, y), col, th); x += sz + spacing; // Horizontal line (note: drawing a filled rectangle will be faster!) draw_list->AddLine(ImVec2(x, y), ImVec2(x, y + sz), col, th); x += spacing; // Vertical line (note: drawing a filled rectangle will be faster!) draw_list->AddLine(ImVec2(x, y), ImVec2(x + sz, y + sz), col, th); x += sz + spacing; // Diagonal line draw_list->AddBezierCurve(ImVec2(x, y), ImVec2(x + sz*1.3f, y + sz*0.3f), ImVec2(x + sz - sz*1.3f, y + sz - sz*0.3f), ImVec2(x + sz, y + sz), col, th); x = p.x + 4; y += sz + spacing; } draw_list->AddNgonFilled(ImVec2(x + sz * 0.5f, y + sz * 0.5f), sz*0.5f, col, ngon_sides); x += sz + spacing; // N-gon draw_list->AddCircleFilled(ImVec2(x + sz*0.5f, y + sz*0.5f), sz*0.5f, col, circle_segments); x += sz + spacing; // Circle draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + sz, y + sz), col); x += sz + spacing; // Square draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + sz, y + sz), col, 10.0f); x += sz + spacing; // Square with all rounded corners draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + sz, y + sz), col, 10.0f, corners_tl_br); x += sz + spacing; // Square with two rounded corners draw_list->AddTriangleFilled(ImVec2(x+sz*0.5f,y), ImVec2(x+sz, y+sz-0.5f), ImVec2(x, y+sz-0.5f), col); x += sz + spacing; // Triangle //draw_list->AddTriangleFilled(ImVec2(x+sz*0.2f,y), ImVec2(x, y+sz-0.5f), ImVec2(x+sz*0.4f, y+sz-0.5f), col); x += sz*0.4f + spacing; // Thin triangle draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + sz, y + thickness), col); x += sz + spacing; // Horizontal line (faster than AddLine, but only handle integer thickness) draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + thickness, y + sz), col); x += spacing * 2.0f;// Vertical line (faster than AddLine, but only handle integer thickness) draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + 1, y + 1), col); x += sz; // Pixel (faster than AddLine) draw_list->AddRectFilledMultiColor(ImVec2(x, y), ImVec2(x + sz, y + sz), IM_COL32(0, 0, 0, 255), IM_COL32(255, 0, 0, 255), IM_COL32(255, 255, 0, 255), IM_COL32(0, 255, 0, 255)); ImGui::Dummy(ImVec2((sz + spacing) * 8.8f, (sz + spacing) * 3.0f)); ImGui::PopItemWidth(); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Canvas")) { static ImVector<ImVec2> points; static ImVec2 scrolling(0.0f, 0.0f); static bool opt_enable_grid = true; static bool opt_enable_context_menu = true; static bool adding_line = false; ImGui::Checkbox("Enable grid", &opt_enable_grid); ImGui::Checkbox("Enable context menu", &opt_enable_context_menu); ImGui::Text("Mouse Left: drag to add lines,\nMouse Right: drag to scroll, click for context menu."); // Typically you would use a BeginChild()/EndChild() pair to benefit from a clipping region + own scrolling. // Here we demonstrate that this can be replaced by simple offsetting + custom drawing + PushClipRect/PopClipRect() calls. // To use a child window instead we could use, e.g: // ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); // Disable padding // ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(50, 50, 50, 255)); // Set a background color // ImGui::BeginChild("canvas", ImVec2(0.0f, 0.0f), true, ImGuiWindowFlags_NoMove); // ImGui::PopStyleColor(); // ImGui::PopStyleVar(); // [...] // ImGui::EndChild(); // Using InvisibleButton() as a convenience 1) it will advance the layout cursor and 2) allows us to use IsItemHovered()/IsItemActive() ImVec2 canvas_p0 = ImGui::GetCursorScreenPos(); // ImDrawList API uses screen coordinates! ImVec2 canvas_sz = ImGui::GetContentRegionAvail(); // Resize canvas to what's available if (canvas_sz.x < 50.0f) canvas_sz.x = 50.0f; if (canvas_sz.y < 50.0f) canvas_sz.y = 50.0f; ImVec2 canvas_p1 = ImVec2(canvas_p0.x + canvas_sz.x, canvas_p0.y + canvas_sz.y); // Draw border and background color ImGuiIO& io = ImGui::GetIO(); ImDrawList* draw_list = ImGui::GetWindowDrawList(); draw_list->AddRectFilled(canvas_p0, canvas_p1, IM_COL32(50, 50, 50, 255)); draw_list->AddRect(canvas_p0, canvas_p1, IM_COL32(255, 255, 255, 255)); // This will catch our interactions ImGui::InvisibleButton("canvas", canvas_sz, ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_MouseButtonRight); const bool is_hovered = ImGui::IsItemHovered(); // Hovered const bool is_active = ImGui::IsItemActive(); // Held const ImVec2 origin(canvas_p0.x + scrolling.x, canvas_p0.y + scrolling.y); // Lock scrolled origin const ImVec2 mouse_pos_in_canvas(io.MousePos.x - origin.x, io.MousePos.y - origin.y); // Add first and second point if (is_hovered && !adding_line && ImGui::IsMouseClicked(ImGuiMouseButton_Left)) { points.push_back(mouse_pos_in_canvas); points.push_back(mouse_pos_in_canvas); adding_line = true; } if (adding_line) { points.back() = mouse_pos_in_canvas; if (!ImGui::IsMouseDown(ImGuiMouseButton_Left)) adding_line = false; } // Pan (we use a zero mouse threshold when there's no context menu) // You may decide to make that threshold dynamic based on whether the mouse is hovering something etc. const float mouse_threshold_for_pan = opt_enable_context_menu ? -1.0f : 0.0f; if (is_active && ImGui::IsMouseDragging(ImGuiMouseButton_Right, mouse_threshold_for_pan)) { scrolling.x += io.MouseDelta.x; scrolling.y += io.MouseDelta.y; } // Context menu (under default mouse threshold) ImVec2 drag_delta = ImGui::GetMouseDragDelta(ImGuiMouseButton_Right); if (opt_enable_context_menu && ImGui::IsMouseReleased(ImGuiMouseButton_Right) && drag_delta.x == 0.0f && drag_delta.y == 0.0f) ImGui::OpenPopupContextItem("context"); if (ImGui::BeginPopup("context")) { if (adding_line) points.resize(points.size() - 2); adding_line = false; if (ImGui::MenuItem("Remove one", NULL, false, points.Size > 0)) { points.resize(points.size() - 2); } if (ImGui::MenuItem("Remove all", NULL, false, points.Size > 0)) { points.clear(); } ImGui::EndPopup(); } // Draw grid + all lines in the canvas draw_list->PushClipRect(canvas_p0, canvas_p1, true); if (opt_enable_grid) { const float GRID_STEP = 64.0f; for (float x = fmodf(scrolling.x, GRID_STEP); x < canvas_sz.x; x += GRID_STEP) draw_list->AddLine(ImVec2(canvas_p0.x + x, canvas_p0.y), ImVec2(canvas_p0.x + x, canvas_p1.y), IM_COL32(200, 200, 200, 40)); for (float y = fmodf(scrolling.y, GRID_STEP); y < canvas_sz.y; y += GRID_STEP) draw_list->AddLine(ImVec2(canvas_p0.x, canvas_p0.y + y), ImVec2(canvas_p1.x, canvas_p0.y + y), IM_COL32(200, 200, 200, 40)); } for (int n = 0; n < points.Size; n += 2) draw_list->AddLine(ImVec2(origin.x + points[n].x, origin.y + points[n].y), ImVec2(origin.x + points[n + 1].x, origin.y + points[n + 1].y), IM_COL32(255, 255, 0, 255), 2.0f); draw_list->PopClipRect(); ImGui::EndTabItem(); } if (ImGui::BeginTabItem("BG/FG draw lists")) { static bool draw_bg = true; static bool draw_fg = true; ImGui::Checkbox("Draw in Background draw list", &draw_bg); ImGui::SameLine(); HelpMarker("The Background draw list will be rendered below every Dear ImGui windows."); ImGui::Checkbox("Draw in Foreground draw list", &draw_fg); ImGui::SameLine(); HelpMarker("The Foreground draw list will be rendered over every Dear ImGui windows."); ImVec2 window_pos = ImGui::GetWindowPos(); ImVec2 window_size = ImGui::GetWindowSize(); ImVec2 window_center = ImVec2(window_pos.x + window_size.x * 0.5f, window_pos.y + window_size.y * 0.5f); if (draw_bg) ImGui::GetBackgroundDrawList()->AddCircle(window_center, window_size.x * 0.6f, IM_COL32(255, 0, 0, 200), 0, 10 + 4); if (draw_fg) ImGui::GetForegroundDrawList()->AddCircle(window_center, window_size.y * 0.6f, IM_COL32(0, 255, 0, 200), 0, 10); ImGui::EndTabItem(); } ImGui::EndTabBar(); } ImGui::End(); } //----------------------------------------------------------------------------- // [SECTION] Example App: Documents Handling / ShowExampleAppDocuments() //----------------------------------------------------------------------------- // Simplified structure to mimic a Document model struct MyDocument { const char* Name; // Document title bool Open; // Set when open (we keep an array of all available documents to simplify demo code!) bool OpenPrev; // Copy of Open from last update. bool Dirty; // Set when the document has been modified bool WantClose; // Set when the document ImVec4 Color; // An arbitrary variable associated to the document MyDocument(const char* name, bool open = true, const ImVec4& color = ImVec4(1.0f, 1.0f, 1.0f, 1.0f)) { Name = name; Open = OpenPrev = open; Dirty = false; WantClose = false; Color = color; } void DoOpen() { Open = true; } void DoQueueClose() { WantClose = true; } void DoForceClose() { Open = false; Dirty = false; } void DoSave() { Dirty = false; } // Display placeholder contents for the Document static void DisplayContents(MyDocument* doc) { ImGui::PushID(doc); ImGui::Text("Document \"%s\"", doc->Name); ImGui::PushStyleColor(ImGuiCol_Text, doc->Color); ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."); ImGui::PopStyleColor(); if (ImGui::Button("Modify", ImVec2(100, 0))) doc->Dirty = true; ImGui::SameLine(); if (ImGui::Button("Save", ImVec2(100, 0))) doc->DoSave(); ImGui::ColorEdit3("color", &doc->Color.x); // Useful to test drag and drop and hold-dragged-to-open-tab behavior. ImGui::PopID(); } // Display context menu for the Document static void DisplayContextMenu(MyDocument* doc) { if (!ImGui::BeginPopupContextItem()) return; char buf[256]; sprintf(buf, "Save %s", doc->Name); if (ImGui::MenuItem(buf, "CTRL+S", false, doc->Open)) doc->DoSave(); if (ImGui::MenuItem("Close", "CTRL+W", false, doc->Open)) doc->DoQueueClose(); ImGui::EndPopup(); } }; struct ExampleAppDocuments { ImVector<MyDocument> Documents; ExampleAppDocuments() { Documents.push_back(MyDocument("Lettuce", true, ImVec4(0.4f, 0.8f, 0.4f, 1.0f))); Documents.push_back(MyDocument("Eggplant", true, ImVec4(0.8f, 0.5f, 1.0f, 1.0f))); Documents.push_back(MyDocument("Carrot", true, ImVec4(1.0f, 0.8f, 0.5f, 1.0f))); Documents.push_back(MyDocument("Tomato", false, ImVec4(1.0f, 0.3f, 0.4f, 1.0f))); Documents.push_back(MyDocument("A Rather Long Title", false)); Documents.push_back(MyDocument("Some Document", false)); } }; // [Optional] Notify the system of Tabs/Windows closure that happened outside the regular tab interface. // If a tab has been closed programmatically (aka closed from another source such as the Checkbox() in the demo, // as opposed to clicking on the regular tab closing button) and stops being submitted, it will take a frame for // the tab bar to notice its absence. During this frame there will be a gap in the tab bar, and if the tab that has // disappeared was the selected one, the tab bar will report no selected tab during the frame. This will effectively // give the impression of a flicker for one frame. // We call SetTabItemClosed() to manually notify the Tab Bar or Docking system of removed tabs to avoid this glitch. // Note that this completely optional, and only affect tab bars with the ImGuiTabBarFlags_Reorderable flag. static void NotifyOfDocumentsClosedElsewhere(ExampleAppDocuments& app) { for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) { MyDocument* doc = &app.Documents[doc_n]; if (!doc->Open && doc->OpenPrev) ImGui::SetTabItemClosed(doc->Name); doc->OpenPrev = doc->Open; } } void ShowExampleAppDocuments(bool* p_open) { static ExampleAppDocuments app; // Options static bool opt_reorderable = true; static ImGuiTabBarFlags opt_fitting_flags = ImGuiTabBarFlags_FittingPolicyDefault_; bool window_contents_visible = ImGui::Begin("Example: Documents", p_open, ImGuiWindowFlags_MenuBar); if (!window_contents_visible) { ImGui::End(); return; } // Menu if (ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("File")) { int open_count = 0; for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) open_count += app.Documents[doc_n].Open ? 1 : 0; if (ImGui::BeginMenu("Open", open_count < app.Documents.Size)) { for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) { MyDocument* doc = &app.Documents[doc_n]; if (!doc->Open) if (ImGui::MenuItem(doc->Name)) doc->DoOpen(); } ImGui::EndMenu(); } if (ImGui::MenuItem("Close All Documents", NULL, false, open_count > 0)) for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) app.Documents[doc_n].DoQueueClose(); if (ImGui::MenuItem("Exit", "Alt+F4")) {} ImGui::EndMenu(); } ImGui::EndMenuBar(); } // [Debug] List documents with one checkbox for each for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) { MyDocument* doc = &app.Documents[doc_n]; if (doc_n > 0) ImGui::SameLine(); ImGui::PushID(doc); if (ImGui::Checkbox(doc->Name, &doc->Open)) if (!doc->Open) doc->DoForceClose(); ImGui::PopID(); } ImGui::Separator(); // Submit Tab Bar and Tabs { ImGuiTabBarFlags tab_bar_flags = (opt_fitting_flags) | (opt_reorderable ? ImGuiTabBarFlags_Reorderable : 0); if (ImGui::BeginTabBar("##tabs", tab_bar_flags)) { if (opt_reorderable) NotifyOfDocumentsClosedElsewhere(app); // [DEBUG] Stress tests //if ((ImGui::GetFrameCount() % 30) == 0) docs[1].Open ^= 1; // [DEBUG] Automatically show/hide a tab. Test various interactions e.g. dragging with this on. //if (ImGui::GetIO().KeyCtrl) ImGui::SetTabItemSelected(docs[1].Name); // [DEBUG] Test SetTabItemSelected(), probably not very useful as-is anyway.. // Submit Tabs for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) { MyDocument* doc = &app.Documents[doc_n]; if (!doc->Open) continue; ImGuiTabItemFlags tab_flags = (doc->Dirty ? ImGuiTabItemFlags_UnsavedDocument : 0); bool visible = ImGui::BeginTabItem(doc->Name, &doc->Open, tab_flags); // Cancel attempt to close when unsaved add to save queue so we can display a popup. if (!doc->Open && doc->Dirty) { doc->Open = true; doc->DoQueueClose(); } MyDocument::DisplayContextMenu(doc); if (visible) { MyDocument::DisplayContents(doc); ImGui::EndTabItem(); } } ImGui::EndTabBar(); } } // Update closing queue static ImVector<MyDocument*> close_queue; if (close_queue.empty()) { // Close queue is locked once we started a popup for (int doc_n = 0; doc_n < app.Documents.Size; doc_n++) { MyDocument* doc = &app.Documents[doc_n]; if (doc->WantClose) { doc->WantClose = false; close_queue.push_back(doc); } } } // Display closing confirmation UI if (!close_queue.empty()) { int close_queue_unsaved_documents = 0; for (int n = 0; n < close_queue.Size; n++) if (close_queue[n]->Dirty) close_queue_unsaved_documents++; if (close_queue_unsaved_documents == 0) { // Close documents when all are unsaved for (int n = 0; n < close_queue.Size; n++) close_queue[n]->DoForceClose(); close_queue.clear(); } else { if (!ImGui::IsPopupOpen("Save?")) ImGui::OpenPopup("Save?"); if (ImGui::BeginPopupModal("Save?")) { ImGui::Text("Save change to the following items?"); ImGui::SetNextItemWidth(-1.0f); if (ImGui::ListBoxHeader("##", close_queue_unsaved_documents, 6)) { for (int n = 0; n < close_queue.Size; n++) if (close_queue[n]->Dirty) ImGui::Text("%s", close_queue[n]->Name); ImGui::ListBoxFooter(); } if (ImGui::Button("Yes", ImVec2(80, 0))) { for (int n = 0; n < close_queue.Size; n++) { if (close_queue[n]->Dirty) close_queue[n]->DoSave(); close_queue[n]->DoForceClose(); } close_queue.clear(); ImGui::CloseCurrentPopup(); } ImGui::SameLine(); if (ImGui::Button("No", ImVec2(80, 0))) { for (int n = 0; n < close_queue.Size; n++) close_queue[n]->DoForceClose(); close_queue.clear(); ImGui::CloseCurrentPopup(); } ImGui::SameLine(); if (ImGui::Button("Cancel", ImVec2(80, 0))) { close_queue.clear(); ImGui::CloseCurrentPopup(); } ImGui::EndPopup(); } } } ImGui::End(); } // End of Demo code #else void ImGui::ShowAboutWindow(bool*) {} void ImGui::ShowDemoWindow(bool*) {} void ImGui::ShowUserGuide() {} void ImGui::ShowStyleEditor(ImGuiStyle*) {} #endif #endif // #ifndef IMGUI_DISABLE
[ "jonathan9609082000@gmail.com" ]
jonathan9609082000@gmail.com
667949a31e02bf165190af345abab040efab3cef
3d46f54ae93a8408a61499d4fe4eb8524a5b0fac
/reverse-string/reverse_string.h
f3794b18c8e83e89c6fc60a13fe692c1580333ba
[]
no_license
zerocnc/exercism-C-
a69b73371942689bf5edf3ecec63681f14a34e80
49928e8ddce9c38768e8058a9f79ad12d5d36a48
refs/heads/master
2022-10-17T17:53:55.697578
2020-06-14T08:10:05
2020-06-14T08:10:05
270,640,749
0
0
null
null
null
null
UTF-8
C++
false
false
222
h
#if !defined(REVERSE_STRING_H) #define REVERSE_STRING_H #include <string> #include <cstring> namespace reverse_string { std::string reverse_string(std::string); } // namespace reverse_string #endif // REVERSE_STRING_H
[ "gdi_richard@yahoo.com" ]
gdi_richard@yahoo.com
1cd1ec47df1279e7bd0f9b631f27c12c96df5b80
63a765e6d0dc039b1ab3b22527724221ad2f8550
/LRU/test.cpp
9418b022152aca8d4626dd5844c4659275465865
[]
no_license
chiraggandhi123/DSA_PRACTICE
e4af8803808e5cd886d04936910e5dff9467bfe4
64b1d5e29f8b4f2a9dc225d158b3a2554bcdf8ed
refs/heads/master
2023-06-25T05:34:32.023449
2021-07-23T17:54:30
2021-07-23T17:54:30
381,330,505
0
0
null
null
null
null
UTF-8
C++
false
false
1,343
cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <map> #include <set> #include <queue> #include <stack> #include <cmath> #include <functional> #include <deque> #include <bitset> #include <climits> #include <cstdio> #include <list> #include <iomanip> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define fi first #define si second #define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); #define F(a,n) for(int i=0;i<n;i++){cin>>a[i];} #define F1(a,n) for(int i=1;i<=n;i++){cin>>a[i];} #define P(a,n) for(int i=0;i<n;i++){cout<<a[i]<<' ';}cout<<endl; #define P1(a,n) for(int i=1;i<=n;i++){cout<<a[i]<<' ';}cout<<endl; #define NF(a,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++){cin>>a[i][j];}} #define NF1(a,n,m) for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){cin>>a[i][j];}} #define PNF(a,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++){cout<<a[i][j]<<' ';}cout<<endl;}cout<<endl; #define PNF1(a,n,m) for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){cout<<a[i][j]<<' ';}cout<<endl;}cout<<endl; #define AS 200001 #define mod 1000000007 int main() { fastIO #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif int n; cin>>n; std::vector<int> v(n); while(n--) { int x; cin>>x; v.push_back(x); } cout<<*--v.end(); return 0; }
[ "chirag.gandhi@tothenew.com" ]
chirag.gandhi@tothenew.com
1a9a460579d6af8e46c56d8e120f16fc99bfc270
6d52323781d585b7eebf21f8b221195a55355e2e
/tut16/Frustumclass.cpp
e24be8659df23647da4333642b27288027b16c4a
[]
no_license
mioyuki2009/D3DLearn
c7e0f9eaf717561103a7b46e8190210e4d3efc04
807a93ae7a67c3ec9c1b8890c01c688d297dd95f
refs/heads/main
2023-06-25T14:45:07.069881
2021-07-23T04:52:35
2021-07-23T04:52:35
370,377,237
0
0
null
null
null
null
UTF-8
C++
false
false
6,311
cpp
#include "Frustumclass.h" FrustumClass::FrustumClass() { } FrustumClass::~FrustumClass() { } void FrustumClass::ConstructFrustum(float screenDepth, XMMATRIX projectionMatrix, XMMATRIX viewMatrix) { float zMinimum, r; XMMATRIX matrix; // Calculate the minimum Z distance in the frustum. zMinimum = -projectionMatrix._43 / projectionMatrix._33; r = screenDepth / (screenDepth - zMinimum); projectionMatrix._33 = r; projectionMatrix._43 = -r * zMinimum; // Create the frustum matrix from the view matrix and updated projection matrix. matrix = XMMatrixMultiply(viewMatrix, projectionMatrix); // Calculate near plane of frustum. m_planes[0].x = matrix._14 + matrix._13; m_planes[0].y = matrix._24 + matrix._23; m_planes[0].z = matrix._34 + matrix._33; m_planes[0].w = matrix._44 + matrix._43; XMVECTOR m_planesVec = XMLoadFloat4(&(m_planes[0])); m_planesVec = XMPlaneNormalize(m_planesVec); XMStoreFloat4(&(m_planes[0]), m_planesVec); // Calculate far plane of frustum. m_planes[1].x = matrix._14 - matrix._13; m_planes[1].y = matrix._24 - matrix._23; m_planes[1].z = matrix._34 - matrix._33; m_planes[1].w = matrix._44 - matrix._43; m_planesVec = XMLoadFloat4(&(m_planes[1])); m_planesVec = XMPlaneNormalize(m_planesVec); XMStoreFloat4(&(m_planes[1]), m_planesVec); // Calculate left plane of frustum. m_planes[2].x = matrix._14 + matrix._11; m_planes[2].y = matrix._24 + matrix._21; m_planes[2].z = matrix._34 + matrix._31; m_planes[2].w = matrix._44 + matrix._41; m_planesVec = XMLoadFloat4(&(m_planes[2])); m_planesVec = XMPlaneNormalize(m_planesVec); XMStoreFloat4(&(m_planes[2]), m_planesVec); // Calculate right plane of frustum. m_planes[3].x = matrix._14 - matrix._11; m_planes[3].y = matrix._24 - matrix._21; m_planes[3].z = matrix._34 - matrix._31; m_planes[3].w = matrix._44 - matrix._41; m_planesVec = XMLoadFloat4(&(m_planes[3])); m_planesVec = XMPlaneNormalize(m_planesVec); XMStoreFloat4(&(m_planes[3]), m_planesVec); // Calculate top plane of frustum. m_planes[4].x = matrix._14 - matrix._12; m_planes[4].y = matrix._24 - matrix._22; m_planes[4].z = matrix._34 - matrix._32; m_planes[4].w = matrix._44 - matrix._42; m_planesVec = XMLoadFloat4(&(m_planes[4])); m_planesVec = XMPlaneNormalize(m_planesVec); XMStoreFloat4(&(m_planes[4]), m_planesVec); // Calculate bottom plane of frustum. m_planes[5].x = matrix._14 + matrix._12; m_planes[5].y = matrix._24 + matrix._22; m_planes[5].z = matrix._34 + matrix._32; m_planes[5].w = matrix._44 + matrix._42; m_planesVec = XMLoadFloat4(&(m_planes[5])); m_planesVec = XMPlaneNormalize(m_planesVec); XMStoreFloat4(&(m_planes[5]), m_planesVec); return; } bool FrustumClass::CheckPoint(float x, float y, float z) { int i; // Check if the point is inside all six planes of the view frustum. for (i = 0; i < 6; i++) { if (PlaneDotCoord(m_planes[i], XMFLOAT4(x, y, z, 1)) < 0.0f) { return false; } } return true; } float FrustumClass::PlaneDotCoord(XMFLOAT4 plane, XMFLOAT4 coor) { XMVECTOR m_planesVec = XMLoadFloat4(&plane); XMVECTOR m_Vec3 = XMLoadFloat4(&coor); XMVECTOR vectorOut = XMPlaneDotCoord(m_planesVec, m_Vec3); XMFLOAT4 ans = XMFLOAT4(0.0f,0.0f,0.0f,0.0f); XMStoreFloat4(&ans, vectorOut); return ans.x; } bool FrustumClass::CheckCube(float xCenter, float yCenter, float zCenter, float radius) { int i; // Check if any one point of the cube is in the view frustum. for (i = 0; i < 6; i++) { if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - radius), (yCenter - radius), (zCenter - radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + radius), (yCenter - radius), (zCenter - radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - radius), (yCenter + radius), (zCenter - radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + radius), (yCenter + radius), (zCenter - radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - radius), (yCenter - radius), (zCenter + radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + radius), (yCenter - radius), (zCenter + radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - radius), (yCenter + radius), (zCenter + radius), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + radius), (yCenter + radius), (zCenter + radius), 1.0f)) >= 0.0f) { continue; } return false; } return true; } bool FrustumClass::CheckSphere(float xCenter, float yCenter, float zCenter, float radius) { int i; // Check if the radius of the sphere is inside the view frustum. for (i = 0; i < 6; i++) { if (PlaneDotCoord(m_planes[i], XMFLOAT4(xCenter, yCenter, zCenter,1.0f)) < -radius) { return false; } } return true; } bool FrustumClass::CheckRectangle(float xCenter, float yCenter, float zCenter, float xSize, float ySize, float zSize) { int i; // Check if any of the 6 planes of the rectangle are inside the view frustum. for (i = 0; i < 6; i++) { if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - xSize), (yCenter - ySize), (zCenter - zSize),1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + xSize), (yCenter - ySize), (zCenter - zSize), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - xSize), (yCenter + ySize), (zCenter - zSize), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - xSize), (yCenter - ySize), (zCenter + zSize), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + xSize), (yCenter + ySize), (zCenter - zSize), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + xSize), (yCenter - ySize), (zCenter + zSize), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter - xSize), (yCenter + ySize), (zCenter + zSize), 1.0f)) >= 0.0f) { continue; } if (PlaneDotCoord(m_planes[i], XMFLOAT4((xCenter + xSize), (yCenter + ySize), (zCenter + zSize), 1.0f)) >= 0.0f) { continue; } return false; } return true; }
[ "mioyuki2009@gmail.com" ]
mioyuki2009@gmail.com
35e2e6d702a6aa6ba7ff9ee48a970506f3fc47c7
75452de12ec9eea346e3b9c7789ac0abf3eb1d73
/src/devices/block/drivers/block-verity/block-verity-test.cc
b2460f853c818bf49167dd7dba78f1cda6e3b745
[ "BSD-3-Clause" ]
permissive
oshunter/fuchsia
c9285cc8c14be067b80246e701434bbef4d606d1
2196fc8c176d01969466b97bba3f31ec55f7767b
refs/heads/master
2022-12-22T11:30:15.486382
2020-08-16T03:41:23
2020-08-16T03:41:23
287,920,017
2
2
BSD-3-Clause
2022-12-16T03:30:27
2020-08-16T10:18:30
C++
UTF-8
C++
false
false
16,225
cc
// Copyright 2020 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 <fuchsia/device/llcpp/fidl.h> #include <fuchsia/hardware/block/verified/llcpp/fidl.h> #include <fuchsia/io/llcpp/fidl.h> #include <lib/devmgr-integration-test/fixture.h> #include <lib/devmgr-launcher/launch.h> #include <lib/driver-integration-test/fixture.h> #include <lib/fdio/directory.h> #include <lib/zx/channel.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <cstdint> #include <utility> #include <fvm/test/device-ref.h> #include <ramdevice-client/ramdisk.h> #include <zxtest/zxtest.h> namespace { constexpr uint64_t kBlockSize = 4096; constexpr uint64_t kBlockCount = 8192; using driver_integration_test::IsolatedDevmgr; const char* kDriverLib = "/boot/driver/block-verity.so"; // Bind the block verity driver to the ramdisk. zx_status_t BindVerityDriver(zx::unowned_channel ramdisk_chan) { zx_status_t rc; auto resp = ::llcpp::fuchsia::device::Controller::Call::Bind( std::move(ramdisk_chan), ::fidl::unowned_str(kDriverLib, strlen(kDriverLib))); rc = resp.status(); if (rc == ZX_OK) { if (resp->result.is_err()) { rc = resp->result.err(); } } return rc; } class BlockVerityTest : public zxtest::Test { public: BlockVerityTest() {} void SetUp() override { IsolatedDevmgr::Args args; args.driver_search_paths.push_back("/boot/driver"); args.path_prefix = "/pkg/"; args.disable_block_watcher = true; args.disable_netsvc = true; ASSERT_OK(driver_integration_test::IsolatedDevmgr::Create(&args, &devmgr_)); // Create ramdisk. ramdisk_ = fvm::RamdiskRef::Create(devmgr_.devfs_root(), kBlockSize, kBlockCount); ASSERT_TRUE(ramdisk_); } protected: void OpenForAuthoring(IsolatedDevmgr& devmgr, std::unique_ptr<fvm::RamdiskRef>& ramdisk, fbl::unique_fd& verity_fd, zx::channel& verity_chan, fbl::unique_fd& mutable_fd, fbl::unique_fd& mutable_block_fd) { // bind the driver to the ramdisk ASSERT_OK(BindVerityDriver(zx::unowned_channel(ramdisk->channel()))); // wait for block-verity device to appear and open it std::string verity_path = std::string(ramdisk->path()) + "/verity"; std::string mutable_path = verity_path + "/mutable"; std::string mutable_block_path = mutable_path + "/block"; ASSERT_OK(devmgr_integration_test::RecursiveWaitForFile(devmgr.devfs_root(), verity_path.c_str(), &verity_fd)); // claim channel from fd ASSERT_OK(fdio_get_service_handle(verity_fd.release(), verity_chan.reset_and_get_address())); // make FIDL call to open in authoring mode fidl::aligned<::llcpp::fuchsia::hardware::block::verified::HashFunction> hash_function = ::llcpp::fuchsia::hardware::block::verified::HashFunction::SHA256; fidl::aligned<::llcpp::fuchsia::hardware::block::verified::BlockSize> block_size = ::llcpp::fuchsia::hardware::block::verified::BlockSize::SIZE_4096; auto config = ::llcpp::fuchsia::hardware::block::verified::Config::Builder( std::make_unique<::llcpp::fuchsia::hardware::block::verified::Config::Frame>()) .set_hash_function(fidl::unowned_ptr(&hash_function)) .set_block_size(fidl::unowned_ptr(&block_size)) .build(); // Request the device be opened for writes auto open_resp = ::llcpp::fuchsia::hardware::block::verified::DeviceManager::Call::OpenForWrite( zx::unowned_channel(verity_chan), std::move(config)); ASSERT_OK(open_resp.status()); ASSERT_FALSE(open_resp->result.is_err()); // Wait for the `mutable` device to appear ASSERT_OK(devmgr_integration_test::RecursiveWaitForFile(devmgr.devfs_root(), mutable_path.c_str(), &mutable_fd)); // And then wait for the `block` driver to bind to that device too ASSERT_OK(devmgr_integration_test::RecursiveWaitForFile( devmgr.devfs_root(), mutable_block_path.c_str(), &mutable_block_fd)); } void CloseAndGenerateSeal( zx::channel& verity_chan, ::llcpp::fuchsia::hardware::block::verified::DeviceManager_CloseAndGenerateSeal_Result* out) { // We use the caller-provided buffer FIDL call style because we need to keep // the response object alive so that the test code can interact with it // after this function returns. auto seal_resp = ::llcpp::fuchsia::hardware::block::verified::DeviceManager::Call::CloseAndGenerateSeal( zx::unowned_channel(verity_chan), seal_response_buffer_.view()); ASSERT_OK(seal_resp.status()); ASSERT_FALSE(seal_resp->result.is_err()); *out = std::move(seal_resp->result); } void Close(zx::channel& verity_chan) { // Close the device cleanly auto close_resp = ::llcpp::fuchsia::hardware::block::verified::DeviceManager::Call::Close( zx::unowned_channel(verity_chan)); ASSERT_OK(close_resp.status()); ASSERT_FALSE(close_resp->result.is_err()); } IsolatedDevmgr devmgr_; std::unique_ptr<fvm::RamdiskRef> ramdisk_; fidl::Buffer< llcpp::fuchsia::hardware::block::verified::DeviceManager::CloseAndGenerateSealResponse> seal_response_buffer_; private: }; class BlockVerityMutableTest : public BlockVerityTest { protected: fbl::unique_fd verity_fd_; zx::channel verity_chan_; fbl::unique_fd mutable_fd_; fbl::unique_fd mutable_block_fd_; }; TEST_F(BlockVerityTest, Bind) { ASSERT_OK(BindVerityDriver(ramdisk_->channel())); } TEST_F(BlockVerityMutableTest, BasicWrites) { OpenForAuthoring(devmgr_, ramdisk_, verity_fd_, verity_chan_, mutable_fd_, mutable_block_fd_); // Zero out the underlying ramdisk. fbl::Array<uint8_t> write_buf(new uint8_t[kBlockSize], kBlockSize); memset(write_buf.get(), 0, write_buf.size()); ASSERT_EQ(lseek(ramdisk_->fd(), 0, SEEK_SET), 0); for (uint64_t block = 0; block < kBlockCount; block++) { ASSERT_EQ(write(ramdisk_->fd(), write_buf.get(), write_buf.size()), kBlockSize); } // Examine the size of the child device. Expect it to be 8126 blocks, because // we've reserved 1 superblock and 65 integrity blocks of our 8192-block device. struct stat st; ASSERT_EQ(fstat(mutable_block_fd_.get(), &st), 0); ASSERT_EQ(st.st_size, 8126 * kBlockSize); uint64_t inner_block_count = st.st_size / kBlockSize; // Read the entire inner block device. Expect to see all zeroes. fbl::Array<uint8_t> zero_buf(new uint8_t[kBlockSize], kBlockSize); memset(zero_buf.get(), 0, zero_buf.size()); fbl::Array<uint8_t> read_buf(new uint8_t[kBlockSize], kBlockSize); memset(read_buf.get(), 0, read_buf.size()); for (uint64_t block = 0; block < inner_block_count; block++) { // Seek to start of block off_t offset = block * kBlockSize; ASSERT_EQ(lseek(mutable_block_fd_.get(), offset, SEEK_SET), offset); // Verify read succeeds ASSERT_EQ(read(mutable_block_fd_.get(), read_buf.get(), read_buf.size()), kBlockSize); // Expect to read all zeroes. ASSERT_EQ(memcmp(zero_buf.get(), read_buf.get(), zero_buf.size()), 0); } // Make a pattern in the write buffer. for (size_t i = 0; i < kBlockSize; i++) { write_buf[i] = static_cast<uint8_t>(i % 256); } // Write the first block on the mutable device with that pattern. ASSERT_EQ(lseek(mutable_block_fd_.get(), 0, SEEK_SET), 0); ASSERT_EQ(write(mutable_block_fd_.get(), write_buf.get(), write_buf.size()), kBlockSize); // Read it back. ASSERT_EQ(lseek(mutable_block_fd_.get(), 0, SEEK_SET), 0); ASSERT_EQ(read(mutable_block_fd_.get(), read_buf.get(), read_buf.size()), kBlockSize); ASSERT_EQ(memcmp(write_buf.get(), read_buf.get(), read_buf.size()), 0); // Find a block that matches from the underlying device. bool found = false; for (uint64_t block = 0; block < kBlockCount; block++) { // Seek to start of block off_t offset = block * kBlockSize; ASSERT_EQ(lseek(ramdisk_->fd(), offset, SEEK_SET), offset); ASSERT_EQ(read(ramdisk_->fd(), read_buf.get(), read_buf.size()), kBlockSize); if (memcmp(read_buf.get(), write_buf.get(), read_buf.size()) == 0) { found = true; // Expect to find the block at block 66 (after one superblock & 65 integrity blocks) ASSERT_EQ(block, 66); break; } } ASSERT_TRUE(found); // Close the device cleanly Close(verity_chan_); } TEST_F(BlockVerityMutableTest, BasicSeal) { // Zero out the underlying ramdisk. fbl::Array<uint8_t> write_buf(new uint8_t[kBlockSize], kBlockSize); memset(write_buf.get(), 0, write_buf.size()); ASSERT_EQ(lseek(ramdisk_->fd(), 0, SEEK_SET), 0); for (uint64_t block = 0; block < kBlockCount; block++) { ASSERT_EQ(write(ramdisk_->fd(), write_buf.get(), write_buf.size()), kBlockSize); } // Open the device. OpenForAuthoring(devmgr_, ramdisk_, verity_fd_, verity_chan_, mutable_fd_, mutable_block_fd_); // Close and generate a seal over the all-zeroes data section. ::llcpp::fuchsia::hardware::block::verified::DeviceManager_CloseAndGenerateSeal_Result result; CloseAndGenerateSeal(verity_chan_, &result); ASSERT_TRUE(result.is_response()); // Verify contents of the integrity section. For our 8126 data blocks of all-zeros, // we expect to find: // * 63 blocks of <128 * hash of all-zeroes block> // head -c 4096 /dev/zero | sha256sum - // ad7facb2586fc6e966c004d7d1d16b024f5805ff7cb47c7a85dabd8b48892ca7 - // So this block is 128 of those concatenated, which happens to hash to // b24a5dfc7087b09c7378bb9100b5ea913f283da2c8ca05297f39457cbdd651d4. // * 1 block of <(8126 - (128*63)) = 62 copies of (hash of the empty block) + 2112 zero bytes of // padding. This happens to hash to: // b3f0b10c454da8c746faf2a6f1dc89f29385ac56aed6e4b6ffb8fa3e9cee79ec // * 1 block with 63 hashes of the first type of block, 1 hash of the second // type of block, and zeroes to pad // As noted above, SHA256(The first type of block) = // b24a5dfc7087b09c7378bb9100b5ea913f283da2c8ca05297f39457cbdd651d4 // As noted above, SHA256(The second type of block) = // b3f0b10c454da8c746faf2a6f1dc89f29385ac56aed6e4b6ffb8fa3e9cee79ec // fbl::Array<uint8_t> zero_block(new uint8_t[kBlockSize], kBlockSize); memset(zero_block.get(), 0, kBlockSize); uint8_t zero_block_hash[32] = {0xad, 0x7f, 0xac, 0xb2, 0x58, 0x6f, 0xc6, 0xe9, 0x66, 0xc0, 0x04, 0xd7, 0xd1, 0xd1, 0x6b, 0x02, 0x4f, 0x58, 0x05, 0xff, 0x7c, 0xb4, 0x7c, 0x7a, 0x85, 0xda, 0xbd, 0x8b, 0x48, 0x89, 0x2c, 0xa7}; fbl::Array<uint8_t> expected_early_tier_0_integrity_block(new uint8_t[kBlockSize], kBlockSize); for (size_t i = 0; i < 128; i++) { memcpy(expected_early_tier_0_integrity_block.get() + (32 * i), zero_block_hash, 32); } fbl::Array<uint8_t> expected_final_tier_0_integrity_block(new uint8_t[kBlockSize], kBlockSize); for (size_t i = 0; i < 62; i++) { memcpy(expected_final_tier_0_integrity_block.get() + (32 * i), zero_block_hash, 32); } memset(expected_final_tier_0_integrity_block.get() + (62 * 32), 0, kBlockSize - (62 * 32)); uint8_t early_tier_0_integrity_block_hash[32] = { // Computed as follows: // python2 // >>> import hashlib // >>> h = hashlib.sha256() // >>> hzero = // "ad7facb2586fc6e966c004d7d1d16b024f5805ff7cb47c7a85dabd8b48892ca7".decode("hex") // >>> h.update(hzero * 128) // >>> h.hexdigest() // "b24a5dfc7087b09c7378bb9100b5ea913f283da2c8ca05297f39457cbdd651d4" 0xb2, 0x4a, 0x5d, 0xfc, 0x70, 0x87, 0xb0, 0x9c, 0x73, 0x78, 0xbb, 0x91, 0x00, 0xb5, 0xea, 0x91, 0x3f, 0x28, 0x3d, 0xa2, 0xc8, 0xca, 0x05, 0x29, 0x7f, 0x39, 0x45, 0x7c, 0xbd, 0xd6, 0x51, 0xd4}; uint8_t final_tier_0_integrity_block_hash[32] = { // >>> import hashlib // >>> h = hashlib.sha256() // >>> hzero = // "ad7facb2586fc6e966c004d7d1d16b024f5805ff7cb47c7a85dabd8b48892ca7".decode("hex") // >>> h.update((hzero * 62) + ('\0' * 2112)) // >>> h.hexdigest() // "b3f0b10c454da8c746faf2a6f1dc89f29385ac56aed6e4b6ffb8fa3e9cee79ec" 0xb3, 0xf0, 0xb1, 0x0c, 0x45, 0x4d, 0xa8, 0xc7, 0x46, 0xfa, 0xf2, 0xa6, 0xf1, 0xdc, 0x89, 0xf2, 0x93, 0x85, 0xac, 0x56, 0xae, 0xd6, 0xe4, 0xb6, 0xff, 0xb8, 0xfa, 0x3e, 0x9c, 0xee, 0x79, 0xec}; fbl::Array<uint8_t> expected_root_integrity_block(new uint8_t[kBlockSize], kBlockSize); for (size_t i = 0; i < 63; i++) { memcpy(expected_root_integrity_block.get() + (32 * i), early_tier_0_integrity_block_hash, 32); } memcpy(expected_root_integrity_block.get() + (32 * 63), final_tier_0_integrity_block_hash, 32); memset(expected_root_integrity_block.get() + (32 * 64), 0, kBlockSize - (32 * 64)); fbl::Array<uint8_t> read_buf(new uint8_t[kBlockSize], kBlockSize); for (size_t integrity_block_index = 0; integrity_block_index < 65; integrity_block_index++) { size_t absolute_block_index = integrity_block_index + 1; off_t offset = absolute_block_index * kBlockSize; ASSERT_EQ(lseek(ramdisk_->fd(), offset, SEEK_SET), offset); ASSERT_EQ(read(ramdisk_->fd(), read_buf.get(), read_buf.size()), kBlockSize); uint8_t* expected_block; if (integrity_block_index < 63) { expected_block = expected_early_tier_0_integrity_block.get(); } else if (integrity_block_index == 63) { expected_block = expected_final_tier_0_integrity_block.get(); } else { expected_block = expected_root_integrity_block.get(); } EXPECT_EQ(memcmp(expected_block, read_buf.get(), kBlockSize), 0, "integrity block %lu did not contain expected contents", integrity_block_index); } // Verify contents of the superblock. // Root integrity block hash is: // python2 // >>> import hashlib // >>> early_t0_hash = // "b24a5dfc7087b09c7378bb9100b5ea913f283da2c8ca05297f39457cbdd651d4".decode('hex') // >>> late_t0_hash = // "b3f0b10c454da8c746faf2a6f1dc89f29385ac56aed6e4b6ffb8fa3e9cee79ec".decode('hex') // >>> root_integrity_block = early_t0_hash * 63 + late_t0_hash + ('\0' * 2048) // >>> h = hashlib.sha256() // >>> h.update(root_integrity_block) // >>> h.hexdigest() // "5b7ecbf17daa9832c2484342f924e5480157c3582fcfaedc63c83e20875800f2" uint8_t expected_superblock[kBlockSize] = { // Recall: the superblock format is: // * 16 bytes magic 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x76, 0x31, 0x00, // * 8 bytes block count (little-endian) 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // * 4 bytes block size (little-endian) 0x00, 0x10, 0x00, 0x00, // * 4 bytes hash function tag (little-endian) 0x01, 0x00, 0x00, 0x00, // * 32 bytes integrity root hash (see computation above) 0x5b, 0x7e, 0xcb, 0xf1, 0x7d, 0xaa, 0x98, 0x32, 0xc2, 0x48, 0x43, 0x42, 0xf9, 0x24, 0xe5, 0x48, 0x01, 0x57, 0xc3, 0x58, 0x2f, 0xcf, 0xae, 0xdc, 0x63, 0xc8, 0x3e, 0x20, 0x87, 0x58, 0x00, 0xf2, // * 4032 zero bytes padding the rest of the block, autofilled by compiler. }; ASSERT_EQ(lseek(ramdisk_->fd(), 0, SEEK_SET), 0); ASSERT_EQ(read(ramdisk_->fd(), read_buf.get(), read_buf.size()), kBlockSize); EXPECT_EQ(memcmp(expected_superblock, read_buf.get(), kBlockSize), 0, "superblock did not contain expected contents"); // Verify that the root hash in Seal is the hash of the superblock. uint8_t expected_seal[32] = {0x79, 0x66, 0xa2, 0x81, 0x27, 0x55, 0xbc, 0x70, 0xba, 0x70, 0x58, 0xbe, 0x1f, 0xbb, 0xf1, 0xc4, 0xd8, 0x06, 0xf1, 0xd4, 0x0b, 0x16, 0x00, 0xaa, 0xc2, 0x96, 0x33, 0x32, 0xbf, 0x78, 0x1e, 0x28}; auto& actual_seal = result.response().seal; ASSERT_FALSE(actual_seal.has_invalid_tag()); ASSERT_TRUE(actual_seal.is_sha256()); auto actual_seal_data = actual_seal.sha256().superblock_hash.data(); ASSERT_EQ(memcmp(expected_seal, actual_seal_data, 32), 0, "Seal did not contain expected contents"); } } // namespace
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
947dcbd4e4a7b3e96ea85517bfcb49ca3ae2235f
5461b2b51dab7fbf4806d82bdd3e24dfcefe0703
/assignment3/src/joy2twist.cpp
b8ed8740998e27d28cf9ad010ca88709cf784e0e
[]
no_license
zzzzzbk/Indepedent-project
6fdcfe42619992267ee4b461e1995b36a7723409
81129089c85e5b6fccde5fec9e6b50b11e0176e6
refs/heads/master
2021-05-24T16:37:07.221090
2020-04-07T01:47:42
2020-04-07T01:47:42
253,658,135
0
0
null
2020-04-07T01:37:55
2020-04-07T01:37:55
null
UTF-8
C++
false
false
515
cpp
#include <geometry_msgs/Twist.h> #include <sensor_msgs/Joy.h> #include <assignment3/joy2twist.hpp> void joy2twist::joycallback(const sensor_msgs::Joy::ConstPtr& joy){ geometry_msgs::Twist twist; twist.angular.z=joy->axes[2]; twist.linear.x=joy->axes[1]; z=twist.angular.z; x=twist.linear.x; vel_pub.publish(twist); } joy2twist::joy2twist(ros::NodeHandle& nh): nh(nh){ vel_pub=nh.advertise<geometry_msgs::Twist>("cmd_vel",10); joy_sub=nh.subscribe<sensor_msgs::Joy>("joy",10,&joy2twist::joycallback,this); }
[ "noreply@github.com" ]
noreply@github.com
e1bfa01f5e2e79347c3db77555a1b49602ddfdf6
478de681ffa44de5019056394985346053d69654
/Determinant.cpp
3e2fbd077a93f5c6504e9d5a01b4405bd5b65a11
[]
no_license
meric61/Meric61
0dd9b15f9000b78ced5a2ef3f9f29ca33ae84904
5cc2aca019cc781af4733dca18741520a309bd39
refs/heads/master
2023-02-13T14:18:16.323556
2021-01-18T19:19:53
2021-01-18T19:19:53
330,764,039
0
0
null
null
null
null
ISO-8859-9
C++
false
false
1,371
cpp
#include<math.h> #include<conio.h> #include <locale.h> #define MAX 20 int determinant(int a[MAX][MAX],int n); using namespace std; int main() { setlocale(LC_ALL, "Turkish"); int i,j,r,c,a[MAX][MAX],b[MAX][MAX],deter=0; printf("\nLütfen matris satır sayısı giriniz= "); printf("\nLütfen matris sütun sayısı giriniz= "); scanf("%d",&c); if(r==c) { printf("\nLütfen matrisin elemanlarını sırasıyla Enter tuşuna basarak giriniz=\n"); for(i=0;i<r;i++) { for(j=0;j<c;j++) { scanf("%d",&a[i][j]); } } deter=determinant(a,r); printf("\nVerilen matris:\n"); for(i=0;i<r;i++) { for(j=0;j<c;j++) { printf("%d\t",a[i][j]); } printf("\n"); } printf("\nMatrisin determinantı: %d\n",deter); } else { printf("\nHATA! Determinantın hesaplanması için matrisin satır ve sütun sayıları eşit olmalıdır.\n"); } getch(); return 0; } int determinant(int a[MAX][MAX],int n) { int deter=0,p,h,k,i,j,gecici[MAX][MAX]; float gercekdeter; if(n==1) { return a[0][0]; } else if(n==2) { deter=(a[0][0]*a[1][1]-a[0][1]*a[1][0]); return deter; } else { for(p=0;p<n;p++) { h = 0; k = 0; for(i=1;i<n;i++) { for( j=0;j<n;j++) { if(j==p) { continue; } gecici[h][k] = a[i][j]; k++; if(k==n-1) { h++; k = 0; } } } deter=deter+a[0][p]*pow(-1,p)*determinant(gecici,n-1); } return deter; } }
[ "meric6148@gmail.com" ]
meric6148@gmail.com
606d4a6176703317abcc7b93953b2a024e6dd01c
b07d30899e0e4e10adaa03373b8b35696c983790
/src/vimage.h
2742047412aa1e970a3bc38adb356b4eaa93d508
[]
no_license
Snuux/ImageProcessingApp
5bf5ce133da93bddf5ce813c9fd5c6ee29092ec7
3e53554551bc2b4f59dfc7351eff2a0fd48b22e4
refs/heads/master
2021-01-12T13:40:57.613306
2016-12-14T23:46:18
2016-12-14T23:46:18
72,219,108
0
0
null
null
null
null
UTF-8
C++
false
false
7,205
h
#ifndef VIMAGE_H #define VIMAGE_H #include <vector> #include <algorithm> #include <string> #include <cmath> #include <QDebug> #define PI 3.1415926525 class VImage { public: static std::vector<unsigned char> viewPix; static int viewW, viewH; static std::vector<long int> histB; static std::vector<long int> histG; static std::vector<long int> histR; std::vector<unsigned char> memPix; int memW, memH; std::string commandName; std::vector<double> commandParameters; public: VImage(); VImage(const std::vector<unsigned char> &p, const int &width, const int &height); VImage(const VImage& copy); VImage &operator=(const VImage& copy); //copy enum ImageChannel { channelRed, channelGreen, channelBlue, channelAll }; static void computeHistogram(const std::vector<unsigned char>& p); void viewToMem(); void memToView(); //LOGIC FUNCTIONS// void brightnessContrast(const int a, const double b, const VImage::ImageChannel ch); void editHistogram3(const int x1, const int x2, const double k, const ImageChannel ch); void editHistogram4(const int x1, const int x2, const double k1, const double k2, const ImageChannel ch); void autoContrast(ImageChannel ch); void binImage(const int v, const ImageChannel ch); void convertToGrey(const int alg, const int num, const ImageChannel ch); std::vector<unsigned char> getPalette(int n); void binirizeSimple(const unsigned char term, const ImageChannel ch); void zoomNeighbor(const int w, const int h); void zoomNeighbor(const double k); void zoomBilinear(const int w, const int h); void zoomBilinear(const double k); void conv(std::vector<double> arr, const int w, const int h, const double divider, const bool norm, const ImageChannel ch); void filterMedian(const int n, const ImageChannel ch); void filterSharpen(const double n, const ImageChannel ch); void filterBox(const int n, const ImageChannel ch); void filterGauss(const int n, const double m, const double d, const ImageChannel ch); void flipHorizontal(); void flipVertical(); void rotate90clockwise(); void rotate90counterClockwise(); void rotate180(); void rotate(const double angle); void curveCorrection(const std::vector<double> &arr, const ImageChannel ch); void hsvCorrection(const short int h, const short int s, const short int v); void setBlackWhitePoints(unsigned char a, unsigned char b); void getBlackWhitePoints(unsigned char &a, unsigned char &b); void addColor(unsigned char r, unsigned char g, unsigned char b, unsigned char alpha, std::string mode); //ADDITIONAL INLINE FUNCTIONS// public: static inline unsigned char checkBounds0to255(const double &number) { if (number < 0) return 0; else if (number > 255) return 255; else return number; } static inline double checkBoundsCustom(const double &number, const double &a, const double &b) { if (number < a) return a; else if (number > b) return b; else return number; } static inline void pixelRGBtoHSV(const unsigned char &r, const unsigned char &g, const unsigned char &b, double &h, double &s, double &v) { double cr,cg,cb; double m1,m2, cmax, cmin, det; cr = r/255.0; cg = g/255.0; cb = b/255.0; m1 = std::min(cb, cg); m2 = std::min(cg, cr); cmin = std::min(m1, m2); m1 = std::max(cb, cg); m2 = std::max(cg, cr); cmax = std::max(m1, m2); det = cmax - cmin; v = cmax; ///// if (det < 0.00001) { s = 0; h = 0; return; } if (cmax > 0.0) s = (det / cmax); else { s = 0; h = 0; return; } if (cr >= cmax) h = (cg - cb) / det; else if (cg >= cmax) h = 2.0 + (cb- cr) / det; else h = 4.0 + (cr - cg) / det; h *= 60.0; if (h < 0.0) h += 360; s *= 100.0; v *= 100.0; /*if (cmax == 0) s = 0; else s = det/cmax; if (det < 0.00001) h = 0; else if (cmax == cr) h = 60*(fmod((cg-cb)/det, 6)); else if (cmax == cg) h = 60*(((cb-cr)/det) + 2); else //b h = 60*(((cr-cg)/det) + 4); h = VImage::checkBoundsCustom(h, 0, 360); s = VImage::checkBoundsCustom(h, 0, 100); v = VImage::checkBoundsCustom(h, 0, 100);*/ } static inline void pixelHSVtoRGB(const double &h, const double &s, const double &v, unsigned char &r, unsigned char &g, unsigned char &b) { double c,x,m; double cr,cg,cb; double ch; double cs, cv; int i; double ff; if (s <= 0) { r = v / 100 * 255; g = v / 100 * 255; b = v / 100 * 255; return; } ch = h / 60.0; cs = s / 100; cv = v / 100; i = (int) ch; ff = ch - i; c = cv * (1.0 - cs); x = cv * (1.0 - (cs * ff)); m = cv * (1.0 - (cs * (1.0 - ff))); //qDebug() << "cv, c, x, m" << cv << c << x << m; switch(i) { case 0: cr = cv; cg = m; cb = c; break; case 1: cr = x; cg = cv; cb = c; break; case 2: cr = c; cg = cv; cb = m; break; case 3: cr = c; cg = x; cb = cv; break; case 4: cr = m; cg = c; cb = cv; break; case 5: default: cr = cv; cg = c; cb = x; break; } r = cr * 255; g = cg * 255; b = cb * 255; /*double c,x,m; double cr,cg,cb; double ch; double cs, cv; ch = h / 60.0; cs = s / 100.0; cv = v / 100.0; c = cv * cs; x = c * (1 - abs( fmod(ch, 2) - 1) ); m = cv - c; qDebug() << "fmod(ch, 2)" << fmod(ch, 2) << "ch % 2" << (int)ch % 2 << "ch / 2" << ch / 2; qDebug() << "c,x,m" << c << x << m; double xx = c * (1 - abs( fmod(ch, 2) - 1) ); if (ch >= 0 && ch < 1) {cr = c; cg = x; cb = 0;} else if (ch >= 1 && ch < 2) {cr = x; cg = c; cb = 0;} else if (ch >= 2 && ch < 3) {cr = 0; cg = c; cb = x;} else if (ch >= 3 && ch < 4) {cr = 0; cg = x; cb = c;} else if (ch >= 4 && ch < 5) {cr = x; cg = 0; cb = c;} else if (ch >= 5 && ch < 6) {cr = c; cg = 0; cb = x;} cb = (cb+m)*255.0; cg = (cg+m)*255.0; cr = (cr+m)*255.0; b = VImage::checkBounds0to255(cb); g = VImage::checkBounds0to255(cg); r = VImage::checkBounds0to255(cr);*/ } }; #endif // VIMAGE_H
[ "snuux@yandex.ru" ]
snuux@yandex.ru
fbf63483563e76c3b73bc96350e64252ecf13a23
acd771a8adf0752b84cfbe1505e2659f3dc8a0b7
/abc279/D.cc
46d2c36e7ff0e1e938877fb109658382d43cc6a6
[]
no_license
berry8192/Atc
d85b17ef51e12de30978e06a2f9105f659af5b99
b84340e32f8632fe9461816a0d42fe86f42b7161
refs/heads/master
2023-09-01T00:11:16.855065
2023-08-27T05:20:17
2023-08-27T05:20:17
186,664,102
0
1
null
2023-09-11T16:02:32
2019-05-14T16:53:36
C++
UTF-8
C++
false
false
266
cc
#include <iostream> #include <cmath> using namespace std; int main(){ long long a, b; double g; cin>> a>>b; g=pow(2.0*(b-1)/a, 2.0/3); double ans=a; ans=min(ans, a/sqrt(floor(g))); ans=min(ans, a/sqrt(ceil(g))); printf("%.12lf\n", ans); return 0; }
[ "berryrt8192.gmail.com" ]
berryrt8192.gmail.com
ee3c16de516923861aaabe28c922aa686a281e9f
4a54dd5a93bbb3f603a2875d5e6dcb3020fb52f2
/official/inter-2009-10-15-china/src/IGuildMgr.cpp
85dd42ea3547717421d17cb4b31e641a4a54f930
[]
no_license
Torashi1069/xenophase
400ebed356cff6bfb735f9c03f10994aaad79f5e
c7bf89281c95a3c5cf909a14d0568eb940ad7449
refs/heads/master
2023-02-02T19:15:08.013577
2020-08-17T00:41:43
2020-08-17T00:41:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,768
cpp
#include "ErrorLog.h" #include "IGuildInfoDB.h" #include "IGuildMgr.h" #include "ZServerMgr.h" #include "Common/Packet.h" #include "enums.hpp" #include "globals.hpp" hook_ptr<CIGuildMgr*> CIGuildMgr::m_cpSelf(SERVER, "CIGuildMgr::m_cpSelf"); // = NULL; hook_method<void (CIGuildMgr::*)(int MaxGuild)> CIGuildMgr::_Init(SERVER, "CIGuildMgr::Init"); void CIGuildMgr::Init(int MaxGuild) // line 58 { return (this->*_Init)(MaxGuild); //TODO } hook_method<CGuild* (CIGuildMgr::*)(void)> CIGuildMgr::_AllocGuild(SERVER, "CIGuildMgr::AllocGuild"); CGuild* CIGuildMgr::AllocGuild(void) // line 63 { return (this->*_AllocGuild)(); //TODO } hook_method<void (CIGuildMgr::*)(unsigned long ZSID, unsigned long GID, unsigned long AID)> CIGuildMgr::_LogonUserA(SERVER, "CIGuildMgr::LogonUserA"); void CIGuildMgr::LogonUserA(unsigned long ZSID, unsigned long GID, unsigned long AID) // line 69-100 { return (this->*_LogonUserA)(ZSID, GID, AID); // TODO } hook_method<void (CIGuildMgr::*)(void)> CIGuildMgr::_GuildAllSave(SERVER, "CIGuildMgr::GuildAllSave"); void CIGuildMgr::GuildAllSave(void) // line 922 { return (this->*_GuildAllSave)(); //TODO } hook_method<void (CIGuildMgr::*)(unsigned long ZSID, unsigned long AID, unsigned long GID)> CIGuildMgr::_ExitUser(SERVER, "CIGuildMgr::ExitUser"); void CIGuildMgr::ExitUser(unsigned long ZSID, unsigned long AID, unsigned long GID) // line 167-196 { return (this->*_ExitUser)(ZSID, AID, GID); // TODO } hook_method<void (CIGuildMgr::*)(unsigned long ZSID, unsigned long AID, unsigned long GID, unsigned long MyGID, unsigned long MyAID)> CIGuildMgr::_ReqJoinGuild(SERVER, "CIGuildMgr::ReqJoinGuild"); void CIGuildMgr::ReqJoinGuild(unsigned long ZSID, unsigned long AID, unsigned long GID, unsigned long MyGID, unsigned long MyAID) { return (this->*_ReqJoinGuild)(ZSID, AID, GID, MyGID, MyAID); if( g_IGuildDB.CIGuildInfoDB::GetGDID(GID) ) { PACKET_IZ_ACK_REQ_JOIN_GUILD OutPacket; OutPacket.PacketType = HEADER_IZ_ACK_REQ_JOIN_GUILD; OutPacket.AID = MyAID; OutPacket.answer = 0; g_zServerMgr.CZServerMgr::SendMsgToZServer(ZSID, sizeof(OutPacket), (char*)&OutPacket); return; // done. } unsigned long GDID = g_IGuildDB.CIGuildInfoDB::GetGDID(MyGID); if( GDID == 0 ) return; // not in a guild CGuild* g; if( (g = this->CGuildMgr::SearchGuild(GDID)) == NULL && (g = this->CIGuildMgr::LoadGuild(0,0)) == NULL ) return; // guild not found int posID = g->CGuild::GetGuildPosID(MyGID); if( g->CGuild::GetPosJoinRight(posID) == 0 ) return; // not allowed to invite if( g->CGuild::GetGuildMSize() >= g->CGuild::GetMaxUserNum() ) { Trace("Member OverSize UserNum : %d, MaxUserNum: %d\n", g->CGuild::GetGuildMSize(), g->CGuild::GetMaxUserNum()); PACKET_IZ_ACK_REQ_JOIN_GUILD OutPacket; OutPacket.PacketType = HEADER_IZ_ACK_REQ_JOIN_GUILD; OutPacket.AID = MyAID; OutPacket.answer = 3; g_zServerMgr.CZServerMgr::SendMsgToZServer(ZSID, sizeof(OutPacket), (char*)&OutPacket); return; // no more room } m_guildAIDQueue[GID] = MyAID; PACKET_IZ_REQ_JOIN_GUILD Packet; Packet.PacketType = HEADER_IZ_REQ_JOIN_GUILD; Packet.GDID = GDID; Packet.AID = AID; g_IGuildDB.CGuildDB::GetTableChar(GDID, 1, Packet.guildName, sizeof(Packet.guildName)); g_zServerMgr.CZServerMgr::SendMsgToZServer(ZSID, sizeof(Packet), (char*)&Packet); } hook_method<CIGuildInfo* (CIGuildMgr::*)(unsigned long GDID, int bNotify)> CIGuildMgr::_LoadGuild(SERVER, "CIGuildMgr::LoadGuild"); CIGuildInfo* CIGuildMgr::LoadGuild(unsigned long GDID, int bNotify) { return (this->*_LoadGuild)(GDID, bNotify); //TODO } hook_method<void (CIGuildMgr::*)(unsigned long ZSID, short PacketType, unsigned long GDID, int Len, char* buf)> CIGuildMgr::_SendPacket(SERVER, "CIGuildMgr::SendPacket"); void CIGuildMgr::SendPacket(unsigned long ZSID, short PacketType, unsigned long GDID, int Len, char* buf) { return (this->*_SendPacket)(ZSID, PacketType, GDID, Len, buf); CIGuildInfo* g; if( (g = (CIGuildInfo *)this->CGuildMgr::SearchGuild(GDID)) == NULL && (g = (CIGuildInfo *)this->CIGuildMgr::LoadGuild(GDID,1)) == NULL ) return; g->CIGuildInfo::SetAllNotifyInfo(1); if( g->m_packetDispatcher.CIGuildInfoPacketDispatcher::DispatchPacket(ZSID, GDID, PacketType, Len, buf) != -1 ) { char buff[1024]; sprintf(buff, "Guild DispatchPacket error- PacketType:%d \n", PacketType); g_errorLogs.CErrorLog::CriticalErrorLog(buff, 488, ".\\IGuildMgr.cpp"); } } hook_method<void (CIGuildMgr::*)(void)> CIGuildMgr::_ProcessAllGuild(SERVER, "CIGuildMgr::ProcessAllGuild"); void CIGuildMgr::ProcessAllGuild(void) // line 707 { return (this->*_ProcessAllGuild)(); //TODO } hook_method<unsigned long (CIGuildMgr::*)(unsigned long GID)> CIGuildMgr::_SearchAIDMap(SERVER, "CIGuildMgr::SearchAIDMap"); unsigned long CIGuildMgr::SearchAIDMap(unsigned long GID) { return (this->*_SearchAIDMap)(GID); //TODO } hook_method<unsigned long (CIGuildMgr::*)(void)> CIGuildMgr::_GetFreeSize(SERVER, "CIGuildMgr::GetFreeSize"); unsigned long CIGuildMgr::GetFreeSize(void) // line 39 (IGuildMgr.h) { return (this->*_GetFreeSize)(); return m_iGuildMPool.CMemoryMgr<CIGuildInfo>::GetFreeSize(); } hook_method<void (CIGuildMgr::*)(void)> CIGuildMgr::_GetGuildAgitDB(SERVER, "CIGuildMgr::GetGuildAgitDB"); void CIGuildMgr::GetGuildAgitDB(void) // line 756 { return (this->*_GetGuildAgitDB)(); //TODO } hook_method<void (CIGuildMgr::*)(unsigned long GDID)> CIGuildMgr::_OutPutGuildInfo(SERVER, "CIGuildMgr::OutPutGuildInfo"); void CIGuildMgr::OutPutGuildInfo(unsigned long GDID) // line 892 { return (this->*_OutPutGuildInfo)(GDID); CIGuildInfo* info = (CIGuildInfo*)this->CGuildMgr::SearchGuild(GDID); if( info != NULL ) info->CIGuildInfo::OutPutGuildInfo(0); } hook_method<bool (CIGuildMgr::*)(void)> CIGuildMgr::_Create(SERVER, "CIGuildMgr::Create"); bool CIGuildMgr::Create(void) // line 30 { return (this->*_Create)(); return true; } hook_method<void (CIGuildMgr::*)(void)> CIGuildMgr::_Destroy(SERVER, "CIGuildMgr::Destroy"); void CIGuildMgr::Destroy(void) // line 36 { return (this->*_Destroy)(); ; } CIGuildMgr::CIGuildMgr(void) // line 13 { m_bOK = false; m_lastSaveTime = timeGetTime(); if( this->CIGuildMgr::Create() ) m_bOK = true; } CIGuildMgr::~CIGuildMgr(void) // line 21 { } hook_method<static bool (__cdecl *)(void)> CIGuildMgr::_CreateInstance(SERVER, "CIGuildMgr::CreateInstance"); bool CIGuildMgr::CreateInstance(void) { return (CIGuildMgr::_CreateInstance)(); //TODO } hook_method<static void (__cdecl *)(void)> CIGuildMgr::_DestroyInstance(SERVER, "CIGuildMgr::DestroyInstance"); void CIGuildMgr::DestroyInstance(void) { return (CIGuildMgr::_DestroyInstance)(); //TODO } /// @custom CIGuildMgr* CIGuildMgr::GetObj(void) { return m_cpSelf; }
[ "50342848+Kokotewa@users.noreply.github.com" ]
50342848+Kokotewa@users.noreply.github.com
b38ad7434fee482f379fa498dcbd94c651b17dc5
f250ca2f56265f7f794d5de5de4763f78e590ca5
/tests/Demo_02_Model.cpp
ee1afa04f184306bd2fda2fb71710564546d78a4
[]
no_license
el15kd/ABM-ACS6332
b93305e87dba6f4d7135bc41b8917cb116e4688e
9808b0e243f14552b7d5a2efecc952c923371301
refs/heads/master
2020-04-08T19:58:05.510752
2018-11-29T14:27:18
2018-11-29T14:27:18
159,678,452
0
0
null
null
null
null
UTF-8
C++
false
false
14,873
cpp
/* Demo_02_Model.cpp */ #include <stdio.h> #include <vector> #include <stdlib.h> // srand, rand; could also use Repast's Random.h #include <time.h> // time() function used to initiallize srand w/ a runtime value #include <boost/mpi.hpp> #include "repast_hpc/AgentId.h" #include "repast_hpc/RepastProcess.h" #include "repast_hpc/Utilities.h" #include "repast_hpc/Properties.h" #include "repast_hpc/initialize_random.h" #include "repast_hpc/SVDataSetBuilder.h" #include "Demo_02_Model.h" BOOST_CLASS_EXPORT_GUID(repast::SpecializedProjectionInfoPacket<repast::RepastEdgeContent<RepastHPCDemoAgent> >, "SpecializedProjectionInfoPacket_EDGE"); RepastHPCDemoAgentPackageProvider::RepastHPCDemoAgentPackageProvider(repast::SharedContext<RepastHPCDemoAgent>* agentPtr): agents(agentPtr){ } /*provide pkg*/ void RepastHPCDemoAgentPackageProvider::providePackage(RepastHPCDemoAgent * agent, std::vector<RepastHPCDemoAgentPackage>& out){ repast::AgentId id = agent->getId(); RepastHPCDemoAgentPackage package(id.id(),id.startingRank(),id.agentType(),id.currentRank(),agent->getState()); out.push_back(package); } /*provide content*/ void RepastHPCDemoAgentPackageProvider::provideContent(repast::AgentRequest req, std::vector<RepastHPCDemoAgentPackage>& out){ std::vector<repast::AgentId> ids = req.requestedAgents(); for(size_t i = 0; i < ids.size(); i++){providePackage(agents->getAgent(ids[i]), out);} } /*Receive pkg*/ RepastHPCDemoAgentPackageReceiver::RepastHPCDemoAgentPackageReceiver(repast::SharedContext<RepastHPCDemoAgent>* agentPtr): agents(agentPtr){} RepastHPCDemoAgent * RepastHPCDemoAgentPackageReceiver::createAgent(RepastHPCDemoAgentPackage package){ repast::AgentId id(package.id, package.rank, package.type, package.currentRank); return new RepastHPCDemoAgent(id, 2); } /*Update Agent w/ pkg*/ void RepastHPCDemoAgentPackageReceiver::updateAgent(RepastHPCDemoAgentPackage package){ repast::AgentId id(package.id, package.rank, package.type); RepastHPCDemoAgent * agent = agents->getAgent(id); agent->set(package.currentRank,package.state); } /*Connect Agent Net*/ void RepastHPCDemoModel::connectAgentNetwork(){ repast::SharedContext<RepastHPCDemoAgent>::const_local_iterator iter = context.localBegin(); repast::SharedContext<RepastHPCDemoAgent>::const_local_iterator iterEnd = context.localEnd(); while(iter != iterEnd) { RepastHPCDemoAgent* ego = &**iter; std::vector<RepastHPCDemoAgent*> agents; agents.push_back(ego); context.selectAgents(5, agents, true); // Omit self & choose 4 other agents randomly for(size_t i = 0; i < agents.size(); i++){ // Make an undirected connection // std::cout << "CONNECTING: " << ego->getId() << " to " << agents[i]->getId() << std::endl; // uncomment to see agents are being connected agentNetwork->addEdge(ego, agents[i]); } iter++; } } /*create model/world*/ RepastHPCDemoModel::RepastHPCDemoModel(std::string propsFile, int argc, char** argv, boost::mpi::communicator* comm): context(comm){ props = new repast::Properties(propsFile, argc, argv, comm); stopAt = repast::strToInt(props->getProperty("stop.at")); countOfAgents = repast::strToInt(props->getProperty("count.of.agents")); // read 'properties' file inputs initializeRandom(*props, comm); if(repast::RepastProcess::instance()->rank() == 0) props->writeToSVFile("./output/record.csv"); provider = new RepastHPCDemoAgentPackageProvider(&context); receiver = new RepastHPCDemoAgentPackageReceiver(&context); agentNetwork = new repast::SharedNetwork<RepastHPCDemoAgent, repast::RepastEdge<RepastHPCDemoAgent>, repast::RepastEdgeContent<RepastHPCDemoAgent>, repast::RepastEdgeContentManager<RepastHPCDemoAgent> >("agentNetwork", false, &edgeContentManager); // agentNetwork will go into 'context' which will go into 'play' context.addProjection(agentNetwork); // Data collection std::string fileOutputName("./output/agent_total_data.csv"); // Create the data set builder repast::SVDataSetBuilder builder(fileOutputName.c_str(), ",", repast::RepastProcess::instance()->getScheduleRunner().schedule()); // Create the individual data sets to be added to the builder // Use the builder to create the data set agentValues = builder.createDataSet(); } /*kill model*/ RepastHPCDemoModel::~RepastHPCDemoModel(){delete props; delete provider; delete receiver; delete agentValues;} /*Randomize state*/ int randomize() {srand(time(NULL)); int randNum = rand() % 3 + 1; return randNum;} // initialize random seed & generate random number between 1 & 3 /*init model*/ void RepastHPCDemoModel::init(){ int rank = repast::RepastProcess::instance()->rank(); // current rank //RepastHPCDemoAgent* agent = context.getAgent(toDisplay) //agent->getState(); for(int i = 0; i < countOfAgents; i++){ repast::AgentId id(i, rank, 0); id.currentRank(rank); int tempNum = randomize(); RepastHPCDemoAgent* agent = new RepastHPCDemoAgent(id,tempNum); // Create Agent w/ RepastHPCDemoAgent::RepastHPCDemoAgent(repast::AgentId id); int state = agent->getState(); // set the state w/ RepastHPCDemoAgent::set agent->set(rank,state); // randomly sets the states for all agents in currentRank context.addAgent(agent); } } /*requestAgents*/ void RepastHPCDemoModel::requestAgents(){ int rank = repast::RepastProcess::instance()->rank(); int worldSize= repast::RepastProcess::instance()->worldSize(); repast::AgentRequest req(rank); for(int i = 0; i < worldSize; i++){ // For each process if(i != rank){ // ... except this one std::vector<RepastHPCDemoAgent*> agents; context.selectAgents(4, agents); // Choose 4 local agents randomly for(size_t j = 0; j < agents.size(); j++){ repast::AgentId local = agents[j]->getId(); // Transform each local agent's id into a matching non-local one repast::AgentId other(local.id(), i, 0); other.currentRank(i); req.addRequest(other); // Add it to the agent request } } } repast::RepastProcess::instance()->requestAgents<RepastHPCDemoAgent, RepastHPCDemoAgentPackage, RepastHPCDemoAgentPackageProvider, RepastHPCDemoAgentPackageReceiver>(context, req, *provider, *receiver, *receiver); } /*cancelAgentRequests*/ void RepastHPCDemoModel::cancelAgentRequests(){ int rank = repast::RepastProcess::instance()->rank(); if(rank == 0) std::cout << "CANCELING AGENT REQUESTS" << std::endl; repast::AgentRequest req(rank); repast::SharedContext<RepastHPCDemoAgent>::const_state_aware_iterator non_local_agents_iter = context.begin(repast::SharedContext<RepastHPCDemoAgent>::NON_LOCAL); repast::SharedContext<RepastHPCDemoAgent>::const_state_aware_iterator non_local_agents_end = context.end(repast::SharedContext<RepastHPCDemoAgent>::NON_LOCAL); while(non_local_agents_iter != non_local_agents_end){ req.addCancellation((*non_local_agents_iter)->getId());non_local_agents_iter++;} repast::RepastProcess::instance()->requestAgents<RepastHPCDemoAgent, RepastHPCDemoAgentPackage, RepastHPCDemoAgentPackageProvider, RepastHPCDemoAgentPackageReceiver>(context, req, *provider, *receiver, *receiver); std::vector<repast::AgentId> cancellations = req.cancellations(); std::vector<repast::AgentId>::iterator idToRemove = cancellations.begin(); while(idToRemove != cancellations.end()){context.importedAgentRemoved(*idToRemove);idToRemove++;} } /*remove & synchronize local agents*/ void RepastHPCDemoModel::removeLocalAgents(){ int rank = repast::RepastProcess::instance()->rank(); if(rank == 0) std::cout << "REMOVING LOCAL AGENTS" << std::endl; for(int i = 0; i < 4; i++){repast::AgentId id(i, rank, 0); repast::RepastProcess::instance()->agentRemoved(id); context.removeAgent(id);} repast::RepastProcess::instance()->synchronizeAgentStatus<RepastHPCDemoAgent, RepastHPCDemoAgentPackage, RepastHPCDemoAgentPackageProvider, RepastHPCDemoAgentPackageReceiver>(context, *provider, *receiver, *receiver); } /*Move agents*/ void RepastHPCDemoModel::moveAgents(){ int rank = repast::RepastProcess::instance()->rank(); if(rank == 0){ // moveAgent() notifies 'this' RepastProcess the specified agent should be moved from 'this' process to a specified process; moveAgents() does this for multiple agents & processes repast::AgentId agent0(0, 0, 0); repast::AgentId agent1(1, 0, 0); repast::AgentId agent2(2, 0, 0); repast::AgentId agent3(3, 0, 0); repast::AgentId agent4(4, 0, 0); repast::RepastProcess::instance()->moveAgent(agent0, 1); repast::RepastProcess::instance()->moveAgent(agent1, 2); repast::RepastProcess::instance()->moveAgent(agent2, 3); repast::RepastProcess::instance()->moveAgent(agent3, 3); repast::RepastProcess::instance()->moveAgent(agent4, 1); } repast::RepastProcess::instance()->synchronizeAgentStatus<RepastHPCDemoAgent, RepastHPCDemoAgentPackage, RepastHPCDemoAgentPackageProvider, RepastHPCDemoAgentPackageReceiver>(context, *provider, *receiver, *receiver); } const char * initialPrint = "initial"; const char * finalPrint = "final"; int whichRank = 0; // vars used in the following function /* Print Agent Information */ void printAgentInfo(int whichRank,const char* text,repast::SharedContext<RepastHPCDemoAgent>* context){ // on current rank and tick if(repast::RepastProcess::instance()->rank() == whichRank) std::cout << " TICK " << repast::RepastProcess::instance()->getScheduleRunner().currentTick() << std::endl; if(repast::RepastProcess::instance()->rank() == whichRank){ std::cout << "LOCAL AGENTS:" << std::endl; for(int r = 0; r < 4; r++){ for(int i = 0; i < 10; i++){ repast::AgentId toDisplay(i, r, 0); RepastHPCDemoAgent* agent = context->getAgent(toDisplay); // gets the id of the agent to display as a ptr if((agent != 0) && (agent->getId().currentRank() == whichRank)) { int getTheState = agent->getState(); std::cout << agent->getId() << std::endl; //printf(" %s state is %d\n",text,getTheState); // ^ Two print statement on one line because I couldn't figure out how to; tried unboxing and then casting, didn't work ((int)(repast::AgentId)agent->getId()) //std::cout << agent->getId() << " %c state is " << text << getTheState << std::endl; } } } std::cout << "NON LOCAL AGENTS:" << std::endl; for(int r = 0; r < 4; r++){ for(int i = 0; i < 10; i++){ repast::AgentId toDisplay(i, r, 0); RepastHPCDemoAgent* agent = context->getAgent(toDisplay); if((agent != 0) && (agent->getId().currentRank() != whichRank)) { int getTheState = agent->getState(); std::cout << agent->getId() << std::endl; //printf(" %s state is %d\n",text,getTheState); } } } } } /*Where the Actual Thresholding's done; also provides scheduling ability*/ void RepastHPCDemoModel::doSomething(){ void printAgentInfo(int whichRank,const char* initialPrint,repast::SharedContext<RepastHPCDemoAgent>& context); // also needs context & agents std::vector<RepastHPCDemoAgent*> agents; context.selectAgents(repast::SharedContext<RepastHPCDemoAgent>::LOCAL, countOfAgents, agents); // ^ select 5 agents from the current rank; gives a ptr vector/set of local agents, drawing the sample from 5 local agents std::vector<RepastHPCDemoAgent*>::iterator it = agents.begin(); //start iterating through the selected agents who are represented by a vector of ptrs to agents pointed to by it std::advance(it, 1); //start from the second agent while(it != agents.end()){(*it)->play(&context); it++;} //printf("That was iteration # %d\n",iter); // should be 5 iterations; //void printAgentsStates(int whichRank,const char* finalPrint,repast::SharedContext<RepastHPCDemoAgent>* context); repast::RepastProcess::instance()->synchronizeAgentStates<RepastHPCDemoAgentPackage, RepastHPCDemoAgentPackageProvider, RepastHPCDemoAgentPackageReceiver>(*provider, *receiver); //void printAgentsStates(int whichRank,const char* finalPrint,repast::SharedContext<RepastHPCDemoAgent>* context); } /*init schedule*/ void RepastHPCDemoModel::initSchedule(repast::ScheduleRunner& runner){ runner.scheduleEvent(1, repast::Schedule::FunctorPtr(new repast::MethodFunctor<RepastHPCDemoModel> (this, &RepastHPCDemoModel::requestAgents))); runner.scheduleEvent(1.1, repast::Schedule::FunctorPtr(new repast::MethodFunctor<RepastHPCDemoModel> (this, &RepastHPCDemoModel::connectAgentNetwork))); runner.scheduleEvent(2, 1, repast::Schedule::FunctorPtr(new repast::MethodFunctor<RepastHPCDemoModel> (this, &RepastHPCDemoModel::doSomething))); runner.scheduleEvent(3, repast::Schedule::FunctorPtr(new repast::MethodFunctor<RepastHPCDemoModel> (this, &RepastHPCDemoModel::moveAgents))); runner.scheduleEndEvent(repast::Schedule::FunctorPtr(new repast::MethodFunctor<RepastHPCDemoModel> (this, &RepastHPCDemoModel::recordResults))); runner.scheduleStop(stopAt); /* Data collection - NOT IMPLEMENTED runner.scheduleEvent(1.5, 5, repast::Schedule::FunctorPtr(new repast::MethodFunctor<repast::DataSet>(agentValues, &repast::DataSet::record))); runner.scheduleEvent(10.6, 10, repast::Schedule::FunctorPtr(new repast::MethodFunctor<repast::DataSet>(agentValues, &repast::DataSet::write))); runner.scheduleEndEvent(repast::Schedule::FunctorPtr(new repast::MethodFunctor<repast::DataSet>(agentValues, &repast::DataSet::write))); */ } /*record results*/ void RepastHPCDemoModel::recordResults(){ if(repast::RepastProcess::instance()->rank() == 0){ props->putProperty("Result","Passed"); std::vector<std::string> keyOrder; keyOrder.push_back("RunNumber"); keyOrder.push_back("stop.at"); keyOrder.push_back("Result"); props->writeToSVFile("./output/results.csv", keyOrder); } } // ELIMINATED /* DAQ //DataSource_AgentTotals* agentTotals_DataSource = new DataSource_AgentTotals(&context); //builder.addDataSource(createSVDataSource("Total", agentTotals_DataSource, std::plus<int>())); //DataSource_AgentCTotals* agentCTotals_DataSource = new DataSource_AgentCTotals(&context); //builder.addDataSource(createSVDataSource("C", agentCTotals_DataSource, std::plus<int>())); //getCData DataSource_AgentTotals::DataSource_AgentTotals(repast::SharedContext<RepastHPCDemoAgent>* c) : context(c){ } int DataSource_AgentTotals::getData(){ int sum = 0; repast::SharedContext<RepastHPCDemoAgent>::const_local_iterator iter = context->localBegin(); repast::SharedContext<RepastHPCDemoAgent>::const_local_iterator iterEnd = context->localEnd(); while( iter != iterEnd) { sum+= (*iter)->getTotal(); iter++; } return sum; } //getCData DataSource_AgentCTotals::DataSource_AgentCTotals(repast::SharedContext<RepastHPCDemoAgent>* c) : context(c){ } int DataSource_AgentCTotals::getData(){ int sum = 0; repast::SharedContext<RepastHPCDemoAgent>::const_local_iterator iter = context->localBegin(); repast::SharedContext<RepastHPCDemoAgent>::const_local_iterator iterEnd = context->localEnd(); while( iter != iterEnd) { sum+= (*iter)->getC(); iter++; } return sum; } */
[ "el15kd@leeds.ac.uk" ]
el15kd@leeds.ac.uk
a2c075aaa94eee4b92085148b1db9bc10fb7842e
107d79f2c1802a3ff66d300d5d1ab2d413bac375
/src/eepp/window/backend/SDL2/cwindowsdl2.cpp
e106e4fcc2aeffde6543ff6d7abc20ca9d53c53b
[ "MIT" ]
permissive
weimingtom/eepp
2030ab0b2a6231358f8433304f90611499b6461e
dd672ff0e108ae1e08449ca918dc144018fb4ba4
refs/heads/master
2021-01-10T01:36:39.879179
2014-06-02T02:46:33
2014-06-02T02:46:33
46,509,734
0
0
null
null
null
null
UTF-8
C++
false
false
17,544
cpp
#include <eepp/window/backend/SDL2/base.hpp> #ifdef EE_BACKEND_SDL2 #if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_IOS #if !defined( EE_COMPILER_MSVC ) && EE_PLATFORM != EE_PLATFORM_IOS #include <SDL2/SDL_syswm.h> #else #include <SDL_syswm.h> #endif #undef CreateWindow #endif #include <eepp/helper/SOIL2/src/SOIL2/stb_image.h> #include <eepp/window/cengine.hpp> #include <eepp/window/platform/platformimpl.hpp> #include <eepp/window/backend/SDL2/cwindowsdl2.hpp> #include <eepp/window/backend/SDL2/cclipboardsdl2.hpp> #include <eepp/window/backend/SDL2/cinputsdl2.hpp> #include <eepp/window/backend/SDL2/ccursormanagersdl2.hpp> #include <eepp/graphics/cglobalbatchrenderer.hpp> #include <eepp/graphics/cshaderprogrammanager.hpp> #include <eepp/graphics/cvertexbuffermanager.hpp> #include <eepp/graphics/cframebuffermanager.hpp> #include <eepp/graphics/ctexturefactory.hpp> #include <eepp/graphics/renderer/cgl.hpp> #if EE_PLATFORM == EE_PLATFORM_ANDROID #include <eepp/system/czip.hpp> #include <jni.h> static std::string SDL_AndroidGetApkPath() { static std::string apkPath = ""; if ( "" == apkPath ) { jmethodID mid; jobject context; jobject fileObject; const char *path; JNIEnv *env = (JNIEnv*)SDL_AndroidGetJNIEnv(); jclass ActivityClass = env->GetObjectClass((jobject)SDL_AndroidGetActivity()); // context = SDLActivity.getContext(); mid = env->GetStaticMethodID(ActivityClass,"getContext","()Landroid/content/Context;"); context = env->CallStaticObjectMethod(ActivityClass, mid); // fileObj = context.getFilesDir(); mid = env->GetMethodID(env->GetObjectClass(context),"getPackageCodePath", "()Ljava/lang/String;"); fileObject = env->CallObjectMethod(context, mid); jboolean isCopy; path = env->GetStringUTFChars((jstring)fileObject, &isCopy); apkPath = std::string( path ); } return apkPath; } #endif #if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_IOS || EE_PLATFORM == EE_PLATFORM_ANDROID #define SDL2_THREADED_GLCONTEXT #endif namespace EE { namespace Window { namespace Backend { namespace SDL2 { cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) : cWindow( Settings, Context, eeNew( cClipboardSDL, ( this ) ), eeNew( cInputSDL, ( this ) ), eeNew( cCursorManagerSDL, ( this ) ) ), mSDLWindow( NULL ), mGLContext( NULL ), mGLContextThread( NULL ) #ifdef EE_USE_WMINFO , mWMinfo( eeNew( SDL_SysWMinfo, () ) ) #endif #if EE_PLATFORM == EE_PLATFORM_ANDROID , mZip( eeNew( cZip, () ) ) #endif { Create( Settings, Context ); } cWindowSDL::~cWindowSDL() { if ( NULL != mGLContext ) { SDL_GL_DeleteContext( mGLContext ); } if ( NULL != mGLContextThread ) { SDL_GL_DeleteContext( mGLContextThread ); } if ( NULL != mSDLWindow ) { SDL_DestroyWindow( mSDLWindow ); } #ifdef EE_USE_WMINFO eeSAFE_DELETE( mWMinfo ); #endif #if EE_PLATFORM == EE_PLATFORM_ANDROID eeSAFE_DELETE( mZip ); #endif } bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) { if ( mWindow.Created ) return false; mWindow.WindowConfig = Settings; mWindow.ContextConfig = Context; if ( SDL_Init( SDL_INIT_VIDEO ) != 0 ) { eePRINTL( "Unable to initialize SDL: %s", SDL_GetError() ); LogFailureInit( "cWindowSDL", GetVersion() ); return false; } SDL_DisplayMode dpm; SDL_GetDesktopDisplayMode( 0, &dpm ); mWindow.DesktopResolution = eeSize( dpm.w, dpm.h ); #if EE_PLATFORM == EE_PLATFORM_ANDROID mWindow.WindowConfig.Style = WindowStyle::Fullscreen | WindowStyle::UseDesktopResolution; #endif if ( mWindow.WindowConfig.Style & WindowStyle::UseDesktopResolution ) { mWindow.WindowConfig.Width = mWindow.DesktopResolution.Width(); mWindow.WindowConfig.Height = mWindow.DesktopResolution.Height(); } mWindow.Flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN; if ( mWindow.WindowConfig.Style & WindowStyle::Resize ) { mWindow.Flags |= SDL_WINDOW_RESIZABLE; } if ( mWindow.WindowConfig.Style & WindowStyle::NoBorder ) { mWindow.Flags |= SDL_WINDOW_BORDERLESS; } SetGLConfig(); Uint32 mTmpFlags = mWindow.Flags; if ( mWindow.WindowConfig.Style & WindowStyle::Fullscreen ) { mTmpFlags |= SDL_WINDOW_FULLSCREEN; } mSDLWindow = SDL_CreateWindow( mWindow.WindowConfig.Caption.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, mWindow.WindowConfig.Width, mWindow.WindowConfig.Height, mTmpFlags ); if ( NULL == mSDLWindow ) { eePRINTL( "Unable to create window: %s", SDL_GetError() ); LogFailureInit( "cWindowSDL", GetVersion() ); return false; } /// In some platforms it will not create the desired window size, so we query the real window size created int w, h; SDL_GetWindowSize( mSDLWindow, &w, &h ); mWindow.WindowConfig.Width = w; mWindow.WindowConfig.Height = h; mWindow.WindowSize = eeSize( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height ); #if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS eePRINTL( "Choosing GL Version from: %d", Context.Version ); if ( GLv_default != Context.Version ) { if ( GLv_ES1 == Context.Version || GLv_2 == Context.Version ) { if ( GLv_2 == Context.Version ) mWindow.ContextConfig.Version = GLv_ES1; eePRINTL( "Starting GLES1" ); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); } else { eePRINTL( "Starting GLES2" ); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); } } else { #if defined( EE_GLES2 ) && !defined( EE_GLES1 ) eePRINTL( "Starting GLES2 default" ); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); #else eePRINTL( "Starting GLES1 default" ); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); #endif } #else if ( GLv_3CP == Context.Version ) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); } #endif #ifdef SDL2_THREADED_GLCONTEXT SDL_GL_SetAttribute( SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1 ); mGLContext = SDL_GL_CreateContext( mSDLWindow ); mGLContextThread = SDL_GL_CreateContext( mSDLWindow ); #else mGLContext = SDL_GL_CreateContext( mSDLWindow ); #endif if ( NULL == mGLContext #ifdef SDL2_THREADED_GLCONTEXT || NULL == mGLContextThread #endif ) { eePRINTL( "Unable to create context: %s", SDL_GetError() ); LogFailureInit( "cWindowSDL", GetVersion() ); return false; } SDL_GL_SetSwapInterval( ( mWindow.ContextConfig.VSync ? 1 : 0 ) ); // VSync SDL_GL_MakeCurrent( mSDLWindow, mGLContext ); if ( NULL == cGL::ExistsSingleton() ) { cGL::CreateSingleton( mWindow.ContextConfig.Version ); cGL::instance()->Init(); } CreatePlatform(); GetMainContext(); Caption( mWindow.WindowConfig.Caption ); CreateView(); Setup2D(); mWindow.Created = true; if ( "" != mWindow.WindowConfig.Icon ) { Icon( mWindow.WindowConfig.Icon ); } /// Init the clipboard after the window creation reinterpret_cast<cClipboardSDL*> ( mClipboard )->Init(); /// Init the input after the window creation reinterpret_cast<cInputSDL*> ( mInput )->Init(); mCursorManager->Set( Cursor::SYS_CURSOR_ARROW ); #if EE_PLATFORM == EE_PLATFORM_ANDROID std::string apkPath( SDL_AndroidGetApkPath() ); eePRINTL( "Opening application APK in: %s", apkPath.c_str() ); if ( mZip->Open( apkPath ) ) eePRINTL( "APK opened succesfully!" ); else eePRINTL( "Failed to open APK!" ); LogSuccessfulInit( GetVersion(), apkPath ); #else LogSuccessfulInit( GetVersion() ); #endif return true; } bool cWindowSDL::IsThreadedGLContext() { #ifdef SDL2_THREADED_GLCONTEXT return true; #else return false; #endif } void cWindowSDL::SetGLContextThread() { SDL_GL_MakeCurrent( mSDLWindow, mGLContextThread ); } void cWindowSDL::UnsetGLContextThread() { SDL_GL_MakeCurrent( mSDLWindow, NULL ); } std::string cWindowSDL::GetVersion() { SDL_version ver; SDL_GetVersion( &ver ); return String::StrFormated( "SDL %d.%d.%d", ver.major, ver.minor, ver.patch ); } void cWindowSDL::CreatePlatform() { eeSAFE_DELETE( mPlatform ); #ifdef EE_USE_WMINFO SDL_VERSION( &mWMinfo->version ); SDL_GetWindowWMInfo ( mSDLWindow, mWMinfo ); #endif #if defined( EE_X11_PLATFORM ) mPlatform = eeNew( Platform::cX11Impl, ( this, mWMinfo->info.x11.display, mWMinfo->info.x11.window, mWMinfo->info.x11.window, NULL, NULL ) ); #elif EE_PLATFORM == EE_PLATFORM_WIN mPlatform = eeNew( Platform::cWinImpl, ( this, GetWindowHandler() ) ); #elif EE_PLATFORM == EE_PLATFORM_MACOSX mPlatform = eeNew( Platform::cOSXImpl, ( this ) ); #else cWindow::CreatePlatform(); #endif } void cWindowSDL::SetGLConfig() { if ( mWindow.ContextConfig.DepthBufferSize ) SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE , mWindow.ContextConfig.DepthBufferSize ); // Depth SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, ( mWindow.ContextConfig.DoubleBuffering ? 1 : 0 ) ); // Double Buffering if ( mWindow.ContextConfig.StencilBufferSize ) SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, mWindow.ContextConfig.StencilBufferSize ); if ( mWindow.WindowConfig.BitsPerPixel == 16 ) { SDL_GL_SetAttribute( SDL_GL_RED_SIZE , 4 ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE , 4 ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE , 4 ); SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE , 4 ); } else { SDL_GL_SetAttribute( SDL_GL_RED_SIZE , 8 ); SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE , 8 ); SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE , 8 ); SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE , 8 ); } } void cWindowSDL::ToggleFullscreen() { bool WasMaximized = mWindow.Maximized; if ( Windowed() ) { Size( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height, !Windowed() ); } else { Size( mWindow.WindowSize.Width(), mWindow.WindowSize.Height(), !Windowed() ); } if ( WasMaximized ) { Maximize(); } GetCursorManager()->Reload(); } void cWindowSDL::Caption( const std::string& Caption ) { mWindow.WindowConfig.Caption = Caption; SDL_SetWindowTitle( mSDLWindow, Caption.c_str() ); } bool cWindowSDL::Active() { Uint32 flags = 0; flags = SDL_GetWindowFlags( mSDLWindow ); return 0 != ( ( flags & SDL_WINDOW_INPUT_FOCUS ) && ( flags & SDL_WINDOW_MOUSE_FOCUS ) ); } bool cWindowSDL::Visible() { Uint32 flags = 0; flags = SDL_GetWindowFlags( mSDLWindow ); return 0 != ( ( flags & SDL_WINDOW_SHOWN ) && !( flags & SDL_WINDOW_MINIMIZED ) ); } void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) { if ( ( !Width || !Height ) ) { Width = mWindow.DesktopResolution.Width(); Height = mWindow.DesktopResolution.Height(); } if ( this->Windowed() == Windowed && Width == mWindow.WindowConfig.Width && Height == mWindow.WindowConfig.Height ) return; #ifdef EE_SUPPORT_EXCEPTIONS try { #endif eePRINTL( "Switching from %s to %s. Width: %d Height %d.", this->Windowed() ? "windowed" : "fullscreen", Windowed ? "windowed" : "fullscreen", Width, Height ); Uint32 oldWidth = mWindow.WindowConfig.Width; Uint32 oldHeight = mWindow.WindowConfig.Height; mWindow.WindowConfig.Width = Width; mWindow.WindowConfig.Height = Height; if ( Windowed ) { mWindow.WindowSize = eeSize( Width, Height ); } else { mWindow.WindowSize = eeSize( oldWidth, oldHeight ); } if ( this->Windowed() && !Windowed ) { mWinPos = Position(); } else { SDL_SetWindowFullscreen( mSDLWindow, Windowed ? SDL_FALSE : SDL_TRUE ); } SDL_SetWindowSize( mSDLWindow, Width, Height ); if ( this->Windowed() && !Windowed ) { mWinPos = Position(); SetGLConfig(); SDL_SetWindowFullscreen( mSDLWindow, Windowed ? SDL_FALSE : SDL_TRUE ); } if ( !this->Windowed() && Windowed ) { Position( mWinPos.x, mWinPos.y ); } BitOp::SetBitFlagValue( &mWindow.WindowConfig.Style, WindowStyle::Fullscreen, !Windowed ); mDefaultView.SetView( 0, 0, Width, Height ); Setup2D(); SDL_PumpEvents(); SDL_FlushEvent( SDL_WINDOWEVENT ); mCursorManager->Reload(); SendVideoResizeCb(); #ifdef EE_SUPPORT_EXCEPTIONS } catch (...) { eePRINTL( "Unable to change resolution: %s", SDL_GetError() ); cLog::instance()->Save(); mWindow.Created = false; } #endif } void cWindowSDL::SwapBuffers() { SDL_GL_SwapWindow( mSDLWindow ); } std::vector<DisplayMode> cWindowSDL::GetDisplayModes() const { std::vector<DisplayMode> result; int displays = SDL_GetNumVideoDisplays(); for ( int x = 0; x < displays; x++ ) { int displayModes = SDL_GetNumDisplayModes(x); for ( int i = 0; i < displayModes; i++ ) { SDL_DisplayMode mode; SDL_GetDisplayMode( x, i, &mode ); result.push_back( DisplayMode( mode.w, mode.h, mode.refresh_rate, x ) ); } } return result; } void cWindowSDL::SetGamma( eeFloat Red, eeFloat Green, eeFloat Blue ) { eeclamp( &Red , (eeFloat)0.1f, (eeFloat)10.0f ); eeclamp( &Green , (eeFloat)0.1f, (eeFloat)10.0f ); eeclamp( &Blue , (eeFloat)0.1f, (eeFloat)10.0f ); Uint16 red_ramp[256]; Uint16 green_ramp[256]; Uint16 blue_ramp[256]; SDL_CalculateGammaRamp( Red, red_ramp ); if ( Green == Red ) { SDL_memcpy(green_ramp, red_ramp, sizeof(red_ramp)); } else { SDL_CalculateGammaRamp( Green, green_ramp ); } if ( Blue == Red ) { SDL_memcpy( blue_ramp, red_ramp, sizeof(red_ramp) ); } else if ( Blue == Green ) { SDL_memcpy( blue_ramp, green_ramp, sizeof(green_ramp) ); } else { SDL_CalculateGammaRamp( Blue, blue_ramp ); } SDL_SetWindowGammaRamp( mSDLWindow, red_ramp, green_ramp, blue_ramp ); } eeWindowHandle cWindowSDL::GetWindowHandler() { #if EE_PLATFORM == EE_PLATFORM_WIN return mWMinfo->info.win.window; #elif defined( EE_X11_PLATFORM ) return mWMinfo->info.x11.display; #elif EE_PLATFORM == EE_PLATFORM_MACOSX return mWMinfo->info.cocoa.window; #else return 0; #endif } bool cWindowSDL::Icon( const std::string& Path ) { int x, y, c; if ( !mWindow.Created ) { if ( stbi_info( Path.c_str(), &x, &y, &c ) ) { mWindow.WindowConfig.Icon = Path; return true; } return false; } cImage Img( Path ); if ( NULL != Img.GetPixelsPtr() ) { const Uint8 * Ptr = Img.GetPixelsPtr(); x = Img.Width(); y = Img.Height(); c = Img.Channels(); if ( ( x % 8 ) == 0 && ( y % 8 ) == 0 ) { Uint32 rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN rmask = 0xff000000; gmask = 0x00ff0000; bmask = 0x0000ff00; amask = 0x000000ff; #else rmask = 0x000000ff; gmask = 0x0000ff00; bmask = 0x00ff0000; amask = 0xff000000; #endif SDL_Surface * TempGlyphSheet = SDL_CreateRGBSurface( SDL_SWSURFACE, x, y, c * 8, rmask, gmask, bmask, amask ); SDL_LockSurface( TempGlyphSheet ); Uint32 ssize = TempGlyphSheet->w * TempGlyphSheet->h * c; for ( Uint32 i=0; i < ssize; i++ ) { ( static_cast<Uint8*>( TempGlyphSheet->pixels ) )[i+0] = (Ptr)[i]; } SDL_UnlockSurface( TempGlyphSheet ); SDL_SetWindowIcon( mSDLWindow, TempGlyphSheet ); SDL_FreeSurface( TempGlyphSheet ); return true; } } return false; } void cWindowSDL::Minimize() { SDL_MinimizeWindow( mSDLWindow ); } void cWindowSDL::Maximize() { SDL_MaximizeWindow( mSDLWindow ); } void cWindowSDL::Hide() { SDL_HideWindow( mSDLWindow ); } void cWindowSDL::Raise() { SDL_RaiseWindow( mSDLWindow ); } void cWindowSDL::Show() { SDL_ShowWindow( mSDLWindow ); } void cWindowSDL::Position( Int16 Left, Int16 Top ) { SDL_SetWindowPosition( mSDLWindow, Left, Top ); } eeVector2i cWindowSDL::Position() { eeVector2i p; SDL_GetWindowPosition( mSDLWindow, &p.x, &p.y ); return p; } void cWindowSDL::UpdateDesktopResolution() { SDL_DisplayMode dpm; SDL_GetDesktopDisplayMode( SDL_GetWindowDisplayIndex( mSDLWindow ), &dpm ); mWindow.DesktopResolution = eeSize( dpm.w, dpm.h ); } const eeSize& cWindowSDL::GetDesktopResolution() { UpdateDesktopResolution(); return cWindow::GetDesktopResolution(); } SDL_Window * cWindowSDL::GetSDLWindow() const { return mSDLWindow; } void cWindowSDL::StartTextInput() { SDL_StartTextInput(); } bool cWindowSDL::IsTextInputActive() { return SDL_TRUE == SDL_IsTextInputActive(); } void cWindowSDL::StopTextInput() { SDL_StopTextInput(); } void cWindowSDL::SetTextInputRect( eeRecti& rect ) { SDL_Rect r; r.x = rect.Left; r.y = rect.Top; r.w = rect.Size().Width(); r.h = rect.Size().Height(); SDL_SetTextInputRect( &r ); rect.Left = r.x; rect.Top = r.y; rect.Right = rect.Left + r.w; rect.Bottom = rect.Top + r.h; } bool cWindowSDL::HasScreenKeyboardSupport() { return SDL_TRUE == SDL_HasScreenKeyboardSupport(); } bool cWindowSDL::IsScreenKeyboardShown() { return SDL_TRUE == SDL_IsScreenKeyboardShown( mSDLWindow ); } #if EE_PLATFORM == EE_PLATFORM_ANDROID void * cWindowSDL::GetJNIEnv() { return SDL_AndroidGetJNIEnv(); } void * cWindowSDL::GetActivity() { return SDL_AndroidGetActivity(); } int cWindowSDL::GetExternalStorageState() { return SDL_AndroidGetExternalStorageState(); } std::string cWindowSDL::GetInternalStoragePath() { return std::string( SDL_AndroidGetInternalStoragePath() ); } std::string cWindowSDL::GetExternalStoragePath() { return std::string( SDL_AndroidGetExternalStoragePath() ); } std::string cWindowSDL::GetApkPath() { return SDL_AndroidGetApkPath(); } #endif }}}} #endif
[ "spartanj@gmail.com" ]
spartanj@gmail.com
96c65555d8cd5f663c4cf41a729a28a437e3bb62
4ccd3c69b787220d8d85990f32583e8354c7b5a5
/1-1.cpp
f5a901fe3545a081b6c6e4805ab02bd96cba44db
[]
no_license
bsu2018gr09/MarchenkoIK
79bee38351973860a17187814f8578c6643db1ba
5ba5086417269087ad4eb1af73d96d40d4d4081d
refs/heads/master
2020-04-27T11:14:02.563872
2019-05-31T06:13:52
2019-05-31T06:13:52
174,288,199
0
0
null
null
null
null
UTF-8
C++
false
false
2,378
cpp
/*1-1 Даны точки плоскости своими координатами в виде двух одномерных массивов (случайные числа). Точки плоскости рассортировать по возрастанию расстояния до прямой ax + by + c = 0. */ #include <iostream> #include <time.h> #include <iomanip> #include "windows.h" using namespace std; int *giveMemory(int); void randArr(int*A, int N, int l, int r); void freeMemory(int*A); void Dist(int*X, int*Y, int*D, int N, int a, int b, int c); void Sort(int*X, int*Y, int*D, int N); void printArr(int*A, int*B, int*D, int N); /*int *InitArr(int N) { //Где тут инициализация????? int *A = new int[N];//где проверка??? return A; }*/ int main() { int N, a, b, c; cout << "Input N "; cin >> N; cout << "Input a, b, c for ax+by+c=0" << '\n'; cin >> a >> b >> c; int *X = giveMemory(N); int *Y = giveMemory(N); randArr(X, N, -N / 2, N / 2); randArr(Y, N, -N / 2, N / 2); cout << "The array is filled with random numbers" << '\n'; Sleep(1000); int *D = giveMemory(N); Dist(X, Y, D, N, a, b, c); Sort(X, Y, D, N); printArr(X, Y, D, N); freeMemory(X); freeMemory(Y); freeMemory(D); system("pause"); } int *giveMemory(int N) { int *A = new(nothrow)int[N]; if (!A) { cout << "error" << "\n"; } return A; } void randArr(int*A, int N, int l, int r) { if (!A) { cout << "error"; system("pause"); } srand(time(0)); for (int i = 0; i < N; ++i) { A[i] = rand() % (l - r) + l; } } void Dist(int*X, int*Y, int*D, int N, int a, int b, int c) { for (int i = 0; i < N; i++) { D[i] = abs(a * X[i] + b * Y[i] + c) / sqrt(a*a + b * b); } } void Sort(int*X, int*Y, int*D, int N) { for (int i = 0; i < N - 1; i++) { for (int j = 0; j < N - i - 1; j++) { if (D[i] > D[j + 1]) { swap(X[i], X[i + 1]); swap(Y[i], Y[i + 1]); swap(D[i], D[i + 1]); /*swap(*(X + j), *(X + j + 1)); swap(*(Y + j), *(Y + j + 1)); swap(*(D + j), *(D + j + 1));*/ } } } } void printArr(int*A, int*B, int*D, int N) { for (int i = 0; i < N; i++) cout << '(' << *(A + i) << ' ' << *(B + i) << ')' << " " << *(D + i) << '\n'; } void freeMemory(int*A) { delete[]A; }
[ "noreply@github.com" ]
noreply@github.com
9be5253d9fc461730f445fb8ff074f8b424ca205
d39a316e66a40bbe03d785b1f1a79970b9638b3f
/SDK/SCUM_UI_CharacterCreationPanel1_parameters.hpp
55c86255eb83d100ed1eab5a0f98bf9418d72f94
[]
no_license
neviim/SCUM_SDK
8abfd5c1c19392b2b53a842d53e16a39dfb4f1f2
1e1a8f8608d08bec78c9a8e29956dedd408b54c0
refs/heads/master
2020-06-19T05:04:12.618692
2019-06-17T18:46:24
2019-06-17T18:46:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
27,247
hpp
#pragma once // SCUM (Dumped by Hinnie) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetBustSize struct UUI_CharacterCreationPanel1_C_GetBustSize_Params { float Size; // (Parm, OutParm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.UpdateAppearanceOptions struct UUI_CharacterCreationPanel1_C_UpdateAppearanceOptions_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetPenisSize struct UUI_CharacterCreationPanel1_C_GetPenisSize_Params { float Size; // (Parm, OutParm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.IsProfileNameInUse struct UUI_CharacterCreationPanel1_C_IsProfileNameInUse_Params { struct FString Name; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor) bool Result; // (Parm, OutParm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.SetDefaultName struct UUI_CharacterCreationPanel1_C_SetDefaultName_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetInUseMsgVisibility struct UUI_CharacterCreationPanel1_C_GetInUseMsgVisibility_Params { ESlateVisibility ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.IsNameValid struct UUI_CharacterCreationPanel1_C_IsNameValid_Params { struct FString characterName; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor) bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.Get_ButtonSwitchToCriminalRecord_bIsEnabled_1 struct UUI_CharacterCreationPanel1_C_Get_ButtonSwitchToCriminalRecord_bIsEnabled_1_Params { bool ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.RandomizeSkillsByAttribute struct UUI_CharacterCreationPanel1_C_RandomizeSkillsByAttribute_Params { ESkillAttribute Attribute; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.PlayPrisonerEnteringSequence struct UUI_CharacterCreationPanel1_C_PlayPrisonerEnteringSequence_Params { bool backwards; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.RandomizeSkillsPanel struct UUI_CharacterCreationPanel1_C_RandomizeSkillsPanel_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.RandomizeAttributesPanel struct UUI_CharacterCreationPanel1_C_RandomizeAttributesPanel_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.OnSkillSliderDeselected struct UUI_CharacterCreationPanel1_C_OnSkillSliderDeselected_Params { class UUI_CC_SkillSlider_C* Slider; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.OnSkillSliderSelected struct UUI_CharacterCreationPanel1_C_OnSkillSliderSelected_Params { class UUI_CC_SkillSlider_C* Slider; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetSkillTemplates struct UUI_CharacterCreationPanel1_C_GetSkillTemplates_Params { TArray<struct FSkillTemplate> allSkills; // (Parm, OutParm, ZeroConstructor) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetSkillTemplatesByAttribute struct UUI_CharacterCreationPanel1_C_GetSkillTemplatesByAttribute_Params { ESkillAttribute Attribute; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) TArray<struct FSkillTemplate> outSkills; // (Parm, OutParm, ZeroConstructor) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.OnSkillValueChanged struct UUI_CharacterCreationPanel1_C_OnSkillValueChanged_Params { ESkillAttribute Attribute; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) class UUI_CC_SkillSlider_C* Slider; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.UpdateSkillsForAttribute struct UUI_CharacterCreationPanel1_C_UpdateSkillsForAttribute_Params { ESkillAttribute Attribute; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.UpdateSkillsPanel struct UUI_CharacterCreationPanel1_C_UpdateSkillsPanel_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.InitSkills struct UUI_CharacterCreationPanel1_C_InitSkills_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.UpdateTriangle struct UUI_CharacterCreationPanel1_C_UpdateTriangle_Params { float DeltaTime; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.ModifyAttributeModifier struct UUI_CharacterCreationPanel1_C_ModifyAttributeModifier_Params { class UUI_CC_AttributeModifier_C* attributeModifier; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) float modifier; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.ModifySetAttributesByAge struct UUI_CharacterCreationPanel1_C_ModifySetAttributesByAge_Params { struct FVector4 lastAgeModifiers; // (BlueprintVisible, BlueprintReadOnly, Parm, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetAgeBonusForAttribute struct UUI_CharacterCreationPanel1_C_GetAgeBonusForAttribute_Params { ESkillAttribute Attribute; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float modifier; // (Parm, OutParm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.UpdateAvailablePoints struct UUI_CharacterCreationPanel1_C_UpdateAvailablePoints_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.DecreaseAttributeModifier struct UUI_CharacterCreationPanel1_C_DecreaseAttributeModifier_Params { class UUI_CC_AttributeModifier_C* attributeModifier; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) float adjustmentStep; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.IncreaseAttributeModifier struct UUI_CharacterCreationPanel1_C_IncreaseAttributeModifier_Params { class UUI_CC_AttributeModifier_C* attributeModifier; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, InstancedReference, IsPlainOldData) float adjustmentStep; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.ApplyTemplateToPrisoners struct UUI_CharacterCreationPanel1_C_ApplyTemplateToPrisoners_Params { bool applySkills; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) bool applyExact; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) struct FCharacterTemplate CharacterTemplate; // (Parm, OutParm) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.GetNumberTextWithSign struct UUI_CharacterCreationPanel1_C_GetNumberTextWithSign_Params { float Number; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) struct FText numberWithSignText; // (Parm, OutParm) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.SetAge struct UUI_CharacterCreationPanel1_C_SetAge_Params { int Age; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.OnMouseButtonDown_1 struct UUI_CharacterCreationPanel1_C_OnMouseButtonDown_1_Params { struct FGeometry MyGeometry; // (BlueprintVisible, BlueprintReadOnly, Parm, IsPlainOldData) struct FPointerEvent MouseEvent; // (BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) struct FEventReply ReturnValue; // (Parm, OutParm, ReturnParm) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.Construct struct UUI_CharacterCreationPanel1_C_Construct_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_CC_ProgressBar_K2Node_ComponentBoundEvent_50_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_CC_ProgressBar_K2Node_ComponentBoundEvent_50_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_LeanFatMuscleTriangle_K2Node_ComponentBoundEvent_5_AttributesChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_LeanFatMuscleTriangle_K2Node_ComponentBoundEvent_5_AttributesChanged__DelegateSignature_Params { struct FVector4 Attributes; // (BlueprintVisible, BlueprintReadOnly, Parm, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__TattooSlider_K2Node_ComponentBoundEvent_152_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__TattooSlider_K2Node_ComponentBoundEvent_152_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__HeadSlider_K2Node_ComponentBoundEvent_153_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__HeadSlider_K2Node_ComponentBoundEvent_153_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_CC_ProgressBar_C_0_K2Node_ComponentBoundEvent_242_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_CC_ProgressBar_C_0_K2Node_ComponentBoundEvent_242_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierStrength_K2Node_ComponentBoundEvent_36_OnIncrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierStrength_K2Node_ComponentBoundEvent_36_OnIncrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierStrength_K2Node_ComponentBoundEvent_40_OnDecrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierStrength_K2Node_ComponentBoundEvent_40_OnDecrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierConstitution_K2Node_ComponentBoundEvent_47_OnIncrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierConstitution_K2Node_ComponentBoundEvent_47_OnIncrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierConstitution_K2Node_ComponentBoundEvent_59_OnDecrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierConstitution_K2Node_ComponentBoundEvent_59_OnDecrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierDexterity_K2Node_ComponentBoundEvent_68_OnIncrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierDexterity_K2Node_ComponentBoundEvent_68_OnIncrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierDexterity_K2Node_ComponentBoundEvent_81_OnDecrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierDexterity_K2Node_ComponentBoundEvent_81_OnDecrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierIntelligence_K2Node_ComponentBoundEvent_92_OnIncrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierIntelligence_K2Node_ComponentBoundEvent_92_OnIncrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__AttributeModifierIntelligence_K2Node_ComponentBoundEvent_107_OnDecrease__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__AttributeModifierIntelligence_K2Node_ComponentBoundEvent_107_OnDecrease__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.Tick struct UUI_CharacterCreationPanel1_C_Tick_Params { struct FGeometry* MyGeometry; // (BlueprintVisible, BlueprintReadOnly, Parm, IsPlainOldData) float* InDeltaTime; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_MenuButton_1_K2Node_ComponentBoundEvent_170_OnClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_MenuButton_1_K2Node_ComponentBoundEvent_170_OnClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_MenuButton_C_1_K2Node_ComponentBoundEvent_173_OnClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_MenuButton_C_1_K2Node_ComponentBoundEvent_173_OnClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__ButtonSwitchToCriminalRecord_K2Node_ComponentBoundEvent_209_OnClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__ButtonSwitchToCriminalRecord_K2Node_ComponentBoundEvent_209_OnClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_CriminalRecord_K2Node_ComponentBoundEvent_1199_OnOkClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_CriminalRecord_K2Node_ComponentBoundEvent_1199_OnOkClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_CriminalRecord_K2Node_ComponentBoundEvent_1260_OnCancelClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_CriminalRecord_K2Node_ComponentBoundEvent_1260_OnCancelClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__ButtonCancel_K2Node_ComponentBoundEvent_1387_OnClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__ButtonCancel_K2Node_ComponentBoundEvent_1387_OnClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__ButtonRandomizeAttributes_K2Node_ComponentBoundEvent_132_OnClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__ButtonRandomizeAttributes_K2Node_ComponentBoundEvent_132_OnClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__ButtonRandomizeSkills_K2Node_ComponentBoundEvent_67_OnClicked__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__ButtonRandomizeSkills_K2Node_ComponentBoundEvent_67_OnClicked__DelegateSignature_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__NameTextSecondPage_K2Node_ComponentBoundEvent_489_OnEditableTextBoxCommittedEvent__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__NameTextSecondPage_K2Node_ComponentBoundEvent_489_OnEditableTextBoxCommittedEvent__DelegateSignature_Params { struct FText Text; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) TEnumAsByte<ETextCommit> CommitMethod; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__NameText_K2Node_ComponentBoundEvent_495_OnEditableTextBoxCommittedEvent__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__NameText_K2Node_ComponentBoundEvent_495_OnEditableTextBoxCommittedEvent__DelegateSignature_Params { struct FText Text; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) TEnumAsByte<ETextCommit> CommitMethod; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__NameText_K2Node_ComponentBoundEvent_52_OnEditableTextBoxChangedEvent__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__NameText_K2Node_ComponentBoundEvent_52_OnEditableTextBoxChangedEvent__DelegateSignature_Params { struct FText Text; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__NameTextSecondPage_K2Node_ComponentBoundEvent_108_OnEditableTextBoxChangedEvent__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__NameTextSecondPage_K2Node_ComponentBoundEvent_108_OnEditableTextBoxChangedEvent__DelegateSignature_Params { struct FText Text; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.ShowErrorDialog struct UUI_CharacterCreationPanel1_C_ShowErrorDialog_Params { struct FText* Message; // (ConstParm, BlueprintVisible, BlueprintReadOnly, Parm, OutParm, ReferenceParm) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.OnUserProfileCreated struct UUI_CharacterCreationPanel1_C_OnUserProfileCreated_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BeginWaitingOnServerResponse struct UUI_CharacterCreationPanel1_C_BeginWaitingOnServerResponse_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.EndWaitingOnServerResponse struct UUI_CharacterCreationPanel1_C_EndWaitingOnServerResponse_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.Keep Server Connection Alive struct UUI_CharacterCreationPanel1_C_Keep_Server_Connection_Alive_Params { }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__PenisSizeSlider_K2Node_ComponentBoundEvent_0_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__PenisSizeSlider_K2Node_ComponentBoundEvent_0_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__ConcealedModeSlider_K2Node_ComponentBoundEvent_1_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__ConcealedModeSlider_K2Node_ComponentBoundEvent_1_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__UI_CC_ProgressBar_0_K2Node_ComponentBoundEvent_2_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__UI_CC_ProgressBar_0_K2Node_ComponentBoundEvent_2_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.BndEvt__BreastSizeSlider_K2Node_ComponentBoundEvent_3_OnIndexChanged__DelegateSignature struct UUI_CharacterCreationPanel1_C_BndEvt__BreastSizeSlider_K2Node_ComponentBoundEvent_3_OnIndexChanged__DelegateSignature_Params { int Index; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) float LeftoverPercentage; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; // Function UI_CharacterCreationPanel1.UI_CharacterCreationPanel1_C.ExecuteUbergraph_UI_CharacterCreationPanel1 struct UUI_CharacterCreationPanel1_C_ExecuteUbergraph_UI_CharacterCreationPanel1_Params { int EntryPoint; // (BlueprintVisible, BlueprintReadOnly, Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "hsibma02@gmail.com" ]
hsibma02@gmail.com
42aa435bea74b7f7324bb3c5595557870ee8e5e6
06758e1fcc5ee4a176e778e8616d2618f674b5da
/Source/Stroll/Private/AttackAnimnotifyState.cpp
440daa6eb012a761a0be0a8dc8d78e87fae2a08e
[ "MIT" ]
permissive
kacmazemin/Stroll
f99c6e818888d416ec551b9d2125a4351cbb47b3
0cade685bcb2e19607e0e56733727957d0658de4
refs/heads/main
2023-05-28T23:46:59.136471
2021-06-15T16:38:47
2021-06-15T16:38:47
301,523,532
0
0
null
null
null
null
UTF-8
C++
false
false
2,214
cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "AttackAnimnotifyState.h" #include "BaseAIEnemey.h" #include "DrawDebugHelpers.h" #include "BaseChar.h" void UAttackAnimnotifyState::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime) { if(MeshComp) { /*/////*/ FHitResult Result; FVector StartPos = MeshComp->GetSocketLocation("SocketTrail_End"); FVector EndPos = MeshComp->GetSocketLocation("SocketTrail_Start"); FCollisionQueryParams Params; Params.bTraceComplex = true; ABaseChar* BaseChar = Cast<ABaseChar>(MeshComp->GetAttachParent()->GetAttachmentRootActor()); if (BaseChar) { Params.AddIgnoredActor(BaseChar); } //DrawDebugCapsule(MeshComp->GetWorld(), EndPos, 50.f, 15.f, MeshComp->GetSocketQuaternion("SocketTrail_End"), FColor::Black, false,5.f); bool bHit = MeshComp->GetWorld()->SweepSingleByChannel(Result, StartPos, EndPos, FQuat::Identity, ECC_Pawn, FCollisionShape::MakeCapsule(15.f,50.f), Params); if(bHit && Result.GetActor()) { ABaseAIEnemey* EnemyActor = Cast<ABaseAIEnemey>(Result.GetActor()); if(EnemyActor) { if(bIsFirstTime) { EnemyActor->TakeDamage(1.f); if(BaseChar) { BaseChar->ShakeCamera(); BaseChar->EnableSlowMotionAttack(); } bIsFirstTime = false; } } // DrawDebugCapsule(MeshComp->GetWorld(), Result.ImpactPoint, 50.f, 15.f, MeshComp->GetSocketQuaternion("SocketTrail_End"), FColor::Purple, false,5.f); } } } void UAttackAnimnotifyState::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration) { bIsFirstTime = true; } void UAttackAnimnotifyState::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation) { bIsFirstTime = false; }
[ "kacmazemin72@gmail.com" ]
kacmazemin72@gmail.com
ae6d8063b0195424aceda2fe7da348c2db4a2474
091afb7001e86146209397ea362da70ffd63a916
/inst/include/nt2/bitwise/include/functions/bitwise_ornot.hpp
8bb5cedf74a7fac2e7e622c043c20c533795cc48
[]
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
383
hpp
#ifndef NT2_BITWISE_INCLUDE_FUNCTIONS_BITWISE_ORNOT_HPP_INCLUDED #define NT2_BITWISE_INCLUDE_FUNCTIONS_BITWISE_ORNOT_HPP_INCLUDED #include <nt2/bitwise/functions/bitwise_ornot.hpp> #include <boost/simd/bitwise/functions/bitwise_ornot.hpp> #include <boost/simd/bitwise/functions/scalar/bitwise_ornot.hpp> #include <boost/simd/bitwise/functions/simd/common/bitwise_ornot.hpp> #endif
[ "kevinushey@gmail.com" ]
kevinushey@gmail.com
b6a89204f8bf828c02bd50da30b38c8091561075
75d2330d43c186f08bef17b4274e97b5401cce61
/ACM-Card-Collector.cpp
8bdef3b4da5bd1c9d6e19563e64e5bcb4cfb4ecb
[]
no_license
AD1024/Algo-Practice
709d89d0c301d0f798cab316a9fdb436ad9de642
6d0efa62859aea9798fc78c5c78b8394ac480972
refs/heads/master
2021-01-12T06:36:18.289920
2018-04-23T01:02:46
2018-04-23T01:02:46
77,384,339
2
0
null
null
null
null
UTF-8
C++
false
false
473
cpp
#include <iostream> #include <cstdio> #include <cmath> using namespace std; const int MAXN = (1<<20)+10; double p[MAXN]; int N; void RC(){ double ans=0; for(int i=1;i<(1<<N);++i){ int k=0; double sum=0; for(int j=0;j<N;++j){ if(i & (1<<j)){ sum+=p[j]; ++k; } } if(k&1){ ans+=1.0/sum; }else{ ans-=1.0/sum; } } printf("%.5lf\n",ans); } int main(){ while(cin>>N){ for(int i=0;i<N;++i){ cin>>p[i]; } RC(); } return 0; }
[ "ccoderad@gmail.com" ]
ccoderad@gmail.com
eb5b76e00434b21e11e20679cdefc033ae11c533
27e3956a3f3abaf3bec167ee783c4129fe04c786
/SpriteAnimation.cpp
3974bb441de2d1a2b679ea7787a311d5b010a1ae
[]
no_license
7flying/reactive-wars
f73f790ae689356eb6f76d7c9b231d7f234fc3cc
3ca589ac138de0b8e63793196eaa2444bc6686a9
refs/heads/master
2021-01-16T00:57:44.188166
2016-07-03T22:04:15
2016-07-03T22:04:15
52,474,027
1
0
null
null
null
null
UTF-8
C++
false
false
1,683
cpp
//////////////////////////////////////////////////////////// // // Copyright (C) 2014 Maximilian Wagenbach (aka. Foaly) (foaly.f@web.de) // // 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. // //////////////////////////////////////////////////////////// // // Modified by 7flying, June 2016 /////////////////////////////////////////////////////////// #include "SpriteAnimation.hpp" SpriteAnimation::SpriteAnimation() : m_texture(NULL) { } void SpriteAnimation::addFrame(sf::IntRect rect) { m_frames.push_back(rect); } void SpriteAnimation::setSpriteSheet(const sf::Texture& texture) { m_texture = &texture; } const sf::Texture* SpriteAnimation::getSpriteSheet() const { return m_texture; } std::size_t SpriteAnimation::getSize() const { return m_frames.size(); } const sf::IntRect& SpriteAnimation::getFrame(std::size_t n) const { return m_frames[n]; }
[ "diez.f.irene@gmail.com" ]
diez.f.irene@gmail.com
8976e79b33460da0fb17ec5d13ce6a63e8408937
f527a28abebc5f5dad56e1ccc60a4a92996d57e1
/22-01-2021_08.cpp
285dffdf28bbb3977e30a2d203bea8afaf0a3cfd
[]
no_license
IsRatJahan17/practices-c-
ec01cf0d497dc39e782feb1d8f728462e4acb112
5cddf29f623d3afaedb7346c231b90333eca7621
refs/heads/main
2023-08-22T14:46:50.742464
2021-10-09T13:56:18
2021-10-09T13:56:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
81
cpp
#include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello"; }
[ "noreply@github.com" ]
noreply@github.com
d4e3423f53c9e587e2409cee7460f104562c4832
7df0667104cbeb3fa72f271b82e91d08aa9cf041
/taxicab.cpp
9c4cebc92751d5d013a1430ed2319dff7dbf175d
[]
no_license
venkatarajasekhar/sharp-1
9f1d072da8cf77856443e960ba04510203847120
04e35a9ab454ef54d256b52096d4e6f8075c1900
refs/heads/master
2020-07-02T03:58:16.752342
2014-10-11T23:57:44
2014-10-11T23:57:44
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,809
cpp
/************************************************************************* * Compilation: g++ -o taxicab taxicab.cpp * Execution: ./taxicab N (for example ./taxicab 100) * * Find all nontrivial integer solutions to a^3 + b^3 = c^3 + d^3 where * a, b, c, and d are between 0 and N. By nontrivial, we mean * a <= b, c <= d, and (a, b) != (c, d). * * C++ implementation of http://algs4.cs.princeton.edu/24pq/Taxicab.java.html * * % ./taxicab 11 * * % ./taxicab 12 * TAXI CAB NUMBERS * 1729 = 1^3 + 12^3 * 1729 = 9^3 + 10^3 * * % ./taxicab 20 * TAXI CAB NUMBERS * 1729 = 1^3 + 12^3 * 1729 = 9^3 + 10^3 * * 4104 = 9^3 + 15^3 * 4104 = 2^3 + 16^3 * *************************************************************************/ #include <iostream> #include <cstdlib> #include <queue> using namespace std; class taxi_cab { private: long int sum; int i; int j; public: /* ctor */ taxi_cab(int i, int j); /* dtor */ ~taxi_cab(); /* assignment operator */ taxi_cab& operator=(const taxi_cab &rhs); int get_sum() { return sum;} int get_i() { return i;} int get_j() { return j;} /* for the functor to access private variables */ friend class taxi_cab_cmp; }; /* ctor */ taxi_cab::taxi_cab(int i, int j): i(i), j(j) { sum = (i*i*i) + (j*j*j); } /* dtor */ taxi_cab::~taxi_cab() { } /* assignment operator */ taxi_cab& taxi_cab::operator=(const taxi_cab &rhs) { if(this == &rhs) return *this; sum = rhs.sum; i = rhs.i; j = rhs.j; return *this; } /* functor class: passed to STL queue */ class taxi_cab_cmp { public: bool operator()(taxi_cab a, taxi_cab b) { return a.sum > b.sum; } }; int main (int argc, char* argv[]) { int n = 20; /* Default: Print atleast one taxi cab number */ /* Get the input from cmd line */ if (argc >= 2) n = atoi(argv[1]); cout << "TAXI CAB NUMBERS" << endl; /* Use a min Priority Queue */ priority_queue<taxi_cab, vector<taxi_cab>, taxi_cab_cmp> pq; /* Initialize the pq with i^3 + i^3 */ for (int i = 1; i < n; i++) { pq.push(taxi_cab(i,i)); } /* Check for sums in ascending order */ int found = 1; taxi_cab prev(0, 0); /* sentinel */ while (!pq.empty()) { /* Get (pop) the min pq element */ taxi_cab curr = pq.top(); pq.pop(); /* If same as prev sum */ if (prev.get_sum() == curr.get_sum()) { found++; /* To avoid repitition of the print of the already found */ if (found == 2) { cout << prev.get_sum() << " = " << prev.get_i() << "^3 + " << prev.get_j() << "^3" << endl; } cout << curr.get_sum() << " = " << curr.get_i() << "^3 + " << curr.get_j() << "^3" << endl; } else { if (found > 1) cout << endl; found = 1; } prev = curr; if (curr.get_j() < n) { pq.push(taxi_cab(curr.get_i(), curr.get_j() + 1)); } } }
[ "manudhundi@gmail.com" ]
manudhundi@gmail.com
2cbdc41a5a8dda26b3295c05b7c3a03af23f9c71
eb7740191a8e296452da00c23e76f7316aafe3ac
/src/ui/views/controls/button/image_button.cc
f6cff61b6ecb8f0916ee873c69a54ff0860ab458
[]
no_license
wray007/sdk
d8259a40eebff61fe407316a51684987468d29b6
a605a996084d3314099ab31f5c3b705925553dc1
refs/heads/master
2021-09-26T09:06:31.969738
2016-04-03T07:01:25
2016-04-03T07:01:25
55,333,534
1
0
null
null
null
null
UTF-8
C++
false
false
6,873
cc
// Copyright (c) 2012 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 "ui/views/controls/button/image_button.h" #include "base/strings/utf_string_conversions.h" #include "ui/base/accessibility/accessible_view_state.h" #include "ui/base/animation/throb_animation.h" #include "ui/gfx/canvas.h" #include "ui/gfx/image/image_skia_operations.h" #include "ui/views/widget/widget.h" namespace views { static const int kDefaultWidth = 16; // Default button width if no theme. static const int kDefaultHeight = 14; // Default button height if no theme. const char ImageButton::kViewClassName[] = "ImageButton"; //////////////////////////////////////////////////////////////////////////////// // ImageButton, public: ImageButton::ImageButton(ButtonListener* listener) : CustomButton(listener), h_alignment_(ALIGN_LEFT), v_alignment_(ALIGN_TOP), preferred_size_(kDefaultWidth, kDefaultHeight) { // By default, we request that the gfx::Canvas passed to our View::OnPaint() // implementation is flipped horizontally so that the button's images are // mirrored when the UI directionality is right-to-left. EnableCanvasFlippingForRTLUI(true); } ImageButton::~ImageButton() { } const gfx::ImageSkia& ImageButton::GetImage(ButtonState state) const { return images_[state]; } void ImageButton::SetImage(ButtonState state, const gfx::ImageSkia* image) { images_[state] = image ? *image : gfx::ImageSkia(); PreferredSizeChanged(); } void ImageButton::SetBackground(SkColor color, const gfx::ImageSkia* image, const gfx::ImageSkia* mask) { if (image == NULL || mask == NULL) { background_image_ = gfx::ImageSkia(); return; } background_image_ = gfx::ImageSkiaOperations::CreateButtonBackground(color, *image, *mask); } void ImageButton::SetOverlayImage(const gfx::ImageSkia* image) { if (!image) { overlay_image_ = gfx::ImageSkia(); return; } overlay_image_ = *image; } void ImageButton::SetImageAlignment(HorizontalAlignment h_align, VerticalAlignment v_align) { h_alignment_ = h_align; v_alignment_ = v_align; SchedulePaint(); } //////////////////////////////////////////////////////////////////////////////// // ImageButton, View overrides: gfx::Size ImageButton::GetPreferredSize() { gfx::Size size = preferred_size_; if (!images_[STATE_NORMAL].isNull()) { size = gfx::Size(images_[STATE_NORMAL].width(), images_[STATE_NORMAL].height()); } gfx::Insets insets = GetInsets(); size.Enlarge(insets.width(), insets.height()); return size; } const char* ImageButton::GetClassName() const { return kViewClassName; } void ImageButton::OnPaint(gfx::Canvas* canvas) { // Call the base class first to paint any background/borders. View::OnPaint(canvas); gfx::ImageSkia img = GetImageToPaint(); if (!img.isNull()) { gfx::Point position = ComputeImagePaintPosition(img); if (!background_image_.isNull()) canvas->DrawImageInt(background_image_, position.x(), position.y()); canvas->DrawImageInt(img, position.x(), position.y()); if (!overlay_image_.isNull()) canvas->DrawImageInt(overlay_image_, position.x(), position.y()); } OnPaintFocusBorder(canvas); } //////////////////////////////////////////////////////////////////////////////// // ImageButton, protected: gfx::ImageSkia ImageButton::GetImageToPaint() { gfx::ImageSkia img; if (!images_[STATE_HOVERED].isNull() && hover_animation_->is_animating()) { img = gfx::ImageSkiaOperations::CreateBlendedImage(images_[STATE_NORMAL], images_[STATE_HOVERED], hover_animation_->GetCurrentValue()); } else { img = images_[state_]; } return !img.isNull() ? img : images_[STATE_NORMAL]; } //////////////////////////////////////////////////////////////////////////////// // ImageButton, private: gfx::Point ImageButton::ComputeImagePaintPosition(const gfx::ImageSkia& image) { int x = 0, y = 0; gfx::Rect rect = GetContentsBounds(); if (h_alignment_ == ALIGN_CENTER) x = (rect.width() - image.width()) / 2; else if (h_alignment_ == ALIGN_RIGHT) x = rect.width() - image.width(); if (v_alignment_ == ALIGN_MIDDLE) y = (rect.height() - image.height()) / 2; else if (v_alignment_ == ALIGN_BOTTOM) y = rect.height() - image.height(); x += rect.x(); y += rect.y(); return gfx::Point(x, y); } //////////////////////////////////////////////////////////////////////////////// // ToggleImageButton, public: ToggleImageButton::ToggleImageButton(ButtonListener* listener) : ImageButton(listener), toggled_(false) { } ToggleImageButton::~ToggleImageButton() { } void ToggleImageButton::SetToggled(bool toggled) { if (toggled == toggled_) return; for (int i = 0; i < STATE_COUNT; ++i) { gfx::ImageSkia temp = images_[i]; images_[i] = alternate_images_[i]; alternate_images_[i] = temp; } toggled_ = toggled; SchedulePaint(); NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_VALUE_CHANGED, true); } void ToggleImageButton::SetToggledImage(ButtonState state, const gfx::ImageSkia* image) { if (toggled_) { images_[state] = image ? *image : gfx::ImageSkia(); if (state_ == state) SchedulePaint(); } else { alternate_images_[state] = image ? *image : gfx::ImageSkia(); } } void ToggleImageButton::SetToggledTooltipText(const string16& tooltip) { toggled_tooltip_text_ = tooltip; } //////////////////////////////////////////////////////////////////////////////// // ToggleImageButton, ImageButton overrides: const gfx::ImageSkia& ToggleImageButton::GetImage(ButtonState state) const { if (toggled_) return alternate_images_[state]; return images_[state]; } void ToggleImageButton::SetImage(ButtonState state, const gfx::ImageSkia* image) { if (toggled_) { alternate_images_[state] = image ? *image : gfx::ImageSkia(); } else { images_[state] = image ? *image : gfx::ImageSkia(); if (state_ == state) SchedulePaint(); } PreferredSizeChanged(); } //////////////////////////////////////////////////////////////////////////////// // ToggleImageButton, View overrides: bool ToggleImageButton::GetTooltipText(const gfx::Point& p, string16* tooltip) const { if (!toggled_ || toggled_tooltip_text_.empty()) return Button::GetTooltipText(p, tooltip); *tooltip = toggled_tooltip_text_; return true; } void ToggleImageButton::GetAccessibleState(ui::AccessibleViewState* state) { ImageButton::GetAccessibleState(state); GetTooltipText(gfx::Point(), &state->name); } } // namespace views
[ "wugh7125@gmail.com" ]
wugh7125@gmail.com
e05ff931feaffe3c686836d3acc0a2c7e5e1d97d
fabdff1081bf215d21d6038389005fbeba97e6b4
/mutiplication table of a number in c.cpp
97369e35a2785c5a88f09fdccb39f5455a4ec588
[]
no_license
saidutth/mycaptain-projects
372cafe8700d6760aa370cdec5ed592b90e80f59
ebdec02a660ebfb08dcb45a5b0e115ae55316f50
refs/heads/master
2020-07-23T11:20:26.432688
2019-09-28T07:14:50
2019-09-28T07:14:50
207,540,993
0
0
null
null
null
null
UTF-8
C++
false
false
456
cpp
/**a program to display multiplication table*/ #include<stdio.h> #include<conio.h> int main () { int number,upto,i=1; printf("enter a number:\n"); scanf("%d",&number); printf("upto how many times:\n"); scanf("%d",&upto); printf("multiplication table of %d\n",number); printf("--------------\n"); while (i<=upto) { printf("|%d x %d = %d |\n",number ,i,number*i); printf("--------------\n"); i++; } return 0; getch ; }
[ "noreply@github.com" ]
noreply@github.com
e2dc11633c011518ca3ff9d7b01c83d787693db6
7ff8e64220e12110a3a7ab92e44e93abcf5ec05c
/Simulation1.3/src/MyStepAction.cc
12f3aae64ba11507f2b701be16e82d13a433dac5
[]
no_license
fengzuke/backgroundsimulation
29a8cfd35e2b94a3ca8170a79735c3db3e6fc5f6
920b4e99ef03e62b3e3c0f72727071bf2d799fac
refs/heads/main
2023-07-16T16:18:40.245183
2021-09-05T12:28:02
2021-09-05T12:28:02
383,981,174
0
0
null
null
null
null
UTF-8
C++
false
false
3,803
cc
//********************************************* // This is auto generated by G4gen 0.6 // author:Qian #include "G4Step.hh" #include "G4RunManager.hh" #include "G4LogicalVolume.hh" #include "MyStepAction.hh" #include "MyEvtAction.hh" #include "MyDetectorConstruction.hh" #include "MyAnalysisManager.hh" #include "Verbose.hh" MyStepAction::MyStepAction() : G4UserSteppingAction() //fAnticShieldVolume(0), fAnticShieldVolume2(0), fBeWindowsVolume(0),fGasVolume(0) { if (verbose) G4cout << "====>MyStepAction::MyStepAction()" << G4endl; } MyStepAction::~MyStepAction() { } void MyStepAction::UserSteppingAction(const G4Step *) { if (verbose) G4cout << "====>MyStepAction::UserSteppingAction()" << G4endl; /* if (!fAnticShieldVolume) { const MyDetectorConstruction *detectorConstruction = static_cast<const MyDetectorConstruction *>(G4RunManager::GetRunManager()->GetUserDetectorConstruction()); fAnticShieldVolume = detectorConstruction->GetAnticShieldVolume(); } if (!fAnticShieldVolume2) { const MyDetectorConstruction *detectorConstruction = static_cast<const MyDetectorConstruction *>(G4RunManager::GetRunManager()->GetUserDetectorConstruction()); fAnticShieldVolume2 = detectorConstruction->GetAnticShieldVolume2(); } if (!fBeWindowsVolume) { const MyDetectorConstruction *detectorConstruction = static_cast<const MyDetectorConstruction *>(G4RunManager::GetRunManager()->GetUserDetectorConstruction()); fBeWindowsVolume = detectorConstruction->GetBeWindowsVolume(); } if (!fGasVolume) { const MyDetectorConstruction *detectorConstruction = static_cast<const MyDetectorConstruction *>(G4RunManager::GetRunManager()->GetUserDetectorConstruction()); fGasVolume = detectorConstruction->GetGasVolume(); } G4LogicalVolume *presentVolume = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume()->GetLogicalVolume(); if (presentVolume == fAnticShieldVolume) { G4double edepStep = aStep->GetTotalEnergyDeposit(); //G4cout<<"+++=====+++++====++++ "<<edepStep<<G4endl; SimEvent *fEvent = MyAnalysisManager::GetInstance()->GetSimEvent(); fEvent->SetEventCoincidence1Energy(edepStep); } if (presentVolume == fAnticShieldVolume2) { G4double edepStep2 = aStep->GetTotalEnergyDeposit(); //G4cout<<"+++=====+++++====++++222 "<<edepStep2<<G4endl; SimEvent *fEvent = MyAnalysisManager::GetInstance()->GetSimEvent(); fEvent->SetEventCoincidence2Energy(edepStep2); } if (presentVolume == fBeWindowsVolume) { G4double edepStep = aStep->GetTotalEnergyDeposit(); //G4cout<<"+++=====+++++====++++222 "<<edepStep<<G4endl; SimEvent *fEvent = MyAnalysisManager::GetInstance()->GetSimEvent(); fEvent->SetEventBeWindowsEnergy(edepStep); } if (presentVolume == fGasVolume) { G4int pdgID = aStep->GetTrack()->GetDefinition()->GetPDGEncoding(); G4double edepStep = aStep->GetTotalEnergyDeposit(); //G4cout<<"------volume "<<fGasVolume<<G4endl; //G4cout<<"+++++volume "<<fBeWindowsVolume<<G4endl; const G4ThreeVector trackPositionPoint = aStep->GetTrack()->GetVertexPosition(); const G4LogicalVolume *whatWeWant = aStep->GetTrack()->GetLogicalVolumeAtVertex(); //G4cout<<"====volume "<<whatWeWant<<G4endl; if (whatWeWant == fBeWindowsVolume && pdgID == 11 && trackPositionPoint != postPoint ) { SimEvent *fEvent = MyAnalysisManager::GetInstance()->GetSimEvent(); fEvent->SetNumCrossBe(theSumFromBe); //G4cout<<"+++++ "<<fBeWindowsVolume<<G4endl; //theSumFromBe = theSumFromBe+1; //G4cout<<"-------sum "<<theSumFromBe<<G4endl; } postPoint = trackPositionPoint; }*/ }
[ "709435128@qq.com" ]
709435128@qq.com
3c2b6a0ce8424b6a70f4297ffc70653cd903abe9
b22588340d7925b614a735bbbde1b351ad657ffc
/athena/PhysicsAnalysis/PhysicsElementLinksTPCnv/PhysicsElementLinksTPCnv/MuonLinksCnv_p1.h
78598f5c311085e82bd442cb3f45f0a86f3ce6d3
[]
no_license
rushioda/PIXELVALID_athena
90befe12042c1249cbb3655dde1428bb9b9a42ce
22df23187ef85e9c3120122c8375ea0e7d8ea440
refs/heads/master
2020-12-14T22:01:15.365949
2020-01-19T03:59:35
2020-01-19T03:59:35
234,836,993
1
0
null
null
null
null
UTF-8
C++
false
false
661
h
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ ////////////////////////////////////// ///////////////////////////// // MuonLinksCnv_p1.h // Header file for class MuonLinksCnv_p1 // (example of a ParticleLinksCnv_p1 instantiation) // // Author: S. Protopopescu <serban@bnl.gov> /////////////////////////////////////////////////////////////////// #ifndef MuonLinksCnv_p1_H #define MuonLinksCnv_p1_H #include "ParticleEventTPCnv/ParticleLinksCnv_p1.h" #include "muonEvent/MuonContainer.h" class MuonLinksCnv_p1:public ParticleLinksCnv_p1<Analysis::MuonContainer>{ MuonLinksCnv_p1(); ~MuonLinksCnv_p1(){;} }; #endif
[ "rushioda@lxplus754.cern.ch" ]
rushioda@lxplus754.cern.ch
5741165f4a3b434e4b79442f6039ec98d85b859c
ada4c1a3558bddbcaf07cab3ea65dfcc36f73ad5
/Test/9_5/1.h
668eb2b8156e8f21ef1e4b83bbc532ca09b03d0e
[]
no_license
littesss/test_code
2de9423c95b408cd88ae16d67e3d5299c6cb9d96
989b49816dc8d7504106f1054d406de7924f9bdc
refs/heads/master
2021-09-19T16:02:58.688001
2018-07-29T03:27:23
2018-07-29T03:27:23
104,223,586
0
0
null
null
null
null
UTF-8
C++
false
false
520
h
/************************************************************************* > File Name: 1.h > Created Time: Tue 05 Sep 2017 18:10:53 PDT ************************************************************************/ #ifndef _1_H #define _1_H #include <iostream> using namespace std; class A { public: A(int aa=11, int bb=22); private: int a; }; A::A(int aa, int bb) { this->a = aa; cout << "aa" << aa << endl; cout << "bb" << bb << endl; cout << "construction" << endl; } #endif
[ "liushaohua_2017@163.com" ]
liushaohua_2017@163.com
7bc480e633d383c759d592dd58a9bf58103e9603
1f7618ab0a6b5712d6d991fd4d1cf1ba93008acc
/TetrisLib/Dot.cpp
3c24eca996a1b011da19e60b8f992a1d625f3ff7
[]
no_license
joyoon/tetrisclone
24f4211f5b110051940219e710b90fad4390f602
b03814ca8e97b8833ffc3c9c5fa2fca336ba4489
refs/heads/master
2020-05-31T17:23:45.192447
2014-05-06T21:26:04
2014-05-06T21:26:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,631
cpp
//#include "stdafx.h" //#include "Dot.h" //#include <SDL.h> //#include <vector> //#include "Global.h" // //using namespace std; // //namespace TetrisLib { // // double distanceSquared(int x1, int y1, int x2, int y2) { // int deltaX = x2 - x1; // int deltaY = y2 - y1; // // return deltaX * deltaX + deltaY * deltaY; // } // // Dot::Dot(void) { // Dot(0, 0); // } // // Dot::Dot(int x, int y) { // mXPos = x; // mYPos = y; // // mXVel = 0; // mYVel = 0; // // //initialize circle // dot.r = 10; // dot.x = 20; // dot.y = 30; // // mColliders.resize(11); // // //intialize the collision boxes' width/height // mColliders[0].w = 6; // mColliders[0].h = 1; // // mColliders[1].w = 10; // mColliders[1].h = 1; // // mColliders[2].w = 14; // mColliders[2].h = 1; // // mColliders[3].w = 14; // mColliders[3].h = 2; // // mColliders[4].w = 14; // mColliders[4].h = 2; // // mColliders[5].w = 20; // mColliders[5].h = 3; // // mColliders[6].w = 13; // mColliders[6].h = 2; // // mColliders[7].w = 14; // mColliders[7].h = 2; // // mColliders[8].w = 14; // mColliders[8].h = 1; // // mColliders[9].w = 10; // mColliders[9].h = 1; // // mColliders[10].w = 6; // mColliders[10].h = 1; // // shiftColliders(); // } // // Dot::~Dot(void) // { // } // // float Dot::getXPos() { // return mXPos; // } // // float Dot::getYPos() { // return mYPos; // } // // void Dot::render(SDL_Renderer* renderer, LTexture* texture, SDL_Rect* clip) { // texture->render(mXPos, mYPos, renderer, clip); // } // // void Dot::handleEvent(SDL_Event& e) { // if (e.type == SDL_KEYDOWN && e.key.repeat == 0) { // switch(e.key.keysym.sym) { // case SDLK_UP: // mYVel -= MAX_VELOCITY; // break; // case SDLK_DOWN: // mYVel += MAX_VELOCITY; // break; // case SDLK_LEFT: // mXVel -= MAX_VELOCITY; // break; // case SDLK_RIGHT: // mXVel += MAX_VELOCITY; // break; // } // } // } // // void Dot::move(vector<SDL_Rect>& otherColliders) { // // mXPos += mXVel; // //shiftColliders(); // // //check if x position is outside screen boundaries // if (mXPos < 0 || (mXPos + WIDTH ) > LEVEL_WIDTH) { // //move back // mXPos -= mXVel; // //shiftColliders(); // } // // mYPos += mYVel; // // //check if y position is outside screen boundaries // if (mYPos < 0 || (mYPos + HEIGHT ) > LEVEL_HEIGHT) { // //move back // mYPos -= mYVel; // //shiftColliders(); // } // } // // /* checkCollision // * checks for collision between two circles // */ // bool Dot::checkCollision(Circle c1, Circle c2) { // int totalRadiusSquared = c1.r + c2.r; // // if (distanceSquared(c1.x, c1.y, c2.x, c2.y) < totalRadiusSquared * totalRadiusSquared) { // return true; // } // } // // /* checkCollision // * checks for collision between circle and given collision boxes // */ // bool Dot::checkCollision(vector<SDL_Rect>& boxes) { // //closest point on rectangle to circle // int cX = 0, cY = 0; // // //go through the boxes // for (int i = 0; i < boxes.size(); i++) { // //find point on rectangle closest to circle // // //get x // if (mXPos < boxes[i].x) { // cX = boxes[i].x; // } // else if (mXPos > boxes[i].x + boxes[i].w) // { // cX = boxes[i].x + boxes[i].w; // } // else // { // cX = mXPos; // } // // //get y offset // if (mYPos >= boxes[i].y + boxes[i].h) { // cY = boxes[i].y + boxes[i].h; // } // else if(mYPos < boxes[i].y) // { // cY = boxes[i].y; // } // else // { // cY = mYPos; // } // // if (distanceSquared(mXPos, mYPos, cX, cY) <= dot.r * dot.r) // return true; // } // // return false; // } // // void Dot::shiftColliders() { // //row offset // int r = 0; // // //shift collider boxes // for(int i = 0; i < mColliders.size(); i++) { // //center the collision box // mColliders[i].x = mXPos + (WIDTH - mColliders[i].w) / 2; // // //set the collision box at its row offset // mColliders[i].y = mYPos + r; // // //move the row offset down the height of the collision box // r += mColliders[i].h; // } // } // // void Dot::setCamera(SDL_Rect& camera) { // //center camera over dot // camera.x = (mXPos + WIDTH / 2) - SCREEN_WIDTH / 2; // camera.y = (mYPos + HEIGHT / 2) - SCREEN_HEIGHT / 2; // // //keep the camera in bounds // if (camera.x < 0) // camera.x = 0; // // if (camera.y < 0) // camera.y = 0; // // if (camera.x > LEVEL_WIDTH - camera.w) { // camera.x = LEVEL_WIDTH - camera.w; // } // // if (camera.y > LEVEL_HEIGHT - camera.h) { // camera.y = LEVEL_HEIGHT - camera.h; // } // } // // vector<SDL_Rect>& Dot::getColliders() { // return mColliders; // } //}
[ "johnyoon20@gmail.com" ]
johnyoon20@gmail.com
32b713995a54a9fb193b8c06a3369f2dcf1ecc4c
5743077502c2ab293905c7533fe9774576773ebe
/src/services/rpc/impl/DoPrint.h
8fd10414eeb07676bef7e6a43a3108a69433e3bd
[ "MIT" ]
permissive
hawx1993/truechain-testnet-core
3056b07dc1d39dc9277d1d2960c7c23db39bbf9c
a75edfe83562b3764fb3140144bc41943ebb995a
refs/heads/master
2021-01-24T19:08:55.033847
2018-02-28T06:31:48
2018-02-28T06:31:48
123,239,490
1
0
MIT
2018-02-28T06:21:53
2018-02-28T06:21:53
null
UTF-8
C++
false
false
1,710
h
//------------------------------------------------------------------------------ /* Copyright (c) 2012, 2013 Skywell Labs Inc. Copyright (c) 2017-2018 TrueChain Foundation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ //============================================================================== #ifndef SKYWELL_RPC_DOPRINT_H_INCLUDED #define SKYWELL_RPC_DOPRINT_H_INCLUDED #include <main/Application.h> #include <common/json/JsonPropertyStream.h> #include <protocol/JsonFields.h> namespace truechain { namespace RPC { class DoPrint { public: void operator() (Request& req) { JsonPropertyStream stream; if (req.params.isObject() && req.params[jss::params].isArray() && req.params[jss::params][0u].isString ()) { req.app.write (stream, req.params[jss::params][0u].asString()); } else { req.app.write (stream); } req.result = stream.top(); } }; } } #endif
[ "archit@protonmail.ch" ]
archit@protonmail.ch
5294aeee29ba92ca4808be51d22391e3eaf2251a
f08b367dc2504afe2604c63e43e8bbb3d5814dbd
/team.h
45e7e37047f4dcb388b747f80eea78f2de30f81d
[]
no_license
dunicadavid/LanParty
fdd118165c5d185a7340969e11e8204007aaeb44
56cbff3e119564873ef978491e50851962f99da7
refs/heads/main
2023-09-03T17:16:58.880860
2021-11-03T11:19:04
2021-11-03T11:19:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
448
h
#pragma once #include "player.h" class Team { private: int players; string numeEchipa; Player *p; Team* urm; public: Team(); Team(int, string, Player*,Team*); Team(const Team&); Team& operator=(const Team&); ~Team(); void GetPlayers(int); void GetNumeEchipa(string); void GetP(Player*); void GetUrm(Team*); Team* ReturnUrm(); float ReturnMedie(); string ReturnNumeEchipa(); void afis(ostream&) const; };
[ "noreply@github.com" ]
noreply@github.com
93cd145c0050660011b4a45fcaf0beda90a323b4
a4ea86a5122fc31339150f5b83486599aec5accd
/Monopoly/start.hpp
57103b9d68c6664af096e574b4906b02aa7ba79a
[]
no_license
anjaav/Monopoly
0bcd0ba5bd5128c3ae71fcd1e44c5d957883aae3
fc20399f475d8979cbc872a18be1f48275f461ac
refs/heads/main
2023-02-25T23:39:30.747084
2021-02-01T15:21:57
2021-02-01T15:21:57
334,986,639
0
0
null
null
null
null
UTF-8
C++
false
false
201
hpp
#ifndef START_H #define START_H #include "field.hpp" class Start: public Field { public: std::string name()const override; std::string className() const; void action(Player&); }; #endif
[ "ann.vranic@gmail.com" ]
ann.vranic@gmail.com
0937412900ef6bb67cc5e9097efc9fafba75e4dd
a87e5aedad4bef304ffa9b602cc9d98d3bb2c3c5
/common/Math/Sha256.cpp
fd26ef3a811ae5ea18b6cc28e413afe8c92d1c45
[ "MIT" ]
permissive
blockspacer/NovusCore-Common
e33e7c76c1f5f6e950c0eb6dc0fe3293e721273c
5fd165298d9f4fb87f61a6a32476b6878adc618f
refs/heads/master
2021-03-26T02:18:18.878412
2020-03-07T23:34:26
2020-03-07T23:34:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
690
cpp
#include "Sha256.h" #include <stdarg.h> void Sha256::Init() { SHA256_Init(&_state); } void Sha256::Update(const u8* data, size_t size) { SHA256_Update(&_state, data, size); } void Sha256::Update(const std::string& string) { Update((u8 const*)string.c_str(), string.length()); } void Sha256::Final(u8* dest) { if (!dest) dest = _data; SHA256_Final(dest, &_state); } void Sha256::Hash(const u8* data, size_t length, u8* dest /* = nullptr */) { Init(); Update(data, length); Final(dest); } void Sha256::Hash(const std::string& string, u8* dest /* = nullptr */) { Init(); Update((u8 const*)string.c_str(), string.length()); Final(dest); }
[ "nickiarpejensen@gmail.com" ]
nickiarpejensen@gmail.com
a3b06b8d83b2ea8a7c408d48561e933e00facdc8
f52bf7316736f9fb00cff50528e951e0df89fe64
/Platform/vendor/samsung/common/packages/apps/SBrowser/src/content/renderer/renderer_main_platform_delegate_win.cc
1af746d59455fc22fb171b813b14328b47f904cb
[ "BSD-3-Clause" ]
permissive
git2u/sm-t530_KK_Opensource
bcc789ea3c855e3c1e7471fc99a11fd460b9d311
925e57f1f612b31ea34c70f87bc523e7a7d53c05
refs/heads/master
2021-01-19T21:32:06.678681
2014-11-21T23:09:45
2014-11-21T23:09:45
48,746,810
0
1
null
2015-12-29T12:35:13
2015-12-29T12:35:13
null
UTF-8
C++
false
false
5,682
cc
// Copyright (c) 2012 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 "content/renderer/renderer_main_platform_delegate.h" #include "base/command_line.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "base/win/win_util.h" #include "content/public/common/content_switches.h" #include "content/public/common/injection_test_win.h" #include "content/public/renderer/render_thread.h" #include "content/renderer/render_thread_impl.h" #include "sandbox/win/src/sandbox.h" #include "skia/ext/vector_platform_device_emf_win.h" #include "third_party/icu/public/i18n/unicode/timezone.h" #include "third_party/skia/include/ports/SkTypeface_win.h" namespace content { namespace { // Windows-only skia sandbox support void SkiaPreCacheFont(const LOGFONT& logfont) { RenderThread* render_thread = RenderThread::Get(); if (render_thread) { render_thread->PreCacheFont(logfont); } } void SkiaPreCacheFontCharacters(const LOGFONT& logfont, const wchar_t* text, unsigned int text_length) { RenderThreadImpl* render_thread_impl = RenderThreadImpl::current(); if (render_thread_impl) { render_thread_impl->PreCacheFontCharacters(logfont, string16(text, text_length)); } } void InitExitInterceptions() { // If code subsequently tries to exit using exit(), _exit(), abort(), or // ExitProcess(), force a crash (since otherwise these would be silent // terminations and fly under the radar). base::win::SetShouldCrashOnProcessDetach(true); base::win::SetAbortBehaviorForCrashReporting(); } #if !defined(NDEBUG) LRESULT CALLBACK WindowsHookCBT(int code, WPARAM w_param, LPARAM l_param) { CHECK_NE(code, HCBT_CREATEWND) << "Should not be creating windows in the renderer!"; return CallNextHookEx(NULL, code, w_param, l_param); } #endif // !NDEBUG } // namespace RendererMainPlatformDelegate::RendererMainPlatformDelegate( const MainFunctionParams& parameters) : parameters_(parameters), sandbox_test_module_(NULL) { } RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { } void RendererMainPlatformDelegate::PlatformInitialize() { #if !defined(NDEBUG) // Install a check that we're not creating windows in the renderer. See // http://crbug.com/230122 for background. TODO(scottmg): Ideally this would // check all threads in the renderer, but it currently only checks the main // thread. PCHECK( SetWindowsHookEx(WH_CBT, WindowsHookCBT, NULL, ::GetCurrentThreadId())); #endif // !NDEBUG InitExitInterceptions(); // Be mindful of what resources you acquire here. They can be used by // malicious code if the renderer gets compromised. const CommandLine& command_line = parameters_.command_line; bool no_sandbox = command_line.HasSwitch(switches::kNoSandbox); if (!no_sandbox) { // ICU DateFormat class (used in base/time_format.cc) needs to get the // Olson timezone ID by accessing the registry keys under // HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. // After TimeZone::createDefault is called once here, the timezone ID is // cached and there's no more need to access the registry. If the sandbox // is disabled, we don't have to make this dummy call. scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont); skia::SetSkiaEnsureTypefaceCharactersAccessible( SkiaPreCacheFontCharacters); } } void RendererMainPlatformDelegate::PlatformUninitialize() { // At this point we are shutting down in a normal code path, so undo our // hack to crash on exit. base::win::SetShouldCrashOnProcessDetach(false); } bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { const CommandLine& command_line = parameters_.command_line; DVLOG(1) << "Started renderer with " << command_line.GetCommandLineString(); sandbox::TargetServices* target_services = parameters_.sandbox_info->target_services; if (target_services && !no_sandbox) { std::wstring test_dll_name = command_line.GetSwitchValueNative(switches::kTestSandbox); if (!test_dll_name.empty()) { sandbox_test_module_ = LoadLibrary(test_dll_name.c_str()); DCHECK(sandbox_test_module_); if (!sandbox_test_module_) { return false; } } } return true; } bool RendererMainPlatformDelegate::EnableSandbox() { sandbox::TargetServices* target_services = parameters_.sandbox_info->target_services; if (target_services) { // Cause advapi32 to load before the sandbox is turned on. unsigned int dummy_rand; rand_s(&dummy_rand); // Warm up language subsystems before the sandbox is turned on. ::GetUserDefaultLangID(); ::GetUserDefaultLCID(); target_services->LowerToken(); return true; } return false; } void RendererMainPlatformDelegate::RunSandboxTests(bool no_sandbox) { if (sandbox_test_module_) { RunRendererTests run_security_tests = reinterpret_cast<RunRendererTests>(GetProcAddress(sandbox_test_module_, kRenderTestCall)); DCHECK(run_security_tests); if (run_security_tests) { int test_count = 0; DVLOG(1) << "Running renderer security tests"; BOOL result = run_security_tests(&test_count); CHECK(result) << "Test number " << test_count << " has failed."; } } } } // namespace content
[ "digixp2006@gmail.com" ]
digixp2006@gmail.com
a454f67ada6c23e31b37e35cc3f8d7e1f2392f9d
257539df21551cc265f7e88ce1027fc99b72c420
/staticlib/MathFuncsLib/MathFuncsLib/MathFuncsLib.h
09ca0bbdda627237a88312e05ba0b9f0453cde30
[]
no_license
rabbit777777/hello-world
396a06016fae41100f34e88dce31bac8eba4289c
48849fe08c21149a7f1b54eb5ad8c059330b429a
refs/heads/master
2020-08-01T17:55:57.970277
2019-11-26T10:14:45
2019-11-26T10:14:45
211,068,126
0
0
null
null
null
null
UTF-8
C++
false
false
328
h
#pragma once namespace MathFuncs { class MyMathFuncs { public: // Returns a + b static double Add(double a, double b); // Returns a - b static double Subtract(double a, double b); // Returns a * b static double Multiply(double a, double b); // Returns a / b static double Divide(double a, double b); }; }
[ "55836896+rabbit777777@users.noreply.github.com" ]
55836896+rabbit777777@users.noreply.github.com
ec3f8608a3f777ee48547556406fd03ee8fbbc9f
6c77cf237697f252d48b287ae60ccf61b3220044
/aws-cpp-sdk-AWSMigrationHub/include/aws/AWSMigrationHub/model/NotifyMigrationTaskStateRequest.h
3407f06ccb51d7c494ea268e81885024ee448476
[ "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
8,859
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/AWSMigrationHub/MigrationHub_EXPORTS.h> #include <aws/AWSMigrationHub/MigrationHubRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/AWSMigrationHub/model/Task.h> #include <aws/core/utils/DateTime.h> #include <utility> namespace Aws { namespace MigrationHub { namespace Model { /** */ class AWS_MIGRATIONHUB_API NotifyMigrationTaskStateRequest : public MigrationHubRequest { public: NotifyMigrationTaskStateRequest(); // 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 "NotifyMigrationTaskState"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The name of the ProgressUpdateStream. </p> */ inline const Aws::String& GetProgressUpdateStream() const{ return m_progressUpdateStream; } /** * <p>The name of the ProgressUpdateStream. </p> */ inline void SetProgressUpdateStream(const Aws::String& value) { m_progressUpdateStreamHasBeenSet = true; m_progressUpdateStream = value; } /** * <p>The name of the ProgressUpdateStream. </p> */ inline void SetProgressUpdateStream(Aws::String&& value) { m_progressUpdateStreamHasBeenSet = true; m_progressUpdateStream = std::move(value); } /** * <p>The name of the ProgressUpdateStream. </p> */ inline void SetProgressUpdateStream(const char* value) { m_progressUpdateStreamHasBeenSet = true; m_progressUpdateStream.assign(value); } /** * <p>The name of the ProgressUpdateStream. </p> */ inline NotifyMigrationTaskStateRequest& WithProgressUpdateStream(const Aws::String& value) { SetProgressUpdateStream(value); return *this;} /** * <p>The name of the ProgressUpdateStream. </p> */ inline NotifyMigrationTaskStateRequest& WithProgressUpdateStream(Aws::String&& value) { SetProgressUpdateStream(std::move(value)); return *this;} /** * <p>The name of the ProgressUpdateStream. </p> */ inline NotifyMigrationTaskStateRequest& WithProgressUpdateStream(const char* value) { SetProgressUpdateStream(value); return *this;} /** * <p>Unique identifier that references the migration task.</p> */ inline const Aws::String& GetMigrationTaskName() const{ return m_migrationTaskName; } /** * <p>Unique identifier that references the migration task.</p> */ inline void SetMigrationTaskName(const Aws::String& value) { m_migrationTaskNameHasBeenSet = true; m_migrationTaskName = value; } /** * <p>Unique identifier that references the migration task.</p> */ inline void SetMigrationTaskName(Aws::String&& value) { m_migrationTaskNameHasBeenSet = true; m_migrationTaskName = std::move(value); } /** * <p>Unique identifier that references the migration task.</p> */ inline void SetMigrationTaskName(const char* value) { m_migrationTaskNameHasBeenSet = true; m_migrationTaskName.assign(value); } /** * <p>Unique identifier that references the migration task.</p> */ inline NotifyMigrationTaskStateRequest& WithMigrationTaskName(const Aws::String& value) { SetMigrationTaskName(value); return *this;} /** * <p>Unique identifier that references the migration task.</p> */ inline NotifyMigrationTaskStateRequest& WithMigrationTaskName(Aws::String&& value) { SetMigrationTaskName(std::move(value)); return *this;} /** * <p>Unique identifier that references the migration task.</p> */ inline NotifyMigrationTaskStateRequest& WithMigrationTaskName(const char* value) { SetMigrationTaskName(value); return *this;} /** * <p>Information about the task's progress and status.</p> */ inline const Task& GetTask() const{ return m_task; } /** * <p>Information about the task's progress and status.</p> */ inline void SetTask(const Task& value) { m_taskHasBeenSet = true; m_task = value; } /** * <p>Information about the task's progress and status.</p> */ inline void SetTask(Task&& value) { m_taskHasBeenSet = true; m_task = std::move(value); } /** * <p>Information about the task's progress and status.</p> */ inline NotifyMigrationTaskStateRequest& WithTask(const Task& value) { SetTask(value); return *this;} /** * <p>Information about the task's progress and status.</p> */ inline NotifyMigrationTaskStateRequest& WithTask(Task&& value) { SetTask(std::move(value)); return *this;} /** * <p>The timestamp when the task was gathered.</p> */ inline const Aws::Utils::DateTime& GetUpdateDateTime() const{ return m_updateDateTime; } /** * <p>The timestamp when the task was gathered.</p> */ inline void SetUpdateDateTime(const Aws::Utils::DateTime& value) { m_updateDateTimeHasBeenSet = true; m_updateDateTime = value; } /** * <p>The timestamp when the task was gathered.</p> */ inline void SetUpdateDateTime(Aws::Utils::DateTime&& value) { m_updateDateTimeHasBeenSet = true; m_updateDateTime = std::move(value); } /** * <p>The timestamp when the task was gathered.</p> */ inline NotifyMigrationTaskStateRequest& WithUpdateDateTime(const Aws::Utils::DateTime& value) { SetUpdateDateTime(value); return *this;} /** * <p>The timestamp when the task was gathered.</p> */ inline NotifyMigrationTaskStateRequest& WithUpdateDateTime(Aws::Utils::DateTime&& value) { SetUpdateDateTime(std::move(value)); return *this;} /** * <p>Number of seconds after the UpdateDateTime within which the Migration Hub can * expect an update. If Migration Hub does not receive an update within the * specified interval, then the migration task will be considered stale.</p> */ inline int GetNextUpdateSeconds() const{ return m_nextUpdateSeconds; } /** * <p>Number of seconds after the UpdateDateTime within which the Migration Hub can * expect an update. If Migration Hub does not receive an update within the * specified interval, then the migration task will be considered stale.</p> */ inline void SetNextUpdateSeconds(int value) { m_nextUpdateSecondsHasBeenSet = true; m_nextUpdateSeconds = value; } /** * <p>Number of seconds after the UpdateDateTime within which the Migration Hub can * expect an update. If Migration Hub does not receive an update within the * specified interval, then the migration task will be considered stale.</p> */ inline NotifyMigrationTaskStateRequest& WithNextUpdateSeconds(int value) { SetNextUpdateSeconds(value); return *this;} /** * <p>Optional boolean flag to indicate whether any effect should take place. Used * to test if the caller has permission to make the call.</p> */ inline bool GetDryRun() const{ return m_dryRun; } /** * <p>Optional boolean flag to indicate whether any effect should take place. Used * to test if the caller has permission to make the call.</p> */ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** * <p>Optional boolean flag to indicate whether any effect should take place. Used * to test if the caller has permission to make the call.</p> */ inline NotifyMigrationTaskStateRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_progressUpdateStream; bool m_progressUpdateStreamHasBeenSet; Aws::String m_migrationTaskName; bool m_migrationTaskNameHasBeenSet; Task m_task; bool m_taskHasBeenSet; Aws::Utils::DateTime m_updateDateTime; bool m_updateDateTimeHasBeenSet; int m_nextUpdateSeconds; bool m_nextUpdateSecondsHasBeenSet; bool m_dryRun; bool m_dryRunHasBeenSet; }; } // namespace Model } // namespace MigrationHub } // namespace Aws
[ "henso@amazon.com" ]
henso@amazon.com
f91f65cb74ff073e1f5024ad31c5c901b56c900e
c3215fe41b3c174ca4a7be36c8b812340f9c268a
/src/scene/select/Select.cpp
0a8ff72ff67781429bdb456b55e903baff38cb5d
[]
no_license
PS14/DowaProject
12e1d92c0ff30b26127e21fa158fe3d5fd244197
a219b836c19b24b0700b8fae62352b8d6dcda503
refs/heads/master
2021-01-17T22:07:04.173139
2015-12-01T10:43:45
2015-12-01T10:43:45
45,772,334
0
0
null
2015-11-08T08:13:43
2015-11-08T08:13:42
null
UTF-8
C++
false
false
4,247
cpp
#include "Select.hpp" Select::Select() { my_angle = 0.0f; mry = 0.0f; //mtouchPos = dowa::Device::getTouchPos();//ci::Vec2f(0.0f, 0.0f); mDeviceWindowHeight = ci::app::getWindowHeight(); mDeviceWindowWidth = ci::app::getWindowWidth(); //stage1.pos = ci::Vec3f(150.0f, 250.0f, 0.0f); // nothing translate(test) stage1.pos = ci::Vec3f(-200.0f, 0.0f, 0.0f); stage1.size = ci::Vec3f(200.0f, 75.0f, 0.0f); stage1.resize = ci::Vec3f(10.0f, 10.0f, 10.0f); stage1.resize_angle = ci::Vec3f(0.0f, 0.0f, 0.0f); //mStage1pos = ci::Rectf(stage1.pos.x, stage1.pos.y, // stage1.size.x, stage1.size.y); stage2.pos = ci::Vec3f(0.0f, -150.0f, 0.0f), stage2.size = ci::Vec3f(200.0f, 75.0f, 0.0f); stage3.pos = ci::Vec3f(200.0f, 0.0f, 0.0f); stage3.size = ci::Vec3f(200.0f, 75.0f, 0.0f); isSelected = false; isDecided = false; mSelectedStage_id = mNone; } void Select::update() { //setNextScene(SceneType::GameMain, FadeType::None); //------------------------------------------------------------- //move up and down mry = std::cos(my_angle) * 10.0f; my_angle += 0.005f; //------------------------------------------------------------- //scale up or down stage1.resize.x = std::sin(stage1.resize_angle.x) * 10.0f; stage1.resize.y = std::sin(stage1.resize_angle.y) * 10.0f; if (!isSelected) { stage1.resize_angle.x += 0.005f; stage1.resize_angle.y += 0.005f; } //------------------------------------------------------------- //touch if (dowa::Device::isTouchBegan()) { std::cout << "touched" << std::endl; //SceneManager::create(SceneType::Select); mtouchPos = dowa::Device::getTouchPos(); if (mtouchPos.x >= stage1.pos.x && mtouchPos.x <= stage1.size.x && mtouchPos.y >= stage1.pos.y && mtouchPos.y <= stage1.size.y) { SceneManager::create(SceneType::GameMain); } /* if (mtouchPos.x >= stage2.pos.x && mtouchPos.x <= stage2.size.x && mtouchPos.y >= stage2.pos.y && mtouchPos.y <= stage2.size.y) { SceneManager::create(SceneType::Result); }*/ } std::cout << "touchpos:" << mtouchPos << std::endl; } void Select::draw() { //background ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(1, 1, 1)); ci::gl::drawCube(ci::Vec3f::zero(), ci::Vec3f(800, 500, 0)); ci::gl::popModelView(); switch (mSelectedStage_id){ //selected stage case mNone: ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(0, 0, 1)); ci::gl::drawCube(ci::Vec3f(0, 125.0f , 0), ci::Vec3f(600, 250, 0)); ci::gl::popModelView(); break; case mStage1: ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(0.3f, 0, 1)); ci::gl::drawCube(ci::Vec3f(0, mDeviceWindowHeight / 3, 0), ci::Vec3f(600, 250, 0)); ci::gl::popModelView(); break; case mStage2: ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(0, 0.3f, 1)); ci::gl::drawCube(ci::Vec3f(0, mDeviceWindowHeight / 3, 0), ci::Vec3f(600, 250, 0)); ci::gl::popModelView(); break; case mStage3: ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(0, 0, 0.3f)); ci::gl::drawCube(ci::Vec3f(0, mDeviceWindowHeight / 3, 0), ci::Vec3f(600, 250, 0)); ci::gl::popModelView(); break; } //stage1 ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(1, 1, 0)); ci::gl::drawCube(ci::Vec3f(stage1.pos.x, stage1.pos.y + mry, stage1.pos.z), ci::Vec3f(stage1.size.x + stage1.resize.x, stage1.size.y + stage1.resize.y, stage1.size.z)); ci::gl::popModelView(); //stage2 ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(1, 0, 0)); ci::gl::drawCube(ci::Vec3f(stage2.pos.x, stage2.pos.y + mry, stage2.pos.z), ci::Vec3f(stage2.size.x, stage2.size.y, stage2.size.z)); ci::gl::popModelView(); //stage3 ci::gl::pushModelView(); ci::gl::translate(ci::app::getWindowCenter()); ci::gl::color(ci::Color(1, 1, 0)); ci::gl::drawCube(ci::Vec3f(stage3.pos.x, stage3.pos.y + mry, stage3.pos.z), ci::Vec3f(stage3.size.x, stage3.size.y, stage3.size.z)); ci::gl::popModelView(); }
[ "jubirosaiko@yahoo.co.jp" ]
jubirosaiko@yahoo.co.jp
f10d6d04bf1902b18db4a7feb4c5dd6f3c72ffe6
1d9e9d4f416607453e7c91c9dc45205bd7cb9e14
/iqc5/instrument/DatabaseDecode/PCR/zsdec_linegene/w_linegene.cpp
9ba6ff0e3301836be75a7e7500322aaa15144fdf
[]
no_license
allan1234569/iqc5
5542f2efe3e6eae0a59110ec2863d9beeef8c1cf
8a026564db0128005f90d3f7ca56787a7bcbbad3
refs/heads/master
2020-03-29T09:17:13.715443
2018-09-21T10:56:01
2018-09-21T10:56:01
149,750,494
1
0
null
null
null
null
UTF-8
C++
false
false
411
cpp
#include "w_linegene.h" W_Linegene::W_Linegene(QWidget *parent) : BaseWindow(parent) { this->setWindowTitle(tr("linegene")); slt_setQuery(); connect(this,SIGNAL(isChanged()),this,SLOT(slt_setQuery())); } W_Linegene::~W_Linegene() { } int W_Linegene::decode(const QString &data) { } void W_Linegene::slt_timeout() { BaseWindow::slt_timeout(); } void W_Linegene::slt_setQuery() { }
[ "allan1234569@163.com" ]
allan1234569@163.com
ceca71fd7208f36481fdc7c9b84b3611accc3f68
466760cb224df207a065fc6b46e2df4345a2ee5e
/src/ofxAudioUnitFftNode.cpp
13b1ee2c7eaf641eefdeaa90f6c08a67eeab5dcf
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
ruxrux/ofxAudioUnit
5c0d9eac6c8aa371200c26b89372f9f8863c1753
c08f4f1cfce3f3c37c520cd1a382516276ffbd17
refs/heads/master
2021-01-12T12:03:24.816704
2013-04-02T20:23:21
2013-04-02T20:23:21
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,796
cpp
#include "ofxAudioUnitFftNode.h" #include <math.h> // these values taken from the Simple Spectrum Analyser project here // https://github.com/fredguile/SimpleSpectrumAnalyzer const float DB_CORRECTION_HAMMING = 1.0; const float DB_CORRECTION_HANNING = -3.2; const float DB_CORRECTION_BLACKMAN = 2.37; ofxAudioUnitFftNode::ofxAudioUnitFftNode(unsigned int fftBufferSize, Settings settings) : _currentMaxLog2N(0) , _outputSettings(settings) , _fftSetup(NULL) , _fftData((COMPLEX_SPLIT){NULL, NULL}) , _window(NULL) { setFftBufferSize(fftBufferSize); } ofxAudioUnitFftNode::ofxAudioUnitFftNode(const ofxAudioUnitFftNode &orig) : _currentMaxLog2N(0) , _outputSettings(orig._outputSettings) , _fftSetup(NULL) , _fftData((COMPLEX_SPLIT){NULL, NULL}) , _window(NULL) { setFftBufferSize(orig._N); } ofxAudioUnitFftNode& ofxAudioUnitFftNode::operator=(const ofxAudioUnitFftNode &orig) { setFftBufferSize(orig._N); setSettings(orig._outputSettings); } ofxAudioUnitFftNode::~ofxAudioUnitFftNode() { freeBuffers(); } void ofxAudioUnitFftNode::freeBuffers() { if(_fftSetup) vDSP_destroy_fftsetup(_fftSetup); if(_fftData.realp) free(_fftData.realp); if(_fftData.imagp) free(_fftData.imagp); if(_window) free(_window); } void generateWindow(ofxAudioUnitWindowType windowType, float * window, size_t size) { switch (windowType) { case OFXAU_WINDOW_HAMMING: vDSP_hamm_window(window, size, 0); break; case OFXAU_WINDOW_HANNING: vDSP_hann_window(window, size, 0); break; case OFXAU_WINDOW_BLACKMAN: vDSP_blkman_window(window, size, 0); break; } } void ofxAudioUnitFftNode::setFftBufferSize(unsigned int bufferSize) { _log2N = (unsigned int) ceilf(log2f(bufferSize)); _N = 1 << _log2N; // if the new buffer size is bigger than what we've allocated for, // free everything and allocate anew (otherwise re-use) if(_log2N > _currentMaxLog2N) { freeBuffers(); _fftData.realp = (float *)calloc(_N / 2, sizeof(float)); _fftData.imagp = (float *)calloc(_N / 2, sizeof(float)); _window = (float *)calloc(_N, sizeof(float)); _fftSetup = vDSP_create_fftsetup(_log2N, kFFTRadix2); _currentMaxLog2N = _log2N; } generateWindow(_outputSettings.window, _window, _N); setBufferSize(_N); } void ofxAudioUnitFftNode::setWindowType(ofxAudioUnitWindowType windowType) { _outputSettings.window = windowType; generateWindow(_outputSettings.window, _window, _N); } void ofxAudioUnitFftNode::setScale(ofxAudioUnitScaleType scaleType) { _outputSettings.scale = scaleType; } void ofxAudioUnitFftNode::setNormalizeInput(bool normalizeInput) { _outputSettings.normalizeInput = normalizeInput; } void ofxAudioUnitFftNode::setNormalizeOutput(bool normalizeOutput) { _outputSettings.normalizeOutput = normalizeOutput; } void ofxAudioUnitFftNode::setClampMinToZero(bool clampToZero) { _outputSettings.clampMinToZero = clampToZero; } void ofxAudioUnitFftNode::setSettings(const ofxAudioUnitFftNode::Settings &settings) { _outputSettings = settings; generateWindow(_outputSettings.window, _window, _N); } static void PerformFFT(float * input, float * window, COMPLEX_SPLIT &fftData, FFTSetup &setup, size_t N) { // windowing vDSP_vmul(input, 1, window, 1, input, 1, N); // FFT vDSP_ctoz((COMPLEX *) input, 2, &fftData, 1, N/2); vDSP_fft_zrip(setup, &fftData, 1, (size_t)ceilf(log2f(N)), kFFTDirection_Forward); // zero-ing out Nyquist freq fftData.imagp[0] = 0.0f; } bool ofxAudioUnitFftNode::getAmplitude(vector<float> &outAmplitude) { getSamplesFromChannel(_sampleBuffer, 0); // return empty if we don't have enough samples yet if(_sampleBuffer.size() < _N) { outAmplitude.clear(); return false; } // normalize input waveform if(_outputSettings.normalizeInput) { float timeDomainMax; vDSP_maxv(&_sampleBuffer[0], 1, &timeDomainMax, _N); vDSP_vsdiv(&_sampleBuffer[0], 1, &timeDomainMax, &_sampleBuffer[0], 1, _N); } PerformFFT(&_sampleBuffer[0], _window, _fftData, _fftSetup, _N); // get amplitude vDSP_zvmags(&_fftData, 1, _fftData.realp, 1, _N/2); // normalize magnitudes float two = 2.0; vDSP_vsdiv(_fftData.realp, 1, &two, _fftData.realp, 1, _N/2); // scale output according to requested settings if(_outputSettings.scale == OFXAU_SCALE_LOG10) { for(int i = 0; i < (_N / 2); i++) { _fftData.realp[i] = log10f(_fftData.realp[i] + 1); } } else if(_outputSettings.scale == OFXAU_SCALE_DECIBEL) { float ref = 1.0; vDSP_vdbcon(_fftData.realp, 1, &ref, _fftData.realp, 1, _N / 2, 1); float dbCorrectionFactor = 0; switch (_outputSettings.window) { case OFXAU_WINDOW_HAMMING: dbCorrectionFactor = DB_CORRECTION_HAMMING; break; case OFXAU_WINDOW_HANNING: dbCorrectionFactor = DB_CORRECTION_HAMMING; break; case OFXAU_WINDOW_BLACKMAN: dbCorrectionFactor = DB_CORRECTION_HAMMING; break; } vDSP_vsadd(_fftData.realp, 1, &dbCorrectionFactor, _fftData.realp, 1, _N / 2); } // restrict minimum to 0 if(_outputSettings.clampMinToZero) { float min = 0.0; float max = INFINITY; vDSP_vclip(_fftData.realp, 1, &min, &max, _fftData.realp, 1, _N / 2); } // normalize output between 0 and 1 if(_outputSettings.normalizeOutput) { float max; vDSP_maxv(_fftData.realp, 1, &max, _N / 2); if(max > 0) { vDSP_vsdiv(_fftData.realp, 1, &max, _fftData.realp, 1, _N / 2); } } outAmplitude.assign(_fftData.realp, _fftData.realp + _N/2); return true; } bool ofxAudioUnitFftNode::getPhase(std::vector<float> &outPhase) { getSamplesFromChannel(_sampleBuffer, 0); if(_sampleBuffer.size() < _N) { outPhase.clear(); return false; } PerformFFT(&_sampleBuffer[0], _window, _fftData, _fftSetup, _N); vDSP_zvphas(&_fftData, 1, &_sampleBuffer[0], 1, _N / 2); outPhase.assign(_sampleBuffer.begin(), _sampleBuffer.begin() + (_N / 2)); }
[ "carlucci.adam@gmail.com" ]
carlucci.adam@gmail.com
68d134f96c2bc7b95e42742cd418eb00b26aa803
d2fe987156fbe19832e1e6c24d8fcf4aa9472907
/TurbulentMapleBlankBlade/processor2/0.1/p
b6a3861b095298034f2228690bd394fde7a769b5
[]
no_license
harinik05/BASEF-2021
d18ae164bc116d51b9b68c351b8159c2809ca63f
a83dee5d369caccbb513dad8df5023926689a71a
refs/heads/main
2023-07-24T14:12:16.730306
2021-02-03T00:33:51
2021-02-03T00:33:51
323,745,817
0
0
null
null
null
null
UTF-8
C++
false
false
442,761
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1906 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.1"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField nonuniform List<scalar> 19632 ( 0.03796812637991841 0.008811441888825579 0.0008641926029353593 0.002399364716950618 0.004430410470022491 0.02121391219930593 0.02215505585379899 0.005575731905599289 0.001449460629197132 -0.009580739278938741 0.005134641249430376 0.02117813667908227 -0.002932359309270024 0.004065566258668417 0.01409075290472463 0.01445250928350475 0.01342953303698516 0.01445455132949739 0.003642831382839326 0.0659140672840508 0.002762786671725532 0.04020859591358837 -0.01871256512056634 0.0135151862816899 0.007642590565363113 0.00275791924045454 0.01255242969593306 0.01700634231387308 0.004507477395802655 0.004437908260296806 0.0004958546895449818 0.01587770555864535 0.01237236610227174 0.01590552105702412 0.005638811055694708 0.01151173652059074 0.02620910273933998 0.004892043633766338 0.00956136856257191 0.004716069803187714 0.02951002079935106 0.01163141898968857 0.01424098457278852 0.02165648815147759 0.004911672700407456 0.05589543693720665 0.02028943003699157 0.02085956370716474 0.04314394958658196 0.00174918778182015 0.01203378405284028 0.002245839117020332 0.01003949172905575 0.04571904308763056 0.03019330116688696 0.04234048374214575 -0.00601031278363685 0.007925758069175545 0.02825990044611494 0.003618775843981454 0.006650017719603455 0.002332983981113774 0.005505228688790246 0.007792860640724881 0.0305059071465927 0.003333644073587329 0.03136735723244021 0.004201807113249483 0.003465607021243294 0.02557597326856474 0.006499523909229011 0.03571149197843135 0.03611512771742241 0.00771133777868331 0.001864565305882273 0.01845847515978237 0.007788284520279131 0.04104547422932386 0.03408931467311159 0.02901588904453393 0.07205371693571706 0.02353719088236277 0.03363364908598974 0.02206006319325394 0.04813143539949551 0.04985988368958481 0.00802479744058154 0.01107349801126614 0.09629497493669233 0.02140134168604941 0.008881699700798917 0.01492199397288973 -0.004549825153825006 0.00336090359251965 0.001403333068606694 0.007224518840974226 0.008041995393011349 0.003567706009218751 0.04594178939587915 0.004020315141415257 0.00287310277742689 0.01478015129440989 0.009536960142966898 0.008994899553135087 0.06744943665225912 0.002788280011130187 0.006831861179579974 0.004191138347256602 0.05780630101852129 0.004438921312237487 0.01928563757623912 -0.01909996233745365 0.02635861070857834 -0.01010279424124184 -0.02755910634525624 0.02247968124543667 -0.008427706320489649 -0.01216823420766301 0.02234321400908195 0.01916042545837933 0.02335805976169842 0.01443148071809495 0.00607706807879608 -0.02312419537189566 -0.02621204423571945 0.01925816520126713 0.01948143311114319 0.003242028734330321 0.002282327305351486 0.07588449752782522 0.08273381038478764 0.002434653740069698 0.02007448188343342 0.00226447473643965 0.00554773256030747 0.01233577846940558 -0.02589153432595279 0.01230140802779449 -0.0005380847382279258 0.01926685857444582 0.01308004347109826 0.03123351850462048 0.001394701736965154 -0.04675709719258378 0.003767183975466775 0.01918126330708836 0.001781071859364611 0.02070248164148189 0.01434184815026724 0.02866788170969274 0.004685408464865455 0.0518866008344047 0.02275625792172853 0.00275437926139157 0.02181922090522629 -0.008775130959498339 0.003455410323008089 -0.001484524564456623 0.03734623712300935 0.002480013538662238 -0.02034175345147265 0.01312263285547077 0.01636560736441989 0.01791760962523478 0.01831609772037686 0.07889146875401215 0.003138714477988182 0.01946136665461376 6.164533138177485e-05 0.01981625535625092 0.01341410234523333 0.01935969879629085 0.03437232697656058 0.004025777243547283 0.03515274605197232 0.06674012538618364 0.054383588986559 0.003178261817367793 0.004369360904523717 0.02678259131705129 0.001291009944185656 0.001210793908209422 0.005770635608380923 0.06915375898704876 0.007413432125614343 0.001025476784049787 0.0005092562849681057 0.002669169867061589 0.08171193248096104 0.0006784621393695368 0.04858042022468514 0.005712259980624024 0.004629284383011494 0.002971027450130006 0.01144749878102445 0.01091619830657336 0.001201260167825784 0.004962525574910549 0.003746284551884101 0.001483134952586613 0.002938651329043452 0.01018031519658854 2.391323390335625e-05 0.002415717718204206 0.0006215265685220222 0.004383093610425298 0.03720755552627383 0.00539047290540759 0.01767668037623632 0.002447083714856833 0.02668644786087757 0.009162005136602414 0.002252754144748739 0.002786227180927265 0.01108929685082221 0.0036948210422464 0.02049875239271113 0.01069972321469192 0.002689885328707706 0.008972989999349553 0.003809351208935827 0.0009599032640158767 0.01333606211424878 0.002329090650508726 0.002412917823024049 0.00371138211350845 -0.01938137385387421 0.003703935294529235 -0.02593642885229448 0.03422700680081399 0.0170195179102131 -0.002485821103797389 0.0003057051932375785 0.009314679087997615 0.002280139313694609 0.005997383249450318 0.002089724541121494 0.00574209555083888 0.004944576392320535 0.002127919027027469 -0.004961324468736657 0.004701423964620257 0.02959851199901171 0.01441294460721954 0.003616062478294656 0.0009350023830083595 0.01648680815475747 0.01403046982868124 0.007658705368474461 0.008384452649511017 0.001758871171185078 0.01105433475035013 0.01279868468604828 0.0126754893340148 0.0006224848583101437 0.01202322644165921 0.01242345393562257 0.003994065637386121 0.01640023550305855 0.016151775790365 0.01158461528583772 0.0324595762830091 -0.002044941415049887 0.003585022272453507 0.01366100362608647 0.002815710018971888 0.003272685796576315 0.005845338102836033 0.002492741600232962 -0.01018597817709773 0.005137180336291004 0.07898618991414649 0.0007256285830907474 -0.002753678554917488 0.0004590101804768024 -0.003647782210169289 0.002786527222178177 0.001400573572354291 0.00198561404869646 0.01625025840628128 0.0165474560471026 0.007853343427277828 0.0001123305162525045 0.005550008510697401 0.001866341669354468 0.001741349150439953 0.0367722996198635 0.002513747303621989 0.002582222914981541 0.002713390730332687 0.001468834965104304 0.003881312942591024 0.02119919627825679 0.002516968353562646 0.003690719207274531 0.01324424241617144 0.00374668148594029 0.01032841572200009 0.004936803818957679 0.0009637583656428774 0.01141830456547373 0.00378590000699171 0.002925815612632095 0.001001118667162776 0.01789950035518382 0.02220863173244098 0.000601911731053284 -0.01218403773562824 0.01740071134153243 0.01370465962402632 -0.004804703661418102 0.03525198808951294 0.01620581037024118 0.01681462839918219 0.003868216067423112 -1.123496366999618e-05 0.004469404981734472 -0.01759262273400723 0.0464131306676052 -0.003449243163455075 0.05469025777759101 -0.005502714111087575 -0.008914533871502699 -0.01080122134445266 0.04947489236496778 0.04812602730354629 0.05460226249538985 0.003871480705612295 0.004436268343227445 0.01171718021821604 0.003484768865802667 -0.0003772512465139532 0.05278491464470955 0.0517792919097265 0.003980198657439229 0.05358960075581489 0.006719694091286824 0.04284823298876774 0.005719301810348423 0.01603229961248459 0.04988030311870659 0.004012148173319454 0.01829721075558895 0.0211817854404022 0.04948258174755844 0.02468067934801362 0.002140850277041155 0.02144803108566807 0.003088147663306469 0.002366168906730538 0.004838133525820983 0.01489227979594423 0.003160642584721219 0.005797800135666854 0.04697592216564168 0.003173249847523591 0.003402632215323547 0.01288757581952392 0.05740270662564564 0.01128603585149043 0.005893375295659919 0.0043530806375393 0.01834187302272129 0.02423071852871172 0.01789833627144153 0.003169719945989599 0.003952062272828554 0.01575218921529607 0.004673424617135588 0.01472447237333045 0.01166999506893424 0.004890651965296056 0.01259021702924795 0.01025351357819158 0.003623540111450051 0.01859494873142483 0.002817993850047569 0.01379133681141623 0.01313558342727816 0.003942715673048105 0.007265135239104449 0.006481947101202837 0.03300552933553225 0.02003262989418005 0.001407290929508351 0.01161220532782922 0.009120867503953904 0.0585935204811531 0.02976830323171396 0.01806129310920777 0.006483744276111687 0.03570187129977416 0.01439168380266636 0.004635519136550155 0.03110088496128049 0.009214557086174044 0.01436095542743238 0.02214030220683453 0.03489696814661927 0.04696955121425971 0.0330470065584588 0.003518143129620329 0.006136182705818852 0.002899815452523577 0.0145111673100216 0.00587390170127872 0.05273747045335115 0.00530087263038693 0.04950962842150957 0.02103381941922865 0.007633102772020416 0.008636913538007825 0.004548782082403238 0.009888747927879131 0.005548951556831212 0.008395301272331969 0.00703515352951813 0.007649167467989351 0.02235252106745186 0.02032457911102148 0.01233137891975894 0.005673045344855971 0.002984759738503858 0.006411498267894544 -0.006238775709790379 0.002764050185476739 0.02113188125690352 0.008514646053512537 0.005679285626141359 0.01864646618276461 0.05442766092486961 0.006445607005981367 0.02065106438966634 0.05055955397831628 0.007068252042034841 0.009037419978125575 0.01362388374594447 0.02556291259955938 -0.005686014486765558 0.007820195247068668 0.001384195158910143 0.0002984202518756452 0.005886244684707451 0.007906783628470434 0.008525144514459094 -0.01025752459945962 0.008105201269143226 0.01787863189548532 0.004703888637375639 0.003625599789888837 0.004368060195226475 0.007916405992896239 6.150681899766014e-07 0.002263009987881966 0.007954484719831055 0.004205152975197769 0.0129478959198615 0.006436602381682218 0.003603508935914186 0.004190995273476194 0.1214765929304561 0.02257420775869693 -0.0002181767613000003 0.02148731018042627 0.03624272986844173 0.003994344987800227 0.005862973848567507 0.0002011989046971571 0.01004475594056738 0.01597031770932807 0.0249949399256281 0.02060689422882705 0.0141185553007147 0.01248010461062679 0.02933812901188298 0.03533767699246415 0.03115662968112672 0.01743570444372158 0.003110828003861554 0.0106153543356759 0.01912845819127543 0.01493764726393691 0.009513862309614946 0.004972909010480473 0.01438396441112215 0.001991580552224325 0.0003188968091350569 0.004892962468050491 0.006101774275015463 0.005270487882709454 0.00628779278657805 0.01740114868638227 0.007759859111693725 0.009614792596361697 0.001654297118511954 0.006001896661813598 0.002970428123006632 0.001445724644898845 0.0005716042996971756 0.008570503752724893 0.1354637551118484 0.003370716421498725 0.01684212589973951 0.0146195515601019 0.01629602966277366 0.01934700006638265 0.007540526795577714 0.01531194189366253 0.000817805383517909 0.01343472535419163 0.01369366032152502 0.01438724423773515 0.0105474740537498 0.005976733164142084 0.004289135220553733 0.05798844690020403 0.01626358951337123 0.01513501511124502 0.01426518889170754 0.001754837701777852 0.009205163291559872 0.0005245915369212813 0.0005693987312516013 0.001550183649348768 0.001596811887732225 0.0009847663997126692 0.0001612639396883842 -0.06070647130935636 0.02206707575377628 0.003912945348296593 0.01485949975123636 0.0304082367209152 0.02967388378438487 0.03239286988647515 -0.03010678919009837 0.07186270173301816 0.01163976882851916 0.01151292289882066 0.01347124637370711 0.0110293404171769 0.02585008771903838 0.03053042155750467 0.04133274409852197 0.002170890515605175 0.01934018595839808 0.02659798408792691 0.02490747994394676 0.03989038959121952 0.03894159787326903 0.02408534350080863 0.03120685250134688 0.01709631940164266 0.01772802733922194 0.03856815720408346 0.01736442302819227 0.01976911867705363 0.006172838898583117 0.01919611554052333 0.01910197224133289 0.01924196710485553 0.01826268821017104 0.04839998619891699 0.006712452283805778 0.01507161900965556 0.006066175282479916 0.016171412286553 0.004908808734439474 0.006683259861454192 0.00635947825524816 0.007010143823070641 0.008132778751746313 0.01535444332451017 0.007142580563549713 0.00636690927034079 -0.002515490583362326 0.01492535275949764 0.0005843551816493317 0.001695008161199411 0.001073549915500032 -0.001654054743701805 0.01954849845790036 -0.03131818884912481 0.001324839249462986 0.0014957502321369 0.01144268972353745 0.0210340752824726 0.01164677621251683 -0.0002470407835407454 0.008243383141818319 0.009098416437604175 -0.0007400438059258458 0.008992922736699226 -0.0006120948231892256 -0.0007806120276291414 0.005227902781381141 -0.005080973424646993 0.008427725573699151 0.03140104274374295 0.005438326870073601 0.005485471609285889 0.004285099660367214 0.003670839694593966 0.003953107250644765 0.004621180515166661 0.02094900575917249 0.004014558535516608 0.002606401179205843 0.04643730392170276 0.01115033145834245 0.00162759300251968 0.009735389860937459 0.001745368250356532 0.05774239734052331 0.0087563921093407 0.01412182596236217 0.04269288613976642 0.01828671287347576 0.01761228504205723 0.009721408655029837 -0.003414606652287926 0.02480716636033804 0.002305806475020794 0.001762649355158176 0.001616651119870348 0.002604454107520659 0.03481366405404544 0.002506764002471237 0.003237639145694594 -0.0003855910388800043 0.007502532196178331 0.006997342583339099 0.007978544673076167 0.008852395114876753 0.001686180113253474 0.00359876320189973 0.001052898122570048 0.01544340614748502 0.06283155938357469 0.03664798851174419 0.1148771034312582 0.0008517740192721438 -0.0005824816594611422 -0.02051351565180445 -0.001045577863115406 0.01424847494405381 -0.0003709737145454806 -0.0002459366371005978 -0.0006460102420067604 -0.0006623037935319312 -0.001169930459855994 0.00112508275923272 0.007449381085913785 0.007746090355196547 0.05786576025519259 0.0535675622218415 0.007082465087340148 0.007927349298765114 0.001247084075451806 0.006604710252705755 0.006959063758006282 0.006626472526770066 0.006272747974741475 0.006609989470438113 0.004673678012886625 0.002366789000505792 0.000408332774538323 0.007397393206981921 0.0008476871865931094 0.03425318360786903 -0.001369442819608534 -0.0005731697710595636 -0.0007137837309317633 -0.002425096819266315 0.007751002816594667 -0.001644379262292717 0.008260665502717528 0.008312238128725846 0.008589859500605311 0.03034630377858859 0.0005223527440186377 0.004721405167206143 0.008086422912200842 0.01019115241299956 -0.00664718700719976 0.008678993825157267 0.005835033447705692 0.007500783697897376 0.02511453886426823 0.01805445135109164 0.007219258200935749 0.008162533001555044 0.03354278755820873 0.006539247061793828 0.000296563045948772 0.007336666497369376 0.005105020196289923 0.002659510818982506 -0.003247153257041999 0.005293176301404054 0.005022212085606366 0.003663445641199148 0.05215282070202311 0.03031272652889985 0.005625575931499467 0.004396429543668859 0.005473964067653977 0.005255333027232279 0.009761800363884488 0.07987692418525515 0.03364707851405832 0.01887323356731262 0.02504403577510373 0.004902427632388974 0.005614169412632875 0.006806096652344389 0.003732693778087983 0.02198677972722824 0.004330431776125395 0.04326558924274058 0.006723595704789298 0.06280996647227489 0.01201354116415758 0.00208742893076525 -0.01680628198964704 0.01176164543807477 0.02320473995323688 0.001518030755983783 0.0008696710196913813 0.01107411167359906 0.04580462159474526 0.001241643355950464 0.0005656673287941802 0.0002560337630487448 0.03331316226188842 -0.0002828303708092982 0.002617183753717907 0.000322501192047486 0.02624722477250771 0.0206168458696649 0.007426955990951584 0.05952568205892449 -0.002499057467938374 0.00528240751226852 0.003870018861719624 0.003262288450207056 0.002476619734931774 0.02625425906544366 0.01233861695600937 0.02400842520625573 0.005761005870342099 0.00739904606004108 0.009922279250078067 0.003506087235867004 -0.003527480330184086 0.006626943687401933 0.001912491598693792 0.007854574038961075 0.001060998527599066 0.001661764404220474 0.1223522622905855 0.007184791210641727 0.008350387747752378 0.00145748454097202 0.02088304925589084 0.007698376059981701 0.008149687730175777 0.04456444778651014 0.006465841884644639 -0.0003788943484765114 -0.0009043242597998138 0.05770605554133392 0.02595305431990886 0.00146553051405119 0.001287932892824531 0.0009451725318853873 0.02285448826433467 0.005924681265633058 0.004636919274084278 0.005482428997682737 0.005550420325489221 -0.004283765886377753 0.00370851422825293 0.004165640703541675 -0.01608014398921014 0.1411910200960328 0.06873459611853286 0.06318453266664413 0.0002897992620326962 0.06305276649372631 0.07186496934266462 0.01198211848897689 0.11744076325942 0.007782203688037661 0.0717969008081548 0.02979372386237577 0.007400878007899959 0.007341536178507111 0.02767573006047713 0.02422897800423356 0.008989977774844209 0.07206074213627428 0.02248691034466699 0.03049191085608526 0.02137437811586521 0.02308481396036725 0.004465070005265128 0.004267491013696163 0.03005722936956077 0.0271491899009004 0.02364882244063129 0.01992769568275258 0.02289528055381628 0.08467281324891295 0.003394416283652554 -0.01688694896055302 0.003521677526763319 0.003570440349656051 0.02206556663663313 0.02818020900140169 0.03988748221721225 0.0340039801401608 0.004236008816092945 0.03955259081074496 0.03685205632413936 0.04247651296701049 0.05813967133847896 -0.007621195730154865 0.003556845115107158 0.01251262352879196 0.08719209295063908 0.05088485078830512 0.004519818502968406 0.03685696136666484 0.0737363163703777 -5.216200383523385e-05 0.003682275218922629 -0.007467039541697574 0.007555094936525528 0.003518496083567051 0.03415921975645411 0.006617353719059417 0.1235083919746185 -0.004134599415578382 0.04564555246878339 0.001603236542393144 0.001706413522252909 0.004361241418839146 0.002377349177092839 0.002004992402550219 0.1211408142005654 0.005350354269647266 0.004634243528519827 0.005564654603035983 0.005215603842691225 0.005616254740922538 0.03717001413960769 0.01996388552062403 0.007922162190101056 0.008469967967209967 0.0247881308585384 0.03034708351158385 0.1066571231803742 0.02400795135112727 0.1320070037265068 0.0242263927593963 0.01273384519820118 0.004419593494798768 0.002076642039488545 0.03860183845089137 0.01562856626901216 0.03232605285828517 0.01411464399585634 0.04177026726156954 0.04365755956544568 0.04353475570600135 0.04154017369753716 0.005426193519412323 0.05340291591574696 0.00781651167892055 0.008047079203218543 0.008068408901654349 0.007459831983658289 0.004054725492462286 0.004044788747633261 0.0281836592069162 -0.008727382763857169 0.007368014730058812 0.02361664992466238 0.005956853606416031 0.02767925022724927 0.04612246918425908 0.005491600575140691 0.1040894373147759 0.01845427353007391 0.005491758894995884 0.004095527990404367 0.003631680644770412 0.003160659627738835 0.003220090297735487 0.004843713926123603 0.004702267524193872 0.00493894188930922 0.005020498455096986 -0.01342037598808258 0.01160294646686222 0.01450332498805015 0.03541534915734597 0.06381675917315209 0.1382097390177564 0.06075858780131659 0.03197757014355071 0.004387607555367967 -0.02331352912406557 -3.217728624856726e-05 0.004569482475461412 0.02628589465488768 0.001549283261788978 0.001757561344978756 -0.004675047676100567 0.002811416224135529 0.002354137459025899 0.002383491315946125 -0.007967301086034525 0.002062532675811851 -0.03539342409210276 0.003012131620678887 0.04536114547225244 0.1111182068293154 0.003163639963542208 0.06749254141117275 0.03651369938034292 0.002825974977258288 0.003251557362706299 0.006563308585671826 0.006149024538584491 0.005588421964289349 0.005958076567732997 0.007865003772029446 0.005776406457271303 0.005523884938370299 0.003848359091063462 0.00611549608070661 0.0005623983299337652 0.006483227495224396 0.02915338511467394 0.05335640318177494 0.004141632913535342 -0.002828294769112058 0.03188454234628104 0.003962565212242562 0.07694771358496151 0.03457515895055305 0.02475913719483371 0.003687066390110824 0.004811257832961243 0.004704887630610252 0.004627961204410776 -0.01233864271436136 0.00481957095563911 0.004590212252359699 0.005079182948972756 0.004150819180909843 0.004794458384394295 0.05617879358624044 0.004258122219357943 0.02703775484412057 0.04531551025042788 0.004700631119256025 0.003954261381837076 0.006393253240384418 0.02328181543627252 0.004340687138262961 0.004275974495323946 0.004143002773975252 0.04938777286122376 0.04486398334647134 0.03566939455768657 0.04963374038363211 0.005553619803337319 0.04359827140431701 0.00595446143688827 0.04655605131310629 -0.01019910067274874 0.04672958415026159 0.03494250119044704 0.02715137153339716 0.05350342897717859 0.03516088131849194 0.0483070339640327 0.03087154886239149 0.04768234302295316 0.003035864498137899 0.003231955543164912 0.003396087059167279 0.002982050077111905 0.002995189436591105 0.01667372634546915 0.00335063347876459 0.004488651176493546 0.02099203305604586 0.03072178422013428 0.005653622155804307 0.03921365619725446 0.04452940802878302 0.04044900764429659 0.003814597973037743 0.03966380885155218 0.004291235756618003 0.03392638525124193 0.003732631764747119 -0.002870422566264089 0.00256774214984335 -0.002117143624892524 0.007473137714642476 0.004750195973333215 0.006976747878594723 0.07264144635192797 0.005984267364023211 0.1048176961905831 -0.0003274146630506936 -0.004478085190154279 -0.01984211990365177 0.001247087371217156 0.01252179638488794 -0.03136849558354171 0.003248473580612141 0.0298297140963198 0.03349403647938487 -0.03039508985198056 0.07961538235206345 0.004716194863824988 0.0004333039208026844 0.006274345876217767 0.004022484909365945 -0.004213943464806492 -0.002807662296388418 -0.003242935859393987 -0.007503727703709308 0.06159971230037698 -0.01559678883778891 -0.01152296137827869 -0.03494226185638011 0.002145293889458498 0.001490211220507798 0.005372589423078975 0.003817081262772619 0.00438784245507172 0.01421189383482406 0.00363220337251748 0.0008567804599186915 6.484876760766535e-05 0.001545991645807859 -0.000908017727211428 0.0002685965316184425 -0.001657908199833483 0.002364478093362336 0.0007152972222129676 0.003140687860858967 0.02691684711642536 0.03320191676983905 0.0280583705831745 0.001446150614674778 0.01867390051764835 0.02050792167159133 0.01546963980469286 0.01484855917122714 0.05079150560528534 0.00537739264001766 0.01792924083126545 0.06500005265674741 0.005149503197383672 0.004694665664463667 0.004578980948131292 0.01825865574645797 0.01755463400805777 0.005233782314226519 0.0027451164925539 0.004385719796888612 -0.0002610034998368876 0.004886707065928234 0.0242090751041573 0.01838954231686081 0.01838629213944068 0.01602146841043917 0.01633820899515646 -0.002262735020997833 0.0161947305222288 0.0172365868607892 0.01085526004984304 0.0110692418129055 0.003776874862923339 0.004832103216645434 0.007731725655516533 0.01155057147682362 0.01467973606749948 0.004023448208329189 0.004028077352936829 0.01273663183857155 0.006620579429882547 0.004284203428692831 -0.008161884474060086 0.005913296716638356 0.01665950765757487 0.004175206320444127 0.002185106592044378 0.00130446093722825 0.004666251495219019 0.006268735698183942 0.005106626748810125 0.01252451855821754 0.01192278173355903 0.01166563431989478 0.01514807361621528 0.01286446822211542 0.01282612935220346 0.01319311765160243 0.01279280684329842 0.01926181452878315 0.02291490476471108 0.02106325627330616 0.001271844429680446 0.0008298796733825747 0.001215582956892877 -0.00035197108884311 0.0001788713609447753 -0.0002442024583216143 0.005498553503521754 0.0493026647271877 0.004416983867992134 -0.0007617565107889897 0.002419123568176915 0.004205382285652171 0.003048484373702759 0.002662482488688056 0.00304322663613321 0.002655920316663846 0.001299161984689066 0.001193710162294618 0.00443972020563733 0.000812855692556775 0.04767830721903445 0.001432579110291475 0.00375043436066969 0.008412883870488197 0.008492195845027204 0.04311656009475492 0.01339234944990601 0.00508704176449252 0.009541790912397607 0.005179458238753282 0.04399729790485498 0.05127543979981169 0.01577060339294768 0.04210794438062442 0.02313675699816521 0.01339604065069166 0.02561082740449355 0.05724695451729933 0.05736756971801924 0.06061442281476877 0.0570409056340928 0.05353097207450359 0.01422297988670635 0.04816628416382124 0.04943078843506984 -0.002130374599780882 0.0002767038054319699 0.0006088921751841583 -0.0005902453281887855 -0.0006090625642010797 0.004183902868510058 0.003412364700612848 0.0013574272067318 0.009056285306387288 -0.008390857834368602 0.0255738110560932 0.004326280878974597 0.02335072868392316 0.006937639363850479 0.008964482150428778 0.004227798845769281 0.001156296537556377 0.004607823000176556 0.008313409476610363 0.00709917598370475 0.01150240202965839 0.009926370318539417 0.007250300991404019 0.005753957950861021 -0.03370167456794388 0.04177861051956855 0.04103430769404719 0.003888358109786359 0.01567920918345463 -0.006986781474424346 0.004096720517916503 0.001157195286884239 0.003857968770714697 0.00159919620452028 0.002895510518238961 0.0008667866901864933 -0.0004467858857778484 0.001128126975502018 0.001620628771439514 0.004317515088102393 0.003310842158348211 0.003005218290414062 -0.004369277388791236 0.001480800002868682 0.001606576283682366 0.02627086004138514 0.03047452351666489 0.02978620370306941 0.02542000329683284 0.02568485395211741 0.000366642047461875 0.02345608328871586 0.02360592795860912 0.0119726845005169 0.01328253548856694 0.01911316351303185 0.02495459311693811 0.02268106104661374 0.02551026571055885 -0.005409987107162675 0.02898894501525542 0.02991856834852947 0.02898223081602479 0.03387768961113272 0.03315094774300804 0.04197500428936714 0.04219173044625686 0.04700416832818113 -0.003038567569065445 -0.003690687139496906 -0.005535275480475854 0.02358395336296846 0.004117195142248083 0.003567284338525644 0.01195272873643673 0.01044440598652894 -0.0008422912341570086 0.002699100019838376 0.001803612000194042 0.001489921487074293 0.004392200620359049 -0.009172851203777976 0.01030985650763189 0.01163874942542317 0.009081233871806586 0.009493680927743723 0.007803108659076827 0.01966979217205449 0.02616579471282302 0.001149853129601593 0.008544025417268879 0.005954345490850117 0.05471345723259924 -0.003574526002565007 -0.003631996592632637 -0.01324186521926891 -0.004455494514356591 0.0008623418257396679 0.01139792773775618 0.001702804619095922 0.003464924079268895 -0.002014176185783108 0.02797244710635129 0.01224855353453976 0.005035359309438951 0.002343710920421993 0.01224479893094883 0.003346996977150076 0.0008716490296686774 0.0003980098960398907 0.001254174178963621 0.01277206627521733 0.01464767712442852 0.01484437197753629 0.01105495945411122 0.01155682320193158 0.0120024783858929 0.01636556532810598 0.01600018139579102 0.01526655721896421 0.01469140252049868 0.01635048863916894 0.01678175570608998 0.01111286084892252 0.01102072336763681 0.01090998822109527 0.01027276358448054 0.00925985205414433 0.01124224737197916 0.01186844580017667 0.0074950644564212 0.006850320417708523 -0.01774774617166053 0.01063662005230842 0.01064057946921911 0.01148632154610267 0.006829443223213412 0.006185161676724221 0.00768137150602046 0.02453016697569816 0.02181045040691371 0.02225459745071187 0.003065646750568997 0.02304441471790915 0.03545085584738942 0.03578338852646858 0.03755274268727121 0.01246097212284716 0.01268866853530034 0.01263254941573324 0.01489740908928905 0.01698694122602332 0.01509266345490414 0.001617264014269128 0.007238523954030776 0.008483927027664201 0.01047385707448633 -0.001572789144499104 -0.001510604819565015 -0.001489405100743439 0.006056749412591058 -0.001703479234505423 -0.0004511533563324711 0.02674927792610801 0.0146680487743493 0.01590869395320452 0.01613655304248269 0.01590749369033195 0.01487335035114919 0.01627500737072003 -0.05316044218553374 0.001973685619643189 0.0009165227665928982 0.004424998391175354 0.003679804267690245 0.00407111514512397 0.009111690669305545 0.003483003998531896 0.00566409982466869 -0.02417864398265139 0.01009240697426695 0.01112643997531771 0.007875606431301233 0.01149831285072778 0.01168920073858 0.01135645900719236 0.01181122436310204 0.002954621504419245 0.003643053293264629 0.002969204241706162 0.003563927526995389 0.002377120873373312 0.006021573279807985 0.003682647506509931 0.004238751060217701 0.009904141263693848 0.003329039006294793 -0.0005383533371476639 -0.003150961073088224 -0.003012021789797805 -0.001040995001175568 -0.0212229021123132 0.02082211554236284 0.01723808362045183 0.001126758035637091 0.005204308040994422 0.001626684833827061 0.001379355936160198 0.004102904398994116 0.005258756839762541 0.004491461424934219 0.00444991524875919 0.0004490420799789393 0.04230979538659368 0.0141192153187552 0.01316025136389326 0.01199139220953913 0.01094718779249554 0.01229379772061896 0.006711403679158645 0.003232521291691856 0.00336940629609989 0.003982175809538288 0.003868175735127395 0.006163368084010083 0.004908226348999966 0.001268250194032728 -0.0001238085946121747 0.001248480891477691 0.006944563447574693 0.008595904973945178 0.008163787733082694 0.01067622271669013 0.009471302880457057 0.007577421317649775 0.00363833511324176 0.002724454781409502 0.004888855637178097 0.004922969581825547 -0.01117016433617633 0.002740317967960359 0.004311667987617304 0.003785453031424668 0.001662486683882334 0.004357387354649879 0.002183837423375022 0.002119809224624792 0.001526633931977233 0.001088547034230518 -0.002941062867506904 0.001016979802391696 -0.0008006799016963284 0.01061212780906453 0.06027630807541872 -0.00231361952781861 0.001717231921201019 0.006623572232427884 0.01099001637958592 0.008307113696033172 0.006180250307771386 0.005572759398991965 0.0185948784475748 0.008355089078018223 -0.00128840213080909 0.007145199401425785 -0.004106113489825595 -0.00674737067522409 -0.0007131298159957285 -0.00127371790383934 0.01317539740498441 -0.000546625746354036 -0.0005325351871846382 -0.001663061534162209 0.007686064762936446 -0.000638626155622922 -0.0001771820637746835 0.01944452005674856 0.01685964253742058 0.01747255407910854 0.01732948652760712 -0.02951687680266449 0.0133474454079741 -0.004929233046861378 0.0148619302842687 0.01441063355985927 0.01641259179286198 0.006859214003107224 0.006301391664216432 0.007306813931184645 0.006673023909660512 0.005443348189365065 0.01508366275286728 0.005404133706807746 0.01477837544954558 0.009991714124077098 0.01011072245869704 -0.02163291688336925 0.01171681764317163 0.005999000082797557 0.002614767305755964 0.004811973663513844 -0.009954236454467061 -0.006812633363792318 -0.005404261016676211 0.007801914519534812 0.008363887484525481 0.009129541600803681 0.007626432751691407 0.007131482554777885 0.007628908363439123 0.003566851478423688 -0.00041160400003426 0.00691238687798106 0.003308018197658818 -0.01014505254032897 0.003086068621043775 0.06062798860384856 0.003655966937402147 0.006819099740633326 0.00723295911386204 0.007561245503185352 0.01435924290259663 0.006725764777138695 0.006711990900012997 0.005374685813384943 0.005525530821801757 0.0126647284465355 0.009484722895122227 0.01184989663212793 0.04151738894822221 -0.0008844922782127609 0.003968309718150555 0.002814684712093189 0.02496052486019758 0.02521814768094117 0.05528684364682943 0.0518912188431131 0.007693751103186735 0.0401532702815699 0.006138529693148852 0.006260851420285195 0.004920792012601418 0.00576180778597702 0.0364876307024822 -3.592563337157547e-05 -0.005858964724294718 -0.05016028137824826 -0.007784817746793418 0.06193485790698491 0.005737160188803527 -0.002500485890524625 -0.01171840321526205 -0.01473990982168947 0.03980282672222489 0.03348398793411963 -0.02133514142790255 0.1055950638870357 0.004037647424586011 0.008119723054845093 0.01035496698732054 0.001702244145688584 0.001818183766581328 0.01442680973097382 0.01614463826172562 0.004821198900345505 0.01626380222249615 0.01411575721581084 0.0133290117507488 0.003064484294365492 0.01377941729905288 0.021357861287387 0.02010217671155409 0.01690873355667097 0.01894521779341007 0.01891625818356012 0.01444916701709311 0.01472710173218245 0.0139166453025683 0.01385690442353631 0.02974236258086494 0.02731294345688972 0.03042782739435374 0.02814172112179905 0.02605249058377413 -0.03659462110175164 0.0175045213514078 0.003310287869381839 0.01065945237693966 0.009820445781853808 0.009194450332692434 0.0275027822668432 0.002727474452667667 0.02960793859621945 0.002588311621506999 0.05856419542595337 0.01212995264767399 0.01231281666253745 0.01315064327911664 0.01348737042262295 -0.01615504991277238 0.01027860117646278 0.01048492558891853 0.009882305429524374 0.01236012975093347 0.01221865294274494 0.02752297566395733 0.01327312175737154 0.01312786076420128 0.01415274899000418 0.01408571186820032 0.01523871643774115 0.04334244859345462 -0.000788905994107045 0.0974689278515765 0.03802136674317544 0.04035461054313829 0.06258381711235524 0.04412784233186869 0.0480085619598512 0.01799181847093618 0.04107805366883909 0.03924716209183008 0.00195398588789885 0.03060737608817224 0.001536369770728874 0.03153793854876864 0.03235551884235614 0.06115483032778458 0.03320655351145028 0.01310372840682661 -0.006087950709064437 0.007333584503245789 0.07258928727786072 0.06087370515678481 0.04408866593236072 0.01292059004167139 0.0144248185216359 0.01396789815627628 0.05316963564144599 -0.01066585410600383 0.01586812188527677 0.03233358905165813 0.01302192050270866 0.005136144218477036 0.01686056230844533 0.05221492737801562 -0.04111501569974923 0.04166077340803679 0.03239853249388374 0.03595241077741881 0.04266135396574206 0.01194310071428081 0.0115942228244136 0.037103011356547 0.01289051450274985 0.01285371442615762 0.01806159530647875 0.01884882906213111 0.0188167645394742 0.01756890700852693 0.05274698059412432 0.0520711886413398 0.04932346264195824 0.04761344497059899 0.005887095686276923 0.04520280299585346 0.05463610816196881 0.04108346553722473 0.04447125979758168 0.04323502740448854 0.006850443785321739 0.007185177367005476 0.00566442296668327 0.04441699098687295 0.01945860543284712 -0.04909194425740527 0.035710872637787 0.002589135685191023 0.0338258573983382 0.02357008751652126 0.02687039754884792 -0.01047098054280658 0.04142861569723261 0.008159765608556448 0.03343181533725021 0.07007468262020783 0.04836681962787526 0.04744569921573294 -0.0160542339888132 0.02148831795072524 0.0007240052454174464 0.04466432496918078 0.03799320019515259 0.05793451986109952 0.08982452433950157 0.06640078124957295 0.01196124832125313 0.04291303327084526 0.006990198442733 0.0174117994390173 0.03047368241254943 0.01057955796844945 0.09473397632602325 -0.0230642078665289 0.01175400446870811 0.01153553528688949 0.01641780242003879 0.03536335835943841 0.09772167577031413 -0.0008179683289568166 0.02967043550411345 0.1595314698232166 -0.008265332700428726 0.1188660102652899 0.005127298203653505 0.006148827229615046 0.005306919988882379 0.04516436828869175 0.008438017113998142 0.191943581297653 0.01954488965817497 0.01165091804259139 0.06728115928773803 -0.01971140694368818 -0.02814400451890613 0.04753199487691436 0.06839303764555711 0.04725041964236559 0.007981470813514961 0.05290695969729974 -0.01977004026831688 -0.01633950790430727 0.0294704190425329 0.0121905875381181 0.01401721331868239 -0.01976948646914525 0.03570724476052366 0.0126489323247998 0.07050555752777427 0.07861148681722054 0.02105722121540199 0.01755428148954175 0.1654698322362384 0.02181962051636524 0.0403950566683788 0.05435442841518176 0.004435104656665021 0.01986227733177526 0.02364420577029778 0.01520353349718767 0.002083629169740057 0.06131416684916963 0.04567833890050234 0.04602055306178621 0.04788707317022109 0.003105718525933732 0.005011581319427636 0.0003262431555761668 -0.001200616294741178 0.003910641085309947 0.08001248562443071 0.05242734587355715 0.1067176950400162 0.05631947177860187 0.01497710849449801 0.006798724424052229 0.006613722183926525 0.002974815080965549 0.02857314534222776 0.003397408237457104 0.004261846433481612 0.05330409684974167 0.02554097809082509 0.0863085255771092 0.002289359568660023 0.02544992617783093 0.003506930860061563 0.02383843470122377 0.003986301417865781 0.006521677259478114 0.00701848198701897 -0.00408693160851381 0.006621790484056195 0.04575647189392829 0.04124359103016523 0.01492981523589181 0.001083857463626612 0.0140819205364948 0.01305529202852611 0.008606970549242051 -0.003307210842627376 0.003102859020073508 0.005070623211366953 0.01333661844149649 0.0008895438546415348 0.00777088224555933 0.0252367743165114 0.002772351133389858 0.0209312803957887 0.05761635884717759 0.04987877437785537 0.03752994487834706 0.05255317828718215 0.02240888817843578 0.01728402620496856 0.02281663777090831 -0.002620252898402585 0.1794436528267389 0.005879651192074173 0.1264324248091244 0.009010687780669867 0.01001619684428594 -0.04275329541884165 0.01557971510951157 0.1457179015083747 0.04899771987392483 0.02126843791553962 0.001035099672724759 0.02179476353135425 0.07221025731642949 0.08293657746421189 0.02070950767745227 0.02112269943728584 0.000734005359935807 0.001337728780756418 0.001926534707656173 0.004673291327433678 0.004346073891030569 0.04886252321664212 0.01000054417882239 0.01124075536361625 0.01450105455917299 0.01546767344265418 0.01519046142278817 0.01322473108623779 0.05856321020602475 0.005664430777339115 -0.01444040897291514 0.05247268964002336 0.05920576440391644 0.04537309968066281 0.03386195459550329 0.0104309869267382 0.01177857082589834 0.01155455307919433 0.08445126362534043 0.06669917920708489 0.009475819459292864 0.01948664750376476 0.04844043337523033 0.02032748220788277 0.02221690664091954 0.02158971144181976 0.02856725911909032 0.03439141183608976 0.03372893321135927 0.004615707090529624 0.0320640803655273 0.03166442867380427 0.03298273001862902 0.119924116203677 0.002889855953076904 0.05021664772322135 0.002746993064129935 0.03506382279308347 0.004871029729258396 0.0301561541130377 0.02808533087754407 0.03003823509619324 0.03403349466583808 0.001673940048692435 0.01360534465710693 0.1463151419628437 0.0796253962147415 0.002405862263640751 0.005015650697401982 0.001850719898632041 0.002157030087858239 0.001822505398671366 0.002763654611267647 0.05150849650226549 0.002255014030486677 0.001339208227334514 0.002043137150969504 0.002698909938306476 0.002057505436037252 -4.185229730814565e-05 0.1738687342502815 0.06761168838889015 0.003486932023783452 0.004820611044361485 0.01179883526400521 0.003456655269665625 0.003901338010781555 0.06466168449744239 0.003699315393581428 0.003539293221709895 -0.01182613340925672 0.006375536263567107 0.06382014959052125 0.00177383915725008 0.05945081246518176 0.05246638247792088 0.004552963538031475 0.01993529182060201 0.008369037826376009 0.004433010120763575 0.004680830445834854 0.006800177454544248 0.1106650323203978 0.004860299905701346 0.03466139244975214 -0.0003827903780990308 -0.001202654656043601 0.02377156902508928 0.01150568931966201 0.02426394396244819 0.0002532171822187522 -4.081369084253538e-05 -2.766585227985746e-05 0.0007885097515241025 0.0001769433565017813 0.05605035628524057 0.0004599526082130038 0.004587607163284544 0.004704075460667858 0.001945420638828291 0.01524106802147586 0.002063028129089465 -0.001124563434602396 0.06671434446771041 0.05174255921790529 -0.001779825403614481 0.002032976414643673 -0.04006636214505627 0.007345491170466645 -0.0007478577822884945 0.02721725867394286 9.766774975666029e-06 0.003946478889068155 0.0036980019261421 0.003422931873049136 0.004030963329509659 0.003717870235102764 0.001752708889797712 0.05012917051256684 0.001290040391621306 0.001881940293862307 0.005147229547749573 0.0006045839462993797 0.004736043097568631 0.000116468603930602 0.005403363180062129 0.004746382033629318 0.005049050052856392 0.0007260049266465338 0.004312509847454809 0.004675841512636956 0.004973118279372414 0.005276654130585596 0.005396079831965914 0.005029785662488065 0.004807300910445214 0.00471830467362054 0.08877702192276048 0.05561712966077568 0.004253359962636152 0.03716062753927481 0.04454759186724735 0.004472581781935592 0.1857155236225363 0.0001348961275966639 -9.18277836905956e-05 0.004725655297659906 0.0002173281259932288 -2.123798708120593e-05 -0.0001608505369627855 0.05591887648178295 0.02871590639836008 0.002853199013751321 0.003313160048368992 0.003437212187234574 0.009007991782029604 0.01223053677402108 -0.0005095229596436936 0.001108167276663932 0.007039638200614119 0.003874338907770806 0.004569883056611121 0.0003087275855703646 0.001439143259231933 -0.004086065390502388 0.003894330597402203 0.003514307426722151 0.002154194160471269 0.002864712120950682 0.0026829381628067 0.005815734312918899 0.006898215062526903 0.00396968889893872 0.006541650670957268 0.005977403249832905 0.003115179532988022 0.04914015184008114 0.00459599470609655 0.000538087297731306 -0.0001516511584271189 0.001261516259257071 0.00750537264875688 -0.0004239973676880513 -0.0009692673487260852 0.007547342406519536 0.003175100679777134 0.005735758139830818 0.00775429011397397 0.01099648212843275 -0.001683590936985201 0.00739494616700458 0.003760166261771557 0.005104633342328234 0.00278656231929672 0.05960555594160807 0.004669504517268512 0.004862785973551789 0.0004426876416773001 0.008176518943432527 0.0168296319261446 -0.0004591704466146063 0.0151986109241504 0.02033681438727081 0.00122968564959556 0.0108129242019962 0.0004070188734799721 0.002927932532770596 0.0004481178367788 0.0054160183008102 0.001273504863374078 0.002314547676795558 0.003070315065023427 0.007743212563975113 0.001139159870208513 0.00592092268866882 0.001073680960275813 0.01305393208192867 0.002540641055390889 0.002852770267408924 0.004835659668128967 0.004075548717361582 0.01735261517494775 0.01227879124782089 0.007546387635413926 0.003621039161361166 0.01919400602137309 0.004311296069931838 0.0328540208720539 0.02768927581145702 0.04442418544179746 0.02247144657153701 0.005068444743973765 0.004487656590581932 0.004333344802059547 0.003212695840441689 0.004988775079258175 0.02650780669474091 0.005168928935645217 0.005199499638874882 0.002470914993758416 0.004821066985678119 0.02104130362529598 0.02722921450418631 0.01727568314890741 0.02094209704858477 0.01022809883804117 0.01955996807083683 0.001973664979827276 0.006397665852096204 0.006920808604451364 0.006463698604778765 0.005913772307200337 0.003881626315768985 0.007363602216841647 0.002843145569711827 0.0026900444844728 0.003092297016568559 0.001653681360675947 0.0008020023217167063 0.005264304458334212 0.002186989223419652 0.003385285152372749 0.0009938025299891463 0.0008409615205656867 0.003858362139646633 0.002431453444516133 0.002361933260394482 0.003200596701759957 0.002395973904951947 0.02639523187424119 0.004080841856912745 0.0004862611029089921 0.003047795480325752 0.004146525582442789 0.002472318792790875 0.008734662818946545 0.00231877332587558 0.002428531909975775 0.002183936675704799 0.000817277739990027 0.001855652241272124 0.002514536957547753 0.002084983588416456 0.002446390620895599 0.02541359082208496 0.002744164565185515 0.003444960368227617 0.003597388973485906 0.003367012797865772 0.002792941526461193 0.00358951194854165 0.003504995236271776 0.003605321759932714 0.003377432115533857 0.00460708050555871 0.00452755248506487 0.00621032678813262 0.000592892764916657 0.005771705526698815 0.001299707041187263 0.007034226744984927 0.006734566419970883 0.006978428490075819 0.007307206032009407 0.0004829191851259391 0.006600612771822004 0.06219508370242986 0.0226114914526581 0.005308619505773867 0.01345416753595219 0.002286880442886303 -1.322685105894517e-05 0.03216678099655506 0.008281626621659629 0.003404342898858374 0.007328437772298787 0.04798980017495406 0.005274091308007347 0.02659211775686159 0.04227931418321817 0.009277058005437242 0.02563111273374889 0.02305121418112336 0.006525773367791809 0.003475514243480738 0.001941318803212254 0.003226783291338851 0.01598659200778024 0.02350934816213529 0.00730008122287827 0.03342180759020243 0.06534678716665009 0.03798553041747242 0.007694855370952374 0.009321127089039625 0.0001188493971427413 0.01287574323461124 0.008900724179901379 0.003326865167703703 0.00859054061612732 0.01194798745392556 0.1423593293122679 0.004595448901395569 0.009954361482045263 0.02563531433569016 0.01886482021571386 0.06458583931459524 0.07477593574800336 0.03327103695454907 0.007250912225042856 -0.000475516885321464 0.007502321246727169 -0.0003857423378391287 -0.0003345168281080229 -0.0001716274803326007 0.006794849158208451 0.004160446537721753 0.008520039544698788 0.009558444469257974 0.008311790243428633 0.009088211359718283 0.007991545670029127 -0.03522725287561012 0.06782371302380259 0.004886398816450795 0.005330817697451144 0.005882115693656589 0.00731603967696101 0.007741426918373837 0.007218430960815537 0.05745254239968559 0.1170332946235777 0.009760546940883626 0.007805705713162216 0.1217718577357127 0.06580546330794315 0.008872295594884278 0.004259280605090614 0.01968863293312908 0.00430196512473251 0.004394789445030895 0.03490965006872453 0.00589804231742982 0.04306994198829077 0.007060606808713481 0.004906632319669976 0.03087388143346722 0.005632837231307255 0.00320020774903975 0.005489046641780317 0.005168961384671824 0.003114398669027941 0.005550984632395995 0.003283592838362764 0.0007064564474591078 0.001470917470585531 0.003913099820657535 0.003330507052203896 0.003551801638122313 0.001266496218326559 0.005749431054322839 0.003548464006366055 0.007412704633971562 0.004335305333214339 0.006569664373821445 0.01018383293086153 0.006044276555500661 0.005957389660098907 0.004094357277092574 0.008684348802031831 0.004435736228806252 0.007549569526754173 0.004540856720842689 0.004293000549445142 0.003957359395697268 0.003428693982524315 0.009671653407218872 0.05190310780141977 0.009195809455228229 0.006301037630268651 0.004482360638965119 0.003735711488029176 0.002923729879829853 0.004734299161208591 0.007275770055428274 -0.0009817201754246377 0.003370513962606334 0.0194870623139599 0.003964617228497542 0.00282988335658355 0.00989983053866487 0.006453778013772752 0.01603769330082206 0.01035433687888196 0.002197918539679416 -0.005204535378993617 0.004080987898378308 0.006284778557611427 0.01032035411807153 0.004666259920405417 0.004117956969922826 0.002796498258759588 0.001930780167014793 0.002445451844841306 0.004020722190358888 0.01000122089802005 0.004376388753988669 0.008740079506021681 0.009398980826047499 0.002767423635205151 0.002052795131824096 0.003636879602748683 0.008553726774861466 0.002696744415999049 0.003162205493353671 0.00307175820795346 0.003537993285004632 0.01579561298131361 0.003004265031557323 0.003021008653138277 0.01251751473476271 0.004359291797956791 0.002890869310050745 0.004483641783103755 0.004490295459746416 0.005230087111919504 0.006648847110382941 0.004278535942057183 0.001460770879250722 0.006816996750473439 0.005352342408249252 0.008804572574958957 0.001522564122292731 0.02402952130784005 0.02235218140315186 0.07589383487858815 0.006252621351554646 0.02074543151656789 0.03199144314349633 0.0006205151983005145 0.02388463820743787 0.001330766385155838 0.0009890032355840109 0.001411919949630765 0.004192157815455322 0.0009574905458777983 0.001140301209770028 0.001502722318170415 0.0003220700431348208 -0.001027003219242201 0.0009200587387513107 0.01408260866367996 0.0009606261530597972 0.0003976108060521725 -0.0001630094917710593 0.001766233841948619 0.001846506606839647 0.0005608715290893302 0.0007483990185144642 0.001098298571427621 0.00092628829162697 0.004560005466236952 0.002374752209971967 -6.303708593690385e-05 0.004245222406707926 0.00205467590544644 0.006335499484160187 0.002674803793879158 0.005747482613297522 0.002565236454170702 0.003978310557677919 0.003487146121222676 0.003335853683298506 0.02702843869572401 -0.001539213081243405 0.0008382548682982116 0.004805385258746498 0.004021349498350176 0.003538523397913085 0.0240252923299159 0.004955573163507269 0.02609219242000548 -0.02530990862005173 0.01025560414634397 -0.002022279195036631 0.00392651330962708 0.004299228133443406 0.004314189308658677 0.0029210445800219 0.002776743566615474 0.003553257729132349 0.003356363605140349 0.003437397215550757 0.002534090153337331 0.00133445617579895 0.003543898389412754 0.0281189488185451 0.006504812339614387 0.003666639573177087 0.003866341245877523 0.00404895013725232 0.02345567869193014 0.004278232987432591 -0.001999786670252599 0.002332638486757015 0.0007313378626994083 0.01046079845107872 0.007168336244085857 0.007123547540696909 0.007610753211001434 0.00743347909271237 0.02016846625550863 0.001940262816122367 0.004325440131674353 0.01038452253386061 0.001834908172997116 0.003218632481052931 0.008000457375639328 0.007511690966460545 0.002954458612749919 0.002749353245041155 0.004246386768131017 0.002936387252233427 0.006275059699785989 0.005983303461621852 0.0113922502827711 0.005958862943761557 0.004173036303539274 0.005049062796042679 0.004524622645832328 -0.0008197043249562535 0.005193728900312482 0.00799145016451978 0.004278418068200879 0.004473769462509435 0.004206172675939621 0.01294612437478133 0.003792257287041295 0.0195496132226697 0.02139568581672106 0.00473257822462948 0.004687592949264178 0.005070373997523655 0.002562029565996257 0.004704000006527219 3.678714792169095e-05 0.0006319355021618902 0.004685189601516843 0.008702208066379126 0.01159894453472075 0.004337419048755359 0.0009451274470731822 0.0002090981851258835 0.0002896250836491297 0.003517808622326295 0.005633445743870187 0.005242396806000811 0.0008806514516755381 0.004332871704431173 0.004325388413429308 -0.001848370425460537 0.02658401572362428 0.00707200476403454 0.003837166896800844 0.02294575182829662 0.003545357612264987 0.004025681842077702 0.005952809040410616 0.03187605787236448 0.005133554944036143 0.004450386705048528 0.002800829957705156 0.005794571342976444 0.006026064630271975 0.006268691747195776 0.002408062870017661 0.0004574961681393844 0.003409252863093499 -0.0002612293755865827 0.00378912698140784 0.007373249661552068 0.01521118205999183 -0.0001744820541610114 0.003791257872932807 0.009706163143341127 0.007341860479525834 0.002893128831297909 8.410776912665269e-05 0.01117838357992515 0.004291231556699366 0.002021000426873025 0.00198548809731148 0.003736774245068151 0.0131999481002476 0.01378559590036695 0.001027798180732194 0.01986055957134187 0.01168570730558049 0.04988159484423284 0.02869920093543675 0.01619702525225288 0.05702707740975569 0.01656900261408926 0.02493477815284287 0.008988861434131893 0.003486639180603113 0.0249657621177823 -0.02009748184591312 0.01675382385166077 0.0004889730021889479 0.01885169194089501 0.004215903594131601 0.01917090613639596 0.0007478904425899734 0.008068622480394324 0.02252369356903261 0.00380277564563108 0.01688935576279648 -0.0003085401599342661 0.002825701476900758 0.01264586816108606 0.003678094440485464 -0.005196359742839622 -0.01816961535925785 0.07481089144396291 0.003473949979496218 -0.002088698713170435 0.003050687044898311 0.001700039780017662 0.01431662484336068 0.01214700351973024 0.01370453445533903 0.007125800911575153 -0.0001898263825909724 0.007941329014465353 0.01398299872140045 0.02005577974020769 0.0006102307210550619 0.009281670743321998 0.05653957656991859 0.001889953728149867 0.009467180846771339 0.01802671083064217 0.02966452767580819 0.01085695877869388 0.004755170056350202 0.01308017375481151 -0.0003520305754902892 0.01316967868573185 -0.008014933647293554 0.0009490404960625504 0.0003259307113277373 -0.001445427390283114 0.002798969409327403 0.03137845937556673 0.004421735599326194 0.02269124710147427 0.02808739725967881 0.007366232623188365 -0.004729810567477733 0.003898678449961686 0.00580913212637831 0.003743322658933314 0.002786372145415932 0.004605155418913263 0.001696383779681479 0.003085013809783454 0.002715928931291759 0.06816492133305638 0.07989909189999242 0.08565631698324513 -0.004691459138561861 0.002551335031149076 0.01461669170674484 0.006402278639434402 0.003110573063856968 0.009050402353309835 0.002867130371922967 0.002738472234196755 -0.02052911153746866 -0.0001260115996676556 0.03504737545110505 -0.005631754028420659 0.0003698073061823458 0.0529280770636758 -0.0005838060042058515 0.03862465404855083 0.00244600021842434 0.0359423890039138 0.006759740001553095 0.01805295274928306 0.0455357270088414 0.01459906490312925 0.02376354319021479 0.007453830740699378 0.02701255272899734 0.01855660979810914 0.002245879147373956 0.004538166575068725 0.00204312799995495 0.002268079477581092 0.0001684755640981747 0.01088570373318933 0.01165655986075664 0.01912816159046104 0.020100216398912 -0.005149258616792719 0.002349749506116028 0.002109039930141746 0.0002873224087525846 0.03650505388820287 0.08144668378182476 0.03780716022796692 0.007966546346366702 0.004973167217685664 0.002537621478894698 0.004493277721408688 0.02608636393425602 0.006761939839085329 0.004293251676267739 0.006413363529863754 0.006935435049671484 0.002974023718688853 0.01921577227140688 0.01478394132063557 0.0004871070061947224 0.01895317891943274 0.005316383766410985 0.02438273711032488 0.007121135418016825 0.003226131596343275 -0.06333235705165341 0.1068811693555155 0.04995035219093605 0.01864865271581028 0.01422174244783678 0.004345883727377974 0.002598662293166243 0.007182478689334956 0.005407108280088464 0.005882956796053967 0.02207101459855033 0.03709576583990441 0.07187466973267458 0.005130432248646179 0.02526743288196518 0.01337842327342162 0.02941159353054531 0.04994922162213505 0.02704741389312056 0.03307340241231798 0.005372420731195781 0.03907915381091559 0.0352384531400119 0.03092093856426506 0.05575963933691018 0.0118983411230536 0.006430819540276381 0.0173029800180181 0.009311245491730995 0.004987578780176061 0.003204704976594525 0.002106208574372785 0.007919830300747596 0.002576579759243308 0.002450807231222222 0.002858830401710821 0.005413550146229009 0.00277567326453402 -0.0002915313166815157 -0.0003495586807174504 0.03808544958149918 0.008178840762313021 0.005088939439957487 0.007326817922996737 0.004104463288760513 0.009610910453224019 0.01639637693955579 0.01608124638515116 -0.006871059733183745 0.01398223024311526 0.01504894755151594 0.03857500232042942 0.0112774337210988 0.005090335763538007 0.003691146822766628 0.01981552783819098 0.01434033485996839 0.00950161666010744 0.003439713912977262 0.01108319979703362 0.005093319581236881 0.003257699348684895 0.007923648544680731 0.004645576792375883 0.01358867702815336 0.01096005719295777 0.009471060457144005 0.02861087394008612 0.03765102196523872 0.02250335173493728 0.02693141350609493 0.01384111344121663 0.01152324366511392 0.002878918326415153 0.01538909774116042 0.0422497451388012 0.05184049221529773 0.003534880276191937 0.007221219282330011 -0.005049716667939091 0.008840326648489499 0.003270102671662035 0.0101189164988634 0.01073861039516026 0.02407612355373243 0.004231503573371338 0.0001646133006856593 0.004701997611399091 0.01941377999441029 0.002697198712068455 0.004161418251893621 0.02306740499724259 0.02405452775638128 0.02921007986622708 0.01861801944806911 0.04234679670675558 0.02904293860356559 0.04292838116302059 0.01702079946795622 0.02265800716440412 0.003149787276084917 0.004721961268372928 0.00740843127110792 0.01598993194823659 0.02729396135106904 0.01543806978401725 0.009072196126034273 0.00132415557363912 0.01320389889646447 0.007079029952510356 0.001985993556029567 0.02651644467396119 0.005054404190425916 0.02102245782877239 0.005951574692393759 0.006239038142199471 0.002559049017281456 0.00461025825554377 0.004258874844511488 0.01483236401493708 0.01897166206128477 0.00793057057973251 0.0001031501263947393 0.003150338331865227 0.01138966433709238 0.02640980122608414 0.02525934781262221 5.082970579629824e-05 0.001880718972247562 0.0150641100917764 -0.0002526864400110011 0.001803656350941784 0.009673184469815457 0.0001843215210175437 0.002169948022961621 0.001324920114377864 0.02448000418613693 0.02406236881304879 -0.008853229747396194 0.003708503063041275 0.06188153212778393 0.01618318857500983 0.0589002734185477 0.0683723275021649 0.06368968190130167 0.0125497919848011 0.03310673275853957 0.01993632043952858 0.02615037815859742 0.002123827636508268 0.0430888080474926 0.006776439577850151 0.07513588402156424 0.009644304864533557 0.01115406810997624 0.004557137485467074 0.00688716910928352 0.07532458398878442 0.01937620826789116 0.00245691286388549 0.01575240033182993 0.01650412965580095 0.004066941912149036 0.01195030211989221 -0.001764261196995562 0.03602864782860387 0.004017191477366493 0.02139319571461374 0.005265956858858259 0.02330300624358758 0.01276643444461304 0.001111858900466445 0.01036076632738014 0.01493934831737078 0.03106665673370294 0.01288343690740605 0.006976593360722049 0.007337452063069067 0.006886920617156847 0.01078395455006757 0.0140515673089777 0.01355235378146856 0.005508830605528172 0.01402741830089977 0.006981325113781473 0.01140582695182744 0.01253964202067403 0.01287548094847892 -0.002886237442322705 -0.01459910453662188 0.01427037867000172 0.01549383736734624 0.0009654643054413913 -0.002403535387782654 0.02786094118078234 0.02095962170587785 0.02661308034067158 0.02298804087789531 0.01273933481925815 0.01507919592795728 0.03859013406278659 0.07312586619853874 0.02054916396330473 0.02827578860528369 0.01254713802853247 -0.002866296669557283 0.0107200325059015 0.03391114065432038 0.002969256588772188 0.05613608013731654 0.006277924572287993 0.009996544200411687 -0.0007142907112414781 0.002231051295245217 0.006078561963684986 0.002071563547706007 0.005593821201570698 0.02630364027507397 0.01333812782461972 0.02294446283004055 0.05695180190045009 0.01305678760034219 0.03489770652079713 0.06760987315280037 0.01327602247532024 0.008516593460558754 0.005421385086854251 0.01047757754320137 0.007490959988926619 0.01937805046568929 0.005921635964947565 0.01718535720585705 0.01152615520559944 0.00550165648400892 0.008675496243874046 0.004686245808572259 0.01207390578444039 0.002727929001047691 0.007977993826849078 0.0146147227717379 0.01228687021743833 0.004575424293899549 0.008358719011605599 0.00435753397101804 0.02169271662947818 0.005264522754975936 0.0002277547686970877 0.03353532589082838 -0.02212324975696844 0.02729889919051868 0.03608089460630219 0.01038493492855221 0.01913225331970953 0.009184782614777858 -0.01131292367980508 0.008277628023923024 0.005934919215812825 0.001533189277814182 -0.001408031445777183 0.0005673115857492068 -0.0006661355063930316 0.0006604934466333289 0.01621055064952113 0.008193416275741112 0.03307803163006718 0.01551266743481057 0.04953238486974196 0.009465413505311257 0.002017820793756137 0.00191219112615942 0.009855000587537502 0.002120245227574929 0.001575757791659064 0.001762365247515691 0.001435775085189832 0.002165778528935949 0.002377913823976836 0.002762578127446341 0.0162196792398223 0.002990225478657732 0.004204015971428926 0.001766514290703893 -0.001316784880182938 0.003046430882620996 0.04366996687694401 0.01768361184416734 0.002276012807604719 0.02303479361179854 0.0193898426230363 0.004553512174622841 0.005036183946290205 0.002357457410602694 0.004580365656813136 0.01094813673712309 0.01541893781907382 0.003432576414418647 0.004460066687381597 0.004342012216547605 0.0521087314503585 -0.001572640803687796 0.004138470097285719 0.01193945556587731 0.0003534271207392246 0.004062671313951031 0.004425316623180141 0.003993036368870573 0.003937620567285168 0.02585004583609182 0.01709083352807714 0.001999351821130444 0.00221394078796738 0.01500436760934018 0.002127330450486329 0.008700432999501915 0.001951125633421918 0.002105474513535737 0.009056207107041659 0.0355303835550245 0.03684133337631757 0.0250941808058408 0.003445681939073718 0.02899358999899183 0.0168983348009586 -0.01428894415678551 0.02327268503576181 0.005345197096875501 0.01303028350409154 -0.009766284132595051 0.001257099532945057 -0.001079170805234081 0.002167533480697668 0.002653445168889447 0.001610314536532578 -0.0004880816947692103 0.003281334640836015 0.0232128130003387 0.03465807064242547 0.0467536940637279 0.02598728423240422 0.04983233780073531 0.01020018127346582 0.03276462828454378 0.02534166520531775 0.02251955704076251 0.0139314038325646 0.01968695533370308 0.05564472073508522 0.05864916556691113 0.01133292931141165 0.008846455992528909 0.01394389169646719 0.01145584715449539 0.009031289864504541 0.006590301413409281 0.004249607722823215 0.009491371745879086 0.01871796033815143 0.003582399547964068 0.003773819025295238 0.003592250730533665 0.02151068141446092 0.002692664115546938 0.0006903280908227229 0.001975539731121713 0.003858385308281679 0.002477396501142096 0.0007215269693216419 0.002314970912981983 0.006225279501719726 0.002336469745920581 0.002726322094903117 0.007805275399733523 -0.0004167772892414549 0.02245927774801762 0.009604929664498775 0.02546373227799105 0.002154483318732867 0.095324683836085 0.02284354252408706 0.00531887478459039 0.005059112638191882 0.02138596144237633 0.01507848752775305 0.007953745433629865 0.01981789097510228 0.02825404055608411 0.02720158362469199 0.02249180438680773 0.003268096788385236 0.02558900626458883 0.00697895542590519 0.006960371183780275 0.01084723162997426 0.005245022393263427 0.03692971727315397 0.01098846671067034 -0.001449203210687989 0.02273491946965654 0.0425067859979355 0.01622439465241357 0.01086041382171246 0.002020739047508044 0.02270555867454676 0.005652210647237837 0.006085862194456159 0.02177391033228667 -0.003284022840332726 0.007653796150531009 0.008063599310461529 0.0002807641331161912 0.007222722272055795 0.003175411489272708 0.01272137657017023 0.006358047509806754 0.004858117317377711 0.004905276407405889 0.004772514785681824 0.01445386517162457 0.02781378928513177 0.004564804273203795 0.02849916947651041 0.004161211698587909 -0.002945744770013707 0.005159201135753121 0.01315369782908428 0.004982790141128099 0.004810179771203026 0.004532757632155016 0.007962359391040771 0.004462369010386652 -0.002893857397532603 0.0236485691874062 0.005766682222404359 0.005162009517555155 0.005111993428123587 0.004877880246720385 0.0294024491543832 0.03551441110255409 0.004319876831273826 0.00523598622784321 0.008726422867008947 0.0224453093043636 0.01015360342407671 0.004964501524930596 0.004695604124946923 0.01109433869985165 0.01054746975487328 0.004417021136582025 0.01468048881173821 0.08486211067054508 0.004314623902253086 0.01371043315015853 0.01111003968444887 0.02779716926612699 0.0123007663157479 0.01442161134122427 0.01132615996241495 0.004973908046179604 0.004362835079831855 0.03380729628446585 0.01822944660056278 0.004729712787806863 0.003434964510730232 0.005243228748185988 0.004960730267561554 0.01533968460754341 0.004474734468389725 0.00606178096434854 0.005104483275325563 0.004613348873891941 0.0264914512272161 0.04427921290850325 0.02301933316479754 0.02701242377040668 0.002923596516255705 0.003249750829587912 0.002994123101040805 0.003646310806253469 0.0353259907312495 0.003415266756900078 0.06811011822569932 0.003310703821165472 0.01299637092414895 0.02901649959365443 0.02376077565894456 0.003932095220603996 0.002849376316785065 0.02488148231609061 0.01201780590228704 -0.001317138224910783 -0.0003682052673910233 0.01821754463270488 0.003680126610568824 0.003412902821525206 0.009304545816885147 0.003343527137638093 0.004078905642197928 0.005445532991656152 0.01714457607600295 0.06137958117679687 0.003729129303724091 -0.0003893473035551014 0.0006436384550827131 0.0002490633097370733 0.005301395290034604 0.0009188079441581886 0.03763118185728909 -0.002889194279063654 0.004278288140988015 0.01477611801921996 0.000591809680770435 0.005551774779544094 -0.004160291611788486 -0.007283527371137027 0.009611166496856434 0.01188551573791391 -0.001558682083997948 0.01981701993637043 0.0144120800142967 -0.01133956839386788 -0.001818166318711473 0.00853835225893493 0.003052596601762607 0.006646349563363944 0.003356112359474405 0.007810638471751888 0.006432447931995541 0.008413670571473072 0.008484565163923468 0.01230208548579077 -0.003329798856555134 0.002167091733717736 0.01214887399561699 0.009503815542176986 0.00741744134450084 0.03433055896190484 0.04065103447186699 0.04435520117128417 0.04302007316655368 0.009035233092217343 0.02237940312276695 0.007664275926065482 0.00687149902655945 0.01118435687654811 0.005652211440007345 0.005812039873758673 0.0005274139622227804 0.0001049492542176352 0.009649142877799121 0.01695254772969655 0.02040241414885052 0.003836555448042221 0.0126132176072048 0.003532267936056319 0.009975740526055208 0.004300967446007826 0.01001205792979191 -4.620405433995317e-05 0.002416122685633965 0.002600554117721199 0.001321856857453731 0.01955278645326591 0.004458524156008509 0.0007108156786768229 0.01289202987646727 0.006162103374502586 0.01164182430944777 0.02879742840204584 0.01299986298987642 0.0007675866411935751 -0.0005632369605659223 0.001951572877524276 -0.0005533117625961474 0.008154190184701034 -3.326884864143886e-05 0.004678462462805039 0.003509009180042716 0.000740884589366761 -0.00142027282483452 0.001726649571791961 0.002482560713910676 0.02217367137483293 0.001306972190164955 0.005836089815014904 0.03429686213364143 0.03895476819041903 0.003089152101428918 0.003577952110432475 0.004641765961793945 0.006076915074568841 0.006126621293036009 0.03414811190224565 0.006425396707623016 0.003606742180104285 0.001268491847111103 0.01554731238397789 0.006694736654475775 0.004234672429746749 0.007002004507104764 0.01327133768466957 0.01475594379299837 0.00237828432759162 0.005004156133954972 0.02406151034356742 0.0392952041404754 0.02310058377363245 0.0005747011952599475 0.02461371617436331 0.03933743964437826 -0.005868187176192116 0.009732753701683479 0.01908630135191887 0.06226592324823843 0.01635216374288456 0.0004904681532952205 0.02047101169021671 0.01314157616525179 0.000542505064452919 0.0008970270676636924 0.00470780012345237 0.01598242504228242 0.02122259254178615 0.01629919866884778 0.01432925156801656 0.0105981665239454 0.003178382582655228 0.01944381362050076 0.003243247696373184 0.003356129736099946 0.007234377427142682 0.004339869764490841 0.008109456352704741 0.002390077981376178 0.01897003019980092 0.00285685784758903 0.005753083229449825 0.003675892004545453 0.004289447329145708 0.004824220664429622 0.004127766378374969 0.006082462994357051 0.003335479872896982 0.001773025872554097 0.002441088911518569 0.01061286039493007 0.002998130695867135 0.02034165949550044 0.001869757691382477 0.0028777317446366 0.003671937129385351 -0.001490195969889357 0.002915910773822209 0.01923513743003534 0.003420979772466601 0.0396034718999585 0.01176453910718658 0.01706231465948501 0.04603099808951867 0.01580858204582296 0.01576101676602566 0.005919741306929992 0.005621968374713528 0.004754023762258016 0.01472101436330577 0.02063729374591448 0.007191658066045208 0.00401959989848139 0.004209549002136118 0.004469943596786928 0.009467846847764905 0.004284275725443376 0.008347134190986887 0.004092798683529614 0.003917277747454216 0.008569874997714642 0.009107114444316521 0.008714571757945861 0.007020070243139923 0.006740831785331091 0.002511011758928807 0.003648548206263908 0.003877795265745609 0.01824576728922657 0.04325343417430122 0.008737806176191951 0.03092997494311379 0.004459227357694938 0.02309096505219218 0.01848586488890203 0.01784047115948825 0.008220162198573419 -0.003796542552081811 0.004821349973529875 0.003831591825881822 0.002312477128590278 0.004683326417559913 0.004142198168725665 0.003595791783439871 0.005850334369766354 0.005626293634520252 0.01040552659778693 0.002973919518640076 0.003341145439297327 0.00243022747506072 0.0006767350783187537 0.001825925796602921 0.004271225285414649 0.01300839151968383 0.007521191769730783 0.002982180820885224 0.003865879459714377 0.004813668875024075 0.003058516541395454 0.003623187257290686 0.003354777426050524 0.006263871895079701 0.004293729212495179 0.0002263260624129468 0.006235580304382536 0.004003727164036035 0.005105194192466985 0.006185124528325682 0.01126415755085688 0.001100732386238655 0.001339275275205368 0.003082512309207988 0.004909473479220479 0.005012973418965286 0.001845818462365292 0.005460570878247412 0.006904813060131816 0.008057227155682054 0.007279738913723292 0.005017757871849847 0.008842793848347241 0.01093973359069837 0.00767224969482772 0.01516601065601173 0.01241295336262027 0.004829983717889495 0.006627986338301588 0.0004094299521513308 0.0007752555633031498 0.001076277314704242 0.008728820790620527 0.006155176862869593 0.004836062232468095 0.0089257260752318 0.005832498876819603 0.00425956705116447 0.006944034957328995 0.01302901849780623 0.01441603798638666 0.001808379594883987 0.00318147698079938 0.004255775986610399 0.004404681967235955 0.004463886176149547 0.0081114098288717 0.004019466650770471 -0.002163916932026102 0.007912194920354198 -0.0009496785828829277 0.001880362521141674 0.004159069626853948 0.00462272621825863 0.007095774235750821 0.0002746240177575112 -0.0001063187756761795 0.000170273285237942 0.005544144405189485 0.007875963526069049 0.00883188685525468 0.0108340288896049 0.005900585847130715 0.002818709476075743 0.0332770627087538 0.02922844491444567 0.02378402571156257 -0.003970638520289579 0.0006930596362259311 0.01194381992931914 0.008818734895111641 0.01832796141242839 0.01880020018497024 0.0305256678248893 0.01837896115907186 0.05270023676699558 0.004164698156472907 0.01176678846584354 0.009602528293918514 0.01118846816226387 0.01000042337077276 0.008624849607757223 -0.01625875558664179 0.005722938866025771 0.006556253414806302 0.04500772489665026 0.04037596359412357 0.01877131433487286 0.01004384062564764 0.003542020392382899 0.0051430811010726 0.004615088379623409 0.005923045866551578 0.002134674829818886 0.003654827362192094 -0.0006206851259719872 0.01533034315873683 0.007004491911318342 0.007412902809917338 0.009984226617509454 0.003608508974975641 0.01029681283482001 0.0235146663102336 0.009219638585634515 0.001955916929966826 0.002952452774074248 -0.003338400640026606 0.0159980684890674 0.02190832095745303 0.0007661842197667716 0.003883613019788837 0.003794266272316409 0.0009556109142101809 0.01400462305638464 0.0009893944300143063 0.00858659461907247 0.01724463492887719 -0.006652633611690949 0.00661465178526125 0.03495212539922642 0.008859734218495563 0.01991067531373673 0.008663894199223317 0.04826564911079081 -0.005297278233650836 -0.003462501802162616 0.07294375859124919 0.03280221705353189 0.01853422801821672 0.0008655569289585462 0.02421582787739613 0.0004150542273104346 0.03843254269777466 0.03480780147953278 0.01893473466969424 -0.0008062124893061911 0.02514612244179444 0.006384655705672159 0.002091051691623359 0.05676658917461019 0.00902984662547587 0.004810842769344223 0.001468352893327574 0.04526699057993634 0.07166096844905252 0.02748920223864263 0.05091355930279721 0.02761485829048686 0.05784506722845076 -0.00693064182810818 0.01994255694269321 0.02018691605588772 0.05420366342296957 0.02718833115447016 0.01067634317822526 0.018601309622412 0.01689692581369145 0.02658561841901924 0.006423256736695869 0.02565296777712413 0.01030035613388573 0.02198905269553156 0.009265729610066773 0.01871679736212658 0.01520925813926568 0.01464311904848046 0.003672418745861506 0.009308583004379773 0.005107379706012477 0.01236884911614565 0.04607546071784093 0.01980760865236356 0.006322106068998057 0.02925255575815439 0.02267049026978115 0.07751777088661975 0.007295169732834451 0.009606603767481849 0.0186145029328282 0.01938257641690065 0.0238491389332546 0.01219584135309085 0.006008515383583933 0.008952778447523728 0.008091467415888889 0.02465856830310774 0.03664798714653 0.06546190056579627 0.0435372600468875 0.036904251549355 0.0308571634222253 0.05428319026672961 0.02340589310973423 0.02678495995535992 0.02022464038259155 0.02074906172126185 0.02368744204023964 0.03420864228820332 0.05763641235735376 0.02733445599572497 0.03214023759516667 0.02640465493700908 0.02989553072200599 0.01513329015163926 0.004897010352386118 0.01241329319977943 0.02233574686008027 0.04696194721287656 0.01426048393308653 0.05391414908816988 0.01791537248413159 -0.004234449646368255 0.0586632668417084 0.04167384201940905 0.03286944979545361 0.03151398050293523 0.06266230022798071 0.007513116140687603 0.04907342615141438 0.01928555135986707 0.01097657663959791 0.03586490515198337 0.01462946428688605 0.01784978057574309 0.02017712788901928 0.006769090620643059 0.003283661161360858 0.03170529880017781 0.007515443416399433 0.004205890148847145 0.006088035122368652 0.004567751696442921 0.008120924439578365 0.004550735869574729 0.01272374364260478 0.0236075730388907 0.02191654637180443 0.01247986667698926 0.02106462848386618 0.0134032217706236 0.01583409905359771 0.02460689921552766 0.002207413596425603 0.007224049181532512 0.01987625638983833 0.01654792958881207 0.005090005979607081 0.002066903398435551 0.01064713774806038 0.007630335086156953 0.05729821010682705 0.01049684074136384 0.0092723247305306 0.0298329511274861 0.009784496863157365 0.04328600224233748 0.02777513153219816 0.03505697659111317 0.06957580160026731 0.02044438234074154 0.08000545292847397 0.0196398689335201 0.01508559586443134 0.001089983158018875 0.004357693671026651 0.008199878340899795 -0.00174283426535701 0.0001680267344784006 0.01532027263176527 0.01856376994233037 0.006447472586013614 0.05632288235287694 0.007665569624847598 0.006891518698839866 0.005077692867327024 0.005437673552875225 0.006566137494355277 0.04160197267589047 0.01155297371489639 0.009941536313111366 0.005544521213421875 0.01731948877123602 0.01135925359648151 0.006670981605274405 -0.002325663671253629 0.0004287066520328679 0.003186333058739243 0.01419602199308419 -0.0001927540028381772 0.01476906742374862 0.0188855875790779 0.0208483421132249 0.03449680231027011 0.03826235992914786 0.007813525556561486 0.01110099114605843 0.003948533364572646 0.003562498510937468 -0.01889184919150778 -0.01827260813958651 -0.0001015278498511086 0.02143100797088927 0.02419097164521061 0.02719682718783981 0.005894655732481784 0.01148962618137407 0.007221707418863017 0.07075995788714652 0.008613346966795069 0.009037280969317347 0.004995889064417767 0.002506794405038465 -0.005834102797621471 -0.001097813262662923 0.003655824067648573 0.009203963174611153 0.002383958942025282 0.003646096607494412 0.003797235331456235 0.06345602606888591 0.01045490982218078 0.08553244218501721 0.002551631240664278 0.00379894028353481 0.003770096714127453 0.003620789555327397 0.00466265041252646 0.003700604099871328 0.009781871532807357 0.003786995434701834 0.00668218802466096 0.02596405647315289 0.008524559737406061 0.003892265961423857 0.003814023347407788 0.003605768599529516 0.003737258185762136 0.003640492720750706 0.00382272877793517 0.02207443088491335 0.003577896809367075 0.004467028407785469 0.003825636578176214 0.003403196436914881 0.003844137208021914 0.004568460961187268 0.00365531715741365 0.003401541889279227 0.002796934752259352 0.0009047383683375631 0.003467355788012324 0.003027181975162834 0.0008184003835545113 0.00371507563099127 0.003648495103283478 0.0006173711180022692 0.006324231117865035 0.004582774088731019 0.002934872759418198 0.0007587801350782597 0.003057998299478146 0.002132097366895987 0.002958506346629741 0.002784896362494473 0.003580040345581993 0.02326666916470058 -0.0006768582484262252 0.003401155676545334 0.07813917005466965 0.0326077145458067 0.003950068339976538 0.02724269123335103 0.004028738883809895 0.003031670655876919 0.003083931051888028 0.01219590153669681 0.002605761460877648 0.002657154085321117 0.003265901498270916 0.0541481789484207 0.001288590073829568 -0.0176721581858739 0.002724969064319729 0.01626534075492713 0.002805977513775251 0.03104823334338082 0.002634679386109314 0.00268518972452985 0.001525061535119212 0.001283678695674364 0.01374841077311708 0.002977155879165978 0.0009350823736300676 0.0002707182507654689 0.003430482838224939 0.004520298359085888 0.003264105190065426 0.002865286594626341 0.006909866930382589 0.003451420458774074 0.006826828935921243 0.009306662950042319 0.04439219641763557 0.04094348625942168 0.03364168772992505 0.02055242207723685 0.004251342244481785 0.05458316779556052 0.05006988832476533 0.003455268298891368 0.00334907055699246 0.03359997435938629 0.05784297332782477 0.003208470745366549 0.003260437666513309 0.00573753861833053 0.001700656328626931 0.05365049033921735 0.003490987279894493 0.003133264833827979 0.01594444738576507 0.001438421915253688 0.008847974133538621 0.01271023847056072 0.05426857050983854 0.06971371537928737 0.00350613440119781 -0.004590968413646325 -0.004718086641807269 0.04831648246430082 0.01333564957875492 0.00425722805981317 0.003366047168757008 0.003378489745630644 0.003240050358820066 0.01077393927065714 0.008341741095078958 0.06182915556192504 0.0725601950703357 0.05284628613066983 0.05810432889828659 0.03642390386363788 0.05498692101964248 0.03344092604242092 0.06515756671862966 0.05660277075391112 0.04602857704645812 0.06229472719351158 0.04325434181540005 0.04648935583145086 0.04652151144627431 0.06234784046299666 0.04732263525576074 0.06715800194743905 0.03273826456704518 0.03967800431495382 0.05362037099560533 0.005195197827707694 0.005466128655884057 0.004886623486611645 0.004203030316820763 0.1080872731037739 0.003858524896675506 0.04587905415080193 0.004233899213745802 0.01500579133129873 0.0144372011594926 0.07623116984825021 0.004752488379595641 0.004770065680924702 0.01227261791189666 0.01768649127250832 0.01018191933794918 0.004572991828608309 0.01680274243212904 0.008311296645827852 0.004528730783319156 0.003360965191959999 0.003394067629612856 0.003093487360350618 0.003043855007993019 0.002895984552675554 0.002975251248604702 0.003131774186138021 0.006464883817301069 0.006658281693272412 -0.001868775552587806 0.01398244624218321 0.008812927000049058 0.0209931154611478 0.00925425241319815 0.000740944426487581 0.001724327288884389 0.001464143806548983 0.03528732340915563 0.006629697057961609 0.02202413784299928 0.003067459077905999 0.002996916710833892 0.004157850500240187 0.04809609921134123 0.04913805018389205 -0.0007240695975307411 0.003597152960864329 0.01317759380553629 0.004181414435589006 0.005290598909498112 0.004924116727518735 0.002060253662166825 0.004850593164068243 0.005511482101436729 0.006555522993198842 0.003495038692128205 0.002976355376233865 0.005625270059954606 0.006911959709335037 0.001066197268277133 0.003380695799700477 0.005218526159071025 0.004186280964160815 0.004487560131738725 0.006939820661815933 0.006352429590385806 0.009871698537892253 0.003057006751313263 0.01051532341513017 0.002792164935031483 0.006865852568949616 0.001076964516009544 0.002350708171067169 0.04390998571924253 0.04881568700716987 0.002855581520034347 0.003865782351437766 0.002622996925241345 0.002443372790454095 0.006544199544135603 0.004107375926443399 -0.001232803403956908 0.0009029035173712443 0.001189635558554775 0.008741965813463327 0.001030007422068399 0.0008240826029603013 0.0109406984890421 0.00397836092520534 0.002993319356632419 0.003801911805106188 0.009377642211324429 0.003271296059543841 0.001434120495478505 0.004689264453846118 0.002793276707395832 0.003938867101470967 0.004096423820962359 0.002081588081535096 0.003558512224950594 0.0005758759404783579 0.00385002203414676 0.004055223680359598 0.002574478752885483 0.00279991438043232 0.001547837344498912 0.002139042778903053 0.002825005589209064 0.005202724183025066 0.003854521336622466 0.005528134071918188 0.02265447766137847 0.004159905084817199 0.0005527817278366246 0.00902145471547329 0.004170468205764419 0.00389675173496755 0.004619537228469223 0.0009922784404305203 0.007177578531069556 0.002149056056545664 0.0288834055931591 0.005698933283302572 0.02126780099015865 0.01028822201832651 0.008856560559467713 0.00353828529676546 0.003040495154630959 0.001640094107377826 0.004072211305291539 0.01996389409322773 0.002266488572889485 0.008057335864197702 0.01852515173875868 0.002023093983953294 0.0002963516124091428 0.003695457326964219 0.02095791570114229 0.02246178198497113 6.987639086033458e-05 -9.222275786200664e-05 0.003682658522079602 0.02107494130135226 0.02907597461657136 0.001365222619834619 0.02419594353863407 0.00848357992824781 0.00604025168279626 0.02718756948833034 0.002774513769091878 0.01153977354064396 0.01315877128834702 0.0203187764517973 0.03250895111192802 0.03834185710747502 0.02868284254660546 0.004063452910842367 0.002865299833732759 0.07265930312410661 0.01068963121827883 -0.0008190936969758476 0.005266928001469657 0.02014445991066989 0.009781868889320705 0.0731692953448784 0.080946067532878 0.03188816295633987 0.02123792254914461 0.01368930088321988 0.07000922311174074 0.05834550952584897 0.000429190915508317 0.05883192128945131 0.002922631925798575 0.02195315359625149 0.05307220960376631 0.01919848330116977 0.005478706955743488 0.002031762566169852 0.0354493610724441 0.03658085127189946 0.0006797033085532582 0.02270082935348861 0.003466100235986538 0.01484465246527028 0.00626831294573786 0.005985777014321411 0.02231711110909344 0.003043541882346164 0.00560176753920943 0.001789926413798624 0.01219367119629894 0.02435193035332623 0.02526761520280199 0.003788792927217198 0.005284832839676312 0.003300347436223111 0.01039313227270807 0.01859072253448032 0.00962576542097123 0.01000700991272347 0.01754442445565202 0.005452250130630719 0.002816555314573274 0.01082543859938236 0.01257094386700962 -0.001821946104701209 0.00626081705572518 0.0007359934093523674 -0.00040747989412022 0.01221592406818447 0.01048235019876995 0.005227725966646836 0.005166556405288555 0.000550010111925764 0.0001651625795962056 -0.005539157374535498 0.001535793825544449 0.01517771393617481 0.001633121517361368 0.01858160008597107 0.01833270350262609 0.002374828235004716 0.01267265623899723 -0.001821914499397023 0.01040431467781782 0.01122974308720666 -0.002959965304888916 0.009574286094127943 0.03556981182927673 0.01115551345920467 0.02943561550549662 0.005889178284136114 0.00825239135430212 0.007522417348457465 0.00837556920061004 0.008583001851419433 0.01279345335388777 0.008893628471835969 0.003961175935153857 0.006807048115740667 0.00680872793814532 0.006881254320696043 0.007304301358824161 0.00770999414983143 0.008627233330278967 0.003179044554138177 0.003041646422702912 0.05669866358306201 0.00322823061092566 0.04987054870424873 0.003196402508346539 -0.00483405902601597 -0.0004767815548543691 -0.0009573918771381486 0.03094222323146854 0.01184045855758324 0.02214964032646951 0.002315976967334592 0.003427646322426001 0.007866688570963697 0.004899239075458606 0.05522200342378058 -0.0004545946582567368 0.007607849835775046 0.007506151168423531 0.004502689859269323 -0.001143488079613064 -0.0008788238341857917 0.01142916177159159 0.003540274339029912 0.01709784809813781 0.009328889773166274 0.05376482761889791 0.04227912581960461 0.05156399197601071 0.05087342062617185 0.03685701769845726 0.01624985913483558 0.0134376806214272 -0.0006997679396565463 0.02017419603684643 0.03341334133848933 0.02095873206761933 0.02041724628768652 0.0006472899303607428 0.01635383828452117 0.05469726166812303 0.05823866616897758 0.05295652159133401 0.006972316500751886 0.008697140153229784 0.006133296660226405 0.00740529646626319 0.01136474155530348 0.0171663844088087 0.0006172285591603108 0.0276493115418484 0.01960915582347008 0.1345133143234366 0.01524013896733737 0.006957214078041973 0.005822684340219554 0.006922266574039642 0.03856892100931895 0.04210362834035909 0.05182464112445754 0.003582944557580541 0.008730526016145065 0.01661632378794501 0.01910348821985518 0.0154960372795407 0.01318638917960262 0.01192436938975939 0.003882438230049284 0.007198929363987341 0.03800774445494124 0.004344628494831974 0.01947901075191065 0.03931950921108031 0.05853781119715017 0.04862796036563004 -0.002517512424712777 0.05166768309550362 0.0459532357861369 0.004348706252016361 0.04199896979336632 0.004924548603875912 0.01022097658422989 0.02230101166877655 0.0344993842303468 0.03648628640494865 0.04683302845922614 0.001956176775552296 0.001107421924930621 0.04861191526301316 0.005963301446735553 0.004446492159722172 0.00321817553167468 0.002780018595995404 0.007023759114725902 0.005085696620088649 0.009270947613789313 0.001120598435621307 0.007561610391083246 0.00944974072895431 0.02414594031279775 0.01736854531524983 0.01032223465359147 0.02894044034972107 0.003015751578196732 0.00909838217500827 0.007144216675165385 0.04689956546026493 0.01654725111164156 0.01212518771465122 0.005198657400328017 0.03254854827175239 0.04276354085896231 0.0215653987101519 0.04765746805427597 0.04205277141940375 0.01942441759891101 0.04757471143701089 0.04275002776590547 0.008731209984823766 0.01593234097549832 0.0178630232047196 0.005067424851418089 0.02662456454989538 0.009284033325660069 0.01870138742583588 0.03887633052950271 0.04031207644315376 0.00122247154173687 0.006959239527661844 0.0006350548609928823 0.02569123870005073 0.03580675522049916 0.02197012664715722 0.0222664165198353 0.02337607192354638 0.1987205542577209 0.06030800108651466 0.01391470899130237 0.0007563052074857609 0.01194532175936437 0.02408652617213363 0.03462117790888337 0.006927194586342876 0.0288429164863835 0.1631503222043305 0.01098774172141101 0.01441046182095565 0.004843425536651291 0.01246142435404326 0.1303281456713738 0.1266947862636797 0.005315247483761575 0.07409279822703953 0.06032654843972442 0.02306235824759403 0.01864459537043416 0.02059457378622493 0.03708921869141807 0.02102539182704449 0.02734325695606407 0.03249903786835 0.002428089341623321 0.002260828153621112 0.003979690113424876 0.003248218212744427 0.005611118818886889 0.002230511675125856 0.002313305346749052 0.0421388535462337 0.02009453669078305 0.007491895033808264 0.001929608578516433 0.0002564263423698185 0.004524835816794122 0.03531269735281695 0.03246455352591648 0.005422377513319084 0.004675705469038614 0.004408972487500792 0.009978421147384647 0.001707386305637262 0.01203786845718036 0.001201218298466395 0.01366368303572138 0.03975580105415076 -0.003212513666326191 0.0241640351577191 0.01110915794039162 0.004124341186223747 -0.0004855828720958566 -0.0003778781061567638 0.004752219072823956 0.002002393151715877 0.00366776888102135 -0.0006707028639848145 0.004166752952293838 0.006063626438881898 0.00692178258741586 0.022472319764583 -0.004612622922857607 0.009266098399271417 0.04072153418069008 0.04803277657539839 0.05907727542264778 0.009616866994570941 0.02499873587332908 0.02406159127387143 0.08909501549764826 0.03344434860823035 0.05237227149493793 -0.002304316797389104 0.002737467674189737 -0.004037017029681051 0.007736073626482423 0.02198194557630151 0.04721984534239039 0.02995242340827681 0.003611795931208589 -0.001262104345398451 0.01329860586714422 0.01681027076516502 0.01474327091644413 0.04089599242379604 0.07168456256564489 0.04168585813706955 0.04261369941182053 0.00899772199881908 0.02017560149627932 0.07514828467469206 0.00957594066095549 0.09694782327975164 0.02206797804108853 0.04839645736912147 0.009257192983164691 0.05886707354023715 0.009151137490463606 0.1546491680831812 0.01342769332218726 0.003193275478537923 0.003576426453428545 0.01462202831649336 0.01511412335580774 0.03566666197896481 0.06266492634487909 0.01649581748536049 0.006721669983153805 0.04682463491482407 0.01456648432960988 0.01956342760865788 0.01395567432841749 0.01375952035962304 0.03964496712024403 0.003423597621810233 0.01447990578561688 0.02528041558128431 0.04029896694559981 0.003727565508943825 0.02831172408786175 0.03846604589312837 0.003110767238131767 0.03457707650143164 0.02742882305241703 0.02138231040931767 0.05488244953897189 0.1298009047536016 0.04153885775740016 0.040176960864484 0.003331506353186279 0.04833049229691168 0.05459936513725468 0.1171713133237944 0.06983966760934418 0.07065523224962197 0.06521142689852455 -0.007864327851019138 0.01926699815012926 -0.04303440754693835 0.02634897585075565 0.04582353615535204 0.02339479406340619 0.003930301834489212 0.0003919106946358547 0.02963843853433834 0.0311715290991802 0.002808483158478915 -0.001503712246883503 0.04957171606404447 0.1324542165813094 0.08500579618524955 0.007306241162200902 0.008390152477041673 0.01107271245463123 0.008616742940797456 0.001014229985791531 0.0008068232179011209 0.001825311436758938 0.02969610491475455 0.01511162516572326 0.06477216683159209 0.04633876610356807 0.04808439268529695 0.01018774200170624 0.007172147300688711 0.007150834180626984 0.003786529774632666 0.003901458918791921 0.01031012134197698 0.0422157323741677 0.008879977269193113 0.007895929893457061 0.04032298216523942 0.03496818903170711 0.05944686681710331 0.04932085147413 0.01734726484230721 0.01586921111745931 0.01821918996264615 0.04371867039224743 0.02526247995157226 0.01095463259667284 0.02633762998280632 0.007799325700641543 0.03125399840922015 -0.004300613817898948 0.007024856662029713 0.04793264518255299 0.006567708210898124 0.1043463774927044 0.04804204539242551 0.01965954210348005 0.01353683978385583 -0.004628438127447624 0.001287741503384068 0.001679125931879003 0.07678483053157321 0.007020409309578706 -0.004036610982239047 0.04329657278465287 0.04823990155870181 0.00783349198003643 0.008658166880599723 0.009075176900189792 0.002156863636946753 0.01291789835985597 0.004331416706678951 0.08041835873073198 0.07874385188193667 0.02443763210568917 -0.001684431654219865 0.02001950808496071 0.009739625090121639 0.00757558409669407 -0.001343601231375187 -0.01915370965984858 -0.005971140025236229 0.01294522584690978 0.003589287765673813 0.0116726890357591 0.08408312054058975 0.02411680754204598 0.04373695760134912 0.04612463824154275 0.02188573367707779 0.04055458357410736 0.01536766082028434 0.02067274302341384 0.01971037544654427 0.02572681723173393 -0.03429074676405649 0.04005636999624995 0.02534666439934263 0.01254004062520191 0.01098951886869498 0.05096006166513754 -0.008696059955767724 0.06736007628668678 0.004380115173586425 -0.00682294706421044 0.03820154180731476 0.05344319933093565 0.0866300667644427 0.01007082540915182 0.006773996257271838 -0.01030544483163202 0.07545415798030926 0.009564975822649943 0.01012960543026032 0.01727103080512195 0.004681042389108314 0.006686662397471231 0.02162621334645097 -0.009123383219894102 0.01998267856794365 -0.001043803788732345 -0.01347878292212591 0.04695154895415547 0.03830397633147549 0.06297014086785495 0.01258313669787289 0.01846462494025818 0.01820547940121212 0.05317895378269737 0.01165713532343406 0.0360709848259998 0.045278090315731 0.02987693909491678 0.1579607030966293 0.02133381263450916 0.05487837144862141 0.02389184251956044 0.01078084818634121 -0.02476123351179236 0.02432168060988541 0.0187492911467824 0.00357597708846114 0.02675351730566963 0.02905267655809074 0.0029442613894196 0.05044619345904548 0.005203199722244739 0.05158097133626297 0.02174347181140234 0.04924397563009771 0.02473127193271479 0.02019222460883014 0.0261742990178249 0.01790341152242093 0.1138648654470127 0.01716737067161939 0.01129293459535079 0.01473758789808973 0.01246162827130373 0.03298359919611976 0.01318406471772735 0.04442448560519609 0.0606532568530714 -0.01330098808259851 -0.0107690339310717 0.01285642170698504 0.02756308592042234 0.01923986165642493 0.0004904807479885687 0.02991299173286428 0.0377984472583913 0.06173500576574121 0.04721271127507926 0.02411300994744672 0.05192310029009788 -0.02468027159949628 0.07889833565875368 0.0769781759539189 0.05527073648286236 0.02087774865471499 0.03154031038679974 0.07294794270898261 0.03760981374181856 0.007875317039474916 -0.01213617034333147 0.02419221854421823 -0.008612651149704805 0.02739778554182933 0.06495397792034466 0.05952558933984486 0.08356951469749355 0.02663052311663354 0.07111557719155169 0.05987363196362553 0.01826502243156533 0.04852318786335883 0.07338141533375833 0.09422013306569479 0.09462969768137262 0.009029907333807033 0.05347325301762329 0.1712894181153072 0.009026990997966227 0.0003023056692281396 0.03587389964493147 0.05069553362738125 0.07389302196111351 0.005065216600140319 0.04326999534096632 -0.003550606388219317 0.002572800506553485 0.02105806579373812 0.0124873926056486 0.1020895037754438 0.06448664360617967 0.0381104887589424 0.01742738725364652 0.0108272058317352 0.01226651458521259 0.002984973012927621 0.05041875668704913 -0.0004020816517234814 0.03198115166983619 0.01708400795237616 -0.01376154830236107 0.04346663004918292 0.006490380044937844 0.07774412369241568 0.0152207625953426 -0.01085092928945035 0.01733011720236961 0.01017160468473897 0.02874142707980632 0.0874568996418429 0.07782796197178979 0.001288875340634996 0.03915974311811482 0.007426822045352596 0.03681592692976672 0.003018659971994631 0.03376973345641208 0.007206513589730479 0.007143588025608949 0.0375396995980445 0.007101368218067841 0.02989906076444904 0.08888497992203404 -0.01874367854997407 0.02368490298118682 -0.008361015413817818 0.02800120852285128 0.02140940278488683 -0.006017483701572721 0.03147363838063705 -9.838956332109283e-05 -0.002345986738122468 0.04062366649429049 0.1356857105585762 0.04717789502370483 0.003790316814462239 0.004103414325539694 0.02097831703908197 0.02505125554818876 0.03450902630582151 -0.0005930779682374178 0.001891941365823016 0.01470725230160927 0.003477313187112652 0.003809839660297298 0.003688353057667997 0.07280585753729973 0.004059371376205849 0.01766604560117037 0.01402291133260997 0.008851937729976866 0.01350607693885207 0.008166285543235107 0.05647360762512873 0.0235065446346898 -0.001881320899509685 0.06217025454111678 0.006493004084973887 0.01883469207210317 0.06075881576065131 0.003935137704966222 -0.001089789051650346 0.05272419673825227 0.06761481963002548 -0.002027772959416176 0.003880865634546086 0.003721897032131617 0.06432565449144977 0.05256691835272438 -0.04439971115802314 0.0717913613876007 0.02416235499810418 0.09018725719944075 0.04596236178077963 0.05204427493409192 0.004523795638503893 -0.004553974195390246 0.06749774013917145 0.05354483717964403 0.01104940692538532 0.07840859296572809 0.06736597569705434 0.007270614314137895 0.00693148852128185 0.006091527507134736 0.005948116931938394 0.07295930240116216 0.007495901806166549 0.01405140327297826 0.01412746270009995 0.01304082681615967 0.04929466107764462 0.01050556679659272 0.004051654904472299 0.004108340204880358 0.01084933009417965 0.004965982094235326 0.03076642420270443 0.03114772119120712 0.02963722644091482 0.02533827751212581 0.02813069081147481 0.04980676086266354 0.06096708355633466 -0.0005297063544531245 -0.008229251593419187 -0.01242497941995663 0.01495886898160064 -0.01711969383268326 0.003806944323659625 0.004205464018279133 0.003674606681481131 0.003903338867807613 -0.01506317646019406 -0.007076388493384964 -0.004232340847212669 -0.02054473656748693 0.02110467557772817 0.02924121070970778 -0.007606910405951366 -0.007704943266347012 0.003975922292169709 0.001487244399095263 -0.01817411031696449 0.009738474988380019 0.002851144244805798 -0.001071429831697176 0.05329241581548095 0.009407815674776722 0.01437546953063661 0.006429835542654519 0.01110815599535091 0.06637388584202761 0.004859737846870978 0.001736392988666883 -0.001136179140935222 0.01349812491843777 0.01306887060722926 0.005393392588854099 0.052387592419794 0.05999103428988826 0.02141874413642644 0.01820312001953075 -0.01102237437555837 0.02137336875539473 -0.0113689055409712 0.01494283168112169 0.01359482271382125 -0.02271951915847268 -0.02058692829238295 -0.02484013164164627 -0.02115816467307718 0.005431249186453612 0.006016874142023123 0.04171203444679598 -0.0163225587835624 0.008197542965268674 0.009300376209680194 0.009465653971908617 -0.01658362116292161 -0.02951063714267048 -0.01660681949599831 -0.009591179103902664 0.1108317173157657 0.005967551847171857 0.008651988056320911 0.06331509761608273 0.09608494370461144 0.006261206698059688 0.007934165334791968 0.01836393997291547 -0.001404272548857618 0.006814384979602664 0.02544948971116372 0.01589278244605428 0.009097415127964525 0.0008717985714766195 0.003381455170803095 0.01732434780338461 0.001282286730862227 0.02608166399660891 0.04138473908840108 0.02487635104011766 0.03662067127193056 0.05394237074595581 0.05154515799381954 0.03902558589412798 0.04218547969265313 0.05830338903541913 0.0587161357526578 0.0267044583896413 0.0250133204635729 0.02722642117331761 0.02489811424832668 0.01358889293217163 0.0126411019814482 0.01241221966836252 0.007475060851674638 0.01420330604349826 0.01254827987521574 0.01801976460363267 0.007369726800359066 -0.01655049789734191 0.07643734001305923 0.04684900602482922 0.009895579525411364 0.00869520772901583 0.01098027665429614 0.0100287814429682 0.01803477894780528 0.1873663798078352 0.03814534746328988 -0.04726196081281114 0.0351456772193643 0.03648460803794128 0.03339423436264562 0.1011017932271848 -0.0008703217737744514 0.03574409544893375 0.0501875911628167 0.008183056788108645 0.01550586276882971 0.01574597899890643 0.01621209927062151 0.01645154634764004 0.01221510254729097 0.0007253678723178091 -0.001184688469851254 0.01282037172322218 0.01275020034381129 0.0137518690956065 0.01173937852937445 0.007665063103238032 0.01419321255762352 0.02336283759932773 0.005204978032312852 0.004830739053816135 0.003426646709629697 0.002082208511057067 -0.0006410610734655102 0.007043177095111489 0.008328554207064952 0.003944902038413407 0.01830806035434308 0.0117297636753949 0.009910058773788727 -0.02348213650890505 0.02846465627777738 0.05322905139983475 0.01697329114951065 0.08005955451894367 0.01087173608791919 0.009639943737184499 0.001842872587727912 0.007035507669113091 0.01531531333143095 -0.0003781236069266985 -0.01085234092041449 0.003970687692318248 0.0128189334241763 0.009359245991795485 0.00960615085631809 0.03941732062164839 0.0197682692589343 0.0007315708717452033 0.0439465753303047 -0.00383649822600516 -0.004985897631904664 0.0170011255581386 0.03446744815400534 0.002571022627586292 0.03752828548152965 0.0270667016585615 -0.01860050845764905 0.05650176280328319 0.04726363968150785 0.03229694802583582 -0.02320034495911729 0.0139459926912891 -0.003350506459526008 0.0267116520785446 0.01323776424111463 0.01360859530156337 0.01901766498198282 0.01683788783592598 0.005626512336378865 0.04162971767201543 0.0421625035104777 0.01871251026121623 0.006942284062792657 0.01499437075437419 0.02116160679099124 0.01789263497908245 0.0185310719137449 0.01622530449862861 0.03566102047830859 0.02221004266468909 0.04746627737667839 0.0007132401965969645 0.001642683843047364 0.02015958950940149 0.02203536919110628 0.001702873520523763 0.01947932054199548 0.05509524592665057 0.001444222275148478 0.1169709173503703 -0.04382576050361931 -0.0003241580832392994 0.0006482628881634058 0.0006380336898289446 0.01418935403834632 -0.0008247687520781347 0.01796551521475371 -0.0006141771091861874 -0.002053389314218267 0.1080468717534598 -0.003810647916300556 0.01021452768694986 -0.02303712478381099 0.006693488653363554 -0.04535844481592918 -0.03435714394666762 0.007806466042491659 0.00462934035450547 0.01008953526923666 0.0170941335006051 0.003351699159517238 0.01599174650910487 0.09145175950159279 0.03141809107209029 -0.01990663075386268 -0.004429510664615635 -0.01328265481039607 -0.04577305437628056 0.01764173124087839 0.03729148047408175 0.03388345110209363 0.01471922037938021 -0.0005436173159419558 -0.0009420710236245034 0.01492035344338089 0.02743954947693484 0.002543735993499402 0.009379392114484792 0.01043106587038934 0.007960145417583567 0.008136971909203271 0.01014714431081286 0.001908953533389606 0.01370699146308754 -0.001958537393017336 0.004346366898194664 -0.01502688075185324 -0.03494417747634634 0.004439451281385174 0.04089525541179733 -0.003732972561507301 0.006041174583184397 0.004805394840292795 -0.02177138636931666 -0.01523793434060016 0.002500940131175817 0.01955708976446654 0.01394305606214134 0.04961760714454191 0.03275462028738355 0.01595636768619184 0.002210523712670162 0.01930884125153217 0.04988442127395916 0.004737490524407161 0.005358085373422153 0.001355367054751078 0.0009477692889678341 0.06170318412568574 0.04340152846436772 -0.02145050649691782 -0.01394508746065424 0.002552031279466238 0.001305190083202539 0.1598012424832923 0.00685712979357939 0.03810665752009122 0.007553102560019506 9.992307945582263e-05 0.007031089082596726 -0.001623930598601545 0.00874217233891726 -0.01261090940299937 0.05510297568872969 -0.01232796139646043 0.06584249832831229 0.03222194509323249 0.06117549027092496 0.002325925272507209 0.001242259495419767 0.03972325479222834 0.00841275667485464 0.0008376103825582365 0.001299217046642886 0.08103818576903932 -0.01674865460141824 -0.02483595941623546 0.01148592411809538 0.03125036369661522 -0.007225352650775036 0.06287611453664416 0.06476450702616519 0.005177691895355248 0.006989614101785364 0.008940685324755693 0.005725650369710279 -0.005931117676463282 0.0649204467502361 0.008578986758375493 0.05765185680728913 -0.03251336444668347 0.03115168679335151 0.00319237497821768 0.011302354163643 0.002660342167152358 0.005148573596385463 0.004928899919546883 0.01412137812990937 -0.038386836099224 0.005810602754056909 0.04260050987887676 0.01435492763558254 -0.03268173743009493 0.006813249821660654 0.01034466508617051 0.04698404792104617 0.04060177242481029 0.00377167951022807 0.0183459049736049 -0.000604962363157612 -0.0005538360228967202 0.009305956005602441 0.009391658064930697 -6.939730403131549e-05 0.03542289122841526 0.08741130351870564 0.06810054680083516 0.03778103021460495 0.09201346186672725 0.04923671435573139 0.1201409266529305 0.04070143986708794 0.1357589940593448 0.05137591130738316 -0.01458704362893177 -0.01900468152227977 0.005520052999191545 0.07067146902273272 -0.01309801301765086 0.09667737534237698 0.02915019453471181 0.03003689211367436 0.02188549672431628 0.08838452339084653 0.004706063594261199 0.009555449677384262 0.001396756603036253 0.003540291135553488 -0.0007414084431216715 0.00581057994865717 0.001624175860513795 0.01774163893450513 0.03774562787753729 0.009983736060438916 0.004665540252062154 0.01379630732825106 0.02515980513446044 0.03974753268621951 0.02283144996495429 0.03077022528833231 0.03960245477239087 0.06034031212394245 0.04037824637180357 0.03157064311617439 0.08330791125886859 0.1507419001406793 0.01899533340665096 -0.0002327069230607793 -0.0002115419593575403 0.008830203486363142 0.002960332466026313 0.06287533337420585 0.006937930535808036 0.001735003573911442 0.00611728751490768 0.03185671595469551 -0.005073217504560847 0.05749134755177758 0.07280019815730567 0.00546739559243592 0.01945333771922383 -0.01633675857596626 0.005855755103495884 0.01318590399162988 0.06324665038066421 0.08245791297179135 0.02718926547378737 0.08104044400466093 0.05557752770411022 0.07685346998554576 0.05820255740897123 0.003475688227072358 0.07614369253934229 0.04422469235506602 0.007209716119507607 0.1214832933549551 0.007188706202357059 -0.05868045960271698 -0.01571547609806753 0.01768427614686577 0.004488680169479591 0.008342813581235486 -0.003932282382269048 0.1068830199214648 -0.01483856928649515 0.04726818055790229 0.009282410270216857 0.005968742009166305 0.005209804233312827 0.003199356468639467 -0.05324671273779198 0.00731446362341617 0.1230502003013807 0.001574293650771711 0.006988678189029571 0.002935846080315405 0.08285855270127378 0.05492099884916903 0.001121057562925183 0.03154099104838237 0.004905273132761366 0.01171342163731021 0.002463015966646314 0.005276276966324369 0.004539203273644032 0.02658021823343207 0.0420190826119021 0.02613350256057267 0.02179942332716032 0.04509544912619747 0.006589893233833717 0.01022535962924863 0.01485014334204185 0.01450556709647877 0.01399565153288863 0.03047443309184437 0.001624641437056832 0.02208578233784904 0.08771018008517979 -0.03498533397496808 0.1001203017556721 -0.003971234911972615 0.003623877669936144 -0.009493283673952977 -0.02257196496841387 0.01011516725895387 0.0195982120043617 0.04303906144994267 0.01249392638548106 0.002351917702267643 0.01478001950417024 0.1158820727175795 -0.0002776540751677528 0.02643064269849208 0.06470353215392474 0.03265509609713161 0.09507116646352722 0.001544062782122347 0.007257582081997542 0.004782908413903358 -0.008815540202450029 0.01941093567873412 0.003540200772182815 0.04691095965554535 0.01556706519588728 0.004323575743412332 0.09988922197185783 0.002263372866717487 0.01565841255645682 0.002649469615518607 0.003231413642152957 0.002603240763868948 0.01345028614139224 0.08130794144926697 0.09453000522979801 -0.002677756906391523 0.03982098217225225 0.03050693115555403 0.02153355018261484 0.02298650958237367 0.002622074660235144 0.04289321334319631 0.07644580193100052 0.006891620083225101 0.02492618532612344 0.05412387774969955 0.02540947481549536 0.01865698147803653 0.01533387117658911 0.006105252773925592 0.08074803309724045 0.06751711019208394 0.01276531471541061 -0.01319158987520083 0.06610732101262948 0.0486997445726885 0.0943346676803056 0.04590547230135856 0.1360776776923862 0.006159017701955386 0.04920931822364357 0.06438550982251771 0.004163426912385543 0.02060522137424794 0.02803672315181958 0.01327876998413607 0.01032943762145905 0.009027723267298872 -0.008343888712803466 -0.006107292899100088 0.008289851187081698 0.00740393361402084 0.007286342345030171 0.003805204305202611 0.01582742684899773 0.01268511098023723 0.02056508957910997 0.005838574870414269 0.007193138949771599 0.005420911273352751 0.02447008662386988 0.007182597511945426 0.02271619693699072 0.03237133669896804 0.0065343933798404 0.01458239076531415 0.06811347661667951 0.01634131229465312 0.0189205402605655 0.006981928338193489 0.004405391283306395 0.005694878822705274 0.00741047424303854 -0.000224035035869907 0.0044043913936153 0.005570502720690085 0.01300579406562238 0.008582744172526592 -0.01065473714993359 0.0005050634344328558 0.003755350547478563 0.005375440837245107 0.01115170923020299 0.01293851672196906 0.003564381723610263 0.01286762908276983 0.003336451817198468 0.003029486764236089 0.004454855066453219 0.003965712656507581 0.006090385423813315 0.003331712524720511 0.006752135999584668 0.003448129539345635 0.003624624090711369 0.002887928940899686 0.003502164578011107 0.001271210767299963 -0.0003186334256163203 0.04945158765271953 0.0008546184162782866 0.002007001084491696 0.01985293998847321 0.07731058032089821 0.004299253277270692 0.004098131325608574 0.004258001834222407 0.01148631013240966 0.005629274606931124 0.005647183105773897 0.002962756971050964 0.002511292302497501 0.05111077079789506 0.002879524187206535 0.003898376824394525 0.004213519429395034 0.005220841250254718 0.002652059871078811 0.003427162483163305 0.004651816713224085 0.004175382579987553 0.0108479538192373 0.006164487957372078 0.008369006192875757 0.004775331608558868 0.004455435233207245 0.02587718919257115 0.003619127654229843 0.008621756948877735 0.004346546914505865 0.00450949822333535 0.004831940686611764 0.002951981495801272 0.004446399588226866 0.00494743752303571 0.02786799340626364 0.01982894161180515 0.01007568119356043 0.01534639810843876 0.01506646990381998 0.0163965744615024 0.008162567675180409 0.002229277513446507 0.00481691995757169 0.06286189825949161 0.004770910909987152 0.002825489789476028 0.005134999002020688 0.009122335812558285 0.002030313181888089 0.00232523126033508 0.002819901690893334 0.002057321868435612 0.003499394853562719 0.00312605945809277 0.01714524834448419 0.005542412161551816 0.003577115761917561 0.0026656416923093 0.003245318784179748 0.002417944635602743 0.001256480739189205 0.005724640739545991 0.0189162257681359 0.002481194640742622 0.001083454137468068 0.001718421760101112 0.007549866148751142 0.002390321189262127 0.002619685897476263 0.007261406766314574 0.001894742963023518 0.03893246324052845 0.006360096637151452 0.002392129054480816 0.001143775259578424 0.003322975030522786 0.006558896812171549 0.005453258897084693 0.0006126070283612794 0.0004357261106978327 -0.0003312840722211376 0.005733547121436078 0.0383943614257176 0.0335378780108598 0.06779333083490247 0.03071821507486341 0.02378867286223244 0.0284289927940891 0.0269820827518782 0.01894620441223402 0.01690527332713572 0.0227784680968886 0.01708651490723304 0.02093148432006885 0.01586021698337709 0.02644709512915288 0.01904909260327585 0.01012224057777448 0.02218887544554361 0.008014640527090488 0.01348782150043674 0.008708774108944236 0.01231431727588167 0.01615363363159585 0.004611362803134103 0.007711157632316726 0.08666379418845378 0.01929654351917584 0.0206232486652448 -0.0098489701966996 -0.00694554790820419 -0.01148126909233401 0.0002813897143393396 0.1265471064079738 0.0006707080295815863 0.06849529203179007 0.1546099473865123 0.01802835554404787 0.08671920213702011 0.09993330127476005 0.0002804637398257049 0.02737407533161053 0.001998933586010808 0.004039507701197691 0.004397734842919237 0.005181717219575757 0.006038230156069679 0.002605054250519373 0.003474289618656337 0.003141511108743384 0.00455885931585437 0.008919214712726017 -0.0002265469080771085 0.003093933153733854 0.001281956489572879 0.001400915382335433 0.003364438751802427 0.00232036112297793 0.001322334483097293 0.0006801837208043206 0.005523057220591402 0.002493757965643488 0.007018603198021372 0.007719861439034252 0.006790605471575901 0.01107520397763419 0.01419193866198061 0.0100342562318965 0.007029774282189627 0.004906950814167363 0.007231148170191641 0.005488625101784605 0.003997820937881954 0.003792904387655017 0.003547477531469268 0.03480822473051719 0.00327374384629706 0.003385228426774635 0.007851101616921308 0.001663060015387983 0.004491360863522927 0.002292953681519229 0.004913005403829921 0.0008260635065347186 0.0002061234656075824 0.0001469509121716564 -0.0008909918807684938 0.003264236842120195 0.01105764477622391 0.002481828197280776 0.006432663300005386 0.009735924734975339 -0.0001215681314235716 0.002722833771681071 0.002609932770864311 0.003333934941294927 0.003044921258529488 0.0393090860435458 0.002599769526951185 0.02584904606266983 0.003972178730410642 0.004103675678208882 0.004726963011985384 0.004811641139979967 0.006237371040497932 0.004305680238441779 0.000468380425994771 0.001479578996432713 0.002937074773548399 0.003847277783555152 0.004785343185869508 0.005322150755861279 0.00716923085801338 0.004560102213727523 0.005582131731066028 -0.003099267386247742 0.009630893704560354 0.003628846557444033 0.004043056470006336 0.003605684702311453 0.003422473958665131 0.003806729822953216 0.002735449945133805 0.00422535734507516 -0.0001422572921000938 0.003397045674726215 0.0003471127602644964 0.0005287036375347286 -0.0009305835343852133 -0.0001788288336448513 0.001786747340852029 -0.001875389579977525 0.002832310506646643 0.004092305623377184 0.0027296935668624 0.004186121489967522 0.004744337215823811 0.002754351700540768 0.002959635712534615 0.003739281848063927 0.008764106347754803 0.00672242936715821 0.003263172167087677 0.004023720099528065 0.003305787875691909 0.003934339402336272 0.005716021394363851 0.00367270879125349 0.003596010327806385 0.0001984807089996232 0.003202776551340361 0.005218190936480198 0.004837824715563489 0.00486906211329365 0.002387448335958647 0.002647633245139831 0.003174013716197163 0.0005615902536779591 0.002271651439809625 0.003493779443996727 0.004568085394583556 0.01276420890815746 0.00671857066892011 0.005344860856712329 0.006994664236065368 0.007828138466228015 0.003367430129398803 0.005027640229846753 0.006436248150327879 0.0044011036184138 0.005350940362843095 0.002262579327422402 0.03201122308933477 0.007564556404169776 0.001099968649942534 0.0007956885608145896 -0.0001918382983939615 0.001001236725647313 0.007749705721102691 0.03539280136679568 0.01638927566480018 0.002792307870638798 0.001486294590788959 0.01948881566719396 0.007115699977083534 0.006408085432890632 0.007478415609640389 0.001199263742462935 0.004510174637624925 0.003882737561990514 0.002578843861764644 0.004500513586023184 0.004008112270229573 0.00358575985691244 0.004684126582489174 0.005275393197792841 0.02894723093781567 0.00469867525697104 0.01676952655141639 0.01957715959050148 0.001445904423285376 0.006684976958893048 0.0118882374787112 0.004700709615034933 0.01006864404461738 0.001360774610804446 -0.001452448291303236 0.00296702987617486 0.00127476804992524 0.04118308650454432 0.006861602448491721 0.008789591611561383 0.008809907284638036 -0.0007888821182403581 0.002374236952484858 0.004591822475381705 0.04236419712318997 0.001093455323959436 0.0007283573525206505 0.03560571028811708 0.002095842399394602 0.0007755253573762745 0.03784304670926861 0.03078065816496204 0.02608326899983755 0.007798228727067803 -0.0003547342227284309 0.001735648919328773 0.0002717989556805283 0.007433642776315376 0.01192794817840099 0.0008899731452961526 0.001076184388813682 0.004794180268259119 0.003212396634716591 0.004662645874272736 0.004722331265642138 0.002068559317065122 0.0004643685634622248 0.01052613746362929 0.01976089377886253 0.0342336573427657 0.0156255433765732 0.02082731004406092 0.03096845613735529 0.03337567550991667 0.01324731668786872 0.02771277297802413 0.03054359917398126 0.01486637915927234 0.01353636484908608 0.0188286616432563 0.01999151144683326 0.01182789028953912 0.01631682238178217 0.01563688003602503 0.007633840431437239 0.007190912030335556 0.008953332684145988 0.01238981387023337 0.007090861580441959 0.0106467707181216 0.02741255833053755 -0.0107475516842421 0.01084086610595906 0.01463887473882667 0.03370011208104852 0.006660986651535039 0.02720241429610078 0.02026199881066524 0.01678670763784429 0.01384663359840157 0.0142428804457759 0.02131670715947183 0.0105523497568707 0.01467314826588435 0.006575156581105328 0.003425620848823544 0.01533778739212243 0.003378925131872968 0.00323848557905776 0.002762685125454784 0.003633861109077505 -0.001011694079672736 -0.0002635045564284424 0.05481109720534874 0.04761129860536755 0.006594253095073685 0.007351670620156608 0.00375079340906732 0.009618943548566839 0.0105237271749349 0.01172256773475319 0.003827159897162363 0.008061512673959652 0.006669353600064752 0.001567370256147619 -0.0005589382571977334 0.0002962324623295696 0.004736513791446473 -0.004084047396472987 0.00336087619870794 0.01273781473023661 0.004358141879750118 0.008113710321559997 0.01033451675952711 0.01450844054403155 0.007312253870124547 0.006498442662089558 -0.003051314062666052 -0.007819998957634619 0.005853490392237555 0.003238889678550623 0.02128627418666467 0.00885346396712075 0.007248611932156592 0.01674285785799048 0.009232445193372267 0.01069863016326071 0.004060342109967321 0.001420691104635386 0.005654166786809396 0.006716930157933393 -0.0002787532006215838 0.0001511454235041871 0.002073615049843199 0.00459878468691657 0.002305023456869332 0.007566871311539104 0.02003270808675998 0.03242461532013072 0.0008641724284117972 0.00624176563027728 0.006124130609549452 0.003383484953548472 0.04290373785298567 0.04897976405650689 0.007346642393934452 0.006943965512091917 0.004756232474022685 0.007175167396955704 0.005947347696604354 0.01790849595645258 0.01560776779128924 0.05059370983595315 0.04761197132891735 0.03246363363577908 0.02677890615262913 0.009883728855781454 0.008386795910513351 0.02087872034759815 0.01806834721274495 0.05538286857893078 0.007180435828509529 0.04526318181593507 0.06431992916034693 0.03842759396802711 0.05446187613699182 0.01538398744119034 0.01925207765087405 0.005119583840624688 0.02365998425557349 0.01606458373238019 0.04237198613109252 0.005623981367607558 0.03789051590501291 0.02726306337404606 0.04866273196774776 0.03123491523228233 0.02067709023968347 0.04093575091448137 0.04857879438157376 0.01825226882477445 0.0136370752512936 0.01283278516649598 0.004505331726408036 0.03452254820977688 0.0387951523772805 0.02047836752692042 0.0396827722656185 0.03032687935424188 0.02563507538429798 0.03394227979597941 0.05170649876546147 0.02020947335700358 -0.0050467727992875 0.01701134009175731 0.006307118159884682 0.05390888505120298 0.04029147247663138 0.01008691067126872 0.007693031327789888 0.007969677738932885 0.01286902993793003 0.05676737456843611 0.05821926996932922 0.02550778395981275 0.01999540584282859 0.009386619334768238 0.01527481592868207 0.02767629429373907 0.02254277508850531 0.01872448885854166 0.01387812771979603 0.0304016503980855 0.01971053792509816 0.02520738580463388 0.007124413522895322 0.01053707647231888 0.006946690462064058 0.00681167578819416 0.02390551545540658 0.02226144577699928 0.02013818669180599 0.01811541453904809 0.02157908217605088 0.0290343395358862 0.009575319656342927 0.009204286406014466 0.01458354027585183 0.02201841089918896 0.0154384318807955 0.01262826079090131 0.01239430663400463 0.01862550110760683 0.003288430871213941 0.003615943439182889 0.0003834080848652646 0.01673024579218715 0.01001358965123824 0.02063097314703468 0.009447438352732613 0.003812957667922432 0.004821549862810645 0.01634768957805562 0.0171660349931241 0.0500538728425453 0.008543835597803003 0.07052651637072205 0.00118521022651982 0.006634238385148661 0.003194763720684497 0.003460758256543489 0.003424524399862042 0.003061662863598565 0.002212223998372997 0.07511944276351849 0.01603326345713304 0.03634460198703088 0.008983614265599153 -0.002114942834786824 0.01632757755285056 0.002429261406317138 0.009811249594063523 0.007709667546729904 0.009436353832634768 0.008909829237993659 0.004516814162087 0.007350128982388829 0.002757384576094811 0.003491495955389139 0.004819392007424605 0.003128215196545936 0.006283535895042532 0.01891643023925159 0.01302703170545644 0.0159768509713769 0.009803061037118517 0.01055432774241253 0.0001175806791314585 0.0005753425452497121 0.0007312929762877522 9.029549502692345e-05 0.00622719383774712 0.005363652269488635 0.005187614200450351 0.003639151724283127 0.003706400328734219 0.008014789483975049 0.003152452053979729 0.006985935341516329 0.001145049351322949 0.002743511195362195 0.001528994807143324 0.00498402589683171 -0.0003871693692241853 0.001196927708119764 0.0001263572187272789 0.01080060524037208 0.00645349734739483 0.001042082050191677 0.001837209030010518 0.005547107643986755 0.00615985612824396 0.01296102645459617 0.01541449337778064 0.002711817211314174 0.002400248791436326 0.0004610287403488709 0.01094269324039619 0.01177434483411668 0.004170987489306253 0.001464187204770522 0.0005248105264469789 0.006068278902371472 0.003942600473897132 0.01126220366570027 0.00716417642834769 0.0003203261788772031 0.0005823078382666933 0.01259754436642257 0.005512805791137403 0.004261595681110925 0.01277303575626647 0.02281327078772761 0.01846143545853126 0.01971749470415661 0.0194505783471441 0.01911163809365984 0.01680905642287598 0.009301225840986308 0.009118205913908389 0.01867844268980028 0.07402239532262581 0.02882638317758092 0.04876791812815719 0.03265162703081803 0.01884657527577964 0.02698315587381097 0.005441319474618938 0.01365380143216152 0.004716696049818123 0.000368571214501246 0.02242704958850058 0.0003982939330818631 0.008804853727513435 0.009227024955996203 0.008842630008543682 0.001465429749737299 -0.004865946511323431 -0.003527319009851892 0.01434482621101835 0.01888683396526576 0.009140943552145554 0.008798752415574523 0.008346300683344987 0.001474969548062861 0.001266174780481782 0.00588457806126624 -0.005738005256880062 0.01014921467477688 0.01333960989270692 0.02161359610585573 0.009762853858223289 0.0254179908468814 0.02986777885792739 0.03675659849029538 0.007695116662125168 0.02021977023138988 0.02374620417181787 0.02283199232415213 0.004248602943698242 0.000203561096446824 -0.0002180730576850163 -0.0004447858304640165 0.008269472609690231 -0.05574922525515768 0.01900881305600809 0.01872455445250187 0.01235387314870457 0.01167495341264488 0.01098891593074035 0.008828051233291364 0.007338385026680802 0.0189432553827703 0.01685432503614539 0.001192171255047872 0.001242246536370767 8.990769003958827e-05 0.006282300320363709 0.004872690637812531 0.003236012889218277 0.0008996905664910343 0.001544731234153728 -0.0006116614055030522 0.002737215336142017 0.0423670843744892 0.02174410750792754 0.0315864787890554 0.02829848356200628 0.02802749241826192 0.02916360020058553 0.0325082528258074 0.03712995034060664 0.005996797167364824 0.02665167901300718 0.01594982796825522 -0.0009911698919979016 0.00438142089532767 0.01036760771922935 0.01408237769019893 0.02891965545583486 0.006926520848350656 0.002711547202860199 0.01242242527384207 0.007926724591504931 0.003547971278757705 0.01257632461725355 0.009011516440363725 -0.0003639997855315391 0.01471202294966276 0.01000943196954118 0.002807168916527342 0.00551315114987137 0.004663906160545395 0.004514606203153519 0.01497998163460878 0.03194370370359084 0.001569494717285434 0.0112844091650967 0.01396190949122451 0.007572580505795083 0.00438539496539115 0.003818230875587838 0.0007755046578091976 -0.0008753952181910419 0.0002959618448089384 0.01509519471798592 -0.0001829659027160333 0.009472481523191677 0.01215144250069482 0.009299928039177705 0.00380131902349557 0.003904349916184734 0.005840256093352562 0.00876693785017644 0.0330683102002321 0.01128574903946278 0.01562998844741757 0.005954184375930194 -0.00261913919564415 -0.0347197429053791 -0.001350668294285292 0.02617283627312809 0.06755532471607098 0.0186512710028501 0.004301939654709473 0.003448719643246623 0.1489296994636092 0.0187597901907085 -0.008245458154687335 0.003687011038006353 0.006732429653568968 0.03147932782912483 0.002869525764281991 0.04192333825415667 0.05115604833545003 0.009408693776989366 0.02595935019514448 0.00371078760254547 0.003601828099009328 0.0115742483787887 -0.007043614238661291 0.01403520878553837 -0.009724269016999481 -0.00678241482405597 0.002725023468999738 0.0007262796410214498 0.002708260774995063 -0.01667562356099145 0.003851320766845644 0.05565924630642333 0.02534366442891866 0.06298612298039705 0.01533559454093318 0.01013394234689003 0.002777662110551971 0.002750183735720321 0.01416675952424516 0.02286037169821558 0.01973209960799402 0.05049956602949489 0.02260223676143322 0.002480464987633816 0.02775150827708097 0.004789553454483914 -0.0006077362845364063 0.00464391600204512 0.007955263814601916 -0.00225905221850995 0.0007390004112566394 0.000434921384491976 0.004044862597181288 0.00357735311041782 -0.001302315261271549 0.01668414963920306 0.01102773389175262 0.009771886628155244 0.03402905906527478 0.01614218811133753 0.0101273159777486 0.005009657778541516 0.000167846076694218 0.02313720849101344 0.01351095179654879 0.01011986876598359 0.008714710179954359 -0.007588628676506311 0.002002543074138468 0.03907465644878147 0.0520543001889826 0.04928992424827809 0.01663043095860272 0.01404133294021157 0.001528823722396572 0.004133887678714875 0.003393989749909057 0.003097743189228159 0.01593866595390999 0.04413921086055698 0.01680714309965944 0.01453984248859936 0.02990024113314451 0.0110579514082309 0.006287630947454739 0.01736482476255029 -0.001781359399679052 0.002558455855077203 0.0009530401480485404 0.05326626959984251 0.00870185250630162 0.01549488811853929 0.01717999976222998 0.02752029371675509 0.01220457649060503 0.03563111629674078 0.009318285228441478 0.03178060088603359 0.003136725017289694 0.01521203456406536 0.0149785117413379 0.008683950121248266 0.007981246466320471 -0.0005848260774335176 0.003690960838571625 0.0009242113001599461 0.007165958184288591 0.003522398543548583 0.006064403221294688 0.007522089257700144 0.005047645233102861 -0.001920943919101837 0.03898969112067673 0.006193113124928237 0.03562168906693756 0.00950660089648896 0.01762356473098799 -0.02542665795122315 0.02555745025307828 0.0568420866417739 0.01321230582061072 0.01140644119210669 0.02226943747891677 0.01661461670561327 0.0124092375699414 0.04965966718156735 0.01847785062818259 0.01870381551722439 0.007411871977974925 -0.00415783114794725 -0.0101800213872682 0.007262231541449125 0.01023040999297648 0.008109212160156174 0.004647175838005328 0.02846027043533736 0.06242066647467655 0.006731647215756149 0.005558725798519058 0.01168235820332227 -0.009439907549202221 -0.000997563550123638 0.02295806727800262 -0.005680657011829678 0.01462811253765031 0.02791151486569152 0.07393916503713134 0.02390655385875903 0.005057294361201285 0.01075100544737817 0.004249109772131291 0.01290961772652355 0.006070902481599792 0.01998399306893008 0.002299734235877311 0.006351092454680666 0.05443097598023615 0.01413421313851893 0.005892930049804094 0.01163532825832455 0.007623664402054613 0.01571688908963475 0.01741555594341496 0.01700967170383419 0.007771677875160335 0.001122256466889793 -0.001807165358438903 0.01092060963765698 0.005091591326471311 0.01497583053845912 0.02773495696510114 -0.02939067288063031 0.01448755119665503 -0.004328065272992501 0.004754628245895852 0.03293680669210491 0.03451309387007247 0.0001256315422929808 0.001341208463364231 0.004870803829273559 -0.001000007536494352 0.002411676119288907 0.00466457725092069 0.003547268552243121 0.003269673333125391 0.001589588706744186 0.0002348898965060202 0.03085444266961301 0.03581651299084473 0.03026778010939921 0.07328771802242445 0.04339306152561567 0.03819749358236733 0.01481732634566869 0.01721953409779012 0.009827028570591818 0.004678928180504882 0.006721924269256607 0.003981934605425658 0.000957794634545445 0.02220738631723898 0.0353489199266015 0.006061164658063669 0.006663848351982886 0.008811964956875057 0.004805063847262092 0.004781398035561423 0.002592782824583713 0.008880085347927297 0.002998308218827608 0.005632202391066505 0.005655849489800907 0.008419817320608871 -0.008420289273174498 0.01098961385591548 7.831623139473832e-05 0.0008794038242254758 0.002801334749356069 0.001015940208790607 0.001941339954612322 0.01496601925076713 0.003788201510263125 0.006429747843232852 0.005727680486407681 0.004696523286707018 0.006577134857752286 0.004995060780488663 0.002851299945031628 0.003483177284148945 0.004209457949274768 0.003301974356562555 0.00313595667743146 0.0008207286154625532 0.03714408147122138 0.03976719889787941 0.04232438629385033 0.01418078342202392 0.0005592988419197252 0.004310784260145278 0.006367628652522129 0.007192541233423235 0.004264065320930312 0.004326248128396888 0.004282599685324719 0.002801656264556338 0.004986178846017621 0.004866602263793538 0.04531164418705678 0.004662748011015344 0.005544551200089427 0.008973562795565932 0.005404220193088927 0.003982648298467794 0.01232471828820577 0.01241193558466787 0.006015300209606555 0.004470669018058977 0.01194446621327528 0.003778736825347967 0.01761420464593564 0.01152619320509368 0.006906248819810846 0.006949605434514635 0.002861942615467597 0.0324862666862463 0.01412727386902571 0.01638360211466898 0.02335228912343656 0.01838698151280027 0.0128518249957565 0.02173977514483292 0.01097537771650849 0.01462612693529456 0.02048039939353911 0.0196667201573944 0.01212948842234153 0.02121137195044565 0.01560358508425933 0.01176465248470939 0.01527702394307753 0.05698016541075345 0.01383917926019338 0.01211363996954916 0.003518509037292515 0.001548262044843158 0.003506888512001122 0.00222209576204376 0.003281913095321939 0.002586712101025319 0.0007060682820232138 0.006701356164618757 0.0004791100844764366 0.0001436994557569462 0.01495423538574794 0.02811904305537006 0.01119726184344579 0.02065802045502595 0.05404422141236247 0.01907689301893107 0.02315134901963141 0.009245772869227021 0.01639203339225959 0.01593021462583808 0.0250404190679022 0.01180952005630074 0.01800529181434824 0.01137418535478784 0.01314475816401811 0.01404028338609935 0.0338354325277175 0.0205472410042233 0.008943460375943161 0.01297507725417277 0.006963197321467154 0.005743783811327729 0.0132771813319624 0.0158230367039661 0.02785638486306646 0.02162795881916843 0.01030517614432925 0.0008413843294620014 0.009935289451938162 0.007355498778732506 0.02547546455225071 0.04610376047038985 0.04379929774826465 0.0242919771286067 0.0005879896744968332 0.02283318768953329 0.005744560110578266 0.01821360507362175 0.004448688888256809 0.01899337380922731 8.877392369837685e-05 0.0009167786084639966 0.001081067303267894 0.008437249335350087 0.01148921699132206 0.003241193774071257 0.006382145708178087 0.01392520957245527 0.04676415507281421 0.00787177422892839 0.003320176553997343 0.007921853102988562 0.005714333578266758 0.003453727478395143 0.01056659506750296 0.005596573502088899 0.002785269556025395 0.003731435359445245 0.00393522211738143 0.006649781161885747 0.003503417498646281 0.003125340176744223 0.001676683148066538 0.005923683569235892 0.03371176852666578 0.005249952975781002 0.005395331987891739 0.002204260850947248 0.01171307135178787 0.004056319946629252 0.00627184595936904 0.006383322953841451 0.002001760148748976 0.00516385919182497 0.0003114114989654346 0.06045454548624472 0.007830829592083999 0.005673523237368151 0.005617151625907154 0.003322229667160113 0.001388223158076201 0.004172539842738954 0.003384948684791972 0.002428319045830401 0.003482824068138264 0.008560384784679577 0.004252156297805286 0.004437223636224315 0.004228778043256524 0.003972084651125966 0.01092518456700846 0.02063925989130876 0.01061110130044763 0.01560535258870164 0.008264096524587261 0.04560543663630233 0.04814798149162772 0.004023102417182769 -0.001161710017444293 0.000574978399916851 0.004415571560565971 0.007298226561760571 0.006371204724829579 0.0110029498395633 -0.002899945725279104 0.00451611841132197 -0.001284327544993384 0.0005053505818834406 0.001757125016193158 0.006924914434801675 0.005170359302512606 0.006397712763209188 0.007545117084191816 0.009878313269349291 0.02902400244879799 0.04829489728113454 0.01032102865493 0.02262592266022748 0.04589898878360005 0.02198714548197004 0.04501377841722035 0.04565646380519391 0.02267734679801783 0.05100400377537073 0.04372879898578831 0.04510769995643116 0.02110211252513993 0.01308683579350104 0.03393865332739726 0.01384440796550514 0.01601672221930805 0.008528014300505787 0.01959824595556699 0.004427183914374373 -0.00682838662452707 0.001520438504889795 0.01497235352042779 0.008478036472011849 0.0133730647793297 0.02086641166494655 0.01084733519799702 0.01457382249789618 0.01431069219091508 -0.004139585484096811 0.005354469274221789 0.0001974338475750602 0.02153302087614475 0.0018297269109869 0.004428777685406666 0.0009862451377958502 0.01594236265238745 0.006449079847512413 0.01330713790280361 0.02053656642240707 0.004407819331478924 0.01018829317992432 0.02458727040692679 0.0039937529825773 0.000608652880275417 0.008844472714115367 -0.009145536778436318 0.00481078678467432 0.002604141728583142 0.01274400097163079 0.01906741693089471 0.009663764495859173 0.04746898995310653 -0.003579954102198176 0.02296291898944347 0.0463159992803751 0.03165916397297965 0.03743696853023339 0.02798448964948073 0.02178653911728583 0.02241830766993547 0.01623538633133526 0.009617569155500221 0.01805954264250094 0.0128475287278955 0.009382938433895449 0.03356905831942774 0.04707283489525155 0.04713394129496912 0.009186422460167345 0.03232345361210822 0.04880361354022736 0.03341842221784302 0.02871989636727568 0.02657499492190227 0.02467701752248109 0.01857475162640842 0.006973388622590095 0.008089472461722289 0.01056323560901617 0.009272745333522455 0.013273518853603 0.01281121670320037 0.02402132312375818 0.01619885154917324 0.01854232841216281 0.02567981865660715 0.04367573853970916 0.01921108978681224 0.01045637007514853 0.01178434704610856 0.01381488600095291 0.01228110956165425 0.02069256834212515 0.01972150790529115 0.009613268384151783 0.02062116542532196 0.003638138097632347 0.0005840748923658849 0.04805964536679572 0.03336194330042627 0.01638914337010224 0.01811890552435515 0.02024020893085484 0.05000391285092095 0.05285361384997968 0.02877860248301074 0.0224518994628607 0.02455214871418192 0.01614012233075337 0.019787030970844 0.02119280416509877 0.02428046532806434 0.02248134230068604 0.0159108145068858 0.01561204574917692 0.01363446665606845 0.01968624183117352 0.01332390340132658 0.01795164353826147 0.005177174953821549 0.07763360909668394 0.02834887219005823 0.0142758187749417 0.02268356066864042 0.02825411552801801 0.01335131401315701 0.04732609260938482 0.02345026217045904 0.01611864187468182 0.02328345238496113 0.01502334990735618 0.008686169582541424 0.01409122438340746 0.02775952643107534 0.0128776925033743 0.03572014059305911 0.02575008771060983 0.04840617579537622 0.03184228335057668 0.03501028631711537 0.01965939500376775 0.0125064438778417 0.008282475099869289 0.01310761235184079 0.004972385210999844 0.0006181619710450768 0.0207478490238262 0.01975857844833918 0.02794723349281251 0.01126147017584456 0.007908530847295826 0.02790926578038227 0.00242479995102619 0.02294781207634113 0.02520692336018334 -0.0008944998750316553 0.01068266310980443 -0.001259577464776934 -0.002322859331282775 0.005185309614451824 0.003586509606220853 0.007236161134127884 0.008570017302081033 0.0005403485987012295 -1.428325139982172e-05 0.004969616800933607 0.01292469378662027 0.009508237143127584 0.004206710037509224 0.04367029989738371 0.01815661361594228 0.03022765905625017 0.04427563218237187 0.005067732779601635 0.01414994881202107 0.002542296282305126 0.01037968335575804 0.02002552708989932 0.009386194557050581 0.01218674611578799 0.01354675763506724 -0.001887404893824305 0.01823235996664224 0.01904576635997492 0.01864664372137946 0.03115827985889103 0.003230773295757068 0.00402762869982578 -0.001284402986365101 -0.002226142942626494 0.0002524534788678196 0.0008671279317285056 0.003213089643235401 -0.0005095759348377216 0.01111223559050296 0.004313673192973206 0.01090348520342711 -0.002906597381824607 0.02418978530553051 0.05045071367765153 0.01089407547243698 0.01314500375556613 0.008875206517288412 0.01390574590447184 0.008595209425751229 0.006639395077553787 0.01088851597682324 0.009823264165065978 0.02420587042398673 0.0229420584775883 0.005696139857530139 0.007296115442783674 0.001447136988791872 0.001153913657525088 -0.004702414039467217 -0.0009131060702708512 0.004788964863911374 0.005451693017568742 0.00194458658503631 0.004844276184160906 0.005717385522887991 0.006897929320760113 0.01217531080434561 0.008218882577791044 0.008748041867510966 0.03352328382570379 0.06726106140682292 0.0465285898790346 0.02753057647706179 0.04229137624753584 0.01589899120488539 0.00115072785765425 0.00440635344497437 0.00506895068287005 0.004092933783108417 0.00389996526021705 0.01625239022881766 0.00759244551736054 0.008319887579413888 0.02003066663644953 0.01743842605173396 0.003765934269202007 0.002479133438318796 -0.000799875325191498 0.001149364285989904 0.008560217674583953 0.01015942613694011 0.004524914407772738 0.009065661094280563 0.009477579491957858 0.009562271876305315 0.003356413887087667 0.001620062149151209 0.0007995311691032197 0.000999820774116914 0.001035379218520546 0.01016120123962794 0.003126518250208515 0.01906036013378717 0.001728636660939944 0.004936235670973706 -0.0004255785505919365 0.06057404441521592 0.05082217491390945 0.0005490695239419185 0.003528985612825958 -0.009648126947017591 -0.005476868785374185 -0.008122260066475819 0.009347757065670788 -0.004514983111999867 -0.007913039560843963 0.00418787694615959 0.005439831336880388 -0.01116646146015153 -0.01647583476230462 0.002336244564190398 0.004780946541782405 0.003993240568800924 0.004600008552293456 0.004084104461711372 0.01415318451557205 0.05456037829550585 0.08406919843379675 0.08954572272689069 0.03515079651823394 0.005245458241739867 0.02270722763424394 0.005504542681527947 -0.002028631743853925 0.004645572039281344 0.02760316835011846 0.02784389326319712 0.03281058841840791 0.03064424276378777 0.004344717965329752 0.00504641930954409 0.004127571790418979 0.06126364254232484 0.05613872337136798 0.02629473427013587 0.02565957453579968 0.01962224699598008 0.01765209850560268 0.02804751798424218 0.01305923022331734 -0.004034513683607428 -0.001527910399908046 -0.003408741316562404 -0.002979314534330286 -0.002859245273081147 0.00461643819180487 0.004592804814263173 -0.001719539259896899 0.02014397916889938 -0.0009730971738710497 0.008794846717771431 -0.01175239698267854 -0.01295281452468067 0.004935885921391844 0.0001855848105678923 0.003114298659192363 0.02009598872708237 -0.006702165378186882 0.03573691264522388 0.003181792392331121 0.009126514347469064 0.009399073059385176 0.004732358440617535 0.003661343594962761 0.003097017068316945 0.003389400013682805 0.002156481524641032 0.004505793292263891 0.003866486164288675 0.003190703262142938 0.0174345356768634 0.003803742820495253 0.003523158433610919 0.004188179449722088 0.004390109516737693 0.002987852968257381 0.005392136648075155 0.001692680484213854 0.00163006733736321 3.121979863592803e-05 0.0009781458029932575 0.0008437138851377675 0.01019891804588532 0.02221915731015327 0.02429358017041481 0.01336177190635411 -0.04076334262062012 0.007365884354725534 0.003968510069320312 0.003524673662919234 0.004016811079523867 0.004162422471076305 0.001574538364440716 0.00264189037103726 0.002046140808741996 0.004367340712683118 0.004532414605752352 0.004643810056211689 0.004552731602913456 -0.0305085000538777 0.02050947062006887 0.001265483726825551 0.004056942680921058 0.004236381096273461 0.03303575132234828 0.06260579579538918 -0.02056007790154968 1.55585902003509e-05 0.01298648669743846 0.05087870702148367 0.01141113610324067 -0.01816813637055216 -0.009627348475687561 0.001558838865117138 0.02049818508607152 0.008931030734534893 0.009705246641820252 0.01139463207310622 0.004422276197121333 0.004753368627697509 0.003426287398200581 0.0003025580142612551 0.00352577702783267 -0.0001071590702226182 0.0001277424680865113 -0.006411088437346502 0.005124002761261699 -0.001739086481540412 0.0506665308321479 0.004449140119267667 0.004323858714052806 0.006415348907761655 0.0004185081135118216 0.004149924831350841 0.002433747267105199 0.0556500453965632 0.001336383764649784 0.02134224133728551 0.01756906553994102 0.006654187146818585 0.002209002516410916 0.004047300629578524 0.02240785055635102 0.01511515088847926 0.01821016796919579 0.03294273389310582 0.05859765923368686 0.003043722534125741 0.0130777856289897 -0.001075002838322131 0.002690262223796213 0.004845318261194569 0.004422966137804204 0.0478388521922298 0.03360498812153373 0.0222555510534898 0.02725828620914996 0.011590712863506 0.0008367370422975925 0.04550800093396429 0.07365504972651596 0.00271683192433732 0.006951721439224403 0.0103142930214034 0.01825490477588344 0.009166644210902027 0.01175211577997 0.001926987241116795 0.01327887544709307 0.0196128534712872 0.01104373089261162 0.003752412404096234 0.002936025942441462 -0.001394341717522422 0.01766146510690211 0.01762932786263664 0.07067206165038126 0.02078392229127332 0.002918432839159488 0.004646435997200208 0.0220484403343738 0.002653462531391566 0.06599656486582622 0.01675306026931167 0.02176777880736086 0.001548575313636661 0.01893189155953401 0.01061720906661798 0.01969749343683152 0.02484312374813287 0.02199608019611651 -0.001356968341834693 0.008418973219240771 0.01433599847062533 -0.0175781931323435 0.002791722176874373 0.008058642191196992 0.01280408568725424 -0.00770383134272588 -0.01890421133488827 -0.002600507514360741 0.004000192336188368 0.002420730734135349 0.004300067767159866 0.007046646924072903 0.01099617817046886 0.00732634342461887 0.02690444402053561 -0.0002463605170487203 0.001703423755779848 0.07211986449996757 0.0211446055413879 0.001318935370670228 0.03762624144824593 0.005065991803747937 -0.001036286386827209 0.008002030330622779 0.002488040070354993 0.003460541425426262 -0.001168848173618663 0.005369503700739619 0.002751605262108749 0.003214037538581043 0.0023781971794224 -0.0009813185004359938 0.002686254236929544 0.002577602917942557 0.002340880931606287 0.00331179840208055 0.003932147416412742 0.003239019033214201 0.002431476317239037 0.003186167735769107 0.003938788826773884 0.006213087763921959 0.03689000238653273 0.03543680149069436 0.02500761605103355 0.01771369340835877 0.004193012698313598 0.002713377197577272 0.00212799181849226 0.00318230741452134 0.04465520336694732 0.05246500523623314 0.01776497719037764 0.003199638237736507 0.005827428266701227 0.004385717485914186 0.00630106911132108 0.03802509012868521 0.02853899012918747 0.03039542134840023 0.03108398319982841 0.03720672391690136 0.003793727054923173 0.00697368932356336 0.005355337356527128 0.009876662208565666 0.002582770124113645 0.003476740074853917 0.00664264416645869 0.006800496988838674 0.04622104945563681 0.06664105383185298 0.04188532019634388 0.01616723793549106 0.04253417070607488 0.01077172972050843 0.01135741279593959 0.05771740209453747 0.04514519034379898 0.01501621372511707 0.008458362804206265 0.01023669034522405 0.004048151581717278 0.005633229239772304 0.007593830877694905 0.006915974511234377 0.008410646536929767 0.0574379593667891 0.02619086548767745 0.04129217714491617 0.05347315848416129 0.0545083585302932 0.01065724488090162 0.005889908123778812 0.01906403789745906 0.02278863672267911 0.0326844815501388 0.005952780765810322 0.01384146037651366 0.001154392500028795 0.04282359473278984 0.01803326309653953 0.006317039714380039 0.009976810147391784 0.02156669306031592 0.004845584506236672 0.008161804071322951 0.02342132149147967 0.0139806892580335 0.0249014440845394 0.02224507483885258 0.01322984914729612 0.01939471890679425 0.009003723620191962 0.01775947537217183 0.007276974656004978 0.01005454548372964 0.01305314102758874 0.02120983155161926 0.01529513636198509 0.01371015213259925 0.02198790156649284 0.01095054778240242 0.02114545288851429 0.007168217883956503 0.01631677579469849 0.02176840910768627 0.0254248048610608 0.01396713251241397 0.03663615014944766 -0.001949908947089149 0.05656573811376299 0.02371886495742275 0.03080761079586435 0.04039888630464474 0.006634972431632219 0.009539419268334333 0.002431497786504915 0.002697275300567495 0.01341108514309985 0.03079609357334492 0.01448722686031635 0.007184434926080326 0.01379734960317491 0.01662064833106178 0.01663334052505404 0.02798420692288604 0.02406382235943746 0.01557276209271825 0.01129120679928505 0.01522038551703978 0.002113275483953128 0.01015111606982133 0.002661048393675238 -0.005468696794065299 -0.005075180322554598 0.02623985464369125 -0.004292515312997531 0.004180675584943956 0.01069078822631562 0.004863764863357298 0.003533606370182222 0.06093688317565627 0.01640962741945117 0.01216137377561457 0.02608424068725812 0.02856698126446941 0.003698039800869226 0.003298719742335825 0.003777382780533791 0.003446589038094629 0.00152295879496064 0.002481696396770936 0.002866668528302626 -0.005255479875747865 0.01461370683850507 0.02737245592892537 -0.0104389895213553 0.01056493700621332 0.006047192055544662 -0.001875026570477596 0.001401431165651611 0.004769508107668107 -0.001231437949533179 -0.002770883995623581 -0.005503430952807463 0.001329651197193584 0.003496283019034159 0.002433173051976335 0.008341100496153015 0.01473642260882403 0.00943246578738759 0.02660010625323634 0.04894556658509731 0.03939503686685986 0.005178913869895353 0.004232513378184078 0.001054372085296645 -0.002585519393512796 0.04899110930655858 0.05795779359047389 0.03892048304485057 0.02501581819159182 0.07907074170668614 0.06389050998891342 0.03792653259334686 0.03235115082027618 0.02946923988819854 0.01041747390245068 0.01665927919528137 0.04524317933955951 0.07232360007022484 -0.01159213964815432 -0.009240251906060997 0.03794414057115214 -0.003479723476187876 0.01391558217146268 0.03097449644451005 0.03156881267146327 0.01019696187498105 0.03462094239724025 0.04078517175543671 0.009512973154824755 0.02097693108670124 0.006048912982231077 0.01397845455126478 0.01412138378506344 0.0007363411561910689 0.004185013670502913 0.007202961208085489 0.05552814150050112 0.0139850693550576 0.01680454115953431 0.009180299128791036 0.006391409107001174 -0.005258310535625014 0.003815375950746502 0.01104242290938194 0.01006279013262225 -0.02549963937538283 0.009520998901712627 0.05422212764439828 0.03561077704764365 0.02394218312537927 0.04079656549631644 0.05047428400791243 0.04279403850016219 0.05957783522065308 0.02764488383823898 0.03957152968509969 -0.007513380779724712 0.07240959902827569 0.02446474703919735 0.01935030882677731 0.004698677719631752 0.00197183622274542 0.01051182352612997 0.009977644446665119 -0.01117292873048624 -0.007717662209543985 0.003629643918232802 0.02492382624920741 0.01643206984587251 0.0270224680612577 0.03054679922178178 0.07205713108979839 0.03471399983808123 0.0556857499955002 0.04904774767679591 0.0703414827445243 0.03055697740565831 0.02479693926457833 0.02474822477715262 0.04863108231324222 0.05038600385828106 0.0191155921371758 0.02146690369580661 0.01230571521070368 0.02777813272578887 0.02019669758183874 0.01268480790626288 0.0003095125739183147 0.03493940692267336 2.040853279437318e-05 0.02384731544933706 0.04222094324481194 0.02666717260098537 0.03803596749299779 0.06207086033679646 0.02154695475873968 0.03046240440919857 0.0218070427371032 0.02934831751406149 0.0409138398648155 0.03441951019564968 0.03251483946261115 0.02462185038388272 0.0138406807510161 0.01555548290029491 0.06001256643986554 0.05734153385412113 0.01866921418872355 -0.00167945896044967 0.02393177953278496 -0.02983391001212577 0.02143494619089376 -0.013942536095166 -0.01242743183505511 0.0006886721353661433 -0.01570108603511129 -0.003946308528289322 0.0007201875419926505 0.05523495797374477 -0.007298827480371143 0.01720503429403126 0.02087579271446244 -0.007220230352057207 0.01872411941788504 0.01931429907660448 -0.006353642976666963 0.001345431048712018 0.02427570205276341 0.01373101969079434 0.04194550234431996 0.007136074811587916 0.01234327532144127 -0.008484492805481209 0.00317710690410248 0.007777318137295595 0.01142646049229232 0.02066014229163736 0.003358517753036393 0.005568464859005894 0.005941190464951747 0.02670983240628126 0.02305125132599824 0.02093174787224767 0.00358146104708592 0.01671158427482731 0.005752974278219586 -0.002079797912460673 0.01725009140468069 0.01743641203402968 0.006300433401056487 0.02463371416322802 0.01238423759181889 0.01190979020434736 0.1470233533860522 0.06721568232382392 0.0889535584110188 -0.03002645449936572 0.03449871343884149 0.05362258107641393 0.06637769537755317 0.06955118766450732 0.03873090214069773 0.07266037754924468 0.05716740429643958 0.1523137483099855 -0.008304648557009993 0.009590734521602737 0.04649802801518799 0.02423757883100327 0.01172079621803897 -0.001194716191876717 0.0007929649312233633 0.0005340063732477615 0.02181007850717994 -0.01339061397011536 0.00370758259319435 0.04088847883219005 0.01099989551247916 0.03880867752612691 -0.02232028437008894 0.05845652679562056 0.05588331082344813 0.03763627973428959 0.007378093042040896 -0.004422178690060297 0.00177140538356183 0.01222891751756029 0.1421316720933658 0.05218184137372332 0.0693923631657779 0.05905162227992424 0.05222532041688762 0.05827191330774181 -0.004475670475806429 0.01064630481806358 0.1062810536634975 0.01176147280104139 0.01158547873245234 -0.01546828674851573 0.1309889397607517 0.05084584154853472 0.06926937595622738 0.115895217739056 0.09000425907976986 0.07773800524222384 0.0206796647196789 0.0575344196370723 -0.004533493754860481 -0.0003171696799703097 0.02146121436584978 0.0009364143527103697 0.01099636280217023 -0.00443290573967008 0.00100666972358429 0.03264055625321691 -0.001500942995643327 0.008973152717377466 0.009565912797290972 0.03777200536322819 0.09103166713486996 -0.005391735428307848 0.00579519003995045 0.005754347464153772 -0.019886339051261 -0.0182325747420756 -0.02150149931874463 0.02542549134297342 0.0002742512702824662 0.09655925821497267 -0.01641551737581587 0.004151335146798277 0.002402113859955718 0.008933204234026113 0.004311454414089477 -0.01402005442635511 0.005900867499887094 -0.008303757641497633 0.09603944163056442 -0.02112949291050226 -0.0185634164271382 0.03594343929508214 0.03431019794357089 0.03479064179173594 0.03638285812046721 0.03299144612163183 0.03199425577055203 0.0561159004981775 0.03416221932155718 0.00340657452786797 0.01024788224373899 0.01259250729431535 0.01307511670471269 0.05027671425506346 -0.0001134325629739854 0.05633564879476897 -0.0003236024344428426 0.08582270453080056 0.06359207685489716 0.001157101945842295 0.04145942374752588 0.1530232136709489 0.02212371987772925 0.1104641718924482 0.08232607261587158 -0.005807866769256393 0.02925324188653979 0.001606250947792056 0.01759302497433815 0.003797801874125727 -0.02192204750951554 0.008309652747391807 0.007357843291554651 0.1278499581779364 0.01289376649608374 0.005258268007185083 0.076425315773076 0.01826785512515962 -0.01506568503597221 0.08888475024208356 0.0747565407206932 0.0006735041673771487 0.01612164933166906 -0.0002191689079300698 0.05107448522068573 -0.009701397832087646 -0.01368336947972897 0.01477205450685414 -0.007259440461750247 0.1006213411116951 0.08602525489016506 0.04446002686329386 0.05409042007289847 0.07477264047424369 0.05012498795118071 0.0141454813043347 0.004670329942694599 0.05290909775731618 0.01540730275636733 -0.003721055898278457 0.004452881695359438 0.01209006364260828 0.0741625502190937 0.05427802635907625 0.0003295928370156487 -0.0005245651850232495 0.009322622101754134 0.004804087455215499 0.1106144513064266 0.1009391305260096 0.00739285278521502 0.03556801637770615 0.00110483408140763 -0.007855477899452314 -0.004135666132661647 -0.01276042032275027 -0.001870632514797983 -0.003834851455704851 -0.003185878014806563 0.09429390727751592 -0.007502342406489363 0.006878510013808223 -0.0009910984707182068 0.04240600328131783 0.00668255724905188 -0.0004834962252222728 0.00458673071914319 0.005212815659736994 0.02824633568718275 0.0462476065852349 0.04279908493893042 0.001213817823492125 -0.0027413176422694 -0.003061375633576702 -0.0007796635938090136 0.003578364183630871 0.008811564322065337 0.06953197940918422 -0.007252223521065614 0.01102452436500241 0.07599052213055466 0.1191961525139303 0.1340158286909669 0.002868437389181033 0.005399099427496818 0.121988423862465 0.138905534704398 0.0937047847145349 0.005605972757494008 0.003306663659082097 0.03454427973493644 0.02138551982920924 0.03170215423200073 0.03286213473831727 0.003445824805012011 -0.01299134144828138 0.00271108935193219 0.001170650234685339 -0.00133793850654493 0.05665991170435735 0.04309047078927806 0.002506961417726281 0.0155800170266023 0.04666850151390966 0.03821159784046491 0.01402878286047477 0.02948764380361941 0.01918790079894864 0.002551014047779943 0.07418070014925011 0.002021867630377088 0.01585473088627546 0.004486904508265692 0.01262229120892766 0.03232581033436654 0.00394174773630126 0.03574100526460697 0.1003978049186385 0.08027242429080304 0.03280561902715907 0.02552718121770733 0.06668586587404866 0.03243126232714297 0.07178185593386641 -0.002361852128129031 0.007479914587598046 0.01561900617250726 -0.004388776813598603 0.04281148642867441 -0.0002110130823405984 -0.006820679729092403 0.01140840294736488 0.004560423917345458 0.003216643534411972 -0.0001449754027083428 0.03145790504842032 0.07067698109395851 0.03078271493636689 -0.0002825101905251825 0.06590492325621679 -0.01054850138617442 -0.006495820705334165 -0.01547655201338548 -0.000835559256414807 0.003859193137266091 0.02183728828610816 0.02238245781997241 0.01686475934946988 -0.007396400688718107 -0.06485868971109675 0.01535152358556511 0.001298518825194834 0.003385494628638 -0.001853875042100935 0.01900243500808892 0.001733815964407295 -0.006833021319377963 0.003759181018622097 0.01111625037176404 0.03003908831740854 0.02408802895668211 0.0266681656109854 0.03497859369888841 0.04269507777943304 0.07696167911609608 0.03156146790071689 0.01410068426012684 0.01505415425160751 0.004241874071087102 0.05647747578133588 -0.007579875105098559 0.03981605691095386 0.0401073332038852 0.05646309778553763 0.08384869412836285 0.1566089596051871 0.07714598584816422 0.06885314735858823 0.02797118804271509 0.02136570607491454 0.003890607369758179 0.03689938648637997 0.01990329657405918 0.05967280318553204 0.06191256177881306 0.03209312260443814 0.01237400130371849 -0.03502136782667913 0.01469529721125302 -0.05501172589516156 0.02661330647853601 0.02235005943273931 0.04017292557051028 0.04106748144563033 0.01308469778065564 -0.01819964592035917 0.04413933634458325 0.04667113131458744 0.01530355012300726 0.004119852392010837 0.01670874563613669 -0.01488198889406572 0.009396797507297626 0.04690888819134118 0.00183817691767545 0.002159202114503444 0.04084676169314151 0.008141338713751669 0.00282274469124297 0.04144602099169643 0.03278551665863433 0.05632043331669857 0.06054930132642228 0.03252591975360711 0.07980093964938033 0.07744808721829433 0.03023761852590232 -0.01363275301119597 0.06583084273007422 -0.03498996245542188 -0.01426100911669594 -0.006393984640071836 -0.008886334232774457 -0.01123569070846365 -0.006443804691884505 -0.006038205187584236 0.02113605075110147 -0.001116279106602054 -0.00438318677078847 0.005734678308730481 0.0007987462682262838 0.004279568751362387 0.004140261280675318 0.01212425272025193 -0.02535538238387848 0.004031047148849924 -0.0006163754409943439 0.0362951700973068 0.03335141197539618 0.03670346768142573 0.04966025352386401 0.03566456494119179 0.01361526162869052 0.01652779646341243 0.01762493494841324 0.02383601066486295 0.01952460184853788 0.02770414624346273 0.01441722137847285 0.03284057192641064 0.05986158582482271 0.02544407012237983 0.1020336303991265 0.08362395787657832 0.06650909540837779 0.09290162450114235 0.009926720171727325 0.01705457851560718 -0.001353346390209224 0.001532363697931083 0.01957712569715029 0.003836138436452538 -0.009467969778103708 0.1032156486846485 0.0644283638006287 0.06389572937602324 0.06507195843955027 -0.053458744440844 0.02836972100540132 0.05759955247956519 0.02960828726227687 0.1155179148584191 0.04550743631144319 -0.0190954645061163 -0.003588808354243943 -0.002186437783642116 -0.02830056638732021 -0.01871610299694456 0.01438662615989375 -0.01080997417906307 0.02209456241594016 -0.02180565989626528 -0.02753939231300555 -0.002347601086002412 0.005225962304878286 0.003497170856680547 -0.006146657280432084 0.004087607723790644 0.02314996913211403 0.1117877858061003 0.03249993585223673 0.01465307117471575 0.02302538200985171 0.02148909591091666 0.02499732808745102 0.02771712107224988 0.02252935575936731 0.01179653186951877 0.02361666562350533 0.02282056569036094 -0.02643457372648872 0.02028239676967643 -0.001644372354231844 -0.0008342853013701062 0.02059055365110057 0.02194222773340585 0.02035523371087284 0.02049012717191265 0.0279090388830068 0.01612637242750656 0.04026555537938559 0.03997285895624859 0.06250475355286141 0.008340672128505701 0.009837515480720734 0.06595421967014989 0.07058946844656899 0.06337302939524903 0.007594779102515785 0.06451986188518399 0.06122574164536061 0.02997490191476853 0.02722004691672635 0.003313019687030008 0.02604456671921979 0.01106914154057108 0.05460844324462924 0.007548221953667742 0.008007929081615378 0.002111324321593394 0.0009745861867048286 0.005400495703814202 0.00752857467997723 -0.0006368904128480642 0.001865590947447922 0.006749299989386201 0.008597229450581039 -0.02593511056441003 0.0002916479118746871 0.01259503705603118 0.01630850427369705 0.01181346608922558 0.0116075997067969 0.008039133227261474 0.01026891507022585 -0.008604959523652724 0.03004836671579395 0.02617754524435606 0.02737809474518223 0.0147220329296244 0.006220642435503079 0.03795582526006137 0.03939533844738347 0.03344863106095437 0.008801154389624585 0.008079729207708213 0.009094414544378154 0.01002959075603967 0.03939460143640216 0.05400534297225382 0.007836496159977724 0.05190271331068248 0.05148254986602522 0.01028366813978806 0.05359119767604184 0.01102385345566334 0.05629359958020382 0.003574229959530684 0.003144255244706688 0.01464939417783973 0.005762426204320215 0.01427053087841659 0.01521657304873524 0.01450802899212037 0.09938212536549997 0.01399667307518616 0.01927341785252126 0.01913643100076107 0.01595946426796561 0.01737136283500046 0.002578135502733001 0.002664918437807815 0.01144164041922097 0.002293330448951361 0.002232000436854673 0.002849490505261711 0.00283074447351235 0.003433887009128587 0.003214916919940599 -0.001675387673447017 0.009746173037939756 0.0002218773385114467 -0.00010578279763423 -0.003421235644854422 -0.004398271816379589 0.004816253978994775 0.005747391080913367 0.006785198058936228 0.005488172798482088 0.01846421091814544 0.006218691209819681 0.02716375438769286 0.007062654806790199 0.00710998310934615 0.003376606262540663 0.003032882139000791 0.003369309003014738 0.003638193600684679 0.003441169777227197 0.005917756151070607 0.003626181520630963 0.03978646079094335 0.03756227390407426 0.003754055580845771 0.003933633584342363 0.004179425686526908 0.01863538632698834 0.02060920562116474 0.02238858533014691 0.00364929597749117 0.004245582468349211 0.01387287990474209 0.01647379954208655 0.03883306826554967 0.04000011927258378 0.04154173324860093 0.03526317356064986 0.002474873341213703 -0.0009693292640999428 0.002832564126542385 0.003483019293860324 0.003864649826151305 0.004327666144481886 -0.02403491475231725 0.004776093126540764 0.004286426790845369 -0.01847267603861666 0.04245172826020522 -0.02219636185804294 0.01911510512541042 0.007162150775390878 0.01970209233350682 0.03888637995694229 0.007307707192372319 0.007571583808500568 0.01640931088204658 0.00305365338896279 0.00595883787855099 0.006925930332244364 0.01882623621415138 0.008509095230708674 -0.008759675291725102 0.004605931833429838 0.01035833993033677 0.02326530153707125 0.01542957669984526 0.0164966382898136 0.00413831666285704 0.02399118337500704 0.01948289374108979 0.03557784702717189 0.03932610140574985 0.0107627807935247 0.005327551622677521 0.00520922675921787 0.004398095270383077 0.004970264309487541 0.008003910996352011 0.005249702821555266 0.04124033060406913 0.005224589189115357 0.002515108210391888 -0.001036022966350003 0.004390767809038143 0.002529871567656601 -0.0046446132027603 0.001454833750117306 0.02366025573375537 0.02240253929544858 0.02156595813459674 0.001305726261493222 0.01565093462704245 0.01775568546802488 0.01520165567851397 0.01691775364295777 -0.0002138827892411625 -0.0002664761554590941 0.01075653609133098 -0.001517220040805493 -0.0007812731556512287 -0.003916842414188029 -0.001882541446695709 0.005761526330263637 0.004798858459988286 -0.00142242705593792 0.00405436296235985 -0.0006574113869189761 0.004496782836057258 -0.002874537222621776 -0.001676995491069915 0.038970634636272 0.06727029537797967 0.0630306593901271 0.007704076620496663 0.008113894359294448 0.02673632152959517 0.04049778981687913 0.04589033561161146 -0.04881713721133638 0.05313120780417424 0.01177150172680163 0.01769695023439446 -0.001985438687629917 0.01184680612801202 0.002451563470081491 -0.00310636366692995 0.002595083002521664 0.0002976784531256248 0.01477623630549915 0.01748761216101698 0.01898601303376984 0.01337159467517666 0.002043594870289702 -0.001446174583301259 0.01652020424298034 0.01450047873825757 0.003986820702921712 0.004121752130521828 0.01731599363417998 0.01843905122514948 0.01675597463579558 0.01438345634138949 0.02568601213449393 0.02798156569502432 0.02604825553692553 0.03725189631482373 0.01757642211962687 -0.007740808303938634 0.007569359380577341 -0.003970908780090134 0.02392370799279819 0.02405884604362489 0.03940116693876161 0.03795731685171278 0.06106891773150994 0.02848194724709327 0.02618417759219609 0.001105203354521019 0.04062366356280976 0.02588599599333744 0.01289338933531239 0.002835861392815426 0.002419052922670858 0.0309027497310582 -0.002359160087386425 0.001682376504875755 0.0004544524144447143 0.09250056191034899 0.1079998815482135 0.07513040616874772 0.1230798998630799 -0.0003961724579859931 0.0003331708623713275 0.0002516947917380033 0.001398521402028225 0.007223115894279628 0.001970877531436978 0.008646376770476737 0.01536894231447414 0.0235989386015663 0.02739467861025691 0.03349735440933151 0.007568775333137065 -0.001721009240783509 0.002278591054537407 0.02250475161142106 0.02079266083262709 0.02499061523350097 -0.01142071223732847 -0.01150418111748022 0.08739393402048806 0.02597714890203829 -0.01304080681756579 0.03349712537146113 -0.009525281576622382 0.03663821559348252 0.003611274338330137 0.03184607271399195 0.03628246973934946 0.0327852006391154 0.03834021365205051 0.00230074765430689 0.0292825982127597 0.0009019409744050901 0.03633428857762169 0.02438761119428882 0.03649609660702143 0.1062660084535667 -0.003364374911200896 0.02603534655598979 -0.001032572835843143 0.03037513864101481 0.008864159128061313 0.02191677266491503 0.02275615430110437 -0.001650702114286845 0.05671392370601266 -9.823579898367705e-05 0.01922992893907762 0.02331542084131593 0.00368359452002815 0.04134591648032011 0.01853028268458077 0.04974327823693317 0.005372690310559162 0.006143586030602315 0.007298684902409537 0.006332981215910743 0.05597965356687209 0.008703436398595913 -0.00380269533956115 0.02112075968826913 0.06793862012506802 0.04961803929096544 0.04117069029787257 0.05781478349210154 0.001769350745201592 0.01478418931326533 0.009536114916036151 -0.03412441190288491 0.006091506709692763 0.06803204105585495 0.008801533937407768 0.01259984124508905 0.009034353136155474 0.02057980299383493 0.006556976549565245 0.007233491814872066 0.01487493949559651 0.006137609034509444 0.04011271830632041 0.01069351198963984 0.01412917676527738 0.006100813143828912 -0.03099850405663606 0.09129202890392973 0.006333848975421767 0.009182179486931626 -0.003223680955131248 0.009658308826977151 0.01239376452514203 0.01109018717759468 0.01216590307131807 0.009460986120227329 -0.007869916407628194 -0.001861124161945841 0.06550871719805677 0.002216873858051965 -0.001039256916062605 0.05824230611887984 0.004775702166331003 -0.008455299475951378 0.01971075443166424 0.004666753868932918 0.09078161483032118 0.009169469975302448 0.01034629491729358 0.006171930697513978 0.006186649219732228 0.005054196365055049 0.05786820195710862 0.06712775130131493 0.04911151815759034 0.05275388166204113 0.05083928800496927 0.02748582389023024 0.02952079164582275 0.02109791310329657 0.02072954825379018 0.05955350602631623 0.003844047064709242 0.003992756376702989 0.06255776155961074 0.003807345374026752 0.007206419463767934 0.003581474309363206 0.009391728567258197 -0.05345578748522159 0.06134689293668017 0.1195957460065712 -0.007775569978824995 0.02246961169593569 0.03725413589594398 -0.05487571413456045 0.05046936887210939 0.005827543203082011 0.008290038867211304 -0.0191764982086626 0.005677396617184794 -0.0470026017890017 0.004794374420313917 0.005558196564380813 0.004671486888221833 0.05089083899312814 -0.01034215836004834 0.01077854294789744 0.01079617759387758 -0.02018109532379157 -0.02984920363479202 -0.008908674770273 0.01200857312101106 0.01451447911559808 0.0117067349752486 -0.02502661514900149 -0.01432325004047731 0.01951048133032207 0.01537912936733392 0.07663136427352729 0.004250950919562784 0.003785537764598824 0.003160530481329865 0.002888687765495308 0.003454624604327145 0.004287499329122656 0.04485157538626575 0.003156324576739595 0.00328676771157987 0.003314470987649512 0.00428393414254296 0.002478285556569041 0.05488029888930732 0.05063414106494492 -0.009582743882099327 0.03417286789847009 0.002473553879231058 0.002188610137465173 0.1093941349605954 0.07272369046235114 0.08497917161323237 0.03959769765086463 -0.01101868395892406 0.03790847596467155 0.02125996867318507 0.01055331864639107 0.03722568179843409 0.02281764262853795 0.01014486253669774 0.0120417602527764 0.01632328786253654 0.01537921747168293 0.05460564277089969 0.01853594474167196 0.01503651477829037 0.01263049809939324 0.01449133293292828 0.006786012124647705 0.055607383069965 -0.008209223898283149 0.03312488467279939 0.0411341190666729 0.006249468093298652 0.02675741363606375 0.03087693165117839 0.007440656217599591 0.04635738042306473 0.007313125902205066 0.01806025035165485 0.02729854472168497 0.02459208309248207 0.004574121271284987 0.00112754003245646 0.009251970946354677 0.004073184653810067 0.00949348346756672 0.01336513031459988 0.006119726899067991 0.007833848500421198 0.007967094001107917 0.03264370499240661 0.0153543454571829 0.006566549799071543 0.03519897373053645 -0.02219159432054739 0.02169339730069981 0.05830847131902907 0.03578154289585792 0.03184995273809336 0.06156718921999401 0.02659813275989088 0.1405946831832926 0.05750429269046278 0.05700936832204898 0.008635076480334779 0.008085311769712049 0.01284395997854763 0.008358429679409873 0.04079820919995021 0.07710681024230617 0.02778139660864116 0.008975874861098323 0.03666676134006187 0.04777204198843096 0.01543559697811502 0.01640950312697389 0.02592695968022991 -0.02183149683546182 0.01134732061161346 0.01425281026590786 0.02117814586323284 0.02433732190359565 0.01570207172359483 0.01740601892077316 0.07666925710705988 0.1381443930772242 0.09426405689474762 0.1257246709618759 0.02788701422153888 0.03088242618202392 0.03494036754675115 0.02751616363764578 0.05924089338222047 0.03888704642628003 0.0154235315908234 0.05290566165539333 0.0131548689504653 0.04646745661025134 0.01665860288949438 0.02034486152245256 0.09173405022240558 0.1061817881616175 0.1013689859489954 0.01473781107258552 0.01974713461966398 0.00566262117739707 -0.0007273677081316956 0.07801004001895731 0.09735065811835435 0.1536516710750443 0.06847896717407351 0.08385743260453292 0.04513122892524501 0.06965354120261594 0.01747964732976069 0.1728584434756723 0.01980172492643867 0.01598281630096713 0.01762655301947056 0.03249592282280643 0.00752029804985956 0.05737427285692615 0.0242241977808282 0.02286778292492785 0.03881279288255073 0.07360494071856201 0.008537484257357014 0.03418287691822029 0.06970997823096435 0.06426004676141561 0.06230358624722469 0.1317660946699115 0.143369000227221 0.0843108882615862 0.09368771638764392 0.07496569554614121 0.07443826915942918 0.0750089065513647 0.05531017560364539 0.05352562772748918 -0.006114982058639914 0.00835229216386099 0.02954821813653358 0.007638728490841322 0.002451117441885786 0.01506271503461852 0.01204049117787833 0.04420365139069082 -0.001697323680980926 0.06967664327183913 0.05074498966117039 0.1248130518015872 -0.002459915414764757 0.000804987444387977 -0.0008046332345110832 -0.002252906311224223 0.0220519694844439 -0.01571410234104963 -0.0002177154860464166 0.03068793588155029 0.04371201053968059 0.02255362025175985 -4.819761026646013e-05 0.07595021054360455 0.008881269841349163 -0.001850277316066634 -0.002796438816208743 0.008587452747856496 0.0004790018743509487 0.00405056906686801 0.005000127555579155 0.008117246739737334 0.06426489614774378 0.01355113504240857 0.009253324883033185 0.009178460581465249 0.006312008345845014 0.003257387725843815 0.002218543641413358 0.003209910283794454 0.01539597098848221 0.004422270159868597 -0.001634987313082359 0.04670999847764444 0.003790198820108003 -0.003165120364924818 -0.0002526622715083812 7.320962694852075e-05 0.01366449072606524 0.0223443564878293 0.04001077993652521 0.02679420139809165 0.001191592008959266 0.01952478311252028 0.06648518213176953 0.02334502570451396 -0.01520935132620325 0.08592048818058205 0.09174801481430789 -0.0009578034383952757 0.1067884797595159 0.08873570438907824 0.007844058082565582 0.06231321754864507 -0.0007093852155976458 0.007804934032104558 0.09068470226559508 0.06263285269648464 -0.0008468457672640136 -0.003590830725935252 -0.003128273824242377 0.02095282818010401 0.01866731421097511 0.01569857751868355 0.01907236708028588 0.03961360014938647 0.01634927925297612 0.01535651510188311 0.02212675268748557 0.008293420939555931 0.01282840382792572 0.008228495799551299 0.0125492549018356 0.003880874407850358 0.0204788671694158 0.03128182585640901 0.03036303705054644 0.03069206532272463 0.0009772130298822423 0.007303008460683311 0.1149520524456125 0.005746957199010238 0.08251223741311278 0.01228463676241248 0.01521379307536829 0.01606387001264008 0.01627328822240298 0.05441033806711002 0.1312471905145332 0.01885428902656482 0.029405705260269 0.008233178157799019 0.01436494647154425 0.03726454365488099 0.0703161606204393 0.03697058481302985 0.03667366611334582 0.008022677359768426 0.006976355097711856 0.02625501584517491 0.05863058032403826 0.04886521070335238 0.0531633694805696 0.0002081364697783544 0.05491628024458493 0.006118852755484247 0.01469469178234766 0.0005608117295806282 0.03277313717272438 0.02778150513575453 0.0344039008901872 0.03833580501749068 0.01665249446397673 0.01100945510448345 0.01086182548101142 0.02490980264645883 0.01174671236030615 0.000537240435581394 0.009801530505012737 0.009855950470456398 0.009719162626111536 0.009565262829970578 0.0103428224503281 0.05767618369480379 0.008628522843963567 0.009286964308384044 0.008319997497070328 0.03241766967019934 0.01049447974907738 0.03034487101508555 0.02643367733393507 0.02868172000184683 -0.01188281978130676 0.02945156620274832 0.002463658548261377 0.008297495588299524 0.002779437215625763 0.002422138606763327 0.02490805267701254 0.02165409013146468 0.02072939063287707 0.006241594233095325 0.008429344970142978 0.05303552529238746 0.0246353895465668 0.00446385415882367 0.05868165224874984 0.005257453436677917 0.02355336174068841 0.02572407944329938 0.005489020345673195 0.02258010461006079 0.003958425992913652 0.003590230116014658 0.003426033378189549 0.02182251375328038 0.00388475644302462 0.003731102203175705 0.00314992771744953 0.004211509790924461 0.02559486852649581 0.003941077264472828 0.003856154204389045 0.0366893178905757 0.003651575656185958 0.01004924443014715 0.005824537967855946 0.01377056747152827 0.001257171972841897 0.001143693441872891 0.009100139501653814 0.009356771926760755 0.00142061819835706 0.002656917549712462 0.03544845247194923 0.004544859219048713 0.004592258442051331 0.001762634426653659 0.004402177777871339 0.004611835676379057 0.0206265081613587 0.004614247328075622 0.00443023114039259 0.01625644059635589 0.007953792838227352 0.006629464151191723 0.004191279047849632 0.006754167373120994 0.008441613250740724 0.01746580291586262 0.009771055142548224 0.001786182337726596 0.003343487772513166 0.006594742555031483 0.006201423164178163 0.003722556833338948 0.005151863484650303 0.002866562263590116 0.01039554716944576 0.004395455975395724 0.00624281410632837 0.001952380218265898 0.003162974956913316 0.004764010276648215 0.004938911709470123 0.001540680961705162 0.002971563540804875 0.003127924668014769 0.0005751080469223303 0.001199526983698277 0.0004321900831725089 0.004967713001141456 0.002469624450261898 0.001157680179478429 0.0009126799156946862 -0.002662313078373967 0.0001626858662602505 0.001904376917919506 0.006340082515384106 0.002583280225299241 0.001636786334157163 0.00440086652692553 0.004218816609948286 3.20046968295678e-05 -0.02021295297998961 0.005107912590909999 0.003947847560767896 0.006756922012596049 0.00616026304241607 0.002578339085853483 0.0042716834884728 0.01011607716317319 0.003927939630443226 0.004279551452080937 0.004743655699233562 0.004279960146721887 0.004352779620837063 -0.003338756451876692 0.004863566964620796 0.00660349072802244 0.004450345139165225 0.006309172601486121 0.006230864452541402 0.005122863758566444 0.005336091840154818 0.00461626825103338 0.005430778866122403 0.005510280469745622 0.00459015217092072 0.004476955665055867 0.007258721032820495 0.004743215378866156 0.001688253155502992 0.00470130146599132 0.009646125007043257 0.005649261270481116 0.009616921451507653 0.003259117892706564 0.004501967744921332 0.003353266845212068 0.001790392912720901 0.001407708336579237 0.01245227122822687 0.01057531206319412 0.01519021348256561 0.009462395066538398 0.02892867721459957 0.004311608251739869 0.02218160338784576 0.005939026816980265 0.002341322169301227 0.003869720391043235 0.007878682655576712 0.006457626117438398 0.004256103093652854 0.002864378813958483 0.00413522927162365 0.002686300245887484 0.004126153464963446 0.004761848578208227 0.003272561061880621 0.003010569697633866 0.00340587927713508 0.003548907657443047 0.004952872148050227 0.003224885802238605 0.005425550878918526 0.004707213966117989 0.03294489881357605 0.004725404033323222 0.005341684504693828 0.001551247467416112 0.001360123540012738 0.001607867385120301 0.001739713494516208 0.002190822723688026 0.002162625475031177 0.000465402850691745 0.001610502772653523 0.001849725433384839 0.004084210093171374 0.0005134289765976628 -0.0005797315329426053 0.003009152376715376 0.0005771415750997574 0.0006646319086930523 0.0007705447500142026 0.001112091178222077 0.0004085832044914374 -0.001094973941211517 0.000622356036763777 0.000682738921942967 0.01505857720992654 0.001078957635179593 0.01572284853130423 0.002814871639076771 0.002686829189552768 0.002552076827291894 0.00252493988421857 0.002604259402818851 0.03787764485238063 0.03069882665412096 0.04224019402272729 0.04520280302135881 0.0179172198414353 0.01613966023742021 0.02322904672645642 0.003740074174618497 0.00353336609874249 0.01100923284695603 0.009968307648441536 0.002772662877728262 0.06149552536474406 0.03590970812365094 -0.02569076973680235 0.003101584106257827 0.002712713665619769 0.02526597401651575 0.05922360942458245 0.0231954924619322 0.07379998084617695 0.05692588481770864 0.07566270605688431 0.01880575735231011 0.02993448808389287 1.357097690976577e-05 0.002920995674928486 0.004046426476098762 0.003518578827549142 0.02091558377835166 0.003999198351212121 0.002798570602544737 0.002582296877854229 0.01048144095688977 0.01196549915989542 0.05620742866359747 -0.0135147663648222 0.01086486715398136 0.02704898944125458 0.06308151973122703 0.07006262621608948 0.04316492239301722 0.008371646283282535 0.04929332369438714 0.05794266176128821 0.05945034739682407 0.004359548639376512 0.1229264970737359 0.09199165434861763 0.03470364364317101 0.00187967759836075 0.01085927861246034 0.009504237603779376 0.008401156388795159 0.01010557921749577 -0.003287124821484043 0.004366941851240916 0.009964146463802748 0.01928026599288104 0.01233772582676315 -0.00336161670628657 0.0003191243353192834 -0.0004678857743963715 0.05367824290622942 0.05164316733739786 0.05006744601033447 0.03018771652335966 -0.002864390164432355 0.06326583374737418 -0.01803594062786668 0.002479101215708441 0.003394213555667277 0.003939274041221207 0.003373515795035566 0.0009756928094950784 0.00246208191521476 0.002025130718426931 0.004935118357495655 0.004318673935648405 0.00414802076781782 0.006018590671139004 0.01061579515216198 0.006871987798078759 0.005081637653227559 0.003828379290161424 -0.003570080219695262 0.003888399784772871 0.006873961579571812 0.004559804204811576 0.0750177430791239 0.004182948242366976 0.007240886028992678 0.01202927033994909 0.009411509415452934 0.01213554623380034 0.01310783020641285 0.0126972738519274 -0.01881155037797685 0.004240776074943359 0.006294275077479603 0.00537325070053608 -0.0001752722059457674 0.002433839134359409 0.00267116734556581 0.002155701456078078 0.001994428324680309 0.005363980458214375 -0.0002012634998642964 -0.0002105391626060398 0.003057020378696973 -0.0005274432832087735 0.001390313047916708 -0.0004226722356809599 0.006272317946816397 0.01012263943573814 0.004106023141064547 0.001903650468901041 0.004133273622969964 0.005505182037958334 0.008158923453874995 0.004715345631022364 0.004623847577521917 0.008325474496302337 0.003704994554000412 0.003339248489784358 0.00538853472666132 0.01851270793963318 0.005499307023426083 0.006630858348966695 0.009446716448047699 0.007215183663506697 0.0155461175119002 0.0057101075037936 0.005329324107186183 0.002630922215784607 0.002539450216968192 0.004558312899597459 0.00283947498962798 0.004570922447380958 0.006226407603497262 0.0003094220867293979 0.002363920160751358 0.001804721099433993 0.00440865169552595 0.002237630677438175 0.004029856346175844 -0.0001213515418886179 0.001089694746242519 0.001405982351193423 0.004198218973153808 0.004911123431681918 0.004132383995581824 0.01963731642629344 0.006002762773798026 0.007549351319130959 -0.0002627429794825198 0.004695474505878336 0.00471169582171104 0.007957109227392808 0.007643007714293237 0.006511194953514676 0.0009366466484074541 0.0009319257689131993 0.0005771650218695055 0.004767563905107398 0.002482404986969277 0.01117308832164118 0.003627754908419671 0.001622230347890536 0.0005869988664179256 0.02020394755046547 0.003818854633507866 0.009179528758834937 0.002831338251566069 0.002906427709198738 0.001605204757938121 0.006633214228538653 0.004398271080527496 0.01063988765489203 0.0001651609034180716 0.008491591137702339 0.01207210918951665 0.007613482622709215 0.002451750736102152 0.01198083532421813 0.009358809596451776 0.01007975542870815 0.004322112059412659 0.007611822313645857 0.01079420406101977 0.008245858973075547 0.005783218178213262 0.0109395053104678 0.003663461058288094 0.004836994061289697 0.1174187147430442 0.002479921867053492 -0.0007523693173505659 0.003378304053906047 0.1813814064104778 0.0008076191154984537 0.002893691408244597 0.01317140765705595 0.00246565295246478 0.004827265691976963 0.008945991569288119 0.004331786046538924 0.004709067994794189 0.002552801129681939 0.01187106831761129 0.007887981171496493 0.007645214893128791 0.008607601473037168 0.01468081614904193 0.002975031611716915 0.001629182227622245 0.0006754308806795502 0.0001007084999618353 0.006288495853114912 0.01193433153713464 -0.0006438082638896426 0.0003814578132743596 0.004468942943971118 0.004964378928505436 0.004992232917268346 0.004627617383999338 -0.002218367344070766 0.06270023750737556 -0.0004359465395575154 0.05027162302807871 0.04949467020384869 0.0454119048735489 0.05035074142873183 0.00912890791615477 0.004622789067444155 0.001871942731336838 0.06708508813825859 0.0004387072553294264 0.003735172329354982 0.001245843485331741 0.0719538774675495 0.0001619036455228406 0.006868707188146128 0.004044934426676625 0.001026625018722363 0.0008649830469250096 0.002255836494748276 0.003111745204909593 0.003229737244511674 0.002435692792342271 0.006022294878890905 0.01013251509107538 0.01016205994564144 0.03194120121818199 0.008448632732340667 0.01543167209446791 0.02275083539576072 0.008675306371149662 0.03053344630682866 0.02531532988781826 0.03836489366979658 0.04985894021017624 0.0063293898817673 0.003908778155256223 0.0420044652802432 0.04545045756570663 0.04584916170471082 0.01705421136395865 0.02342232764929533 0.0100885339242686 0.05476763585159679 0.01433082901832587 0.01144503381901141 0.01912463978974187 0.01995777943387958 0.01517578256789876 0.01257256960496721 0.00284260184301672 0.0004787111698448536 0.007506680087295018 -0.0004714276068508335 0.01893482962022091 0.0044091333787812 0.002964909859947611 0.002959112716849044 0.03421714384548676 0.002909546555418037 0.008738793900566895 0.008962636792791991 0.006081260203293117 0.008460550417570677 0.006174191007446874 0.01190738846817816 0.02200924731887596 0.01667412581457929 0.03037404781218685 0.008925014732628135 0.002822353256811672 0.01517985278225592 0.006903470170886046 0.002127026712617559 0.005644187734552539 0.01004054911986491 0.005074624277451083 0.004493092895544609 0.006077718908771992 0.0006901271607831972 0.0004815061514622511 0.009104510532602238 -0.002212962565047318 0.003089614885412564 -0.006230253982239739 0.0100597099143951 0.01101049824931931 0.02679314009711567 0.01678934356408 0.01999309841687673 0.006566874533333884 0.01036796297049903 0.009197434203308871 0.001539806787278334 0.004715732716153855 0.008805360344263515 0.005607356718464831 0.005790877506905294 0.01057715242053347 0.001034591572168333 0.005670906677141299 -0.003654576446407431 0.01042718190653703 -0.000541103734450562 0.01432475975874812 0.01400218852627147 0.01354949478855982 -0.001715817190327175 0.01395113995627915 0.007408111555736696 0.003393328289591868 0.002905062369119812 0.003390589128051466 0.1103506076704713 0.002004813159791491 0.0453854092475859 0.004014125839815796 0.004621200684739504 0.0023444593219617 0.002771498237005323 0.004312145235243028 0.0004450715935230904 0.05543022875486707 0.006999169602508209 0.02157265285681338 0.02648182102197489 0.006403786222773445 0.00741849883155148 0.009888636053599591 0.02675529350728747 0.004434440567388962 0.009254541953343538 0.006751126295888968 0.009709627614110587 0.00882072652970097 0.019248611035261 0.001420194586847582 0.003886644812868407 0.002313019268229668 0.001545050201315413 -0.0006634061033638118 0.0009941469647147569 -0.002166933933433932 -0.0005833316866193221 0.003959703599108119 0.01619613658776043 0.03972775857405041 0.0284843033915617 0.03429428912064746 0.03371930949839447 0.0437115517500652 0.04371494441200353 0.07084771377189508 0.02170483974194498 0.02539749119550613 0.0197400110363205 0.0387772205572172 0.01939593421692895 0.01241351799856152 0.006116478177833079 0.06271834945663345 0.01268111192991704 0.01835154816357803 0.01928815652415173 0.0339700452105277 0.01388896350391996 0.02620010760922373 0.01285849446402104 0.02475377484050555 0.01991020635774151 0.02927958999415207 0.02147731266535676 0.0322630657743097 0.03615638313593193 0.04114123789475616 0.03543966906297821 0.02393330361026326 0.01275330991013565 0.005938705508957365 0.02656542784443831 0.02663138109564489 0.04628565353787401 0.08148701623591316 0.004066373898454028 0.02176588621932821 0.04205444385625345 0.02767274269752237 0.03805191277331683 0.003779045746841917 0.01653358887483002 0.02977994102610243 0.03655229004731059 0.04469704839997637 0.0120465098102287 0.005167329835161637 0.01091225469019058 0.01292282027347348 0.01083675767941467 0.008201833474311736 0.006120183638842958 0.007464671016283155 0.01650211841446267 0.005515317953830357 0.01380168290516739 0.003171933532446844 0.005541088236396472 0.01724922632260405 0.01624938070651695 0.03368226304080032 0.01160033440615189 0.07338769351840509 0.02032020484019491 0.01193945436152437 0.009908068191798534 0.004853132259500728 0.004834886865651599 0.01773148090572103 0.01293420721289075 0.01479322440389163 0.01886304939067956 0.01094143325307649 0.01582846578311697 0.004894616751878796 0.02075340658434245 0.01801624433419112 0.03482411919359567 0.06626891444211874 0.03589469553135409 0.00801388021678673 0.01658319152691098 0.01073179281069705 0.01485748794025171 0.01280112169632326 0.02489684850531674 0.04554758723296338 0.01948329919555563 0.01141742390983304 0.02039603889616667 0.01606049466269964 0.01194198476506502 0.01711644910578822 0.01551680615395596 0.004637896251567864 0.00416171512602535 0.009646762005698202 0.01471752286404539 0.003650831193642495 0.004269143189508536 0.01452512291845639 0.02896295339176741 0.001504325655980848 0.0004802451105251341 0.002582182197061295 0.01161624234320445 0.00845495377403402 0.007277163987834753 0.007391102635383674 -0.001202974240417029 0.05709904762124668 0.004951212776507033 0.001310359340082078 0.0006355625857896287 0.02697987805575935 -0.0009244517872766927 -0.008012361249254014 -0.008863699591556494 0.0006101165041041755 -0.00075593301602547 0.00358385456138736 0.00431827431013348 0.003233334442568614 -5.537775633349662e-05 0.001707783128478774 0.001790490290255539 0.002244352145574495 0.001163360034572668 0.00166835409663598 0.0004250046843967415 0.00102286610074946 0.02586407653702988 0.01052319302110888 0.03148568813476786 0.0224256919299217 0.01275222738575055 0.0264319600770692 -0.01022855949317431 0.004328901396549075 0.01378044734367056 0.01089506797020914 0.01004342045982153 0.003504510522944573 0.007752056706399951 0.01311542256659098 0.01011069494552307 0.009722019148872083 0.007593648294164243 0.001249782142111143 0.01936145890629814 0.001266706050090812 0.0006998724454903905 -0.02422882385857287 -0.002200054064180913 0.003613556382743718 0.005902729943374476 0.0006097125011307735 0.00886916907848229 0.009196798672666085 0.01285002884078971 0.01295271045389954 0.007049455547979798 0.01371894719394921 0.007512211106583948 0.0007618539489223108 -0.001333914579055078 0.001606281881509488 0.004456870072688446 0.007227812518610277 -0.004841434559899791 0.001962530803859681 0.0004787526620935765 0.007532142484231735 -0.00312254815242933 0.0198320219149716 0.0126864646160808 0.0291085340266957 0.002369168514479651 -0.003218316557203787 0.002387855278940678 0.002366071708875099 0.005505371142241728 -0.006434387669906776 -0.0007340993478442559 0.002211240283575803 0.001796656096363752 0.00673748826988654 0.007895261890369572 0.004995278585677121 -0.0006939040023730526 0.00797062790825866 -0.005418036742040505 0.0003411564777263511 -0.004225144508533937 -0.002643165608832447 0.008075992115746845 0.008925201835263588 0.007654660507401719 0.01282306924883981 0.01237504912639566 0.007357887492373788 0.004043124510345017 0.004841818539613174 0.01672755471635278 0.0001972445599266017 0.001215523039172573 -0.007386946007529287 -9.844751687151258e-05 0.007838943590529689 0.02076649948271988 0.00738025029793023 0.008959322065484946 0.008628500246139183 0.005424972596986383 -0.00299162068025697 0.00660038171766212 0.01456683220513759 0.01158822488301029 0.008066513029894889 0.008338112781870549 0.005841007310290721 0.006232714991879101 0.0806986061851771 0.02899398671617225 0.04776278522167922 0.0134097081298738 0.05991470897746222 0.01770248657825369 0.04560589135839589 0.06625935713348016 0.07308395960610391 0.00423383144805079 0.0164690111405794 0.009352056321814392 0.01625095514364295 0.005205567117828824 0.003354331643751648 0.00289094054535492 -0.0001904191095340959 0.0172602020558274 0.001633364907097659 0.001120117651065673 -0.002102471217397161 0.0007118388817068718 -0.001008878040284118 0.01181779746715084 -3.803869600376052e-05 -0.003267561991086726 -0.002267344056843732 -0.001118346767297146 -0.00419144696180386 0.004277916951299477 0.006413080917178812 0.004423992587565269 0.01429897554295556 -0.0007739424277976042 0.004232217869865019 -0.0001826815168431971 0.00658876097945213 -0.001530646838877721 0.009082094681042676 0.003942944007159513 0.005337573125398279 0.004458810336995205 0.004561112567270257 0.01013192420401728 0.003325851699039105 0.003469067769790977 0.02337788032103585 0.009420087585517477 0.02557237949862128 0.01372384891648968 0.01456563207684364 0.01531708407552884 0.01530660301494269 0.01358662285507651 0.02399056723272872 0.02000568790737372 0.004552545695456781 0.004834909906663499 0.003001308007926782 0.005189755757223019 0.002113493081080451 -0.0002879388857460499 0.02068060366467834 0.02985767324490536 0.02980339390783912 0.02462970113300165 0.005325946180160674 0.0118702558920886 0.005169273818998506 0.01344382867933021 0.006556601595501426 0.03261872867702056 0.03637257455137268 0.01310219033672074 0.02542391709557969 0.01039281639363315 0.00294757140847913 0.01752212412278213 0.01921119390495887 0.01568882816411044 0.00653634131303652 0.007013127432435031 0.008636822067695275 0.006442391112934047 0.008164742006732907 0.01957025055720344 0.008999462556952035 0.008633719352061633 0.02037652583030728 0.02124024631222241 0.01998185277616744 0.01456061373226629 0.01191353190369928 0.0169852370882692 0.01429422583709674 0.005735690749807142 0.0107869298727939 0.01745846070583969 0.005044906292136376 0.009893871035522563 0.01214535194375104 0.02400449907990339 0.004756721632408651 0.004398031043373224 0.01529794678101516 0.006260860879184114 0.01413066258589978 0.01516949987358971 0.01927285022271573 -0.001977685638152838 -0.001225328238420621 -0.0006413141633675117 -0.001751912254955338 0.005223201884043439 0.01048788939649007 0.004493450463700754 0.01879036826223535 0.008894286214096979 0.0069997430152077 0.01113245155154169 0.01486630514411826 0.001040054942247152 0.004161832059486823 0.005500358288840372 0.05256106694734566 0.005059447616856678 0.008569536171691637 0.01409184878517207 0.01597103225845196 0.009791081050370661 0.004546423924375357 0.01077646718211846 0.00548410217593475 0.007674343377834104 0.0306000007650566 0.03180491317788434 0.0285744584621501 0.02883423133264332 0.03022280033572114 0.008990108803258684 0.005738820451272901 0.03110720880824844 -0.000220796768193199 0.02485697624864529 0.01378982028501177 -0.005200724484395435 0.001286698324090205 0.02827676625986561 0.04936216023333034 0.006302363593229167 0.0254490458016824 0.01618743729455735 -0.006340142526819014 -0.007055372021752601 -0.001401334074633981 0.02907255612291891 0.04569039221183526 0.01708170359088927 0.06210669487564779 0.04688848445256662 0.027453733468649 0.01452372401587542 0.02127509471190359 0.03406997951920594 0.03249143638876358 0.02247852248684131 0.0242723967031356 -0.002364935668515604 0.02105192358130697 0.02014089978656822 0.02288561395822018 0.009709722827887174 0.06092871535334091 0.02203118151482645 -0.001343982486202342 0.02128825174508059 0.001967048018084839 0.004329462787516863 -0.002808974587630119 -0.006624907392203562 -0.01662476294920849 -0.001462546205115714 0.03404698548271364 0.03241259053339605 0.04621141859103932 0.02976351328945333 0.001678221105169359 0.00795689835671771 0.01175205756611454 0.01029863478278084 0.02190980304672637 0.02796121720716897 0.02911924677379031 0.0184041301988691 0.02382976692586961 0.0180897982914268 0.004099001106180483 0.003563477941862101 0.001677226864443729 0.02518901157259341 0.004561109662188964 0.005474434526289532 0.009641154907846929 0.001773164336794706 0.003254178997440723 0.001447627555036507 0.00169458535390298 -0.007017204640608311 0.001825202390755688 0.003123548871943769 0.002958016426879325 0.02696823915761911 0.003463238740959042 0.003197959731955204 0.02783881854096065 0.05953206955492703 0.03563522362872911 0.01194240532093555 0.05077968806490692 0.02666600256128079 0.04194453946209194 0.0444961898552903 0.0424880471764451 0.0019421831116073 0.0421453062410322 0.003248353765676973 0.01821025089668197 0.003167320948044211 0.0151216179625852 0.01711246638656725 0.0007282063735490307 0.0004278021845705422 0.04350898046321613 0.0003513157806902231 0.002683277561067547 0.01093759757103832 0.0005713686971827174 0.008925309024654195 0.003396035573060656 0.01096331881730825 0.007228929781246218 0.0009428960858631158 -0.0006950785060026387 0.0005925999369308514 0.02107311072673071 0.005900838081042218 0.0005529701467581569 0.0003880588595486269 -0.00462516505467865 0.003500707826072495 0.01359003058238711 0.002190576396906035 0.001989161415026299 0.01564458274521733 0.01727163120870601 0.02694413699844698 0.002185676292818401 0.0009965731767141732 -0.0001761483335573453 0.001226884364891948 0.0008924613789393328 -0.001044157465977752 0.004213033998823002 0.003422740006814437 0.000725453814016227 0.0008533977587924476 0.01645138086924604 0.01022643794844067 0.008851717882954985 0.03669530811125681 0.002940800053499036 0.02872348268022277 0.0235086705227153 0.003844819924641921 0.0008811858807972938 0.005616016395446631 0.007165718307375821 0.007329828242991643 0.005889289699069867 0.004055326245024996 0.005607761399430812 0.006234396649995417 0.02073106376727537 0.01657088525839023 0.01829048373304664 0.00119860198128101 0.0006857270092125661 0.001238301803995587 0.01664887701014517 -0.006271750494655077 0.03203613316165721 -0.007260815407954466 -0.003310761382121966 -0.01304153383441606 0.0009148901653678372 -0.002159861619434509 0.02640996712945614 0.01580542337963712 -0.007159679889670522 0.04912576418745998 0.03059778282710418 0.02652211867507305 0.02761653172223159 -0.01365084525962001 0.0617892194190123 0.03201290684286848 0.01532182537182315 0.01429436637999803 0.02779189962457746 0.0329638974671807 0.03084220610618662 0.01947587268600562 0.02115138774108411 0.03588799470135831 0.005197101975479661 0.004510584157200356 0.007590399003423649 -0.01111161431955639 0.02066625213491868 -0.01624373058503745 0.02209679663053714 0.02723930369307572 0.05934652802675269 0.02941701605817186 0.01951903730636495 0.02544346274528898 0.0009395413629101611 -0.0002745606661591129 -0.001078055043637065 -0.01189019696586825 -0.02939891423351825 -0.008709754074594601 -0.0005139940001142229 0.02144658018798055 -0.008109792664085579 0.01424519256406722 0.0213988670083895 0.02772425356540676 0.0155860621295836 0.01530417422547597 0.01465054383027274 0.01424442792889572 0.01853885501133088 0.001358289345969717 0.0001590782911177148 0.02583526529552101 0.0250908469534984 -0.005724536867690604 0.01429340658306238 0.01378695667852713 0.01563866804255244 0.01473969678566793 0.01533714786782167 0.01606673160492529 0.01532744747817992 0.02745865253454824 0.02825775108590527 -0.009236357442444651 0.01040746107576423 0.01282945309983784 0.006614897677420164 0.0028652214644015 -0.006403303381895519 0.0004426797385611167 0.001776153627085052 0.002130484779063163 0.02379663414970334 0.02331424603970766 0.01545243693873795 0.01403919057573945 0.01416746499267387 0.01414158782855979 -0.001921106427338927 0.03236084002475254 0.01483156341285951 0.0179486549950406 0.02857970816370093 0.03119482405905181 0.01877251092791128 0.0309285645855456 0.0134970691515949 0.02311752053439685 0.02604070349904856 0.00690492935136732 0.004629536184655302 -0.001406374598692312 0.002350645333052751 -0.002250651316195324 0.002477065335018524 0.0007893544389814314 -0.0009024148668447785 0.008368924319371238 0.02654413488035752 0.06903655259801966 0.001767901250455258 0.05933221437519778 0.02618124505100772 0.004510997096068505 0.02200050106821546 0.006253701147165651 0.02567110301298289 0.02034426618715196 0.004353141630003178 0.009970287796258288 0.004611306930661461 0.003352721292905226 0.005712723065893563 0.00384043201292287 0.005940675766450371 0.05469510838965169 0.07657347114452098 0.05373955521735531 0.03777093657893928 0.04901588647239665 0.03312499858196888 0.02712825194709522 0.01178040303765939 0.03662485836353578 0.03528314539876081 0.02547524400231105 0.0124621195860441 0.00711782941757138 0.01124756503870207 0.01331513389573843 0.01316183021958156 0.0131444832730445 0.06969240590550971 0.04359969738506829 0.09771312860922687 0.00612148597976753 0.003940897268596581 0.004332573496313817 0.004691917686778333 0.004582492947126699 0.007611934508992979 0.005545200803785642 0.00412138812684153 0.008873520794333165 0.005174390802373532 0.007287685500562846 0.02573797649144267 0.01840639159907843 0.01134493255293828 0.008359972578470314 0.01437442234884216 -0.004333708709800375 0.00303401952945574 0.005994840864059174 0.01744574843592848 0.001113292048011635 0.02565242020641383 0.002843321777582974 0.004531520871816332 0.00102540023367708 0.02382687012915216 0.002958743771303333 0.0242070333981822 0.02024493069586098 0.003507974703610949 0.003561497254495855 0.004942764096673701 0.002318676674997911 0.00360517466608961 0.01748476759981773 0.01345448190956885 0.008984599395351456 0.008172663569545713 0.03592082138753796 0.01968815980100401 0.01658707355900182 0.01711711115361016 0.01643597953995711 0.02075791748305036 0.0487386446504226 0.03686869369875621 0.01866039369028676 0.03154625578940419 0.02339502115843678 0.02134035654026563 0.003424875391384499 0.01259710268008729 0.01028468583050493 0.01357305144782194 0.005506404009872572 0.004164008706506338 0.01143131707708014 0.00352963571404308 0.009548840059057763 0.008873620378550866 0.003303391062874799 0.007317553554677401 0.006085021117690958 0.00783423139156266 0.006214473534788822 0.02596661143613103 0.004273873686852067 0.004434152036520097 0.02666394554442151 0.01570506086504756 0.02915425937510454 0.03641227478883938 0.03715889174263109 0.03702758945783233 0.03520123687104612 0.01132636872461461 0.01840389546643837 0.01990033350644354 0.01428009392780269 0.01999899129268233 0.02347785601727752 0.0146237225088527 0.02084494637095231 0.01084435167530839 0.008757109165541064 0.007191163278057618 0.002338820740770897 0.002746997310978848 0.03956369949415571 0.002956206350657679 0.003412983237769279 0.007056880578902137 0.004001588238840014 0.001231488421612166 0.009080260551513404 0.007625594237460903 0.001955340902620018 0.01329489909690932 0.001471885756130848 0.0007266730889712255 0.001633442181734373 0.0009829755442815628 -0.002330552975048128 0.040181099280299 0.01440498821290219 0.001399412553233402 0.008180263426778859 0.009192529197719958 0.008912802947989761 0.006748514432220456 0.01185916895709978 0.007426029833382518 0.006495137081886953 0.001861887936437567 0.001740477979444898 0.003799748093127667 0.003151740640970158 0.003631435744455974 0.002319335882387946 0.05467084603155201 0.04277310618381498 0.04883130702405684 0.03934458333245652 0.03573780776254724 -0.0004520722243160747 0.04393438928541233 0.03069248803100041 -0.002136088607143698 0.01946573594637078 0.01837456804621132 0.01605192082120549 0.002948484303010722 0.02148074712913599 0.01837552981804931 0.0005785115455377658 0.01826467518958052 0.008147736455497125 0.02274407262806868 0.02504461589800911 0.0181309637904332 0.01804903280178594 0.007585914992131965 0.0288640750657147 0.0248579228485681 0.01296744155187429 0.0194607867921116 0.01759216300319343 0.02200254895161742 0.014136348902576 0.008136176068121776 0.008051660442884034 0.006712507777411632 0.001909929013781691 0.008006500803425061 0.01443053094708143 0.01277907610922954 0.04164033612780603 0.009443907047011733 0.01792206367951718 0.03333252063108482 0.0597304140359048 0.0838641343397987 0.001895907197541573 0.06199937062979161 0.06547082614047865 0.03943123723099018 0.0522998174776183 0.0295150952527155 0.06042416761370101 0.007774488263002911 0.05710635877848139 0.03202264247823235 0.03584195524632093 0.006898202403580998 0.006192720254194858 0.002206805296657593 0.003851911927538908 0.006717179822307867 0.0003258189941805949 0.007139214781081229 0.001282992754703212 0.006558349092974409 0.003511331857590571 0.002272061245198308 0.0264202935199689 0.008552405199799216 0.004611218983148218 0.004408961895384665 0.003467584510708767 0.007649772056117879 0.01734918539668836 0.007825075011910146 0.002492512310906024 0.00589114620391716 0.006393479747002335 0.005097112410672713 0.002598961113448292 0.01535118064576055 0.008541313249310928 0.009162746290968742 0.01530758625875254 0.009354890307476221 0.00507303946038494 0.005004707478681383 0.008914128616400655 0.006735557598623593 0.0009927531955836067 0.004073688566564135 0.00850934430551201 0.00953622831429449 0.002250590218676672 0.002905302117543572 0.00973833936329763 0.004482626204959036 0.009060719439596221 0.006099612237556639 -0.007480711170408412 0.005445076655188774 0.006948796385550875 0.02844679692481014 0.01319796022570552 0.008242574262855679 0.005124501057489642 0.00537582622737881 0.004441839122015865 0.01619678299180258 0.01701017557929365 -0.002787774484689801 0.01585117083739886 0.02735232780283813 0.00273114872243232 0.009416403865757787 0.007476337550672601 0.006169063174186053 0.01787533672833432 0.003933534235980985 0.0033186247921829 0.004561084793149916 0.006132163124017825 0.004091663727370352 0.01117795341347106 0.0006819283813223682 0.009697294423016803 0.001626904502993164 0.006982306885850398 0.00217494578426497 0.01446443273166437 0.001396928707669417 0.03470296029153665 0.04100559466114711 0.006538206522935172 0.009754842272320005 0.01109471066629201 0.01621110504833467 0.01707704465860917 0.00862544550324517 0.01310674171982762 0.008071479063842583 0.002128705009666301 0.001187021263752867 0.00175489124781351 0.03021098587590245 0.002287021983550097 0.03903581809199488 0.03908547458957908 0.01171063907558363 0.03579576224078042 0.006468774683972661 0.03884990296248242 0.004659798087431925 -0.002773939281743462 0.001879464103322277 0.003830817214485978 -0.00408271408519119 0.004898956423447454 0.007810495161852088 0.004323914860503428 0.006068743727195823 0.004959985974581455 0.03916777824651607 0.001677841464685534 -5.883699340190881e-05 0.01611491774870521 0.01817805171978363 0.0187569527725683 -0.001239668539870673 0.0003460811495043482 0.0004846678431327084 0.04091691374286216 0.003600218547528237 0.02042876752046756 0.002574031968601012 -0.001992194009455633 0.03670480557881294 0.02404035304134314 -0.0007941312611856774 0.001788029088919285 0.02207406487020511 0.02322586594834158 0.02594710475550601 0.03559451668691358 0.00880802143920837 0.02742672001969756 0.02579649270652285 0.02692397784817506 0.002380354651689168 0.02554902381599633 0.01380913998848532 0.02566378798912903 0.009756138802108329 0.006790948025872844 0.009522373160495312 0.01801211939654123 0.0431183105217791 0.02158708057994513 0.02965923444997598 0.01546311277988122 0.0102310623069875 -5.66163535223894e-06 0.02804858005249183 0.00997569308998561 0.01847921603026058 0.01160711290156432 0.06004742708157948 0.02474492220354807 0.02371244827832648 0.0411768064116911 0.0256817131414107 0.05949287082458489 0.02412965179121988 0.02284851905095043 0.01290269412439997 0.01939053929981852 0.03453210833939026 0.03354321334955375 0.02176998022643118 0.0183059264418258 0.04624412213508618 0.01209113558176316 0.04214030537299662 0.03670133190034102 -4.781502245074426e-05 0.0234332233820473 0.001864042630347594 2.300900529120557e-05 0.0009828204888359528 0.00187777914962891 0.00404986348594133 0.00238947385845704 0.001272275479162773 0.02779017641685434 0.02471993596663958 0.01847653095849146 0.01983348573204189 0.0161300574446105 0.01134931510124099 0.002481617779766878 0.01171741246939333 0.01185670748769757 0.0005493921110355155 -0.003214982639279003 0.01326114529873051 0.02284137739805303 0.002686130861904918 0.03858133153214304 0.0166349043935382 -0.0005486241412749623 0.006514908639543561 0.01656597457467286 0.01702667931968396 0.004717716958377423 0.01610721532845385 0.0002137001295491387 0.008074574527344492 0.007370960168268838 0.00236040696044685 0.01067236735874941 0.005119148537148913 0.01880653615779342 -0.0005984841614471562 0.004025427002007519 0.002450916439444617 0.01512858495717938 0.01444118429149923 0.01477754909268305 0.004338281523986588 0.01476884826170716 0.02776064677579531 0.01365537461920954 0.01380586521925823 0.01172999728555998 0.01185118719174039 0.0105321724582594 0.051820408272019 0.04215571563720363 0.03481477028776385 0.05282442521463982 0.03663193133469118 0.00375310954925273 0.04491892606924641 0.04282717442000918 0.04698548092496671 0.0494741564894589 0.04683274699036923 0.01355008363546044 0.04593634811553165 0.0514835790611065 0.04148580615265984 0.04840881777013906 0.04664175132398136 0.03768474872963101 0.03931683842664951 0.04721358226321724 0.06270007129384385 0.06362701097199945 0.06057347490196664 0.02094452740799017 0.01831079951262479 0.02467896982692788 0.0287506413433405 0.02499838348711773 0.02077663064461364 0.02848524316463784 0.02832909086396858 0.03476682207907392 0.02738588196818368 0.03026871265583319 0.02355611300916787 0.02132821636668655 0.0008004484936494598 0.01911804055386961 0.02360973265270602 0.007053187723824363 0.02562886953656706 0.01063850144482917 0.01261148532837822 0.009703368124738947 0.02447292334746146 0.03935350305366702 0.05328304478542053 0.05267858609632295 0.054132913505734 0.08032810267301134 0.04622666348476262 0.05054627323121851 0.04724420842177492 0.05137007099096184 0.05478178812986262 0.003957677839870325 0.06365176631433117 0.009560467200414258 0.05444970010513335 0.006117453712124619 0.00870136301793817 0.01133098292281386 0.01386625854427176 0.01344578233047484 0.02243486575640344 0.02613554418453267 0.01914625948031628 0.0308170450152646 0.06559547572899016 0.05276518596689964 0.02493293405369705 0.05713774802514478 0.01687261001890248 0.01092813945540877 0.009029947775325836 0.01772430000534336 0.009341181761295591 0.01763037439370558 0.02031740428388292 0.01788921556062188 0.01703622811617279 0.008358202351853271 0.0393506614596125 0.05946982484856431 0.0699611567011032 0.05016916757403111 0.06194663997757643 0.002075227967075414 0.0241524457177751 0.0239079717125164 0.02674408419172672 0.02190092188186723 0.01635197714881255 0.01840031511613501 0.03915503847242648 0.0302898969880888 0.04018676213926627 0.06097353840184272 0.03954802853422317 0.007268027219730191 0.01161358566693072 0.008732815748683807 0.009341489212208504 0.008320785200917372 0.009800520636906876 0.002323490910780228 0.00605746614580156 0.01304001989301402 0.006449930091905524 0.02944723837341599 0.06111560472262367 0.02246974831298872 0.03079660936575064 0.002076824638802149 0.02755186758940219 0.020455458038935 0.01752399593419058 0.01163313136677803 0.01579156603163969 0.02097197029558202 0.009906144062941368 0.02470906366676575 0.007300587698131875 0.01344546998753895 0.03815590446956722 0.02392717496640019 0.01938585930230804 0.01957274250175491 -0.003942732482927518 -0.009266186393413107 0.02167331375942188 0.003754703471278746 0.006332146804436321 0.003170963689997567 0.008985976306935414 0.02106952917816349 0.01735726207185841 0.01991332076491503 0.01052151112758899 0.01197503817472897 0.0138557196822787 0.009263302238499638 0.02423464005342864 0.005957206075137568 0.005581525340899859 0.01185207352682522 0.006908587542572564 0.008537811816110581 0.01050526946644088 0.003042198886586743 0.004973383461723135 0.01887885358122408 0.007016328314619705 0.0138705638062778 0.01259500706105829 0.005011226819083719 0.02744764768924801 0.01221035241272075 0.004747899021093996 0.00764068887560024 0.01403263579095932 0.01492168022808072 0.0132927371019795 -0.001157223625239166 0.02541816079331325 0.02407598335074481 0.007929688064020243 0.01507351916178662 0.0154313071875378 0.02093471603868871 0.02504996585163609 0.01681372808142932 0.01353321906060624 0.01411677059285142 0.01252345528504657 0.03677593961125668 0.07588429112135731 0.02534654990686265 0.07964121572173036 0.04865327674241239 0.05151159431942302 0.05180220702730852 0.01124819784450205 0.01013787770997678 0.0366481918410833 -0.001127092753176933 -0.003112229082092151 0.008838167717009543 0.004544248213269224 0.003613286132773417 0.004780617413141818 -0.0006072506328051884 0.002644185343307933 0.00194166802491045 0.04024771862934747 0.004043591858856498 0.004409750061955786 0.002851986245924838 0.007342739465556344 0.002364654996681231 0.000962780916384315 -0.001158304002088522 0.01087639919299083 0.0104852469300057 0.02118087825607599 0.02145435663495905 0.009854654356579447 0.03180724305312458 0.008509881534378856 0.02550557009019984 0.02827483392648994 0.0205131979246242 0.01184435257805799 0.02489872937849774 0.0140660890636257 0.0401750780951273 0.01495954192034438 -0.001895704263677085 0.009244731806367699 -0.003458126366666607 0.01987055410785771 -0.003864969215864092 0.01067454892971663 0.003919856277949743 0.004465541728296585 0.01204819897021048 0.009072018141699953 0.03528961011711228 0.008157890361221151 0.02756943722649627 0.00424648076155429 0.007848535536628702 0.01865318745958156 0.03831319670315408 0.003012217649962193 0.0003760504471930974 0.007420502048675177 0.008054338505830623 -0.0001246833976287526 0.00881569169298041 0.00918640193991376 -0.001451927541185363 -0.0011499870320106 0.008925890109364813 0.002767321760211275 0.001362979681207729 0.02047990873322521 0.0110312743802949 0.03175658943433953 0.01170762230653114 0.005381281585883653 0.008884215852631418 0.001319521640775715 0.007296641849319664 0.007126190517985687 0.00780693101178561 -0.0004911369103540272 0.04573086867969682 0.008123595211100837 0.03975467953691752 0.01512765182646861 0.01797245279217218 0.01528921619085357 0.01282386659919368 0.01154593507283396 0.007766137639291101 -0.003307737900317643 0.02039432270910482 0.001087197180473198 0.006880693455257471 0.002799273988817694 0.01696380765358293 0.01480792301294791 0.002266620738821275 0.004222371297343356 0.006072377183411816 0.01578938635994774 0.01719578825564099 0.0005490639546069571 0.01316319888948123 0.005328839289615851 0.01479169664261204 0.005868136899021217 0.00434524045697935 0.0232451919565742 0.01930588561014825 0.03742987742036034 0.002536368970278958 0.02138640246055461 0.01575821888067598 0.003631936578473464 0.002957493773233611 0.003239962199763925 0.003519239424995096 0.0270186662025685 0.003822925600533722 9.760931895376572e-05 0.00233526074537967 0.0002197843256025589 0.0005918267664947466 0.002960375634635733 0.002497605928404995 0.01056903192761278 0.0109100803495735 0.0125132784615187 0.02574543952270278 0.02461218595987132 0.02344527073805112 0.01926579507306845 0.02999308736699885 0.01055331024141089 0.008026407385696117 0.0129835528937807 0.007985999812326441 0.01064593086474407 0.01418286429921092 0.008522468725649589 0.008867238621156641 0.01336646757527859 0.01330221112576391 -0.001512416814247448 0.005753909310291177 0.01122213099592521 -0.005085069601167357 0.0230639771974702 0.02183758458892854 0.02192015951766297 0.02636340725709403 0.001667315945476301 0.0006907230852532641 0.000527586446072614 0.003510538700857039 0.002779328880299001 0.004138223671778354 0.003189563341268701 0.002317808407555933 0.002119922202890929 0.001676194258469607 -0.0002367104038732314 0.0032762022787025 0.003622773736000567 0.006274406468380724 0.008078332223110624 0.02561734977398315 0.006434379748555685 0.009730485109659051 0.01310632827027951 0.005194340164156187 0.004357873475706495 0.004428085213857456 0.009234077631985655 0.011321209429105 0.009661642425903965 0.005461340528745143 0.0004543499863440282 0.007638205836687698 0.004906311185458358 0.00219736193660823 0.01199572952884598 0.008185288500174557 0.007689157751325809 0.008936522605107659 0.0181956848894708 0.007915736343744196 -0.00244172455026993 0.001084947591316679 0.002816257582174398 0.003091633279765416 -9.140618548586156e-06 0.002125112221817 0.003013867122039009 0.003133838996848064 0.0029093788173181 0.003372657750706884 0.01395867846443391 0.02194055674211667 0.007713406685131892 0.01351727985852349 0.0008160613014998309 0.004040434734500954 0.002969388597272542 0.001162143632951583 0.01062348233863319 0.01273046475188996 0.02741746992388022 0.02816258402903512 0.0005062145925700025 0.01521267655332934 0.0008217343899260622 0.07817363333343974 0.02563457741038853 0.03528553089075928 0.0001551240829218374 0.04845514169276622 0.02174358443094911 0.02796241991386467 0.006190270368024382 0.009382690979782738 0.008701041131147757 0.00686240457835831 0.007668694114769584 0.006329997903122661 0.003603456120981944 0.0536717806818035 0.005921491023183386 0.007129794038411936 0.00622567338938171 0.003812443035657283 0.006403665063661069 0.05543190465140779 0.003801748202970745 0.004314259464408079 0.0301969396693663 0.004221096724119586 0.007367814234678532 0.006815808556455955 0.007082095846910923 0.03198678318200836 0.06835968335001875 0.003476706584991363 0.00361565200904696 0.006410459209334431 0.004939249203864646 0.003610049393397431 0.003493894741264143 0.004999891334914703 0.0009046321653923173 0.003251342112331019 0.004954904405245124 0.004389862785213426 0.003892152027210289 0.003407007774859983 0.004454578829916182 0.003813989964875131 0.01500645607616492 0.002544523249581564 0.003040267375057593 0.003612995224434123 0.003590281261195038 0.004510396132979496 0.003778115363146009 0.002378137628472101 0.06077461590204624 0.09294756575482131 0.002993734223459827 0.003115645912188829 0.0002337603026857544 0.002832614317189151 0.003012232225419418 0.003341996272381432 0.03540270369468446 0.03868321295594693 3.287509905585164e-05 0.003505910142543567 0.003543511588062547 0.003575902573416407 0.001068957179380634 0.002212799095648854 0.004194546280880355 0.002688348302321072 0.004574621115941902 0.005722612866136531 0.04270382256283241 0.004157994503943076 0.003448062597381367 0.00324493472698459 0.003155951880630261 0.002162950694098803 0.007468140485912501 0.001504553554281588 0.002203094886996717 0.04258814916636559 0.00784524842311266 0.007163786626622289 0.008125400576019138 0.005752154739714362 0.006943806855805952 0.002847100538035919 0.002167948886679453 0.0072518727644488 0.00832555475031475 0.01123104389728271 0.01160074077807183 0.009392982328633037 0.001630018939667916 0.01348974592044829 0.08395323169932437 0.009444898229406359 0.00378550420448923 0.008271496938323393 0.001637265066987693 0.008906827291695278 0.01245230468073303 0.04801010079726526 0.008684738886759705 0.001988076778828167 -0.01357943179350549 0.04040306324210256 0.05173187922233397 0.005304763140308101 -0.02989820124127503 0.002778161362496306 0.004923203484048342 0.003803632785841666 0.002340072624897487 0.0234139075582032 0.011319249881439 0.003403523285776198 0.004781516385048798 0.001717031443608824 0.002049416970906535 0.001632525516623098 -0.04065694341887613 0.001339268777767085 -0.04675141855122904 -0.03773521935454929 -0.04661872815243991 0.00557083189811159 0.001291997007581606 0.005402586099843992 0.001608417252015961 0.01091315388614821 0.003720334150055607 -0.002077591567168914 0.01279107001275547 0.007701785389947799 0.002644806315204482 0.003410525022784238 0.00355593808107305 0.001253591755823866 0.01821914496518624 0.004224526061957202 0.00271174156668698 0.004936677995587503 0.00472822787832726 0.01515404993032288 -0.01019181865493431 0.03250480354835324 0.005254512260985127 0.02497591986520639 0.004430122065070834 0.02108974830390908 0.02660124732792975 0.0264065289916506 0.02259195264177163 0.001930288280536245 0.02009669446890719 0.01949407528216848 0.002920008854470113 0.002832007669743047 0.001906979699442981 0.004383344300757467 -0.007752231994133905 0.06974007748960603 0.06673846478592747 0.002400099834780161 0.002522165840616313 0.003174500359172744 0.001789216730655171 0.00740610387255535 0.02571175163993929 0.005564528237202116 0.003129739785902993 0.005368060289846671 0.0145886938772874 0.005543489376640494 0.002755164512970888 0.008222419519922447 0.00716582003318648 0.03330858940053221 0.002510436775797589 0.005801716002257111 0.005866283667127845 0.003385416916400842 0.02120092458489935 0.002335599560573247 0.003310340194157097 0.009994501501369648 -0.01007392645848253 0.02320482482458703 -0.005032085058733085 0.01542603810005328 0.00783820920952766 0.003785022516163623 0.01304655321989917 0.01183067677667729 0.03001459157633198 0.01899446787324438 0.0157552146387953 0.01392892334956105 0.0009398563929143941 0.009640947308981549 0.01073155470916643 0.00473329442886138 0.006293813262489697 0.006366920194065387 -0.004545953465628502 -0.005073619121973886 0.0119302854362967 0.004822439177310147 0.02172466680459845 0.02069843768218247 0.0165969110083287 0.01939180997198515 0.02341651645869719 0.0002226421742686606 -0.01763345156888307 -0.02819774858058925 -0.01637808865925212 -0.02022425223187347 0.06264148575349607 0.007841754857536383 0.01062729317981429 0.01127057276853357 0.003956418351586807 0.004588564568792465 0.004522563601365041 0.00176694813500119 0.006054056003251339 0.01683885601068598 0.03112293972393648 0.03240340503311238 0.001947960870493923 0.01315011399181946 0.001394805053392133 0.001606784772972751 0.004369733271368136 0.001299614690899151 0.00597852490637178 0.03365274150972457 0.04050389459875188 0.06413949545031425 0.06056640315460027 0.008067665723275568 0.005278901649256954 0.001050200032058093 0.003751473922123097 0.01352327616297073 0.02045693971522311 0.009605086550948029 0.004643862151452701 0.004219495541771489 0.004359012773558862 0.004451824061623251 0.004515247941515964 0.02527007947145443 0.03922101278546242 0.005047362830408173 0.00564096570121748 0.009239943900640759 0.007520515080207054 0.003892782076833416 0.005720220943842639 0.04457406706019076 0.03477095695721882 0.05715154917337081 0.005958329043255109 0.003614088260508495 0.003936437403372049 0.00383282556429695 0.004699914928319528 0.004032369550406888 0.005705746843714479 0.008729793414858477 0.02676475320132419 0.02065665608976609 0.01398780593028908 0.02665793099805071 0.02911205264195446 0.004559788579077572 0.009911443884691536 0.01016652040705334 0.03655578484445744 0.03381487272952889 0.05401057605931022 0.04658088136304164 0.048186142497012 0.03873862298561866 0.04201343505262319 0.01416239187560408 0.008547099238439658 0.01901240410690703 0.006897473074381862 0.01502275023042868 0.01674702043814687 0.01983749051376694 0.01632781878056907 0.01778951781746814 0.06091113617104092 0.03313827979785325 0.05739746893859836 0.005212658396293657 0.006420122351251703 0.01832042686938052 0.02072462681288886 0.01081800175603015 0.01916826131376838 0.02977938192968037 0.02542233843821979 0.00548061937811733 0.01186032266930436 0.01912684051545671 0.02206134831665422 0.06680955087692203 0.0429041102295168 0.04422150370097683 0.0303515891695839 0.01074453932500111 0.0277739492482628 0.03157681871606971 0.01649907539105402 0.0188444766997002 0.01799721907896296 0.01671419602659506 0.009506496971921888 0.007164933146008443 0.006868260748313809 0.01635359714197575 0.004471643347514122 0.01612335284945208 0.006353202788117826 0.006062939178491365 0.004681713743765559 0.005718704842208444 0.01459215545511814 0.0160879595749187 0.02230578297314142 0.007509911474677347 0.01295268344316291 0.006930082536075217 0.007084023569350648 0.006823964816519904 0.006576852456352139 0.00633888414072593 0.002229952232603936 0.002002683385878772 0.0062285887317882 0.004825723178679677 0.005859328532514468 0.002758054777524026 0.005272331690615763 0.004776612972974361 0.004826654761181717 0.005992226645818911 0.00403509816358538 0.004438564557506183 0.006847991020269538 0.008198693026689793 0.01791845102686618 0.001336684380289237 0.0005166678642576882 0.02108337793181746 0.00363318449059192 0.03118166266752802 -0.003565989147224737 0.005008441625770179 0.001062461526648118 0.003510561322764632 0.001358937105159559 0.005208590272458443 0.002365274760380131 0.002664654447771652 0.006604068470923244 0.003020757892143293 0.01831535586697656 0.0236460473426945 0.02262950208497768 0.011817226957616 0.0065287524953927 0.001095849724046322 0.005355477865772684 0.003902021639163219 0.005365946063401964 0.006886615986784815 0.004892472688041547 0.007799411582264406 0.01367027101727009 0.01242246991899419 0.0225114673219333 0.009415099570481231 0.005671909401051212 0.005496307593297065 0.0008628199359050715 -0.0003884899046454714 0.009996241612527138 0.007856104015971711 0.02017176746212159 0.001260421436827415 0.003209434418004544 -0.002317950591212487 -0.002044066579321508 0.1147479505573648 0.008932780246367702 -0.0006056363341587655 0.01658209237893753 0.0738333948098808 0.04648750963760436 0.0442675789267129 0.02283830864820643 0.01149225476292749 0.03282236922655259 0.06333792309458465 0.05591827738597458 0.003682038390508006 0.003341258062471859 0.0523902509505536 0.005485112850188332 0.08211484980986224 0.005172335337974157 0.004998011130063861 0.005793444509925159 0.003927561379613224 0.005516674653894743 0.007123371729824933 0.007443789755610118 0.005810633790333948 0.005282642152235606 0.005980192195453818 0.005474149351387229 0.006533714313067616 0.006490071576440105 0.08949660455902105 0.03939255309590101 0.04450105159967577 0.05093722983868883 0.004316957690887609 0.004072889062781612 0.01015792570630249 0.01046964726800281 0.01025940888195955 0.01233566028858069 0.01159083465406854 0.00928512851268032 0.07061959397960964 0.06700580940082308 0.05635962298865674 0.05985198801175922 0.06822629210546394 0.007073506477956566 0.006442958787137942 0.00455648782187711 0.0184079311778098 0.006940805163498868 0.005966020259105055 0.006298305835388734 0.08135346359824368 0.02518645631987232 0.01466509490731513 0.008690558571391713 0.01664667781494458 0.01244937997165267 0.005207811575599274 0.01070327070928772 0.0008496106342075558 0.1075150378008352 0.00470264623190537 0.0539006331653346 0.01249210650426904 0.00966117095809022 0.01019873068162547 0.02170606613430684 0.01531590624199364 0.01184830843198359 0.02078500672032236 0.00985356409530699 0.03079725234136279 -0.02276078322673594 -0.01254371101272358 -0.02582899231911827 -0.002984478306551138 -0.005683777250994325 0.01474121671450021 0.04990264898185334 0.05568505758873627 0.04277028581865462 0.05385965156229084 0.05388452489387303 0.004248856843020259 -0.01354926235900216 0.0155700490891664 0.04300688582056949 0.002299074004002286 0.01782021815707406 -0.002395843308335572 -0.002846328287148987 0.002998017915699645 0.001961790664743289 -0.005021072991657982 -0.005169311111712147 -0.007400542383830683 -0.004873283175169824 -0.007215055984716104 -0.003229983238773046 -0.006917231617644826 0.03263704860136683 -0.03002529546075508 0.02760771503151363 0.03341026455569525 -0.007132843709113205 -0.01368897885564538 0.04019040875954649 0.0146986067494953 0.02348410702080438 0.01970450488547039 0.01054715204816088 0.02093415743298717 0.01086321421040237 0.02384622341680422 0.01279853012967171 0.009166221246907085 0.03025758670768219 -0.00309958361839553 0.0004779804716384211 -0.0005373228232738868 -0.0001596797693941329 0.01020392292251714 -0.03652124336668922 0.0386407859008998 0.02981130597533798 0.009169858853952648 0.005005751638847157 0.0002611352694319458 0.02811175723555421 0.02161593480148792 0.02299977207742585 0.02127824748922606 0.02875026374830824 0.01975633103697202 0.004010116126315178 0.06218149848888768 0.01793500064912907 0.06002893639128421 0.03297918779668947 0.05482649967256949 0.06082975868797003 -0.001189833508315124 -0.0008683345444390681 -0.001914002061969992 0.01184105272109073 0.006528113243580396 -0.002259477202175258 0.01240817517647968 0.01288541070422774 -0.01106706738883923 0.004364755351354884 0.01573789233830065 0.06437030066845975 0.03905925356385787 0.01682965326823747 -0.008352816218399929 0.001425908305398186 0.01501099192562327 0.001022463367928895 0.009613148272892226 0.1088115743168728 0.05396081681986841 0.01198411767943299 0.05697621428602194 0.0001317014316722028 0.08980604392244426 -0.0004698085090271423 0.05577396696391342 0.0854917123208051 0.02198506175669367 0.002864531953559307 -0.00995403941811555 0.006641858824158561 -0.02545075254876519 0.04399529356394243 0.02422471125823236 -0.003686772574691282 0.0173158145097804 0.0460533299703046 0.06026367040244522 0.02817115546088109 0.05696177565245742 -0.001892097887107948 0.00297016010898748 0.04588686624331768 0.1306183271495828 0.04353914671898488 -0.01037537037134954 -0.0002509559288963441 -0.004713328034660698 0.02349807349683231 -0.0002981803350638935 0.02177368646203483 0.005137776892759393 0.05455632239238484 0.05552946956363556 0.06551074103311197 0.00748497330500768 0.02720280341552886 0.06675558239923966 0.03199564620870978 0.04192792681698925 0.05526837382627961 0.03221708237023663 0.0228686536939156 0.0608782805432205 0.04522569095579942 0.01585330388424721 0.1819882670648893 0.09797303223330299 0.1007920643929093 0.05774398390611756 0.1015217883332714 0.03224415226284729 0.02497217991259819 0.01820582495424897 0.08688415099588795 0.07812515858413092 0.0195258226073631 0.05934243246463068 0.07581171610011007 0.02902774052335296 0.04598400968216874 0.03203163026474495 0.02110539612715345 0.02030122194554075 0.007008126371135685 -0.01126600035239686 0.01883893892412408 0.01642658896516845 0.01945558358377763 0.04000403613857064 0.00789260983519754 0.01806459006516123 0.05803512188591688 0.00595490756841994 0.05649904375078146 0.08127629930529125 0.01587071621859492 0.01891702573526561 0.01843665365268755 0.0546589341418032 0.04838785122230434 0.03949996339861941 0.02420880523883632 0.03849412850607949 0.01374007143579309 -0.005052695030468076 0.00956905732488624 0.008918273102470774 -0.007340308609060675 0.01616484370827782 -0.005604605030278279 0.003174147950223793 0.011383767954665 0.02119003507967271 -0.005101538440471723 0.04516737029190274 0.05011569458774239 0.01096322128415986 0.06566787608780379 0.04258424387796112 0.01735035961905746 0.02454814369480342 0.01858007385674101 0.01667980633270289 0.01604756371454321 0.01418820993617008 0.0008344131042538706 0.05443885101508239 0.007085474426487487 0.0136163177089701 0.09990053847886303 0.01554984449665593 0.01260563233197987 0.008506329989716767 0.004737099682638727 0.01464385742717528 0.005990297794296968 -0.003134340980067075 0.005796368021515932 0.1059478405857014 0.08940189690731887 0.06804191018353023 0.0160830798111403 0.02681778439224736 -0.003989519631371557 0.03961118413501034 0.1001484725998315 0.03422081316589214 -0.01362104383454863 -0.007653292057103611 -0.0008152356288275281 -0.008554102591634144 0.03863721779138287 0.008722828838163653 -0.006027863668272637 0.004189158016986828 -0.0006173699782147758 0.006554123740421479 0.006377729968687467 0.04585989773158009 -0.00204178586470122 0.08476584123010575 0.06496726485385936 0.07944142136027821 0.01411998926601917 0.1017689744966679 -0.005040472602187593 0.006136348175010208 0.002029076540065344 0.01132584990962636 0.003061520419111244 0.001993536810214231 0.03492846003467612 0.0328927776315663 0.03781672923544266 0.04234508725430342 0.04659304571325346 0.03954579608035445 0.01560529746275586 0.01597892980921645 0.003003650163081304 0.09840808264359607 0.04517302288115418 0.005229325947463749 0.002526511556800787 0.006100654176262208 0.006765698287508996 0.03039350781931584 0.01275054132419686 0.08104641584591345 0.1100049712757346 0.001553393964393606 0.0007528614880239973 0.003561598971857687 0.005268664900058425 0.004865317351036652 0.01047615103928548 0.009882115089669179 0.006328212463068902 0.006349327042902037 0.006118278692366947 -4.719259266398698e-06 0.0009186689786065309 0.01049356987520884 0.02803127412296983 0.00866461996306969 0.04381667501982483 0.04076072892107573 0.04179614714061891 0.03645959833034714 0.04341273834533745 0.01825936862689062 0.01953357870060105 0.02222591342964827 0.02174742050344186 0.009200592786063402 0.01368492286745321 0.012892395156419 -0.006222779873951667 -0.01141552868750928 -0.0282680982888681 0.003936965886398399 -0.01441782622474174 0.0003324246836976182 0.08068788988221963 -0.0008147693617094362 -0.00149068831333322 -0.002026987016048765 -0.0005108543052968252 0.01210831399981432 0.0397622951922067 0.03535088040380829 0.01040168541557653 0.01112625221025474 0.006215136972421079 0.008289095293001805 0.04599312310445673 0.008473284279272813 0.05111989286234163 0.006650327344823926 0.002159809631731003 0.009701419757620526 0.05995136290308559 0.03308423504695806 0.0291745783151932 0.01550891567935324 0.02973143872937829 0.0484263695300907 -0.001963706238660792 -0.002636165136714 -0.002890457068567395 0.009962169975187106 0.01161186116801234 0.00875967262926706 0.01851371211231089 0.02117129292128995 0.02405952485525221 0.02671746365925666 -0.01053232060790752 0.03128426809697298 0.05225883256122826 0.03252321737285495 0.04261004068852854 0.04651965986521044 0.0463078105182305 -0.04107698845092211 -0.04616333715886114 0.03459124639404047 0.003078253175742699 -0.02801997078824001 0.008556992165803827 0.009888753086044928 0.009248356227160257 0.007093243635123498 0.009292351463053364 -0.05949045077050558 0.06547949863820476 0.01238256631490421 0.06137814354717143 -0.01387670361780601 0.004391202185077215 0.005534537108212298 0.002593345558511175 -0.002584979551390889 0.004374862034575484 0.008151890736358344 0.007011364950829837 0.06623670406074204 0.005760584345671457 -0.01127008203968241 0.06972960008588566 0.002774520960794421 -0.003381956946897518 -0.009728785891071404 -0.01045937762765444 0.004840612570128816 0.002225325087898069 0.01480839365378285 0.08076549408044487 0.02380268342659903 -0.01194179878113968 0.02247308648568011 0.01122524991295368 -0.01468918236208769 0.01097437140698026 0.01269393943737076 -0.01165704761641708 0.002052954484504141 0.01221271926921982 0.006797291825674856 0.005100822087199193 0.006822359522829512 0.004800794068976755 0.008465275819248597 0.003217612668031897 0.002985570405528005 0.09612348461515662 0.01146001794453747 0.0111182126735326 0.01027986310459683 0.003089148087976469 0.002987116106156482 0.02982314304470945 0.002386427431462064 -0.0003520752349139342 0.005008124929344582 0.003164979080135078 0.001619713811196249 0.03086105540642258 0.03082992219432323 0.02556269489777695 0.02751869453910578 0.02301961498632276 0.03446070220126504 0.002300642768746202 0.01115751715411981 0.008635519121290966 0.01295521412197895 0.006817409744298578 0.008105185131740104 0.008551657987419003 0.008732834351926479 0.01464673171189913 0.01263491071778182 0.01142624314924183 0.01198183430595818 0.01644351289524925 0.01514874936656644 0.01277303320045189 0.04595543129961183 0.01742184696885316 0.02621727876116383 0.02449148663582308 0.01838102882169219 0.01901384764501431 0.02442502544389015 0.02634700837279692 -0.01063513027905783 0.04015766154097244 0.04056839319130834 0.03304626837623161 0.03325781904691063 0.06775000966416041 0.01186167584414511 0.0650226775335096 0.0004111972173678427 0.0002513995922696934 0.00346388359403255 0.004293435200703716 0.005327731238452109 0.01302226896427547 0.004401193162192512 0.004764978479622259 0.02508883550621572 0.02182637435191233 0.02271521890156538 0.02732876976526287 0.03171663412130739 0.03089155309531705 0.008334425923260929 0.04969659152121415 0.05181944895808772 0.004699609403151538 0.01149406828147221 0.06058106380057257 0.0612567446246824 0.005039165230154485 0.009015171579092013 0.004178210288485477 0.00632832385533267 0.006896070632775043 0.01114969073719256 0.01012521482405751 0.006102409017508867 0.006871587014014956 0.01071746245047893 0.01338074098086518 0.01729541918670897 0.01328144317876156 -0.0002677484722918759 -0.002211652518953775 -0.001961085680404352 0.002123051350997987 -0.00277192468075238 0.006701263060420186 0.006510407115396197 0.004110028557237314 0.005818479311267615 0.004634130461712859 7.023031436003903e-05 0.06543645631100305 -0.002705774131217977 -0.001530706973146786 4.216547501045232e-05 0.01831551778374448 0.01335150740997077 0.007299670187711159 0.007800486877988903 0.01746802923828469 0.0001740573274666692 -0.003428224968033419 -0.001159408164859318 0.01075957544155389 -0.005975844885988432 0.04364159955910411 -0.001630446251600758 -0.003858838891380891 0.05793830957157779 0.06173107034534566 0.04640004909992147 0.04921287991941944 0.03831690408458922 0.03690353528898944 0.04322127420791359 0.04530511747404976 0.03864376711989019 0.04237740567169067 0.00656206505725226 0.05383499679333314 0.04397539559336282 0.04330000761063929 0.05598758191665751 0.05385623986537123 -0.002549682758595605 -0.0007346852035613731 0.001943352863172921 0.008200854912491225 0.007691267474904235 -0.0002358186358012826 0.0003500076024546555 7.912225496282445e-06 -0.03295128130598911 0.001050056466226774 -0.01294035288772589 0.006036895216335238 0.001279697553589652 -0.001309209322126599 0.019506392695145 0.01827590833569499 0.017211621456263 0.004554511421111399 0.003602537811334096 0.01702760873109885 0.01258293694419133 0.01079263298410163 0.005651518137063881 0.006337943146681631 0.005896756269594841 0.005076361846577867 0.005277358457028537 0.006446040552513282 0.006139780490390701 0.004649964048449451 0.002098180886685445 0.006560250278372225 0.006854981888514372 0.01333265547090047 0.008918226088989335 0.01149595892858376 0.00932055088029126 0.02731235914850462 0.009972745210004338 0.01226341900741097 0.01527932318127329 0.0259974459960462 0.002800821810579025 0.001640084203585168 0.00207052546393924 0.002222807106353368 0.01611647051168776 0.008106329398597093 0.008563488033585663 0.008832409061270413 0.008677586299408237 0.007579354230851907 0.008102031349366325 0.02810248706217891 0.007552898166540321 0.008785718151926422 -0.02065103424845916 0.01047351456915054 0.005712830967068551 0.006852033449100864 0.06933225454066724 0.004191963239870176 0.00530219333601185 0.005669807841312237 0.03707474236999276 0.03231152906321198 0.02640704992721912 0.02908763248687277 0.04149087548845363 0.03090334130724901 -0.004995849995815053 0.006457233617296582 -0.003288082172945687 -0.005562950328051069 -0.003335976634725298 0.007591447616625307 0.004219920091531522 -0.0024684015996939 0.004533800780450204 0.004707975844933686 0.005092432897872844 0.005387075522785382 0.005006346835110097 -0.004290748287160293 0.002309023493079009 -0.0004485762409727555 0.01209591491815486 0.002180393855420324 0.00240376917362245 0.001693181868431712 0.05284908399773621 0.002365684601579857 0.009539677110959271 0.0110067369665649 0.003578723981534175 0.003630463535409501 0.00368467480010743 0.009160065463216455 0.01041993629901094 0.0110750342617948 0.01049230967847263 0.01406670085629579 0.009039503672348466 0.002274666308553798 -0.001478575909109029 0.002030087480139791 0.003226876734053254 0.002294924053593852 0.06285762164530972 0.001780524547744167 0.002685787220027946 0.001818355607361044 0.0107250327318328 0.01149896813094746 0.00302984561792876 0.004070284024647563 0.003208805757494172 0.03876166997295891 0.03469050698090977 0.03693836096923205 0.08648767630687036 0.01005456740633552 0.01072933014556236 0.01193023862424315 0.01285294224901472 0.01094834248590813 0.0113760721814202 0.02349953280511654 0.01405351049579855 0.0186333417213643 0.02323772820811678 0.02573691632040029 0.02512882056413975 0.0152463309098997 0.02618277376580453 0.0728784192843355 0.02589261810716224 0.02548430944639615 0.01759250494479892 0.037452583303968 0.006426248756873372 0.02537728780613781 0.02393593118968075 0.02209048289287581 0.02588125994269167 0.02803309625667025 0.02333177070167207 0.03284865035160505 0.02525918650249854 0.03061540724708707 0.01222209850033854 0.02020465686044049 0.01742983014043395 0.01825607391906885 0.01863738402324535 0.01695042218290102 0.01856921476808142 0.01732453430355326 0.01857808138603689 0.01023005132937089 0.01877173623177962 0.01794304322726687 0.01814290965322996 0.009693981633176219 0.008534363044695755 0.009411663805466843 0.007487884365662056 0.03631278742538321 0.0357305132833349 0.01476509249954903 0.01364006737062925 0.005403171379290701 0.01079498461797132 0.01079677712605218 0.01655502261107988 0.01389039242486442 0.01152448332851619 0.0190023025458566 0.034188390302936 0.01519872290719721 0.01798296883313719 0.01529891098071652 0.01320050738638776 0.03773335881132697 0.03861700116426635 0.03827375600543776 0.04208035949947924 0.04126929785524468 0.01421322436714622 0.03905699477665856 0.04811103469016535 0.01430127297088236 0.01557469373545485 0.01356706641648523 0.01219407115032309 0.01260410865095602 0.01569710300945392 0.01353214462290712 0.01613931798385776 0.03359629572368627 0.03831078447822633 0.005321710790599911 0.02519158427437607 0.0237952445433563 0.02407828336410607 0.02457981680622327 0.02311241723808793 0.03837388661573472 0.03505410473494165 0.05261063716114176 0.0620728450149099 0.03061202364553716 0.05795613667371845 0.06713039481817447 0.05932405967416626 0.005526410455756866 0.05608110008306268 0.01160874193710213 0.03981993913968698 0.01225846723991363 0.01909036179441 -0.008030644534056349 0.01786928728706549 0.03168136197469852 0.03433606690799459 0.005778457210655565 0.05073182801212266 0.05260796470210945 0.03593462213209492 0.02936415257726101 0.00568640051351972 0.01008268611901398 0.01029918085488872 0.01025042044610642 0.009489741102019578 0.02187541106192686 0.02917143232657988 0.02996522712301641 0.03553745267923112 0.03194326604409882 0.01817033257221562 0.0256144870813849 0.02553007182663859 0.006140074013032202 0.03262290282358603 0.006036295396765205 0.03513241937079043 0.0271311953690268 0.01445236662928302 0.03146091837768596 0.002996750901466351 0.003215628128707916 0.01619185411479594 -0.00125735157937971 0.00351840483173221 -0.01012518431104542 0.003217596044915122 0.01546824272826629 0.01700835757330515 0.004710783161671982 -0.00691270086106387 0.004954236868635721 0.00138048460171918 0.0112172876025377 0.003559329509710221 0.001387155260301604 0.0329401609503638 0.005034697235800815 0.002565303824054696 -0.01290353517910124 -0.01074480484361149 0.0005688949339264745 -0.0006763625147685977 0.01701454685724276 -0.001940321189694497 0.01398607342736614 -0.003537148651143429 0.01899311205866645 9.813828978563763e-05 -0.00221858803986164 -0.001473320852016302 0.007183712543144986 0.01014165464024962 0.005065147951020662 0.01017919425782061 0.01224522992896115 0.01080476679470552 0.001505717687195826 0.01021889293010413 0.0004197386730779582 0.01633126949217922 0.01435851276492564 0.01531929808789608 0.0003048345535828811 0.002107226791379074 0.0009638571463538222 -0.0008399104686617496 -0.001177144979352717 0.003961867986326921 0.009236282723108866 0.008388772591692894 0.02258723986015703 0.0204045953624021 0.01516510590410999 0.01693159671467223 0.0168265427192477 0.01355765182385572 0.02559755975098649 0.008264257292889461 0.02550569183364032 0.01848703818856436 0.01416807773619488 0.004301608298301657 0.007883315155360808 0.00822638117840109 0.08799549593600359 0.008375706174628886 0.0205227877579696 0.0216483607414578 0.02541916853558742 0.01632794736644149 0.01730726426034539 0.02775540795866551 0.01054758785873009 0.006553548186890094 0.007264490259125512 0.002712428737561942 0.005106116512346663 0.01154055888419171 0.02852528161150659 0.002222111261661397 0.002228207024561367 0.01817687229546711 0.02773754985266501 0.01346123945537121 0.0007644627348181248 0.01675853357110407 0.07778390320873604 0.01469418829587949 0.04684364759428145 0.01264536161403456 0.008712431014901234 -0.002101383112610333 0.003421080102864258 0.002464899255129521 0.04204704535334779 0.01632777063259182 0.08061107734637092 0.04069182384156988 0.01368242374655205 0.01268271945180328 0.0158808663827223 -0.006209292628777295 0.005085789611472814 0.0164379246875996 0.005354551381949406 0.01391311386358124 0.03413821879697262 0.03682400326797564 0.02673982825199772 0.04327277829259751 -0.0145062218995319 -0.02091207726682826 -0.02689729779342111 -0.02495734341470401 0.03618639759056166 0.0284465378871287 0.03507373971158999 -0.03242638971804184 -0.04050465031840249 0.004570279175127061 0.025648557197534 0.02391291102509784 0.03358250752516191 0.001840548979652059 0.001360094691107929 -0.0002919566818879385 0.02779913671995399 0.002389574413588675 0.00282930856875051 -0.02876338693736416 0.002627441802354766 -0.0004975579136414642 0.01156471437952818 0.006757553654315328 0.0009677644617936804 -0.001413787306530222 0.0002072260485442394 -0.001045675312288812 -0.001238246876520665 0.003625664899249178 0.00347609545931024 0.003804540183251484 0.004369605171539569 0.003912614189910954 -0.001596818455947663 0.01337166560610443 0.003619888396675994 0.05187464135326065 0.07894055881110291 -0.01849547169434269 0.00168143532563767 0.01385106753756954 0.001295846255539902 0.04360026783967411 -0.0006130763731630686 0.01761865323815526 0.04858565363129465 0.03014894687338023 0.009229920591703907 -0.01654154517700615 -0.0155006491144996 0.003861406274263646 -0.02417280003255853 -0.01608905426155641 0.01580133330793636 -0.02858883908411896 -0.01472903407336468 0.001253708965988781 0.002028416403437128 0.003602626906986406 0.002892220569312941 0.001862717721635324 0.000406749902489452 0.000410387938390142 0.0006939793105139662 0.0004896089022536641 0.006392313973439731 0.0007575063086198511 0.00551319303020035 0.001176106036850373 0.005306403945655797 0.001169419812875029 -0.0006297818608569122 0.0005735418234382629 0.005738249882460158 0.003887982323422378 0.006555475724519419 0.0006703220880370819 -0.0006550942481373172 0.003073550507293695 0.002192187841285085 0.003205550160856324 0.003104436910599649 0.002745707873585646 0.05120430948313473 0.0685096739351314 0.0672297299199454 0.000418156547010491 0.004306468060112176 0.004799538956898257 0.05462529766818178 0.0006577561513197805 0.0006429126343222389 -0.0005497240217139125 0.0445828281953948 0.009085320826858324 0.04776265965907141 0.004761144740681615 0.05205692041484834 -0.0003768217371268308 0.003049566584737819 0.003703040638065911 0.00239442316290412 0.0338218116267694 0.004410899804634177 0.004282657450093267 0.0044627800952529 0.008099535538576811 0.007800702483256802 0.007553468339037927 0.00794909733480669 0.009726102246037987 0.008795360326255702 0.08129492453066783 0.08342992363883461 0.009920772322872242 0.009943486809308115 0.1225882487360648 0.007979564845634578 0.008431481435362848 0.04679614606418699 0.02638068827399222 0.0231298674718806 0.002037072609735074 0.01920756373947757 0.01252154226478154 0.0252291375347423 0.02560665186741366 0.05308440354412952 0.02295451809628369 0.01473671147627707 0.04871316405903729 0.03286162231480495 0.02518551769822466 0.01080283238933979 0.03841659614961206 0.0181837173905011 0.01311508890589251 0.03060605068951636 0.01825677622369824 0.02782308732817384 0.02255313473295169 0.05757514828243868 0.05482589509884436 0.001613792906938545 0.0003064641433820675 -0.02421481736770813 0.001498508333264081 -0.003852391915560571 0.001436080172982131 0.001286948319418785 0.05550407580491949 0.04179055956306528 0.04484849806425872 0.00214699853613823 0.03430541181824941 0.07109813936201585 0.0736399671838238 0.001596435821490166 0.002742990195278895 0.06010491631239712 0.001598554830380737 0.001840749713978213 0.05526743686590514 0.001328158325043787 0.0092944415446631 0.008466688259832232 0.00796942373695015 0.006732042838899264 0.03601283134971371 0.01516491490133982 0.003899252485970055 0.004259118872235873 -0.001318851201548914 0.004336380887033048 0.004554032224392207 0.005031748845468828 0.02648503713025911 0.004021625639661976 0.002943706943197873 0.004812490310251942 0.045298437265693 0.05532090216832807 0.05449305222861777 0.01385266970361392 0.00415651371283181 0.01675581845019911 0.03049886663097033 0.1222460967081896 0.05495555871941751 0.06143495265478711 0.05986056430281506 0.03733016417519069 0.07534941770511019 0.07506932628633133 0.04291725869167896 0.03459830235962337 0.06192242581536788 0.05975284627338046 0.02934319871038715 0.01576930790275141 0.07429954183583633 0.07855121996419279 -0.001447269889978066 0.06670013118980987 0.06699717139228947 0.06153117149995188 0.04214011724250954 0.01524193282457456 0.05502555731531752 0.04926351637042337 0.05611438720154831 0.04313064070589805 0.003028039603493073 0.0009171503985242704 0.001292705723960387 0.001289180049394163 0.04391709307779461 -0.0002973482983401164 0.0007515282206246209 0.005741595034912569 0.004668129107628068 0.004253059018910325 0.004027058953223912 0.06340771917288626 0.003914141985984726 0.05311180412693777 0.02657599412981148 0.02990638624161321 0.0004502505251717225 0.1404952213650854 0.05223560195598569 0.01528579566793498 0.006719185223566623 0.0302412243362422 0.03577410191777897 0.02821902386585557 0.007463286077365621 0.07990148867477739 0.01962912119385957 0.01015249752264231 0.03100222155975145 0.003905057258496217 0.004948515304853037 0.002976479686830429 0.138305691756841 0.002235829800062948 0.002226598790466036 0.0001699309621030125 0.002720790054340053 0.004750292283150563 0.002076241285305869 0.002451504739715849 0.004517021005107514 0.006583659917203768 -0.0001451521596424822 0.003373743985538767 0.003689903544403997 0.0162882236741668 0.001538872254205495 0.04634135570338268 0.04067150566078086 0.1075040738084615 0.00132956691402281 0.1268604084007075 0.120502783304967 0.002119897602033725 -0.0009727041849696709 0.142814331765313 0.002182409997829822 0.01147899534453636 0.0006064770873352553 0.03766177082293693 0.0005757410224865169 0.007473194368023937 0.01947504135560303 0.0006777248294401728 0.001231206791777753 0.06672984330932855 0.003807419812210509 0.004637456600444161 0.004463486198129029 0.01952643976433169 0.00566880714226678 0.005975674724839562 0.0006452654977927681 0.007733269800859646 0.004133609125244748 0.007377287744847387 0.00538166692016477 0.002636883377514076 0.07559096054998984 0.00227508996981321 -0.0006085275609902797 0.003465295303285246 0.003411786120187604 0.1117276418888561 0.0002471064348610487 0.09244939466988747 0.002895849071382507 0.004824479934724385 0.00470479716077781 0.04713572311230176 0.07683299696182853 0.06648604454360403 0.002580542377274639 0.002044764954621616 0.003192750827561981 0.003897542220930738 0.002872529370106206 0.003590747051799432 0.0005638008546397778 0.003518058791997894 0.002079817117862476 0.0009767823373411097 0.003105504000729745 0.004538023469467261 0.001745011893071635 0.003254390064677001 0.002779024722786573 0.00291843828961591 0.002972947700866479 0.002563052180895879 0.0007158846555243227 0.1864698860668709 0.04420763185772558 0.1728350338483398 0.01997935722547996 0.04157176169809317 0.07971070021334614 0.1543437087220165 0.0008478322151436659 0.1018317891704182 0.00361065638420658 -0.0124676148029024 0.03102818469009806 0.03316332604450578 0.03247127559115646 0.02787207920696328 0.09468556676089065 0.04899574771822227 0.05835067764468977 0.06088431141550117 0.07055934284639259 0.07543730834817586 0.04418561085549864 0.02217108390710513 0.1289238044353134 0.1551570572945108 0.1292501583999441 0.001790601404574493 0.06843320052549233 0.001208304477407518 0.101546229248521 0.0239340331817117 0.02176587219928007 0.003950421707317644 0.003489309670160097 0.003599608763753047 0.004028356882002489 0.003902390951807153 0.002747074353254679 0.002628977000720076 0.002743048894217297 0.002287342918115459 0.002672479533435482 0.00307171994979644 0.0001514611132086627 0.003082755600095048 0.003085261299311658 0.003119023675927526 0.002859200142513437 0.0005465114728356087 0.001427036140210877 0.002949982341430695 0.0061422862157922 0.006207578627600098 0.005419098675690901 0.005289440472017195 0.005554952067582107 0.004051076171525101 0.0008584967792252226 0.004777156216213441 0.001472339359723998 0.0009295998404813695 -0.02235781886281908 0.00386560049039741 0.001551265039133026 0.003869365349851224 0.003952730187938152 0.00330933001220294 0.01363098703087888 0.004011123986675904 0.003501524686489429 0.004854714932268999 0.00532002846804455 0.004407982670418354 0.004081974374643351 0.004331883108235587 0.004849245251766969 0.004515200563375637 0.006369883710194747 0.009602301525488762 0.008507849992122252 0.0084031001713421 0.008575606273687031 0.008000239437063218 0.007942373821380209 0.01260209631986324 0.01164567000416764 0.004296926553055428 0.004293089808258926 0.005015569368321995 0.004531278722764326 0.004726951572805773 0.00450484166533949 0.004372930551321417 0.001326450342928427 0.0008071973065876002 0.0005007103460203772 0.0006230263211075785 0.01134746115449202 0.007201190683447711 0.0114479415428471 0.007333272668027133 0.009524045508541896 0.007507767498007019 0.0006142815728903754 0.008202637587920775 0.003110094126015831 0.003285596012625263 0.00271060047594245 0.005556199478711477 0.002510899966201264 0.002096590073710444 0.003375542075467609 0.003328227027003863 0.005514114853366774 0.005025790292120388 0.004915962538289867 0.004773677719197046 0.000648523232274632 0.004767501827885496 0.003009941274147436 0.004634825373819799 0.0004150274705738981 0.00196899976597369 0.001738544278292323 0.004440395563606607 0.004149658131025165 0.004150817763970224 0.003670892458032496 0.002651613326887914 0.00351952926065111 0.003191779602159904 0.01112666428042468 0.03167598571124826 0.0292213240941795 0.005832116975885202 0.005697866300029505 0.003675784517309579 0.004329971576186053 0.003468310362282131 0.009858815560651407 0.02934489433576336 0.006192668846409545 0.004463470891901958 0.004464819375102012 0.002263955412448966 0.003845248472581315 0.003598789959938453 0.007188872465805266 0.003582961981447368 0.008020744798686724 0.009009926225993789 0.003628028832987885 0.006386355819027563 0.006099088496009721 0.004667894964421822 0.004495027308215944 0.004811463045868729 0.004595896164709446 0.007418968597090071 0.003494571816405037 0.004055329895043661 0.005197209439311742 -0.0001596130334814848 0.1305002960667916 0.006718079325452568 0.01083459851222052 0.009718989248799235 0.009957376285844838 0.008901116957621922 0.01343585543885467 0.01112201779119614 0.01230112837284721 0.02143682717698626 0.007392347712062025 0.00634877026567502 0.003098216475778198 0.003448646025007594 0.004787899073698298 0.00280352472986647 0.003785607632210289 0.003249389509236536 0.003789054787659963 0.00392538985925121 0.003270851461308285 0.003108967433205864 0.002606134151381026 0.004835785062182636 0.004110771777193468 0.003747368302163446 0.005220867816568054 0.005010677284601747 0.0081855994307805 0.005926875097425284 0.009424771101002654 0.003579010847145431 0.0003001135506161846 0.00126404638037089 0.0004083131131141177 0.0008602949486879371 0.0003376470740131801 0.0003656586716828197 7.519390852892613e-05 0.00163004311245466 0.001610765672610169 0.001111249546878943 0.001975733990326149 0.1238057431265416 0.001294373865681964 0.1528216602318581 0.001090271541470562 0.0008064443102130514 0.01723301389839218 -0.00160512865716974 0.04610866319339667 0.05763411805890766 0.03964582126176186 0.04050965691541404 0.04396869664633871 0.02579681033528085 0.02546123702836918 0.008215783045468749 0.02788978578944197 0.05007662828373121 0.04831778419200789 0.04665190959468846 0.005566875957959736 0.008243379556604959 0.02506072463184034 0.02141552283617878 0.02257997539718249 0.01655011488226154 0.02128086153463785 0.03020140821520197 0.004580785733656189 0.009854993609504099 0.009746602361462768 0.007563778655305744 0.009291024573640866 0.00843277644194251 0.006995562372172669 0.008882923357786326 0.04883950425311846 0.04799147508084723 0.05043020728129949 0.003613069176656899 0.04971471040028726 0.03419985395282464 0.02733836578475172 0.006220068899301769 0.01711382898103464 -0.001683429904249829 -0.003569938001723495 0.004011205930759084 0.008642759165349644 0.003014050595837074 0.002706951903183582 0.002338234679236537 0.009527159796765652 -0.01418566330725593 0.007431819397839896 0.07611872877925083 0.006895280723821911 0.07059764504021707 0.1314425113854118 0.07029958293688705 0.1262198321917673 0.07876385434524164 0.1178443232642268 0.04037667453648373 0.1385210734272909 0.1402877047442301 0.001759452867137237 0.0210611769656357 0.004195165506514236 0.1409843645829784 0.02190065624728601 0.01935406988249403 0.00263339823013979 0.003174099204211335 0.01932318075002511 0.003985359183806152 0.003855844033957222 0.003382900800444786 0.00251449940957365 0.003087276577734502 0.002009577710962102 0.01556213464513341 0.002572795231082341 0.003482365391043952 0.02479598663805549 0.01953010879513601 0.003921318934280458 0.01274242204250691 -0.0006222243524035964 0.001183934602017935 0.002380134082909682 0.01610186862687101 0.002919379914732639 0.001722003705807955 0.001032861406251588 0.006331622620279739 0.07551593419258962 0.0618507413246711 0.0009802916750525166 0.003317310898717613 0.0004986592509617683 0.004401317537209086 0.005986349485454636 0.004347499704596179 0.00559957140373949 0.009629647275042386 0.006008768992354247 0.002976431429850003 0.003440714214189578 0.0041205285494147 0.0034355732278697 0.00451059429862854 0.003246827512008968 0.004918877157821655 0.05890064202128512 0.0046391308891201 0.009296856717930185 0.001800097943462481 0.002846844712245877 0.002956316559962553 0.0005105955035343274 0.01980867028958415 0.0004152483653063959 0.01844082150907355 0.0195919892654042 0.02104472900967851 0.005839552179469205 0.005494067196671086 0.004909182767323992 0.01653014697863546 0.01061936127787395 0.0003429429151750905 0.01589024105412482 0.01026588226025527 0.001970352972416375 0.0135189222124973 0.01935081392006567 0.01750211143651873 0.02019309923843525 0.01887751703627489 0.0002853690869679695 0.002009954076289999 0.02844395804412065 0.004612624211009581 0.003138287061285574 0.0349350524344544 0.005081556692092957 0.004155304542078624 0.01091705605614452 0.001952710914738351 0.002332039148220835 0.01098668778779107 0.005623640407945776 0.006560559684691134 0.04835525779269127 0.03863266267916361 0.03049598325402128 0.006655587051314939 0.03125984838737475 0.001907764767765582 0.00343935433627498 0.005835444043662759 0.003567289324341442 0.03438796870966963 0.03875530373876319 -0.0007473939483626472 0.00242736289313087 0.005599748539156227 0.005900274816461539 0.003236960937364818 0.004425353364743578 0.004202040811062976 -0.000546349564895178 0.00159307339410378 0.000242819802010251 0.004147369814812809 0.002176042070270262 -0.000422619497024133 0.002600451510570212 0.002612136242141294 0.003495202096480993 0.003919678382370837 0.005218414360370162 0.002761815591820758 0.004000024996905443 0.002341316750920158 0.001244627782980889 0.001826506030206543 0.0005230606887965597 0.001910777568045089 0.0005520442892973778 -0.0006047408077530043 0.000813566716531013 0.0008029003122127021 0.004396321611508352 0.003960978715751374 0.004332231434875266 -2.186365020584185e-05 0.009600301593767865 0.003924600569342017 0.004771638639016838 0.004601350634741911 0.004591405318746902 0.003804400283536262 0.004269337216069178 0.003461233961091661 0.004506601301333251 0.003186790040755171 0.004163907450560615 0.00347026458677859 0.003782342347270799 0.003715994588226222 0.004559822446048156 0.0009523120075279536 -0.0001200506873146934 0.001630534969479522 0.002531479413657276 0.002018792009034532 0.002327808497273932 4.454910344059132e-06 -0.003075203959587157 0.004037725930560306 0.005744341751664428 0.004122210750020602 0.000932213370259671 0.003063469966719171 0.001347909444202134 0.001929184060230267 0.001534163444670949 0.003815134391667886 -7.172719103192717e-05 0.01162128014730726 0.00179906484011548 0.0006065118183012627 0.001858227039669387 0.002711738466306866 0.004340265528783535 0.003623560638995576 0.003946577143290452 0.004183920807103204 0.00270550031419085 0.00313091514231518 0.005031152515729448 0.003707791353924494 0.003812699326384492 0.00397082932223707 0.005545750176005025 0.005508739412346213 0.006903968768957971 0.00301802593295105 0.01516286312106615 0.002588835482540545 0.0002646559689121005 -5.922991855510101e-05 0.001509646101224771 -0.0008362790143471638 0.003324769343877561 0.004596332990844153 0.004164129023435023 0.003564023328284021 0.0036956223184096 0.005131406203547692 0.003546102167464568 0.003590536857155699 0.0006411343941552664 0.004826785858405628 -0.002823769938775686 0.005181805690605568 0.002002153688125236 0.009462358853272783 0.004691806193894043 0.006298404493610622 0.004308430443916421 0.005952089126153809 0.004038050544030097 0.004664578156268637 0.0008771642677335813 0.003264311707381405 -0.0005270937086909925 0.005440520306228533 0.003339210850614916 0.003231303497234197 5.218832665200487e-06 -6.80045775911997e-05 0.003918167648258704 0.003012107988590113 0.004895460041411909 0.007179999767782767 0.007244916803570406 0.003592504558167682 0.002762352216741242 0.0005366130280535604 0.001419712178441167 0.005226910945863817 0.0003915214638357961 0.001722935889916961 0.002022127129428038 0.0001180476551583639 0.005863504968564489 0.03374029401570225 0.03535686187468227 0.03459195992665835 0.03201980087093038 0.000418403837955082 0.01357268179463057 0.0008064379137603388 0.01630774764075161 0.0009279092452138786 0.01917475881843936 0.02694147027043914 0.03088563198549603 0.02188581741551317 0.02816423617061845 0.01670886414007143 0.01831640377374325 0.02738362931439258 0.03237236610882393 0.04090465409982631 0.0315039167045176 0.002519381389498074 0.009411733374511297 0.007484914177168204 0.007281608499009023 0.01183886653007319 0.008122867418134474 0.01120314721030374 0.007774102923302473 0.00925219499382106 0.007587635692258749 0.007949462078742149 0.02896739949137968 0.004268023763477776 0.0385059935734612 0.01606252592635116 0.009685348299691211 0.0200430949606486 0.004540311322559142 0.008553572345233979 0.009108223413251961 0.01403599755019859 0.01218477657352498 0.01106006916184598 0.01253394326907334 0.004200337814884478 0.01524798215886626 0.008018853828119234 0.004905278977766369 0.01014686478013903 0.006433735922949286 0.004618974064638255 0.005159411239425617 -0.0006822405112880413 0.005627646761795209 0.004531566782795821 0.03309391520807076 0.03165627773956987 0.02473989187340237 0.0349596641345542 0.0248197747724549 0.003916888753898249 0.004419865920322003 0.007127333138400049 0.007628689795032381 0.007293877810037231 0.008506434980762218 0.004375384875078418 0.009023154057484372 0.00607154912565176 0.00607414218301701 0.0004548221047648255 0.01391952610774606 0.00137854983689909 -0.0003739265995782306 0.006275175903578775 0.0001429800392608575 0.004802039945194941 0.003039504520086739 0.002807309421847229 0.01156222501413744 0.01238592998368326 0.01363596002050185 0.004529142962420356 -0.004767637003453989 0.003105877962054336 0.006589091654640971 -0.002115798102542021 0.003852108210136636 -0.001045852360969505 0.002911819198806669 0.003083451095173605 0.003692952548544169 0.005692442435908958 0.006587844169061936 0.005156157394850403 0.005802278496251903 0.007123465574060813 0.01442354169291125 -0.02134495473102709 0.02658436672665245 0.006814997290920866 0.04391654193469809 0.05716756913420332 0.02317676132684843 0.02632089476149785 0.02531078645953561 0.02055277464467972 0.02916331864139573 0.005531617149322577 0.04072275048511946 0.01151232089206231 0.01054141450242391 0.0065201788925218 0.006035263510310754 0.02824452382988862 0.04996736411527319 0.03837974471683465 0.03684088748520529 0.02211300086379616 0.01860031083518499 0.01335174447164302 0.01784288139469482 0.02216476006582878 0.009793266507154893 0.01168854652748302 0.006086902152068622 0.00670405129765088 0.001114621033368595 0.0006581729997468262 0.07204002169072196 0.0009794726860962533 0.0006149518711716986 0.005786218852191227 0.01570466417745302 0.001803777382338185 0.0009294677794059881 0.02518777147442723 0.001795217191489045 0.004627687270893984 0.003134920699693336 0.01117249159419339 0.009786093465397249 0.02775936280148955 0.02997124603975903 0.001745879921988156 0.004311482943041105 0.01301507946742729 0.01038720142584503 0.01208627088841217 0.004698574892617707 0.004607164545765141 0.005504715723563113 0.01485295174393738 0.01001848983354016 0.02010794093579895 0.02194529146166657 0.03907883228214059 0.03835813518766452 0.02464405986524086 0.005299160330929961 0.02669275428142905 0.03972144699653841 0.03725865807895119 0.009506008422708276 0.007021209465367531 0.01839536029622606 0.00749505660712851 0.011411928867814 0.01595719866067894 0.02919590064717732 0.02829703181215062 0.01940823392385672 0.0370898843710386 0.02810268809213541 0.02125065023797409 0.006848782595569431 0.02567865134538037 0.004263098390635186 0.02156674386590722 0.01593749812331949 0.01745861012052218 0.00434774282301188 0.02419636655663029 0.004788747894572408 0.01789213223102477 0.02503072940205164 0.01161644431343493 0.00452264005098624 0.009157816036245079 0.01738172311108147 0.01965648528470571 0.005031796267510818 0.01126264314830222 0.005943754935690942 0.02997410106328612 0.003289600904774084 0.003210637301593877 0.01140078401216436 0.04175846028170974 0.003285119719937022 0.003342593782198448 0.03983711227592242 0.004779220257382933 0.003405783873058983 0.003333225950988599 0.01678364682415148 0.02060960457195323 0.002755099193168183 0.02155343143104077 0.01464542357140026 0.02439388300512666 0.04099184859577906 0.001604085001614952 0.03004581378164196 0.001169657534185211 -0.003761903818665172 0.01718490816203029 0.003379169621746791 -0.001382387263664795 0.03282048434698066 0.02935092601557962 0.03290746624587172 0.002672148100646366 0.01324265303513225 0.03282491639167421 0.01379533554431511 0.02380749320416679 0.007698913258452048 -0.006382442886945417 -0.001526426951916194 -0.003144153809194923 0.01085579308152533 0.00898676415605382 0.00901507215300257 0.01907758419320426 0.007175933199109264 0.01609104137326223 0.009760263975695207 0.01283026028956613 0.03685830103124317 0.02792382872675814 0.02525863187044602 0.03245207589439165 0.013324033245312 0.03352385223092449 0.01454160632641779 0.02226646334078919 0.0008998420736344204 0.002056135434967268 0.0001621335318154141 0.002358318183800742 0.00372072836620135 -0.0001393680251812164 0.006149526954969261 0.006561437031480878 0.006277273990421159 0.005287883324632758 -0.002161644693451659 0.011428870149675 4.417815433064251e-06 0.008788507499970325 0.01479773489003377 0.009823476205872168 0.01207206029746033 0.009848399127203917 0.01439812347969217 0.004425946589223971 0.01036629352426401 0.005381801477116414 0.005826463234209391 0.0191196572750627 0.02884953291498628 0.01501875961040914 0.01661974243770595 0.01772639280485164 0.01417596428066934 0.0105630708428144 0.005102006121313608 0.01358385924627725 0.0007100172603898587 0.01127098472809176 0.01019732665690003 0.01058099495750241 0.0157363780213608 0.008740195142751955 0.01149220852772495 0.007162597357020401 0.002659745722382114 0.01427314148943573 0.006538190012817017 0.003088511769062208 0.008162780545843141 0.01805700314369808 0.001633760468403196 -0.002545069836843907 0.01391705854256013 0.02308598871777416 0.01826326542181818 0.01181150638238651 0.01953269536853475 -0.002686913055912289 0.005705565794964592 0.02125999465066691 0.03709226355958856 0.05382031504710194 0.04961833090496321 0.04474012298187451 0.03585243052053624 0.03200374668761562 0.002100089966238315 0.006362430388725381 0.003037331520073717 -0.0007873870004038662 0.002034020118763814 0.0309449776075744 0.001138069747012439 0.02787379234766476 0.01790250300292415 0.02179477576778143 0.02535512071408525 0.01671375220621125 -0.003721973309214394 0.02491284375002335 0.009011770962959792 0.01290580368686957 0.02110891680337397 0.01941210650528282 -0.001168357193388139 0.0382345969415553 0.03824663398681015 0.001323924021466323 0.0004576110497262484 -0.001108585633568295 0.0009663603780291468 0.00318595416164123 0.001072742429579819 0.00183473836047516 0.00657417884614574 0.01570437378547243 0.01695526045709263 0.02157584836278368 0.007762233923302424 0.02079758534324422 0.005316477941542739 0.01701904623747108 0.00344486192734274 0.004354016201291084 0.0009534535033772614 -0.001100625943722104 0.0006549278934403283 -0.00242875324226042 -0.0002736983867162678 0.01561386899029564 0.009660654367818447 0.01485043831285662 0.02615939918124423 0.002647942889857451 0.001468648083879848 0.008494429671329911 0.002598647314758105 0.0108039094137798 0.008944161390103889 0.02025311596143153 0.01907835819679232 0.01324899833615038 0.009917299125130528 0.04129083536248236 0.03011412863810997 0.03498926019909682 0.03200158807490627 0.03929355853278659 0.02137224387752083 0.01395669134978103 0.03925422061757446 0.0307042537821034 0.04245915727157447 0.006957471126085368 0.007057654805169962 0.005723954107712256 0.003109845399777739 0.01208545198587577 0.01088780337557751 0.01010541025983396 0.002614127946789899 0.007428240090036921 0.01497440657999425 0.01487457520009106 0.005429026575092524 0.003525329908698255 0.00680334661230565 0.009471262362066749 0.00668549931187784 0.002786476989941792 0.008996356948748632 0.005662350648026974 0.009791808645396114 0.006878815506388448 0.02002095230649604 0.01113696876817957 0.01099906553190239 0.003631401570607396 0.00211773294793747 -0.0002133627391634972 -0.005996948980298091 -0.002248888081479318 0.008565985452545048 0.001194050005599158 -0.006674218389541485 -0.00363441921672029 -0.0009580742307045953 0.007072664438745786 0.007030316296462514 0.0157381518809761 0.01080948190379382 0.01225855570448538 0.00885132557299622 0.007977022117398222 0.008859489193638201 0.01305408685853544 0.008547112027267984 0.006690865453941191 0.005394120101913125 -0.003365835943526809 -0.006581513066761907 0.04241635265211766 0.02816066370113489 0.03027549273486204 0.03116005950561872 0.01944928968823678 -0.0001160365968047785 -0.002469293617521049 0.009598767628700482 0.002963966514250901 0.02270908116971844 0.02404051819580834 0.0426364791107848 0.04103447124540079 0.02517441372715888 0.03543113857200069 0.03546766012752679 0.02527408510084074 0.01271462904574562 0.04923627879964323 0.02347439582077859 0.02729498764230315 0.04777395981010999 0.0007683312418725704 0.0669269750740603 0.005426392969014136 0.02798463146979264 0.001941603051824373 -0.0001898178421736932 0.0002873973827581704 -0.001435433541675942 0.003893067813418384 -0.002177237402915986 -0.00217651190821145 0.04763036303287391 0.0151120143340844 0.02322584111358269 0.02357313626887617 0.01737750945480094 0.04419691092428556 0.06237349553258929 0.01230367949201602 0.003142828748400089 0.007562258068964012 -2.296726885946261e-06 -0.0004865031112887369 0.004103022264599444 0.002116973165643029 0.003694471810244105 0.0005660606719701147 0.01608842686919028 -0.003276405300394406 -0.002180356889259122 0.001319842861487757 -0.0001097821938592871 0.006141451483625985 0.01022950267510406 0.007110747797049868 0.005969980396077851 0.01775414624450575 -0.000433504678915102 0.0151317061567298 0.002499730627349208 0.02816593338367371 0.002573858738343821 0.004049143586598573 0.003772853679990891 0.003310956075624357 0.004959866355916824 0.02324635367210148 0.01287480231304177 0.02446799731360595 0.04346498093139313 0.004502048424021906 0.006666585034380035 0.004491184889050005 0.001467338469524696 0.002799613454526038 0.002538505712447929 -0.002855377876814439 0.003931281936376337 0.001624260608249302 0.002978456771538501 0.01562952514886871 0.009353367702631536 0.02127455010622641 0.01481511647822826 0.01313634094604148 0.01282903443106866 0.003780804679815067 0.01173912300734765 0.007656153552319847 0.005467301381424578 0.01113839061840786 0.003975422606646357 0.003298180494422277 0.003634761100378694 0.001760698433486439 0.001084671265970714 0.004483006613298052 0.006880255361905271 0.003836079415418157 0.00425978718770611 0.0260297261933011 0.02261601810731875 0.02868278914080316 0.008688397553642965 0.01783443914692462 0.02194045733726956 -0.002676353708753396 0.01494047849238882 0.0391991154270041 0.009415526950884569 0.01855893067174709 0.01103299297577407 0.0102931534872401 0.01540729055931499 0.03709220114161169 0.01034218125061433 0.01158528806971435 0.01977025306706134 0.01569173330658171 0.01222523798567647 0.01191021910952019 0.04906937567088318 0.04868680671110009 0.07355391773109944 0.04434462669673338 0.02942007681308755 0.01249198747463691 0.009544572585982507 0.05033638274505579 0.006443419850531454 0.00639279822073653 0.006568015760387211 -0.001580451117073301 0.0008533301999312377 0.03457218394095429 0.00566564105575372 0.01743287187115698 -0.007080529493053193 0.009605568162800492 0.0170144975698266 0.002649837639379946 -0.0002465963249931281 0.005465794408391818 0.01385333895341869 0.04154011442942817 0.005454820886350972 -0.004333648460986847 0.007949604829112328 0.006921824111137832 0.006083848621217222 -0.002390037374778768 -0.01062886496233889 0.0003156634088323118 -0.004255876992388641 0.007072690616488585 0.00946335886677762 0.0002161228734173267 0.007493821066104009 0.006646742482633678 0.008123476283325135 -0.007147772502207828 0.007436403312488504 0.1334365844159862 0.0004694412351895818 0.003639025163119084 0.001862077594675395 0.006141246620770398 0.01767110610002013 0.005566507167868987 0.003867593772605649 0.08969822502704451 0.04504891182127109 0.0952401928062945 0.07384195930300826 0.006296953474236186 0.02035172053904372 0.02714387900011849 0.01245867214960994 0.002049034919929053 0.0110170966821164 0.01339804031672466 0.008524240962774373 0.0555485891554314 -0.001912058972046139 0.00462175894939662 0.0118858402898267 0.01348511074209318 0.02145921001811427 0.01912551115769898 0.0165792199232554 0.005571870298243862 0.002261542052415766 0.01067263396394331 0.008460247695876704 0.007992169776972913 0.007639835160251017 -0.001855360189762123 0.1057797036129727 0.1053790230745135 0.09412211697026743 0.01313499791827956 0.007799514046214251 0.02006976624085049 0.009108607935231805 0.008943830645376244 0.01401589092579813 0.00950660829884566 0.003336208549319233 0.004166843031613745 0.01623574960346805 0.01188368575108823 0.01042202192716929 0.01553150121892129 0.01193117191591432 0.0105307338686985 0.02731483453482535 0.02222140201676034 0.01445326852447793 0.02412123259399392 0.006803351574157018 0.004559773493931082 0.003792862440505403 0.1361243754159068 0.1229531252177568 0.002663285201713954 0.003981092557304079 0.002571551565210875 0.1495729072278228 0.1850412215498974 0.1664083604099902 0.1182988422478426 0.0004816912179254602 0.006798247862356885 0.009402263632358935 0.007493964563140484 0.004296719433241118 0.003143112031717861 0.005561082937284481 0.006063077941166909 0.006498926525982548 0.005734600221797491 0.004582740074024627 0.01166474533112598 0.005005571705094069 0.006481394845176252 0.007303762269003789 0.003997124580814787 0.0314748793068454 0.04796320969393943 0.01860720639408983 0.01612413609286026 0.03251453621531564 0.02263447181929935 0.02085265874406211 0.03104574759045553 0.0256854308943407 0.01477241071368919 0.006290875333112599 0.008281065923246492 0.01080664952248074 0.004582842962200227 0.007739750776472587 0.005149271112320912 0.008082067496212542 0.00872252672004388 0.002969320016819531 0.002417682623734324 0.002897199619458272 0.001957958517131459 0.001457511181560374 0.003626041057159189 0.000805988332783297 0.0007261667897322954 0.0005284130002198369 0.00242309809038221 0.04216493708250521 0.03646855919991493 0.06481090134493089 0.04207469207122347 0.02534764853139301 0.04422416309860471 0.02015884048231108 0.02102959220371355 0.009936057866025959 0.03192925154340317 0.0190423067700883 0.0206116101024831 0.01959149310147781 0.007424422082530426 0.006201162868411394 0.01722696958705399 0.01360738365776862 0.01605741620298214 0.005230416855133386 0.007267104977125245 0.09217434552106982 0.06333199235834569 0.04470015470963819 0.03098722235308342 0.04044527133316022 0.043947125721039 0.06568085551958865 0.05349369653983863 0.01016383452570712 0.008065400379956246 0.005770568117500815 -0.004851190336364559 0.007600018593523837 -0.006021023147980231 0.003848573768978079 0.006816221678877254 0.003403748614249235 0.003534530643167573 -0.0001987173174207255 0.00306338034415344 0.001210837473516782 0.0007408215107176431 0.00116689912655754 0.01125046636998506 0.003018734268994361 0.002205598466798579 0.007001553679469691 0.006438185034720221 0.005347428859653948 0.003326708956225326 0.005186624768896396 0.005907520175910884 0.008043930082298182 0.006286623737315065 0.009156437571068595 0.007824834050292939 0.007392845181241476 0.01925776003014286 0.005397641595296118 0.004895885790514112 0.003230729123228693 -5.559766854504579e-05 0.004149040108660176 0.002939442477772036 0.001700381406997078 0.001575365425655651 0.0009466719096451979 0.00887590474449257 0.009177663740094601 0.00764612199802686 0.005522794390409301 0.002375542188597026 0.003347090420087113 0.004069010498350243 0.003779169545657072 0.004284554129279293 0.004283315186772039 0.005116874221108499 0.004900690210206516 0.002712516462648564 0.01049574813987341 0.00462619570370077 0.009822535640947328 0.005869025190326138 0.00574414022994572 0.00634015444550954 0.006109469441763742 0.0473176539756494 0.001513778963374986 -0.0002897342036366565 0.001075560289585871 -0.001766798187747096 0.005196601658545065 0.005245688604857018 0.005128621325337175 0.005057805804370267 0.003584803490447366 0.0002142834701299154 0.006545360730284773 0.004726361788746324 0.01121500233149178 0.006202139250914732 0.007099530444519215 -0.0002629274977487243 0.001515580560262172 0.002894543392947309 0.0007402590875218673 0.002915436959080283 0.005505772529268913 0.006729331654857128 0.004468310081441182 0.001432693026221411 0.002910175404597384 -0.000567275267377457 0.005145744154057134 -0.0004433018507613209 0.003214022936443222 -4.767408849938323e-05 -0.002491856678530616 0.001675461790056089 0.004072942182667659 0.001644277938317545 0.001637282829021247 0.000223909491072931 0.004419541195340773 0.07505818975771771 0.04869011444997504 0.03467658634427682 0.0392053331271511 0.03947522132088317 0.01055494165924484 0.008622991030217093 0.00984227502379725 0.01200848261584665 0.01357465327689223 0.01689809336991992 0.02162146459677772 0.04341204036185882 0.01678313795234096 0.04095313051603171 0.03448336959637179 0.02081106675171402 0.02461184359782093 0.01370946961372296 0.00370530916102514 0.006194384422762041 0.008412742980875331 0.002810690931979832 0.01309874276419013 -0.006802203263264325 0.01745007020797642 0.01254198488751241 0.01416797667413174 0.00427942271706632 0.007492906384541734 0.004543600502847995 0.001173642751501848 0.006048091042402336 0.007921859727450848 0.008278440828685727 0.007196410911408125 0.00544121182925904 0.004729252439872129 0.005909316874480402 0.007591551073869723 0.004532285933351333 0.007518966865361302 0.003589706429283126 0.008482601629956937 0.007909668043862271 0.008451971211446613 0.005726658870412036 0.001179759289479615 -0.00283655286169202 -0.003380453857710633 0.006579726132714514 0.002767756671526844 0.004407932539858841 0.005022155550672329 0.004949379813484222 0.04954339676889521 0.06188397209191319 0.04819211272075959 0.0275175481936441 0.03607371176917049 0.02550018804223373 0.03254141448064705 0.02883634360055169 0.0205071184732801 0.01950394496233765 0.01616606586698047 0.00965912283754158 0.01837179685788492 0.01294659473999754 0.01753134254496632 0.0172230503071228 0.0102670383948385 0.01751716176918566 0.05968435535961215 0.0526075192254414 0.04215930388066932 0.05978467281702322 0.0567943913447446 0.03410123844796391 0.01607864900765035 0.01057227726939093 0.01076437981599471 0.0116922810714291 0.01820862979146103 0.01000442761042574 0.03346815949322096 0.04241033476007961 0.04668339200086581 0.0647807903678341 0.07780941075314106 0.01305822062635048 0.01559899129018397 0.01206292512703521 0.007193259117964821 0.01585101355678057 0.01628054958714345 0.02247018031582561 0.01850432205542923 0.0568229093802575 0.0527510909588079 0.06428999490973097 0.07600637391396506 0.03301801612831778 0.0627462561556584 0.03083788280515868 0.01908654052815416 0.01726158098920153 0.01917538812909592 0.01084041283968276 0.009926947058661921 0.01400665441679149 0.008686915933128616 0.008827340016444417 0.005347305930502303 0.005565077296219364 0.005863456797519841 0.004392012363646235 0.008682647033954671 0.008293211509537948 0.01123326872774966 0.03002438149601141 0.0170620884686595 0.02326115529303222 0.0152311473882932 0.01670708138108472 0.01630507178752311 0.006915383889950923 0.01222197231790493 0.01579573897250662 0.01552585686028534 0.05037679907915554 0.02053262640973851 0.01848021784426133 0.01588000453829523 0.01821833769889787 0.02459313646963368 0.01934118932866936 0.02261316012602106 0.003048713003160025 -0.004493503332295342 -0.0005672156355209944 -0.0007153948134876967 0.02223924422010592 -0.004803628910947434 0.05034778523328827 0.04488389839730846 0.01630483837975196 0.00117464942926879 -0.003504176381252008 0.01225903873061362 0.01409522140215665 0.01479513341590802 0.01652675484839282 0.01258027952933864 0.01676980849729516 0.01349344100809302 0.01534068111044851 0.01162377189535999 0.01128311164523413 0.009669496981707248 0.0005170217905975445 -0.002230873396615689 0.1817125677728783 -0.004714675634705878 -0.005832796485318046 0.01598863376005958 0.0185102887802887 0.02425376305061181 0.007183154670952875 0.002742149303132545 0.01420444233500427 0.01225894211609189 0.01349138916157916 0.01264417629303528 0.008668261933555861 0.07978211772400412 0.01401019858884457 0.001933806298284554 0.005967055322390268 0.08872288627033623 0.0298950839020466 0.01857455665939286 0.002079989447017191 -0.003734967108016404 -0.002647816186062161 0.1258277956583541 0.01531325709636797 0.008073486566396825 0.02043842272393947 0.01555393422646124 0.01311232088793477 0.01488616976931673 0.004760775388473845 0.002257363669162055 0.002894705408076056 0.1304947483545512 0.07433158745291596 0.01891401587605733 0.00677247841926508 0.005650810644744602 -0.0006474554472345097 0.003728158614419328 0.03430686230490042 0.01294273543322353 0.1093090658377909 0.01197341307907851 0.03322001607371212 0.03656004179591909 0.02289320931995694 0.01545774346031342 0.02910356538231628 0.01807441674093944 0.1172523829162415 0.07364360659661424 0.03532517932007977 0.03247667171445377 0.07008736797119725 0.03923231923481562 0.04035905169215629 0.03515068853150222 0.005546037943952011 0.009009688252372023 0.006567827978221913 0.01731882199135894 -0.0007574600401549211 0.01787824819201313 -0.004274840827426608 -0.002300115968443503 0.02419787022874675 0.02388066673229983 0.007504090082288482 0.02408319619580447 0.01308093946826192 0.04969119202399361 0.02561612444582472 0.01373008439185702 0.01600097889168392 0.005172538714523033 0.03069578327363183 0.009495818890889561 0.005812991262829434 0.00666963425431687 0.008403360674694386 0.006985274468895401 0.01213437716106322 0.02482414560888686 0.03299702844759053 0.002632264995837355 0.01128755248741923 0.005073205994515976 0.005910895202931931 -0.0005731422007405778 0.006707196052422678 0.0003520445527547418 0.00537661108714936 0.006009298790606107 0.004630949035899922 0.006861723121617575 -0.005144794430146916 0.004890944640685919 0.002539934664904207 0.002049663819364577 0.0933151880705861 0.02126923943851601 0.02536225498862073 0.009501785323487508 0.01098104228568303 0.005829762657411173 -0.0003337602969485922 0.01438411946141717 0.01531206586861633 0.01363568907305131 0.01184521655190341 0.01313147175398133 0.01281991918244359 0.02472659931364613 0.0250997027696674 0.02107426724241761 0.01498949528459191 0.01678797835189826 0.01923112815314104 0.03048281639500469 0.004422410651108724 0.001781650358697215 0.00427405636181922 0.004415751902691962 0.002805303264015692 0.002962093107631754 0.007587499616082942 0.01443650492028696 0.004704776602901384 0.003974951378733554 0.003748808521735352 0.001370441266286777 0.001615488969468453 0.002253544170285976 0.00159616522042333 0.003405360453195498 0.00416995709656596 0.003900192281696673 0.004549486795867036 0.05381945032658585 0.05195118557447406 0.05164066187247985 0.05513488314742555 0.003587527123383646 0.002539841574552643 0.002692454799467641 0.002622017154538692 0.004648179127216979 0.004702469471120397 0.004495140534849375 0.003571077420636561 0.003482760134521545 0.02668546759597858 0.05631227125986565 0.05328053475238428 0.02947606932172677 0.0256117691319912 0.03073164781298441 0.03090317057357046 0.03943417936000061 0.01881290430804084 -0.007316441010929829 -0.01172181947538632 0.02573139434986857 0.01064960837603833 0.08115264080374528 0.1203913713067528 0.05814141725252088 0.06625034299745695 0.03569262488833579 0.06145754420270139 0.07478417298842814 0.0683327147424504 0.03685473153711067 0.001852404231774669 0.03250387736140178 0.001372400508290796 0.002701533345719305 0.002373213787506434 0.03316893337067166 0.002117327350667413 0.03506845258332089 0.004339117559003157 0.002583776261060191 0.002717753171948266 0.03503992043848986 0.0046580111023215 0.03369741322915913 0.03862411565839853 0.002876456268134438 0.002530159439163305 0.009138008274213506 0.002048422906483724 0.009909794989434213 0.003250619998729212 0.003150337353152497 0.0002960684707014386 0.003976182984382202 0.004595945012971489 0.004079474963615576 0.002480318133697383 0.003009906108755932 0.002512453404810311 0.002318979282068192 0.00270241043878725 0.002313189241523809 0.002729232488823114 0.003166293486365732 0.001827626769205157 -0.0001315840492039287 0.00434799463521524 0.002303199547141063 0.004344478664770335 0.005262957845430837 0.004529780404893872 0.004227760169537148 0.004291162940249878 0.00451897711385128 0.005475738983010026 0.00341907278377352 0.003039509926025135 0.003207728145690082 0.002923030091952313 0.001261736395967144 0.08247926160645716 0.04325863471643913 0.002925150593287202 0.0045829433483623 0.004122581249300056 0.004566892070839855 0.003710849410867403 0.07470833045444715 0.08118732932705361 0.00324273302715272 0.004291227845222441 0.003943652329829637 0.001424067621880083 0.002235488182616575 0.0003596537069124656 0.001522151744269332 0.00108584040429623 0.001198956061538367 0.001369824441560818 0.009060829968479055 0.01019373307364659 -0.0007006740686661045 0.0151165047877451 0.01040988085043829 0.007493419011028283 0.01536387819973381 0.03570254674800259 0.03542596933885338 0.04737321929055143 0.003264681558575467 0.002154962825663221 0.003238528630880423 0.003864261606110381 0.09158455688212243 0.01679658269486392 0.02784830493638934 -0.00529267483207501 0.1180556374399742 0.004247899828292116 0.003892552433864 0.003207314994749376 0.1137417180855324 0.0677335812361539 0.07529067104195568 0.1254044768568179 0.008463826436842512 0.01077561090276875 0.007608755659064829 0.0070159971164733 0.003605883769695341 0.02482697933002117 0.02787469664405393 0.006303397859231953 0.003731469514447809 0.006128985922424245 -0.003120800810062729 -0.002651355705203202 0.006814380218683455 0.007011677230993531 0.007386140299118865 0.006401876906172599 0.007796572342679746 0.008135954901357332 0.008079078106793808 0.005723192613984136 0.004363804714680471 0.008642693147337772 0.002090371788619254 0.02837799341219067 0.02717664859359767 0.02427941697652435 0.02033296150651746 0.01507880087718229 0.009290879509382588 0.006825981500577641 0.01122472994152319 0.009600992483290317 0.01413680835436799 -0.00235102895956893 -0.0007423434327173616 0.01600162079743511 -0.00489041613521708 0.05440435460822417 0.07187755250812583 0.01258884790494283 0.0161858336926225 0.01583612593748281 0.01612155053822218 0.01793682790297381 0.01421745568137942 0.00740442393246381 0.004690705112800198 0.006146555463644576 0.006143440620116247 0.009912840705207317 0.01072823965120204 0.008949774494685673 0.008959096542254491 0.01852374260006078 0.02281022855268471 0.03795445552388595 0.01984646666014198 0.02481522808754507 0.02326290731129912 0.01930336652532868 0.02995179232860635 0.1097706031440331 0.05391408703748928 0.0245632003682823 0.03394113323197209 0.1430691046655275 0.07123496041847645 0.0058809272813755 0.1050298579144112 0.01503609783576924 0.01349778624672549 0.01575213704068525 0.01543443926890491 0.1452450984727217 0.04259410516047341 0.05675650813551854 0.1787418023293246 0.01681582856456881 0.1260574355915328 0.1172894002011577 0.05979542832595667 0.04471956503108524 0.06802106499462604 0.005325346746979764 0.005199083076837674 0.01328159421530585 0.01462851138475733 0.01357311468609522 0.003380016065211569 0.002970626207742431 0.007115813440119148 0.007434474134939141 0.009427100040879551 0.004330709506710139 0.004239786278270152 0.02550785509378426 0.00586264051890073 0.004745046500773559 0.002898766039787561 0.01087657976230657 0.007627823132331576 0.005464277160564167 0.006228804837218346 0.004056970764288343 0.02971091999047725 0.02387651142023412 0.03076543657496506 0.05254516557948023 0.03000008232582883 0.03498256686135606 0.03919890164087279 0.05191061841285073 0.03940712971620799 0.006614021360435096 0.00691718949018481 0.01240252858436216 0.006944631076109078 0.04296438483354491 0.0502697974821679 0.06898541200073768 0.04209339509887312 0.05724858944594097 0.04161454491766206 0.04591521956729832 0.02927409361482445 0.01529629748572751 0.03187289097312428 0.01681031150760844 0.01537679403730427 0.01995706662443456 0.02206479759216991 0.01820907210144632 0.03437390252655463 0.0127197289390979 0.008381318658034575 0.009389488975403962 0.01054295008849153 0.01417073804760391 0.01514089510337748 0.01578986938514742 0.01141212301622042 0.01002015324283325 0.02937901852203358 0.02409674980526828 0.02475301416479523 0.01815461619057954 0.02272132563646126 0.006485323577109613 0.00259783463832283 0.003439277109426166 0.03468659991294899 0.002805317253830897 0.01542205112690014 0.01423477557214527 0.08551247354489797 0.0003997491755804633 0.001901742836900158 0.00473788638157713 0.002837472816698029 0.006001385983001067 0.01417175265834692 0.004384087597468904 0.004324544730680021 0.004386294100290471 0.003485398561427396 0.003602646721583459 0.003212722022213196 0.003110796730545757 0.00641601362696915 0.0396988643944728 0.02817790851714913 0.01305232462713239 0.002032731589310286 0.01282102493896281 0.02019265721789998 0.02179349787173531 0.0202495906407646 0.002598480384420438 0.01853314392888143 0.1149044672137513 0.02716621981634377 0.002116332399216506 0.004726631384063372 0.007457551939609561 0.004534507082570432 0.007000164274056698 0.007105349674635506 0.01097877644149151 0.005045366721892881 0.01254533346417213 0.02099417739736638 0.01188966430891685 0.01239368836564933 0.07499291387565576 0.09191919566787389 0.00456225660169658 0.01349832063024087 0.006455140452212215 0.1047497724539312 0.0153608900732297 0.009560575834528092 0.06395858106629397 0.04018150032970996 0.06727809986834395 0.07073149744150796 0.04908404418323457 0.07205052925891604 0.01152824941903331 0.01721745891589678 0.0359627786512754 0.07100292888510361 0.02178577517649069 0.0310497249745685 0.08447077338205843 0.06097598101259545 0.07062247716508682 0.049734558213271 0.005316300847833143 0.064232322007129 0.0414705130718621 0.01269889817520519 0.01864223880184919 0.02408836640472156 0.001529051546315996 0.01750300654861243 -0.01309604862262648 -0.005267232357097913 -0.01313976699952422 -0.01512391579861923 -0.005378463716757478 0.0313201044643093 0.02396872141147106 0.01715610197203947 0.09604334604229695 0.004244520926639791 -0.002983990324242461 0.0009473573760733731 0.004447348384489758 0.02030082994417452 0.02840040437222648 0.03124205624052378 0.01512464806877195 0.0214210548082708 0.02648598822855627 0.007239783437953556 0.01010892748760928 0.01703136221309692 0.0006369310131366136 0.00116772407529391 0.001235728356523067 -0.005842924900219488 -0.05592325513419242 0.03717256515581834 0.0196670602618199 0.05736229342169178 0.1673676673132206 0.04597832237809767 0.05386351872537613 0.01207705834555782 0.008923453045642973 0.01479936851197185 0.01719960815585456 0.006628590246790023 -0.00155638109454588 0.009110567360379313 0.008353816923519721 0.01552809462820657 -0.01214752584975232 0.02652313151344695 -0.01361084438781541 0.001306827830865517 -0.01502424985288213 -0.004872974486137771 -0.0001638307640389391 -0.003742561031434062 0.02546659419274075 0.05763805763645704 0.005611887784679384 0.05532074660648599 0.02220634502532948 0.09618974671183424 0.08311082045262881 0.05142836438766261 0.07469480015345627 0.07271624469898609 0.02272544450870556 0.01773642881354366 0.01094523979572516 0.008512692050665247 0.01068837791009622 0.001856307547114526 0.005510726293945724 -0.01426536786678755 0.06723474015118459 -0.01802428537265558 0.05715635614906171 0.06646245832598348 0.01852811293325339 0.01296438104659851 -0.02714585683724721 0.004515956238026921 -0.002446912734744239 -0.002781668873403751 -0.0002880161260163841 0.07281006526430292 0.05859215064321707 0.009293617679711721 0.0269745428235416 -0.006781712974123644 0.01118187131396171 -0.01524848531471761 -0.03122247192444303 0.04945315145386799 -0.006896947808167878 0.01652449730036489 0.01332836132726264 0.02746274884521475 -0.02634246911309534 -0.009546692707298854 0.02507099734320781 0.01434307124977629 0.04785668562529991 0.001605166959712278 0.007074461426344807 0.009176139872074168 0.006775244552245309 0.01745688285891671 0.0785091180323596 0.1113640131376743 0.1068583822497812 0.08169292663468075 0.004061692730348012 -0.007515420845535304 -0.03532649546045027 0.05028800432805557 0.004246602525479275 0.03626530658020459 0.0429671380599736 0.02923318138354471 0.02461219255212204 0.05172067144414261 0.05289958064862782 0.01577023417337365 0.01335674399623424 -0.03177602649875223 0.08527949475893072 0.05885214354784575 0.003387767859868167 0.003665333436929165 0.01036743494107359 0.009163576150660213 0.02190217579641183 0.05260886150121534 -0.002200557185781151 0.003766225751847335 0.01227608761494097 0.08215175226380939 0.1009010235377721 0.03134020786897634 -0.008868800554560378 0.005230320748870474 0.004396192837064843 0.07863848459208557 0.02946807936810264 -0.01143146361656105 0.06901869802265984 0.1470592648176946 0.04199792610789465 -0.00860783619618837 0.001143660184693358 0.02080418451324903 -0.0282119099266147 0.02516873804447291 0.01969664411900988 0.05651099595378684 0.03010063214164773 0.02496060694476773 0.0598029027013823 0.04227387037729439 0.07837823190385973 0.1421610395415683 0.03701679664659838 0.02171485011546431 -0.03284109187942157 0.01367058187765602 0.01680944001400053 0.02009674233505249 0.008315563753529199 0.01265479105412188 0.1462093967065057 0.03387519758368293 0.09354724874536213 0.04712516921716028 0.04022408798448585 -0.007121481735451221 0.01246229120852498 0.02221185204469836 0.0006401490569177698 0.001288170119778686 -0.02019368484428656 0.003632683103578275 -0.008257900825034234 0.01344568494934288 0.01399685489305245 -0.03801004596352577 -0.02995241710847778 -0.003279512932438589 0.001223922235101547 0.09436082374600542 0.04007042900597961 0.08504973996726943 0.01607631962575398 0.03048867045746576 0.02426965291121496 0.005238264931544503 -0.004218551759435664 -0.005215598277395633 -0.003347164363944689 0.01534023379076151 0.001052220135567306 0.00764373887397656 0.01814642428231614 0.002898251790499921 -0.01835999565516888 0.005828055855183395 -0.0003833835715216853 0.009106317850923758 0.008671262721970194 -0.002067793729490983 0.00307505483217798 0.04672098513305833 0.1197653985622295 0.05349850054085238 0.00430824344748335 0.003954995780695204 -0.04366947807684449 0.006400938434669972 0.01271589220117624 -0.01857065585735293 -0.04319140010765241 0.05545278272917375 0.02644155221241243 -0.00590486116244284 -0.004390659422284937 -0.01077839821489734 0.001468726967094855 0.05510266434041844 0.003389883900023543 -0.01539518224643632 -0.009094096461201608 -0.008373042401144731 -0.004306118399476659 -0.0005938349739696234 0.005478802363115889 -0.0181414787507528 0.007329144196517096 -0.03580244673295224 0.006920830350470867 0.009327529599418603 -0.002913144035569143 -0.005358283607749062 -0.001345302438864092 -0.01198391662940899 -0.01827998404042371 0.005785102491035962 0.006249157414101362 0.0609609346972424 0.0757719329227716 0.006028578074355858 0.003868312153611385 0.000269186566000609 0.01317406997645105 -0.009145303881239493 -0.02376531406241014 0.002534397101351681 0.08004963704548367 0.01443497632194072 0.002513869344447163 -0.007812516880643092 0.02159556949658467 -0.0365204104479851 0.03967428810234751 0.0115745944572411 0.03465599021057751 0.01698947528782233 -0.0134185932373062 0.002208828736273918 -0.01113754087923888 -0.009240949458081635 -0.007930996239199453 0.01857757850028038 -0.01674547851725848 0.004154227975641754 0.03710015467513646 0.03781520581712998 0.01749728701863644 0.007585722996564916 0.00911867073084369 -0.007829577028883846 0.01717000369322895 0.005443556473990458 0.007055123750889881 0.02599155439557803 0.009382899021887988 0.005838285715842661 0.01291050380666346 0.01482499500878984 0.0144027839705508 0.01285969291975497 0.002864185288275616 0.02596576667648393 0.002705501609843796 0.002593540773930417 0.02010136235124461 0.002672847954395552 0.002440753406596933 0.003570160644581633 0.003345642599609132 0.05731534309687317 0.003294626281963177 0.002585670461481937 0.001744684484748343 0.0390414467357595 0.0436245737902545 0.134376842643937 0.006637484571956487 0.002594726103407774 -0.003369424197736288 0.1205033272420152 0.004704546499074974 0.005708737843521204 0.1227897824338292 0.006018253700404218 0.008810467862491842 -0.0064000676251073 -0.003889983918025354 0.0001589269684067219 0.0006209645955261892 0.007510032001527114 -0.01232838589003771 0.004343965109591122 0.003499112517503694 0.003571393960339839 0.003510830429750363 0.002403321816456756 0.006849798774568973 0.002860157801609032 0.001551178360281592 0.0001822125617531507 0.001259350252923237 0.0004146354191422918 0.0002408029957686538 0.0004110467368529059 0.000959047130880463 0.002223889547905609 0.00899906349356097 -0.006217836935428958 -0.003590206105835361 -0.006440668936442158 -0.04004569882583965 0.0002858618283789573 0.000966408339955509 0.001662206509791729 0.000714881802129684 0.008652409663152453 -0.01344261129931832 0.002671387631523693 0.002334927854417444 0.002741444329178673 0.003641553548347104 0.003871518313802417 0.005815400484605742 -0.0220548486413661 -0.05209998102142986 0.005314093872167823 0.004503051416111833 0.004278119864016911 -0.05177587104185339 0.005423602473146229 0.01959550363278671 0.005969142172087586 0.003728992488879553 0.004420183839438038 0.004692276637678436 0.003041525288150375 0.005865445031242806 0.005381611956291019 0.1116035075106083 0.003585708721719847 0.004516688143493545 -0.01213618031477016 0.04536229020822501 -0.03068183097697737 0.005660415826954464 -0.005281985675760145 -0.003016937460634275 0.01327297139572794 0.005354927401897577 -0.01017723936152724 -0.0190143022357115 0.01216144375956975 -0.007479010871828128 -0.02845073715146686 0.008411308450500256 0.007720043756417484 0.003084989420593289 0.001938399074893282 0.05564694505129689 0.01299598290138601 0.003150020578433506 0.01087816602690495 0.0171802472472157 0.02052280190110709 0.003184187262286003 -0.0399008115592874 0.01172943265505489 0.01871326661049589 0.01664640481684281 0.01380938833028796 0.004324111225909237 0.04062499552123473 0.06933610769258299 0.05450175153357775 0.01457666356748058 0.001600623175379152 0.02025084989058084 -0.02420374127010909 -0.01385135112678334 0.001741188450652968 -0.0208511240544992 -0.004571961465359815 0.03811755086738306 0.01607178761835135 -0.002893911952809958 0.01765261095771647 0.001573192927095829 -0.0202791456200089 0.00935811068347238 0.0003602267679929556 0.0801685450625295 -0.007419944328184653 0.004652654546599977 0.006190992310292063 -0.01927458153047563 0.003547881510124104 -0.007333054542665426 0.01911208910276032 0.03135568873382841 0.01450250222677781 -0.004574207313299722 -0.04724318571011338 0.04319526198102971 0.004623599910843953 0.00123784503084143 0.006106845481092792 0.01469952842603051 0.005037649528849469 0.004723437956675504 0.006750756375459709 0.01490726009955086 0.02025642108319256 0.01694215096110794 0.04473978206642993 0.05592086184728331 0.06485027805366596 0.04839284186836878 -0.02710759591779801 0.0249115658031889 0.02697001895095942 0.006749649275851389 0.06667611219725073 0.04156043445223146 0.005843123796442987 0.004600106200716491 0.03580929627354253 0.004690094305847029 -0.01681777824479064 -0.00958597079879849 0.03526935865843526 0.005877874559956827 0.01358102074862814 0.006966485291109494 0.005704549003247814 0.005039830484976245 0.00764983194435887 0.004393585746044752 0.005631296979778086 0.004331082895283976 0.003405943330435058 0.0355837238037515 -0.007735812844979882 0.00254112240755671 0.004398584669321336 0.06475374457300487 0.004855875971947247 0.07523622551496426 0.008297631897786676 0.007720637355346554 0.006690974417375375 0.01051480159557775 0.01261768108272011 0.008050813151828663 0.007915554080696847 0.05555713685976687 0.007334257341345958 0.005768518949955746 0.08038750613213962 0.1410319342402176 0.04972585879569991 0.06021702876913919 0.02869621753795907 0.1086497819296616 0.03426151989417161 0.005070949322043954 0.003938600837904111 0.01145853370940002 0.01775687745016842 0.0102005757171022 0.01176052795499377 0.00915738177865273 0.01310732062887275 0.01681932506539064 0.01450488599789094 0.0143745623045313 0.02048899527005971 0.008260459583912567 0.08531294867901949 -0.006271409834720433 0.001426019827044092 -0.0416811592086715 0.05607077222282685 0.00433927971049626 0.006756755682482548 0.006299553501840126 0.003028145612532207 0.003943940318605206 0.09308202061430398 0.07570755538513232 0.05860833293683518 0.07104754026696912 0.09835047643085719 0.004701498114223743 0.07605068779997184 0.004775421971938514 0.03656838994098029 0.02744214853725469 0.05357508750838434 0.06669476893613811 0.04326449447313999 0.002816223326711723 0.00302286376272641 0.004434947295327684 0.03806207726946324 0.002414231825317445 -0.001927483624435183 0.009810189039072797 0.007894775164019959 0.1491757920225014 0.1677298340664888 0.2023215025847814 0.1623191486621585 0.1054740965799155 0.003639315663255286 0.1109231865600252 0.02672263472647454 0.02485002153383742 -0.008379144332369519 -0.005738820259263712 0.008836956456549413 0.07351669400340552 0.0001703687616804566 0.02842910199807821 0.05139045813300861 0.07132602781489206 0.09313727980198155 0.06870062315235395 0.003546645561037785 0.05917569761539773 0.08387744625125426 0.05282907705782799 0.05143410422300367 0.1402971355984355 0.002814589716439395 0.06532395895878726 0.0043715096934288 0.06896617547539925 0.01108308908471958 0.00804065169287682 0.00874306198042917 -0.001181054576697258 0.0105116860603891 0.09795237957620637 0.1397449387361466 0.1166723080582434 0.1533538756054952 0.05995341627432123 0.002490182673822172 0.003590647150586494 0.003296349144496989 0.005506546281232002 -0.003820662898470226 0.02705248297454182 0.01170850404129583 0.01690462091477644 0.01062757987265191 0.01476199587551579 -0.001648409473518883 0.08901057954939676 0.08717537995277772 0.06509402327580217 0.06965886310312118 0.09147498332301794 0.1259285818498476 0.04303999250194722 0.1081029388967507 0.1106496472046669 0.09240219559600409 0.06020335359564725 0.1139629088243455 0.06432830249748027 0.04875876905142997 0.0815739266136985 0.05944811778776547 0.001992465520972668 0.002125784543657002 0.002238605531611016 0.005129589313096435 0.003425209697893006 0.001041745408416116 0.001354004955298293 0.07576574134305465 0.06763870373065137 0.04389628499748496 0.07414193494078725 0.05472001275357934 0.07947950425145903 -0.01547426137721896 0.09765215995617085 0.01511891272913924 0.001368302693702552 0.0007249294038344639 -0.003130770457222936 0.01661643535485999 0.01636486682150551 0.001281675345610645 0.1515792517688093 0.176388433901408 0.09076180984184889 0.07023610608162194 0.07971873665115758 0.07637989631350349 0.14265605912608 0.0020031791550801 0.03120942040363732 0.04337874071008822 0.04902221914475522 0.03895146729558548 0.04716930071793753 -0.004771063727610794 0.03970356939900952 -0.001116264289196979 0.04839426057693667 0.01466758556652179 0.006933165727351673 0.007898619950720491 0.0006351265296242177 0.0002900563164209319 0.001459915953238122 0.0006946937065806653 0.004275211632619457 0.008897340690723714 0.007154487381291811 0.005771709970259929 0.003806946034456816 0.006064210359994728 0.003165317539243106 0.003768079959681916 0.004514647666392107 0.003350546307247144 0.002731385840466849 0.003891780155679286 0.002117228779737074 0.004443713075721716 0.003573855587939434 0.004717330141368849 -0.004884870025112171 0.05579926649851125 0.003275725396910231 0.003393916265789128 0.003429566739808736 0.0008653228765981224 0.002610693179468616 0.001249508478519752 0.00180194009568197 0.0007047330419926604 0.004686489073705923 0.001007659429416491 0.003101299077610393 0.005302059760312471 0.004904729142864287 0.002786035936733987 0.002964897980012627 0.003087213280305648 0.002414078849649607 0.002858303350365736 0.002583410462642147 0.003309449644052598 0.004536301601910402 0.003288762641280114 0.001496982387575372 0.002341915887950956 0.00742437621529434 0.004614028109279708 0.004385920440235461 0.004598363856550726 0.003533652105594617 0.003974489546923785 0.01090932919691347 0.006051186968306653 0.006246690800120222 0.001761903435054202 0.007955632487365191 0.004619798960836835 0.006144421217787269 0.006324253954781934 0.004460407608346452 0.004128282481148547 0.00260771495446963 0.009534516445125724 0.00708299110210346 0.006689212383639512 0.03869668615498884 0.02262923834271599 0.03236195229703367 0.03565221038685912 0.02455661417135136 0.01828985624591305 0.03357670184134254 0.0223616108493636 0.02150908518149851 0.01803320849762163 0.02889551877303735 0.02450544172507651 0.0166276664963467 0.02452852095389593 0.06580526369965817 0.01398791196362475 0.01803716528150684 0.005631814357569458 0.005788020400226326 0.006810138216400251 0.005352088512724684 0.005653760996595734 0.001782746131172066 0.002985160327630943 0.003199055493438835 0.002585548582993027 0.001486009923739865 0.0008189634855669381 0.0009498604606068934 0.0008382368271831854 -0.0006055826299348168 0.00214778775054805 5.144590745096156e-06 0.0005863734156439036 0.001718064462586558 0.002595522478484913 0.007974344574928587 0.0004436659506304086 0.0004594531789852596 -0.02066702203943886 -0.02493967090380506 0.005527007063445099 0.03240228547793422 0.02259751966977281 0.03507074146646483 0.02134693662769475 0.04269722551792799 0.01404521318442573 0.01159415730007994 0.01747227273136371 0.01097543770681097 0.01325359291399073 0.01783363093587594 0.01520655550650994 0.02552793579672531 0.02799673578720184 0.007431218308760557 0.006620201367639886 0.006231851332439029 0.007162141446074604 0.009720560442380996 0.00806920668133004 0.00292431173712826 0.006212860666922374 0.01587382930434759 0.02338250186151893 0.02598993398014431 0.003214671145223192 0.004810171665555639 0.05798492404891319 0.07823749564441559 0.0526092328769833 0.06186334293316732 0.04980522871877133 0.03799047368310842 0.02437355684657911 0.0354831232557177 0.03296497191907423 0.004749760484849051 0.005064348472586144 0.005485252007794345 0.004998718571783617 0.004530189334131435 0.004880821250670288 0.03282855080865584 0.003846554059941038 0.03803855758719299 0.05350663446648193 0.1162260680685937 0.08726815701440774 0.003005963421066927 0.004646398673896081 0.06739895385951898 0.08628343491335774 0.08189250092496334 0.08476620029620821 0.005113396482450418 0.1475883764880074 0.06265597577995552 0.01980235257726784 0.01503336667679496 0.01471335491910304 0.0175151357977982 0.005152182851974429 -0.005365505078230248 0.08821480624243802 0.007245993977114792 0.005037064465483568 0.009666542907596824 0.004997822520822385 0.003537118337247405 0.004644729131592236 0.004481193111496451 0.001645375593659986 0.002946149476008369 0.003424901577030377 0.00287527061408512 0.003250725139767523 0.0007480019718770767 0.004902703869421385 -9.878885891381009e-05 0.002315515173110147 0.002217296444587182 0.0002261352635068708 0.0008191122090271116 0.0002015617720542347 0.0002155047107773975 0.00037868356521043 0.00840192782151649 0.00496722170957974 0.004043028070872157 0.008096621507541896 0.005079985092585284 0.004955761326690633 0.009085679675033563 0.007373138968532118 0.00575807426433282 0.01354974079584595 0.009927252633861258 0.004757166667710027 0.009184163671441615 0.005528049570752856 0.008949809667611254 0.008465493774086492 0.004481574994226874 0.003213956858705991 0.008194294237605345 0.005018506929397885 0.003398461798364275 0.004390828131535291 0.001365471444569674 0.004434025398153976 0.002156757052678833 0.001506100144890462 0.003302479337692062 0.002610792190826789 0.001702290580959002 0.004985869101968001 0.003269868519217318 0.002398977553766889 0.002112735419058614 0.002148982878284082 0.002836336418395577 0.002889051581766684 0.00579180106991128 0.002954003532490515 0.00376561322426866 0.003469553399324349 0.003083902119157435 0.003420060300099088 -0.0004308458739503906 0.00209669661325177 0.002469012300383466 0.003109829320502907 0.004039502219047766 0.003148416800543814 0.004194886018637678 0.003271652653136645 0.003818676600215252 0.003730334561750655 0.003921203977110524 0.005778390175955475 0.009302735916904378 0.00478824966781824 0.00755539227604566 0.0036851126762916 0.004952611206617495 0.005236198336718111 0.003665565138409276 0.003294185398751385 0.004864756524136257 0.003823996499036216 0.0005998141368706472 0.002759179386433217 0.002146076493538716 0.004622679635632268 0.004753947646810214 0.005196554661222002 0.0027953164731524 0.00653308984570557 0.001616886414348777 0.006316642646696735 0.005097348958578556 0.005609975139129473 0.006010672643711888 0.005522385048717051 0.01053118039879817 0.002231533579397589 0.002649228542306976 0.003566895197277724 0.005367300058466797 0.006801543216502095 0.003168902614465455 -0.000483844088123023 0.007431785886290725 0.005891543200045857 0.003804712342615862 0.005217742508927705 0.004659048928780491 0.00443278217811302 0.004668622371105057 0.004642008365829996 -0.0001283110692457803 -3.547431408950747e-05 0.0009608919031424155 0.004158216213741894 0.002018990457174985 0.0002451546985594855 0.001059758632005688 0.005939630743156163 0.005623304294964967 0.004223809838498865 0.003892989403557225 0.004095592248899188 0.005512809878401167 0.004710429278573561 0.009117181489609933 0.005043967635949225 0.00480113778089914 0.003177287881082806 0.004886567146050184 0.004319831560573743 0.00241555942031401 0.002899851615619455 0.002155322516507164 0.001388010199949139 0.002326084504860975 -0.003920258528809056 0.003961347864923486 0.00280557862677414 0.0005120894948515765 0.0004559170992243322 -0.001108539829785993 0.002603078790544754 0.003993850412652732 0.003892976729874451 0.004990043490611598 0.004099680445442662 0.0016845504721381 0.002594701597877789 0.000966327941843269 0.004492481027375231 0.001296064924504579 0.003006857084751514 -0.001028933279357967 0.0006022416949602092 -0.00164414071753924 0.005978364925704195 -0.0007267072689636021 -0.003123140935254067 0.004568707994683491 0.00701529283904072 0.001521613627733675 0.001430284119108224 0.001649349701884675 0.01476877324674828 0.01067673759243182 0.001984884569202472 -0.002580618115762206 0.0001095193813433947 0.05260042794510175 0.000240457157589672 0.05297390318881343 0.05878185566020222 0.04761955128788779 0.05446003310540967 0.05639865964828238 0.0527725533036672 0.02335947775246848 0.01877661486412908 0.02849137492386569 0.02694501086030315 0.01496717430366326 0.03459545832498285 0.04004744903209644 0.001192654165253194 0.01429014166294086 0.02636061770818336 0.01453270273178681 0.01403436562547689 0.01601840641036552 0.0107409470187261 0.009044534014613952 -0.000100962840090199 0.00621072688192871 0.00226681238832643 0.002378507539427021 0.000639332898892649 0.02971895782209765 0.03662778144223511 0.03948195983156332 0.0297399322664917 0.008708404313532392 0.01569078063134489 0.02863761914831308 0.01779415643316528 0.006747804400345304 0.003403154849262744 0.006474722888458383 0.01045870056717131 0.01059575771178746 0.007521847023706022 -0.001573384160680953 -0.001506095332714881 0.001903319768557188 -0.002459391344661156 0.0008447263417795515 -0.002776229035668664 0.01171182544397086 0.0180796793090722 0.001617535096075657 0.0164653080345613 -0.003007897827325803 0.008429290887252158 0.007123103595621361 -0.004911572544016848 0.002544885897270157 -0.004006241602543707 0.001023163692458903 0.008224074993883182 0.008337704380873969 0.01639767269617587 0.000756796564216744 0.005423597496241256 0.004801606039274147 -0.0001623137283471274 -0.004766342096056549 -0.002529571561014072 -0.0008783500352853893 -2.705583402779727e-05 -0.001078529646445932 0.07700993817326537 0.06306980111448107 0.00185213406716511 0.01187991714462854 0.01292445505913854 0.06199984457942009 0.04941544599332778 0.04663525048740059 0.04957767340910332 0.04435601855072008 0.02385936881040312 0.07663372298100855 0.05514024330095272 0.03930896939650726 0.03707339154114279 0.04624787729273409 0.0204739606710792 0.01838813179937935 0.01784194024111622 0.02140514251256295 0.01942649741830421 0.04134655097680254 0.03744280955692928 0.03109098364770722 0.0241010481729917 0.03244515133058845 0.03060283061866882 0.04931539456328334 0.02653243259458432 0.01932450838936023 0.02064234632447752 0.02051030903048366 0.03259664328176938 0.04522471487875621 0.03936893849319325 0.04085563278730726 0.05689436856053445 0.05035879174383706 0.06114609147764086 0.007940983423660248 0.01074400275518864 0.006489303007414122 0.005019973059310347 0.02311057752123906 0.02543106854351994 0.04522724409787143 0.02182218949990935 0.009406104138541444 0.01101169778094832 0.01710082026501365 0.008712240021913628 0.009649958766162436 0.0005712823981858792 0.01899919951258253 0.02361700013247857 0.02789260207282498 0.02078890302633656 0.01035220268336978 0.007953290758632353 0.008064394001521442 0.002015900668854793 0.01542281888202058 0.0234240464689872 0.02488169195601955 0.02372724904043821 0.01420756816772289 0.001735304798301294 0.01973766666753684 0.0241723305970065 0.02205505367781562 0.0206298029472236 0.01653060155681646 0.003782707949235856 0.003352629946365298 0.002755142235091561 0.003822828672928799 0.00165117150253996 0.003845344643000826 0.01893079856223128 0.02505125093554821 0.00482985816486987 0.01932103038449089 0.02289814793088811 0.03040630009271785 0.0671120358857879 0.04153243254831129 0.04058127601188742 0.02808022684760595 0.03331980501190748 0.01144529361651646 0.008585194987234784 0.01921720550786856 0.01706761995904117 0.002906326844750791 0.003684272323406558 0.002935946243787335 0.009160360238078947 0.01627402963463113 0.01085995591228533 0.01080412405092146 0.002652807794378844 0.003178419926448915 0.005451363434122945 0.033388772584016 0.02428281097727199 0.0401680788440381 0.008677505810001689 0.003562698107686503 -0.006820519382689744 0.01954145036430841 0.02189195777614215 0.02364841173443212 0.001712379216532216 0.002238439119123624 0.00374838998334983 0.003177131887736956 0.002670582695215661 0.003153536922654506 0.02562922507215807 0.02667657234932965 0.03634257853374948 0.02150136741310788 0.0351191514413028 -0.002207067608879437 0.01581599755974971 0.01732764434803397 0.02492745254995584 0.0197894500384176 0.009119968110173635 0.01509667419200262 -0.002135741122171742 0.003418246928489274 0.0009073214946318094 0.00893688017065522 0.005393022865159412 0.002993439759288273 0.00262369385876376 0.0120174618064378 0.008936042736036083 0.006193791444513853 0.01075882524650553 0.00823700668873875 0.01027533899213004 0.005332631752661505 0.006326423031393053 -0.003301594135469587 0.0008543460825902351 -0.001421957842714298 -0.005668048492652586 0.0001042991633977201 -0.003023984244693071 -0.001099250292689403 0.002085984598860969 0.0008434208343649223 0.04664156477132393 0.0332150942667145 0.04320776832710321 0.04603203872379182 -0.002243049940427193 -0.00534494938416015 -0.005522918333257306 -0.008651488667340938 0.006029780078818898 0.02088760894560546 -0.0008500601899282456 0.001880677109403782 0.002567499955632942 0.06421228467824232 0.004390863639981397 0.009074303894383432 0.001945732733433204 0.008605854678905506 0.006955101233022029 0.007718901495874831 0.01927629897829051 0.004278767812037325 0.004832526453639178 0.006081480194290765 0.01046602439680501 0.02220501909738347 0.009545988858025104 -1.930185533415582e-05 0.003628229227712487 0.02259478701897438 0.02605045847206945 0.01573950492583781 0.02211012303389737 0.01068862479451013 0.02148859550451833 0.02172558311059924 0.0002870288861796086 0.001365329209245489 0.001612903814717888 0.001118597961530353 0.002710126078610103 8.073469943817852e-05 -0.0005646027392535916 -0.0001185557559592865 0.002705324524148262 -4.967275575972167e-05 0.005391630304201813 0.009206930983268576 0.02361882275833486 0.007650620353839038 0.02434986270679708 0.03570359900247228 0.05021010658954871 0.02676902413155962 0.0157105929689814 -0.000990409495429297 0.005539287968541451 0.008340339344768299 0.01035446159773655 0.006368881862032447 0.00543714883103713 0.0119829564439588 0.01276045086918125 0.008758279644921436 0.005698162524823753 0.0008294009351534414 0.02428051956444032 0.01613196652697553 0.01344037348281116 0.01556119993107919 0.02010688290166372 0.02209434098837581 0.001695936200990033 0.004389697832316142 0.0007642257997964638 -0.009964395058768552 0.003293699989290902 0.009001637234257504 0.003342517181629714 0.01307714465953017 -0.005829805969838674 0.001856042295815897 0.005712232980667583 0.0116563582973823 0.008715871969930291 0.00852986278941786 0.00962837472736343 0.01164910079604229 0.01506049554147781 0.0171134423276414 0.005886277824997713 0.009112986517404486 0.003570975469220159 -0.01066699831497361 -0.00845855592943903 -0.01549713959238674 -0.0003605001465821384 -0.003460823696597912 0.01042164791020988 -0.007660554262081489 0.03708130930389291 0.05828572046036237 0.004554138158700478 0.005278111989303305 0.006359982877332269 0.005563393573188797 0.002117781941209824 -0.01112687205901122 0.01912105454232697 -0.0007566378740539184 0.04827170683010309 0.02215236196275511 0.02814363612051194 0.04161483279826726 0.05413344013740384 0.0405119020296481 0.04203714968745761 0.03514468819810206 0.0236356988343053 0.03814363316298034 0.02954007750854872 0.03114196167496731 0.01299558157017418 0.001056282889456072 0.006341809619473973 0.006030347454834469 0.009199276377279426 0.004436309172367332 0.007312267238769007 0.004385258568930031 -0.0008365456972881318 0.04580436227757673 0.03766812150047612 0.03706693189107345 0.04679977948767573 0.05610734978693712 0.03413023355724238 0.01606059898639064 0.03673280214752832 0.006720305505795865 0.003585309201589674 0.003818629190466879 0.005332563637484971 0.002796213861828425 0.001795583018950614 0.04958217769687973 0.04523205388730128 -0.002337420709907389 0.0002260542784052502 -0.002166253752256269 -0.0008218222391212279 -0.0004165058230351895 -0.000132213285973693 0.001128517263746102 0.002303377601992415 0.00184053679146154 0.02054971696283536 0.0206202613743826 0.02116136809552385 0.02019906371424355 0.01773344542363876 0.03280187678133083 0.03471800207069684 0.04372602125286677 0.05626246757646559 0.007754600128480021 0.009558804940995237 0.01271987424310252 0.02199120074177027 0.005727634376758245 0.003734222531870323 0.001334807313642526 0.009338636650313313 0.005809921445945675 0.007755663899176259 0.004331440888081045 0.002860628375443888 0.001930985246064672 0.002994119414768196 0.003266822375402629 0.002904307334420286 0.01571152287060757 0.002985564831619231 0.009596534918920261 0.008997708878330565 0.008626772618627498 0.02675288399216361 0.03825096053153697 0.02063963883557346 0.02467284065133653 0.0009593090492208198 0.0003035243234765582 0.001276737698529761 0.0005197436457133722 0.0006392336700444411 -0.009535814168656363 0.0943047264911743 0.08192663820271456 0.0581069511445125 0.05839329812896875 0.06631375161545412 0.01694182427717114 0.02446183042140098 0.01874622929221101 0.01077957126054637 0.01277357682300388 0.01811357075765499 0.01373018689499955 -0.01827487270539269 0.03032604101159183 -0.01294139196704723 0.01426095975246715 -0.007357205989346346 0.05087024901387679 0.04959439339372908 0.03761105132408347 0.05136993893505515 0.01080013184906118 0.007809574867491474 -0.005488362089125681 0.008020413134275439 -0.003163504762838411 -0.001195731283775244 -0.009622516949224587 -0.007229745433098845 0.0513595635620292 -0.001185792379684329 -0.006965005748666635 -0.005514827272095316 0.005925065844700995 -0.001274643460845317 0.006419874041077293 0.01692293223308372 0.01446114351922573 0.0673001701099902 0.01873988815584823 0.01639011056113827 0.01952100339540343 0.007788028554182019 0.006257259193496318 0.008964320161985924 0.01103283245147004 0.04472464260051574 0.006547023996382892 0.007091608237691953 0.008334422406727758 0.00633806070618775 0.00559981446971321 0.005835084193411797 0.003539492895275 0.05173511172749414 0.04709577888030232 0.04546236833224112 0.004678626847143324 0.005096507176015692 0.009222972424861201 0.005835035756051861 0.002728865803050193 0.01941076664712985 0.003944681652931823 0.004121051853316105 0.004999031811093905 0.004291043715641677 0.002273731784975577 0.00290937172514932 -0.0001449372434053499 -0.0003269676478034594 0.004275595842645525 0.008122553236756069 0.004184662794560728 0.005835055596480104 0.006018232684045686 0.004312800577045935 0.007107376775240362 0.00839614690302154 0.006265352361830225 0.01070517010087933 0.009460836125096588 0.009593991037815486 0.007966272963468695 0.01014118773784827 0.009375682899282735 0.008882501315915501 0.005975878818127968 0.009411376049354998 0.01056424038776963 0.03154402386156363 0.02340822122347821 0.01030862116892957 0.004843283658354927 0.02013113890048057 0.02348043319042098 0.01597213365445256 0.01588050454926799 0.01754535889891687 0.02832702240723555 0.007286511708964079 0.005018753944440552 0.005496148171561996 0.006277329802877684 0.005817362592773565 0.003199808442747396 0.003014055403924318 0.001969363979159638 0.0009108763619586802 0.001988705319856532 0.001698408121989065 0.0001601782658408049 0.0003133114489068772 0.002229255233458808 1.533905055427589e-05 0.0008724227692407448 0.0004772699442270128 0.02700140299289865 0.04509375723440965 0.04355129758215794 0.04269676946681312 0.05683323948490161 0.03104790451096855 0.07136765631747764 0.01450614500683954 0.007560937029948211 0.01258045143275924 0.007755424645522305 0.005499929700668425 0.01009706743588176 0.01181938150741012 0.01035112422718097 0.01859869578048871 0.02354633954053463 0.02013369486047071 0.01167635171898098 0.01044694752982957 0.008025678602864612 0.01036176672216026 0.00942000275126233 0.009135001785761243 0.005311621740035621 0.009669421173119901 0.01591892580599287 0.02421624944990508 0.01617174823614681 0.0538512087008251 0.05731437826052354 0.04603784366531377 0.02689535468675938 0.01815752222504891 0.003550740443075032 0.004317373508840766 0.00410390685082834 0.004070255565427673 0.00486168200035646 0.001160081770533437 0.00299376645497963 0.003010636794880576 0.004282445975467211 0.002054814197927705 0.001096209311239522 0.002069715266922324 0.007508931195723232 0.009043252431402827 0.005281945327936045 0.005442335435284433 0.012966556575222 0.01006710284057262 0.009860698353189815 0.009976190037395301 0.008174142696338723 0.005823490292391756 0.01011125180671134 0.004359610489633052 0.008214870615052784 0.007614872852782555 0.002436567233290431 0.004203923712077698 0.006216664708274182 0.005248089819779866 0.005193042065851267 0.004624233401491703 0.005634207138784506 0.00466380375439768 -0.05339473459291142 0.003101519091181933 0.00399714524175135 0.004759590030119004 0.004912876488891726 0.003333115254427545 0.008598612779460028 0.005358092761244274 0.003825317356436157 0.004508536879045254 -0.008912588235166219 0.003110378511633743 0.006197897886053573 0.00275496168995654 0.007916210805826595 0.01173699322812066 0.005542066408356434 0.004865868966572029 0.00659297176559102 0.006189897228769618 0.01156568970308651 0.00239369069278083 0.00493034689836948 0.005140462965839399 0.004504531464996572 0.005067285340141898 0.000893736611712225 -0.001164284423011892 0.005096671182385591 0.001342221052738166 0.0006768671322117238 -0.0008299138130229252 0.0002968379758906583 0.0009055625204809225 0.002092597510618551 0.003075005913711795 0.00293105197128115 0.003036317527592454 0.003145771162134361 0.004732836911793771 0.004009768381411839 0.003117139183113844 0.004945679459292093 0.006303444388379351 0.008357308941849082 0.004097775806247164 0.00651147740989466 0.007317278407993521 0.002400026933617079 0.008457144534180215 0.007593259362751973 -0.0006877910658816382 0.00133239283595999 -0.0001487663943247468 0.00059182024137227 0.0004892822450669519 -0.001829978488142163 0.006415896396711337 0.01890962037405358 0.03091934087670471 0.03007284068589523 0.03136865421776433 0.05673001208845155 0.0191997310315967 0.02279928747919507 0.01267524525225464 0.01373871376889499 0.0195868548433351 0.01545944465855047 0.001951339395182842 0.01336303708883923 0.01021433485786733 0.009056867958916458 0.01461665941037999 0.008963230111884827 0.01299394610241183 0.01120154794700368 0.008571874975923916 -0.009041490034420192 0.006496353857868835 0.009531857415409259 0.01096347171495387 0.0101327520325867 0.01314951356973122 0.01165973670176982 0.008409974922603432 0.004604034733959168 0.004009207017620669 0.009322579328936336 0.007804053922768651 0.01771185128759117 0.009287236737305121 0.01582403375450061 0.01870895314110527 0.003281361571778072 0.0002139429167691888 -0.003136673610460286 0.002088392932793166 -0.001747667866966182 0.003922208923769298 -0.009945636956788439 0.01906660129088688 0.01184805836363971 0.01022852839297078 0.01108711035373587 -0.002570178229568228 0.004780282228949519 -0.0004540429566491219 0.003741283822415559 0.009993198459994532 0.01970162457223138 0.03369825182707241 0.05100662475425737 0.03489131180696586 0.03410982872740267 0.05898396553646388 0.0631034416801225 0.06477349068051376 0.02634306805871295 0.01543679061304552 0.01491037429257978 0.0135386346654451 0.08320329147845047 0.05903780790993144 0.05238942694815517 0.0064292591261023 0.04941747299416474 0.00560342399541023 0.03878924486563742 0.05329441431434303 0.05858525844581296 0.03205053129560204 0.04679152011147367 0.02750580030532637 0.005484617525916706 0.03036313486259752 0.01770149769257539 0.05713887925408729 0.07282625596958477 0.03557963659212782 0.03165611114214784 0.02400594125035309 0.006785012374219857 0.02432354648543733 0.007591399116129965 0.01701723800398929 0.0196408021418447 0.01150664494077347 0.01121770387576695 0.01406250523142271 0.01444190498743205 0.01341646783598212 0.03363309694416009 0.04926170282694655 0.0520167065028297 0.04903296993318826 0.02327285659564332 0.01807893437694014 0.01913772172939861 0.01144062887203287 0.02040112309332479 0.01212972963070909 0.01273129264629698 0.01445067029563111 0.03153470788141806 0.02654434312819798 0.02174182281614448 0.02830710529548047 0.03606336033114196 0.05595011387124396 0.0583997732423813 0.05108607040140336 0.04900341820902029 0.02947121216205536 0.07390964961888036 0.02772498540194018 0.03219952596284278 0.008286837260834843 0.02318516032777542 0.02556360720688282 0.02340338506909123 0.02216429699701728 0.0124988853254719 0.00329131394944858 0.02128116164750869 0.01259810496365593 0.01582362480010595 0.02388612005127895 0.03020168734108048 0.03177821250442434 0.03327167648312898 -0.006019107712565238 0.003275369832878721 -0.00539457719518448 0.00753519261880415 0.04017895488637596 0.03632074016199724 0.01385155225197815 0.01634869305517152 -0.001885646282165247 0.001406140534911005 0.02320842489512847 0.03795900838242976 0.03008039107201252 0.007730640381451843 0.01965253423420678 0.01535540925959721 0.002493123093920537 0.0169613622813518 0.004668515505008262 0.007278413555904829 0.01148073059615741 0.009192613934406107 0.00910576591166537 0.01195125670312659 0.01143127820826126 0.009512707904676669 0.01620722078673158 0.009195847467184756 0.00238005146269011 0.001982385048583774 0.005465484606589278 0.002432134054532389 0.007423649568473395 0.00678161103512594 0.006906764756647541 -0.006018161286280868 0.0009384620378184912 -0.009289988830018218 -0.00966989595844971 0.002290777519649893 0.03692968793543652 0.02583501236388059 -0.008338607691886404 0.002246652078097427 0.002579228987572984 -0.005285202308426306 -0.007465100723466712 -0.003910150591317132 0.02379608330713866 0.001987770676098846 0.008392662720245532 -0.002391430878108347 -0.0004488395810461614 0.000596394278157544 0.0116263674884528 0.03810312754177108 0.03081081349851718 0.03666975489196086 0.05662340101902677 0.01560023173895734 0.02390954637113569 0.003276417635221391 0.02162257369467609 0.01612791655667094 0.01422251279167587 0.01946515898785422 0.01998163698669036 0.01801035818492523 0.01386674133293659 0.02665157559305786 0.02410302703177506 0.01294469720089686 0.003452860100446616 -0.001733184072876922 -0.001834539476600321 -0.001754086791173971 0.003730415536536514 -0.009712238547692048 -0.01687240390841432 0.006384565373019576 0.004734065440547756 0.009557306152221565 0.01061995936885043 0.01517802117312618 0.006172705209153103 0.004460374737538933 0.00294776272412186 0.006508928101419843 -0.01043599989633649 -0.01635186647266419 0.0009535395402731361 0.001837830083935308 0.0008711079151391873 0.0002005314789991285 -3.497936134286309e-05 0.003978551376042374 0.003040334226498001 0.003824539221919027 0.002457924846687826 0.004856909117176232 0.002173381120428124 0.004850151207033106 0.004346987646606475 0.005168860292516435 0.004384764629944853 0.00456470370809307 0.004372320070342483 0.002912235747392857 0.0006655790750647715 0.003847285362066353 0.003674137835467513 0.003714875591585288 0.004696406692001107 0.003055094034404378 0.001247805809625334 0.01060099677593472 0.006034891571747381 0.006502569124773578 0.005667515889804362 0.003435537127139052 0.02280790097661072 0.002688918938246988 0.008685494215491033 0.003927126649243695 0.002434537228744835 0.002366111795639088 0.002302282706639565 0.002878632355094917 0.000734288664169331 0.0008537914239467336 0.002851061740518276 0.002798275260890372 0.003889659950982501 0.003813909227245612 0.003019505868001728 0.04292354056198853 0.002168491212532304 0.06145045384925597 0.06392443249459605 0.000132046101817634 0.002713177534371562 0.002947231182571998 0.002600344195129794 0.002725380820298304 0.002700577546223556 0.003357963946634103 0.002957636325221368 0.07911765881020318 0.002335740313356028 0.00250962520581206 0.002560176751159247 0.002982457614558415 0.002731519285611534 0.002417007600494321 0.003083064068808606 0.002401464290735209 0.004948215208796645 0.003523844281435463 0.002514812003611601 0.001636205540380245 0.002237249928286683 0.0006615326957443896 0.002044214939740459 0.002095335075128743 0.001306058031160286 0.001713404883591065 0.0005281268193834134 0.0005098281480664602 0.003226629026581922 0.0603112341236315 0.00332927746640895 0.003124063256650681 0.0033884107039269 0.003341418400216021 0.00342811107884479 0.0009816721164581483 0.001750446692714619 0.0003235930601106016 0.004520290865821318 0.004283128755869199 0.006276050409887441 0.004642192947154165 0.004338095420118964 0.003570641926442437 0.004408769485033172 0.003683809969759125 0.002963243294892233 0.005343526216118663 0.004347006119099175 0.003453582327986221 0.004055429693672611 0.003951225506833344 0.003506777604316592 0.003980493512592078 0.08656439455487608 0.003842086021555923 0.003196398529171489 0.00258445210878854 0.004248342560234636 0.003143989783178962 0.004585459319001191 0.08094001876449569 0.003789838235364124 0.004387793931423817 0.003641910246478385 0.004444973161768351 0.004682181302227319 0.001140431189277158 0.02376332853735749 0.0009809499145383199 0.0009663556361108496 0.001332613168799296 0.004226588574869353 0.003232224810436528 0.003923636919150689 0.002261270640904332 0.01946728171475189 0.006217858682217635 -0.007874548890515828 0.01661381343428193 0.01968796622809726 0.01922482440992484 0.02158699050219527 0.02846413726243519 0.0001235886962530148 0.02694939270909491 0.01897055947611995 0.02156148993828945 0.02445030816909198 0.0003201909129812015 0.01163755793831259 0.01125356293915471 0.01165623331780662 0.008891323464254933 0.01633878551539632 0.01555883734718476 0.01325280512876259 0.01320110359240716 0.006115040590597794 0.03575524621717676 0.02630616121923166 0.02427580682834921 0.02284572330570236 0.00793236667440657 0.01115983430724611 0.007538318101423434 0.007854350081743136 0.01207323484465984 0.01116904064231049 0.000880105605047193 0.000918144474552497 0.01122718280485045 0.00742986082106117 0.009217447499133733 0.002947938659841103 0.00164490746617181 0.002605478043618371 0.01152364146589354 0.009182447340388138 0.01465316202918564 0.007286486744890065 -0.00182626051349075 0.001380732414885994 0.02345482484183982 0.07063130815771045 0.006884357041511613 0.01123984249857396 -0.02236335602398128 0.01890522058087845 0.07915662145599174 0.04405732344562958 0.04365292338505541 0.02172239042804094 0.002266503122260935 0.003239153561189653 0.003162804312531444 -0.02616268151822596 0.02658900485346211 0.003427660290721484 0.003531792397300268 0.003627342167285644 0.003548673328523197 0.002727945531342068 0.002436826316576352 0.01495518710410162 0.01810864715504141 0.06283840859893525 0.03578275660882742 0.05252250840424526 0.03648042787125817 0.005551320905459653 0.004737111744892122 0.09254594792216239 0.005275564734548838 0.004149556050292306 0.003343293075901268 0.03079143608697909 0.01020521064981269 0.01777365896979821 0.02204884310626799 0.0236177646959065 0.02654388160676578 0.02237959603017462 0.04574096031883799 0.03209039580091001 0.06085170678874741 0.04769364456682369 0.05455347150414218 0.06953955346749409 0.03136420973535133 0.006270431643843288 0.003948228619420509 0.004050405935416513 0.004367726528547578 0.006731968357951485 0.004000357723312576 0.05539594793188411 0.05038491258522814 0.04900597395964307 0.07095934922445453 0.05892910000735914 0.04363192528355159 0.005208209390669023 0.009665744597331147 0.02837233029846405 0.0771606312353549 0.06007746952948987 0.00513013372877502 0.02360984275304298 0.02407303203849698 0.01320829185380897 0.05899164416827436 0.005625132568441997 0.007443476996901745 0.01005689073175306 0.01093811635569087 0.01058560856865073 0.007732920322408106 0.005850708947077865 0.005009420118091597 0.00702061169685435 0.0456448570054293 0.04873011315071733 0.01627132479695583 0.01412582733979556 0.02335102051408483 0.008225932944710674 0.08100478080084694 0.007023600887993324 0.006482442111678426 0.007214926186704484 0.02977925201748625 0.03052403291918237 0.01373826354767408 0.02524452184571574 0.02539644342294895 0.03779078463066193 0.02677303208392988 0.02412347541619335 0.02836539885520424 0.02011552910815039 0.02069158185033595 0.02094020786914671 0.0991558115778465 0.07504535079216669 0.05359652504090093 0.01326150450552997 0.06655583627782841 0.05133609279741284 0.001168174036136438 0.002435115130484485 0.009009827197359991 0.006707711781650945 0.03621192546681886 0.009237876267860216 0.009242796573449725 -0.004290355424569832 0.004891765487058509 0.006533384604470884 0.006565543726709177 0.02226846394169958 0.008780092697934987 0.01859701507652617 0.02036809153174607 0.006488682065627419 0.008356024264556498 0.004814382736256213 0.007075684112110354 0.00575281919058045 0.006043757125033521 0.002118354414568503 0.0003358639159522529 0.0009998303936431352 -0.01392665837989301 -0.01343135196300632 0.0003375840315351874 0.0003778796429237493 0.006864046515706416 0.0005585937319085223 0.007847663119586379 0.0003787722553538786 0.02857466835913144 -0.009464053241263199 0.001782995308840015 0.007075673451256152 0.03042155920706148 0.01556952110203672 0.01169998476958418 0.03414036164502519 0.06363229911902896 0.009942206310106632 0.07744981256468479 0.07754722189926683 0.08052351719333409 0.0003350594391229514 0.0003787881542668819 0.08092414594615664 0.1047467005076473 0.09093227054935185 -0.002741917073976908 0.08901223904814128 -0.001873554263965153 0.05750168506374447 0.05972403591630494 0.06741586277668185 0.1484278573250778 0.0613958561124667 0.003018584475912536 0.06819403996551157 0.01248652200996883 -0.01201725906032668 -0.0004679249265239254 -0.0002109283510464726 0.005971184101887263 -0.0005111053434364953 0.009432528730360355 0.008708037418097118 -0.00622756209871296 0.001919098790471688 0.05469276298854985 0.01732545851036079 0.1104617500440345 0.0008319042617908194 -0.0006888435437023238 0.05258225450670602 -0.0004597574160662078 0.002542547940211405 -0.002347814297972713 0.0310612654733534 -0.006703424350053794 0.01782451326407805 0.01820252312873813 0.022218997331661 0.03170850633582026 0.02418305080112254 0.0230668121231058 0.001655205881133972 -0.02707570945883793 -0.01389356823757295 0.03907975270289785 0.004943942749119849 0.003645789205757779 -0.003269320013229099 -0.004821907075570316 -0.04473649778379154 -0.02034538387409894 -0.03164192841345782 0.03137879479949023 -0.01784557170036538 0.02408774359170606 0.004949369873847944 0.04308278987075946 0.0009602934472627434 0.04515615400970534 0.05778082811186923 0.06422555703176253 0.06031582498341693 0.05352054251418309 0.05983759375356107 0.06787641095118825 0.04236740634564548 0.07338109424908673 0.09324524404878992 0.04557742814918889 0.09725356122421573 -0.008700772700943786 -0.01378345124830466 0.1018674042674907 -0.01736103837934568 -0.04015960383742481 -0.03544008374051631 0.002728206187022555 -0.00210193929137011 0.0359360794868895 0.02404209380631481 0.03172642866699338 0.02891708144606032 0.02869319882334379 0.06747019162320238 0.05865975907709101 0.005372212044463755 0.005419083574141808 0.008122795300970476 0.002344371133510728 0.005782064604847037 -0.009573243119514093 0.05791469260347203 0.08297831908860585 0.0743138862651252 0.0860877585545637 0.06948610914603864 -0.01056298973575007 -0.02634795907971675 0.009934016734494769 0.01973320574864674 0.1257888006730186 0.006539822308385509 0.005238832983052641 0.02030516206858726 0.00666086386044064 0.03330788827934759 -0.01999626432260995 -0.00229387525167459 -0.01303278708595341 -0.03584467511041543 -0.02630621893899244 0.03687981672812001 0.04860746937906978 -0.01742807670253333 0.05161258476423768 -0.01070173812089554 -0.03722572137105344 -0.03963306142492909 0.0001155739473518018 0.06545076692247828 0.1506448276630067 0.1242515120852008 0.1750936135897606 0.1119364403648832 0.08020919433859397 0.02920832231029617 0.01747778436475987 0.02286805155049526 0.020607946081922 0.01764542264653583 0.03117162698405722 0.009365820671825301 -0.01091907620377177 0.03806256354029283 0.03966437440399177 0.0002235675263429743 0.006776032704761133 0.06172471879521223 0.02084977667140701 0.006553948720189997 0.0478823476600802 0.01847748561736523 -0.007231368442722205 0.05570770391924319 0.07215725331908934 0.005019004818801271 0.03265462059472567 0.05781917945342977 0.02590835816926111 0.02118975354919495 0.02543693494267144 0.05222481904387544 0.06028355812440068 0.003023173647325881 0.005759195082258794 0.004650185031830591 -0.01544176620088852 0.01234005011653674 0.00114037228028033 0.1014832936402448 0.06066463042325055 0.05430987081867017 0.05112923495608337 0.03935645353651107 0.002695126516861025 -0.00383377203199432 -0.003682543824441846 -0.005280152812186036 -0.003468257201960083 0.07203574563888643 -0.005388738674257176 -0.002794250274473417 0.04168406951220139 0.06278926852646666 -0.003347781181816565 0.1255992834530139 0.02102803190244367 -0.006088293809861992 0.1211992423474039 0.004154906558186595 0.0689241467386611 0.04580881438472861 0.09000272409205598 0.007479770651461964 0.1009921710672804 0.05407797650444451 0.08650987467733859 -0.005885264664654917 0.002517404094742192 0.007796106513876084 0.005761357829920641 0.003504789273621965 0.007805281063233559 0.1067624609092326 0.1262297387499082 0.07027430585724821 0.1730796271094947 0.1315958044988657 -0.0001680373493117124 -0.002713740941951277 0.003288842497559888 0.00478817527971954 0.02723111019629776 0.02030206391670767 0.01694958856991817 -0.01801890345316186 0.01675493860307891 0.1026599387332494 0.000956505311535721 0.04126391441378391 -0.02405185582129095 0.001149246112148397 0.02826489334001627 0.02490942124004188 0.02789533891283371 0.01516841211170177 0.006331358810503052 0.01329250512671073 0.008690679451943073 0.002358599039651095 0.008377428473325678 0.05634040861865962 0.09771253894349936 0.02482938768732994 0.08754000901522288 0.05836759102816249 0.1003478996042877 0.01053651719589794 0.1252228043627289 0.08428046950235804 0.00228301067814877 0.02641716883966663 0.1091096549054052 0.124671879333662 0.09142927842721012 0.003195596385964548 0.003899056256386472 -0.002032674904070289 0.001137240922027032 -0.004312224670747209 0.007774478207081094 0.001942230407930789 0.0002125482175568807 0.00294485167982757 0.002801616852305723 -0.00219968148961273 0.01445497462694192 0.003062768772982906 0.0001300260187609826 -0.002023007774675516 0.0008740327815968689 -0.002141970151074441 0.07980862391851261 0.03677684240472878 0.01637365395721372 0.03327520821109948 -0.005897496644351034 -0.009278516710013174 0.02844324606699532 0.01202420583180351 0.04876768870944449 0.05962580099783964 0.01254585618770671 0.02505165225050537 0.01419926115814004 0.01864318122435922 0.01386891983939917 0.02892067861190771 -0.004358928912094362 0.01240894547854664 0.08334133371068167 0.06120788476010518 -0.005179787575100832 -0.01073659204461022 -0.03778924398842024 0.04485378973895875 -0.008050041644602926 0.006277314862027645 0.05008009225467803 0.006499900153592704 -0.01509656207742908 -0.0004963777925608664 -0.02318570251938654 -0.0184584773047604 -0.01329157563299188 0.02776721153381534 0.01157964768425996 0.03220107194890907 0.01787535190650933 -0.002154330114172338 -0.008212797682668012 -0.0104284306376688 -0.009561894961894746 -0.008557069409515908 0.04109626568605554 0.06305677395102018 0.03983809374930624 0.006989466624635465 0.01115437277999197 0.009624602318462081 0.0101261820905732 0.007794276442860053 0.009785451795869139 0.002575383159991705 0.00804322527256566 0.007392460107395302 0.0250905689471746 0.0335264809519181 0.0279166097555742 0.02372028896259354 0.01676759183633186 0.0132201993956316 0.008651059498267902 0.1284309390868019 0.06810357894186914 0.1101337796433666 -0.04253622728264099 -0.01451765384224686 -0.009375709375979951 0.002468934024921015 -0.01202150125327162 0.002700528088180098 0.008840313763743824 -0.01558486596231344 0.1910676444877035 0.1453952535916662 0.1826190109307078 0.05638095976974779 0.0949576568686378 0.1326918091256336 0.0003535183211328695 0.003797926827180161 -0.01432583887145335 0.001180046476452359 0.005199254452662663 0.002467928415054178 0.006012029010056996 -0.01551402552685717 0.002704434474253878 -0.01745125202262347 0.03808525281823916 0.05232958795318206 -0.003491795710023186 0.00378299000717374 -0.01034792691108079 -0.0005538881127365274 -0.006541822385035389 -0.0002279731763124746 -3.442190194367378e-05 0.02878191468639328 0.0002888101972972094 0.01670929400932492 -0.005138833881133088 0.007328737296925541 0.007916002303954261 0.03691950303225021 0.05119371103739932 0.002872724199091601 0.06605767828532691 0.05030722505831671 0.04002662745812291 0.04435691821989096 0.01036342906203947 0.005764928064344255 -0.02953779215034534 0.01194182780360049 -0.001085962931168145 0.05428401748845327 0.04541309595683046 0.04895995041074924 -0.01107085024704992 -0.008548371397416151 -0.01588498214621117 0.04240213496532859 0.003260279579006879 0.05577851015435461 0.002634967173602989 0.002924924995165595 0.004041850219867151 -0.01012354483106138 -0.007518960008085687 0.01504621142737898 -0.0006999505935090522 -0.01651818657698695 -0.01834555789642171 -0.01702841424470851 0.1233381551559865 0.01488437424882021 0.07959892357614047 0.08855539323184745 -0.01976867336738393 0.02549858725095157 0.0003062686582763624 0.04315055694680566 0.0977416986017916 0.02677443570569111 0.02675563912908416 -0.0006369535252601898 0.02413733117927366 0.02441148385712399 0.02175526462757075 0.02575565270668583 -0.004498564910705771 -0.005232186491027475 0.07719083293208083 0.09130134655477036 0.1065157029203163 0.101186526059739 0.02971887433091388 -0.006196403063914563 0.04783436663120174 -0.02306547584640124 -0.02554522636543473 0.01962148261018995 -0.03296310796829956 -0.02200714521659617 -0.0004746501222388523 -0.00776621858411617 -0.0009159588194014492 0.0001692950409806911 0.007764475438166858 0.03892830406376796 0.02872245204991079 0.04097605327631499 0.03295756641042348 -0.0006523939100943246 -0.004008063860227493 -0.0001693727376169723 -0.001518183995964564 0.0007217712300677121 0.01128238330405429 0.006078673036932842 0.00501008755671993 0.02567299676339156 0.008920160397587701 3.94630190470872e-05 0.006825505955354641 0.005800836138036269 0.00108312556651594 0.01176304633168628 0.0120411130804135 0.005417971173676491 0.06086065195870228 0.03208811095999079 0.0543412772407619 0.07879463320025648 0.1463539890526016 0.004199259191466811 0.004652209857951786 0.02043673706862131 0.01740412937428999 0.002807136014717945 0.01048503018967545 0.004475641323140143 0.03456019676871935 0.003441876416039861 0.003053668324505924 0.001595666682112085 0.003462440761501805 0.00230755056922656 0.002953441080524004 0.08400998795735869 0.1238741395375272 0.004114829564625649 0.00447014500239652 0.03955757887416016 -0.02115987319751097 -0.009193822500901651 -0.02814584338759541 -0.0001946432512974977 -0.01675780954651477 -0.02312102576036456 -0.002714120321806172 -0.00611573713260206 0.06348263268164824 0.05904107809234177 0.02779887646750413 0.1123094714859917 0.01144307383008396 0.05300286435564223 0.01187972507888906 0.005925568697423874 0.03238712250535059 0.02003564246126781 0.01228185519382123 0.007379302475821496 0.0667002748009909 0.05875349141027004 0.004333130034515008 0.004607020977996365 0.004863539716841428 0.03088758011487323 0.002760348532937865 0.002133384250420495 0.004978900253849439 -0.002609795584134309 0.002397414465432768 0.003831105038968939 0.003222833294329575 -0.01689251140299908 -0.01240225055538192 0.0006428495929018835 -0.0008907771454554237 0.004926542260179235 -0.004439596904013321 -0.003319338705371235 0.02809917254707565 0.06161071475120627 0.0001443407956078526 0.01022916574281764 0.03065210459094551 0.002409587493953451 0.01166057866774711 0.0169886033046109 0.00300398747476306 0.009774169723959251 0.005277806182607418 -0.01648287241538041 0.008926757938219967 0.002467917744843686 0.00441725389311455 0.005034709394966063 0.09168672529617776 0.005682408959852458 0.0002092086451217041 0.0002046507150376933 0.02841463781638362 0.02983566799327298 0.001902952158274046 0.02917613469403341 0.02507504588799307 0.02762774509093134 -0.0078992129210682 0.04448394508025003 0.03092327164965632 -0.0003637851188741554 0.003256341733710157 0.005657607606439825 0.006195046592827532 0.0008368815677932721 0.001526917055722397 -0.001834068921677867 0.002316977900169635 0.05986314637034463 0.05538853952536799 0.02955723020473376 0.08094515388795971 0.007669272877041038 -0.002648641016771388 0.07450440756366702 0.02442779167044896 0.08180771994655685 0.03403367719479659 0.08922292941916626 0.07632984479976883 0.0526133705314322 0.0438124521751106 0.04943880293063812 0.06437748948088014 0.004379351469768705 0.002457922777790226 -0.004255490859267469 0.01612728327417698 0.003575198869096727 0.00400900726550061 0.002966811761440613 0.02136813156582663 0.01124164643808847 0.01303127973974261 0.01267647180759701 0.01172015901095886 0.03411331435900654 0.007676929997326354 0.03804645098905123 0.04765656260570567 0.03896974481618443 0.01167574616823528 0.01093131010678776 0.01234192993728354 0.01124407336371933 0.00991132979703673 0.008603290803981015 0.01829028522970319 0.01728434295068761 0.009459651752969075 -0.03371741707133848 0.009325044805735429 -0.02903874740943955 0.00601694039899016 0.008694749908727114 0.01755151769263978 0.006771733863214999 -0.005162309522051224 -0.003481072721066675 -0.01130981979801074 0.009131143747930117 0.04810357407910944 0.05881235143282535 0.04022974898323266 0.01454548700684478 0.01654340426348992 0.05759892535848704 0.04819022017268913 0.06396194927510837 0.07513998065535117 0.005627067906227192 0.005813728330135679 0.1392978984583268 0.05132983312655391 0.04317476278098213 0.003577572460573298 0.01597494829423082 0.02053917913369275 0.004516366460354132 -0.0009291627151928526 0.0001107582681655678 0.04097515364778046 0.003698417530475174 0.03546277662279951 0.002877788499186938 0.004206366553017041 0.003617959749039965 0.005162209591728608 0.06486537335249611 0.05771585648219115 0.05520494022782175 0.01158238632855294 0.01144895932535349 0.01217139178278114 0.01721287441498565 0.01213428081030411 0.0130673955852738 0.01326484330557215 0.01503453923147627 0.01674542635536064 0.01281892643332762 0.04479045971187038 0.01666976541605576 0.01645012191513122 0.009650512472046305 0.01084524978941654 0.004134835588203623 0.005300836320589163 0.06251262589781713 0.07193605008736373 0.03764531846857905 0.0682770909279469 0.03812790653345208 0.0649840495131852 0.05311944031762707 0.01094493480871326 0.01135399735696219 0.00349612753352787 0.002816507835209472 0.003650710208757718 0.004653051663150921 0.003543981633726931 0.00424301961716113 0.0572432046548346 0.004467258152927948 0.03825302239577562 0.02657513354795741 0.00406676730474024 0.02791121385216628 0.03186978716117612 0.03080688764771305 0.006518332792915298 0.04816563964931647 0.04509222061652665 0.03948177500721447 0.007417599000230327 0.009270775822409918 0.005330664262055963 0.001999704500614062 0.005472934011843155 0.02470140977405124 0.002436834806668218 0.005932941812986035 0.004934856058367089 0.01971054942270253 0.02986059255946834 0.02692043117038597 0.02841579831381588 0.04700454407031913 0.003554337008619259 0.02284071859206731 -0.03214646593648951 0.05084542313471417 0.07222806006840533 0.03692896602178904 0.03563905918934715 0.03889652467148819 0.003805056741289629 0.0325824549534199 0.03790381165990665 0.03670393078260437 0.04049618871656169 0.03119564863697203 0.03754656031971255 0.1352027919659264 0.004223836962503351 0.01256746321300846 0.01160354324960617 0.08632069913896584 0.05039647200504892 0.1070107647532966 0.03380386830479783 0.04256536877129767 0.0397688691712089 0.03758966176795569 0.03759333354742834 0.09299609256016868 0.03555138248748972 0.08628597670098415 0.08226884112886325 0.07094763685693695 0.03287914278630611 0.01536221763604266 0.03525688965815631 0.02328338819502398 0.005104903664441419 0.02533029741388205 0.07664790362086556 0.04580550641887172 0.01734036766338637 0.002851291723419549 0.07949695195737408 0.01103262953074 0.02907005636829791 0.01864882030813719 -0.01219821789065273 -0.001522346931505123 0.01076887857198234 0.01428372872345343 0.005982632364001992 -0.002034208939064046 0.01570012318842759 0.03888282305955712 0.04301783756416595 0.06424571826871912 0.157377693436022 0.001527693956883554 0.0198130142210824 0.02455726618069438 0.02304651831496838 0.02301459308158255 0.03494930322273743 0.02547672770142171 0.03001805182263968 -0.007113635159974121 0.009764441984464738 0.01501058535890898 0.01645503458051177 0.01367707761667413 0.01449460337278516 0.01877415537989113 0.00678175516459054 0.04573847644383466 0.01579479714458612 0.05768574126509644 0.1485328178226179 0.07700594096622999 0.03191022840043556 -0.006212938578006108 -0.008329046052601062 0.01312086547096644 0.0603166503952714 0.03168386269917405 0.05995352584516927 0.06205413784632702 0.00362774784959237 0.001049536067305911 0.01746559338596258 0.003945870462068284 0.02965856342435559 0.002434786792955805 0.002682342723419989 0.05349560022247191 0.1368711571747991 0.03444728168722023 -0.005154412970604575 -0.0007879161718205206 -0.001728597433653565 -0.000164820276505481 0.000126882068935688 0.05956188531505535 0.01198027787353916 0.001086987814383515 0.03189685073717125 0.1057576622420096 0.06839333194233878 0.1422055671687888 0.1656396704120187 0.05814687004860494 0.007802601436459335 0.0001447166526887845 0.08328674163713118 0.005470153629486156 6.704323801967506e-05 -0.001656142452606263 -0.01083138832472709 -0.01360694986465523 0.0009042702847419946 0.00364726017678624 0.003232558568464865 0.009522097477885613 0.003153408845996844 0.01056528700140479 -0.02882483611492993 0.009595649936422574 0.003243956883038434 0.003381820765892408 0.003260863451472217 0.003257550534971746 0.005504303622791426 0.002995354360569945 -0.0005277725448727666 0.07225917505722856 0.004621888673323665 0.00455506338013348 -0.00481208921917852 0.004522934310922506 0.004730601311090415 0.002399835620145625 0.1718505939215824 0.04821804546752416 0.0853107588510304 0.1278403997023828 0.09314602118072439 0.1311058162714881 0.1390148618667632 0.002967874078718842 0.003080416023341473 0.03362610700238206 0.0676428076894653 0.06525628031825532 0.04086683967783003 0.00477462277037227 0.08359305541355055 0.08150151270180474 0.0109919564805697 0.02366091660276359 0.04981413206267089 0.1642438571421782 0.05262138599221034 0.0355886654242684 0.03824137943761281 0.00218954585204315 0.005559358454877079 -0.005196710231416501 -0.003102396470388538 -0.007655309689083075 -0.03106011692017025 0.005444533322034242 0.004515657347926516 0.001223338203948743 0.0008237969598791664 0.004672167401973486 0.02440634927152214 0.01737982985693343 0.01960726919300614 0.003137564110218297 0.01115865234363041 0.003389112917010639 0.003189125773805563 0.02270253556948211 0.003547088913448797 0.003815100682049518 0.003794789590212272 0.004475053759486113 0.002678411905706063 0.003606677054452975 0.002698901908397208 0.003791268875702785 -0.01117683806546866 0.003373028660245906 0.01481040845335834 0.01293934090236024 0.01166490437352657 0.001117658698567207 0.003552772617663892 0.004124932643154755 0.00446430955946978 0.004196064250192631 0.004464428632063739 0.002460354965096489 0.00141531931379749 0.004397343673919921 -0.04429369209689883 0.004500361943075724 0.02293022800409794 0.001239214938748979 -0.000258989468720519 0.01114820106017105 0.02229863567326533 0.0009710838490235203 0.01086072064528577 0.002210748379004494 0.002305446451198942 0.002800614943407807 0.002466804436890948 0.001325819660922582 0.003640503083878593 0.005519898880798265 0.006830215043873177 0.006208004834513067 0.005679744415953559 0.005662492032371161 0.006431169912957624 0.006097757673996552 0.002936040920565442 0.002604687955309781 0.002893643193892323 0.002801523557895024 0.002682368890539512 0.002397981940227444 0.00324156533125259 0.00492069283442136 0.003492270177175359 0.003098710464845066 0.003765008129942543 0.005550234349342492 0.001157665147658231 0.0004788380130037759 0.005569658747715276 0.008641032052211247 0.004739949114263503 0.001477536177330583 0.002843805322004701 0.002859425265391446 0.001984009888520506 0.002669605276340401 0.003234948124508324 0.0003901525064121822 0.002177282349707021 9.323056817677561e-05 -6.736057651480178e-05 0.001534068696229121 0.005794153877560226 0.003793070494463051 0.005065842379924865 0.002513467600953142 0.003040870693886917 0.002819683350407674 0.004700166865191435 0.00422466788750315 0.004707497140592578 0.003136057203027277 -0.006156060466792996 0.003126452724710532 0.002612599632649984 0.002114752161465984 0.008703090120159839 0.006374262639524475 0.004784726232069044 0.003175265155160146 0.003356170867034775 0.003751856500790764 0.0025235312406702 0.001618589710403989 0.004199762181139201 0.004043937743409543 0.004818561750529341 0.005978811629694075 0.00539831396867655 0.006030337957813115 0.005889056291847659 0.004934123639873581 0.003926473423621995 0.00696211252169661 0.006973855191020004 0.005946217616088208 0.005768407740943813 0.00555825304371497 0.005626037863658928 0.005354127191779258 0.005002543232798712 0.004818334439127043 0.006000067371481852 0.00356246482991838 0.006330841558217467 0.002036798036777073 0.004820580008288977 0.005354912093430282 0.005363500599219134 0.003747445437909845 0.002408033893077033 0.02531591983509746 0.02802309568764031 0.03508717308695852 0.002813493933871234 0.002453372564779356 0.003340966680862595 0.01449245077520271 0.02213907174477162 0.0204378593385599 0.007005986857805796 0.007725517636121891 0.006531760353909562 0.006365299260252383 0.002408109529519279 0.003151928347393314 0.003753963899604216 0.003453294250127965 0.005083384490421186 0.002986896069623595 0.003987071770680153 0.003704066450251994 0.0002888541309052162 0.003597096062685373 0.001501289511580313 0.003317281340520615 0.0036208669218065 0.003626557617381939 0.003035361803833062 0.00340864053296516 0.004683152221519855 0.003519831447156849 0.004218387933690896 0.003799908021416736 0.006280124569234082 0.006202539988394123 0.002466199279129967 0.003145870753911259 0.001776475447262776 0.0008269255397786832 0.0004258541952336434 -9.581173129990691e-06 0.0003104474526050517 0.0001294757434153338 0.02100596207678768 0.04012973251048769 0.004093119366366608 0.003737469599174174 -0.001400969895788547 0.004588393370548515 0.003938266885797862 0.003813792854818286 0.003413997186238854 0.0009419436418006106 0.02293717387617959 0.0003189338423751614 0.028891485201945 0.0002908682713324881 0.02483229508328425 0.02830713399071449 0.01985271822441585 0.02713415778144429 0.02561162838132182 0.01535570880064493 0.004694455871836229 0.01292191888661789 0.01758792523495078 0.01669708263110765 0.01434118478701888 0.01703118858687396 0.002663996553964087 0.004095320633162447 0.008896456777083374 0.008314589469958764 0.008245880542801766 0.003347706828851606 0.003806220303062707 0.005975274762372379 0.02153504372895995 0.03015617396416998 0.01529624408149174 0.03126470337078618 0.03751240978416732 0.05304572081119988 0.002668673829379502 0.002612819077736321 0.002833345088071494 0.002685458255715525 0.00270293706423268 0.08989678159024271 0.0324391074500178 0.04137954233953095 0.003142660439158353 0.01333325284460634 0.01164405747088854 0.0165093676623669 -0.02247615861891469 -0.02476923944270403 0.05170880242167833 0.002812985445315246 0.003000706919949981 0.003815856372034747 -0.01396588892297991 0.04451719682439952 0.04001315041427932 0.002479097459823187 0.002313461060080385 0.00501250361564089 0.01675383218427838 0.04579389773646277 0.02628163215998134 -0.04688364943076816 0.07736834488526907 0.07621907928042367 0.06441134881735797 0.1894304896887524 0.1713181892309915 0.1404369775885453 0.09483261007161423 0.1513409861889737 0.02236717070470289 0.03953593112909554 0.002952418100973516 0.003046589542067851 0.002188256867838931 0.003394108844857753 0.002026490263299032 0.006342096977368383 0.003917125868011464 0.004526851160706744 0.004504866606474203 0.004603396644247711 0.002791034290756821 0.003080381329829169 0.006119751238838632 0.002787284566424874 0.00358843665138769 -1.267146425687403e-05 0.0003806440775978818 0.0004134344020879495 0.03664633078583868 -0.0007657787295018197 0.006239126549430654 0.01187608579786205 0.00687810587994858 0.007281923021925928 0.00652749492175626 0.005902955089620706 0.005985758657955887 0.006257157192727426 0.05220052848836243 0.01164927372044732 0.006619165929884032 0.006119737222404133 0.05471103885754769 0.006887516182505366 0.004987568354960915 0.005095128280084788 0.004151244909003152 0.008578335835054565 0.00630354292943653 0.003715608390174567 0.001955150214815307 0.003146984518836831 0.001266880589026885 0.004124871048795414 0.005461258904182994 0.0009122461894020471 0.001704930929261719 0.0007443697966035123 0.000593382154008418 0.0003176401893538569 0.001743910497601534 0.00492649257949966 0.006884051600242205 0.006898192923358959 0.00742276699683397 0.009494158751230063 0.006072640285331493 0.005958484760852007 0.006728061537716684 0.002117111352466505 0.03697366914425414 0.02655517723091656 0.004134957447123055 0.00393620224784567 0.00367013608891847 0.004527454319672415 0.004482934277085847 0.004868429674839193 0.005917917174919557 0.004850906378362154 0.008099516216233062 0.005530983391214554 0.01432011021251807 0.01122612974001952 0.009107482896983222 0.007396546052350738 0.008096939134240432 0.003129258820541388 0.003934062181803054 0.004040512763473338 0.005739685439623719 0.00720598646251036 0.007734288788521861 0.003862396051170164 0.005365581123241709 0.00791616454483879 0.01131694883909556 0.004806367913222979 0.004862042239303133 0.006015834778127544 0.004808488702673828 0.0393799370152946 0.003171073338002767 0.004534819290828134 0.002979796945533389 0.002015786365971068 0.006544503459104778 0.005891862126027485 0.003676922710163576 0.004416934154477383 0.003279037727510156 0.003727376733774691 0.002452362524573001 0.003717759243889967 0.004821205402761362 0.005253483437845125 0.00580646658383142 0.01015153176258398 0.008404962408575111 0.005238952351133242 0.008116210290758699 0.007501706231525178 0.006724579646711276 0.002234335518246752 0.005250475688636272 0.008052154739057005 0.009012277706048118 0.005350003800734881 -0.0001177219665115731 0.002169817116626339 0.00265190019978802 0.001732477265475318 0.001446777093932426 0.002007871189920154 -0.002743125152948225 0.007100672105546743 0.007155789776432264 0.008676924348814029 0.008985248072967316 0.003977683030955076 0.004772172681755977 0.004449673204602834 0.005233846487511144 0.004101529664969543 0.003914453722669832 0.004389554129482194 0.003940658848335311 0.0003549327372182489 0.004306742265099452 0.0004557012608605539 0.0004675049718844551 0.0001495298169318146 0.07604904409496843 0.00159198248813707 0.005335107299539675 0.002168970411919001 -0.001196356506195463 -0.001343839341711657 0.04579841808633673 0.005905730332641139 0.004766782144693226 0.005618563195695409 0.00459697861396575 0.007299768855714406 0.004997618465669219 0.006023270702944282 0.00575517417072832 0.004921543955920287 0.006009936364484611 0.005380685140756035 0.007302143470852969 0.00464312691146407 0.004092963446050512 0.002311697975791142 0.002559161240612265 0.004493784936990044 0.002586811763859757 0.009330352482172365 0.0007132915784857881 -0.0007732426597914509 -0.0008579066180726864 0.0003832282722953956 -0.004341850793437742 0.003873252722983882 0.004633542139639338 0.001639894628202005 0.002191557172019956 0.002600584612783714 0.002819206262729602 0.001899441991549398 -0.001741194029238598 -0.001013262136107177 0.002181678951373996 0.01015912584611373 0.007026556602922461 0.006735875144141877 0.04313422417808493 0.002830086168288255 0.003356157508754736 0.0001237202019800301 -0.001536449661150188 0.0009715545787668456 0.02253499878989445 0.0004727821793427611 0.001200053745698004 0.07678689137642304 0.0318388696722808 -0.000117532306948869 0.04347341228916491 0.003335996477431932 0.002983906001139162 0.0008752561286164827 0.0006754395634156305 0.002113581466496056 0.0001183381864620318 0.04096895640034724 -8.410598749802737e-05 0.001179891848245787 0.0001871701290637958 0.02662876268766326 0.03280659211542863 0.03117269390716279 0.01222626943219298 0.003835243725738034 0.02713726854962286 0.03801146177859556 0.03120897827172574 0.03752798497244766 0.03999301066548678 0.02645202953443216 0.03839775549529958 0.03574964950392116 0.01060135636628346 0.01386192905766738 0.01382194983502661 0.007481387356794755 0.02037485434340259 -0.002379394580473855 0.01257119102546277 0.0119320248750577 0.01187534986672632 0.01040236448234211 0.01262318967801451 0.006239375741753353 0.0309568718077038 0.02722943261261565 0.04119605200540854 0.0001547256016529403 0.006559985654024621 -0.002577979174092387 8.692190272900617e-05 -0.009365123127191051 0.006511712340775472 -0.0002745561521205455 0.005554935118718751 0.02652359256476462 0.02598398911629756 0.003763830498111936 0.01124269805329523 0.01458234691723573 0.03343720993911915 0.0005439947353611712 0.0008234724157709275 0.007627853432451743 0.002974072135916058 0.005930322407782298 0.00430537603213004 0.00485398092714007 0.0003765270606814332 0.003679763535542236 -0.0001714344140870109 0.003204569194938776 0.002333998851172416 0.02948293143211666 0.02034806243126364 0.01109240742073544 0.00408014800658548 0.01459307878649778 0.02939391852658758 0.009514176737124938 0.01323105358752468 0.01032296748795563 0.01101711252697344 0.01645549210116249 -5.337195338158405e-05 0.01363558578815953 0.007140318946731276 0.005409547131136182 0.00571813437026272 0.004817420913393954 0.004026706022431558 0.0006899543692788908 0.02723712197046214 0.040024385701555 0.002470650317023159 0.0003593798268080877 0.02752116721252209 0.001299213128339662 0.008244989779306669 0.0080536762557262 0.009840576697107698 0.005338427535346001 0.01217521351939662 0.009577498025519496 0.003508941283555867 0.0006678151978195322 0.00424666994781934 -0.001302965311273356 0.02095668574870863 0.01007456828928437 0.010525655408275 0.01578123557121729 0.00793390112756274 0.0111973222587646 -0.001525415043104906 0.00490799526088311 0.0008815141322885697 0.0006257692528686685 0.01120519341211212 0.003667724285887325 0.003018978591751771 0.002979575926361622 0.005023494636021325 0.004980553599350824 0.004679776163624648 0.004521195003847155 0.004130301556774296 0.004332648888602053 0.002107210762472497 0.002271897175611307 0.002053111805150999 0.001837094131607969 0.004848781530601888 0.004832628113916236 0.004654751414928581 0.02008235326340446 0.005794447918610616 -0.002275076503364104 0.05165051637592039 0.119565010974617 0.01671772212956991 0.01960764337886571 0.02596753242687167 0.01962530090627944 0.0221341095078508 0.06016833142575492 0.04443811637667133 0.043334260577754 0.03009561489572635 0.01394565741922376 0.01408156962545044 0.01459483748084237 0.01496555312337935 0.02699166278910701 0.002546514003423586 0.002338492740687394 0.03011379402724785 0.02972610230157288 0.03391177219885495 0.02494399031233191 0.002193989821996986 0.01562272712965656 0.084263181149613 0.1199986983473141 0.02326429603956325 0.03708854452494131 0.02873140471201709 0.0357137285378773 0.02053711002787776 0.03939060932419086 0.003056316139388528 0.04426751090539969 0.05103158412859321 0.002361147624415959 0.02438958654460252 0.02208361040319859 0.02309170814118962 0.01333407851489348 0.01262640399778123 0.02215215218899201 0.04940787548834618 0.04176418138276441 0.002408524498438586 0.04236884292430511 0.05154699925814659 0.004780322370919677 0.03842186131773653 0.004352423276385822 0.05138685301243482 0.003588772050925702 0.01533412329371392 0.005072837088820256 0.003763934506768495 0.04277409510864172 0.04778782576872737 0.01993376912344899 0.004457132620716494 0.02450504457723301 0.004989941978034621 0.007662820553455396 0.00918985981865046 0.01775105122727814 0.005396724369539562 0.01963213226663896 0.01241705865312084 0.0186712354431992 0.03571435572173012 0.005331428667792367 0.01871763485065309 0.008988617830084734 0.009492958591557061 0.01336159604247888 0.01181877647781231 0.004197023116731009 0.01451778370985393 0.01498407363765238 0.02078670134441082 0.004538828979744044 0.01780081253696141 0.02362112047646556 0.01835552032606875 0.01867570429101936 0.01988338478175926 0.01595234556165416 0.01596855953203378 0.01836937229104495 0.01984475271081024 0.02060198426942451 0.0008500976620866991 0.000683156332229137 0.008024934196016818 0.007391828503288167 0.01024633277214427 0.008137384402249436 0.007995633706617709 0.005684987306770901 0.005586294377764377 0.004478930209742494 0.04359127964724382 0.02052087965698925 0.004476746168023487 0.01300651926466174 0.00521445102236123 0.006784262728327565 0.006783441664245695 0.006965836673549472 0.03293049185116175 0.00302329746950533 0.03026605484778106 0.01057743205503176 0.02200672002353238 0.005932080660082135 0.008555128100986473 0.002945540702042276 0.003243270980702014 0.01082056072450697 0.002907875918292852 0.003194320570557104 0.01368041743096892 0.007059414604695062 0.006345949184651568 0.003394872886232409 0.009470570665304042 0.00583021681017375 0.003400942471284934 0.01253874907970835 0.007750859595279018 0.003205674086143058 0.002471445304418707 0.003271348945914272 0.003118227223640256 0.003143630207438499 -0.0006995330244147032 -0.003060559430188777 0.002534460751038781 0.002414596360762114 0.008128140304414794 0.004836489204068687 0.002590595940369725 0.004258071407566007 -0.003503013838351175 -0.003615005769117072 0.003528432462958595 0.003720038212911185 0.00218345824843712 0.006354523703947706 0.008809552566169689 0.009849028544785773 0.006598653403791879 0.009003344855565715 0.006939332715955726 0.002412457316428165 0.003141215684202302 0.01473199824206576 0.009767719302145877 0.008295580148384012 0.002409378643858653 0.001544923281656238 0.0008103435114100734 0.006073372763012492 0.01608307773028639 0.01466152478654005 0.005687529204536169 0.00717983287889968 0.01573262540920847 0.001801316790758836 0.01010118274666252 0.007027677031838842 0.01212710573188032 0.008817544891667582 -0.001998894254932131 0.006226582159193551 0.003393648315661448 0.04711145755767362 0.0006286015330373685 0.006782263713151565 0.003868207907183453 0.004559797953734825 0.007261669737421687 0.005596943139312778 0.004009140046172164 0.006408844601304543 0.02017549002111607 -0.0004244083591109135 0.01808552101613264 0.0100857339998331 0.05954135883229839 0.07204979174678232 0.05362421942433353 0.0320862736705588 0.02722521519129043 0.02199364018123472 0.000753275255505985 0.001085649395281039 0.006291387178434736 0.005712295261108566 0.004138497219196782 0.003814387117131221 0.004930286703498601 0.01747303280660098 0.01217702734486393 0.02008103133317849 0.01844903611669868 0.009658810352338027 -0.006736883270951849 -0.003696060358683935 -0.001875619462719057 0.003738661756434825 0.03749990837279713 0.06381914711317668 -0.0001183559839619933 0.0003818058409171735 -0.002376151576019029 0.006445941389299833 0.0109048139308228 0.0008126650078033216 0.01036840309367517 0.0008732661414812445 0.002776133544689125 0.009192190510226805 0.01221552535103509 0.0128559138392462 0.01085889797567375 0.01148845294471523 0.01125427209234779 0.007677270888193922 0.009231656716145953 0.01637763694156779 0.01030289059126103 0.01393698252976535 0.02028903374505851 0.01073625867386255 0.01046141829451937 0.00214065454224758 0.01949156920420231 0.008411565690446817 0.009274780533030791 0.02612410140378508 0.03717744570144654 -0.005682197490978825 0.01038027011527787 0.01331006975232819 0.009229152520003076 0.01905582323600492 -0.0003369828484351746 0.0030402074886699 0.005571027166032411 0.005810901111572603 0.01216962940396439 0.02660493848285447 0.01642985263645995 0.01792124309731998 0.01217213483054813 0.01801547908196479 0.01908960242186566 0.01088774801089918 0.0287899321456636 0.02864520041762877 0.02722237712325867 0.05701936500046638 0.01397240323840958 0.01158264153558826 0.01006609311879005 0.008187513373541273 0.009542496631930721 0.01224704213610991 0.005466865315540291 0.006168201576288636 0.007489924364998866 0.08795764529114133 0.01021592201000336 0.005746084226543112 0.003431361106676382 0.00681011679810573 0.00921088887859467 0.00804486245734024 0.006856029331868932 0.0007391129615679349 0.01015161793400543 0.009601392282854089 0.01343968182400412 0.007635397970733426 0.0112379610831994 0.002447998767090231 -0.006997150642526413 0.01290536370857565 0.007073685414958267 0.003067281252762258 0.002728058537458884 -0.009559050675995924 -0.02262338612616962 -0.008489972410224001 -0.01275002111818841 -0.004284024434671308 0.002572044343158733 -0.006349549017318907 0.009578540682774292 0.009264746071640927 0.009792268079286147 0.02230123900923388 0.01079829826165459 0.004832179551310667 0.0006206331237509548 -0.005023374922851201 -0.01197368398768153 -0.004269567545169191 0.0007106704057252943 -0.003310116442270314 0.03258948751737254 0.00467815555547551 0.005181800343837141 0.02564218693126822 0.03538376075408076 0.01228736727635731 0.01362183401177533 0.04448548106187664 -0.005399979906946711 0.01138167942811639 0.01869033549261113 0.01304907021222301 0.004536121433578375 -0.001874653460807966 0.001134455922539747 0.01385118046821336 0.01014820027948169 0.005271834075737396 0.0342281947956306 0.03474167454751963 -0.03243967942328549 0.0368619020277331 -0.002224957983039394 0.004946266093738814 0.05348156935149363 0.002731724670856202 0.003418854258126435 0.03067614588121705 0.03282201585907224 0.03168247986546426 0.001861139587056052 0.007820817483813886 0.005804832913834572 0.02689413324410056 0.0002316503438275055 -0.0003428085285772141 0.009257992421844018 0.05653633574460156 0.01716606334353994 -0.001145760529677971 0.001180371007969403 0.002051657928848959 0.002187310816609505 -0.0005020599394401423 0.000476004810605774 -0.003812420179662275 0.001984517184242352 0.003073513877856416 0.002927481387000306 0.005393953870017665 0.02422313646870993 0.003316500958158018 0.004588895282166076 0.04592560774513361 0.01880020982281881 0.03169472487836027 0.03511776017208038 0.02183006023315251 0.04660457298221794 0.006248306891259637 0.00812998698156763 0.005359425019231919 0.005364714643030728 0.04493469485945329 0.02009992082289592 0.009627899828973295 0.02026587523773997 0.01248543233576914 0.01258521001286449 0.03750734380043391 0.0035907972533844 0.06471202524852794 0.02459929139627128 0.01927943604042469 0.007806076765338907 0.00132937598156145 0.001015437116917165 -0.0004194284351416882 0.002266658125909566 0.0006629102026258987 0.005478607024286439 0.0007142112468711022 0.0423113772729502 0.03146385660794249 0.005030876304011359 0.004501751724940622 0.003827448239285078 0.002393960072933917 0.02104912095197381 0.003001889665584264 0.001393026687059463 0.01018984791034985 0.01224110665647606 0.008809182371595253 0.01327004311102318 0.01296994234394161 0.01504678275536368 -0.002888529978058449 0.0096105978815774 -2.719164998211269e-05 -0.006602215910564151 -0.004539691305434477 -0.00533115937395862 0.02005956075217967 0.01865229705793105 0.04503752720113624 0.06589687365156821 0.01490821174080724 0.06157191875874218 0.01043036690118079 0.06283917947763806 0.01098838075855335 0.06133718408651393 0.06614584891713388 0.01543285723435278 0.01249166761478381 0.01055101816377745 0.01611276875023603 0.009543635704378496 0.01106407325722806 0.01597846906944157 0.007464620772980756 0.04005514969597476 -0.002681271538689144 0.008053504182457965 0.00567157857668701 -0.01632064758073432 -0.004085300230127802 0.005562985705566435 -0.001882051669722125 0.01638536128539373 -0.01441577437653261 0.03895433320680439 0.000857634360250496 0.001351719864256139 0.009733315900653317 0.003447590961093789 0.01849616669551849 -0.00218761067111918 0.005217610151046646 -0.002049070017060853 0.003798043868170855 0.00263224022940853 0.004422579483697323 0.02142391843829647 0.005958082497902024 -0.001910627858832573 0.001603919115477581 0.003741767792008119 0.01681611136155971 0.0007988604345223601 0.001076712352939475 0.01840771564126087 0.0197258453177917 0.002016702606509358 0.02142040996522374 -0.003847985524625299 -0.002839641025778783 -0.001455772671847314 0.02114683400971017 0.01246094347037416 -0.004660795222069886 -0.01204555759455669 -0.0093406631274047 -0.01158255561052952 -0.001831615329348038 0.02096465750180827 0.00324147000305434 0.002498152783025556 0.003346212615578817 0.004589988139014134 0.01323157474774953 0.009136778298114616 0.001805595888635253 0.002475096645062589 0.00295384538627362 0.004128330146220552 0.003381434063680699 0.003704257829198228 0.0006437502833554917 0.08734525299299109 0.02089700132527592 0.02282144304652656 0.01101133426794187 0.02136537576950875 0.001250570435659594 0.01850174822999504 -0.01097985116494738 -0.01013016495222255 0.001320181816010903 0.04147293567770458 0.03193169919996605 0.04156488751650312 0.02818883048080368 0.02530728169981538 0.01963868176899851 0.0041586068887727 0.006460397078156878 0.06732007374456329 0.02463250488200129 0.04920003283819067 0.04570127302222443 0.03140852908684981 0.04168362300811829 0.03350145052509176 0.009410907223533558 0.004423751705037199 0.00706065790223597 0.004269922363216324 0.007189422845399958 0.006177492880356401 0.005233720479334558 0.005645737722844276 0.004657432237182259 0.05697244991782743 0.0365363272598019 0.02765825772838312 0.044831360254301 0.003396572880647181 0.00420624910468534 0.004019529688351179 0.004216723363507005 0.004646215886122095 0.004959785486979612 0.002137681807094935 0.000863016034039919 0.005875333948388833 0.003060594233737983 0.004001914766187008 0.001041183918507818 -6.258394859939852e-05 0.006247924486495611 0.006523762371308653 0.01042516392463633 0.006123720593513113 0.006877103031067053 0.008249711042412866 0.007358683577608217 -0.0005866566273031895 0.00646004320066795 0.01030808783721717 0.003886651099619946 0.004749398293182727 0.002738221079578236 0.003036091304618619 0.002800408652492494 0.003879005822754251 0.00546580201682133 3.042266217338199e-05 -4.644163715525621e-05 0.0005781684398459205 0.002230515404716386 0.001962668958227763 0.0004213749972802588 0.0193863961020518 0.01981615664529811 0.02046749655063008 0.0183864455143279 0.01628594930967859 0.02184286727850612 0.004606659003129685 0.1454506883785247 0.03771355111939288 0.001424885518640675 0.003780599181770152 0.03515325497696732 -0.0002624110560200769 0.03778893654946246 0.003258030647891443 0.02004801296783723 0.002870499651309067 0.009790484061719732 0.003287233287487341 0.003483320579042592 0.03712796351130393 0.005494336870084966 0.06358668537724954 0.01013743643025604 0.004873207099653596 0.01124658400622441 0.008778602632110673 0.005565789410655273 0.01401304976295557 0.0253373748981101 0.02805805439223997 0.00768722088595156 0.03059156044196924 0.006035904338380724 0.005340143717705962 0.008625997025188809 0.005117459894458355 0.02751047290966921 0.005686572662697074 0.02482194538267809 0.06241090170903443 0.02685541657593585 0.01021198088036783 0.035847091553437 0.02193962307978639 0.02036351604336247 0.01714564890108236 0.01515003420812711 0.01267624052528606 0.01303724172138287 0.0121591545864144 0.02210314974779648 0.02352927851334759 0.0173356954077746 0.02996649449290489 0.006849532429102238 0.006044442505982897 0.006809102564952854 0.00777696477640746 0.02268865356094475 0.00668992523346131 0.007763162113509241 0.008695756663169713 0.002168335490857244 0.002535051757428022 0.002799949319526472 0.001756520621219619 0.0212218981256275 0.02103267024590957 0.03565080400420555 6.082091574718375e-05 0.1011785138487392 0.0009544925903064229 0.04343248106673052 0.006819918342781136 -0.00431356536931062 0.002906193527522853 0.006032585731487 0.00372875332515527 0.01802051564874787 0.03397303852392199 0.03823914713497211 0.0290155357597322 0.002634863581308329 0.03095883493464144 -0.0005085749500261007 0.04682420065500449 0.03228852755073881 0.03649578412148106 0.03061045140287309 0.01205191434488998 0.003730714964707669 0.01342575461355178 0.02098876563861489 0.02472951027036855 0.023005568020039 0.01559073581044386 0.009605521330967433 0.01389960526593883 0.02501643297542098 0.02724792129849197 0.02135630105965804 0.02255224854008191 0.0124866591570874 0.01840923887945325 0.02830790057040187 0.05665547874549525 0.002216400379189879 0.03866989562448507 0.05254934390168137 0.05917758294514174 0.0534014520059812 0.0108456494366971 0.004661227327588344 0.004076177780723811 0.003716767945184254 0.003846345507526367 0.004353558667328936 0.002982355016216628 0.004505889853465972 0.004769967421955403 0.01413431044332937 0.004705189973597597 0.005408116118139651 0.01474036614554307 0.01216975933003527 3.701923450223625e-06 0.01296181690278722 0.000347520791129974 0.002695357782959246 0.001811193093188795 0.01243342665945261 0.0007325312318733251 0.001872139409822916 0.03775612925536636 0.008397167919286165 0.006054368706190511 0.03359644115213158 0.008011198617525949 0.01119384609199623 0.008190218515229894 0.004635703434848377 0.004300880359405678 0.004657043290391112 0.006993319614446437 0.114974977025756 0.009052491803936545 0.01055320613802082 0.009516161535538973 0.01052300570930015 0.005969971338921377 0.1095892138018587 0.002774816478588623 0.002592605673180065 0.003721421996816383 0.00278890119431418 0.003734817442536484 0.01133722718832995 0.0005365440139725062 0.01028546610128799 0.01024553149449126 0.009488400563015222 0.008538422794412451 0.01190915576601391 0.01001065503750359 0.01151472492014373 -0.0007576961908688209 0.01270568318146216 0.005049394110938014 0.005140342053049998 0.0175538529966885 0.005450789192287005 0.005541250247928823 -0.0006018145361752749 0.007148821959819819 0.02834624893495332 0.006399921967467749 0.02334388085132644 0.02868444147764931 0.007722871218725948 0.05354344656957224 0.0002353910133767526 -0.000445501577834215 0.0004353770388492825 -0.0002411088606630573 -0.0004023962901036184 0.001552986684586134 0.006368596330234661 0.005722681797892842 0.005107061756183094 0.006760653882470003 0.00577570747250744 0.007472713884674265 0.007942286022072236 0.004657455649992637 0.009043198354386731 0.01188644738480435 0.02691600416659908 0.0003659832566519903 0.0002308867602209359 0.01368053067724918 0.01550444303021189 0.01794736163657153 0.02077286009829793 0.001568280370752648 0.001757704902494561 0.01568482297045725 0.002205712159513541 0.01582929610464209 0.01766495910636002 0.01913032094132989 0.003587253365244534 0.01171197953896146 0.01543130055941542 0.02205090157488641 0.03228805166773064 0.005801133572075693 0.04217954154396744 0.003440774451192857 0.002524166141029774 0.003373089370054088 0.004115864168856467 0.0003745306675046207 0.0372323985089154 0.03444732037356008 0.05291660448879713 0.04431616216952203 -0.0003828982704186825 0.01802277443980238 0.0144265407106327 0.0001750009677295924 0.005674021156036886 0.003433755750544096 0.01805560272913479 0.01679842236050723 0.01766911202723133 0.02081400178859534 0.02015859877389583 0.04429120714760194 0.04202728613045585 0.03128223918534589 0.004790387183047212 0.0428445550297854 0.04646668352569084 0.01136244772762587 0.007319171843883926 0.06147008369386427 0.006128995899456871 0.003462345265875847 0.001674493909236001 0.01315105191570019 0.04555173154257912 0.01699871232853157 0.0462081047411431 0.01354755018385266 0.02834118179600795 0.05628947228383682 0.03847852450712529 0.02793707302686954 0.05019058779434747 0.04613545529304731 0.006216669674353111 0.006998174594801064 0.005834193526423689 0.007690516236411642 0.05590596724482572 -7.571155812077599e-06 -0.0008457804056303996 0.0009209893623127818 0.06213863152877726 0.001295025619926218 0.008413512100267291 0.005989376378435455 0.00247895762398982 0.005673542291461238 0.005095996851907317 0.004826293890971007 0.008540824267377675 0.00627123172620294 0.01129231031691367 0.008943612387647026 0.01798445737099719 0.01310375122030847 0.02848693306779823 0.004229728572598354 0.01508139074663531 0.01875354029117453 0.006634096364797297 -0.001121149163645243 0.01171817044650449 -0.0001094304803883932 0.01090542521279375 0.01690795073252347 0.01231300433407529 0.0123952988224542 0.04136603008984063 0.01291668224241042 0.0286985462731563 0.05049482597845272 -0.001517914151042968 0.01496125757250682 0.003589694853174453 -0.004806347690990046 0.05229521729872763 0.07763329973248949 0.01318674742512203 0.04621229938128155 0.04486600986405982 0.07976885555520001 0.05980757189994518 0.008118243465622744 0.02287247746679257 0.0337213701735558 0.03511064433681693 0.02017736086026309 0.008373946857378221 0.01430475810079382 0.0114623771224773 0.01566541123186885 0.01429226230785708 0.0415660064596871 0.03341935773917205 0.05763861514442511 0.04888300733384458 0.06803984532479214 0.0619830160314516 0.0513435182955958 -0.001595728589192469 0.0139476477677798 0.001279625677846407 0.03004628627514747 0.00592487869994957 0.01706811215920293 0.02129056475616289 0.03013212648285857 0.03826628465933742 0.0334313048019847 0.001602948034181183 0.03845678145522476 0.003289250526660736 0.03128641459909835 -1.83034730107414e-05 0.005449154600320111 0.01575772339118525 0.01875239409259679 -0.002634978195558065 0.006683230065256552 0.01244004765189035 0.01606354570957119 0.0106892594739529 0.01730739965080711 -0.0008422485048710074 0.003544897703901702 0.007884055543925928 0.004331901685441525 0.01385801259374747 0.007305769008811156 0.009145286897879456 0.0140254033648276 0.006811905473101742 0.006171183845580527 0.01113506805023535 0.0338020473480671 0.04943972444420561 0.007365142350615345 0.02752069494060558 0.02593494449145322 0.03046054057235731 0.01807147880346306 0.01972526697818124 0.03946407249080819 0.03694601200197455 0.02288518729196667 0.02293138625009187 0.04559872396848476 0.04979910129734922 0.05248729794374741 0.02724835810649013 0.02901807890577683 0.005581909451670952 0.03151632120918842 0.004329737865297046 0.02977795728089058 0.005806336230184846 0.0243157344100235 0.02854186991939917 0.06263594925855005 0.03405345346074844 0.005618020080964934 0.03182479053560791 0.02683017007749621 0.01086787019930325 0.01985495619989532 0.01912685196615175 0.005701082239676142 0.01893151058450629 0.005072979828949198 0.005644694272418076 0.005874189740403159 0.007433292454993458 0.00877377171475174 0.02864939001207283 0.007565181659218297 0.02916556265652095 0.00611464325173454 0.02687679725128056 -0.00287277109221211 0.009427374075693707 0.008319605943543021 0.008762515099181193 0.004124055680397032 -0.003820622018232553 0.02357771568051634 -0.009299553553483447 0.01312915718622058 0.01461958666308323 0.01939899759602951 0.01528475911940254 0.01587669076622093 0.01815839342851093 0.01748474421930326 0.02355953554362077 -0.001063660978446732 0.01708771066349923 0.01476071770196045 0.01648089543497578 0.04037663961131723 0.0009931593646840316 0.002285798903826204 0.001792395677537916 0.004172722849820712 0.008267242518266611 0.0008251359996218279 -0.00288857699042325 -0.004336344310247617 0.03464935072440206 -0.00528366540243517 0.009916694297010054 0.007901020457586682 0.01243977366830929 0.01058018585543662 0.006749069301738352 0.008891804758073057 0.04289322467530655 0.04280000285504958 0.04232529924908022 0.02315043551678167 0.01843944024734469 0.03852896425152131 0.0274877173826464 0.03363266077059177 0.04058031288122693 -0.01806882778998575 0.004159331564595665 0.001408069136497921 0.000257883774856504 0.004424282988099583 0.01841835761560284 0.0132314801369931 0.05562184097496256 0.04825396272290781 0.04058158173907635 0.04749593324667836 0.003056950835046446 0.04552374549443809 0.0283743891605353 0.02430955617050061 0.02568676491459356 0.02040516225300398 0.03223792915976073 0.02612641915491459 -0.00291524827974528 0.002117596254486926 -0.002570455896150222 0.0330944832307583 0.03092588088884445 -0.0003828919043935678 0.03017675003374743 0.09348691526597801 0.01876159309310643 0.01801248560533426 0.01809005345515992 0.01722550221584455 0.02679317384537795 0.01160177742196197 0.01607869054692173 0.003051432449265231 0.02134798805635014 0.0125069129169694 0.02122493796640899 0.007779064138616156 0.02720846954342611 0.01662633308429603 -0.0004735718856831776 0.0004772402016690796 -0.01248641831858863 -0.001563518543857442 0.0639961260607631 0.01569689096844639 0.0001491548228640629 0.0009897975441529145 0.01761762562839467 0.01375989175756854 0.05095874186508142 0.100018699038397 0.0925843226762977 0.0006999525852284551 -0.02353723484312681 -0.04296862164559875 -0.0559658482305093 0.007246762251408858 -0.001828399856712215 0.007476236608312086 -0.04522317601736515 -0.05994017227855295 0.008135845643685941 0.003692925140537112 0.006505950557220902 0.07852501722583355 0.003875775227731792 0.004327515860291331 0.002980106713229948 -0.0008635454960515909 0.0004194214945200299 0.004256928264684532 -0.002807661906202258 0.004207945559150504 0.004630284550557878 0.06005467420728604 0.0006813144444818831 0.004196288590427468 0.01278556425813772 0.003532158980434315 0.00138469897498022 0.0009739203661324759 0.00161571484811506 0.004938672733481387 0.002359210143600497 0.002556767560135281 0.003250223292796895 0.0008802200197792901 0.001421469927947913 0.0005349657811799237 0.007558241905736026 0.007276763713742865 0.0110462689933136 0.008543330551789683 0.0078003096728391 0.009458481109358336 0.01884242747212134 0.004446546959344155 0.02456063389151549 0.03054890706667697 0.02359603118070859 0.0228475144544455 0.02252795975759705 0.02198426218565582 0.00395926808059585 -0.06697726113872342 0.005038354008509697 0.003315133944943721 0.0237518450316422 0.003452634002409328 0.001287989201767893 0.0007608649880916481 0.0006763691772709103 0.0001302969795073797 0.001028677597135945 0.04052056655678826 0.008935255043375863 0.006081473738256821 0.004104218896608046 0.0005710122683851094 0.0004817431042792524 0.003232911279919453 0.003060500749636964 0.006904917556430914 0.007095184141479314 0.002260171879485066 0.002295737085109007 0.006272721388780575 0.003563502544678425 0.07009720613561274 0.002704864652303789 0.005093131628925212 0.003569120113202258 0.003362220143763832 0.006328205294172582 0.002457913183424388 0.00333558693096724 0.02290737852484395 0.007289563715310003 0.04827636136347932 0.04756039467107857 0.0616276671134111 0.0492469921138055 0.00233245428690073 0.002188854984335566 0.02491675688561808 0.006208241618382964 0.003197508832831655 0.02490852224886071 0.004959494889286578 0.005543246942749281 0.008888086985857959 -0.01290197266326043 0.00934369765022041 0.003784722288560721 0.02448646039824315 0.00930664116206424 0.003249697719807896 0.003393005097939777 0.003511527962098982 0.004126561870179097 0.05470556161283193 -0.02554724239617173 0.1394221380701768 0.1237719974681262 0.02486187314677156 0.09200698111496883 0.0007428079670769791 -0.009688537365636031 0.1115341426373926 0.09176492224610024 0.01434349558270076 0.0002808176667669833 0.0001266996245667843 0.01938125299718734 0.001157342066212658 -0.02387720456968284 0.05488616237999024 0.04228132915861051 0.002367963207306954 0.002951571535775991 0.007406806860212129 0.02739835989020098 0.04200125674961135 0.002355772285085964 0.007067454490409792 0.007089423773634939 0.05674213543040083 0.02848546965902709 0.1115617580143437 0.07413294965112871 0.02952141024634254 0.03990835850482097 0.06196344202556723 0.07350380636096263 0.06295478275461001 0.1105302495438774 0.0601374764918558 0.0106243761352251 0.0122947778203064 0.009915130089089801 0.08531080751582205 0.08392616600849401 0.009430272589591336 0.008062198523582644 0.1625130296926262 0.01852544796957821 0.02840777759644339 0.01738092970049219 0.03177047499151858 0.030952903992573 0.02198118634837448 0.02717163487456662 0.04426590620146598 0.01217377988901367 0.01403804068333424 0.01470683544543422 0.03196192984679936 0.009322245546940132 0.03154067858982956 0.02818963571189225 0.0160487856350333 0.007739523613344404 0.01349307301424419 0.002025140505863908 0.002641868441618862 0.05650109642231316 0.01514381308471335 0.0138229888772564 0.004818954778982774 0.005471102661904244 0.003638954104545494 0.005560258938118233 0.08053473665304652 0.003660679127072063 0.08025840306213618 0.0004480803480315378 0.001171214790553162 -0.03939421046508181 0.007799793672446102 0.0004845896333020976 0.0004875303742990009 0.004048363943855048 0.000416704451407013 0.03577006127085151 0.0501845196811543 0.03146117163523845 0.03168411295767449 0.06548543597302678 0.004097323335311384 0.004167736684542959 0.004343986412654033 0.003221449160473515 0.05203999744201815 0.03773835409674455 0.002896526536860296 0.03542846205592196 0.002169410127656161 0.01074251897131848 0.04916677057210151 0.01137757646495596 0.003633421997706638 0.02909305731110956 0.009353462434551461 0.003117178433781426 0.004377464854412547 0.04287573663872564 0.004123014128402661 0.06373623179798128 0.002788026933096844 0.01197459952737225 0.002316355373114335 0.00226607459370163 0.002015829466438647 0.003591376397776265 0.003787728714520812 0.003660229313001841 0.004113585830809377 0.005180819303503327 0.004549647788912315 0.004730668766183934 0.005401690986402139 0.004704319620396683 0.06846069140693938 0.05074486341326385 0.00222329023868047 0.06287967459733526 0.003919491141485134 0.004775963942339066 0.002588232634958524 0.05091040337111713 0.05800097214271115 0.003031923477737759 0.002779385903983276 0.001651811511645795 0.0003132178409696033 0.003196277162322464 0.0003435026562879715 0.02926122171580695 0.04011707172382604 0.04146167424815861 0.03851579358485507 0.00497315220241897 0.00534531452835553 0.005088207317364103 0.005011849831073628 0.03867801705042311 0.002744773983591076 0.03731922889933304 0.004599616517515938 0.004880351186520481 0.004925182688918895 0.01477854150528544 0.002129411275298973 0.04057475614029074 0.04759074752705299 0.003151100897828911 0.00421908846180863 0.003378332624487193 -0.006571609220715693 0.001268977807263161 0.002370322317217427 0.001584252585729358 0.001148047564053671 0.004679100902413914 0.006192058106192735 0.006023857751100941 0.00182121062588654 0.001525489106907299 0.00142775248159464 0.001312872326774071 0.01984634555703536 0.02389340841595859 0.01631188737292055 0.01477895463646192 0.01903984109268816 0.01415579134087498 0.01560811609503014 0.03057390376431078 0.003419320607337823 0.00711552246936981 0.0003981110659043341 0.005998532698799215 0.01351006286228603 0.0154717756411249 0.01962203350592516 0.01212887328910454 0.003232919491884335 0.005771287509724525 0.003724123418736561 0.006167596619276885 0.007790204577653501 0.0006371530474178329 0.02347418578712012 -0.003133160743739649 0.000523656836228975 -0.003994679473503867 0.03206431520907532 -0.001178989380195265 0.0003875270235524328 0.01078146458899233 0.01267629540602994 0.01168322395510207 0.004393589832268535 0.03725504745615757 0.0518395205088964 0.002408079576574617 0.009194686460286297 0.004471146224419304 0.002445463272125146 0.004760508725909001 0.01071886497698655 0.1546278963514908 0.002848502869949025 0.01130005965752097 0.01465484704451449 0.008534812342147624 0.007505000720463294 0.01213438202801492 0.01099477577874132 0.01291916397091211 0.003345717926236903 0.03729038854517874 0.03189054505210467 0.03344562798758793 0.007088192284734014 0.03428706254028981 0.007073100276120175 0.04031556113388841 0.03676127430581805 0.03948869094179922 0.009441376956158747 0.006314886480514678 0.009587122043333259 0.07849099499394634 0.125438891192279 0.1237659427031323 0.006903306646316258 0.1297734856930282 0.1404562290708539 0.05864402431940417 0.04443026588733449 0.007607581934794955 0.007080804587580071 0.007678491578387163 0.061976628863242 0.08317213669670999 0.0902204526522382 0.07888412884792166 0.07613051232030114 0.08053758394689478 0.004623180311626945 0.007219549353645017 0.007368603212133249 0.0730976754499334 0.004657830239501321 0.005109890628670685 0.005083609941357722 0.00489549324842688 0.00446491105447077 0.004993189208908099 0.0145623680506825 0.06320574340982754 0.00745492939905583 0.04114443747524926 0.00839267960957441 0.00840272493645299 0.006593931672107702 0.001470671989463297 -0.004492567560845737 0.02961957644100041 0.001022396314523525 0.004267045208672497 0.0001621918347654863 0.003806210289248892 0.004614943320670294 0.0006845530152197632 0.0002036839146836958 0.0292481253647542 0.002735693493589161 0.003385649287875573 0.003813022467884139 0.006055999681280425 0.003872362118153499 0.004347323956205293 0.003116124442172661 0.00339180671472657 0.003419408980483566 0.003115390666372038 0.04906335642149085 0.003713489791337835 0.003383500127964748 0.0051407628203846 0.006433899513396824 0.00574498741689941 0.007170065435714877 0.004718103837339374 0.0530033659277877 0.03158335463079501 0.007546472067928108 0.005936758442814074 0.006302937081283774 0.003028993041344972 0.004833293142700294 0.004301510139224546 0.003457005627089806 0.02885831746476251 0.02167900702165779 0.02318305323301942 0.01667148209731313 0.02145013325631521 0.009942052863340923 -0.000289600700101102 0.01309215924312542 0.005481728624752171 0.005883188521109872 0.05069047870308005 0.05992703436120466 0.06133173949731537 0.01643751274801799 0.02153362422975756 0.01759691768755744 0.02245720084953104 0.00971752871938753 0.04075732391606726 0.03884309760761952 0.03500814670390483 0.03342693221435906 0.01058493362557634 0.007919099436632803 0.004971809235414715 0.009894878179060705 0.007783028987591673 0.006565866000359853 0.009450071797663826 0.0113960566671779 0.01182000648320847 0.01146309921136615 0.01245802257511926 0.01135887048866172 0.01150818606559872 0.01124085907828642 0.01117923975895241 0.01179488771713227 0.01467968079199183 0.01102655115314781 0.009394570475316192 0.007932460913786932 0.01143241733859711 0.01203838039688048 0.009836925332254885 0.01591892234826455 0.01516306308254904 0.01419342781658169 0.005348320917673107 0.01978975915446334 0.01935418036018345 0.02657677313013808 0.02594377075444577 0.0284375631008974 0.006186218363880833 0.007525395575027767 0.007139710016239742 0.04088538266624185 0.03395753698160507 0.0008673958381171995 0.001210052036358077 0.004352954651013978 0.003675604083389165 0.003166121174802907 0.003423506535958873 0.004708040618425877 0.005181051196973265 0.05067278982491166 0.04193887244021301 0.004031973826210838 0.004907819895177632 0.0002717382324733635 -0.002662192652216583 0.02163637620753139 0.01045586647927148 0.007215188726138569 0.01571809699835996 0.01569469486703287 0.0180555291184367 0.01038007082661269 0.01273419005982965 0.002827810253130244 0.009806970129565995 0.01341680721956308 0.01249020349879522 0.01012702286617316 0.01311731000161219 0.01935668739536229 0.009707186996248271 0.01037669546881096 0.003506683236290431 0.0161873891077979 0.0349912812466112 0.02478380222153317 0.03281204372478562 -0.0001606578248188942 0.02334170305265339 0.0100259830405758 0.0008197356703842452 0.0002408658858778753 0.04887880205755957 0.00980944189974277 0.01009869246201881 0.0241367679956667 0.002292800835128004 0.002521614884540562 0.01184779802301973 0.007359479784164367 0.01073689748119435 0.008741668708942239 0.09682653382152513 0.00692574621042222 0.006674474632218667 0.01996711810288308 0.004947672796584405 0.005110414927840364 0.1006410078230427 0.1024584996455803 0.00423110132016706 0.08508678317883885 0.01581914224288428 0.01396113875206152 0.00503365541198715 0.00754362269857266 0.02350138822445763 0.02969568749325905 -0.000744677056198813 0.03859997527302624 -0.0007680988828439476 0.006194265560725599 0.007970142604290482 0.007882576972317701 0.004689085987785752 0.002183317788523834 0.001635773568701815 0.06420313400559442 0.04118019432011265 0.06288125810319918 0.05670110974852611 0.05270911738706058 0.0222715723860748 0.04268579690871402 -0.004354683642398511 0.02425135628656843 0.06381941746216374 0.04819858554618333 0.02917331940347742 0.05422152601849057 0.1755746987860011 0.001585194186577535 0.07233142612535429 0.001562802950286871 0.001793646714502189 0.00843999978299104 0.002078243754983525 0.0003161119528607072 0.07153791672492361 0.003079263217396428 0.002877854428321303 0.1051442817068318 -0.003938748456776588 0.0008103224486755469 0.07742015629392233 0.02584735049612025 0.01980512219112581 0.01479417825001013 0.04737615945182313 0.01727529740362358 0.0250233574760429 0.0246488675731775 0.02470422064161148 0.03127322723278583 0.02957541516180533 0.02454356832211064 0.04588887183994733 0.04339655005454132 0.06257897831819341 0.04584825724168862 -0.0002316533223750634 0.01498017151719452 -0.006959242770876313 0.06652297916177292 0.06832765360944996 0.0662223487870094 0.05475017641660036 0.05981104827643375 0.05848293940840264 0.0004171103950073358 0.0001679008608386683 0.001611883399819078 0.004071419100425814 0.002515306118379266 0.04784095277324021 0.09286839969904379 0.03110556508763932 0.02067299678624825 0.02700077640525483 0.03520556882167855 0.08060706692810768 0.03060049529604802 0.04068142579601515 0.04171727666369292 0.07784946310259286 0.06805972227890682 0.01582115166512874 -0.001095966466565993 0.00313022374551429 -0.001119241943340048 0.001335424298754589 0.0002626397395122759 0.0004721248752389716 0.001380256133353443 -0.014314688905833 0.01433509480714186 0.0154927896623147 0.01372979026179873 0.01465960903995451 0.01829848218951239 0.01422011780443184 0.02465259977354797 0.02313285727749859 0.002407476370533587 0.001270998131848386 0.0142748396502964 0.01403941069659325 -0.003496076359275445 -0.002177911886825153 -9.448050411646057e-05 0.0004633190941035605 0.01791032790430738 -0.01991316140419361 0.004977563242064935 0.078665263965678 0.08515422759684216 0.0007727159272671007 0.008720344515829903 0.007740381465421131 0.00980108360749078 0.006666647558954079 0.01078846367178654 0.03976400152877051 0.05554195733283324 0.002128947769936055 0.003325866752345468 0.002369494596579859 0.001149385827497412 -0.001515298368342833 0.01675236672073192 -0.001698893461374506 0.01347163426693529 0.001816777167969148 0.002286714694485788 -0.003138613296043371 0.00940026805998399 0.003346196887375522 -0.004174011345246955 0.001041892490205697 0.01381221054659402 0.01430207973239386 0.01384232679538587 -0.01238910905721862 0.01971601744922387 0.01666008872400153 0.007871437678267765 0.01831023573248754 0.01670632576765347 0.01957506770876809 0.01994771308215012 0.0153765808368101 0.06547435513861688 0.006459022511865992 0.01328590640203005 0.01122964813414136 0.06656003693100551 0.06836695950745761 0.05236407751988544 0.06367668532741308 0.03862186304515345 0.07800119869852859 0.0008936633884540971 0.0009533843963298091 0.01267859842764401 0.0008570959249830001 0.005122121233647607 0.0177260874144298 -0.0425642726402554 0.043088943545794 0.001195177585640988 0.003186185279037801 0.00362874407956365 0.0003657809125425551 -0.007734991752522844 0.0151974576760786 -0.002150244991802546 0.03714263523592247 0.0309993979427775 0.03725628718855994 -0.007850137702989497 0.03538386579641182 -0.004750732312549783 -0.0006658143387141998 -0.005479590459879511 0.0108575362782969 0.003569022914370472 0.01375051783997875 0.01207098152895121 0.001764174052786257 0.002730923815198048 0.06311235079530968 0.002243064241160716 0.01113460476844037 0.04817151820288469 0.05147094257314491 0.002445554772761595 0.001933388180237741 0.001611549643022036 0.02513046774462744 0.03393504579932502 0.03084697985761037 0.08132342560441799 0.01787678554260136 0.1110643752884847 0.06204632906937058 0.02020227370877974 0.001478092604671541 0.0188085331058711 -0.02679436357513755 0.05319680987071933 0.05105910304568568 0.01351407071777714 0.01491137027694539 0.01390424574331765 -0.00123008432506617 -0.0002327677174053617 -0.01310461790793351 0.00769657513636551 0.001427178588205573 0.01540739919602311 0.0677821514074954 0.105132896240224 0.004235596027014197 -0.008899444872947734 -0.005293163191358595 0.01136009708775835 -0.005313540958066095 0.01069191045540499 0.003757450668346627 -0.001438814659012583 0.0004208127561498738 -0.00795313983108081 0.002511032952539766 0.0008732553972991525 0.001157656664970615 0.01432160578100516 0.005248741687224511 0.00475548510494221 0.02112823207410593 0.005570574147321358 0.005634364427332866 0.05709493075494287 0.04738375757087917 0.06106733691674431 0.01424151890448346 0.05208667163887341 0.01284500938571738 0.06105652469479872 0.04866564456219448 0.01186561570938224 0.01108629559159987 0.01013256327103617 0.009074437303589573 0.009956397677859467 0.008958481539759372 0.01818070580854484 0.03891891055897714 0.01796171531167319 0.01241654529654896 0.01420070713108388 0.000753723378867131 0.007075082241573872 0.02663314262921373 0.01135183005768216 -0.002319266188915918 0.06332009075377919 0.05261254073357371 0.07698166212755421 0.07629561926632897 0.07261200852168362 -0.003749872816984704 0.009351763225429362 -0.004203924662852123 0.01260208932685597 -0.006607446029836796 0.01714095981587543 0.008418136184478833 -0.003371083215793803 0.0308065482840986 -0.0008693421468152498 0.05655372034267049 0.01466569952902869 0.02979032665475216 0.06162840134024541 0.0525474711942503 0.03393900078433782 0.05588391197717692 0.009776314564655744 -0.003911779621766851 -0.002188248563880598 0.01866001307541756 0.04896958613780451 -0.004436930182434609 0.05397127194170603 0.06647565928393871 0.04528741819593527 0.07877418302594436 0.0602534713008749 -0.006961137836941658 -0.002188459519403381 0.009665181635567628 -0.005934976264456487 0.02971264323127918 0.005381548219269614 0.009303106219041847 0.01029783830581052 0.00895492249621632 0.01089277162618285 0.03065328959058993 0.0265177263103434 0.0007866675122339565 -0.003739886439571542 0.01784414516244613 -0.02140554794095276 0.02769908431886516 0.0236229616032255 0.02506551392685157 0.03571172516223723 0.02663231668128853 0.03824112613958314 0.02888321018997136 0.03011070366381569 0.02649836151047844 0.02904143648729825 0.02541631119051433 0.008327057842616158 -0.01130964778096335 0.005503098396155273 0.0118014001281189 0.01821846278870015 0.01677542750635651 0.03050355981232697 0.01259465696804445 0.01310270687124487 0.01486771502879319 0.02292924065305084 0.01752938141623172 0.02443177441158693 0.01468990669146016 0.03729396493532493 0.02800713961909976 0.01431763033701579 0.01918449168770433 0.01838122662932474 0.02027385029405604 0.003046104370668506 0.0003303987494297936 0.003656945125390242 -0.006334354698319825 0.003525186307909051 0.02290086968340943 -0.004726574490820374 -0.005824683234578232 0.02435656075122951 0.01962824615842836 0.001438372946232475 0.005001112642586444 0.000162996178225434 0.007923640517080345 0.03166659153068166 0.04326636801417446 0.01863528714642906 0.02693276870292071 -0.007117294903688178 0.005999307119099485 0.04440807260943668 0.009147710426283545 0.007861644242219308 0.04861078810681456 0.06157483486213969 -0.04317390694830109 0.03494082142295139 0.01551882656564562 0.03201454513645274 0.0362720271856218 0.03630687041433462 0.003324722855330665 0.04979055249997161 0.009965803873953131 0.009752809863814492 0.04769515418296438 0.007537454333140695 0.007089699488668272 -0.02546572127010754 0.01095511154175545 0.05193752992805388 -0.0005356750407000242 0.01698666181870116 -0.01109200177422297 0.006308120007702908 -0.005419660537457985 0.001605518468404504 0.001266423749576308 0.03105041074927496 0.004814218480953871 -0.01420377166342275 0.0469635525060436 0.03060999565414927 0.07021859178625919 0.01586549793939681 -0.005010193026933616 -0.006814499611371276 0.00355917779185621 0.02955754083631497 0.01722212115463796 0.06338879070903757 0.07860621311063146 -0.0100377076442403 0.01994848871323661 0.01365132476124668 -0.03039455748153232 -0.02014023473452459 0.01437445453752126 0.01253511081191608 0.008887470188399717 0.07523159810824337 0.05648283816610354 0.02546345362308139 0.009777732476274099 0.009182372644586372 0.01402606341432774 0.000841492982723795 -0.005745716134684586 0.03550494320783869 0.03355694372550257 -0.01465365966552566 -0.00851903393510365 0.01515997838350244 -0.00703631929274078 -0.004108781640835848 -0.04476756025706395 -0.06721410506424856 -0.007122074366478792 -0.006954373929264293 0.04796865286228036 0.0480166796544493 -0.0007615108388589255 0.0005498407246358304 0.03775916316300605 0.03546967963966927 0.01743272357980247 0.0001935034268892387 0.03185859769188902 0.0002736863403096934 -0.00131219402277358 0.00203484268138001 -0.001762608936541916 0.008504475225196619 0.006967927354769162 -0.000239674176312729 0.01857536362754392 -0.001025431425715312 0.02262269017263041 -0.0002799448448737039 0.01649594925761861 0.01841076453912588 0.01587888923714709 -0.0006139302801555072 -0.01914447597939483 0.01698632107229225 0.009885405990021384 0.03928446666425065 0.002936001732740417 0.0100714119877871 0.007382221385997439 0.005698576564088713 0.006355356714589756 0.005482450095297508 0.0237367404923715 0.01997765885931623 0.008506196911365069 0.007452476292901756 0.006778658197078226 0.02383947333853242 0.007394066573413858 0.007860673064090952 0.02158371418292057 0.014848256966898 0.01219292961585352 0.01154133817986956 0.01393278496071691 0.01100865926834706 0.01635019344178078 0.01314215008404363 0.01307288256687715 0.01442023844893312 0.03186544573351444 0.0265385743677901 0.03182964202848869 0.01326489123275881 0.0378098156264531 0.00878147357520831 0.00810155396509084 0.006010198438410107 0.01249028533620741 -0.003476653390768212 0.01131587433773721 0.001354203250994995 0.03169554997458224 6.969941969154496e-05 0.01417771134199553 -0.009638598876497814 -0.0007412361234650404 -0.001510502972940498 0.02076218376928523 -0.002734023099311721 0.02181195329314145 0.01422673875116921 0.01278379880024383 0.02444788930136097 0.03047398408011068 0.0275721795083653 0.02434020406469045 0.02297461683105733 0.02081668368020764 0.01281998648609921 0.01342027638897239 0.01377489904601981 0.008600044447733598 0.006467510672441292 0.007975477998366329 0.004428241184903924 0.04400151219112203 0.005321379694813791 0.008121644466057778 0.007558462507559732 0.007643897922910007 -0.007034938370892213 0.01800526069211009 0.01899524912289387 0.002748444438048719 0.005027880656960293 0.00678662639061086 0.005969233040520674 0.003060978335699424 0.00465536817517698 ) ; boundaryField { front { type fixedValue; value uniform 0; } top { type fixedValue; value uniform 0; } inlet { type fixedValue; value uniform 0; } bottom { type zeroGradient; } outlet { type fixedValue; value nonuniform 0(); } back { type fixedValue; value uniform 0; } peak { type zeroGradient; } procBoundary2to0 { type processor; value nonuniform List<scalar> 925 ( -0.006091898498632676 -0.01511137060178893 -0.006091898498632676 0.05005457683683729 0.05005457683683729 0.005780403019812344 0.01600523962429636 0.02154498079707978 0.1041601100608429 0.01237197931641803 0.01237197931641803 -0.01249308490334119 0.005780403019812344 0.06155953423152461 0.05885707666347582 -0.02464940921610036 0.03674464649489235 0.01600523962429636 0.03814191277310524 0.1028523877530531 0.03516283563628054 0.08930788171977591 -0.00476552351279532 0.05465791159667035 0.05615954328477262 -0.04946062112843016 0.1457444149814922 0.1457444149814922 0.1282587645948665 -0.0675699760567517 0.07803099159391561 0.07139730344629193 0.05155497943998338 0.05155497943998338 0.04167493104043939 0.03388811251611622 0.0057328423750251 0.01260131766730246 -0.00302256857963687 0.05130877842657685 -0.03935182273506304 0.06087615203917495 -0.001634378533004835 0.0765185478267443 0.0765185478267443 0.0828975379747135 -0.007139837377173979 -0.007139837377173979 0.06836899125927133 0.164920572048811 0.1533530256664428 0.06876801377281412 0.0753604703701977 0.0739085940060433 0.04955875190313295 0.04955875190313295 0.08638020370693773 0.008711042209578121 0.008711042209578121 0.008711042209578121 0.0664498956780154 0.05246347575312823 0.01377027535324275 0.01377027535324275 0.02762051063833807 0.1816246172081971 0.1816246172081971 0.002377280149095711 -0.02830408351684455 -0.04489521601301675 0.0323405200011429 -0.01032111274851905 -0.0132792154551284 -0.0132792154551284 0.08290707055647416 0.05594937208347216 0.05087061775807059 0.01913777298850662 0.01913777298850662 0.02751325045063058 0.009169263370248263 0.003321286207175452 0.05191122115697404 -0.007876963963148782 -0.01196934081402438 0.003282165211888103 0.06309214838318766 0.0531781373270821 0.04947838520605095 0.04947838520605095 -0.01300358195639505 -0.04437431179658798 -0.07061803978941711 0.0445013775928722 0.04527340341808641 -0.01756950948977419 0.06031872571453265 0.05669155390605609 0.05669155390605609 0.04872477083875893 0.04872477083875893 -0.0108354882252408 -0.0108354882252408 0.03115931510291345 0.03115931510291345 -0.009066590991257667 0.08886953658367966 0.07691337387221737 0.1193722431218432 -0.005516567466867288 0.01483001550263812 0.04118774903758665 0.02441664646282695 0.06781919982635087 0.001956000953967797 0.08561727032452922 0.05308914922659513 0.02441664646282695 -0.03509616512645724 -0.03509616512645724 0.1152589521775486 0.101558419614978 0.1912394853909099 0.2289270567294809 0.2181649158992467 0.009127102095037176 0.1371816804569841 0.07494490615786904 0.06549156541157633 0.03769842704347221 0.04350771935699786 0.05102756922606277 0.05102756922606277 0.007201726820996165 0.02181290802604178 0.1216974785300545 0.1216974785300545 0.07803099159391561 0.009031222653456204 0.04395635876860191 0.04395635876860191 -0.003437788996587612 0.01018147738346561 0.2027166024190973 -0.04437431179658798 -0.04011495581202312 0.188542341289538 0.1542147823457483 0.05802236200833048 0.09806839599338138 0.05538748689808654 0.08886953658367966 0.07756004592741589 0.08744082759233404 0.05472983617984375 0.08679457436493417 0.08679457436493417 0.08679457436493417 0.06137515679286973 0.1388205574533805 0.1948060819672377 0.09545697548493948 0.2045302750635954 0.1956242422830317 0.1956242422830317 0.09431605945012006 0.06064941537872946 -0.03012186393305944 0.1944864486377155 0.04151634651775564 0.04151634651775564 0.08371763960289963 0.08371763960289963 0.06876801377281412 0.07693493502619064 0.07696765479504976 0.1695447613401788 0.06977185408865927 0.07269366433098522 0.0638208495806519 0.04481526440016775 0.04481526440016775 0.1688607665940896 0.07645718885762975 0.05698998214737828 0.07345731326746886 0.08061167196317917 0.0718682173624669 -0.023521293330898 0.07246367569854852 0.07453743527254562 0.09079057848420764 0.09301605906087564 0.09911281555276971 -0.05174640572156698 -0.07866084562293518 0.07563854510231731 0.07553934688491654 0.06632371315001037 0.0590434490240483 0.02717113725870072 0.06667483078732887 0.07337277403307645 0.06041843542382948 0.04477460972791981 0.07231687401945297 0.08635226978793852 0.07231687401945297 0.02701497650907621 0.02701497650907621 0.01860249068672832 0.02570825438444653 0.07373927369553697 0.06953565057175866 0.04768471969823243 0.02389962250393125 0.0667442444063634 0.0667442444063634 0.03656042961859811 0.05625371431376115 0.02366058086396448 0.07273571731034376 0.07406698590134521 -0.007876963963148782 0.04427188390206994 0.04293465296038974 0.04293465296038974 0.04289882881337066 0.06667483078732887 0.05911201850618558 0.02389962250393125 0.02268989081477154 -0.01008919603631767 0.08208403799373713 0.006363492298535886 0.006363492298535886 0.02300247765446601 0.07956689199481044 0.07956689199481044 0.07956689199481044 0.06991702067646853 0.0755441377469841 0.1000053025349367 0.07880321625217897 0.001494412224439111 0.01798822780237666 0.03329986502032029 0.07478979387522307 0.08208403799373713 0.06445255132954743 0.04049282512207662 0.06449246811438356 0.07015036068115006 0.06437525305509544 0.05698998214737828 0.04336166847244709 0.05129472535752759 0.1415097642484144 0.1415097642484144 0.03674464649489235 0.03674464649489235 0.05399215262993613 0.02126749956096213 0.01294942367365917 0.03712816375888717 0.04240432739454376 0.07479669292475043 0.2027166024190973 0.2153961858336765 0.2064234184344078 0.1723089620843493 0.08635226978793852 0.03913819901079241 0.01730948526761106 0.02244801100270487 0.1032888671208081 0.050074671822955 -0.002400707504444438 -0.00302256857963687 0.07880321625217897 0.07523184311589044 0.07523184311589044 0.08453342196213955 0.09262603556240656 0.06815003848996808 0.08453342196213955 0.1094875477489612 0.1390364841365321 0.1724255691953561 0.1283399670492817 0.1283399670492817 0.06464717239379403 0.06464717239379403 0.1239993554096068 0.1239993554096068 0.1213234327149007 0.01234233891763421 0.01234233891763421 0.01234233891763421 0.1096308842581819 0.1096308842581819 0.04230545693534556 0.02244879009476633 0.02244879009476633 0.03807735045414515 0.04599045891523466 0.04640922444441228 -0.02095037477751856 -0.03723919716309986 -0.03723919716309986 0.06252299987195305 0.07557556394991043 0.05147709788839406 0.04640922444441228 0.0753604703701977 0.0753604703701977 0.04117098975869884 0.07329383445145363 0.1201939569514502 -0.02509144349108839 0.1040825780178304 0.09262603556240656 0.08744082759233404 0.02381806956666941 0.07246367569854852 0.07693493502619064 0.08690695507813816 0.08462780757345231 0.08462780757345231 0.1064079639846259 0.1064079639846259 -0.003990512744609144 0.06561412389428081 -0.01902687458973675 -0.005621577719846563 -0.005621577719846563 0.0276680616366941 -0.009710858005344006 -0.009710858005344006 0.1061815833711862 -0.03056306892382428 -0.01104834543906717 0.09005750469143048 0.09005750469143048 0.08966978800726141 0.109860476419442 0.2031413140773067 0.11847758804197 0.1944864486377155 -0.02224673829451291 0.009645868222028056 -0.01319996018341836 0.01073852438476108 0.005751518666883419 0.06407475826618203 0.06407475826618203 0.03558004569985036 0.04167493104043939 0.1539811730521507 0.1539811730521507 0.09542551803707737 -0.03348201050413074 0.03013960591574472 -0.004122539740372013 0.004027556744912659 -0.01210181440867216 -0.02925245932602743 0.06428829140137435 0.06662068713143519 -0.03125356595111071 -0.04008962267951882 0.05047168629506006 0.06147382494907166 0.06147382494907166 0.0780959067968249 0.1668849258968245 0.0664498956780154 0.0664498956780154 0.03618923391435171 0.1063605633688152 0.04303452923215827 0.05755694482065008 0.1575453972894449 0.1414448938686147 -0.005925583876444621 0.1294561116387103 -0.03997018251783823 0.09529433395948536 0.2203245533260976 0.1414448938686147 0.03995431676063854 0.1433991219490184 0.1312528371023743 0.07494490615786904 0.07251754027241354 0.06149071609974117 0.06149071609974117 0.05802236200833048 0.1294561116387103 0.143082738840532 0.06570443853353236 0.09394975382469811 0.06087615203917495 -0.01093551190097834 0.09426684173325874 0.0834841665182546 0.07968621316614427 0.04512753346528207 0.04512753346528207 0.0703254748544322 0.0703254748544322 0.03972168187926216 0.01730948526761106 0.05601419586561167 0.03489146526651938 0.07563859062087028 0.07563859062087028 0.03110695255082221 0.01648934284707002 0.01648934284707002 0.07780221004965739 0.07917425826786016 0.02077444372197448 0.01294942367365917 0.07015036068115006 0.07015036068115006 0.03730844936312581 0.03730844936312581 0.0739085940060433 0.05771507953520513 -0.01756950948977419 0.04514908410405607 0.04054227344844287 -0.002512512625625313 0.0579218542971988 0.07154177083368397 0.07154177083368397 -0.01319996018341836 0.07273571731034376 0.1723295919379137 0.01860249068672832 0.05381814671386985 0.02367593721128324 0.04032888450385808 0.04032888450385808 0.1023328942324741 0.0323405200011429 0.04859498779417194 -0.03295868978877899 0.04490230358555405 0.05755694482065008 0.05755694482065008 -0.02669603285214447 0.02300654718777097 0.008195960524250806 -0.04453382353786918 0.04232427460833234 0.04232427460833234 0.01860249068672832 0.01662616648293426 0.06487715187017355 0.08900018847212585 0.08699391803610407 0.07894743719127884 0.02125298630675634 0.02381806956666941 0.03684490001778217 0.04338293822660971 0.06480366562812406 0.04239502116615792 0.04287234317368721 0.05538748689808654 0.0158884177422872 0.0661117842722463 0.07056833991161876 0.07056833991161876 -0.003437788996587612 0.0002890659033399348 0.05664105635360957 -0.009521121710051879 -0.009521121710051879 0.06926878747594076 0.06926878747594076 0.003321286207175452 0.002682825827742749 0.01763314581178476 -0.009650138879635438 -0.02095037477751856 -0.01538337522206391 -0.01538337522206391 0.05212777283788287 0.07915973871084529 0.07342226875270981 0.0757917484168482 0.05399215262993613 0.06142600031381723 -0.05174640572156698 0.04100589883358337 0.03013960591574472 0.03614710173294167 0.03506764810316333 0.1277434198373003 0.04425852167948786 0.04425852167948786 0.02852178517567598 0.08051383823882469 0.07179363032177033 0.07557556394991043 0.1677233135205718 0.1450819801965618 0.1450819801965618 0.06273219769175961 0.06273219769175961 0.003973393811296407 0.08411503437854191 0.061656206731778 0.07179363032177033 0.009169263370248263 0.08861029496254727 0.1802941279558248 0.143082738840532 0.2094510949029403 0.2094510949029403 0.07691337387221737 0.1388205574533805 0.05557807454604211 0.1142522460155497 0.1142522460155497 0.1255486086511589 0.08966978800726141 0.1562228668713534 0.1562228668713534 0.05725576514566131 0.02154433264464574 0.03591780628824015 0.01768161763866331 0.09394975382469811 0.1094875477489612 0.1205644518046715 0.1480955172548531 0.06864495434839518 0.0763470649102838 0.00181734447732889 0.02750854846987201 0.02750854846987201 0.05971680818915311 -0.07654712366107848 0.1037334382570383 0.06178454920254253 0.06178454920254253 0.03246548445910041 -0.05996213766533864 0.1724255691953561 0.1723089620843493 0.08194589117863332 0.08194589117863332 0.06292299119062071 0.06292299119062071 0.02207929117283251 0.1079332360668446 0.02207929117283251 0.0198642056234285 0.1080318169639569 0.05493911147197357 0.04349821532114858 -0.04975087651545019 0.04329243464875932 0.04052184170063392 0.04329243464875932 -0.04242133082890068 0.09338309188882735 0.1481106008945627 0.06261817286850516 0.06261817286850516 0.06261817286850516 0.07426056322082031 0.06748963608013198 0.06748963608013198 0.0007663553626536126 0.0007663553626536126 0.07154247338299206 -0.05448888025596944 0.07171085508872888 0.109860476419442 -0.01446136610379279 -0.02507224473633806 0.05598516550852338 0.1912394853909099 0.02181290802604178 0.0579156968554273 0.06531988019191082 0.08711667509593476 0.04017015417297586 -0.01774107294719667 0.01022438554506461 0.07123350873810048 0.0972095937587721 0.01996481234297177 0.1864164361137441 0.2042593236863385 0.06106454370225382 0.1879418107193494 0.1828447563114675 0.0168839915031438 0.1948060819672377 0.1669542391579611 0.08004855961879855 0.04303452923215827 0.04673091564983216 0.06314879496507836 0.09803424264388484 0.1036434115198415 0.06368579897891628 -0.01104834543906717 -0.01210181440867216 0.004002432771997176 0.05191122115697404 0.05835964531877438 -0.006073882475506862 0.1879418107193494 0.0542316462679362 0.03641538216447717 0.06626117754252085 0.06626117754252085 0.0757917484168482 0.07370171880654626 0.02257061652892587 0.06654485423762105 0.07329383445145363 0.0834841665182546 0.2052689704084021 0.1803970508841382 0.07342226875270981 0.07622505468219715 0.03275480192060915 0.08314278741268502 0.05872425218130851 0.05872425218130851 0.03129819866429991 0.03129819866429991 0.06199350476276682 -0.01032111274851905 0.03120311480571183 0.03120311480571183 0.03322810777881605 0.03964326999896369 0.1128361634321693 0.04738264737579709 0.03275480192060915 0.04052184170063392 0.04062825908409001 0.02927917736507673 0.03684490001778217 0.02965410131812653 0.02965410131812653 0.01483001550263812 0.04455836736844033 0.04455836736844033 0.07013747930580964 0.03420064350428997 0.0923165237792585 0.0923165237792585 0.0908047648107918 0.0908047648107918 0.02396332337048744 0.06654485423762105 0.09934580085870379 0.09934580085870379 0.09934580085870379 -0.005882816588441581 0.005751518666883419 0.0515981124474293 -0.02509144349108839 -0.03552675535122426 -0.02509144349108839 -0.05101432495698381 -0.05428854564656801 0.005021753727735881 0.00181734447732889 0.06955789826677454 0.07880321625217897 0.06802283241271161 0.03743738713781549 0.02300247765446601 0.07342226875270981 0.07553934688491654 0.07553934688491654 -0.05503464038420278 0.007261571122025506 0.01807320168508595 0.06570443853353236 0.05594937208347216 0.08305527450370807 0.08305527450370807 0.08677914487874737 -0.008686410466595108 0.004027556744912659 0.07401082014214423 0.04100589883358337 0.06325351825498078 0.05971680818915311 0.07107087125456757 0.07041155734128403 0.007739939791956209 0.01099043291772392 0.1140430747452459 0.08850868796415161 0.03099059655684666 0.1856800168366589 0.03479258994394462 0.04998357823515594 0.04998357823515594 -0.01196934081402438 0.09911281555276971 0.05625371431376115 0.05615954328477262 0.03927006043290639 -0.01564127094646037 0.04895364111617613 -0.03056306892382428 -0.02828350384326209 -0.03726863477580244 -0.0366947191484937 -0.05428854564656801 -0.01337074577271453 0.08253950565463174 0.2182626145000585 0.08051383823882469 0.06614307499641091 0.1537265297739347 0.1406660259066461 0.1824427001559059 0.1201332929927662 0.1201332929927662 0.2063663074409154 0.2289270567294809 0.03123800435874009 0.03123800435874009 0.05164916988381013 0.07041155734128403 0.1209955457438426 0.1575453972894449 0.05863698956100689 0.02077444372197448 0.08003378600338108 0.0416624300684178 0.1875383451547548 0.04768471969823243 0.03927760621713722 0.09627465951514286 0.1433709520657621 0.1115792777670807 0.1314271465262705 0.04768471969823243 0.04807522752100808 0.0755441377469841 0.07734030237406993 0.1350281273983252 0.05608122136445166 0.09079057848420764 0.1300518383256805 0.1116675695604878 0.02299668671069031 0.1840110145507217 0.1828447563114675 0.1077171019938673 0.09274113145329221 0.1308249609055872 0.08931247030677385 0.04565528270151443 0.1898735448033684 0.1642880571590961 0.1880377445511492 0.1677233135205718 0.2168210374369809 0.1899672695882524 0.09495418118083895 0.0907726427935361 0.0002890659033399348 0.05927437191274729 0.2181649158992467 0.1209955457438426 0.03927760621713722 0.1120976247498718 0.1142872161292451 0.1015774889027128 0.1142872161292451 0.0763560772759926 0.07329383445145363 0.04738264737579709 0.03680838017557272 -0.008686410466595108 -0.008686410466595108 0.003591032359320839 -0.03579043227475828 0.06155953423152461 0.081283849779501 -0.08315867498765715 -0.03388446983076415 0.07693493502619064 0.01135400979388848 0.001670871107147369 0.1406660259066461 0.07740169546949514 0.07740169546949514 0.06850350030240142 0.1254625309337594 -0.001970126493118615 -0.0675699760567517 0.07101695952751286 0.06815003848996808 0.01639212016806737 0.1079001106047753 0.1001229679260158 -0.04895174545194673 -0.02828350384326209 0.0907726427935361 0.04208160772647213 0.04349821532114858 0.1036391187355138 -0.04489521601301675 0.04055357765802335 0.04562194824989631 -0.04763087810824819 0.05472983617984375 0.04240432739454376 0.03062097720649291 0.0310102242458445 0.01996481234297177 0.03738508326020538 0.07006099256766654 0.04673091564983216 0.0755441377469841 0.1314271465262705 0.09542551803707737 0.1542147823457483 0.08711667509593476 0.1021763085818637 0.1015774889027128 -0.01799364111411374 0.02080706358314436 0.07361977561712117 0.07361977561712117 0.02676620095264797 0.01085575455172333 0.06199350476276682 -0.04535627279723637 -0.06089631086665132 0.08829285829705867 0.06476073510420575 0.06476073510420575 0.06343576433487297 0.06343576433487297 0.1174012031933433 0.0638208495806519 0.01521762639422666 0.08577432089958252 0.1466157914176087 0.1351062480939325 0.1310024304346682 0.1531888620525815 0.03062097720649291 0.1661520475540877 0.05047168629506006 0.1149973002312299 0.1036434115198415 0.03403397071111211 0.03403397071111211 0.1511312745674545 0.1584870412717425 0.0889602927295397 0.08647108030816594 0.02232424559141109 -0.002512512625625313 0.04665366261550976 0.0237688175860232 0.07006099256766654 -0.01406764745148158 0.06612903558116011 -0.02925245932602743 0.07550111055831944 0.1356936044605296 0.01483001550263812 0.06531988019191082 0.04984059002371813 0.07139730344629193 0.1266060627101509 0.1323256121839839 0.08647108030816594 0.08004855961879855 0.06684403710524259 0.009645868222028056 0.01741488608261735 0.06981207962337391 0.1898735448033684 0.1026233662801809 0.1047153130611282 0.07547309705249272 0.1205644518046715 0.06552614868698803 0.05756455991156628 0.05756455991156628 0.07917425826786016 0.0953912909329228 0.07005466904810846 0.03225643321834744 0.04352895807798814 0.06422489501068022 0.06422489501068022 0.03271674269739306 0.05594937208347216 0.05644336555129603 0.09495418118083895 0.1323256121839839 0.04349821532114858 0.1642880571590961 0.004002432771997176 0.03424443453917955 0.03591780628824015 0.03424443453917955 0.08829285829705867 0.06314879496507836 0.1824407768709404 0.1024940026707547 0.01018147738346561 ) ; } procBoundary2to1 { type processor; value nonuniform List<scalar> 30 ( -0.07591144112666434 -0.08385313076559124 -0.01251143687729167 -0.027453612390185 -0.009733862252212441 -0.03268972730311012 -0.07465339737240961 0.03100145025905958 -0.04749988652524297 -0.06072617328093154 -0.01327324557914852 -0.027453612390185 -0.01164129096773998 0.02343925833374222 -0.0135921820880686 0.05607916530869414 -0.01532873687765681 0.1077908719972818 0.1306079416451951 -0.07649277884089545 0.1124450625936911 0.04416000259160003 -0.01665073722064699 -0.03220605085339375 0.09678299010078198 0.09678299010078198 -0.06723551884811763 0.07420713726222528 0.07420713726222528 0.07420713726222528 ) ; } procBoundary2to3 { type processor; value nonuniform List<scalar> 841 ( -0.007627129962524173 -0.03813880786597641 -0.03030649243492852 -0.03024877025938066 -0.001001199787460841 -0.0007304320517046645 -0.0001838819184998612 -0.0007137654222776702 -0.001264625199637024 -2.963362658965441e-05 -0.006445386528972519 -0.006445386528972519 -0.006201287758729967 0.0003543406951170626 -5.369796125348649e-05 -0.009578873557179445 -0.009578873557179445 -0.01705871492652523 -0.0003649186473867507 -0.007492668555502662 -0.007707941138134753 -0.006009214946185555 -0.004715061054100478 -8.862960824750027e-05 -0.06694785918736851 -0.006202798519468423 -0.001860576500234715 -0.0010566039888743 -0.001800103511420671 -0.002521694508332376 -0.0007566287254947404 -0.0009349001512984886 -0.0009600953011044833 -0.0010976040066584 -0.0007566287254947404 -0.01913618933890274 -0.01913618933890274 -9.513077285273463e-05 -0.004029418387692851 -0.005933351240100539 -0.02358380348584838 -0.0009998079111125367 -0.0009998079111125367 -0.001172609077649323 -0.02302969033138327 -0.006379191266033862 -4.272981753505076e-05 -0.01017051776878226 -0.02764930307168317 -0.02986304485958811 -0.01952389838889177 -0.01475174609443121 -0.01475174609443121 0.03303288465910515 -0.00555045568030113 -0.00555045568030113 -0.006730018078382684 -0.03053592181405979 -0.004078487102627522 -0.005149401061229164 -0.0203018912331619 -0.0442196817374173 -0.0009303544608179954 -0.0009303544608179954 -0.00492589636459431 -0.00492589636459431 -0.005551043583379938 -0.004747012299516139 -0.005478049065086962 -0.004059072680609707 -0.003684971517067302 -0.01072276462159289 -0.01374508361635327 -0.04101430381041128 -0.0009275370775190223 -0.0006886086419259301 -0.02237955533209635 -0.002394686862160232 -0.002726667061781783 -0.01983530939484174 -0.01983530939484174 -0.01983530939484174 -0.03394221118685739 -0.0385284615285738 -0.006602226244933678 2.607802322003403e-05 -0.007702439542635033 -0.01376374809131481 -0.0004453073841210602 -0.007518462981602034 -0.004366155739408517 -0.006152878281845253 -0.006986561399811239 -0.002943712161941388 -0.002515505571689212 -0.02725351023840954 -0.002450452161513839 -0.002946472014150704 -0.002270200283708569 -0.002270200283708569 -0.02239292039538474 -0.06012968967875883 -0.004266147706070143 -0.01239790374616376 -0.01239790374616376 0.01933866870750879 -0.004779333448704784 -0.004002425162474737 -0.001683205367289422 -0.001683205367289422 -0.02469606907324167 -0.03041473060543058 -0.01120519269428316 -0.01220777490210152 0.0001590729520911874 0.01941897387771189 -0.01323940054424364 0.05327116523444646 -0.008435057110049141 -0.06446169743490665 -0.0039961268366561 -0.01395747573579977 -0.01303565925393478 -0.02678300032082486 -0.02175549533295397 -0.03650359402988653 -0.05148890685323484 -0.06502570106042392 -0.05084761860318652 0.06195967837125447 0.03807756267568521 -0.02501750299572311 -0.02501750299572311 0.02808585370637223 -0.01160217847412661 -0.01160217847412661 -0.02963365179475194 -0.02369189695248486 -0.02686264842469838 -0.02638818574023364 -0.005048812837646307 -0.009084208440823331 -0.008544944368145764 -0.008544944368145764 -0.0006002692573602621 -3.689417189158907e-05 -0.01570716047892922 -0.0003085141932947531 -0.0002919943969731679 -8.782189756533198e-05 -0.002424105667695409 -0.001853328201574596 -0.002330583998883866 -0.03757531031091322 -0.04593175008878705 -0.000423398470222244 -0.000484614530772149 -0.006000320382871672 -0.0006442268348133536 -0.0004581314112198219 -0.0003910615917967131 -0.0003331173842476113 0.0001398386258050016 -0.0002720917193630785 -0.0005519106162934988 -0.0008852087153685529 -0.0007384034764217252 -0.0470950275563129 -0.05052268324971071 -0.04998852651305148 -0.001867777858734165 -0.0007638263126124967 0.0001388967829347142 0.0001388967829347142 -9.513077285273463e-05 -0.0009829334683100386 -0.00232435418584189 -0.0352993028133838 -0.002351366912298475 -0.002086641676533148 -0.002450452161513839 -0.001143829998913908 -0.001052266274908153 -0.0003862627335472652 0.0001191461037852278 0.0001546970569163953 -0.0007900027769077274 -0.0007900027769077274 -0.008944561898854914 -0.003776477695900216 -0.01523239276725878 -0.005865294273349368 -0.0004761354415558192 -0.003103636395705299 -0.0005978178335223022 -0.0005978178335223022 -0.008272565223400129 -0.002165206210014153 -0.002576050818386132 -0.002576050818386132 -0.0006252133279528419 -0.007649163815954495 -0.003915256863144496 -0.01618744554012418 -0.003019528782731359 -0.03020447129042754 -0.009601257007498415 -0.009601257007498415 -0.009601257007498415 -0.006452809943715615 -0.003224701908181353 -0.003224701908181353 0.0002107521829890889 -0.001491289750599387 -0.001491289750599387 -0.001360668678139615 -0.0009615386930525744 -0.0001630745777607748 -0.01742049745422946 -0.01466422308208725 -0.0003523433342435881 -0.0007660361714422511 -0.0007424163079504643 -0.002420707286600912 -0.0007266308083771447 -0.00278747189274535 -0.0004040192683123494 3.601843378161431e-05 -0.0003907769526069439 -0.0004897517349642072 -0.002601571945643893 -0.001100216776099616 -0.01013281900689508 -0.02175549533295397 -0.01688387099654383 0.0003097453469161606 0.0003097453469161606 -0.001214808827374248 -0.004233822875807786 -0.002351366912298475 -0.03117914763988265 -0.003063282651867732 -0.008555772953239896 0.0002509611822040264 -0.001962932553965048 -0.002376441448519573 0.0001150725257283997 -0.0001547215620311518 -0.01284507548625886 -0.0004091536133122101 -0.000868309292887832 -0.001120959835512579 -0.003410388682422489 -0.006810823217657785 -0.0004571098526411213 -0.006201287758729967 -0.001697360169779879 -0.006936418093895494 -0.0009600953011044833 -0.00196904688875816 -0.001748614890323991 -0.001748614890323991 -0.002890767419903007 -0.003496110100729425 -0.0007520206357136942 -0.000303331024979183 -0.006262686121249851 -0.01096890645059183 -0.003500499225502209 -0.003500499225502209 -0.0249036887474816 -0.001440305402139612 -0.02704274798844887 -0.00743955823082932 -0.009629148944328534 -0.03534819016996237 -0.03334232826925878 -0.005087763881170543 -0.01220777490210152 -0.04732585533828099 -0.01246239278191027 -0.0279973243535822 -0.02573228493595212 -0.004943604471171393 -0.02195848280138323 -0.04422509411359052 -0.0009559617687276959 -0.001436791853705877 -0.001538449791321449 -0.001538449791321449 -0.0137270618335889 -0.03233356024975546 -0.02793384088402064 -0.03567947904390806 -0.03542830692385449 -0.0269989139268796 -0.01911801491932913 -0.001328391687558155 -0.001582253542518705 -0.004078487102627522 -0.01818601652774625 -0.01818601652774625 -0.02239292039538474 -0.02840988311918498 -0.02183863391494069 -0.002028740394589352 -0.01762803061001217 -0.04271895271555215 -0.001323834471843916 -0.003424710186308024 -0.03746660504094002 0.0006194341649761434 -0.0217592653474208 -0.02017435980968036 -0.0237723721901558 -0.02016789691678258 0.02590041633944589 0.01941897387771189 0.008764587940159101 -0.07762790532188252 -0.007354510287451547 0.0616448432899902 -0.01930755818816681 -0.03109582952537709 -0.03109582952537709 -0.03004786129350679 -0.03004786129350679 -0.03004786129350679 -0.00123103703231098 -0.000930821269074757 -0.0009858631170568599 -0.06226224492542053 -0.06347451222452283 -0.009205235446057974 -0.001016089058416599 -0.001016089058416599 -0.001510970890039578 -0.00123103703231098 -0.009960594690147356 -0.002072655037225429 -0.0009559617687276959 -0.0009559617687276959 -0.0004629468613820823 4.72551530441686e-05 0.0001768524588524439 -3.044848848947558e-05 -0.004029418387692851 0.0001765176021970851 -0.002575965487432652 4.356745801764523e-05 4.356745801764523e-05 -0.001143829998913908 -0.001010943876593199 -0.0001179867887302136 -0.007407078799421739 -0.002752105763822135 -0.004710038989966471 -0.01113249640268095 -0.0002268767174226589 -0.008176880138509191 -0.004263521712022831 -0.0003969040376047637 -0.0002216104997503365 -0.002575965487432652 -0.007869830083573105 -0.01124628975022323 -0.06694785918736851 -0.04593175008878705 -0.0009495882308658699 -0.0008423604301529368 -0.008796402969734791 -0.002007283871090989 -0.01345882553044585 -0.01482501510221147 -0.005752792999779354 -0.004366155739408517 -0.001711252266214782 -0.0009349001512984886 -0.002861488407911017 -0.01736295275584261 -0.01736295275584261 -0.003746913598168836 -0.003746913598168836 -0.03568081798078389 -0.01916936199091494 -0.009333146211214326 -0.01470588489375341 2.607802322003403e-05 -8.782189756533198e-05 -6.548871133133862e-05 2.137183089777392e-05 -0.001854692475362289 -0.001791159721182731 -0.008833157599516916 -0.004621971018729441 -0.01116230687728348 -0.004942395787310377 -0.006970956379644877 -0.002823722176031529 -0.002315052187656175 -0.005865294273349368 -0.000868309292887832 -0.0221254003729879 -0.01196029786197844 0.0003369346377180082 -0.006118857458039075 -0.006253304120906211 -0.006253304120906211 -0.02149518185106327 -0.000377560883751788 -0.05122519114890617 -0.04069578421442837 -0.0003694893618302388 -0.002395516995151223 -0.001323834471843916 -0.02305867128691002 -0.001089287731197671 -0.0006757568031519577 -0.000930821269074757 -0.02305392295796578 -0.01345882553044585 -0.001974174219415784 -0.008988326855371525 -0.006236046490576685 -0.00905049166856276 -0.01771924766219813 -0.03695717506751334 -0.01064057232601682 0.03079882717003797 -0.01200909487719309 -0.009960594690147356 -0.01620925287962832 -0.02923581575195678 -0.0237723721901558 -0.01709416860015159 -0.0172646199161739 -0.01771550793300174 -0.01064996832107446 -0.02923581575195678 -0.03847527677583386 -0.02353377756326872 -0.02353377756326872 -0.01430911588377657 -0.003931067493983306 -0.003004908977518302 0.01473753978830247 -0.01154688969809451 -0.01729814643018646 -0.0116054258198666 -0.009321888118309935 -0.01020673507825293 -0.03197879577303617 -0.04856030092888191 -0.05422219337919541 -0.06226224492542053 -0.0443439285559139 -0.02033155131771631 -0.01634942683568526 -0.03050430389209648 -0.02002398625405798 0.008764587940159101 -0.02822741111997324 -0.01303565925393478 -0.01303565925393478 -0.02019103481972568 -0.03485513504355209 -0.02194276739290673 -0.03524631465379497 -0.02206958698677412 -0.02206958698677412 -0.004292098558357289 -0.002651908101636882 -0.002086641676533148 -0.005104930713195923 0.01507674663195937 -0.001791159721182731 -0.001801333495693019 -0.002480003932847739 -0.02341419946272687 -0.0006987998076912516 -0.02064062302681171 0.0006194341649761434 0.0006194341649761434 -0.004819104456327681 -0.05981109641185182 -0.03589041384747816 0.02273437367016299 -0.009152109448325204 -0.003250849359116128 -0.003690181918051204 -0.00477257001713033 -0.00556198624303836 -0.003557561992364548 2.508452195769192e-05 0.0002485424153151906 -0.00475424781379488 0.0002511063636286216 -0.000725347100666048 -0.001507878806929338 -0.001237910928920393 -0.005282893311174676 -0.005282893311174676 -0.003931067493983306 -0.02213835488096907 -0.0003168630994462565 -0.0009280531999566226 -0.0009280531999566226 -0.02322821319218701 -0.0001307772040939858 -0.03489557288906473 -0.0008048290681497167 -0.002738291165245715 -0.0006770300972452365 -0.06226224492542053 -0.0001113895530118463 -0.003802712489514404 -0.0009466983675979745 -0.01101310727483452 -0.001412300627940012 -0.004943604471171393 -0.004284683295676646 -0.004284683295676646 -0.009852077499497116 -0.003305780467112682 -0.002599948575019832 -0.002599948575019832 -0.003235830627998212 -0.01026089526319176 -0.007235323926682038 -0.004779333448704784 -0.008716582341432768 -0.009205235446057974 -0.0003609555535942055 -0.0003216084046773495 -0.004036414374394158 -0.0003194799773136233 -0.0003194799773136233 -0.003042284386427931 -0.01154688969809451 -0.003496110100729425 -0.01911801491932913 -0.00894938445867368 -0.02183863391494069 -0.01131233115516108 0.0001913486886008999 0.0003171700503729702 -0.005909709056873221 -0.001289393098363551 -0.001120959835512579 -0.008301652459716223 -0.005461118099934074 -0.01618744554012418 -0.01484982652543165 -0.01616491100843769 -0.0268563989119375 -0.01323940054424364 -0.04014884932586346 -0.00278747189274535 -0.002943712161941388 -0.0008589607894792547 -0.003250849359116128 -0.005135776567419471 -0.0114506983412347 -0.002373904760932001 -0.02638818574023364 -0.007392079139795457 -0.01012739609079149 -0.02793384088402064 -0.003690181918051204 -0.0003862627335472652 -0.001040630667153782 -0.001361559382616188 -0.0006059776800016442 0.0001853498337832467 0.0001853498337832467 -0.006550590154202789 -0.005117048208090834 -0.006796493743471808 -0.008716582341432768 -0.001760096027271561 -0.003714319332054589 -0.003936225546867555 -0.003936225546867555 -0.002089028498080576 -0.005582109093400646 -0.005936729192949547 0.0001200423036509927 -0.000282112561653454 -0.007410389592575599 5.892902430579013e-05 -0.04131188028686834 -0.0007063530398422361 -0.0006340720138540398 -0.01498129377363791 -0.0129882741210064 -0.01143869798183 -0.002273348834548551 -0.01410097805914435 -0.04014160109127803 -0.0001663937434743502 -0.01044135859037137 2.402160228332572e-05 5.147620573050213e-05 -0.002679923661044126 -0.004055549845940197 -0.03069293043079396 -0.01688387099654383 -0.01392981789601083 -0.01476715949375424 -0.01020673507825293 -0.009242676299939053 -0.009334186483072951 -0.008833157599516916 -0.002568346461551134 -0.002568346461551134 -0.007555483596557709 -0.0055275228297362 -0.0055275228297362 -0.02088756363047072 -0.04355416029235067 -0.06347451222452283 -0.01470588489375341 -0.01641012104391652 -0.01315754799412009 -0.05686809059572425 -0.01404863228400838 -0.01143869798183 -0.007546936903256369 -0.005102797137516834 -0.005102797137516834 -0.003063282651867732 -0.009284536114877558 0.06529874209561233 0.06529874209561233 -0.007392079139795457 -0.007392079139795457 -0.005217439584212826 -0.004176417364777758 -0.007649163815954495 -0.00492361811778856 -0.002052689429459075 -0.02446718992334478 -0.01163363760879183 -0.0483927035942323 -0.03069293043079396 -0.01006691840527499 0.0001590729520911874 -0.002752105763822135 -4.893057144771347e-05 -0.01482501510221147 -0.03592338542170929 -0.03951732307293004 -0.0006565073649895819 -0.001831931743207138 -0.02535477772729499 -0.0006770300972452365 -0.002467885462081924 -0.001052266274908153 -0.03757531031091322 -0.002181594859250699 -0.04928074333413075 0.0002901354942268399 -0.001289393098363551 0.0002962064689082022 0.0002962064689082022 -0.01671533050824626 -0.002315052187656175 -0.001760096027271561 -0.01772291470775024 -0.0008475925335907741 2.147531477514617e-05 -3.230103685446824e-05 -0.001040630667153782 -0.0006662442433245886 -0.0003265482687856238 -0.004072385635385941 -0.0004143713400252793 -0.0006987998076912516 0.0002398962331621696 0.0002398962331621696 -0.001323737345370392 -0.004621926821684416 0.0002727273140292878 0.0001648071884067973 -0.003096118428096003 -0.002428334618484408 -0.0005519106162934988 -0.003549220739426374 -0.00874547974025032 -0.0002415476296075642 -0.003378058658439356 -0.004378090760001364 -0.003557561992364548 -0.008587822626981542 -0.03109671497131227 -0.02551356856920537 -0.005810436874887092 -0.01350010908634553 -0.01616491100843769 -0.005954709090348077 -0.01164972009094738 4.72551530441686e-05 -0.01709416860015159 -0.008697884680451471 -0.001961415849223989 -0.0007625018245593302 -0.001259989111174556 -0.0005153269054209121 -0.0005153269054209121 -0.00346846338327905 -0.006316311463291157 -0.002848696507068559 -0.006325857711752637 -0.01243361375239855 -0.004097747753488146 -9.190443724551263e-05 0.0003171700503729702 -0.04584416173025436 -0.003306609458445142 -0.003549220739426374 -0.03506131264435949 -0.02083057116035353 -0.0172646199161739 -0.02019103481972568 -0.04934290884391893 -0.03624207385361146 -0.05779849305362547 -0.04732585533828099 -0.004163392286142088 -0.004036414374394158 -0.02156720235250718 -0.02195848280138323 -0.01655565628255004 -0.02818260239705112 0.08194684302748423 -0.007377733492347016 -0.04436163622398506 0.0001648071884067973 -0.007546331076403722 -0.0278722455494242 -0.0295116949584049 -0.0343666509170721 -0.02489620132699528 -0.03609010638525761 0.06195967837125447 -0.02601991032042042 -0.0103215938505854 -0.01390336203084405 -0.008301652459716223 -0.009205235446057974 -0.03181646101024641 -0.0385284615285738 5.892902430579013e-05 5.892902430579013e-05 -0.0009628542528515918 -0.0269989139268796 -0.001661943322314695 -0.005341738571458908 -0.001323737345370392 -0.002480003932847739 -0.003745570201676882 -0.008369985989771589 -0.005108822540885057 -0.008697884680451471 -0.009152109448325204 -0.0003265482687856238 0.007576171394422194 -0.021746313892073 -0.001100216776099616 -0.009235291638523355 -0.001040630667153782 5.673726704541201e-05 -0.009852077499497116 -0.01128254601850736 -0.004505595642877931 -0.0007424163079504643 -0.01301770979472476 -0.01219943751785877 -0.007869830083573105 -0.02429014037361715 -0.002428334618484408 0.0001768524588524439 0.08708705807478087 -0.01595834514468021 -0.01687088153286457 -0.01687088153286457 -0.01655565628255004 -0.0008699000731549918 -0.004977231453173022 -0.02169366975193238 -0.01392794945246433 -0.04706156088204384 -0.0385284615285738 -3.044848848947558e-05 -0.006325857711752637 -0.009152109448325204 -0.04732585533828099 -0.04593175008878705 -0.02087214213274607 -0.02121695547573209 -0.03650359402988653 -0.008301652459716223 -0.03506131264435949 -0.009242676299939053 -0.02731314436329265 -0.01641012104391652 -0.004266147706070143 -0.008175218385571935 -0.009602239577377542 -0.00243498953409664 -0.0006770300972452365 -0.001022075342059611 -0.001022075342059611 -0.0006640151727006323 -0.0278293299715241 -0.02889308645113041 -0.05304993729817248 -0.05073638539717336 -0.008760123428029997 -0.001237910928920393 -0.0009628542528515918 -0.0006339961020749142 -0.002502000310260519 -0.001100216776099616 -0.001215943178275986 -0.01128254601850736 -0.002480003932847739 -0.00243498953409664 -0.001638078621557062 -0.004233822875807786 -0.01688387099654383 -0.004835124411967215 -0.05224252920873185 2.508452195769192e-05 -0.007235323926682038 -0.009235291638523355 0.0003755903816901306 0.0003755903816901306 -0.02731314436329265 -0.02889308645113041 -0.03122889125442278 ) ; } } // ************************************************************************* //
[ "63025647+harini-cookie@users.noreply.github.com" ]
63025647+harini-cookie@users.noreply.github.com
9b470649b2505a757e33887a62978f041dc36f38
9802284a0f2f13a6a7ac93278f8efa09cc0ec26b
/SDK/BP_FlareItem_Green_functions.cpp
2db43b76cbaf2e52d4767edfcecda12933549f7e
[]
no_license
Berxz/Scum-SDK
05eb0a27eec71ce89988636f04224a81a12131d8
74887c5497b435f535bbf8608fcf1010ff5e948c
refs/heads/master
2021-05-17T15:38:25.915711
2020-03-31T06:32:10
2020-03-31T06:32:10
250,842,227
0
0
null
null
null
null
UTF-8
C++
false
false
815
cpp
#include "../SDK.h" // Name: SCUM, Version: 3.75.21350 #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- // Functions //--------------------------------------------------------------------------- // Function BP_FlareItem_Green.BP_FlareItem_Green_C.UserConstructionScript // (Event, Public, BlueprintCallable, BlueprintEvent) void ABP_FlareItem_Green_C::UserConstructionScript() { static auto fn = UObject::FindObject<UFunction>("Function BP_FlareItem_Green.BP_FlareItem_Green_C.UserConstructionScript"); ABP_FlareItem_Green_C_UserConstructionScript_Params params; auto flags = fn->FunctionFlags; UObject::ProcessEvent(fn, &params); fn->FunctionFlags = flags; } } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "37065724+Berxz@users.noreply.github.com" ]
37065724+Berxz@users.noreply.github.com
39c2ddd4b056d716ee5ca2b0beaca04a9a25598c
119d21268419c53b3f7c1090b430fa7e6a568a82
/cyber/io/example/udp_echo_client.cc
31ac0390bd18b9b6fd9daa4fa8b1217b7ac5bd6a
[]
no_license
GoeSysWare/AiwSys
4444af0e56cc340fdf6343a9765cdfacef2181c9
422c334eee782013d381972bd2e84afdf4f6b696
refs/heads/master
2022-06-13T22:28:02.464951
2020-06-23T02:29:55
2020-06-23T02:29:55
203,970,151
3
2
null
2022-06-02T21:45:55
2019-08-23T09:42:43
C++
UTF-8
C++
false
false
3,535
cc
/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *****************************************************************************/ #include <arpa/inet.h> #include <netinet/in.h> #include <stdlib.h> #include <sys/socket.h> #include <iostream> #include <string> #include <vector> #include "cyber/cyber.h" #include "cyber/init.h" #include "cyber/io/session.h" #include "cyber/scheduler/scheduler_factory.h" using apollo::cyber::io::Session; int main(int argc, char* argv[]) { if (argc != 2) { std::cout << "Usage: " << argv[0] << " <server port>" << std::endl; return -1; } apollo::cyber::Init(argv[0]); int server_port = atoi(argv[1]); apollo::cyber::scheduler::Instance()->CreateTask( [&server_port]() { struct sockaddr_in server_addr; server_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); server_addr.sin_family = AF_INET; server_addr.sin_port = htons((uint16_t)server_port); std::string user_input; std::vector<char> server_reply(2049); ssize_t nbytes = 0; uint32_t count = 0; Session session; session.Socket(AF_INET, SOCK_DGRAM, 0); if (session.Connect((struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) { std::cout << "connect to server failed, " << strerror(errno) << std::endl; return; } while (true) { count = 0; std::cout << "please enter a message (enter Ctrl+C to exit):" << std::endl; std::getline(std::cin, user_input); if (!apollo::cyber::OK()) { break; } if (user_input.empty()) { continue; } if (session.Send(user_input.c_str(), user_input.length(), 0) < 0) { std::cout << "send message failed." << std::endl; return; } while ((nbytes = session.Recv(server_reply.data(), server_reply.size(), 0)) > 0) { for (auto itr = server_reply.begin(); itr < server_reply.begin() + nbytes; ++itr) { std::cout << *itr; } count += (uint32_t)nbytes; if (count >= user_input.length()) { break; } } if (nbytes == 0) { std::cout << "server has been closed." << std::endl; session.Close(); return; } if (nbytes < 0) { std::cout << "receive message from server failed." << std::endl; session.Close(); return; } std::cout << std::endl; } }, "echo_client"); apollo::cyber::WaitForShutdown(); return 0; }
[ "guooujie@163.com" ]
guooujie@163.com
3278de79cf59dc968a1a19fc5639882e18986cf9
dd5356457879b9edf8c982a412e0068f94da697d
/SDK/RoCo_ReloadReticle_classes.hpp
e890e013fa8a358498c24723774fccccd41f963c
[]
no_license
ALEHACKsp/RoCo-SDK
5ee6567294674b6933dcd0acda720f64712ccdbf
3a9e37be3a48bc0a10aa9e4111865c996f3b5680
refs/heads/master
2023-05-14T16:54:49.296847
2021-06-08T20:09:37
2021-06-08T20:09:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,022
hpp
#pragma once // Rogue Company (0.60) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "RoCo_ReloadReticle_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // WidgetBlueprintGeneratedClass ReloadReticle.ReloadReticle_C // 0x0048 (0x0280 - 0x0238) class UReloadReticle_C : public UUserWidget { public: struct FPointerToUberGraphFrame UberGraphFrame; // 0x0238(0x0008) (CPF_ZeroConstructor, CPF_Transient, CPF_DuplicateTransient) class UImage* circle_progress; // 0x0240(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) class UImage* circle_progress_bg; // 0x0248(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) class UImage* Image_1; // 0x0250(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) class UImage* Image_2; // 0x0258(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) class UProgressBar* ProgressBar_1; // 0x0260(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) class UImage* ShotgunProgress; // 0x0268(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) class UImage* ShotgunProgressBG; // 0x0270(0x0008) (CPF_BlueprintVisible, CPF_ExportObject, CPF_ZeroConstructor, CPF_InstancedReference, CPF_IsPlainOldData, CPF_RepSkip, CPF_NoDestructor, CPF_PersistentInstance, CPF_HasGetValueTypeHash) float ReloadTime; // 0x0278(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData, CPF_NoDestructor, CPF_HasGetValueTypeHash) float ReloadTimeLeft; // 0x027C(0x0004) (CPF_Edit, CPF_BlueprintVisible, CPF_ZeroConstructor, CPF_DisableEditOnInstance, CPF_IsPlainOldData, CPF_NoDestructor, CPF_HasGetValueTypeHash) static UClass* StaticClass() { static auto ptr = UObject::FindObject<UClass>("WidgetBlueprintGeneratedClass ReloadReticle.ReloadReticle_C"); return ptr; } void ColorSet(const struct FLinearColor& NewColor); void UpdateShotgunReload(float ReloadTime, float Percent); void SetReloadTime(float NewTime); void Tick(const struct FGeometry& MyGeometry, float InDeltaTime); void Circle_Progress_Open(); void Circle_Progress_Close(); void PreventCircleFill(); void ShotgunCircleOpen(); void ShotgunCircleClose(); void ExecuteUbergraph_ReloadReticle(int EntryPoint); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "30532128+pubgsdk@users.noreply.github.com" ]
30532128+pubgsdk@users.noreply.github.com
fb26a12de572c1d9ef96b288444e75795153be2e
0543967d1fcd1ce4d682dbed0866a25b4fef73fd
/Midterm/solutions/midterm2017_113/F/000319-midterm2017_113-F.cpp
7250d2586cae22d10d22653a69c34e6c28c11695
[]
no_license
Beisenbek/PP12017
5e21fab031db8a945eb3fa12aac0db45c7cbb915
85a314d47cd067f4ecbbc24df1aa7a1acd37970a
refs/heads/master
2021-01-19T18:42:22.866838
2017-11-25T12:13:24
2017-11-25T12:13:24
101,155,127
0
0
null
null
null
null
UTF-8
C++
false
false
204
cpp
#include <iostream> using namespace std; int main(){ int n,g; cin>>n>>g; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n;i++){ if(i!=g-1) cout<<a[i]<<" "; } return 0; }
[ "beysenbek@gmail.com" ]
beysenbek@gmail.com
73e3be6ced8e2c6ebdb4dd0c54c52566d286751e
7d211617a1d20db4eac5e3f6e9b090786f22af29
/test/unit/winstl/time/test.unit.winstl.time.comparison_functions/test.unit.winstl.time.comparison_functions.cpp
2d35b2cd3b491f0acad6104b42bd2ee56b26557a
[ "BSD-2-Clause" ]
permissive
synesissoftware/STLSoft-1.10-delta
b3f3f6f9b26527b9ea5a7e92b8ebfbdf381153fb
926617f5a3468d36861eadfbdc65823f77a90e62
refs/heads/master
2021-01-15T15:49:31.532263
2019-04-16T03:01:32
2019-04-16T03:01:32
42,432,619
3
1
null
null
null
null
UTF-8
C++
false
false
23,112
cpp
/* ///////////////////////////////////////////////////////////////////////// * File: test.unit.winstl.time.comparison_functions.cpp * * Purpose: Implementation file for the test.unit.winstl.time.comparison_functions project. * * Created: 8th April 2014 * Updated: 1st June 2014 * * Status: Wizard-generated * * License: (Licensed under the Synesis Software Open License) * * Copyright (c) 2014, Synesis Software Pty Ltd. * All rights reserved. * * www: http://www.synesis.com.au/software * * ////////////////////////////////////////////////////////////////////// */ /* ///////////////////////////////////////////////////////////////////////// * Test component header file include(s) */ #include <winstl/time/comparison_functions.h> /* ///////////////////////////////////////////////////////////////////////// * Includes */ /* xTests Header Files */ #include <xtests/xtests.h> /* STLSoft Header Files */ #include <winstl/shims/conversion/to_FILETIME.hpp> #include <stlsoft/stlsoft.h> /* Standard C Header Files */ #include <stdlib.h> /* ///////////////////////////////////////////////////////////////////////// * Custom macros */ #define XTESTS_TEST_TIME_EQUAL_(h, m, s, ms, tp, r) \ \ test_time_equal_((r), (tp), (h), (m), (s), (ms), __FILE__, __LINE__) #define XTESTS_TEST_TIME_EQUAL_TM_(h, m, s, ms, tp, am, pm, r) \ \ test_time_equal_tm_((r), (tp), (am), (pm), (h), (m), (s), (ms), __FILE__, __LINE__) #define test_time_equal_(r, tp, h, m, s, ms, file, line) \ \ do \ { \ SYSTEMTIME const t = { \ 2012 \ , 7 \ , -1 \ , 28 \ , (h) \ , (m) \ , (s) \ , (ms) \ }; \ CHAR buf[120] = ""; \ int const rv = winstl::GetTimeFormat_msA( \ LOCALE_SYSTEM_DEFAULT \ , 0 \ , &t \ , (tp) \ , buf \ , STLSOFT_NUM_ELEMENTS(buf) \ ); \ \ (!XTESTS_NS_C_QUAL(xTests_hasRequiredConditionFailed()) && \ XTESTS_NS_C_QUAL(xtests_testMultibyteStrings)(file, line, XTESTS_GET_FUNCTION_(), "", (r), (buf), XTESTS_NS_C_QUAL(xtestsComparisonEqual))); \ } while(0) #define test_time_equal_tm_(r, tp, am, pm, h, m, s, ms, file, line) \ \ do \ { \ SYSTEMTIME const t = { \ 2012 \ , 7 \ , -1 \ , 28 \ , (h) \ , (m) \ , (s) \ , (ms) \ }; \ CHAR buf[120] = ""; \ LPCTSTR timeMarkers[2] = { (am), (pm) }; \ int const rv = winstl::GetTimeFormat_msExA( \ LOCALE_SYSTEM_DEFAULT \ , 0 \ , &t \ , (tp) \ , &timeMarkers \ , buf \ , STLSOFT_NUM_ELEMENTS(buf) \ ); \ \ (!XTESTS_NS_C_QUAL(xTests_hasRequiredConditionFailed()) && \ XTESTS_NS_C_QUAL(xtests_testMultibyteStrings)(file, line, XTESTS_GET_FUNCTION_(), "", (r), (buf), XTESTS_NS_C_QUAL(xtestsComparisonEqual))); \ } while(0) /* ///////////////////////////////////////////////////////////////////////// * Forward declarations */ namespace { static void test_same_instance_SYSTEMTIME(void); static void test_same_time_SYSTEMTIME(void); static void test_different_ms_SYSTEMTIME(void); static void test_different_s_SYSTEMTIME(void); static void test_different_m_SYSTEMTIME(void); static void test_different_h_SYSTEMTIME(void); static void test_same_instance_FILETIME(void); static void test_same_time_FILETIME(void); static void test_different_ms_FILETIME(void); static void test_different_s_FILETIME(void); static void test_different_m_FILETIME(void); static void test_different_h_FILETIME(void); static void test_same_time_SYSTEMTIME_FILETIME(void); static void test_different_ms_SYSTEMTIME_FILETIME(void); static void test_different_s_SYSTEMTIME_FILETIME(void); static void test_different_m_SYSTEMTIME_FILETIME(void); static void test_different_h_SYSTEMTIME_FILETIME(void); static void test_1_5(void); static void test_1_6(void); static void test_1_7(void); static void test_1_8(void); static void test_1_9(void); static void test_1_10(void); static void test_1_11(void); static void test_1_12(void); static void test_1_13(void); } // anonymous namespace /* ///////////////////////////////////////////////////////////////////////// * Main */ int main(int argc, char **argv) { int retCode = EXIT_SUCCESS; int verbosity = 2; XTESTS_COMMANDLINE_PARSEVERBOSITY(argc, argv, &verbosity); if(XTESTS_START_RUNNER("test.unit.winstl.time.comparison_functions", verbosity)) { XTESTS_RUN_CASE(test_same_instance_SYSTEMTIME); XTESTS_RUN_CASE(test_same_time_SYSTEMTIME); XTESTS_RUN_CASE(test_different_ms_SYSTEMTIME); XTESTS_RUN_CASE(test_different_s_SYSTEMTIME); XTESTS_RUN_CASE(test_different_m_SYSTEMTIME); XTESTS_RUN_CASE(test_different_h_SYSTEMTIME); XTESTS_RUN_CASE(test_same_instance_FILETIME); XTESTS_RUN_CASE(test_same_time_FILETIME); XTESTS_RUN_CASE(test_different_ms_FILETIME); XTESTS_RUN_CASE(test_different_s_FILETIME); XTESTS_RUN_CASE(test_different_m_FILETIME); XTESTS_RUN_CASE(test_different_h_FILETIME); XTESTS_RUN_CASE(test_same_time_SYSTEMTIME_FILETIME); XTESTS_RUN_CASE(test_different_ms_SYSTEMTIME_FILETIME); XTESTS_RUN_CASE(test_different_s_SYSTEMTIME_FILETIME); XTESTS_RUN_CASE(test_different_m_SYSTEMTIME_FILETIME); XTESTS_RUN_CASE(test_different_h_SYSTEMTIME_FILETIME); XTESTS_RUN_CASE(test_1_5); XTESTS_RUN_CASE(test_1_6); XTESTS_RUN_CASE(test_1_7); XTESTS_RUN_CASE(test_1_8); XTESTS_RUN_CASE(test_1_9); XTESTS_RUN_CASE(test_1_10); XTESTS_RUN_CASE(test_1_11); XTESTS_RUN_CASE(test_1_12); XTESTS_RUN_CASE(test_1_13); XTESTS_PRINT_RESULTS(); XTESTS_END_RUNNER_UPDATE_EXITCODE(&retCode); } return retCode; } /* ///////////////////////////////////////////////////////////////////////// * Test function implementations */ namespace { using winstl::uint64_t; static void test_same_instance_SYSTEMTIME() { SYSTEMTIME t1 = { 0 }; t1.wYear = 2014; t1.wMonth = 4; t1.wDay = 8; t1.wHour = 7; t1.wMinute = 20; t1.wSecond = 23; t1.wMilliseconds = 0; int const cr = winstl::compare(t1, t1); XTESTS_TEST_INTEGER_EQUAL(0, cr); uint64_t const dus = winstl::absolute_difference_in_microseconds(t1, t1); uint64_t const dms = winstl::absolute_difference_in_milliseconds(t1, t1); uint64_t const ds = winstl::absolute_difference_in_seconds(t1, t1); XTESTS_TEST_INTEGER_EQUAL(0u, dus); XTESTS_TEST_INTEGER_EQUAL(0u, dms); XTESTS_TEST_INTEGER_EQUAL(0u, ds); } static void test_same_time_SYSTEMTIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2 = { 0 }; t1.wYear = t2.wYear = 2014; t1.wMonth = t2.wMonth = 4; t1.wDay = t2.wDay = 8; t1.wHour = t2.wHour = 7; t1.wMinute = t2.wMinute = 20; t1.wSecond = t2.wSecond = 23; t1.wMilliseconds = t2.wMilliseconds = 0; int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_EQUAL(0, cr1); XTESTS_TEST_INTEGER_EQUAL(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(0u, dus1); XTESTS_TEST_INTEGER_EQUAL(0u, dus2); XTESTS_TEST_INTEGER_EQUAL(0u, dms1); XTESTS_TEST_INTEGER_EQUAL(0u, dms2); XTESTS_TEST_INTEGER_EQUAL(0u, ds1); XTESTS_TEST_INTEGER_EQUAL(0u, ds2); } static void test_different_ms_SYSTEMTIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2 = { 0 }; t1.wYear = t2.wYear = 2014; t1.wMonth = t2.wMonth = 4; t1.wDay = t2.wDay = 8; t1.wHour = t2.wHour = 7; t1.wMinute = t2.wMinute = 20; t1.wSecond = t2.wSecond = 23; t1.wMilliseconds = 0; t2.wMilliseconds = 1; int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(1000u, dus1); XTESTS_TEST_INTEGER_EQUAL(1000u, dus2); XTESTS_TEST_INTEGER_EQUAL(1u, dms1); XTESTS_TEST_INTEGER_EQUAL(1u, dms2); XTESTS_TEST_INTEGER_EQUAL(0u, ds1); XTESTS_TEST_INTEGER_EQUAL(0u, ds2); } static void test_different_s_SYSTEMTIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2 = { 0 }; t1.wYear = t2.wYear = 2014; t1.wMonth = t2.wMonth = 4; t1.wDay = t2.wDay = 8; t1.wHour = t2.wHour = 7; t1.wMinute = t2.wMinute = 20; t1.wSecond = 23; t2.wSecond = 24; t1.wMilliseconds = t2.wMilliseconds = 0; int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(1000000u, dus1); XTESTS_TEST_INTEGER_EQUAL(1000000u, dus2); XTESTS_TEST_INTEGER_EQUAL(1000u, dms1); XTESTS_TEST_INTEGER_EQUAL(1000u, dms2); XTESTS_TEST_INTEGER_EQUAL(1u, ds1); XTESTS_TEST_INTEGER_EQUAL(1u, ds2); } static void test_different_m_SYSTEMTIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2 = { 0 }; t1.wYear = t2.wYear = 2014; t1.wMonth = t2.wMonth = 4; t1.wDay = t2.wDay = 8; t1.wHour = t2.wHour = 7; t1.wMinute = 10; t2.wMinute = 11; t1.wSecond = t2.wSecond = 23; t1.wMilliseconds = t2.wMilliseconds = 0; int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(60000000u, dus1); XTESTS_TEST_INTEGER_EQUAL(60000000u, dus2); XTESTS_TEST_INTEGER_EQUAL(60000u, dms1); XTESTS_TEST_INTEGER_EQUAL(60000u, dms2); XTESTS_TEST_INTEGER_EQUAL(60u, ds1); XTESTS_TEST_INTEGER_EQUAL(60u, ds2); } static void test_different_h_SYSTEMTIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2 = { 0 }; t1.wYear = t2.wYear = 2014; t1.wMonth = t2.wMonth = 4; t1.wDay = t2.wDay = 8; t1.wHour = 7; t2.wHour = 8; t1.wMinute = t2.wMinute = 10; t1.wSecond = t2.wSecond = 23; t1.wMilliseconds = t2.wMilliseconds = 0; int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(3600000000u, dus1); XTESTS_TEST_INTEGER_EQUAL(3600000000u, dus2); XTESTS_TEST_INTEGER_EQUAL(3600000u, dms1); XTESTS_TEST_INTEGER_EQUAL(3600000u, dms2); XTESTS_TEST_INTEGER_EQUAL(3600u, ds1); XTESTS_TEST_INTEGER_EQUAL(3600u, ds2); } static void test_same_instance_FILETIME() { SYSTEMTIME t1_ = { 0 }; t1_.wYear = 2014; t1_.wMonth = 4; t1_.wDay = 8; t1_.wHour = 7; t1_.wMinute = 20; t1_.wSecond = 23; t1_.wMilliseconds = 0; FILETIME t1 = winstl::to_FILETIME(t1_); int const cr = winstl::compare(t1, t1); XTESTS_TEST_INTEGER_EQUAL(0, cr); uint64_t const dus = winstl::absolute_difference_in_microseconds(t1, t1); uint64_t const dms = winstl::absolute_difference_in_milliseconds(t1, t1); uint64_t const ds = winstl::absolute_difference_in_seconds(t1, t1); XTESTS_TEST_INTEGER_EQUAL(0u, dus); XTESTS_TEST_INTEGER_EQUAL(0u, dms); XTESTS_TEST_INTEGER_EQUAL(0u, ds); } static void test_same_time_FILETIME() { SYSTEMTIME t1_ = { 0 }; SYSTEMTIME t2_ = { 0 }; t1_.wYear = t2_.wYear = 2014; t1_.wMonth = t2_.wMonth = 4; t1_.wDay = t2_.wDay = 8; t1_.wHour = t2_.wHour = 7; t1_.wMinute = t2_.wMinute = 20; t1_.wSecond = t2_.wSecond = 23; t1_.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t1 = winstl::to_FILETIME(t1_); FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_EQUAL(0, cr1); XTESTS_TEST_INTEGER_EQUAL(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(0u, dus1); XTESTS_TEST_INTEGER_EQUAL(0u, dus2); XTESTS_TEST_INTEGER_EQUAL(0u, dms1); XTESTS_TEST_INTEGER_EQUAL(0u, dms2); XTESTS_TEST_INTEGER_EQUAL(0u, ds1); XTESTS_TEST_INTEGER_EQUAL(0u, ds2); } static void test_different_ms_FILETIME() { SYSTEMTIME t1_ = { 0 }; SYSTEMTIME t2_ = { 0 }; t1_.wYear = t2_.wYear = 2014; t1_.wMonth = t2_.wMonth = 4; t1_.wDay = t2_.wDay = 8; t1_.wHour = t2_.wHour = 7; t1_.wMinute = t2_.wMinute = 20; t1_.wSecond = t2_.wSecond = 23; t1_.wMilliseconds = 0; t2_.wMilliseconds = 1; FILETIME t1 = winstl::to_FILETIME(t1_); FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(1000u, dus1); XTESTS_TEST_INTEGER_EQUAL(1000u, dus2); XTESTS_TEST_INTEGER_EQUAL(1u, dms1); XTESTS_TEST_INTEGER_EQUAL(1u, dms2); XTESTS_TEST_INTEGER_EQUAL(0u, ds1); XTESTS_TEST_INTEGER_EQUAL(0u, ds2); } static void test_different_s_FILETIME() { SYSTEMTIME t1_ = { 0 }; SYSTEMTIME t2_ = { 0 }; t1_.wYear = t2_.wYear = 2014; t1_.wMonth = t2_.wMonth = 4; t1_.wDay = t2_.wDay = 8; t1_.wHour = t2_.wHour = 7; t1_.wMinute = t2_.wMinute = 20; t1_.wSecond = 23; t2_.wSecond = 24; t1_.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t1 = winstl::to_FILETIME(t1_); FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(1000000u, dus1); XTESTS_TEST_INTEGER_EQUAL(1000000u, dus2); XTESTS_TEST_INTEGER_EQUAL(1000u, dms1); XTESTS_TEST_INTEGER_EQUAL(1000u, dms2); XTESTS_TEST_INTEGER_EQUAL(1u, ds1); XTESTS_TEST_INTEGER_EQUAL(1u, ds2); } static void test_different_m_FILETIME() { SYSTEMTIME t1_ = { 0 }; SYSTEMTIME t2_ = { 0 }; t1_.wYear = t2_.wYear = 2014; t1_.wMonth = t2_.wMonth = 4; t1_.wDay = t2_.wDay = 8; t1_.wHour = t2_.wHour = 7; t1_.wMinute = 10; t2_.wMinute = 11; t1_.wSecond = t2_.wSecond = 23; t1_.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t1 = winstl::to_FILETIME(t1_); FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(60000000u, dus1); XTESTS_TEST_INTEGER_EQUAL(60000000u, dus2); XTESTS_TEST_INTEGER_EQUAL(60000u, dms1); XTESTS_TEST_INTEGER_EQUAL(60000u, dms2); XTESTS_TEST_INTEGER_EQUAL(60u, ds1); XTESTS_TEST_INTEGER_EQUAL(60u, ds2); } static void test_different_h_FILETIME() { SYSTEMTIME t1_ = { 0 }; SYSTEMTIME t2_ = { 0 }; t1_.wYear = t2_.wYear = 2014; t1_.wMonth = t2_.wMonth = 4; t1_.wDay = t2_.wDay = 8; t1_.wHour = 7; t2_.wHour = 8; t1_.wMinute = t2_.wMinute = 10; t1_.wSecond = t2_.wSecond = 23; t1_.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t1 = winstl::to_FILETIME(t1_); FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); uint64_t const dus1 = winstl::absolute_difference_in_microseconds(t1, t2); uint64_t const dus2 = winstl::absolute_difference_in_microseconds(t2, t1); uint64_t const dms1 = winstl::absolute_difference_in_milliseconds(t1, t2); uint64_t const dms2 = winstl::absolute_difference_in_milliseconds(t2, t1); uint64_t const ds1 = winstl::absolute_difference_in_seconds(t1, t2); uint64_t const ds2 = winstl::absolute_difference_in_seconds(t2, t1); XTESTS_TEST_INTEGER_EQUAL(3600000000u, dus1); XTESTS_TEST_INTEGER_EQUAL(3600000000u, dus2); XTESTS_TEST_INTEGER_EQUAL(3600000u, dms1); XTESTS_TEST_INTEGER_EQUAL(3600000u, dms2); XTESTS_TEST_INTEGER_EQUAL(3600u, ds1); XTESTS_TEST_INTEGER_EQUAL(3600u, ds2); } static void test_same_time_SYSTEMTIME_FILETIME() { SYSTEMTIME t1 = { 0 }; t1.wYear = 2014; t1.wMonth = 4; t1.wDay = 8; t1.wHour = 7; t1.wMinute = 20; t1.wSecond = 23; t1.wMilliseconds = 0; FILETIME t2 = winstl::to_FILETIME(t1); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_EQUAL(0, cr1); XTESTS_TEST_INTEGER_EQUAL(0, cr2); } static void test_different_ms_SYSTEMTIME_FILETIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2_ = { 0 }; t1.wYear = t2_.wYear = 2014; t1.wMonth = t2_.wMonth = 4; t1.wDay = t2_.wDay = 8; t1.wHour = t2_.wHour = 7; t1.wMinute = t2_.wMinute = 20; t1.wSecond = t2_.wSecond = 23; t1.wMilliseconds = 0; t2_.wMilliseconds = 1; FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); XTESTS_TEST_INTEGER_LESS(0, cr1); XTESTS_TEST_INTEGER_GREATER(0, cr2); } static void test_different_s_SYSTEMTIME_FILETIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2_ = { 0 }; t1.wYear = t2_.wYear = 2014; t1.wMonth = t2_.wMonth = 4; t1.wDay = t2_.wDay = 8; t1.wHour = t2_.wHour = 7; t1.wMinute = t2_.wMinute = 20; t1.wSecond = 23; t2_.wSecond = 24; t1.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); } static void test_different_m_SYSTEMTIME_FILETIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2_ = { 0 }; t1.wYear = t2_.wYear = 2014; t1.wMonth = t2_.wMonth = 4; t1.wDay = t2_.wDay = 8; t1.wHour = t2_.wHour = 7; t1.wMinute = 10; t2_.wMinute = 11; t1.wSecond = t2_.wSecond = 23; t1.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); } static void test_different_h_SYSTEMTIME_FILETIME() { SYSTEMTIME t1 = { 0 }; SYSTEMTIME t2_ = { 0 }; t1.wYear = t2_.wYear = 2014; t1.wMonth = t2_.wMonth = 4; t1.wDay = t2_.wDay = 8; t1.wHour = 7; t2_.wHour = 8; t1.wMinute = t2_.wMinute = 10; t1.wSecond = t2_.wSecond = 23; t1.wMilliseconds = t2_.wMilliseconds = 0; FILETIME t2 = winstl::to_FILETIME(t2_); int const cr1 = winstl::compare(t1, t2); int const cr2 = winstl::compare(t2, t1); } static void test_1_5() { } static void test_1_6() { } static void test_1_7() { } static void test_1_8() { } static void test_1_9() { } static void test_1_10() { } static void test_1_11() { } static void test_1_12() { } static void test_1_13() { } static void test_1_14() { } static void test_1_15() { } static void test_1_16() { } } // anonymous namespace /* ///////////////////////////// end of file //////////////////////////// */
[ "matthew@synesis.com.au" ]
matthew@synesis.com.au
de7a3fd2550f2f3593d61b439b3fdc09f48a0a09
ef66e297a49d04098d98a711ca3fda7b8a9a657c
/LeetCodeR2/498-Diagonal Traverse/solution.cpp
8f5295b9ca0851883874bca0255120ecdc733796
[]
no_license
breezy1812/MyCodes
34940357954dad35ddcf39aa6c9bc9e5cd1748eb
9e3d117d17025b3b587c5a80638cb8b3de754195
refs/heads/master
2020-07-19T13:36:05.270908
2018-12-15T08:54:30
2018-12-15T08:54:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
792
cpp
class Solution { public: vector<int> findDiagonalOrder(vector<vector<int>>& matrix) { vector<int> ans; int m = matrix.size(); if(m == 0) return ans; int n = matrix[0].size(); if(n == 0) return ans; int r = 0, c = 0; cout<<endl; while(r < m && c < n) { while(r >= 0 && c < n) ans.push_back(matrix[r--][c++]); r++; if(c == n) { r++; c--; } while(r < m && c >= 0) ans.push_back(matrix[r++][c--]); c++; if(r == m) { c++; r--; } } return ans; } };
[ "youchen.du@gmail.com" ]
youchen.du@gmail.com
4f0948054aae9dd9dbcf77b29ea36ff50b76fde4
568509efbe527fe3bc862f717014ab3e8bc6d18a
/tests/cpp/utils/utils_test.cpp
b52049d062b08b2ebad08329a2fb8a0c2d036c2d
[]
no_license
Silveryu/gng.r
9ab43426d86af21ec52534b0277608c9362a95d6
8876c7578fd1584c0e2d6a6ae7f1b1bd45b1c16c
refs/heads/master
2023-02-02T07:48:15.999468
2020-12-16T19:41:42
2020-12-16T19:41:42
192,547,448
3
0
null
null
null
null
UTF-8
C++
false
false
2,169
cpp
#include <string> #include <iostream> #include "gtest/gtest.h" #include "utils/utils.h" namespace { /* Fixture */ class UtilsTest: public ::testing::Test { protected: UtilsTest() {} virtual ~UtilsTest() {} /// Called immediately after the constructor (righ before each test) virtual void SetUp() {} /// Called immediately after each test (right before the destructor) virtual void TearDown() {} /* Objects declared here can be used by all tests in the test case */ std::string sample_args[5] { std::string(""), std::string("-a"), std::string("-d 4.51"), std::string("filename1 filename2 -a 1 -b 0 -c"), std::string("filename1 filename2 -a \t 1 -b 0\t\t-c") }; int sample_args_count[5] { 0, 1, 2, 7, 7 }; char sample_args_argv[5][7][10] = { {}, {"-a"}, {"-d", "4.51"}, {"filename1", "filename2", "-a", "1", "-b", "0", "-c"}, {"filename1", "filename2", "-a", "1", "-b", "0", "-c"} }; }; } // end namespace /* Fixture tests */ TEST_F(UtilsTest, check_argc) { int sample_num = sizeof(sample_args)/sizeof(*sample_args); for (int i = 0; i < sample_num; ++i) { ASSERT_EQ(check_argc(sample_args[i].c_str()), sample_args_count[i]); ASSERT_EQ(check_argc(sample_args[i]), sample_args_count[i]); } } TEST_F(UtilsTest, to_argv) { int sample_num = sizeof(sample_args)/sizeof(*sample_args); for (int i = 0; i < sample_num; ++i) { int argc = check_argc(sample_args[i].c_str()); char** argv = to_argv(sample_args[i].c_str()); for(int j = 0; j < argc; ++j) { ASSERT_EQ( std::string(argv[j]), std::string(sample_args_argv[i][j]) ); } } } TEST_F(UtilsTest, free_argv) { int sample_num = sizeof(sample_args)/sizeof(*sample_args); for (int i = 0; i < sample_num; ++i) { int argc = check_argc(sample_args[i].c_str()); char** argv = to_argv(sample_args[i].c_str()); argv = free_argv(argc, argv); ASSERT_TRUE(argv == NULL); } }
[ "konradtalik@gmail.com" ]
konradtalik@gmail.com
798f1d6b5a4170a6baa51079ccf126002c3a2d35
8a8aaf9f56f65006e5a0f46e757c47235674449d
/node-v10.16.0/deps/icu-small/source/common/ucnv.cpp
abf302eaddb7a80b5545265adbc5d7e69c9422ef
[ "ICU", "LicenseRef-scancode-unicode", "BSD-3-Clause", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "NAIST-2003", "LicenseRef-scancode-free-unknown", "NTP", "ISC", "Zlib", "LicenseRef-scancode-openssl", "Artistic-2.0", "LicenseRef-scancode-unknown-license-reference", "MIT", "Licen...
permissive
rgosdin/my-Project
3e97a13ee13aaddc017a52f744433964b25ea8e0
3c28543d40d49c2f007138a1efd3792f66fc83f9
refs/heads/master
2023-01-08T21:55:36.990231
2022-08-15T00:10:15
2022-08-15T00:10:15
193,466,047
1
0
Apache-2.0
2023-01-07T06:40:17
2019-06-24T08:32:33
C++
UTF-8
C++
false
false
94,323
cpp
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ****************************************************************************** * * Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** * * ucnv.c: * Implements APIs for the ICU's codeset conversion library; * mostly calls through internal functions; * created by Bertrand A. Damiba * * Modification History: * * Date Name Description * 04/04/99 helena Fixed internal header inclusion. * 05/09/00 helena Added implementation to handle fallback mappings. * 06/20/2000 helena OS/400 port changes; mostly typecast. */ #include "unicode/utypes.h" #if !UCONFIG_NO_CONVERSION #include "unicode/ustring.h" #include "unicode/ucnv.h" #include "unicode/ucnv_err.h" #include "unicode/uset.h" #include "unicode/utf.h" #include "unicode/utf16.h" #include "putilimp.h" #include "cmemory.h" #include "cstring.h" #include "uassert.h" #include "utracimp.h" #include "ustr_imp.h" #include "ucnv_imp.h" #include "ucnv_cnv.h" #include "ucnv_bld.h" /* size of intermediate and preflighting buffers in ucnv_convert() */ #define CHUNK_SIZE 1024 typedef struct UAmbiguousConverter { const char *name; const UChar variant5c; } UAmbiguousConverter; static const UAmbiguousConverter ambiguousConverters[]={ { "ibm-897_P100-1995", 0xa5 }, { "ibm-942_P120-1999", 0xa5 }, { "ibm-943_P130-1999", 0xa5 }, { "ibm-946_P100-1995", 0xa5 }, { "ibm-33722_P120-1999", 0xa5 }, { "ibm-1041_P100-1995", 0xa5 }, /*{ "ibm-54191_P100-2006", 0xa5 },*/ /*{ "ibm-62383_P100-2007", 0xa5 },*/ /*{ "ibm-891_P100-1995", 0x20a9 },*/ { "ibm-944_P100-1995", 0x20a9 }, { "ibm-949_P110-1999", 0x20a9 }, { "ibm-1363_P110-1997", 0x20a9 }, { "ISO_2022,locale=ko,version=0", 0x20a9 }, { "ibm-1088_P100-1995", 0x20a9 } }; /*Calls through createConverter */ U_CAPI UConverter* U_EXPORT2 ucnv_open (const char *name, UErrorCode * err) { UConverter *r; if (err == NULL || U_FAILURE (*err)) { return NULL; } r = ucnv_createConverter(NULL, name, err); return r; } U_CAPI UConverter* U_EXPORT2 ucnv_openPackage (const char *packageName, const char *converterName, UErrorCode * err) { return ucnv_createConverterFromPackage(packageName, converterName, err); } /*Extracts the UChar* to a char* and calls through createConverter */ U_CAPI UConverter* U_EXPORT2 ucnv_openU (const UChar * name, UErrorCode * err) { char asciiName[UCNV_MAX_CONVERTER_NAME_LENGTH]; if (err == NULL || U_FAILURE(*err)) return NULL; if (name == NULL) return ucnv_open (NULL, err); if (u_strlen(name) >= UCNV_MAX_CONVERTER_NAME_LENGTH) { *err = U_ILLEGAL_ARGUMENT_ERROR; return NULL; } return ucnv_open(u_austrcpy(asciiName, name), err); } /* Copy the string that is represented by the UConverterPlatform enum * @param platformString An output buffer * @param platform An enum representing a platform * @return the length of the copied string. */ static int32_t ucnv_copyPlatformString(char *platformString, UConverterPlatform pltfrm) { switch (pltfrm) { case UCNV_IBM: uprv_strcpy(platformString, "ibm-"); return 4; case UCNV_UNKNOWN: break; } /* default to empty string */ *platformString = 0; return 0; } /*Assumes a $platform-#codepage.$CONVERTER_FILE_EXTENSION scheme and calls *through createConverter*/ U_CAPI UConverter* U_EXPORT2 ucnv_openCCSID (int32_t codepage, UConverterPlatform platform, UErrorCode * err) { char myName[UCNV_MAX_CONVERTER_NAME_LENGTH]; int32_t myNameLen; if (err == NULL || U_FAILURE (*err)) return NULL; /* ucnv_copyPlatformString could return "ibm-" or "cp" */ myNameLen = ucnv_copyPlatformString(myName, platform); T_CString_integerToString(myName + myNameLen, codepage, 10); return ucnv_createConverter(NULL, myName, err); } /* Creating a temporary stack-based object that can be used in one thread, and created from a converter that is shared across threads. */ U_CAPI UConverter* U_EXPORT2 ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status) { UConverter *localConverter, *allocatedConverter; int32_t stackBufferSize; int32_t bufferSizeNeeded; char *stackBufferChars = (char *)stackBuffer; UErrorCode cbErr; UConverterToUnicodeArgs toUArgs = { sizeof(UConverterToUnicodeArgs), TRUE, NULL, NULL, NULL, NULL, NULL, NULL }; UConverterFromUnicodeArgs fromUArgs = { sizeof(UConverterFromUnicodeArgs), TRUE, NULL, NULL, NULL, NULL, NULL, NULL }; UTRACE_ENTRY_OC(UTRACE_UCNV_CLONE); if (status == NULL || U_FAILURE(*status)){ UTRACE_EXIT_STATUS(status? *status: U_ILLEGAL_ARGUMENT_ERROR); return NULL; } if (cnv == NULL) { *status = U_ILLEGAL_ARGUMENT_ERROR; UTRACE_EXIT_STATUS(*status); return NULL; } UTRACE_DATA3(UTRACE_OPEN_CLOSE, "clone converter %s at %p into stackBuffer %p", ucnv_getName(cnv, status), cnv, stackBuffer); if (cnv->sharedData->impl->safeClone != NULL) { /* call the custom safeClone function for sizing */ bufferSizeNeeded = 0; cnv->sharedData->impl->safeClone(cnv, NULL, &bufferSizeNeeded, status); if (U_FAILURE(*status)) { UTRACE_EXIT_STATUS(*status); return NULL; } } else { /* inherent sizing */ bufferSizeNeeded = sizeof(UConverter); } if (pBufferSize == NULL) { stackBufferSize = 1; pBufferSize = &stackBufferSize; } else { stackBufferSize = *pBufferSize; if (stackBufferSize <= 0){ /* 'preflighting' request - set needed size into *pBufferSize */ *pBufferSize = bufferSizeNeeded; UTRACE_EXIT_VALUE(bufferSizeNeeded); return NULL; } } /* Pointers on 64-bit platforms need to be aligned * on a 64-bit boundary in memory. */ if (U_ALIGNMENT_OFFSET(stackBuffer) != 0) { int32_t offsetUp = (int32_t)U_ALIGNMENT_OFFSET_UP(stackBufferChars); if(stackBufferSize > offsetUp) { stackBufferSize -= offsetUp; stackBufferChars += offsetUp; } else { /* prevent using the stack buffer but keep the size > 0 so that we do not just preflight */ stackBufferSize = 1; } } stackBuffer = (void *)stackBufferChars; /* Now, see if we must allocate any memory */ if (stackBufferSize < bufferSizeNeeded || stackBuffer == NULL) { /* allocate one here...*/ localConverter = allocatedConverter = (UConverter *) uprv_malloc (bufferSizeNeeded); if(localConverter == NULL) { *status = U_MEMORY_ALLOCATION_ERROR; UTRACE_EXIT_STATUS(*status); return NULL; } *status = U_SAFECLONE_ALLOCATED_WARNING; /* record the fact that memory was allocated */ *pBufferSize = bufferSizeNeeded; } else { /* just use the stack buffer */ localConverter = (UConverter*) stackBuffer; allocatedConverter = NULL; } uprv_memset(localConverter, 0, bufferSizeNeeded); /* Copy initial state */ uprv_memcpy(localConverter, cnv, sizeof(UConverter)); localConverter->isCopyLocal = localConverter->isExtraLocal = FALSE; /* copy the substitution string */ if (cnv->subChars == (uint8_t *)cnv->subUChars) { localConverter->subChars = (uint8_t *)localConverter->subUChars; } else { localConverter->subChars = (uint8_t *)uprv_malloc(UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); if (localConverter->subChars == NULL) { uprv_free(allocatedConverter); UTRACE_EXIT_STATUS(*status); return NULL; } uprv_memcpy(localConverter->subChars, cnv->subChars, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); } /* now either call the safeclone fcn or not */ if (cnv->sharedData->impl->safeClone != NULL) { /* call the custom safeClone function */ localConverter = cnv->sharedData->impl->safeClone(cnv, localConverter, pBufferSize, status); } if(localConverter==NULL || U_FAILURE(*status)) { if (allocatedConverter != NULL && allocatedConverter->subChars != (uint8_t *)allocatedConverter->subUChars) { uprv_free(allocatedConverter->subChars); } uprv_free(allocatedConverter); UTRACE_EXIT_STATUS(*status); return NULL; } /* increment refcount of shared data if needed */ if (cnv->sharedData->isReferenceCounted) { ucnv_incrementRefCount(cnv->sharedData); } if(localConverter == (UConverter*)stackBuffer) { /* we're using user provided data - set to not destroy */ localConverter->isCopyLocal = TRUE; } /* allow callback functions to handle any memory allocation */ toUArgs.converter = fromUArgs.converter = localConverter; cbErr = U_ZERO_ERROR; cnv->fromCharErrorBehaviour(cnv->toUContext, &toUArgs, NULL, 0, UCNV_CLONE, &cbErr); cbErr = U_ZERO_ERROR; cnv->fromUCharErrorBehaviour(cnv->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLONE, &cbErr); UTRACE_EXIT_PTR_STATUS(localConverter, *status); return localConverter; } /*Decreases the reference counter in the shared immutable section of the object *and frees the mutable part*/ U_CAPI void U_EXPORT2 ucnv_close (UConverter * converter) { UErrorCode errorCode = U_ZERO_ERROR; UTRACE_ENTRY_OC(UTRACE_UCNV_CLOSE); if (converter == NULL) { UTRACE_EXIT(); return; } UTRACE_DATA3(UTRACE_OPEN_CLOSE, "close converter %s at %p, isCopyLocal=%b", ucnv_getName(converter, &errorCode), converter, converter->isCopyLocal); /* In order to speed up the close, only call the callbacks when they have been changed. This performance check will only work when the callbacks are set within a shared library or from user code that statically links this code. */ /* first, notify the callback functions that the converter is closed */ if (converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) { UConverterToUnicodeArgs toUArgs = { sizeof(UConverterToUnicodeArgs), TRUE, NULL, NULL, NULL, NULL, NULL, NULL }; toUArgs.converter = converter; errorCode = U_ZERO_ERROR; converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_CLOSE, &errorCode); } if (converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) { UConverterFromUnicodeArgs fromUArgs = { sizeof(UConverterFromUnicodeArgs), TRUE, NULL, NULL, NULL, NULL, NULL, NULL }; fromUArgs.converter = converter; errorCode = U_ZERO_ERROR; converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_CLOSE, &errorCode); } if (converter->sharedData->impl->close != NULL) { converter->sharedData->impl->close(converter); } if (converter->subChars != (uint8_t *)converter->subUChars) { uprv_free(converter->subChars); } if (converter->sharedData->isReferenceCounted) { ucnv_unloadSharedDataIfReady(converter->sharedData); } if(!converter->isCopyLocal){ uprv_free(converter); } UTRACE_EXIT(); } /*returns a single Name from the list, will return NULL if out of bounds */ U_CAPI const char* U_EXPORT2 ucnv_getAvailableName (int32_t n) { if (0 <= n && n <= 0xffff) { UErrorCode err = U_ZERO_ERROR; const char *name = ucnv_bld_getAvailableConverter((uint16_t)n, &err); if (U_SUCCESS(err)) { return name; } } return NULL; } U_CAPI int32_t U_EXPORT2 ucnv_countAvailable () { UErrorCode err = U_ZERO_ERROR; return ucnv_bld_countAvailableConverters(&err); } U_CAPI void U_EXPORT2 ucnv_getSubstChars (const UConverter * converter, char *mySubChar, int8_t * len, UErrorCode * err) { if (U_FAILURE (*err)) return; if (converter->subCharLen <= 0) { /* Unicode string or empty string from ucnv_setSubstString(). */ *len = 0; return; } if (*len < converter->subCharLen) /*not enough space in subChars */ { *err = U_INDEX_OUTOFBOUNDS_ERROR; return; } uprv_memcpy (mySubChar, converter->subChars, converter->subCharLen); /*fills in the subchars */ *len = converter->subCharLen; /*store # of bytes copied to buffer */ } U_CAPI void U_EXPORT2 ucnv_setSubstChars (UConverter * converter, const char *mySubChar, int8_t len, UErrorCode * err) { if (U_FAILURE (*err)) return; /*Makes sure that the subChar is within the codepages char length boundaries */ if ((len > converter->sharedData->staticData->maxBytesPerChar) || (len < converter->sharedData->staticData->minBytesPerChar)) { *err = U_ILLEGAL_ARGUMENT_ERROR; return; } uprv_memcpy (converter->subChars, mySubChar, len); /*copies the subchars */ converter->subCharLen = len; /*sets the new len */ /* * There is currently (2001Feb) no separate API to set/get subChar1. * In order to always have subChar written after it is explicitly set, * we set subChar1 to 0. */ converter->subChar1 = 0; return; } U_CAPI void U_EXPORT2 ucnv_setSubstString(UConverter *cnv, const UChar *s, int32_t length, UErrorCode *err) { UAlignedMemory cloneBuffer[U_CNV_SAFECLONE_BUFFERSIZE / sizeof(UAlignedMemory) + 1]; char chars[UCNV_ERROR_BUFFER_LENGTH]; UConverter *clone; uint8_t *subChars; int32_t cloneSize, length8; /* Let the following functions check all arguments. */ cloneSize = sizeof(cloneBuffer); clone = ucnv_safeClone(cnv, cloneBuffer, &cloneSize, err); ucnv_setFromUCallBack(clone, UCNV_FROM_U_CALLBACK_STOP, NULL, NULL, NULL, err); length8 = ucnv_fromUChars(clone, chars, (int32_t)sizeof(chars), s, length, err); ucnv_close(clone); if (U_FAILURE(*err)) { return; } if (cnv->sharedData->impl->writeSub == NULL #if !UCONFIG_NO_LEGACY_CONVERSION || (cnv->sharedData->staticData->conversionType == UCNV_MBCS && ucnv_MBCSGetType(cnv) != UCNV_EBCDIC_STATEFUL) #endif ) { /* The converter is not stateful. Store the charset bytes as a fixed string. */ subChars = (uint8_t *)chars; } else { /* * The converter has a non-default writeSub() function, indicating * that it is stateful. * Store the Unicode string for on-the-fly conversion for correct * state handling. */ if (length > UCNV_ERROR_BUFFER_LENGTH) { /* * Should not occur. The converter should output at least one byte * per UChar, which means that ucnv_fromUChars() should catch all * overflows. */ *err = U_BUFFER_OVERFLOW_ERROR; return; } subChars = (uint8_t *)s; if (length < 0) { length = u_strlen(s); } length8 = length * U_SIZEOF_UCHAR; } /* * For storing the substitution string, select either the small buffer inside * UConverter or allocate a subChars buffer. */ if (length8 > UCNV_MAX_SUBCHAR_LEN) { /* Use a separate buffer for the string. Outside UConverter to not make it too large. */ if (cnv->subChars == (uint8_t *)cnv->subUChars) { /* Allocate a new buffer for the string. */ cnv->subChars = (uint8_t *)uprv_malloc(UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); if (cnv->subChars == NULL) { cnv->subChars = (uint8_t *)cnv->subUChars; *err = U_MEMORY_ALLOCATION_ERROR; return; } uprv_memset(cnv->subChars, 0, UCNV_ERROR_BUFFER_LENGTH * U_SIZEOF_UCHAR); } } /* Copy the substitution string into the UConverter or its subChars buffer. */ if (length8 == 0) { cnv->subCharLen = 0; } else { uprv_memcpy(cnv->subChars, subChars, length8); if (subChars == (uint8_t *)chars) { cnv->subCharLen = (int8_t)length8; } else /* subChars == s */ { cnv->subCharLen = (int8_t)-length; } } /* See comment in ucnv_setSubstChars(). */ cnv->subChar1 = 0; } /*resets the internal states of a converter *goal : have the same behaviour than a freshly created converter */ static void _reset(UConverter *converter, UConverterResetChoice choice, UBool callCallback) { if(converter == NULL) { return; } if(callCallback) { /* first, notify the callback functions that the converter is reset */ UErrorCode errorCode; if(choice<=UCNV_RESET_TO_UNICODE && converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) { UConverterToUnicodeArgs toUArgs = { sizeof(UConverterToUnicodeArgs), TRUE, NULL, NULL, NULL, NULL, NULL, NULL }; toUArgs.converter = converter; errorCode = U_ZERO_ERROR; converter->fromCharErrorBehaviour(converter->toUContext, &toUArgs, NULL, 0, UCNV_RESET, &errorCode); } if(choice!=UCNV_RESET_TO_UNICODE && converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) { UConverterFromUnicodeArgs fromUArgs = { sizeof(UConverterFromUnicodeArgs), TRUE, NULL, NULL, NULL, NULL, NULL, NULL }; fromUArgs.converter = converter; errorCode = U_ZERO_ERROR; converter->fromUCharErrorBehaviour(converter->fromUContext, &fromUArgs, NULL, 0, 0, UCNV_RESET, &errorCode); } } /* now reset the converter itself */ if(choice<=UCNV_RESET_TO_UNICODE) { converter->toUnicodeStatus = converter->sharedData->toUnicodeStatus; converter->mode = 0; converter->toULength = 0; converter->invalidCharLength = converter->UCharErrorBufferLength = 0; converter->preToULength = 0; } if(choice!=UCNV_RESET_TO_UNICODE) { converter->fromUnicodeStatus = 0; converter->fromUChar32 = 0; converter->invalidUCharLength = converter->charErrorBufferLength = 0; converter->preFromUFirstCP = U_SENTINEL; converter->preFromULength = 0; } if (converter->sharedData->impl->reset != NULL) { /* call the custom reset function */ converter->sharedData->impl->reset(converter, choice); } } U_CAPI void U_EXPORT2 ucnv_reset(UConverter *converter) { _reset(converter, UCNV_RESET_BOTH, TRUE); } U_CAPI void U_EXPORT2 ucnv_resetToUnicode(UConverter *converter) { _reset(converter, UCNV_RESET_TO_UNICODE, TRUE); } U_CAPI void U_EXPORT2 ucnv_resetFromUnicode(UConverter *converter) { _reset(converter, UCNV_RESET_FROM_UNICODE, TRUE); } U_CAPI int8_t U_EXPORT2 ucnv_getMaxCharSize (const UConverter * converter) { return converter->maxBytesPerUChar; } U_CAPI int8_t U_EXPORT2 ucnv_getMinCharSize (const UConverter * converter) { return converter->sharedData->staticData->minBytesPerChar; } U_CAPI const char* U_EXPORT2 ucnv_getName (const UConverter * converter, UErrorCode * err) { if (U_FAILURE (*err)) return NULL; if(converter->sharedData->impl->getName){ const char* temp= converter->sharedData->impl->getName(converter); if(temp) return temp; } return converter->sharedData->staticData->name; } U_CAPI int32_t U_EXPORT2 ucnv_getCCSID(const UConverter * converter, UErrorCode * err) { int32_t ccsid; if (U_FAILURE (*err)) return -1; ccsid = converter->sharedData->staticData->codepage; if (ccsid == 0) { /* Rare case. This is for cases like gb18030, which doesn't have an IBM canonical name, but does have an IBM alias. */ const char *standardName = ucnv_getStandardName(ucnv_getName(converter, err), "IBM", err); if (U_SUCCESS(*err) && standardName) { const char *ccsidStr = uprv_strchr(standardName, '-'); if (ccsidStr) { ccsid = (int32_t)atol(ccsidStr+1); /* +1 to skip '-' */ } } } return ccsid; } U_CAPI UConverterPlatform U_EXPORT2 ucnv_getPlatform (const UConverter * converter, UErrorCode * err) { if (U_FAILURE (*err)) return UCNV_UNKNOWN; return (UConverterPlatform)converter->sharedData->staticData->platform; } U_CAPI void U_EXPORT2 ucnv_getToUCallBack (const UConverter * converter, UConverterToUCallback *action, const void **context) { *action = converter->fromCharErrorBehaviour; *context = converter->toUContext; } U_CAPI void U_EXPORT2 ucnv_getFromUCallBack (const UConverter * converter, UConverterFromUCallback *action, const void **context) { *action = converter->fromUCharErrorBehaviour; *context = converter->fromUContext; } U_CAPI void U_EXPORT2 ucnv_setToUCallBack (UConverter * converter, UConverterToUCallback newAction, const void* newContext, UConverterToUCallback *oldAction, const void** oldContext, UErrorCode * err) { if (U_FAILURE (*err)) return; if (oldAction) *oldAction = converter->fromCharErrorBehaviour; converter->fromCharErrorBehaviour = newAction; if (oldContext) *oldContext = converter->toUContext; converter->toUContext = newContext; } U_CAPI void U_EXPORT2 ucnv_setFromUCallBack (UConverter * converter, UConverterFromUCallback newAction, const void* newContext, UConverterFromUCallback *oldAction, const void** oldContext, UErrorCode * err) { if (U_FAILURE (*err)) return; if (oldAction) *oldAction = converter->fromUCharErrorBehaviour; converter->fromUCharErrorBehaviour = newAction; if (oldContext) *oldContext = converter->fromUContext; converter->fromUContext = newContext; } static void _updateOffsets(int32_t *offsets, int32_t length, int32_t sourceIndex, int32_t errorInputLength) { int32_t *limit; int32_t delta, offset; if(sourceIndex>=0) { /* * adjust each offset by adding the previous sourceIndex * minus the length of the input sequence that caused an * error, if any */ delta=sourceIndex-errorInputLength; } else { /* * set each offset to -1 because this conversion function * does not handle offsets */ delta=-1; } limit=offsets+length; if(delta==0) { /* most common case, nothing to do */ } else if(delta>0) { /* add the delta to each offset (but not if the offset is <0) */ while(offsets<limit) { offset=*offsets; if(offset>=0) { *offsets=offset+delta; } ++offsets; } } else /* delta<0 */ { /* * set each offset to -1 because this conversion function * does not handle offsets * or the error input sequence started in a previous buffer */ while(offsets<limit) { *offsets++=-1; } } } /* ucnv_fromUnicode --------------------------------------------------------- */ /* * Implementation note for m:n conversions * * While collecting source units to find the longest match for m:n conversion, * some source units may need to be stored for a partial match. * When a second buffer does not yield a match on all of the previously stored * source units, then they must be "replayed", i.e., fed back into the converter. * * The code relies on the fact that replaying will not nest - * converting a replay buffer will not result in a replay. * This is because a replay is necessary only after the _continuation_ of a * partial match failed, but a replay buffer is converted as a whole. * It may result in some of its units being stored again for a partial match, * but there will not be a continuation _during_ the replay which could fail. * * It is conceivable that a callback function could call the converter * recursively in a way that causes another replay to be stored, but that * would be an error in the callback function. * Such violations will cause assertion failures in a debug build, * and wrong output, but they will not cause a crash. */ static void _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { UConverterFromUnicode fromUnicode; UConverter *cnv; const UChar *s; char *t; int32_t *offsets; int32_t sourceIndex; int32_t errorInputLength; UBool converterSawEndOfInput, calledCallback; /* variables for m:n conversion */ UChar replay[UCNV_EXT_MAX_UCHARS]; const UChar *realSource, *realSourceLimit; int32_t realSourceIndex; UBool realFlush; cnv=pArgs->converter; s=pArgs->source; t=pArgs->target; offsets=pArgs->offsets; /* get the converter implementation function */ sourceIndex=0; if(offsets==NULL) { fromUnicode=cnv->sharedData->impl->fromUnicode; } else { fromUnicode=cnv->sharedData->impl->fromUnicodeWithOffsets; if(fromUnicode==NULL) { /* there is no WithOffsets implementation */ fromUnicode=cnv->sharedData->impl->fromUnicode; /* we will write -1 for each offset */ sourceIndex=-1; } } if(cnv->preFromULength>=0) { /* normal mode */ realSource=NULL; /* avoid compiler warnings - not otherwise necessary, and the values do not matter */ realSourceLimit=NULL; realFlush=FALSE; realSourceIndex=0; } else { /* * Previous m:n conversion stored source units from a partial match * and failed to consume all of them. * We need to "replay" them from a temporary buffer and convert them first. */ realSource=pArgs->source; realSourceLimit=pArgs->sourceLimit; realFlush=pArgs->flush; realSourceIndex=sourceIndex; uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preFromULength; pArgs->flush=FALSE; sourceIndex=-1; cnv->preFromULength=0; } /* * loop for conversion and error handling * * loop { * convert * loop { * update offsets * handle end of input * handle errors/call callback * } * } */ for(;;) { if(U_SUCCESS(*err)) { /* convert */ fromUnicode(pArgs, err); /* * set a flag for whether the converter * successfully processed the end of the input * * need not check cnv->preFromULength==0 because a replay (<0) will cause * s<sourceLimit before converterSawEndOfInput is checked */ converterSawEndOfInput= (UBool)(U_SUCCESS(*err) && pArgs->flush && pArgs->source==pArgs->sourceLimit && cnv->fromUChar32==0); } else { /* handle error from ucnv_convertEx() */ converterSawEndOfInput=FALSE; } /* no callback called yet for this iteration */ calledCallback=FALSE; /* no sourceIndex adjustment for conversion, only for callback output */ errorInputLength=0; /* * loop for offsets and error handling * * iterates at most 3 times: * 1. to clean up after the conversion function * 2. after the callback * 3. after the callback again if there was truncated input */ for(;;) { /* update offsets if we write any */ if(offsets!=NULL) { int32_t length=(int32_t)(pArgs->target-t); if(length>0) { _updateOffsets(offsets, length, sourceIndex, errorInputLength); /* * if a converter handles offsets and updates the offsets * pointer at the end, then pArgs->offset should not change * here; * however, some converters do not handle offsets at all * (sourceIndex<0) or may not update the offsets pointer */ pArgs->offsets=offsets+=length; } if(sourceIndex>=0) { sourceIndex+=(int32_t)(pArgs->source-s); } } if(cnv->preFromULength<0) { /* * switch the source to new replay units (cannot occur while replaying) * after offset handling and before end-of-input and callback handling */ if(realSource==NULL) { realSource=pArgs->source; realSourceLimit=pArgs->sourceLimit; realFlush=pArgs->flush; realSourceIndex=sourceIndex; uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preFromULength; pArgs->flush=FALSE; if((sourceIndex+=cnv->preFromULength)<0) { sourceIndex=-1; } cnv->preFromULength=0; } else { /* see implementation note before _fromUnicodeWithCallback() */ U_ASSERT(realSource==NULL); *err=U_INTERNAL_PROGRAM_ERROR; } } /* update pointers */ s=pArgs->source; t=pArgs->target; if(U_SUCCESS(*err)) { if(s<pArgs->sourceLimit) { /* * continue with the conversion loop while there is still input left * (continue converting by breaking out of only the inner loop) */ break; } else if(realSource!=NULL) { /* switch back from replaying to the real source and continue */ pArgs->source=realSource; pArgs->sourceLimit=realSourceLimit; pArgs->flush=realFlush; sourceIndex=realSourceIndex; realSource=NULL; break; } else if(pArgs->flush && cnv->fromUChar32!=0) { /* * the entire input stream is consumed * and there is a partial, truncated input sequence left */ /* inject an error and continue with callback handling */ *err=U_TRUNCATED_CHAR_FOUND; calledCallback=FALSE; /* new error condition */ } else { /* input consumed */ if(pArgs->flush) { /* * return to the conversion loop once more if the flush * flag is set and the conversion function has not * successfully processed the end of the input yet * * (continue converting by breaking out of only the inner loop) */ if(!converterSawEndOfInput) { break; } /* reset the converter without calling the callback function */ _reset(cnv, UCNV_RESET_FROM_UNICODE, FALSE); } /* done successfully */ return; } } /* U_FAILURE(*err) */ { UErrorCode e; if( calledCallback || (e=*err)==U_BUFFER_OVERFLOW_ERROR || (e!=U_INVALID_CHAR_FOUND && e!=U_ILLEGAL_CHAR_FOUND && e!=U_TRUNCATED_CHAR_FOUND) ) { /* * the callback did not or cannot resolve the error: * set output pointers and return * * the check for buffer overflow is redundant but it is * a high-runner case and hopefully documents the intent * well * * if we were replaying, then the replay buffer must be * copied back into the UConverter * and the real arguments must be restored */ if(realSource!=NULL) { int32_t length; U_ASSERT(cnv->preFromULength==0); length=(int32_t)(pArgs->sourceLimit-pArgs->source); if(length>0) { u_memcpy(cnv->preFromU, pArgs->source, length); cnv->preFromULength=(int8_t)-length; } pArgs->source=realSource; pArgs->sourceLimit=realSourceLimit; pArgs->flush=realFlush; } return; } } /* callback handling */ { UChar32 codePoint; /* get and write the code point */ codePoint=cnv->fromUChar32; errorInputLength=0; U16_APPEND_UNSAFE(cnv->invalidUCharBuffer, errorInputLength, codePoint); cnv->invalidUCharLength=(int8_t)errorInputLength; /* set the converter state to deal with the next character */ cnv->fromUChar32=0; /* call the callback function */ cnv->fromUCharErrorBehaviour(cnv->fromUContext, pArgs, cnv->invalidUCharBuffer, errorInputLength, codePoint, *err==U_INVALID_CHAR_FOUND ? UCNV_UNASSIGNED : UCNV_ILLEGAL, err); } /* * loop back to the offset handling * * this flag will indicate after offset handling * that a callback was called; * if the callback did not resolve the error, then we return */ calledCallback=TRUE; } } } /* * Output the fromUnicode overflow buffer. * Call this function if(cnv->charErrorBufferLength>0). * @return TRUE if overflow */ static UBool ucnv_outputOverflowFromUnicode(UConverter *cnv, char **target, const char *targetLimit, int32_t **pOffsets, UErrorCode *err) { int32_t *offsets; char *overflow, *t; int32_t i, length; t=*target; if(pOffsets!=NULL) { offsets=*pOffsets; } else { offsets=NULL; } overflow=(char *)cnv->charErrorBuffer; length=cnv->charErrorBufferLength; i=0; while(i<length) { if(t==targetLimit) { /* the overflow buffer contains too much, keep the rest */ int32_t j=0; do { overflow[j++]=overflow[i++]; } while(i<length); cnv->charErrorBufferLength=(int8_t)j; *target=t; if(offsets!=NULL) { *pOffsets=offsets; } *err=U_BUFFER_OVERFLOW_ERROR; return TRUE; } /* copy the overflow contents to the target */ *t++=overflow[i++]; if(offsets!=NULL) { *offsets++=-1; /* no source index available for old output */ } } /* the overflow buffer is completely copied to the target */ cnv->charErrorBufferLength=0; *target=t; if(offsets!=NULL) { *pOffsets=offsets; } return FALSE; } U_CAPI void U_EXPORT2 ucnv_fromUnicode(UConverter *cnv, char **target, const char *targetLimit, const UChar **source, const UChar *sourceLimit, int32_t *offsets, UBool flush, UErrorCode *err) { UConverterFromUnicodeArgs args; const UChar *s; char *t; /* check parameters */ if(err==NULL || U_FAILURE(*err)) { return; } if(cnv==NULL || target==NULL || source==NULL) { *err=U_ILLEGAL_ARGUMENT_ERROR; return; } s=*source; t=*target; if ((const void *)U_MAX_PTR(sourceLimit) == (const void *)sourceLimit) { /* Prevent code from going into an infinite loop in case we do hit this limit. The limit pointer is expected to be on a UChar * boundary. This also prevents the next argument check from failing. */ sourceLimit = (const UChar *)(((const char *)sourceLimit) - 1); } /* * All these conditions should never happen. * * 1) Make sure that the limits are >= to the address source or target * * 2) Make sure that the buffer sizes do not exceed the number range for * int32_t because some functions use the size (in units or bytes) * rather than comparing pointers, and because offsets are int32_t values. * * size_t is guaranteed to be unsigned and large enough for the job. * * Return with an error instead of adjusting the limits because we would * not be able to maintain the semantics that either the source must be * consumed or the target filled (unless an error occurs). * An adjustment would be targetLimit=t+0x7fffffff; for example. * * 3) Make sure that the user didn't incorrectly cast a UChar * pointer * to a char * pointer and provide an incomplete UChar code unit. */ if (sourceLimit<s || targetLimit<t || ((size_t)(sourceLimit-s)>(size_t)0x3fffffff && sourceLimit>s) || ((size_t)(targetLimit-t)>(size_t)0x7fffffff && targetLimit>t) || (((const char *)sourceLimit-(const char *)s) & 1) != 0) { *err=U_ILLEGAL_ARGUMENT_ERROR; return; } /* output the target overflow buffer */ if( cnv->charErrorBufferLength>0 && ucnv_outputOverflowFromUnicode(cnv, target, targetLimit, &offsets, err) ) { /* U_BUFFER_OVERFLOW_ERROR */ return; } /* *target may have moved, therefore stop using t */ if(!flush && s==sourceLimit && cnv->preFromULength>=0) { /* the overflow buffer is emptied and there is no new input: we are done */ return; } /* * Do not simply return with a buffer overflow error if * !flush && t==targetLimit * because it is possible that the source will not generate any output. * For example, the skip callback may be called; * it does not output anything. */ /* prepare the converter arguments */ args.converter=cnv; args.flush=flush; args.offsets=offsets; args.source=s; args.sourceLimit=sourceLimit; args.target=*target; args.targetLimit=targetLimit; args.size=sizeof(args); _fromUnicodeWithCallback(&args, err); *source=args.source; *target=args.target; } /* ucnv_toUnicode() --------------------------------------------------------- */ static void _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { UConverterToUnicode toUnicode; UConverter *cnv; const char *s; UChar *t; int32_t *offsets; int32_t sourceIndex; int32_t errorInputLength; UBool converterSawEndOfInput, calledCallback; /* variables for m:n conversion */ char replay[UCNV_EXT_MAX_BYTES]; const char *realSource, *realSourceLimit; int32_t realSourceIndex; UBool realFlush; cnv=pArgs->converter; s=pArgs->source; t=pArgs->target; offsets=pArgs->offsets; /* get the converter implementation function */ sourceIndex=0; if(offsets==NULL) { toUnicode=cnv->sharedData->impl->toUnicode; } else { toUnicode=cnv->sharedData->impl->toUnicodeWithOffsets; if(toUnicode==NULL) { /* there is no WithOffsets implementation */ toUnicode=cnv->sharedData->impl->toUnicode; /* we will write -1 for each offset */ sourceIndex=-1; } } if(cnv->preToULength>=0) { /* normal mode */ realSource=NULL; /* avoid compiler warnings - not otherwise necessary, and the values do not matter */ realSourceLimit=NULL; realFlush=FALSE; realSourceIndex=0; } else { /* * Previous m:n conversion stored source units from a partial match * and failed to consume all of them. * We need to "replay" them from a temporary buffer and convert them first. */ realSource=pArgs->source; realSourceLimit=pArgs->sourceLimit; realFlush=pArgs->flush; realSourceIndex=sourceIndex; uprv_memcpy(replay, cnv->preToU, -cnv->preToULength); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preToULength; pArgs->flush=FALSE; sourceIndex=-1; cnv->preToULength=0; } /* * loop for conversion and error handling * * loop { * convert * loop { * update offsets * handle end of input * handle errors/call callback * } * } */ for(;;) { if(U_SUCCESS(*err)) { /* convert */ toUnicode(pArgs, err); /* * set a flag for whether the converter * successfully processed the end of the input * * need not check cnv->preToULength==0 because a replay (<0) will cause * s<sourceLimit before converterSawEndOfInput is checked */ converterSawEndOfInput= (UBool)(U_SUCCESS(*err) && pArgs->flush && pArgs->source==pArgs->sourceLimit && cnv->toULength==0); } else { /* handle error from getNextUChar() or ucnv_convertEx() */ converterSawEndOfInput=FALSE; } /* no callback called yet for this iteration */ calledCallback=FALSE; /* no sourceIndex adjustment for conversion, only for callback output */ errorInputLength=0; /* * loop for offsets and error handling * * iterates at most 3 times: * 1. to clean up after the conversion function * 2. after the callback * 3. after the callback again if there was truncated input */ for(;;) { /* update offsets if we write any */ if(offsets!=NULL) { int32_t length=(int32_t)(pArgs->target-t); if(length>0) { _updateOffsets(offsets, length, sourceIndex, errorInputLength); /* * if a converter handles offsets and updates the offsets * pointer at the end, then pArgs->offset should not change * here; * however, some converters do not handle offsets at all * (sourceIndex<0) or may not update the offsets pointer */ pArgs->offsets=offsets+=length; } if(sourceIndex>=0) { sourceIndex+=(int32_t)(pArgs->source-s); } } if(cnv->preToULength<0) { /* * switch the source to new replay units (cannot occur while replaying) * after offset handling and before end-of-input and callback handling */ if(realSource==NULL) { realSource=pArgs->source; realSourceLimit=pArgs->sourceLimit; realFlush=pArgs->flush; realSourceIndex=sourceIndex; uprv_memcpy(replay, cnv->preToU, -cnv->preToULength); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preToULength; pArgs->flush=FALSE; if((sourceIndex+=cnv->preToULength)<0) { sourceIndex=-1; } cnv->preToULength=0; } else { /* see implementation note before _fromUnicodeWithCallback() */ U_ASSERT(realSource==NULL); *err=U_INTERNAL_PROGRAM_ERROR; } } /* update pointers */ s=pArgs->source; t=pArgs->target; if(U_SUCCESS(*err)) { if(s<pArgs->sourceLimit) { /* * continue with the conversion loop while there is still input left * (continue converting by breaking out of only the inner loop) */ break; } else if(realSource!=NULL) { /* switch back from replaying to the real source and continue */ pArgs->source=realSource; pArgs->sourceLimit=realSourceLimit; pArgs->flush=realFlush; sourceIndex=realSourceIndex; realSource=NULL; break; } else if(pArgs->flush && cnv->toULength>0) { /* * the entire input stream is consumed * and there is a partial, truncated input sequence left */ /* inject an error and continue with callback handling */ *err=U_TRUNCATED_CHAR_FOUND; calledCallback=FALSE; /* new error condition */ } else { /* input consumed */ if(pArgs->flush) { /* * return to the conversion loop once more if the flush * flag is set and the conversion function has not * successfully processed the end of the input yet * * (continue converting by breaking out of only the inner loop) */ if(!converterSawEndOfInput) { break; } /* reset the converter without calling the callback function */ _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE); } /* done successfully */ return; } } /* U_FAILURE(*err) */ { UErrorCode e; if( calledCallback || (e=*err)==U_BUFFER_OVERFLOW_ERROR || (e!=U_INVALID_CHAR_FOUND && e!=U_ILLEGAL_CHAR_FOUND && e!=U_TRUNCATED_CHAR_FOUND && e!=U_ILLEGAL_ESCAPE_SEQUENCE && e!=U_UNSUPPORTED_ESCAPE_SEQUENCE) ) { /* * the callback did not or cannot resolve the error: * set output pointers and return * * the check for buffer overflow is redundant but it is * a high-runner case and hopefully documents the intent * well * * if we were replaying, then the replay buffer must be * copied back into the UConverter * and the real arguments must be restored */ if(realSource!=NULL) { int32_t length; U_ASSERT(cnv->preToULength==0); length=(int32_t)(pArgs->sourceLimit-pArgs->source); if(length>0) { uprv_memcpy(cnv->preToU, pArgs->source, length); cnv->preToULength=(int8_t)-length; } pArgs->source=realSource; pArgs->sourceLimit=realSourceLimit; pArgs->flush=realFlush; } return; } } /* copy toUBytes[] to invalidCharBuffer[] */ errorInputLength=cnv->invalidCharLength=cnv->toULength; if(errorInputLength>0) { uprv_memcpy(cnv->invalidCharBuffer, cnv->toUBytes, errorInputLength); } /* set the converter state to deal with the next character */ cnv->toULength=0; /* call the callback function */ if(cnv->toUCallbackReason==UCNV_ILLEGAL && *err==U_INVALID_CHAR_FOUND) { cnv->toUCallbackReason = UCNV_UNASSIGNED; } cnv->fromCharErrorBehaviour(cnv->toUContext, pArgs, cnv->invalidCharBuffer, errorInputLength, cnv->toUCallbackReason, err); cnv->toUCallbackReason = UCNV_ILLEGAL; /* reset to default value */ /* * loop back to the offset handling * * this flag will indicate after offset handling * that a callback was called; * if the callback did not resolve the error, then we return */ calledCallback=TRUE; } } } /* * Output the toUnicode overflow buffer. * Call this function if(cnv->UCharErrorBufferLength>0). * @return TRUE if overflow */ static UBool ucnv_outputOverflowToUnicode(UConverter *cnv, UChar **target, const UChar *targetLimit, int32_t **pOffsets, UErrorCode *err) { int32_t *offsets; UChar *overflow, *t; int32_t i, length; t=*target; if(pOffsets!=NULL) { offsets=*pOffsets; } else { offsets=NULL; } overflow=cnv->UCharErrorBuffer; length=cnv->UCharErrorBufferLength; i=0; while(i<length) { if(t==targetLimit) { /* the overflow buffer contains too much, keep the rest */ int32_t j=0; do { overflow[j++]=overflow[i++]; } while(i<length); cnv->UCharErrorBufferLength=(int8_t)j; *target=t; if(offsets!=NULL) { *pOffsets=offsets; } *err=U_BUFFER_OVERFLOW_ERROR; return TRUE; } /* copy the overflow contents to the target */ *t++=overflow[i++]; if(offsets!=NULL) { *offsets++=-1; /* no source index available for old output */ } } /* the overflow buffer is completely copied to the target */ cnv->UCharErrorBufferLength=0; *target=t; if(offsets!=NULL) { *pOffsets=offsets; } return FALSE; } U_CAPI void U_EXPORT2 ucnv_toUnicode(UConverter *cnv, UChar **target, const UChar *targetLimit, const char **source, const char *sourceLimit, int32_t *offsets, UBool flush, UErrorCode *err) { UConverterToUnicodeArgs args; const char *s; UChar *t; /* check parameters */ if(err==NULL || U_FAILURE(*err)) { return; } if(cnv==NULL || target==NULL || source==NULL) { *err=U_ILLEGAL_ARGUMENT_ERROR; return; } s=*source; t=*target; if ((const void *)U_MAX_PTR(targetLimit) == (const void *)targetLimit) { /* Prevent code from going into an infinite loop in case we do hit this limit. The limit pointer is expected to be on a UChar * boundary. This also prevents the next argument check from failing. */ targetLimit = (const UChar *)(((const char *)targetLimit) - 1); } /* * All these conditions should never happen. * * 1) Make sure that the limits are >= to the address source or target * * 2) Make sure that the buffer sizes do not exceed the number range for * int32_t because some functions use the size (in units or bytes) * rather than comparing pointers, and because offsets are int32_t values. * * size_t is guaranteed to be unsigned and large enough for the job. * * Return with an error instead of adjusting the limits because we would * not be able to maintain the semantics that either the source must be * consumed or the target filled (unless an error occurs). * An adjustment would be sourceLimit=t+0x7fffffff; for example. * * 3) Make sure that the user didn't incorrectly cast a UChar * pointer * to a char * pointer and provide an incomplete UChar code unit. */ if (sourceLimit<s || targetLimit<t || ((size_t)(sourceLimit-s)>(size_t)0x7fffffff && sourceLimit>s) || ((size_t)(targetLimit-t)>(size_t)0x3fffffff && targetLimit>t) || (((const char *)targetLimit-(const char *)t) & 1) != 0 ) { *err=U_ILLEGAL_ARGUMENT_ERROR; return; } /* output the target overflow buffer */ if( cnv->UCharErrorBufferLength>0 && ucnv_outputOverflowToUnicode(cnv, target, targetLimit, &offsets, err) ) { /* U_BUFFER_OVERFLOW_ERROR */ return; } /* *target may have moved, therefore stop using t */ if(!flush && s==sourceLimit && cnv->preToULength>=0) { /* the overflow buffer is emptied and there is no new input: we are done */ return; } /* * Do not simply return with a buffer overflow error if * !flush && t==targetLimit * because it is possible that the source will not generate any output. * For example, the skip callback may be called; * it does not output anything. */ /* prepare the converter arguments */ args.converter=cnv; args.flush=flush; args.offsets=offsets; args.source=s; args.sourceLimit=sourceLimit; args.target=*target; args.targetLimit=targetLimit; args.size=sizeof(args); _toUnicodeWithCallback(&args, err); *source=args.source; *target=args.target; } /* ucnv_to/fromUChars() ----------------------------------------------------- */ U_CAPI int32_t U_EXPORT2 ucnv_fromUChars(UConverter *cnv, char *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode) { const UChar *srcLimit; char *originalDest, *destLimit; int32_t destLength; /* check arguments */ if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) { return 0; } if( cnv==NULL || destCapacity<0 || (destCapacity>0 && dest==NULL) || srcLength<-1 || (srcLength!=0 && src==NULL) ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } /* initialize */ ucnv_resetFromUnicode(cnv); originalDest=dest; if(srcLength==-1) { srcLength=u_strlen(src); } if(srcLength>0) { srcLimit=src+srcLength; destCapacity=pinCapacity(dest, destCapacity); destLimit=dest+destCapacity; /* perform the conversion */ ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); destLength=(int32_t)(dest-originalDest); /* if an overflow occurs, then get the preflighting length */ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { char buffer[1024]; destLimit=buffer+sizeof(buffer); do { dest=buffer; *pErrorCode=U_ZERO_ERROR; ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); destLength+=(int32_t)(dest-buffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); } } else { destLength=0; } return u_terminateChars(originalDest, destCapacity, destLength, pErrorCode); } U_CAPI int32_t U_EXPORT2 ucnv_toUChars(UConverter *cnv, UChar *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode) { const char *srcLimit; UChar *originalDest, *destLimit; int32_t destLength; /* check arguments */ if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) { return 0; } if( cnv==NULL || destCapacity<0 || (destCapacity>0 && dest==NULL) || srcLength<-1 || (srcLength!=0 && src==NULL)) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } /* initialize */ ucnv_resetToUnicode(cnv); originalDest=dest; if(srcLength==-1) { srcLength=(int32_t)uprv_strlen(src); } if(srcLength>0) { srcLimit=src+srcLength; destCapacity=pinCapacity(dest, destCapacity); destLimit=dest+destCapacity; /* perform the conversion */ ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); destLength=(int32_t)(dest-originalDest); /* if an overflow occurs, then get the preflighting length */ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { UChar buffer[1024]; destLimit=buffer+UPRV_LENGTHOF(buffer); do { dest=buffer; *pErrorCode=U_ZERO_ERROR; ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); destLength+=(int32_t)(dest-buffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); } } else { destLength=0; } return u_terminateUChars(originalDest, destCapacity, destLength, pErrorCode); } /* ucnv_getNextUChar() ------------------------------------------------------ */ U_CAPI UChar32 U_EXPORT2 ucnv_getNextUChar(UConverter *cnv, const char **source, const char *sourceLimit, UErrorCode *err) { UConverterToUnicodeArgs args; UChar buffer[U16_MAX_LENGTH]; const char *s; UChar32 c; int32_t i, length; /* check parameters */ if(err==NULL || U_FAILURE(*err)) { return 0xffff; } if(cnv==NULL || source==NULL) { *err=U_ILLEGAL_ARGUMENT_ERROR; return 0xffff; } s=*source; if(sourceLimit<s) { *err=U_ILLEGAL_ARGUMENT_ERROR; return 0xffff; } /* * Make sure that the buffer sizes do not exceed the number range for * int32_t because some functions use the size (in units or bytes) * rather than comparing pointers, and because offsets are int32_t values. * * size_t is guaranteed to be unsigned and large enough for the job. * * Return with an error instead of adjusting the limits because we would * not be able to maintain the semantics that either the source must be * consumed or the target filled (unless an error occurs). * An adjustment would be sourceLimit=t+0x7fffffff; for example. */ if(((size_t)(sourceLimit-s)>(size_t)0x7fffffff && sourceLimit>s)) { *err=U_ILLEGAL_ARGUMENT_ERROR; return 0xffff; } c=U_SENTINEL; /* flush the target overflow buffer */ if(cnv->UCharErrorBufferLength>0) { UChar *overflow; overflow=cnv->UCharErrorBuffer; i=0; length=cnv->UCharErrorBufferLength; U16_NEXT(overflow, i, length, c); /* move the remaining overflow contents up to the beginning */ if((cnv->UCharErrorBufferLength=(int8_t)(length-i))>0) { uprv_memmove(cnv->UCharErrorBuffer, cnv->UCharErrorBuffer+i, cnv->UCharErrorBufferLength*U_SIZEOF_UCHAR); } if(!U16_IS_LEAD(c) || i<length) { return c; } /* * Continue if the overflow buffer contained only a lead surrogate, * in case the converter outputs single surrogates from complete * input sequences. */ } /* * flush==TRUE is implied for ucnv_getNextUChar() * * do not simply return even if s==sourceLimit because the converter may * not have seen flush==TRUE before */ /* prepare the converter arguments */ args.converter=cnv; args.flush=TRUE; args.offsets=NULL; args.source=s; args.sourceLimit=sourceLimit; args.target=buffer; args.targetLimit=buffer+1; args.size=sizeof(args); if(c<0) { /* * call the native getNextUChar() implementation if we are * at a character boundary (toULength==0) * * unlike with _toUnicode(), getNextUChar() implementations must set * U_TRUNCATED_CHAR_FOUND for truncated input, * in addition to setting toULength/toUBytes[] */ if(cnv->toULength==0 && cnv->sharedData->impl->getNextUChar!=NULL) { c=cnv->sharedData->impl->getNextUChar(&args, err); *source=s=args.source; if(*err==U_INDEX_OUTOFBOUNDS_ERROR) { /* reset the converter without calling the callback function */ _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE); return 0xffff; /* no output */ } else if(U_SUCCESS(*err) && c>=0) { return c; /* * else fall through to use _toUnicode() because * UCNV_GET_NEXT_UCHAR_USE_TO_U: the native function did not want to handle it after all * U_FAILURE: call _toUnicode() for callback handling (do not output c) */ } } /* convert to one UChar in buffer[0], or handle getNextUChar() errors */ _toUnicodeWithCallback(&args, err); if(*err==U_BUFFER_OVERFLOW_ERROR) { *err=U_ZERO_ERROR; } i=0; length=(int32_t)(args.target-buffer); } else { /* write the lead surrogate from the overflow buffer */ buffer[0]=(UChar)c; args.target=buffer+1; i=0; length=1; } /* buffer contents starts at i and ends before length */ if(U_FAILURE(*err)) { c=0xffff; /* no output */ } else if(length==0) { /* no input or only state changes */ *err=U_INDEX_OUTOFBOUNDS_ERROR; /* no need to reset explicitly because _toUnicodeWithCallback() did it */ c=0xffff; /* no output */ } else { c=buffer[0]; i=1; if(!U16_IS_LEAD(c)) { /* consume c=buffer[0], done */ } else { /* got a lead surrogate, see if a trail surrogate follows */ UChar c2; if(cnv->UCharErrorBufferLength>0) { /* got overflow output from the conversion */ if(U16_IS_TRAIL(c2=cnv->UCharErrorBuffer[0])) { /* got a trail surrogate, too */ c=U16_GET_SUPPLEMENTARY(c, c2); /* move the remaining overflow contents up to the beginning */ if((--cnv->UCharErrorBufferLength)>0) { uprv_memmove(cnv->UCharErrorBuffer, cnv->UCharErrorBuffer+1, cnv->UCharErrorBufferLength*U_SIZEOF_UCHAR); } } else { /* c is an unpaired lead surrogate, just return it */ } } else if(args.source<sourceLimit) { /* convert once more, to buffer[1] */ args.targetLimit=buffer+2; _toUnicodeWithCallback(&args, err); if(*err==U_BUFFER_OVERFLOW_ERROR) { *err=U_ZERO_ERROR; } length=(int32_t)(args.target-buffer); if(U_SUCCESS(*err) && length==2 && U16_IS_TRAIL(c2=buffer[1])) { /* got a trail surrogate, too */ c=U16_GET_SUPPLEMENTARY(c, c2); i=2; } } } } /* * move leftover output from buffer[i..length[ * into the beginning of the overflow buffer */ if(i<length) { /* move further overflow back */ int32_t delta=length-i; if((length=cnv->UCharErrorBufferLength)>0) { uprv_memmove(cnv->UCharErrorBuffer+delta, cnv->UCharErrorBuffer, length*U_SIZEOF_UCHAR); } cnv->UCharErrorBufferLength=(int8_t)(length+delta); cnv->UCharErrorBuffer[0]=buffer[i++]; if(delta>1) { cnv->UCharErrorBuffer[1]=buffer[i]; } } *source=args.source; return c; } /* ucnv_convert() and siblings ---------------------------------------------- */ U_CAPI void U_EXPORT2 ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv, char **target, const char *targetLimit, const char **source, const char *sourceLimit, UChar *pivotStart, UChar **pivotSource, UChar **pivotTarget, const UChar *pivotLimit, UBool reset, UBool flush, UErrorCode *pErrorCode) { UChar pivotBuffer[CHUNK_SIZE]; const UChar *myPivotSource; UChar *myPivotTarget; const char *s; char *t; UConverterToUnicodeArgs toUArgs; UConverterFromUnicodeArgs fromUArgs; UConverterConvert convert; /* error checking */ if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) { return; } if( targetCnv==NULL || sourceCnv==NULL || source==NULL || *source==NULL || target==NULL || *target==NULL || targetLimit==NULL ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } s=*source; t=*target; if((sourceLimit!=NULL && sourceLimit<s) || targetLimit<t) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } /* * Make sure that the buffer sizes do not exceed the number range for * int32_t. See ucnv_toUnicode() for a more detailed comment. */ if( (sourceLimit!=NULL && ((size_t)(sourceLimit-s)>(size_t)0x7fffffff && sourceLimit>s)) || ((size_t)(targetLimit-t)>(size_t)0x7fffffff && targetLimit>t) ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } if(pivotStart==NULL) { if(!flush) { /* streaming conversion requires an explicit pivot buffer */ *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } /* use the stack pivot buffer */ myPivotSource=myPivotTarget=pivotStart=pivotBuffer; pivotSource=(UChar **)&myPivotSource; pivotTarget=&myPivotTarget; pivotLimit=pivotBuffer+CHUNK_SIZE; } else if( pivotStart>=pivotLimit || pivotSource==NULL || *pivotSource==NULL || pivotTarget==NULL || *pivotTarget==NULL || pivotLimit==NULL ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } if(sourceLimit==NULL) { /* get limit of single-byte-NUL-terminated source string */ sourceLimit=uprv_strchr(*source, 0); } if(reset) { ucnv_resetToUnicode(sourceCnv); ucnv_resetFromUnicode(targetCnv); *pivotSource=*pivotTarget=pivotStart; } else if(targetCnv->charErrorBufferLength>0) { /* output the targetCnv overflow buffer */ if(ucnv_outputOverflowFromUnicode(targetCnv, target, targetLimit, NULL, pErrorCode)) { /* U_BUFFER_OVERFLOW_ERROR */ return; } /* *target has moved, therefore stop using t */ if( !flush && targetCnv->preFromULength>=0 && *pivotSource==*pivotTarget && sourceCnv->UCharErrorBufferLength==0 && sourceCnv->preToULength>=0 && s==sourceLimit ) { /* the fromUnicode overflow buffer is emptied and there is no new input: we are done */ return; } } /* Is direct-UTF-8 conversion available? */ if( sourceCnv->sharedData->staticData->conversionType==UCNV_UTF8 && targetCnv->sharedData->impl->fromUTF8!=NULL ) { convert=targetCnv->sharedData->impl->fromUTF8; } else if( targetCnv->sharedData->staticData->conversionType==UCNV_UTF8 && sourceCnv->sharedData->impl->toUTF8!=NULL ) { convert=sourceCnv->sharedData->impl->toUTF8; } else { convert=NULL; } /* * If direct-UTF-8 conversion is available, then we use a smaller * pivot buffer for error handling and partial matches * so that we quickly return to direct conversion. * * 32 is large enough for UCNV_EXT_MAX_UCHARS and UCNV_ERROR_BUFFER_LENGTH. * * We could reduce the pivot buffer size further, at the cost of * buffer overflows from callbacks. * The pivot buffer should not be smaller than the maximum number of * fromUnicode extension table input UChars * (for m:n conversion, see * targetCnv->sharedData->mbcs.extIndexes[UCNV_EXT_COUNT_UCHARS]) * or 2 for surrogate pairs. * * Too small a buffer can cause thrashing between pivoting and direct * conversion, with function call overhead outweighing the benefits * of direct conversion. */ if(convert!=NULL && (pivotLimit-pivotStart)>32) { pivotLimit=pivotStart+32; } /* prepare the converter arguments */ fromUArgs.converter=targetCnv; fromUArgs.flush=FALSE; fromUArgs.offsets=NULL; fromUArgs.target=*target; fromUArgs.targetLimit=targetLimit; fromUArgs.size=sizeof(fromUArgs); toUArgs.converter=sourceCnv; toUArgs.flush=flush; toUArgs.offsets=NULL; toUArgs.source=s; toUArgs.sourceLimit=sourceLimit; toUArgs.targetLimit=pivotLimit; toUArgs.size=sizeof(toUArgs); /* * TODO: Consider separating this function into two functions, * extracting exactly the conversion loop, * for readability and to reduce the set of visible variables. * * Otherwise stop using s and t from here on. */ s=t=NULL; /* * conversion loop * * The sequence of steps in the loop may appear backward, * but the principle is simple: * In the chain of * source - sourceCnv overflow - pivot - targetCnv overflow - target * empty out later buffers before refilling them from earlier ones. * * The targetCnv overflow buffer is flushed out only once before the loop. */ for(;;) { /* * if(pivot not empty or error or replay or flush fromUnicode) { * fromUnicode(pivot -> target); * } * * For pivoting conversion; and for direct conversion for * error callback handling and flushing the replay buffer. */ if( *pivotSource<*pivotTarget || U_FAILURE(*pErrorCode) || targetCnv->preFromULength<0 || fromUArgs.flush ) { fromUArgs.source=*pivotSource; fromUArgs.sourceLimit=*pivotTarget; _fromUnicodeWithCallback(&fromUArgs, pErrorCode); if(U_FAILURE(*pErrorCode)) { /* target overflow, or conversion error */ *pivotSource=(UChar *)fromUArgs.source; break; } /* * _fromUnicodeWithCallback() must have consumed the pivot contents * (*pivotSource==*pivotTarget) since it returned with U_SUCCESS() */ } /* The pivot buffer is empty; reset it so we start at pivotStart. */ *pivotSource=*pivotTarget=pivotStart; /* * if(sourceCnv overflow buffer not empty) { * move(sourceCnv overflow buffer -> pivot); * continue; * } */ /* output the sourceCnv overflow buffer */ if(sourceCnv->UCharErrorBufferLength>0) { if(ucnv_outputOverflowToUnicode(sourceCnv, pivotTarget, pivotLimit, NULL, pErrorCode)) { /* U_BUFFER_OVERFLOW_ERROR */ *pErrorCode=U_ZERO_ERROR; } continue; } /* * check for end of input and break if done * * Checking both flush and fromUArgs.flush ensures that the converters * have been called with the flush flag set if the ucnv_convertEx() * caller set it. */ if( toUArgs.source==sourceLimit && sourceCnv->preToULength>=0 && sourceCnv->toULength==0 && (!flush || fromUArgs.flush) ) { /* done successfully */ break; } /* * use direct conversion if available * but not if continuing a partial match * or flushing the toUnicode replay buffer */ if(convert!=NULL && targetCnv->preFromUFirstCP<0 && sourceCnv->preToULength==0) { if(*pErrorCode==U_USING_DEFAULT_WARNING) { /* remove a warning that may be set by this function */ *pErrorCode=U_ZERO_ERROR; } convert(&fromUArgs, &toUArgs, pErrorCode); if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { break; } else if(U_FAILURE(*pErrorCode)) { if(sourceCnv->toULength>0) { /* * Fall through to calling _toUnicodeWithCallback() * for callback handling. * * The pivot buffer will be reset with * *pivotSource=*pivotTarget=pivotStart; * which indicates a toUnicode error to the caller * (*pivotSource==pivotStart shows no pivot UChars consumed). */ } else { /* * Indicate a fromUnicode error to the caller * (*pivotSource>pivotStart shows some pivot UChars consumed). */ *pivotSource=*pivotTarget=pivotStart+1; /* * Loop around to calling _fromUnicodeWithCallbacks() * for callback handling. */ continue; } } else if(*pErrorCode==U_USING_DEFAULT_WARNING) { /* * No error, but the implementation requested to temporarily * fall back to pivoting. */ *pErrorCode=U_ZERO_ERROR; /* * The following else branches are almost identical to the end-of-input * handling in _toUnicodeWithCallback(). * Avoid calling it just for the end of input. */ } else if(flush && sourceCnv->toULength>0) { /* flush==toUArgs.flush */ /* * the entire input stream is consumed * and there is a partial, truncated input sequence left */ /* inject an error and continue with callback handling */ *pErrorCode=U_TRUNCATED_CHAR_FOUND; } else { /* input consumed */ if(flush) { /* reset the converters without calling the callback functions */ _reset(sourceCnv, UCNV_RESET_TO_UNICODE, FALSE); _reset(targetCnv, UCNV_RESET_FROM_UNICODE, FALSE); } /* done successfully */ break; } } /* * toUnicode(source -> pivot); * * For pivoting conversion; and for direct conversion for * error callback handling, continuing partial matches * and flushing the replay buffer. * * The pivot buffer is empty and reset. */ toUArgs.target=pivotStart; /* ==*pivotTarget */ /* toUArgs.targetLimit=pivotLimit; already set before the loop */ _toUnicodeWithCallback(&toUArgs, pErrorCode); *pivotTarget=toUArgs.target; if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR) { /* pivot overflow: continue with the conversion loop */ *pErrorCode=U_ZERO_ERROR; } else if(U_FAILURE(*pErrorCode) || (!flush && *pivotTarget==pivotStart)) { /* conversion error, or there was nothing left to convert */ break; } /* * else: * _toUnicodeWithCallback() wrote into the pivot buffer, * continue with fromUnicode conversion. * * Set the fromUnicode flush flag if we flush and if toUnicode has * processed the end of the input. */ if( flush && toUArgs.source==sourceLimit && sourceCnv->preToULength>=0 && sourceCnv->UCharErrorBufferLength==0 ) { fromUArgs.flush=TRUE; } } /* * The conversion loop is exited when one of the following is true: * - the entire source text has been converted successfully to the target buffer * - a target buffer overflow occurred * - a conversion error occurred */ *source=toUArgs.source; *target=fromUArgs.target; /* terminate the target buffer if possible */ if(flush && U_SUCCESS(*pErrorCode)) { if(*target!=targetLimit) { **target=0; if(*pErrorCode==U_STRING_NOT_TERMINATED_WARNING) { *pErrorCode=U_ZERO_ERROR; } } else { *pErrorCode=U_STRING_NOT_TERMINATED_WARNING; } } } /* internal implementation of ucnv_convert() etc. with preflighting */ static int32_t ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { UChar pivotBuffer[CHUNK_SIZE]; UChar *pivot, *pivot2; char *myTarget; const char *sourceLimit; const char *targetLimit; int32_t targetLength=0; /* set up */ if(sourceLength<0) { sourceLimit=uprv_strchr(source, 0); } else { sourceLimit=source+sourceLength; } /* if there is no input data, we're done */ if(source==sourceLimit) { return u_terminateChars(target, targetCapacity, 0, pErrorCode); } pivot=pivot2=pivotBuffer; myTarget=target; targetLength=0; if(targetCapacity>0) { /* perform real conversion */ targetLimit=target+targetCapacity; ucnv_convertEx(outConverter, inConverter, &myTarget, targetLimit, &source, sourceLimit, pivotBuffer, &pivot, &pivot2, pivotBuffer+CHUNK_SIZE, FALSE, TRUE, pErrorCode); targetLength=(int32_t)(myTarget-target); } /* * If the output buffer is exhausted (or we are only "preflighting"), we need to stop writing * to it but continue the conversion in order to store in targetCapacity * the number of bytes that was required. */ if(*pErrorCode==U_BUFFER_OVERFLOW_ERROR || targetCapacity==0) { char targetBuffer[CHUNK_SIZE]; targetLimit=targetBuffer+CHUNK_SIZE; do { *pErrorCode=U_ZERO_ERROR; myTarget=targetBuffer; ucnv_convertEx(outConverter, inConverter, &myTarget, targetLimit, &source, sourceLimit, pivotBuffer, &pivot, &pivot2, pivotBuffer+CHUNK_SIZE, FALSE, TRUE, pErrorCode); targetLength+=(int32_t)(myTarget-targetBuffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); /* done with preflighting, set warnings and errors as appropriate */ return u_terminateChars(target, targetCapacity, targetLength, pErrorCode); } /* no need to call u_terminateChars() because ucnv_convertEx() took care of that */ return targetLength; } U_CAPI int32_t U_EXPORT2 ucnv_convert(const char *toConverterName, const char *fromConverterName, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { UConverter in, out; /* stack-allocated */ UConverter *inConverter, *outConverter; int32_t targetLength; if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) { return 0; } if( source==NULL || sourceLength<-1 || targetCapacity<0 || (targetCapacity>0 && target==NULL) ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } /* if there is no input data, we're done */ if(sourceLength==0 || (sourceLength<0 && *source==0)) { return u_terminateChars(target, targetCapacity, 0, pErrorCode); } /* create the converters */ inConverter=ucnv_createConverter(&in, fromConverterName, pErrorCode); if(U_FAILURE(*pErrorCode)) { return 0; } outConverter=ucnv_createConverter(&out, toConverterName, pErrorCode); if(U_FAILURE(*pErrorCode)) { ucnv_close(inConverter); return 0; } targetLength=ucnv_internalConvert(outConverter, inConverter, target, targetCapacity, source, sourceLength, pErrorCode); ucnv_close(inConverter); ucnv_close(outConverter); return targetLength; } /* @internal */ static int32_t ucnv_convertAlgorithmic(UBool convertToAlgorithmic, UConverterType algorithmicType, UConverter *cnv, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { UConverter algoConverterStatic; /* stack-allocated */ UConverter *algoConverter, *to, *from; int32_t targetLength; if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) { return 0; } if( cnv==NULL || source==NULL || sourceLength<-1 || targetCapacity<0 || (targetCapacity>0 && target==NULL) ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return 0; } /* if there is no input data, we're done */ if(sourceLength==0 || (sourceLength<0 && *source==0)) { return u_terminateChars(target, targetCapacity, 0, pErrorCode); } /* create the algorithmic converter */ algoConverter=ucnv_createAlgorithmicConverter(&algoConverterStatic, algorithmicType, "", 0, pErrorCode); if(U_FAILURE(*pErrorCode)) { return 0; } /* reset the other converter */ if(convertToAlgorithmic) { /* cnv->Unicode->algo */ ucnv_resetToUnicode(cnv); to=algoConverter; from=cnv; } else { /* algo->Unicode->cnv */ ucnv_resetFromUnicode(cnv); from=algoConverter; to=cnv; } targetLength=ucnv_internalConvert(to, from, target, targetCapacity, source, sourceLength, pErrorCode); ucnv_close(algoConverter); return targetLength; } U_CAPI int32_t U_EXPORT2 ucnv_toAlgorithmic(UConverterType algorithmicType, UConverter *cnv, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { return ucnv_convertAlgorithmic(TRUE, algorithmicType, cnv, target, targetCapacity, source, sourceLength, pErrorCode); } U_CAPI int32_t U_EXPORT2 ucnv_fromAlgorithmic(UConverter *cnv, UConverterType algorithmicType, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { return ucnv_convertAlgorithmic(FALSE, algorithmicType, cnv, target, targetCapacity, source, sourceLength, pErrorCode); } U_CAPI UConverterType U_EXPORT2 ucnv_getType(const UConverter* converter) { int8_t type = converter->sharedData->staticData->conversionType; #if !UCONFIG_NO_LEGACY_CONVERSION if(type == UCNV_MBCS) { return ucnv_MBCSGetType(converter); } #endif return (UConverterType)type; } U_CAPI void U_EXPORT2 ucnv_getStarters(const UConverter* converter, UBool starters[256], UErrorCode* err) { if (err == NULL || U_FAILURE(*err)) { return; } if(converter->sharedData->impl->getStarters != NULL) { converter->sharedData->impl->getStarters(converter, starters, err); } else { *err = U_ILLEGAL_ARGUMENT_ERROR; } } static const UAmbiguousConverter *ucnv_getAmbiguous(const UConverter *cnv) { UErrorCode errorCode; const char *name; int32_t i; if(cnv==NULL) { return NULL; } errorCode=U_ZERO_ERROR; name=ucnv_getName(cnv, &errorCode); if(U_FAILURE(errorCode)) { return NULL; } for(i=0; i<UPRV_LENGTHOF(ambiguousConverters); ++i) { if(0==uprv_strcmp(name, ambiguousConverters[i].name)) { return ambiguousConverters+i; } } return NULL; } U_CAPI void U_EXPORT2 ucnv_fixFileSeparator(const UConverter *cnv, UChar* source, int32_t sourceLength) { const UAmbiguousConverter *a; int32_t i; UChar variant5c; if(cnv==NULL || source==NULL || sourceLength<=0 || (a=ucnv_getAmbiguous(cnv))==NULL) { return; } variant5c=a->variant5c; for(i=0; i<sourceLength; ++i) { if(source[i]==variant5c) { source[i]=0x5c; } } } U_CAPI UBool U_EXPORT2 ucnv_isAmbiguous(const UConverter *cnv) { return (UBool)(ucnv_getAmbiguous(cnv)!=NULL); } U_CAPI void U_EXPORT2 ucnv_setFallback(UConverter *cnv, UBool usesFallback) { cnv->useFallback = usesFallback; } U_CAPI UBool U_EXPORT2 ucnv_usesFallback(const UConverter *cnv) { return cnv->useFallback; } U_CAPI void U_EXPORT2 ucnv_getInvalidChars (const UConverter * converter, char *errBytes, int8_t * len, UErrorCode * err) { if (err == NULL || U_FAILURE(*err)) { return; } if (len == NULL || errBytes == NULL || converter == NULL) { *err = U_ILLEGAL_ARGUMENT_ERROR; return; } if (*len < converter->invalidCharLength) { *err = U_INDEX_OUTOFBOUNDS_ERROR; return; } if ((*len = converter->invalidCharLength) > 0) { uprv_memcpy (errBytes, converter->invalidCharBuffer, *len); } } U_CAPI void U_EXPORT2 ucnv_getInvalidUChars (const UConverter * converter, UChar *errChars, int8_t * len, UErrorCode * err) { if (err == NULL || U_FAILURE(*err)) { return; } if (len == NULL || errChars == NULL || converter == NULL) { *err = U_ILLEGAL_ARGUMENT_ERROR; return; } if (*len < converter->invalidUCharLength) { *err = U_INDEX_OUTOFBOUNDS_ERROR; return; } if ((*len = converter->invalidUCharLength) > 0) { u_memcpy (errChars, converter->invalidUCharBuffer, *len); } } #define SIG_MAX_LEN 5 U_CAPI const char* U_EXPORT2 ucnv_detectUnicodeSignature( const char* source, int32_t sourceLength, int32_t* signatureLength, UErrorCode* pErrorCode) { int32_t dummy; /* initial 0xa5 bytes: make sure that if we read <SIG_MAX_LEN * bytes we don't misdetect something */ char start[SIG_MAX_LEN]={ '\xa5', '\xa5', '\xa5', '\xa5', '\xa5' }; int i = 0; if((pErrorCode==NULL) || U_FAILURE(*pErrorCode)){ return NULL; } if(source == NULL || sourceLength < -1){ *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; return NULL; } if(signatureLength == NULL) { signatureLength = &dummy; } if(sourceLength==-1){ sourceLength=(int32_t)uprv_strlen(source); } while(i<sourceLength&& i<SIG_MAX_LEN){ start[i]=source[i]; i++; } if(start[0] == '\xFE' && start[1] == '\xFF') { *signatureLength=2; return "UTF-16BE"; } else if(start[0] == '\xFF' && start[1] == '\xFE') { if(start[2] == '\x00' && start[3] =='\x00') { *signatureLength=4; return "UTF-32LE"; } else { *signatureLength=2; return "UTF-16LE"; } } else if(start[0] == '\xEF' && start[1] == '\xBB' && start[2] == '\xBF') { *signatureLength=3; return "UTF-8"; } else if(start[0] == '\x00' && start[1] == '\x00' && start[2] == '\xFE' && start[3]=='\xFF') { *signatureLength=4; return "UTF-32BE"; } else if(start[0] == '\x0E' && start[1] == '\xFE' && start[2] == '\xFF') { *signatureLength=3; return "SCSU"; } else if(start[0] == '\xFB' && start[1] == '\xEE' && start[2] == '\x28') { *signatureLength=3; return "BOCU-1"; } else if(start[0] == '\x2B' && start[1] == '\x2F' && start[2] == '\x76') { /* * UTF-7: Initial U+FEFF is encoded as +/v8 or +/v9 or +/v+ or +/v/ * depending on the second UTF-16 code unit. * Detect the entire, closed Unicode mode sequence +/v8- for only U+FEFF * if it occurs. * * So far we have +/v */ if(start[3] == '\x38' && start[4] == '\x2D') { /* 5 bytes +/v8- */ *signatureLength=5; return "UTF-7"; } else if(start[3] == '\x38' || start[3] == '\x39' || start[3] == '\x2B' || start[3] == '\x2F') { /* 4 bytes +/v8 or +/v9 or +/v+ or +/v/ */ *signatureLength=4; return "UTF-7"; } }else if(start[0]=='\xDD' && start[1]== '\x73'&& start[2]=='\x66' && start[3]=='\x73'){ *signatureLength=4; return "UTF-EBCDIC"; } /* no known Unicode signature byte sequence recognized */ *signatureLength=0; return NULL; } U_CAPI int32_t U_EXPORT2 ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status) { if(status == NULL || U_FAILURE(*status)){ return -1; } if(cnv == NULL){ *status = U_ILLEGAL_ARGUMENT_ERROR; return -1; } if(cnv->preFromUFirstCP >= 0){ return U16_LENGTH(cnv->preFromUFirstCP)+cnv->preFromULength ; }else if(cnv->preFromULength < 0){ return -cnv->preFromULength ; }else if(cnv->fromUChar32 > 0){ return 1; } return 0; } U_CAPI int32_t U_EXPORT2 ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status){ if(status == NULL || U_FAILURE(*status)){ return -1; } if(cnv == NULL){ *status = U_ILLEGAL_ARGUMENT_ERROR; return -1; } if(cnv->preToULength > 0){ return cnv->preToULength ; }else if(cnv->preToULength < 0){ return -cnv->preToULength; }else if(cnv->toULength > 0){ return cnv->toULength; } return 0; } U_CAPI UBool U_EXPORT2 ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){ if (U_FAILURE(*status)) { return FALSE; } if (cnv == NULL) { *status = U_ILLEGAL_ARGUMENT_ERROR; return FALSE; } switch (ucnv_getType(cnv)) { case UCNV_SBCS: case UCNV_DBCS: case UCNV_UTF32_BigEndian: case UCNV_UTF32_LittleEndian: case UCNV_UTF32: case UCNV_US_ASCII: return TRUE; default: return FALSE; } } #endif /* * Hey, Emacs, please set the following: * * Local Variables: * indent-tabs-mode: nil * End: * */
[ "rgosdin@gmail.com" ]
rgosdin@gmail.com
40449099f734e1e84e0623c849e7f3803afcd668
c225d891cd03c73da3798062139f95021773e1af
/1828.cpp
235e96f9a504b790136b6f4c04ae6f819b6cd231
[]
no_license
ototsuyume/poj-solution
8061614654cab96b61c654ba6c2bd369a806cb86
eb3746cb16a21f19d85b795b65fed8544ac99764
refs/heads/master
2016-09-06T00:19:32.312260
2015-02-27T09:21:49
2015-02-27T09:21:49
25,431,563
0
0
null
null
null
null
UTF-8
C++
false
false
641
cpp
#include<algorithm> #include<stdio.h> using namespace std; struct Point{ int x,y; }; bool cmp(const Point &a,const Point &b) { if(a.x==b.x)return a.y<b.y; return a.x<b.x; } Point monkey[50000]; int main() { int n; while(1) { scanf("%d",&n); if(n==0) break; for(int i=0;i<n;++i) { scanf("%d %d",&monkey[i].x,&monkey[i].y); } sort(monkey,monkey+n,cmp); int r=1,my=monkey[n-1].y; for(int i=n-2;i>=0;--i) { if(monkey[i].x==monkey[i+1].x) continue; else if(monkey[i].y>my) { my = monkey[i].y; ++r; } } printf("%d\n",r); } return 0; }
[ "yume@ototsuyume.(none)" ]
yume@ototsuyume.(none)
67fe487ba949b063744af080f847580bfb41d62a
cdcce73d7a45a3c52d7ea4a8ce3a434f573f5b5f
/enroll_r307_sandy_program/enroll_r307_sandy_program.ino
0ead156fd61f9ff5e9bacbab6e342a0d8395453e
[]
no_license
SandhiyaB/CDocArduinoBackUp
e3f5f8b6235949806fbe6331730dd0684f6126d0
b9461f3cbadb20c218428b09df52b9ab2ab071cd
refs/heads/master
2020-05-16T23:56:54.041225
2019-04-25T08:05:36
2019-04-25T08:05:36
183,382,963
0
0
null
null
null
null
UTF-8
C++
false
false
5,950
ino
/*************************************************** This is an example sketch for our optical Fingerprint sensor Designed specifically to work with the Adafruit BMP085 Breakout ----> http://www.adafruit.com/products/751 These displays use TTL Serial to communicate, 2 pins are required to interface Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, all text above must be included in any redistribution ****************************************************/ #include <Adafruit_Fingerprint.h> // On Leonardo/Micro or others with hardware serial, use those! #0 is green wire, #1 is white // uncomment this line: // #define mySerial Serial1 // For UNO and others without hardware serial, we must use software serial... // pin #2 is IN from sensor (Yellow wire) // pin #3 is OUT from arduino (WHITE wire) // comment these two lines if using hardware serial #include <SoftwareSerial.h> SoftwareSerial mySerial(13,15); Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); uint8_t id; void setup() { Serial.begin(9600); while (!Serial); // For Yun/Leo/Micro/Zero/... delay(100); Serial.println("\n\nAdafruit Fingerprint sensor enrollment"); // set the data rate for the sensor serial port finger.begin(57600); if (finger.verifyPassword()) { Serial.println("Found fingerprint sensor!"); } else { Serial.println("Did not find fingerprint sensor :("); while (1) { delay(1); } } } uint8_t readnumber(void) { uint8_t num = 0; while (num == 0) { while (! Serial.available()); num = Serial.parseInt(); } return num; } void loop() // run over and over again { Serial.println("Ready to enroll a fingerprint!"); Serial.println("Please type in the ID # (from 1 to 127) you want to save this finger as..."); id = readnumber(); if (id == 0) {// ID #0 not allowed, try again! return; } Serial.print("Enrolling ID #"); Serial.println(id); while (! getFingerprintEnroll() ); } uint8_t getFingerprintEnroll() { int p = -1; Serial.print("Waiting for valid finger to enroll as #"); Serial.println(id); while (p != FINGERPRINT_OK) { p = finger.getImage(); switch (p) { case FINGERPRINT_OK: Serial.println("Image taken"); break; case FINGERPRINT_NOFINGER: Serial.println("."); break; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); break; case FINGERPRINT_IMAGEFAIL: Serial.println("Imaging error"); break; default: Serial.println("Unknown error"); break; } } // OK success! p = finger.image2Tz(1); switch (p) { case FINGERPRINT_OK: Serial.println("Image converted"); break; case FINGERPRINT_IMAGEMESS: Serial.println("Image too messy"); return p; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); return p; case FINGERPRINT_FEATUREFAIL: Serial.println("Could not find fingerprint features"); return p; case FINGERPRINT_INVALIDIMAGE: Serial.println("Could not find fingerprint features"); return p; default: Serial.println("Unknown error"); return p; } Serial.println("Remove finger"); delay(2000); p = 0; while (p != FINGERPRINT_NOFINGER) { p = finger.getImage(); } Serial.print("ID "); Serial.println(id); p = -1; Serial.println("Place same finger again"); while (p != FINGERPRINT_OK) { p = finger.getImage(); switch (p) { case FINGERPRINT_OK: Serial.println("Image taken"); break; case FINGERPRINT_NOFINGER: Serial.print("."); break; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); break; case FINGERPRINT_IMAGEFAIL: Serial.println("Imaging error"); break; default: Serial.println("Unknown error"); break; } } // OK success! p = finger.image2Tz(2); switch (p) { case FINGERPRINT_OK: Serial.println("Image converted"); break; case FINGERPRINT_IMAGEMESS: Serial.println("Image too messy"); return p; case FINGERPRINT_PACKETRECIEVEERR: Serial.println("Communication error"); return p; case FINGERPRINT_FEATUREFAIL: Serial.println("Could not find fingerprint features"); return p; case FINGERPRINT_INVALIDIMAGE: Serial.println("Could not find fingerprint features"); return p; default: Serial.println("Unknown error"); return p; } // OK converted! Serial.print("Creating model for #"); Serial.println(id); p = finger.createModel(); if (p == FINGERPRINT_OK) { Serial.println("Prints matched!"); } else if (p == FINGERPRINT_PACKETRECIEVEERR) { Serial.println("Communication error"); return p; } else if (p == FINGERPRINT_ENROLLMISMATCH) { Serial.println("Fingerprints did not match"); return p; } else { Serial.println("Unknown error"); return p; } Serial.print("ID "); Serial.println(id); p = finger.storeModel(id); if (p == FINGERPRINT_OK) { Serial.println("Stored!"); } else if (p == FINGERPRINT_PACKETRECIEVEERR) { Serial.println("Communication error"); return p; } else if (p == FINGERPRINT_BADLOCATION) { Serial.println("Could not store in that location"); return p; } else if (p == FINGERPRINT_FLASHERR) { Serial.println("Error writing to flash"); return p; } else { Serial.println("Unknown error"); return p; } }
[ "noreply@github.com" ]
noreply@github.com
782b2f1b90956db7dd7a7dc2f54227d6a89f57a4
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
/NT/admin/wmi/wbem/winmgmt/ess3/poller.h
445aa5a82c6ef4cb9525787df5dc564e0e95d69f
[]
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
5,572
h
//****************************************************************************** // // POLLER.H // // Copyright (C) 1996-1999 Microsoft Corporation // //****************************************************************************** #ifndef __WBEM_POLLER__H_ #define __WBEM_POLLER__H_ #include <tss.h> #include <wbemcomn.h> #include <map> #include <analyser.h> #include <evsink.h> #pragma warning(disable: 4786) class CEssNamespace; class CBasePollingInstruction : public CTimerInstruction { public: void AddRef(); void Release(); int GetInstructionType() {return INSTTYPE_INTERNAL;} virtual CWbemTime GetNextFiringTime(CWbemTime LastFiringTime, OUT long* plFiringCount) const; virtual CWbemTime GetFirstFiringTime() const; virtual HRESULT Fire(long lNumTimes, CWbemTime NextFiringTime); bool DeleteTimer(); public: CBasePollingInstruction(CEssNamespace* pNamespace); virtual ~CBasePollingInstruction(); HRESULT Initialize(LPCWSTR wszLanguage, LPCWSTR wszQuery, DWORD dwMsInterval, bool bAffectsQuota = false); void Cancel(); protected: long m_lRef; CEssNamespace* m_pNamespace; BSTR m_strLanguage; BSTR m_strQuery; CWbemInterval m_Interval; IServerSecurity* m_pSecurity; bool m_bUsedQuota; bool m_bCancelled; HANDLE m_hTimer; CCritSec m_cs; protected: HRESULT ExecQuery(); virtual HRESULT ProcessObject(_IWmiObject* pObj) = 0; virtual HRESULT ProcessQueryDone(HRESULT hresQuery, IWbemClassObject* pError) = 0; virtual BOOL CompareTo(CBasePollingInstruction* pOther); static void staticTimerCallback(void* pParam, BOOLEAN); void Destroy(); }; class CPollingInstruction : public CBasePollingInstruction { public: CPollingInstruction(CEssNamespace* pNamespace); ~CPollingInstruction(); HRESULT Initialize(LPCWSTR wszLanguage, LPCWSTR wszQuery, DWORD dwMsInterval, DWORD dwEventMask, CEventFilter* pDest); HRESULT FirstExecute(); protected: DWORD m_dwEventMask; CEventFilter* m_pDest; bool m_bOnRestart; void* m_pUser; struct CCachedObject { BSTR m_strPath; _IWmiObject* m_pObject; CCachedObject(_IWmiObject* pObject); ~CCachedObject(); BOOL IsValid(){ return (NULL != m_strPath); }; static int __cdecl compare(const void* pelem1, const void* pelem2); }; typedef CUniquePointerArray<CCachedObject> CCachedArray; CCachedArray* m_papPrevObjects; CCachedArray* m_papCurrentObjects; friend class CPoller; protected: HRESULT RaiseCreationEvent(CCachedObject* pNewObj); HRESULT RaiseDeletionEvent(CCachedObject* pOldObj); HRESULT RaiseModificationEvent(CCachedObject* pNewObj, CCachedObject* pOldObj = NULL); static SYSFREE_ME BSTR GetObjectClass(CCachedObject* pObj); HRESULT ProcessObject(_IWmiObject* pObj); HRESULT ProcessQueryDone(HRESULT hresQuery, IWbemClassObject* pError); HRESULT SubtractMemory(CCachedArray* pArray); HRESULT ResetPrevious(); DWORD ComputeObjectMemory(_IWmiObject* pObj); }; class CEventFilterContainer; class CPoller { public: CPoller(CEssNamespace* pEssNamespace); ~CPoller(); void Clear(); HRESULT ActivateFilter(CEventFilter* pDest, LPCWSTR wszQuery, QL_LEVEL_1_RPN_EXPRESSION* pExp); HRESULT DeactivateFilter(CEventFilter* pDest); HRESULT VirtuallyStopPolling(); HRESULT CancelUnnecessaryPolling(); void DumpStatistics(FILE* f, long lFlags); protected: CEssNamespace* m_pNamespace; CQueryAnalyser m_Analyser; BOOL m_bInResync; CCritSec m_cs; struct FilterInfo { BOOL m_bActive; DWORD_PTR m_dwFilterId; }; typedef std::map<CPollingInstruction*, FilterInfo, std::less<CPollingInstruction*>, wbem_allocator<FilterInfo> > CInstructionMap; CInstructionMap m_mapInstructions; friend class CKeyTest; class CKeyTest : public CInstructionTest { DWORD_PTR m_dwKey; CInstructionMap& m_mapInstructions; public: CKeyTest(DWORD_PTR dwKey, CInstructionMap& mapInstructions) : m_dwKey(dwKey), m_mapInstructions(mapInstructions) {} BOOL operator()(CTimerInstruction* pToTest) { CInstructionMap::iterator it = m_mapInstructions.find((CPollingInstruction*)pToTest); if(it == m_mapInstructions.end()) return FALSE; if ( !it->second.m_bActive && m_dwKey == 0xFFFFFFFF ) return TRUE; return (it->second.m_dwFilterId == m_dwKey); } }; protected: HRESULT AddInstruction(DWORD_PTR dwKey, CPollingInstruction* pInst); HRESULT ListNonProvidedClasses(IN CClassInformation* pInfo, IN DWORD dwDesiredMask, OUT CClassInfoArray& aNonProvided); BOOL IsClassDynamic(IWbemClassObject* pClass); BOOL AddDynamicClass(IWbemClassObject* pClass, DWORD dwDesiredMask, OUT CClassInfoArray& aNonProvided); }; #endif
[ "seta7D5@protonmail.com" ]
seta7D5@protonmail.com
95477e18083c33b6e1214aed731027287db5a310
daccec8a75fc9dd5f57d5d081c0e3cb304deba09
/Engine/Engine/include/Core/Maths/Vec.hpp
f4cf7d32cd7bd6e02068b171a93ad6abf776d47f
[]
no_license
ReJudicael/Bakers-Engine
1172f54e583b9f98808254c1aa2a672ad7a90af3
cefcd06353657830c575714a65ab022122db79e0
refs/heads/main
2023-08-27T02:29:08.068605
2021-11-10T16:24:13
2021-11-10T16:24:13
426,653,750
0
0
null
null
null
null
UTF-8
C++
false
false
9,905
hpp
#ifndef __VEC__ #define __VEC__ #include "MathMinimal.h" #include "Mat.hpp" #include <iostream> namespace Core::Maths { /** * Templated size vector class * @tparam Size: Size of the vector */ template <int Size> struct Vec { float m_vec[Size]; /** * Default constructor, creates a vec zero */ inline constexpr Vec() noexcept : m_vec() { for (unsigned i {0}; i < Size; ++i) m_vec[i] = 0; } /** * Creates a vector with its components initialized at the * value of the array v * @param v: Array initializer of the vector */ inline explicit constexpr Vec(const float v[Size]) noexcept : m_vec() { for (unsigned i {0}; i < Size; ++i) m_vec[i] = v[i]; } /** * Creates a vector with all of its components initialized * at the value of f * @param f: Initializer value */ inline explicit constexpr Vec(const float f) noexcept : m_vec() { for (unsigned i {0}; i < Size; ++i) m_vec[i] = f; } /** * Creates a vector from a column matrix * @param m: Column matrix initializer */ inline constexpr Vec(const Mat<Size, 1> & m) noexcept : m_vec() { for (unsigned i{ 0 }; i < Size; ++i) m_vec[i] = m(i); } /** * Creates a copy of the given vector * @param v: Vector to be copied */ inline constexpr Vec(const Vec<Size>& v) noexcept : m_vec() { for (unsigned i {0}; i < Size; ++i) m_vec[i] = v[i]; } /** * Moves a vector to a new vector * @param v: Vector to be moved */ inline constexpr Vec(Vec<Size>&& v) noexcept : m_vec{} { for (unsigned i{ 0 }; i < Size; ++i) m_vec[i] = std::move(v[i]); } /** * Computes normalized version of current vector * @return Normalized version of current vector */ inline constexpr Vec<Size> Normalized() const noexcept { return *this / Length(); } /** * Normalizes current vector */ inline constexpr void Normalize() noexcept { *this /= Length(); } /** * Computes length of current vector * @return Length of current vector */ inline constexpr float Length() const noexcept { return sqrt(SquaredLength()); } /** * Computes squared length of current vector * @return Squared length of current vector */ inline constexpr float SquaredLength() const noexcept { float sqrLen {0}; for (unsigned i {0}; i < Size; ++i) sqrLen += m_vec[i] * m_vec[i]; return sqrLen; } /** * Computes dot product of current vector and * given vector * @param v: Vector to dot product with * @return Result of the dot product */ inline constexpr float Dot(const Vec<Size>& v) const noexcept { float f {0}; for (unsigned i {0}; i < Size; ++i) f += m_vec[i] * v[i]; return f; } /** * Computes cross product of current vector and * given vector * @param v: Vector to cross product with * @return Result of the cross product */ inline constexpr Vec<Size> Cross(const Vec<Size>& v) const noexcept { Vec<Size> newVec {}; for (unsigned i {0}; i < Size; ++i) { if (i + 2 == Size) newVec[i] = m_vec[0] * v[1] - m_vec[1] * v[0]; else if (i + 3 == Size) newVec[i] = m_vec[i + 1] * v[0] - m_vec[0] * v[i + 1]; else newVec[i] = m_vec[i + 1] * v[i + 2] - m_vec[i + 2] * v[i + 1]; } return newVec; } /** * Setter that takes as parameter position in the vector * @param i: Position in the vector * @param f: Value to be set */ inline constexpr void Set(const unsigned i, const float f) noexcept { m_vec[i] = f; } /** * Settet that moves the value in the vector and * takes as parameter the position in the vector * @param i: Position in the vector * @param f: Value to be moved */ inline constexpr void Set(const unsigned i, float&& f) noexcept { m_vec[i] = std::move(f); } /** * Getter that takes as parameter the position in the vector * and returns a reference to the required component * @param i: Position in the vector * @return Reference to required component of the vector */ inline constexpr float& operator[] (const unsigned i) noexcept { return m_vec[i]; } /** * Getter that takes as parameter the position in the vector * and returns a copy to the required component * @param i: Position in the vector * @return Copy to required component of the vector */ inline constexpr float operator[] (const unsigned i) const noexcept { return m_vec[i]; } /** * Copies given vector in the current vector * @param v: Vector to be copied * @return Copy of the result */ inline constexpr Vec<Size> operator= (const Vec<Size>& v) noexcept { for (unsigned i {0}; i < Size; ++i) m_vec[i] = v[i]; return *this; } /** * Moves the given vector in the current vector * @param v: Vector to be moved * @return Copy of the result */ inline constexpr Vec<Size> operator= (Vec<Size>&& v) noexcept { for (unsigned i {0}; i < Size; ++i) m_vec[i] = std::move(v[i]); return *this; } /** * Compares the given vector to the current vector * @param v: Vector to compare to * @return The result of the comparison */ inline constexpr bool operator== (const Vec<Size>& v) const noexcept { for (unsigned i {0}; i < Size; ++i) if (v[i] != m_vec[i]) return false; return true; } /** * Compares the given vector to the current vector * @param v: Vector to compare to * @return The result of the comparison */ inline constexpr bool operator!= (const Vec<Size>& v) const noexcept { for (unsigned i {0}; i < Size; ++i) if (v[i] != m_vec[i]) return true; return false; } /** * Computes the addition of the current vector to * the given vector * @param v: Vector to add * @return The result of the addition */ inline constexpr Vec<Size> operator+ (const Vec<Size>& v) const noexcept { Vec<Size> newVec {v}; for (unsigned i {0}; i < Size; ++i) newVec[i] += m_vec[i]; return newVec; } /** * Computes the substaction of the given vector * to the current vector * @param v: Vector to substract * @return The result of the substaction */ inline constexpr Vec<Size> operator- (const Vec<Size>& v) const noexcept { Vec<Size> newVec {*this}; for (unsigned i {0}; i < Size; ++i) newVec[i] -= v[i]; return newVec; } /** * Computes the multiplication of the components * of the current vector by the respective components * of the given vector * @param v: Vector to myltiply by * @return The result of the multiplication */ inline constexpr Vec<Size> operator* (const Vec<Size>& v) const noexcept { Vec<Size> newVec {v}; for (unsigned i {0}; i < Size; ++i) newVec[i] *= m_vec[i]; return newVec; } /** * Computes the division of the components * of the current vector by the respective components * of the given vector * @param v: Vector to diviside by * @return The result of the division */ inline constexpr Vec<Size> operator/ (const Vec<Size>& v) const noexcept { Vec<Size> newVec {*this}; for (unsigned i {0}; i < Size; ++i) newVec[i] /= v[i]; return newVec; } /** * Computes the division of the components * of the current vector by the given scalar * @param f: Scalar to divide by * @return The result of the scalar division */ inline constexpr Vec<Size> operator/ (float f) const noexcept { Vec<Size> newVec{ *this }; for (unsigned i{ 0 }; i < Size; ++i) newVec[i] /= f; return newVec; } /** * Adds given vector to current vector * @param v: Vector to add * @return Copy of the result */ inline constexpr Vec<Size> operator+= (const Vec<Size>& v) noexcept { for (unsigned i {0}; i < Size; ++i) m_vec[i] += v[i]; return *this; } /** * Substracts given vector to current vector * @param v: Vector to substract * @return Copy of the result */ inline constexpr Vec<Size> operator-= (const Vec<Size>& v) noexcept { for (unsigned i {0}; i < Size; ++i) m_vec[i] -= v[i]; return *this; } /** * Multiply given vector to current vector * @param v: Vector to multiply * @return Copy of the result */ inline constexpr Vec<Size> operator*= (const Vec<Size>& v) noexcept { for (unsigned i {0}; i < Size; ++i) m_vec[i] *= v[i]; return *this; } /** * Divides current vector by given vector * @param v: Vector to divide by * @return Copy of the result */ inline constexpr Vec<Size> operator/= (const Vec<Size>& v) noexcept { for (unsigned i {0}; i < Size; ++i) m_vec[i] /= v[i]; return *this; } /** * Divides current vector by given scalar * @param f: Scalar to divide by * @return Copy of the result */ inline constexpr Vec<Size> operator/= (float f) noexcept { for (unsigned i{ 0 }; i < Size; ++i) m_vec[i] /= f; return *this; } /** * Converts vector into column matrix */ inline constexpr operator Mat<Size, 1>() const noexcept { Mat<Size, 1> m; for (unsigned i{ 0 }; i < Size; ++i) m.Set(i, m_vec[i]); return m; } /** * Converts vector into line matrix */ inline constexpr operator Mat<1, Size>() const noexcept { Mat<1, Size> m; for (unsigned i{ 0 }; i < Size; ++i) m.Set(i, m_vec[i]); return m; } /** * Converts vector to string format * @return String version of the current vector */ inline std::string ToString() const noexcept { std::string s; for (unsigned i{ 0 }; i < Size; ++i) { s += std::to_string(m_vec[i]) + " "; } return s; } /** * Print current vector to the console */ inline void Print() const noexcept { std::cout << ToString() << std::endl; } }; } #endif
[ "t.hagry@student.isartdigital.com" ]
t.hagry@student.isartdigital.com
8fa86ee5ce8137d2bde1bc6470f8165dce1eada2
c71d9862169295dd650390ca44f2ebeb2e6740af
/src/gui/painting/qrasterizer_p.h
c621305f5f63d96a5449ad23600d5dc53dc4c00f
[]
no_license
maoxingda/qt-src
d23c8d0469f234f89fdcbdbe6f3d50fa16e7a0e3
e01aee06520bf526975b0bedafe78eb003b5ead6
refs/heads/master
2020-04-14T00:05:16.292626
2019-01-05T05:49:42
2019-01-05T05:49:42
163,524,224
1
0
null
null
null
null
UTF-8
C++
false
false
2,882
h
/**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QRASTERIZER_P_H #define QRASTERIZER_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include "QtCore/qglobal.h" #include "QtGui/qpainter.h" #include <private/qdrawhelper_p.h> #include <private/qrasterdefs_p.h> QT_BEGIN_NAMESPACE struct QSpanData; class QRasterBuffer; class QRasterizerPrivate; class #ifdef Q_WS_QWS Q_GUI_EXPORT #endif QRasterizer { public: QRasterizer(); ~QRasterizer(); void setAntialiased(bool antialiased); void setClipRect(const QRect &clipRect); void initialize(ProcessSpans blend, void *data); void rasterize(const QT_FT_Outline *outline, Qt::FillRule fillRule); void rasterize(const QPainterPath &path, Qt::FillRule fillRule); // width should be in units of |a-b| void rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap = false); private: QRasterizerPrivate *d; }; QT_END_NAMESPACE #endif
[ "39357378+maoxingda@users.noreply.github.com" ]
39357378+maoxingda@users.noreply.github.com
b677e1510fe0b01fcda168e5c3a3611c2115d92a
4bbef2734caea797a65d05acf0260d4f7cba6ccf
/NanjingChannel/screensaver.cpp
c5651bebce5d5feb144fde9108f53f3632b3c724
[]
no_license
matrixcloud/Qt
ee823e52e0c37018f36bc278c7d9e39654f545d3
215d01f60ecfb4247eb0270cd94b01e056d3726a
refs/heads/master
2021-01-23T13:48:27.154915
2014-09-06T02:00:24
2014-09-06T02:00:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,131
cpp
#include "screensaver.h" #include "ui_screensaver.h" ScreenSaver::ScreenSaver(QWidget *parent) : QWidget(parent), ui(new Ui::ScreenSaver) { curImgIndex = 0; ui->setupUi(this); setCursor(Qt::BlankCursor); showFullScreen(); mTimer = new QTimer(); connect(mTimer, SIGNAL(timeout()), this, SLOT(switchImgSlot())); mTimer->setInterval(SAVER_SPEED); init(); // readSettings(); // initImgs(); // if(imgNameList.empty()) // { // ui->imgLabel->setText("请先设置屏保图片路径"); // QFont font; // font.setPixelSize(24); // ui->imgLabel->setFont(font); // ui->imgLabel->setAlignment(Qt::AlignCenter); // return; // } // else // { // QPixmap defaultPix; // defaultPix.load(dirPath + "/" + imgNameList[curImgIndex]); // ui->imgLabel->setPixmap(defaultPix); // } // mTimer = new QTimer(); // connect(mTimer, SIGNAL(timeout()), this, SLOT(switchImgSlot())); // mTimer->setInterval(SAVER_SPEED); // mTimer->start(); } ScreenSaver::~ScreenSaver() { delete ui; } void ScreenSaver::switchImgSlot() { // if(imgNameList.empty()) return; curImgIndex++; if(curImgIndex == imgNameList.size()) { curImgIndex = 0; } QPixmap pixmap; pixmap.load(dirPath + "/" + imgNameList[curImgIndex]); pixmap = pixmap.scaled(ui->imgLabel->width(), ui->imgLabel->height(), Qt::IgnoreAspectRatio); ui->imgLabel->setPixmap(pixmap); } void ScreenSaver::updateSettingSlot() { qDebug() << "saver------>>updateSettingSlot()" << endl; // readSettings(); imgNameList.clear(); curImgIndex = 0; init(); // initImgs(); } void ScreenSaver::mousePressEvent(QMouseEvent * event) { emit mouseClickSignal(); } void ScreenSaver::readSettings() { QSettings settings(COMPANY, APP_NAME); dirPath = settings.value(IMG_PATH_KEY).toString(); qDebug() << "path = " << dirPath; } void ScreenSaver::init() { readSettings(); initImgs(); if(imgNameList.empty()) { if(mTimer->isActive()) { mTimer->stop(); } ui->imgLabel->setText("请先设置屏保图片路径"); QFont font; font.setPixelSize(24); ui->imgLabel->setFont(font); ui->imgLabel->setAlignment(Qt::AlignCenter); return; } else { QPixmap defaultPix; defaultPix.load(dirPath + "/" + imgNameList[curImgIndex]); ui->imgLabel->setPixmap(defaultPix); if(!mTimer->isActive()) { mTimer->start(); } } } void ScreenSaver::initImgs() { if(dirPath.isEmpty()) return; QDir dir(dirPath); if(dir.exists()) { dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks); QStringList list = dir.entryList(); for(int i = 0; i < list.size(); i++) { if(list[i].contains(".jpg", Qt::CaseInsensitive)) { qDebug() << list[i] << endl; imgNameList.push_back(list[i]); } } } qDebug() << "imgNameList = " << imgNameList.size(); }
[ "zcloud01@outlook.com" ]
zcloud01@outlook.com
487491bd299f26e488a57f02931e67f4938a5f2d
f60a0804019d95776a1c4ea53d1a2533c78ea5b9
/C++/2.Structure/while.cpp
17356ad31b8032d7c72729dfb9b1821d4774f580
[]
no_license
vostokorient/vostok
b47332b80bef3550c703006e04a22680ceebc0be
ce45d2787c9d8b2864a608762ce37487b892ef49
refs/heads/master
2021-06-27T00:56:38.456964
2020-10-28T14:26:26
2020-10-28T14:26:26
162,911,789
0
0
null
null
null
null
UTF-8
C++
false
false
521
cpp
#include <stdio.h> #include <iostream> int main(int arg, char* pszArgs[]) { // ввод счетчика цикла int loopCount; std::cout << "Введите loopCount: "; std::cin >> loopCount; // теперь в цикле выводим значения while (loopCount < 100) { loopCount = ++loopCount; //"loopcount + 1 == ++loopcount" std::cout << "Осталось выполнить: " << loopCount << " циклов\n"; } return 0; }
[ "vostok0416@mail.ru" ]
vostok0416@mail.ru
e9f4e1f007a484b94f4be32690fb41206dcfc8b8
483689d92cce9f87f3e387fb8f6742b496f53c07
/defs.h
8ac29f7a92b8c74ba5bae9759b5e4c3fd1249997
[]
no_license
tugrultosun/ceng477
089b1c58ba9f85d5efeb30632769cce0b38f69b9
75943083c77c3946ba3d0015917af22b01860a07
refs/heads/main
2023-07-27T09:44:41.144482
2021-09-06T13:49:40
2021-09-06T13:49:40
377,234,033
0
0
null
null
null
null
UTF-8
C++
false
false
1,304
h
#ifndef _DEFS_H_ #define _DEFS_H_ class Scene; /* 3 dimensional vector holding floating point numbers. Used for both coordinates and color. Use x, y, z for coordinate computations, and use r, g, b for color computations. Note that you do not have to use this one if you use any vector computation library like Eigen. */ typedef struct Vector3f { union { float x; float r; }; union { float y; float g; }; union { float z; float b; }; } Vector3f; /* Structure to hold return value from ray intersection routine. This should hold information related to the intersection point, for example, coordinate of the intersection point, surface normal at the intersection point etc. Think about the variables you will need for this purpose and declare them here inside of this structure. */ typedef struct ReturnVal { /*********************************************** * * * TODO: Implement this structure * * * *********************************************** */ bool isInter; Vector3f pos; Vector3f normal; float t; Vector3f a,b,c; int mat; } ReturnVal; // // The global variable through which you can access the scene data // extern Scene* pScene; #endif
[ "noreply@github.com" ]
noreply@github.com
029b58c664dc8bc8509f2260c5caeda37ccebedc
eb5a10fb016776ed689b71141565ff7fab3249d3
/src/qt/guiutil.cpp
2361928b343a532d8945e7157ccd320008f4956d
[ "MIT" ]
permissive
hiredcoincc/hiredcoin
87b059916634c30150a5093b015677499f8f9aa5
d4c39e40b6e0aca633e0991190cd642303d315e6
refs/heads/master
2020-09-26T16:43:36.959046
2019-12-06T09:37:34
2019-12-06T09:37:34
226,293,941
0
0
null
null
null
null
UTF-8
C++
false
false
30,967
cpp
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "bitcoinunits.h" #include "qvalidatedlineedit.h" #include "walletmodel.h" #include "init.h" #include "main.h" #include "primitives/transaction.h" #include "protocol.h" #include "script/script.h" #include "script/standard.h" #include "util.h" #ifdef WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0501 #ifdef _WIN32_IE #undef _WIN32_IE #endif #define _WIN32_IE 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX #endif #include "shellapi.h" #include "shlobj.h" #include "shlwapi.h" #endif #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #if BOOST_FILESYSTEM_VERSION >= 3 #include <boost/filesystem/detail/utf8_codecvt_facet.hpp> #endif #include <QAbstractItemView> #include <QApplication> #include <QClipboard> #include <QDateTime> #include <QDesktopServices> #include <QDesktopWidget> #include <QDoubleValidator> #include <QFileDialog> #include <QFont> #include <QLineEdit> #include <QSettings> #include <QTextDocument> // for Qt::mightBeRichText #include <QThread> #if QT_VERSION < 0x050000 #include <QUrl> #else #include <QUrlQuery> #endif #if BOOST_FILESYSTEM_VERSION >= 3 static boost::filesystem::detail::utf8_codecvt_facet utf8; #endif #if defined(Q_OS_MAC) extern double NSAppKitVersionNumber; #if !defined(NSAppKitVersionNumber10_8) #define NSAppKitVersionNumber10_8 1187 #endif #if !defined(NSAppKitVersionNumber10_9) #define NSAppKitVersionNumber10_9 1265 #endif #endif #define URI_SCHEME "hiredcoin" namespace GUIUtil { QString dateTimeStr(const QDateTime& date) { return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm"); } QString dateTimeStr(qint64 nTime) { return dateTimeStr(QDateTime::fromTime_t((qint32)nTime)); } QFont bitcoinAddressFont() { QFont font("Monospace"); #if QT_VERSION >= 0x040800 font.setStyleHint(QFont::Monospace); #else font.setStyleHint(QFont::TypeWriter); #endif return font; } void setupAddressWidget(QValidatedLineEdit* widget, QWidget* parent) { parent->setFocusProxy(widget); widget->setFont(bitcoinAddressFont()); #if QT_VERSION >= 0x040700 // We don't want translators to use own addresses in translations // and this is the only place, where this address is supplied. widget->setPlaceholderText(QObject::tr("Enter a HRD address (e.g. %1)").arg("D7VFR83SQbiezrW72hjcWJtcfip5krte2Z")); #endif widget->setValidator(new BitcoinAddressEntryValidator(parent)); widget->setCheckValidator(new BitcoinAddressCheckValidator(parent)); } void setupAmountWidget(QLineEdit* widget, QWidget* parent) { QDoubleValidator* amountValidator = new QDoubleValidator(parent); amountValidator->setDecimals(8); amountValidator->setBottom(0.0); widget->setValidator(amountValidator); widget->setAlignment(Qt::AlignRight | Qt::AlignVCenter); } bool parseBitcoinURI(const QUrl& uri, SendCoinsRecipient* out) { // return if URI is not valid or is no HRD: URI if (!uri.isValid() || uri.scheme() != QString(URI_SCHEME)) return false; SendCoinsRecipient rv; rv.address = uri.path(); // Trim any following forward slash which may have been added by the OS if (rv.address.endsWith("/")) { rv.address.truncate(rv.address.length() - 1); } rv.amount = 0; #if QT_VERSION < 0x050000 QList<QPair<QString, QString> > items = uri.queryItems(); #else QUrlQuery uriQuery(uri); QList<QPair<QString, QString> > items = uriQuery.queryItems(); #endif for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++) { bool fShouldReturnFalse = false; if (i->first.startsWith("req-")) { i->first.remove(0, 4); fShouldReturnFalse = true; } if (i->first == "label") { rv.label = i->second; fShouldReturnFalse = false; } if (i->first == "message") { rv.message = i->second; fShouldReturnFalse = false; } else if (i->first == "amount") { if (!i->second.isEmpty()) { if (!BitcoinUnits::parse(BitcoinUnits::HRD, i->second, &rv.amount)) { return false; } } fShouldReturnFalse = false; } if (fShouldReturnFalse) return false; } if (out) { *out = rv; } return true; } bool parseBitcoinURI(QString uri, SendCoinsRecipient* out) { // Convert hiredcoin:// to hiredcoin: // // Cannot handle this later, because hiredcoin:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). if (uri.startsWith(URI_SCHEME "://", Qt::CaseInsensitive)) { uri.replace(0, std::strlen(URI_SCHEME) + 3, URI_SCHEME ":"); } QUrl uriInstance(uri); return parseBitcoinURI(uriInstance, out); } QString formatBitcoinURI(const SendCoinsRecipient& info) { QString ret = QString(URI_SCHEME ":%1").arg(info.address); int paramCount = 0; if (info.amount) { ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::HRD, info.amount, false, BitcoinUnits::separatorNever)); paramCount++; } if (!info.label.isEmpty()) { QString lbl(QUrl::toPercentEncoding(info.label)); ret += QString("%1label=%2").arg(paramCount == 0 ? "?" : "&").arg(lbl); paramCount++; } if (!info.message.isEmpty()) { QString msg(QUrl::toPercentEncoding(info.message)); ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg); paramCount++; } return ret; } bool isDust(const QString& address, const CAmount& amount) { CTxDestination dest = CBitcoinAddress(address.toStdString()).Get(); CScript script = GetScriptForDestination(dest); CTxOut txOut(amount, script); return txOut.IsDust(::minRelayTxFee); } QString HtmlEscape(const QString& str, bool fMultiLine) { #if QT_VERSION < 0x050000 QString escaped = Qt::escape(str); #else QString escaped = str.toHtmlEscaped(); #endif escaped = escaped.replace(" ", "&nbsp;"); if (fMultiLine) { escaped = escaped.replace("\n", "<br>\n"); } return escaped; } QString HtmlEscape(const std::string& str, bool fMultiLine) { return HtmlEscape(QString::fromStdString(str), fMultiLine); } void copyEntryData(QAbstractItemView* view, int column, int role) { if (!view || !view->selectionModel()) return; QModelIndexList selection = view->selectionModel()->selectedRows(column); if (!selection.isEmpty()) { // Copy first item setClipboard(selection.at(0).data(role).toString()); } } QString getSaveFileName(QWidget* parent, const QString& caption, const QString& dir, const QString& filter, QString* selectedSuffixOut) { QString selectedFilter; QString myDir; if (dir.isEmpty()) // Default to user documents location { #if QT_VERSION < 0x050000 myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); #else myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); #endif } else { myDir = dir; } /* Directly convert path to native OS path separators */ QString result = QDir::toNativeSeparators(QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter)); /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); QString selectedSuffix; if (filter_re.exactMatch(selectedFilter)) { selectedSuffix = filter_re.cap(1); } /* Add suffix if needed */ QFileInfo info(result); if (!result.isEmpty()) { if (info.suffix().isEmpty() && !selectedSuffix.isEmpty()) { /* No suffix specified, add selected suffix */ if (!result.endsWith(".")) result.append("."); result.append(selectedSuffix); } } /* Return selected suffix if asked to */ if (selectedSuffixOut) { *selectedSuffixOut = selectedSuffix; } return result; } QString getOpenFileName(QWidget* parent, const QString& caption, const QString& dir, const QString& filter, QString* selectedSuffixOut) { QString selectedFilter; QString myDir; if (dir.isEmpty()) // Default to user documents location { #if QT_VERSION < 0x050000 myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); #else myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); #endif } else { myDir = dir; } /* Directly convert path to native OS path separators */ QString result = QDir::toNativeSeparators(QFileDialog::getOpenFileName(parent, caption, myDir, filter, &selectedFilter)); if (selectedSuffixOut) { /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); QString selectedSuffix; if (filter_re.exactMatch(selectedFilter)) { selectedSuffix = filter_re.cap(1); } *selectedSuffixOut = selectedSuffix; } return result; } Qt::ConnectionType blockingGUIThreadConnection() { if (QThread::currentThread() != qApp->thread()) { return Qt::BlockingQueuedConnection; } else { return Qt::DirectConnection; } } bool checkPoint(const QPoint& p, const QWidget* w) { QWidget* atW = QApplication::widgetAt(w->mapToGlobal(p)); if (!atW) return false; return atW->topLevelWidget() == w; } bool isObscured(QWidget* w) { return !(checkPoint(QPoint(0, 0), w) && checkPoint(QPoint(w->width() - 1, 0), w) && checkPoint(QPoint(0, w->height() - 1), w) && checkPoint(QPoint(w->width() - 1, w->height() - 1), w) && checkPoint(QPoint(w->width() / 2, w->height() / 2), w)); } void openDebugLogfile() { boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; /* Open debug.log with the associated application */ if (boost::filesystem::exists(pathDebug)) QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug))); } void openConfigfile() { boost::filesystem::path pathConfig = GetConfigFile(); /* Open hiredcoin.conf with the associated application */ if (boost::filesystem::exists(pathConfig)) QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig))); } void openMNConfigfile() { boost::filesystem::path pathConfig = GetMasternodeConfigFile(); /* Open masternode.conf with the associated application */ if (boost::filesystem::exists(pathConfig)) QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathConfig))); } void showBackups() { boost::filesystem::path pathBackups = GetDataDir() / "backups"; /* Open folder with default browser */ if (boost::filesystem::exists(pathBackups)) QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathBackups))); } void SubstituteFonts(const QString& language) { #if defined(Q_OS_MAC) // Background: // OSX's default font changed in 10.9 and QT is unable to find it with its // usual fallback methods when building against the 10.7 sdk or lower. // The 10.8 SDK added a function to let it find the correct fallback font. // If this fallback is not properly loaded, some characters may fail to // render correctly. // // The same thing happened with 10.10. .Helvetica Neue DeskInterface is now default. // // Solution: If building with the 10.7 SDK or lower and the user's platform // is 10.9 or higher at runtime, substitute the correct font. This needs to // happen before the QApplication is created. #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) { if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9) /* On a 10.9 - 10.9.x system */ QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); else { /* 10.10 or later system */ if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC"); else if (language == "ja") // Japanesee QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC"); else QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande"); } } #endif #endif } ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject* parent) : QObject(parent), size_threshold(size_threshold) { } bool ToolTipToRichTextFilter::eventFilter(QObject* obj, QEvent* evt) { if (evt->type() == QEvent::ToolTipChange) { QWidget* widget = static_cast<QWidget*>(obj); QString tooltip = widget->toolTip(); if (tooltip.size() > size_threshold && !tooltip.startsWith("<qt")) { // Escape the current message as HTML and replace \n by <br> if it's not rich text if (!Qt::mightBeRichText(tooltip)) tooltip = HtmlEscape(tooltip, true); // Envelop with <qt></qt> to make sure Qt detects every tooltip as rich text // and style='white-space:pre' to preserve line composition tooltip = "<qt style='white-space:pre'>" + tooltip + "</qt>"; widget->setToolTip(tooltip); return true; } } return QObject::eventFilter(obj, evt); } void TableViewLastColumnResizingFixer::connectViewHeadersSignals() { connect(tableView->horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this, SLOT(on_sectionResized(int, int, int))); connect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, SLOT(on_geometriesChanged())); } // We need to disconnect these while handling the resize events, otherwise we can enter infinite loops. void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals() { disconnect(tableView->horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this, SLOT(on_sectionResized(int, int, int))); disconnect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()), this, SLOT(on_geometriesChanged())); } // Setup the resize mode, handles compatibility for Qt5 and below as the method signatures changed. // Refactored here for readability. void TableViewLastColumnResizingFixer::setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode) { #if QT_VERSION < 0x050000 tableView->horizontalHeader()->setResizeMode(logicalIndex, resizeMode); #else tableView->horizontalHeader()->setSectionResizeMode(logicalIndex, resizeMode); #endif } void TableViewLastColumnResizingFixer::resizeColumn(int nColumnIndex, int width) { tableView->setColumnWidth(nColumnIndex, width); tableView->horizontalHeader()->resizeSection(nColumnIndex, width); } int TableViewLastColumnResizingFixer::getColumnsWidth() { int nColumnsWidthSum = 0; for (int i = 0; i < columnCount; i++) { nColumnsWidthSum += tableView->horizontalHeader()->sectionSize(i); } return nColumnsWidthSum; } int TableViewLastColumnResizingFixer::getAvailableWidthForColumn(int column) { int nResult = lastColumnMinimumWidth; int nTableWidth = tableView->horizontalHeader()->width(); if (nTableWidth > 0) { int nOtherColsWidth = getColumnsWidth() - tableView->horizontalHeader()->sectionSize(column); nResult = std::max(nResult, nTableWidth - nOtherColsWidth); } return nResult; } // Make sure we don't make the columns wider than the tables viewport width. void TableViewLastColumnResizingFixer::adjustTableColumnsWidth() { disconnectViewHeadersSignals(); resizeColumn(lastColumnIndex, getAvailableWidthForColumn(lastColumnIndex)); connectViewHeadersSignals(); int nTableWidth = tableView->horizontalHeader()->width(); int nColsWidth = getColumnsWidth(); if (nColsWidth > nTableWidth) { resizeColumn(secondToLastColumnIndex, getAvailableWidthForColumn(secondToLastColumnIndex)); } } // Make column use all the space available, useful during window resizing. void TableViewLastColumnResizingFixer::stretchColumnWidth(int column) { disconnectViewHeadersSignals(); resizeColumn(column, getAvailableWidthForColumn(column)); connectViewHeadersSignals(); } // When a section is resized this is a slot-proxy for ajustAmountColumnWidth(). void TableViewLastColumnResizingFixer::on_sectionResized(int logicalIndex, int oldSize, int newSize) { adjustTableColumnsWidth(); int remainingWidth = getAvailableWidthForColumn(logicalIndex); if (newSize > remainingWidth) { resizeColumn(logicalIndex, remainingWidth); } } // When the tabless geometry is ready, we manually perform the stretch of the "Message" column, // as the "Stretch" resize mode does not allow for interactive resizing. void TableViewLastColumnResizingFixer::on_geometriesChanged() { if ((getColumnsWidth() - this->tableView->horizontalHeader()->width()) != 0) { disconnectViewHeadersSignals(); resizeColumn(secondToLastColumnIndex, getAvailableWidthForColumn(secondToLastColumnIndex)); connectViewHeadersSignals(); } } /** * Initializes all internal variables and prepares the * the resize modes of the last 2 columns of the table and */ TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth) : tableView(table), lastColumnMinimumWidth(lastColMinimumWidth), allColumnsMinimumWidth(allColsMinimumWidth) { columnCount = tableView->horizontalHeader()->count(); lastColumnIndex = columnCount - 1; secondToLastColumnIndex = columnCount - 2; tableView->horizontalHeader()->setMinimumSectionSize(allColumnsMinimumWidth); setViewHeaderResizeMode(secondToLastColumnIndex, QHeaderView::Interactive); setViewHeaderResizeMode(lastColumnIndex, QHeaderView::Interactive); } /** * Class constructor. * @param[in] seconds Number of seconds to convert to a DHMS string */ DHMSTableWidgetItem::DHMSTableWidgetItem(const int64_t seconds) : QTableWidgetItem(), value(seconds) { this->setText(QString::fromStdString(DurationToDHMS(seconds))); } /** * Comparator overload to ensure that the "DHMS"-type durations as used in * the "active-since" list in the masternode tab are sorted by the elapsed * duration (versus the string value being sorted). * @param[in] item Right hand side of the less than operator */ bool DHMSTableWidgetItem::operator<(QTableWidgetItem const& item) const { DHMSTableWidgetItem const* rhs = dynamic_cast<DHMSTableWidgetItem const*>(&item); if (!rhs) return QTableWidgetItem::operator<(item); return value < rhs->value; } #ifdef WIN32 boost::filesystem::path static StartupShortcutPath() { return GetSpecialFolderPath(CSIDL_STARTUP) / "HRD.lnk"; } bool GetStartOnSystemStartup() { // check for HRD.lnk return boost::filesystem::exists(StartupShortcutPath()); } bool SetStartOnSystemStartup(bool fAutoStart) { // If the shortcut exists already, remove it for updating boost::filesystem::remove(StartupShortcutPath()); if (fAutoStart) { CoInitialize(NULL); // Get a pointer to the IShellLink interface. IShellLink* psl = NULL; HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<void**>(&psl)); if (SUCCEEDED(hres)) { // Get the current executable path TCHAR pszExePath[MAX_PATH]; GetModuleFileName(NULL, pszExePath, sizeof(pszExePath)); TCHAR pszArgs[5] = TEXT("-min"); // Set the path to the shortcut target psl->SetPath(pszExePath); PathRemoveFileSpec(pszExePath); psl->SetWorkingDirectory(pszExePath); psl->SetShowCmd(SW_SHOWMINNOACTIVE); psl->SetArguments(pszArgs); // Query IShellLink for the IPersistFile interface for // saving the shortcut in persistent storage. IPersistFile* ppf = NULL; hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf)); if (SUCCEEDED(hres)) { WCHAR pwsz[MAX_PATH]; // Ensure that the string is ANSI. MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH); // Save the link by calling IPersistFile::Save. hres = ppf->Save(pwsz, TRUE); ppf->Release(); psl->Release(); CoUninitialize(); return true; } psl->Release(); } CoUninitialize(); return false; } return true; } #elif defined(Q_OS_LINUX) // Follow the Desktop Application Autostart Spec: // http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html boost::filesystem::path static GetAutostartDir() { namespace fs = boost::filesystem; char* pszConfigHome = getenv("XDG_CONFIG_HOME"); if (pszConfigHome) return fs::path(pszConfigHome) / "autostart"; char* pszHome = getenv("HOME"); if (pszHome) return fs::path(pszHome) / ".config" / "autostart"; return fs::path(); } boost::filesystem::path static GetAutostartFilePath() { return GetAutostartDir() / "hiredcoin.desktop"; } bool GetStartOnSystemStartup() { boost::filesystem::ifstream optionFile(GetAutostartFilePath()); if (!optionFile.good()) return false; // Scan through file for "Hidden=true": std::string line; while (!optionFile.eof()) { getline(optionFile, line); if (line.find("Hidden") != std::string::npos && line.find("true") != std::string::npos) return false; } optionFile.close(); return true; } bool SetStartOnSystemStartup(bool fAutoStart) { if (!fAutoStart) boost::filesystem::remove(GetAutostartFilePath()); else { char pszExePath[MAX_PATH + 1]; memset(pszExePath, 0, sizeof(pszExePath)); if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath) - 1) == -1) return false; boost::filesystem::create_directories(GetAutostartDir()); boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out | std::ios_base::trunc); if (!optionFile.good()) return false; // Write a hiredcoin.desktop file to the autostart directory: optionFile << "[Desktop Entry]\n"; optionFile << "Type=Application\n"; optionFile << "Name=HRD\n"; optionFile << "Exec=" << pszExePath << " -min\n"; optionFile << "Terminal=false\n"; optionFile << "Hidden=false\n"; optionFile.close(); } return true; } #elif defined(Q_OS_MAC) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // based on: https://github.com/Mozketo/LaunchAtLoginController/blob/master/LaunchAtLoginController.m #include <CoreFoundation/CoreFoundation.h> #include <CoreServices/CoreServices.h> LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl); LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl) { // loop through the list of startup items and try to find the hiredcoin app CFArrayRef listSnapshot = LSSharedFileListCopySnapshot(list, NULL); for (int i = 0; i < CFArrayGetCount(listSnapshot); i++) { LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i); UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes; CFURLRef currentItemURL = NULL; #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100 if(&LSSharedFileListItemCopyResolvedURL) currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL); #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100 else LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL); #endif #else LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL); #endif if(currentItemURL && CFEqual(currentItemURL, findUrl)) { // found CFRelease(currentItemURL); return item; } if (currentItemURL) { CFRelease(currentItemURL); } } return NULL; } bool GetStartOnSystemStartup() { CFURLRef bitcoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle()); LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL); LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl); return !!foundItem; // return boolified object } bool SetStartOnSystemStartup(bool fAutoStart) { CFURLRef bitcoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle()); LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL); LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl); if (fAutoStart && !foundItem) { // add hiredcoin app to startup item list LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, NULL, NULL, bitcoinAppUrl, NULL, NULL); } else if (!fAutoStart && foundItem) { // remove item LSSharedFileListItemRemove(loginItems, foundItem); } return true; } #pragma GCC diagnostic pop #else bool GetStartOnSystemStartup() { return false; } bool SetStartOnSystemStartup(bool fAutoStart) { return false; } #endif void saveWindowGeometry(const QString& strSetting, QWidget* parent) { QSettings settings; settings.setValue(strSetting + "Pos", parent->pos()); settings.setValue(strSetting + "Size", parent->size()); } void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSize, QWidget* parent) { QSettings settings; QPoint pos = settings.value(strSetting + "Pos").toPoint(); QSize size = settings.value(strSetting + "Size", defaultSize).toSize(); if (!pos.x() && !pos.y()) { QRect screen = QApplication::desktop()->screenGeometry(); pos.setX((screen.width() - size.width()) / 2); pos.setY((screen.height() - size.height()) / 2); } parent->resize(size); parent->move(pos); } // Check whether a theme is not build-in bool isExternal(QString theme) { if (theme.isEmpty()) return false; return (theme.operator!=("default")); } // Open CSS when configured QString loadStyleSheet() { QString styleSheet; QSettings settings; QString cssName; QString theme = settings.value("theme", "").toString(); if (isExternal(theme)) { // External CSS settings.setValue("fCSSexternal", true); boost::filesystem::path pathAddr = GetDataDir() / "themes/"; cssName = pathAddr.string().c_str() + theme + "/css/theme.css"; } else { // Build-in CSS settings.setValue("fCSSexternal", false); if (!theme.isEmpty()) { cssName = QString(":/css/") + theme; } else { cssName = QString(":/css/default"); settings.setValue("theme", "default"); } } QFile qFile(cssName); if (qFile.open(QFile::ReadOnly)) { styleSheet = QLatin1String(qFile.readAll()); } return styleSheet; } void setClipboard(const QString& str) { QApplication::clipboard()->setText(str, QClipboard::Clipboard); QApplication::clipboard()->setText(str, QClipboard::Selection); } #if BOOST_FILESYSTEM_VERSION >= 3 boost::filesystem::path qstringToBoostPath(const QString& path) { return boost::filesystem::path(path.toStdString(), utf8); } QString boostPathToQString(const boost::filesystem::path& path) { return QString::fromStdString(path.string(utf8)); } #else #warning Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older boost::filesystem::path qstringToBoostPath(const QString& path) { return boost::filesystem::path(path.toStdString()); } QString boostPathToQString(const boost::filesystem::path& path) { return QString::fromStdString(path.string()); } #endif QString formatDurationStr(int secs) { QStringList strList; int days = secs / 86400; int hours = (secs % 86400) / 3600; int mins = (secs % 3600) / 60; int seconds = secs % 60; if (days) strList.append(QString(QObject::tr("%1 d")).arg(days)); if (hours) strList.append(QString(QObject::tr("%1 h")).arg(hours)); if (mins) strList.append(QString(QObject::tr("%1 m")).arg(mins)); if (seconds || (!days && !hours && !mins)) strList.append(QString(QObject::tr("%1 s")).arg(seconds)); return strList.join(" "); } QString formatServicesStr(quint64 mask) { QStringList strList; // Just scan the last 8 bits for now. for (int i = 0; i < 8; i++) { uint64_t check = 1 << i; if (mask & check) { switch (check) { case NODE_NETWORK: strList.append(QObject::tr("NETWORK")); break; case NODE_BLOOM: case NODE_BLOOM_WITHOUT_MN: strList.append(QObject::tr("BLOOM")); break; default: strList.append(QString("%1[%2]").arg(QObject::tr("UNKNOWN")).arg(check)); } } } if (strList.size()) return strList.join(" & "); else return QObject::tr("None"); } QString formatPingTime(double dPingTime) { return dPingTime == 0 ? QObject::tr("N/A") : QString(QObject::tr("%1 ms")).arg(QString::number((int)(dPingTime * 1000), 10)); } } // namespace GUIUtil
[ "drandrewbullock@gmail.com" ]
drandrewbullock@gmail.com
8e3688d5e46cd34f408528030c146124b8cb348b
6b0cf9873b66920f9fc490f835d2a14f7c766bab
/test/include/ossl_random.cpp
22935e7d1c7c188967307e47f6d9e408e6865ee0
[ "Apache-2.0" ]
permissive
openbmc/bmcweb
b63a263ce88f3de6e0120412f18ed23510b7d65d
7ead48e61a7b507eb187933d9497ed9b31e4401f
refs/heads/master
2023-09-01T20:29:21.480993
2023-09-01T13:57:10
2023-09-01T16:33:00
116,327,333
139
143
NOASSERTION
2021-04-23T18:50:56
2018-01-05T01:50:42
C++
UTF-8
C++
false
false
452
cpp
#include "ossl_random.hpp" #include <string> #include <gmock/gmock.h> // IWYU pragma: keep #include <gtest/gtest.h> // IWYU pragma: keep namespace { using testing::MatchesRegex; TEST(Bmcweb, GetRandomUUID) { using bmcweb::getRandomUUID; // 78e96a4b-62fe-48d8-ac09-7f75a94671e0 EXPECT_THAT( getRandomUUID(), MatchesRegex( "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$")); } } // namespace
[ "ed@tanous.net" ]
ed@tanous.net
9e046816851c367fb1ce678cdae4f0306b2b149a
018177b1d5873822d4eb1679135038f8acf2307f
/MissionToMarsTeamDD/MissionToMars/Led.cpp
83ce3a1f0b0489e178850dcb34942108724ff4f9
[]
no_license
SoftwareCornwall/m2m-teams-feb-18
ab32a037f75fd8dbf41d0a2dfcfa7b1e95471f3b
9b26685d1bfe2fada25949b227ba3c5e0aa5d82d
refs/heads/master
2021-04-27T16:47:20.432607
2018-02-21T08:52:06
2018-02-21T08:52:06
122,310,391
0
0
null
null
null
null
UTF-8
C++
false
false
172
cpp
#include "Led.hpp" #include "TimerDriver.hpp" Led::Led(LedDriver &driver) : mDriver(driver) { } void Led::SetLedState(bool ledIsOn) { mDriver.SetLedState(ledIsOn); }
[ "tony@plymouthsoftware.com" ]
tony@plymouthsoftware.com
0aeb343748024b0c3f67b1a5263ced8d8cbf2ef2
8947812c9c0be1f0bb6c30d1bb225d4d6aafb488
/01_Develop/libXMCocos2D-v3/Source/gui/Layouts/UILayout.cpp
8e37318dc10a1f064c8bca427b6abfd7f37d3df5
[ "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
48,013
cpp
/* ----------------------------------------------------------------------------------- * * File UILayout.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/Layouts/UILayout.h" #include "gui/System/UILayer.h" #include "gui/System/UIHelper.h" #include "extensions/GUI/CCControlExtension/CCScale9Sprite.h" #include "base/CCDictionary.h" #include "2d/CCDirector.h" #include "2d/sprite_nodes/CCSprite.h" namespace gui { #define DYNAMIC_CAST_CLIPPINGLAYER dynamic_cast<UIRectClippingNode*> ( m_pRenderer ) UILayout::UILayout(): m_bClippingEnabled(false), m_bBackGroundScale9Enabled(false), m_pBackGroundImage(nullptr), m_sBackGroundImageFileName(""), m_tBackGroundImageCapInsets(cocos2d::Rect::ZERO), m_eColorType(LAYOUT_COLOR_NONE), m_eBgImageTexType(UI_TEX_TYPE_LOCAL), m_pColorRender(nullptr), m_pGradientRender(nullptr), m_cColor(cocos2d::Color3B::WHITE), m_gStartColor(cocos2d::Color3B::WHITE), m_gEndColor(cocos2d::Color3B::WHITE), m_tAlongVector(cocos2d::Point(0.0f, -1.0f)), m_cOpacity(255), m_tBackGroundImageTextureSize(cocos2d::Size::ZERO), m_eLayoutType(LAYOUT_ABSOLUTE) { m_eWidgetType = WidgetTypeContainer; } UILayout::~UILayout() { } UILayout* UILayout::create() { UILayout* layout = new UILayout(); if (layout && layout->init()) { layout->autorelease(); return layout; } CC_SAFE_DELETE(layout); return nullptr; } bool UILayout::init() { m_pChildren = cocos2d::Array::create(); m_pChildren->retain(); m_pLayoutParameterDictionary = cocos2d::Dictionary::create(); CC_SAFE_RETAIN(m_pLayoutParameterDictionary); initRenderer(); m_pRenderer->retain(); m_pRenderer->setZOrder(m_nWidgetZOrder); cocos2d::RGBAProtocol* renderRGBA = dynamic_cast<cocos2d::RGBAProtocol*>(m_pRenderer); if (renderRGBA) { renderRGBA->setCascadeColorEnabled(false); renderRGBA->setCascadeOpacityEnabled(false); } ignoreContentAdaptWithSize(false); setSize(cocos2d::Size::ZERO); setBright(true); setAnchorPoint(cocos2d::Point(0, 0)); m_pScheduler = cocos2d::Director::getInstance()->getScheduler(); CC_SAFE_RETAIN(m_pScheduler); return true; } void UILayout::initRenderer() { m_pRenderer = UIRectClippingNode::create(); } bool UILayout::addChild(UIWidget *child) { supplyTheLayoutParameterLackToChild(child); return UIWidget::addChild(child); } bool UILayout::isClippingEnabled() { return m_bClippingEnabled; } bool UILayout::hitTest(const cocos2d::Point &pt) { cocos2d::Point nsp = m_pRenderer->convertToNodeSpace(pt); cocos2d::Rect bb = cocos2d::Rect(0.0f, 0.0f, m_tSize.width, m_tSize.height); if (nsp.x >= bb.origin.x && nsp.x <= bb.origin.x + bb.size.width && nsp.y >= bb.origin.y && nsp.y <= bb.origin.y + bb.size.height) { return true; } return false; } void UILayout::setClippingEnabled(bool able) { m_bClippingEnabled = able; DYNAMIC_CAST_CLIPPINGLAYER->setClippingEnabled(able); } void UILayout::onSizeChanged() { DYNAMIC_CAST_CLIPPINGLAYER->setClippingSize(m_tSize); if (strcmp(getDescription(), "Layout") == 0) { cocos2d::ccArray* arrayChildren = m_pChildren->data; int length = arrayChildren->num; for (int i=0; i<length; ++i) { UIWidget* child = (UIWidget*)arrayChildren->arr[i]; child->updateSizeAndPosition(); } doLayout(); } if (m_pBackGroundImage) { m_pBackGroundImage->setPosition(cocos2d::Point(m_tSize.width/2.0f, m_tSize.height/2.0f)); if (m_bBackGroundScale9Enabled && m_pBackGroundImage) { dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->setPreferredSize(m_tSize); } } if (m_pColorRender) { m_pColorRender->setContentSize(m_tSize); } if (m_pGradientRender) { m_pGradientRender->setContentSize(m_tSize); } } void UILayout::setBackGroundImageScale9Enabled(bool able) { if (m_bBackGroundScale9Enabled == able) { return; } m_pRenderer->removeChild(m_pBackGroundImage, true); m_pBackGroundImage = nullptr; m_bBackGroundScale9Enabled = able; if (m_bBackGroundScale9Enabled) { m_pBackGroundImage = cocos2d::extension::Scale9Sprite::create(); m_pRenderer->addChild(m_pBackGroundImage); } else { m_pBackGroundImage = cocos2d::Sprite::create(); m_pRenderer->addChild(m_pBackGroundImage); } m_pBackGroundImage->setZOrder(-1); setBackGroundImage(m_sBackGroundImageFileName.c_str(),m_eBgImageTexType); setBackGroundImageCapInsets(m_tBackGroundImageCapInsets); } void UILayout::setBackGroundImage(const char* fileName,TextureResType texType) { if (!fileName || strcmp(fileName, "") == 0) { return; } if (m_pBackGroundImage == nullptr) { addBackGroundImage(); } m_sBackGroundImageFileName = fileName; m_eBgImageTexType = texType; if (m_bBackGroundScale9Enabled) { switch (m_eBgImageTexType) { case UI_TEX_TYPE_LOCAL: dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->initWithFile(fileName); break; case UI_TEX_TYPE_PLIST: dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->initWithSpriteFrameName(fileName); break; default: break; } dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->setPreferredSize(m_tSize); } else { switch (m_eBgImageTexType) { case UI_TEX_TYPE_LOCAL: dynamic_cast<cocos2d::Sprite*>(m_pBackGroundImage)->initWithFile(fileName); break; case UI_TEX_TYPE_PLIST: dynamic_cast<cocos2d::Sprite*>(m_pBackGroundImage)->initWithSpriteFrameName(fileName); break; default: break; } } if (m_bBackGroundScale9Enabled) { dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->setColor(getColor()); dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->setOpacity(getOpacity()); } else { dynamic_cast<cocos2d::Sprite*>(m_pBackGroundImage)->setColor(getColor()); dynamic_cast<cocos2d::Sprite*>(m_pBackGroundImage)->setOpacity(getOpacity()); } m_tBackGroundImageTextureSize = m_pBackGroundImage->getContentSize(); m_pBackGroundImage->setPosition(cocos2d::Point(m_tSize.width/2.0f, m_tSize.height/2.0f)); } void UILayout::setBackGroundImageCapInsets(const cocos2d::Rect &capInsets) { m_tBackGroundImageCapInsets = capInsets; if (m_bBackGroundScale9Enabled && m_pBackGroundImage) { dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->setCapInsets(capInsets); } } void UILayout::supplyTheLayoutParameterLackToChild(UIWidget *child) { if (!child) { return; } switch (m_eLayoutType) { case LAYOUT_ABSOLUTE: break; case LAYOUT_LINEAR_HORIZONTAL: case LAYOUT_LINEAR_VERTICAL: { UILinearLayoutParameter* layoutParameter = dynamic_cast<UILinearLayoutParameter*>(child->getLayoutParameter(LAYOUT_PARAMETER_LINEAR)); if (!layoutParameter) { child->setLayoutParameter(UILinearLayoutParameter::create()); } break; } case LAYOUT_RELATIVE: { UIRelativeLayoutParameter* layoutParameter = dynamic_cast<UIRelativeLayoutParameter*>(child->getLayoutParameter(LAYOUT_PARAMETER_RELATIVE)); if (!layoutParameter) { child->setLayoutParameter(UIRelativeLayoutParameter::create()); } break; } default: break; } } void UILayout::addBackGroundImage() { if (m_bBackGroundScale9Enabled) { m_pBackGroundImage = cocos2d::extension::Scale9Sprite::create(); m_pBackGroundImage->setZOrder(-1); m_pRenderer->addChild(m_pBackGroundImage); dynamic_cast<cocos2d::extension::Scale9Sprite*>(m_pBackGroundImage)->setPreferredSize(m_tSize); } else { m_pBackGroundImage = cocos2d::Sprite::create(); m_pBackGroundImage->setZOrder(-1); m_pRenderer->addChild(m_pBackGroundImage); } m_pBackGroundImage->setPosition(cocos2d::Point(m_tSize.width/2.0f, m_tSize.height/2.0f)); } void UILayout::removeBackGroundImage() { if (!m_pBackGroundImage) { return; } m_pRenderer->removeChild(m_pBackGroundImage, true); m_pBackGroundImage = nullptr; m_sBackGroundImageFileName = ""; m_tBackGroundImageTextureSize = cocos2d::Size::ZERO; } void UILayout::setBackGroundColorType(LayoutBackGroundColorType type) { if (m_eColorType == type) { return; } switch (m_eColorType) { case LAYOUT_COLOR_NONE: if (m_pColorRender) { m_pRenderer->removeChild(m_pColorRender, true); m_pColorRender = nullptr; } if (m_pGradientRender) { m_pRenderer->removeChild(m_pGradientRender, true); m_pGradientRender = nullptr; } break; case LAYOUT_COLOR_SOLID: if (m_pColorRender) { m_pRenderer->removeChild(m_pColorRender, true); m_pColorRender = nullptr; } break; case LAYOUT_COLOR_GRADIENT: if (m_pGradientRender) { m_pRenderer->removeChild(m_pGradientRender, true); m_pGradientRender = nullptr; } break; default: break; } m_eColorType = type; switch (m_eColorType) { case LAYOUT_COLOR_NONE: break; case LAYOUT_COLOR_SOLID: m_pColorRender = cocos2d::LayerColor::create(); m_pColorRender->setContentSize(m_tSize); m_pColorRender->setOpacity(m_cOpacity); m_pColorRender->setColor(m_cColor); m_pRenderer->addChild(m_pColorRender,-2); break; case LAYOUT_COLOR_GRADIENT: m_pGradientRender = cocos2d::LayerGradient::create(); m_pGradientRender->setContentSize(m_tSize); m_pGradientRender->setOpacity(m_cOpacity); m_pGradientRender->setStartColor(m_gStartColor); m_pGradientRender->setEndColor(m_gEndColor); m_pGradientRender->setVector(m_tAlongVector); m_pRenderer->addChild(m_pGradientRender,-2); break; default: break; } } void UILayout::setBackGroundColor(const cocos2d::Color3B &color) { m_cColor = color; if (m_pColorRender) { m_pColorRender->setColor(color); } } void UILayout::setBackGroundColor(const cocos2d::Color3B &startColor, const cocos2d::Color3B &endColor) { m_gStartColor = startColor; if (m_pGradientRender) { m_pGradientRender->setStartColor(startColor); } m_gEndColor = endColor; if (m_pGradientRender) { m_pGradientRender->setEndColor(endColor); } } void UILayout::setBackGroundColorOpacity(int opacity) { m_cOpacity = opacity; switch (m_eColorType) { case LAYOUT_COLOR_NONE: break; case LAYOUT_COLOR_SOLID: m_pColorRender->setOpacity(opacity); break; case LAYOUT_COLOR_GRADIENT: m_pGradientRender->setOpacity(opacity); break; default: break; } } void UILayout::setBackGroundColorVector(const cocos2d::Point &vector) { m_tAlongVector = vector; if (m_pGradientRender) { m_pGradientRender->setVector(vector); } } void UILayout::setColor(const cocos2d::Color3B &color) { UIWidget::setColor(color); if (m_pBackGroundImage) { cocos2d::RGBAProtocol* rgbap = dynamic_cast<cocos2d::RGBAProtocol*>(m_pBackGroundImage); if (rgbap) { rgbap->setColor(color); } } } void UILayout::setOpacity(int opacity) { UIWidget::setOpacity(opacity); if (m_pBackGroundImage) { cocos2d::RGBAProtocol* rgbap = dynamic_cast<cocos2d::RGBAProtocol*>(m_pBackGroundImage); if (rgbap) { rgbap->setOpacity(opacity); } } } const cocos2d::Size& UILayout::getBackGroundImageTextureSize() const { return m_tBackGroundImageTextureSize; } const cocos2d::Size& UILayout::getContentSize() const { return m_pRenderer->getContentSize(); } void UILayout::setLayoutType(LayoutType type) { m_eLayoutType = type; cocos2d::ccArray* layoutChildrenArray = getChildren()->data; int length = layoutChildrenArray->num; for (int i=0; i<length; i++) { UIWidget* child = dynamic_cast<UIWidget*>(layoutChildrenArray->arr[i]); supplyTheLayoutParameterLackToChild(child); } } LayoutType UILayout::getLayoutType() const { return m_eLayoutType; } void UILayout::doLayout() { switch (m_eLayoutType) { case LAYOUT_ABSOLUTE: break; case LAYOUT_LINEAR_VERTICAL: { cocos2d::ccArray* layoutChildrenArray = getChildren()->data; int length = layoutChildrenArray->num; cocos2d::Size layoutSize = getSize(); float topBoundary = layoutSize.height; for (int i=0; i<length; ++i) { UIWidget* child = dynamic_cast<UIWidget*>(layoutChildrenArray->arr[i]); UILinearLayoutParameter* layoutParameter = dynamic_cast<UILinearLayoutParameter*>(child->getLayoutParameter(LAYOUT_PARAMETER_LINEAR)); if (layoutParameter) { UILinearGravity childGravity = layoutParameter->getGravity(); cocos2d::Point ap = child->getAnchorPoint(); cocos2d::Size cs = child->getSize(); float finalPosX = ap.x * cs.width; float finalPosY = topBoundary - ((1.0f-ap.y) * cs.height); switch (childGravity) { case LINEAR_GRAVITY_NONE: case LINEAR_GRAVITY_LEFT: break; case LINEAR_GRAVITY_RIGHT: finalPosX = layoutSize.width - ((1.0f - ap.x) * cs.width); break; case LINEAR_GRAVITY_CENTER_HORIZONTAL: finalPosX = layoutSize.width / 2.0f - cs.width * (0.5f-ap.x); break; default: break; } UIMargin mg = layoutParameter->getMargin(); finalPosX += mg.left; finalPosY -= mg.top; child->setPosition(cocos2d::Point(finalPosX, finalPosY)); topBoundary = child->getBottomInParent() - mg.bottom; } } break; } case LAYOUT_LINEAR_HORIZONTAL: { cocos2d::ccArray* layoutChildrenArray = getChildren()->data; int length = layoutChildrenArray->num; cocos2d::Size layoutSize = getSize(); float leftBoundary = 0.0f; for (int i=0; i<length; ++i) { UIWidget* child = dynamic_cast<UIWidget*>(layoutChildrenArray->arr[i]); UILinearLayoutParameter* layoutParameter = dynamic_cast<UILinearLayoutParameter*>(child->getLayoutParameter(LAYOUT_PARAMETER_LINEAR)); if (layoutParameter) { UILinearGravity childGravity = layoutParameter->getGravity(); cocos2d::Point ap = child->getAnchorPoint(); cocos2d::Size cs = child->getSize(); float finalPosX = leftBoundary + (ap.x * cs.width); float finalPosY = layoutSize.height - (1.0f - ap.y) * cs.height; switch (childGravity) { case LINEAR_GRAVITY_NONE: case LINEAR_GRAVITY_TOP: break; case LINEAR_GRAVITY_BOTTOM: finalPosY = ap.y * cs.height; break; case LINEAR_GRAVITY_CENTER_VERTICAL: finalPosY = layoutSize.height / 2.0f - cs.height * (0.5f - ap.y); break; default: break; } UIMargin mg = layoutParameter->getMargin(); finalPosX += mg.left; finalPosY -= mg.top; child->setPosition(cocos2d::Point(finalPosX, finalPosY)); leftBoundary = child->getRightInParent() + mg.right; } } break; } case LAYOUT_RELATIVE: { cocos2d::ccArray* layoutChildrenArray = getChildren()->data; int length = layoutChildrenArray->num; int unlayoutChildCount = length; cocos2d::Size layoutSize = getSize(); for (int i=0; i<length; i++) { UIWidget* child = dynamic_cast<UIWidget*>(layoutChildrenArray->arr[i]); UIRelativeLayoutParameter* layoutParameter = dynamic_cast<UIRelativeLayoutParameter*>(child->getLayoutParameter(LAYOUT_PARAMETER_RELATIVE)); layoutParameter->m_bPut = false; } while (unlayoutChildCount > 0) { for (int i=0; i<length; i++) { UIWidget* child = dynamic_cast<UIWidget*>(layoutChildrenArray->arr[i]); UIRelativeLayoutParameter* layoutParameter = dynamic_cast<UIRelativeLayoutParameter*>(child->getLayoutParameter(LAYOUT_PARAMETER_RELATIVE)); if (layoutParameter) { if (layoutParameter->m_bPut) { continue; } cocos2d::Point ap = child->getAnchorPoint(); cocos2d::Size cs = child->getSize(); UIRelativeAlign align = layoutParameter->getAlign(); const char* relativeName = layoutParameter->getRelativeToWidgetName(); UIWidget* relativeWidget = nullptr; UIRelativeLayoutParameter* relativeWidgetLP = nullptr; float finalPosX = 0.0f; float finalPosY = 0.0f; if (relativeName && strcmp(relativeName, "")) { relativeWidget = UIHelper::seekWidgetByRelativeName(this, relativeName); if (relativeWidget) { relativeWidgetLP = dynamic_cast<UIRelativeLayoutParameter*>(relativeWidget->getLayoutParameter(LAYOUT_PARAMETER_RELATIVE)); } } switch (align) { case RELATIVE_ALIGN_NONE: case RELATIVE_ALIGN_PARENT_TOP_LEFT: finalPosX = ap.x * cs.width; finalPosY = layoutSize.height - ((1.0f - ap.y) * cs.height); break; case RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL: finalPosX = layoutSize.width * 0.5f - cs.width * (0.5f - ap.x); finalPosY = layoutSize.height - ((1.0f - ap.y) * cs.height); break; case RELATIVE_ALIGN_PARENT_TOP_RIGHT: finalPosX = layoutSize.width - ((1.0f - ap.x) * cs.width); finalPosY = layoutSize.height - ((1.0f - ap.y) * cs.height); break; case RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL: finalPosX = ap.x * cs.width; finalPosY = layoutSize.height * 0.5f - cs.height * (0.5f - ap.y); break; case RELATIVE_CENTER_IN_PARENT: finalPosX = layoutSize.width * 0.5f - cs.width * (0.5f - ap.x); finalPosY = layoutSize.height * 0.5f - cs.height * (0.5f - ap.y); break; case RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL: finalPosX = layoutSize.width - ((1.0f - ap.x) * cs.width); finalPosY = layoutSize.height * 0.5f - cs.height * (0.5f - ap.y); break; case RELATIVE_ALIGN_PARENT_LEFT_BOTTOM: finalPosX = ap.x * cs.width; finalPosY = ap.y * cs.height; break; case RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL: finalPosX = layoutSize.width * 0.5f - cs.width * (0.5f - ap.x); finalPosY = ap.y * cs.height; break; case RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM: finalPosX = layoutSize.width - ((1.0f - ap.x) * cs.width); finalPosY = ap.y * cs.height; break; case RELATIVE_LOCATION_ABOVE_LEFTALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationBottom = relativeWidget->getTopInParent(); float locationLeft = relativeWidget->getLeftInParent(); finalPosY = locationBottom + ap.y * cs.height; finalPosX = locationLeft + ap.x * cs.width; } break; case RELATIVE_LOCATION_ABOVE_CENTER: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } cocos2d::Size rbs = relativeWidget->getSize(); float locationBottom = relativeWidget->getTopInParent(); finalPosY = locationBottom + ap.y * cs.height; finalPosX = relativeWidget->getLeftInParent() + rbs.width * 0.5f + ap.x * cs.width - cs.width * 0.5f; } break; case RELATIVE_LOCATION_ABOVE_RIGHTALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationBottom = relativeWidget->getTopInParent(); float locationRight = relativeWidget->getRightInParent(); finalPosY = locationBottom + ap.y * cs.height; finalPosX = locationRight - (1.0f - ap.x) * cs.width; } break; case RELATIVE_LOCATION_LEFT_OF_TOPALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationTop = relativeWidget->getTopInParent(); float locationRight = relativeWidget->getLeftInParent(); finalPosY = locationTop - (1.0f - ap.y) * cs.height; finalPosX = locationRight - (1.0f - ap.x) * cs.width; } break; case RELATIVE_LOCATION_LEFT_OF_CENTER: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } cocos2d::Size rbs = relativeWidget->getSize(); float locationRight = relativeWidget->getLeftInParent(); finalPosX = locationRight - (1.0f - ap.x) * cs.width; finalPosY = relativeWidget->getBottomInParent() + rbs.height * 0.5f + ap.y * cs.height - cs.height * 0.5f; } break; case RELATIVE_LOCATION_LEFT_OF_BOTTOMALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationBottom = relativeWidget->getBottomInParent(); float locationRight = relativeWidget->getLeftInParent(); finalPosY = locationBottom + ap.y * cs.height; finalPosX = locationRight - (1.0f - ap.x) * cs.width; } break; case RELATIVE_LOCATION_RIGHT_OF_TOPALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationTop = relativeWidget->getTopInParent(); float locationLeft = relativeWidget->getRightInParent(); finalPosY = locationTop - (1.0f - ap.y) * cs.height; finalPosX = locationLeft + ap.x * cs.width; } break; case RELATIVE_LOCATION_RIGHT_OF_CENTER: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } cocos2d::Size rbs = relativeWidget->getSize(); float locationLeft = relativeWidget->getRightInParent(); finalPosX = locationLeft + ap.x * cs.width; finalPosY = relativeWidget->getBottomInParent() + rbs.height * 0.5f + ap.y * cs.height - cs.height * 0.5f; } break; case RELATIVE_LOCATION_RIGHT_OF_BOTTOMALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationBottom = relativeWidget->getBottomInParent(); float locationLeft = relativeWidget->getRightInParent(); finalPosY = locationBottom + ap.y * cs.height; finalPosX = locationLeft + ap.x * cs.width; } break; case RELATIVE_LOCATION_BELOW_LEFTALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationTop = relativeWidget->getBottomInParent(); float locationLeft = relativeWidget->getLeftInParent(); finalPosY = locationTop - (1.0f - ap.y) * cs.height; finalPosX = locationLeft + ap.x * cs.width; } break; case RELATIVE_LOCATION_BELOW_CENTER: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } cocos2d::Size rbs = relativeWidget->getSize(); float locationTop = relativeWidget->getBottomInParent(); finalPosY = locationTop - (1.0f - ap.y) * cs.height; finalPosX = relativeWidget->getLeftInParent() + rbs.width * 0.5f + ap.x * cs.width - cs.width * 0.5f; } break; case RELATIVE_LOCATION_BELOW_RIGHTALIGN: if (relativeWidget) { if (relativeWidgetLP && !relativeWidgetLP->m_bPut) { continue; } float locationTop = relativeWidget->getBottomInParent(); float locationRight = relativeWidget->getRightInParent(); finalPosY = locationTop - (1.0f - ap.y) * cs.height; finalPosX = locationRight - (1.0f - ap.x) * cs.width; } break; default: break; } UIMargin relativeWidgetMargin; UIMargin mg = layoutParameter->getMargin(); if (relativeWidgetLP) { relativeWidgetMargin = relativeWidgetLP->getMargin(); } //handle margin switch (align) { case RELATIVE_ALIGN_NONE: case RELATIVE_ALIGN_PARENT_TOP_LEFT: finalPosX += mg.left; finalPosY -= mg.top; break; case RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL: finalPosY -= mg.top; break; case RELATIVE_ALIGN_PARENT_TOP_RIGHT: finalPosX -= mg.right; finalPosY -= mg.top; break; case RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL: finalPosX += mg.left; break; case RELATIVE_CENTER_IN_PARENT: break; case RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL: finalPosX -= mg.right; break; case RELATIVE_ALIGN_PARENT_LEFT_BOTTOM: finalPosX += mg.left; finalPosY += mg.bottom; break; case RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL: finalPosY += mg.bottom; break; case RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM: finalPosX -= mg.right; finalPosY += mg.bottom; break; case RELATIVE_LOCATION_ABOVE_LEFTALIGN: finalPosY += mg.bottom; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT) { finalPosY += relativeWidgetMargin.top; } finalPosX += mg.left; break; case RELATIVE_LOCATION_ABOVE_RIGHTALIGN: finalPosY += mg.bottom; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT) { finalPosY += relativeWidgetMargin.top; } finalPosX -= mg.right; break; case RELATIVE_LOCATION_ABOVE_CENTER: finalPosY += mg.bottom; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT) { finalPosY += relativeWidgetMargin.top; } break; case RELATIVE_LOCATION_LEFT_OF_TOPALIGN: finalPosX -= mg.right; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL) { finalPosX -= relativeWidgetMargin.left; } finalPosY -= mg.top; break; case RELATIVE_LOCATION_LEFT_OF_BOTTOMALIGN: finalPosX -= mg.right; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL) { finalPosX -= relativeWidgetMargin.left; } finalPosY += mg.bottom; break; case RELATIVE_LOCATION_LEFT_OF_CENTER: finalPosX -= mg.right; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL) { finalPosX -= relativeWidgetMargin.left; } break; case RELATIVE_LOCATION_RIGHT_OF_TOPALIGN: finalPosX += mg.left; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL) { finalPosX += relativeWidgetMargin.right; } finalPosY -= mg.top; break; case RELATIVE_LOCATION_RIGHT_OF_BOTTOMALIGN: finalPosX += mg.left; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL) { finalPosX += relativeWidgetMargin.right; } finalPosY += mg.bottom; break; case RELATIVE_LOCATION_RIGHT_OF_CENTER: finalPosX += mg.left; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL) { finalPosX += relativeWidgetMargin.right; } break; case RELATIVE_LOCATION_BELOW_LEFTALIGN: finalPosY -= mg.top; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL) { finalPosY -= relativeWidgetMargin.bottom; } finalPosX += mg.left; break; case RELATIVE_LOCATION_BELOW_RIGHTALIGN: finalPosY -= mg.top; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL) { finalPosY -= relativeWidgetMargin.bottom; } finalPosX -= mg.right; break; case RELATIVE_LOCATION_BELOW_CENTER: finalPosY -= mg.top; if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL) { finalPosY -= relativeWidgetMargin.bottom; } break; default: break; } child->setPosition(cocos2d::Point(finalPosX, finalPosY)); layoutParameter->m_bPut = true; unlayoutChildCount--; } } } break; } default: break; } } const char* UILayout::getDescription() const { return "Layout"; } UIWidget* UILayout::createCloneInstance() { return UILayout::create(); } void UILayout::copyClonedWidgetChildren(UIWidget* model) { UIWidget::copyClonedWidgetChildren(model); doLayout(); } void UILayout::copySpecialProperties(UIWidget *widget) { UILayout* layout = dynamic_cast<UILayout*>(widget); if (layout) { setBackGroundImageScale9Enabled(layout->m_bBackGroundScale9Enabled); setBackGroundImage(layout->m_sBackGroundImageFileName.c_str(),layout->m_eBgImageTexType); setBackGroundImageCapInsets(layout->m_tBackGroundImageCapInsets); setBackGroundColorType(layout->m_eColorType); setBackGroundColor(layout->m_cColor); setBackGroundColor(layout->m_gStartColor, layout->m_gEndColor); setBackGroundColorOpacity(layout->m_cOpacity); setBackGroundColorVector(layout->m_tAlongVector); setLayoutType(layout->m_eLayoutType); setClippingEnabled(layout->m_bClippingEnabled); } } UIRectClippingNode::UIRectClippingNode(): m_pInnerStencil(nullptr), m_bEnabled(true), m_tClippingSize(cocos2d::Size(50.0f, 50.0f)), m_bClippingEnabled(false) { } UIRectClippingNode::~UIRectClippingNode() { } UIRectClippingNode* UIRectClippingNode::create() { UIRectClippingNode *pRet = new UIRectClippingNode(); if (pRet && pRet->init()) { pRet->autorelease(); } else { CC_SAFE_DELETE(pRet); } return pRet; } bool UIRectClippingNode::init() { m_pInnerStencil = cocos2d::DrawNode::create(); m_aRect[0] = cocos2d::Point(0, 0); m_aRect[1] = cocos2d::Point(m_tClippingSize.width, 0); m_aRect[2] = cocos2d::Point(m_tClippingSize.width, m_tClippingSize.height); m_aRect[3] = cocos2d::Point(0, m_tClippingSize.height); cocos2d::Color4F green(0, 1, 0, 1); m_pInnerStencil->drawPolygon(m_aRect, 4, green, 0, green); if (cocos2d::ClippingNode::init(m_pInnerStencil)) { return true; } return false; } void UIRectClippingNode::setClippingSize(const cocos2d::Size &size) { setContentSize(size); m_tClippingSize = size; m_aRect[0] = cocos2d::Point(0, 0); m_aRect[1] = cocos2d::Point(m_tClippingSize.width, 0); m_aRect[2] = cocos2d::Point(m_tClippingSize.width, m_tClippingSize.height); m_aRect[3] = cocos2d::Point(0, m_tClippingSize.height); cocos2d::Color4F green(0, 1, 0, 1); m_pInnerStencil->clear(); m_pInnerStencil->drawPolygon(m_aRect, 4, green, 0, green); } void UIRectClippingNode::setClippingEnabled(bool enabled) { m_bClippingEnabled = enabled; } void UIRectClippingNode::visit() { if (!m_bEnabled) { return; } if (m_bClippingEnabled) { cocos2d::ClippingNode::visit(); } else { cocos2d::Node::visit(); } } void UIRectClippingNode::setEnabled(bool enabled) { m_bEnabled = enabled; } bool UIRectClippingNode::isEnabled() const { return m_bEnabled; } }
[ "mcodegeeks@gmail.com" ]
mcodegeeks@gmail.com
071879c930ed2cb50660f2234f5e689c2fc41001
fcfe677b271dc406af633b79f80be3e78460dbe3
/Source/ToonTanks/PlayerControllers/PlayerControllerBase.cpp
581929d166523f2b1e7163176cf829af4cc84532
[]
no_license
Siggyfreed/Unreal-ToonTanks
7c899c7baaa31418681af4463e221068d0ca5564
d8f608e9375155b27d410216af14ea27759e840d
refs/heads/master
2022-11-17T05:54:18.799961
2020-07-01T03:22:20
2020-07-01T03:22:20
275,022,720
0
0
null
null
null
null
UTF-8
C++
false
false
417
cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "PlayerControllerBase.h" void APlayerControllerBase::SetPlayerEnabledState(bool SetPlayerEnabled) { if(SetPlayerEnabled) { GetPawn()->EnableInput(this); APlayerControllerBase::bShowMouseCursor = true; } else { GetPawn()->DisableInput(this); APlayerControllerBase::bShowMouseCursor = false; } }
[ "esigde13@gmail.com" ]
esigde13@gmail.com
98f86857bae4ac36ee5cfa56525fb48e4eaa28b7
5f941e7b0d4d43b49550eafcc2c24af0af8f754f
/softswitch/sems-1.6.0/apps/sbc/call_control/ts/ss_ts/contact_center_public/KFPC_DBAccessInfo.h
160c71b438d38a84560bb0c41b202ce2b153030a
[]
no_license
leegoex/yxcti
d072b04c10e0ccb4f646b8519d5702d259c0735e
051bbb28b060996cdf70ad2ef3e4d6a8653c888a
refs/heads/master
2021-01-19T04:48:03.737334
2017-04-28T01:54:18
2017-04-28T01:54:18
87,395,760
0
1
null
null
null
null
UTF-8
C++
false
false
998
h
#pragma once #include "KFPC_ContactCenterPublicDef.h" typedef enum DB_TYPE { DB_MySql, DB_MSSql, DB_Oracle }DB_TYPE; #define MySqlName "MySql" #define MsSqlName "MSSql" #define OracleName "Oracle" class KFPC_DBAccessInfo { private: char m_DataSource[KFPC_MAX_FILE_NAME]; char m_UserName[KFPC_USER_NAME_LEN]; char m_Passwd[KFPC_PASSWD_LEN]; char m_DataBaseType[KFPC_USER_NAME_LEN]; unsigned int m_PoolSize; bool m_SQLDebug; DB_TYPE m_DBType; public: KFPC_DBAccessInfo(void); ~KFPC_DBAccessInfo(void); bool GetSQLDebug() { return m_SQLDebug; } void SetSQLDebug(bool val) { m_SQLDebug = val; } int SetDataSource(const char *pVal); char* GetDataSource(); int SetDBUserName(const char *pVal); const char* GetDBUserName(); int SetPasswd(const char *pVal); char* GetPasswd(); int SetDataBaseType(const char *pVal); //char* GetDataBaseType(); DB_TYPE GetDBType() const { return m_DBType; } int SetPoolSize(unsigned int val); unsigned int GetPoolSize(); void Log(); };
[ "leegoex@gmail.com" ]
leegoex@gmail.com
973749b70316a520cf55e0d9922cd8a7c1ea3c7c
14e4799ac0c8637a3227fd147393d07f4a944f83
/project/iteration3/src/event_proximity.h
dac91e13091910d469c1f4f5bbab11dc375a4562
[]
no_license
abdi-sheikh/Robot-Game
6c1d478c0510161155ecb1294a8415cb7890e7a3
7ff1d675ba3343cf3174c1fefd43b9cdbdef70fc
refs/heads/master
2020-07-07T21:16:25.532173
2019-08-21T01:15:11
2019-08-21T01:15:11
203,479,750
0
0
null
null
null
null
UTF-8
C++
false
false
2,067
h
/** * @file event_proximity.h * * @copyright Abdi Sheikh, All rights reserved. */ #ifndef SRC_EVENT_PROXIMITY_H_ #define SRC_EVENT_PROXIMITY_H_ /******************************************************************************* * Includes ******************************************************************************/ #include <stdlib.h> #include "src/event_base_class.h" #include "src/position.h" /******************************************************************************* * Namespaces ******************************************************************************/ NAMESPACE_BEGIN(csci3081); /******************************************************************************* * Class Definitions ******************************************************************************/ /** * @brief A proximity event is made once any entity * comes within the robot/superobot proxmity sensor * it will communicate with the entitytype sensor * to indicate whether the entity is safe in its proxmity * since it attempt to avoid all entities besides the homebase */ class EventProximity : public EventBaseClass { public: EventProximity(void); /** * @brief If \c TRUE, then this instance represents an active proximity * event. If \c FALSE, then it represents a previous proximity event that has * been resolved. */ bool collided(void) const { return collided_; } void collided(bool c) { collided_ = c; } Position point_of_contact(void) const { return point_of_contact_; } void point_of_contact(Position p) { point_of_contact_ = p; } /** * @brief The angle, in degrees, as specified on the unit circle, that the * proximity occurred at. Needed to calculate the outgoing/bounceback angle. */ double angle_of_contact(void) const { return angle_of_contact_; } void angle_of_contact(double aoc) { angle_of_contact_ = aoc; } private: bool collided_; Position point_of_contact_; double angle_of_contact_; Position pos_; int entity_id_; }; NAMESPACE_END(csci3081); #endif /* SRC_EVENT_PROXIMITY_H_ */
[ "abdisheikh55@gmail.com" ]
abdisheikh55@gmail.com
a5f181ad7b3de9dde06b41d1e509682e97819578
fe9d41506a098aad065fe72a872a45aa8cc96790
/addmember.cpp
8b4b2afca07c293053b34de541e7856ca21c77e9
[]
no_license
afrederick89/IRobotz
86c3b87525cbd4db9ad6e4c17f24759b7869263e
2a1b89394a42a12ada1a638d3ea2f18376e28c19
refs/heads/main
2023-02-24T07:54:04.679387
2021-02-02T03:22:58
2021-02-02T03:22:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,598
cpp
#include "addmember.h" #include "invalidaddcustomername.h" #include "sqlmanager.h" #include "ui_addmember.h" #include "cassert" #include "duplicatecustomererrorwindow.h" //#define TEST_MODE addmember::addmember(QWidget *parent) : QDialog(parent), ui(new Ui::addmember) { this->setWindowFlag(Qt::FramelessWindowHint, true); ui->setupUi(this); prev = parent; } addmember::~addmember() { delete ui; delete prev; } void addmember::on_exit_clicked() { this->reject(); prev->show(); } void addmember::on_accept_clicked() { #ifdef TEST_MODE executeOnAcceptClickedAsTest(); #else executeOnAcceptClickedAsNormal(); #endif } void addmember::setATools(adminTools *value) { aTools = value; } void addmember::executeOnAcceptClickedAsNormal() { curCustomer customer; customer.cName = ui->nameLineEdit->text(); QVector<curCustomer> customers = aTools->getCurrentCustomers(); for(int i = 0; i < customers.size(); i++){ if(customer.cName == customers.at(i).cName){ DuplicateCustomerErrorWindow *error = new DuplicateCustomerErrorWindow(); this->hide(); error->exec(); this->reject(); prev->show(); return; } } // setting cInterest if(ui->notInterestedRadioButton->isChecked()){ customer.cInterest = "Not Interested"; } else if (ui->somewhatInterestedRadioButton->isChecked()){ customer.cInterest = "Somewhat Interested"; } else if (ui->veryInterestedRadioButton->isChecked()){ customer.cInterest = "Very Interested"; } else { } customer.cAddress = ui->addressLineEdit->text(); // setting cPriority if(ui->keyToHaveRadioButton->isChecked()){ customer.cPriority = "Key"; } else if (ui->niceToHaveRadioButton->isChecked()) { customer.cPriority = "Nice to Have"; } else { } if(customer.cName.length() == 0){ InvalidAddCustomerName *invalid = new InvalidAddCustomerName(); this->hide(); invalid->exec(); this->reject(); prev->show(); return; } aTools->addCustomerToVectorAndDataManager(customer); assert(aTools->addCustomerViaDb(customer)); this->reject(); prev->show(); } void addmember::executeOnAcceptClickedAsTest() { qDebug() << "Beginning test on add_Member_Clicked. If any mapping fails program will abort via assertions.\n"; curCustomer customer; customer.cName = ui->nameLineEdit->text(); QVector<curCustomer> customers = aTools->getCurrentCustomers(); for(int i = 0; i < customers.size(); i++){ if(customer.cName == customers.at(i).cName){ DuplicateCustomerErrorWindow *error = new DuplicateCustomerErrorWindow(); this->hide(); error->exec(); this->reject(); prev->show(); return; } } // setting cInterest bool interestChanged = false; QString originalInterest = customer.cInterest; if(ui->notInterestedRadioButton->isChecked()){ customer.cInterest = "Not Interested"; } else if (ui->somewhatInterestedRadioButton->isChecked()){ customer.cInterest = "Somewhat Interested"; } else if (ui->veryInterestedRadioButton->isChecked()){ customer.cInterest = "Very Interested"; } else { } QString originalAddress = customer.cAddress; bool addressChanged = false; customer.cAddress = ui->addressLineEdit->text(); if(customer.cAddress != originalAddress){ addressChanged = true; } // setting cPriority bool priorityChanged = false; QString originalPriority = customer.cPriority; if(ui->keyToHaveRadioButton->isChecked()){ customer.cPriority = "Key"; } else if (ui->niceToHaveRadioButton->isChecked()) { customer.cPriority = "Nice to Have"; } else { } if(customer.cName.length() == 0){ InvalidAddCustomerName *invalid = new InvalidAddCustomerName(); this->hide(); invalid->exec(); this->reject(); prev->show(); return; } aTools->addCustomerToVectorAndDataManager(customer); if(priorityChanged){ assert(originalPriority != customer.cPriority); } if(interestChanged){ assert(originalInterest != customer.cInterest); } if(addressChanged){ assert(originalAddress != customer.cAddress); } assert(aTools->addCustomerViaDb(customer)); qDebug() << "Asserations passed. Values mapped correctly.\n"; this->reject(); prev->show(); }
[ "noreply@github.com" ]
noreply@github.com
8adb7278672fe56d92a2e330aa50388d9c5249d0
1b251bd0caf701c1c6e54fdfba867c960c9dba06
/Lab3/TimeSheet.h
f7a7ec632878d3549a450b9aeff1fa133d8b4483
[ "MIT" ]
permissive
shin-eunsu/POCU_Cplusplus
23e7226593206db68aaa288d0e795916697f8a97
5ff8bb8ad594da1a74c610ccd49d00a591b41f99
refs/heads/master
2023-06-14T05:28:47.555577
2021-07-11T09:36:14
2021-07-11T09:36:14
361,624,891
2
0
null
null
null
null
UTF-8
C++
false
false
626
h
#pragma once #include <string> namespace lab3 { class TimeSheet { public: TimeSheet(const char* name, unsigned int maxEntries); TimeSheet(const TimeSheet& other); ~TimeSheet(); void AddTime(int timeInHours); int GetTimeEntry(unsigned int index) const; int GetTotalTime() const; float GetAverageTime() const; float GetStandardDeviation() const; const std::string& GetName() const; TimeSheet& operator=(const TimeSheet& rhs); private: char* mName; int* mTime; int mCnt; size_t mNameSize ; unsigned int mMaxEntries; std::string mStr; const int MINTIME = 1; const int MAXTIME = 10; }; }
[ "flost@naver.com" ]
flost@naver.com
c9f4c2ba5dd9337b2b80d0d81786ca932e06baed
e0f76552600d835631878eecbea3ba498074f875
/src/Entity/Entity.cpp
23d3f17a86d511c37ee6098bb750d4d1607b7809
[]
no_license
VladislavIzbash/Snake
c7862ea6a27378bda4a1368a9c87aa7ca7a3236f
c0f9fce30c6ccc9149799bbf60c960f48af59ba9
refs/heads/master
2022-04-06T10:17:44.613560
2020-01-28T19:13:31
2020-01-28T19:13:31
236,379,735
0
0
null
null
null
null
UTF-8
C++
false
false
1,229
cpp
#include "Entity.h" #include "Snake.h" #include "Fruit.h" #include "../Util.h" #include <stdexcept> Entity::Entity(World* world_in, unsigned int id): m_worldIn(world_in), m_id(id) {} void Entity::update() {} void Entity::toPacket(sf::Packet& packet) {} void Entity::fromPacket(sf::Packet& packet) {} EntityType Entity::getType() const { return EntityType::None; } unsigned int Entity::getID() const { return m_id; } void Entity::draw(sf::RenderTarget& target, sf::RenderStates states) const {} bool Entity::isCellNearby(util::GridPos cell_pos, unsigned int range) const { return false; } bool Entity::isDead() { return m_isDead; } void Entity::setDead() { m_isDead = true; } std::unique_ptr<Entity> createEntity(World* world_in, EntityType type, unsigned int id) { switch (type) { case EntityType::SnakeBodyPart: return std::make_unique<SnakeBodyPart>(world_in, id, util::GridPos()); case EntityType::Snake: return std::make_unique<Snake>(world_in, id, util::GridPos()); case EntityType::Fruit: return std::make_unique<Fruit>(world_in, id, util::GridPos()); default: throw std::runtime_error("Invalid entity type"); } }
[ "multi.vlad@bk.ru" ]
multi.vlad@bk.ru
e5fa3a17c5c58d08667c2ee05d228d7ce342d787
4f2283750a3bb8706f1dd176cf9823c5f67f40c8
/chaos/common/network/URLServiceFeeder.cpp
98adf073f7614736b5c31606fac64b03853c97b0
[ "Apache-2.0" ]
permissive
fast01/chaosframework
62d97cc05823d9ec71f494ac518f927cbf837476
28194bcca5f976fd5cf61448ca84ce545e94d822
refs/heads/master
2020-12-31T04:06:07.569547
2014-12-05T09:37:34
2014-12-05T09:37:34
29,051,305
2
0
null
2015-01-10T08:07:31
2015-01-10T08:07:31
null
UTF-8
C++
false
false
6,125
cpp
/* * URLServiceFeeder.cpp * !CHOAS * Created by Bisegni Claudio. * * Copyright 2012 INFN, National Institute of Nuclear Physics * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <chaos/common/global.h> #include <chaos/common/network/URLServiceFeeder.h> using namespace chaos::common::network; //size of every chunk of the list for sequential allocation #define URL_CHUNK_LEN (sizeof(URLServiceFeeder::URLService)*10) #define GET_LIST_SIZE (number_of_url * sizeof(URLServiceFeeder::URLService)) #define URLServiceFeeder_LAPP LAPP_ << "[URLServiceFeeder]-"<<getName()<<"-" #define URLServiceFeeder_LDBG LDBG_ << "[URLServiceFeeder]-"<<getName()<<"-" #define URLServiceFeeder_LERR LERR_ << "[URLServiceFeeder]-"<<getName()<<"-" URLServiceFeeder::URLServiceFeeder(std::string alias, URLServiceFeederHandler *_handler): NamedService(alias), list_size(0), current_service(NULL), service_list(NULL), handler(_handler), feed_mode(URLServiceFeeder::URLServiceFeedModeRoundRobin) { CHAOS_ASSERT(handler) } URLServiceFeeder::~URLServiceFeeder() { clear(); for(int idx = 0; idx < (list_size/sizeof(URLServiceFeeder::URLService)); idx++) { //allocate space for new url service delete (service_list[idx]); } delete(service_list); } /*! Remove all url and service */ void URLServiceFeeder::clear(bool dispose_service) { URLServiceFeeder_LAPP << "Remove all URL and service"; online_urls.clear(); for(int idx = 0; idx < (list_size/sizeof(URLServiceFeeder::URLService)); idx++) { //allocate space for new url service if(service_list[idx]->service && dispose_service) { handler->disposeService(service_list[idx]->service); } service_list[idx]->priority = 0; service_list[idx]->service = NULL; //add new available index to the available queue available_url.insert(idx); offline_urls.erase(idx); } } void URLServiceFeeder::removeFromOnlineQueue(uint32_t url_index) { URLService *tmp_element = NULL; OnlineQueueType work_queue; while (!online_urls.empty()) { tmp_element = online_urls.top(); online_urls.pop(); if(tmp_element->index == url_index) { continue; } work_queue.push(tmp_element); } online_urls.clear(); //merge the new queue into empyt old one boost::heap::heap_merge(online_urls, work_queue); } void URLServiceFeeder::grow() { if(available_url.size() == 0) { uint32_t old_element_num = list_size/sizeof(URLServiceFeeder::URLService); //enlarge memory list for new element service_list = (URLServiceFeeder::URLService**)realloc(service_list, (list_size += URL_CHUNK_LEN)); for(int idx = old_element_num; idx < (list_size/sizeof(URLServiceFeeder::URLService)); idx++) { //allocate space for new url service service_list[idx] = new URLServiceFeeder::URLService(); service_list[idx]->index = idx; service_list[idx]->priority = idx; service_list[idx]->service = NULL; //add new available index to the available queue available_url.insert(idx); } } } uint32_t URLServiceFeeder::addURL(const URL& new_url, uint32_t priority) { //lock the queue uint32_t service_index = 0; grow(); std::set<uint32_t>::iterator new_index = available_url.begin(); service_index = *new_index; online_urls.push(service_list[*new_index]); available_url.erase(new_index); service_list[service_index]->url = new_url; service_list[service_index]->service = handler->serviceForURL(new_url, service_index); service_list[service_index]->online = true; service_list[service_index]->priority = priority; return service_index; } URLServiceFeeder::URLService* URLServiceFeeder::getNext() { URLService *result = NULL; while (!online_urls.empty()) { if(online_urls.top()->online) { result = online_urls.top(); online_urls.pop(); break; } else { //push the index of this offline element into offline_urls.insert(online_urls.top()->index); } online_urls.pop(); } return result; } void* URLServiceFeeder::getService() { if(!current_service) { if (!(current_service = getNext())) return NULL; } else if (feed_mode == URLServiceFeeder::URLServiceFeedModeRoundRobin) { URLService *last_service = current_service; if((current_service = getNext())){ //we have a new service so we can push the oldone online_urls.push(last_service); } else { current_service = last_service; } } return current_service->service; } void URLServiceFeeder::setURLOffline(uint32_t idx) { if(idx > (list_size/sizeof(URLServiceFeeder::URLService))) { URLServiceFeeder_LERR << "Index out of range"; return; } if(current_service && current_service->index == idx) { current_service = NULL; } service_list[idx]->online = false; //set service offline offline_urls.insert(idx); } void URLServiceFeeder::setURLOnline(uint32_t idx) { if(idx > (list_size/sizeof(URLServiceFeeder::URLService))) { URLServiceFeeder_LERR << "Index out of range"; return; } //set service offline std::set<uint32_t>::iterator iter = offline_urls.find(idx); if(iter != offline_urls.end()) { offline_urls.erase(iter); } service_list[idx]->online = true; online_urls.push(service_list[idx]); } void URLServiceFeeder::removeURL(uint32_t idx, bool deallocate_service) { if(idx > (list_size/sizeof(URLServiceFeeder::URLService))) { URLServiceFeeder_LERR << "Index out of range"; return; } //delete service instance if(deallocate_service) handler->disposeService(service_list[idx]->service); removeFromOnlineQueue(idx); available_url.insert(idx); } void URLServiceFeeder::setFeedMode(URLServiceFeedMode new_feed_mode) { feed_mode = new_feed_mode; }
[ "Claudio.Bisegni@lnf.infn.it" ]
Claudio.Bisegni@lnf.infn.it
1f40e74bda3b81ac1845a3c6f82b8b0e4efc5e67
7421f112a0d304e7e7647d8b687bf9e1b4077bde
/SparseMatrix-main/example/step2/test.cpp
d9fae8abbcb97db2ed139ce95ade74c5c765a730
[ "MIT" ]
permissive
CauchYLIU3551/SparseMatrix
681c5e97a62c58fbe8e3c07ddb1f442643db5259
03f752b1ace13d7ce9d55b22956aaae492f03df6
refs/heads/master
2023-01-24T04:38:43.510852
2020-11-20T11:55:42
2020-11-20T11:55:42
303,687,204
0
0
null
null
null
null
UTF-8
C++
false
false
129
cpp
#include<iostream> #include<sum.h> using namespace std; int main() { int a,b; cin>>a>>b; cout<<sum(a,b)<<"\n"; return 0; }
[ "mc05565@umac.mo" ]
mc05565@umac.mo
ab2267219751eca17d2cc02e07bd2265c7826baa
a40aba91a8f308ca7c4c3f68707a2c262612af36
/Ejercicio2.cpp
9efbceccbd202efcca6e1ec5194e902cfc637518
[]
no_license
hernandez232/FP_Laboratorio_05_00075919
df0b6dd351a8dbe77367ec163f0edd055280190e
741ce8ed4bb020c91e860513605eebdf874544c8
refs/heads/master
2022-03-01T21:07:24.807387
2019-10-05T15:43:31
2019-10-05T15:43:31
213,024,684
0
0
null
null
null
null
UTF-8
C++
false
false
518
cpp
#include <iostream> #include <math.h> using namespace std; int main(){ int n, i, a=0, b=1, fibo; cout << "Ingrese un numero entero: "; cin >> n; cout << endl; if (n==0){ cout << "La respuesta es: "<<n; } else { cout << "La sucesion de Fibonacci que corresponde al numero ingresado es: "<<"1 "; for (i=1; i<n; i++){ fibo = a + b; a = b; b = fibo; cout << fibo<<" "; } } return 0; }
[ "54686582+hernandez232@users.noreply.github.com" ]
54686582+hernandez232@users.noreply.github.com
f95137a512f5c7c21af4609cd07be1059e4b63c3
b268c8d42a0bc3cfb57940caa79a90390eada012
/src/stb_image/stb_image.cpp
a1bb6736e8931ba65c76570581c2094a3fe127a0
[]
no_license
BFavier/GameEngine
78337e4e0662e1fbaa48133255fc63fa58d1529f
2690ff8eb29ca2ec80b364b7750598ba24832b44
refs/heads/main
2023-02-27T12:00:39.389450
2021-02-06T16:09:59
2021-02-06T16:09:59
336,574,245
0
0
null
null
null
null
UTF-8
C++
false
false
68
cpp
#define STB_IMAGE_IMPLEMENTATION #include <stb_image/stb_image.hpp>
[ "bade@webmails.top" ]
bade@webmails.top
09397b2ce67c0b341b5c3d536b834a46151c10f8
082e82d107553f2acd07abc38de2a7823286aef5
/TextureManager.h
79ffac495b69e912da63d778455aa62cfbc88e62
[]
no_license
fernandojim/ImpEngine3.0
b0a0d1f45d6583283118de13ff33f2063a985ac8
4cd0322adce9ac8cfdae77d747c6074262448d27
refs/heads/master
2020-04-02T22:14:01.182494
2019-02-22T13:25:48
2019-02-22T13:25:48
154,826,038
0
0
null
null
null
null
UTF-8
C++
false
false
1,117
h
/********************************************* File: TextureManager.h Purpose: Class for TextureManager class name: TextureManager -------------------------------------------- @Author: Yo @Version: 0 *********************************************/ #ifndef TEXTUREMANAGER_H_ #define TEXTUREMANAGER_H_ #include <iostream> #include <map> #include <memory> #include <cassert> #include "CTexture.h" namespace Engine { namespace Managers { class TextureManager { public: TextureManager(); TextureManager(const std::string& file); ~TextureManager(); GLuint loadTexture(const std::string& sTexturePath); //GLuint depthBufferTexture(GLuint &iFrameBuffer); std::shared_ptr<Engine::Graphics::CTexture> getTextureByID(GLuint id); bool deleteTexture(GLuint id); static TextureManager& getSingleton(); private: //Textures map CTexture class and opengl-handler std::map < GLuint, std::shared_ptr<Engine::Graphics::CTexture> > m_Textures; //Clear the list void clear(); }; } } #endif /* TEXTUREMANAGER_H_ */
[ "noreply@github.com" ]
noreply@github.com
e4b39841c7ac7f4e7f3dd7f3853aa6b6cc7af0df
c6da1a9d5879c1e548f1a57971c602bbe34dd470
/TextureTool/Src/Renderer/ShaderManager.cpp
ff1df6a95bd00af23e38160ae993556f5b02accb
[]
no_license
roosen5/TextureTool
af9c14478d5fa490184892ed7ac26f161e96972d
45d10f8bddb9ab1b4d67874c728728e4b2ad5285
refs/heads/master
2021-01-20T20:10:56.505168
2016-08-18T15:15:38
2016-08-18T15:15:38
65,611,519
0
0
null
null
null
null
UTF-8
C++
false
false
2,549
cpp
#include "TT_PCH.h" ShaderManager::ShaderManager() { } ShaderManager::~ShaderManager() { } ShaderType ShaderManager::RetrieveShaderType(const wchar_t* pShaderName) { if (wcsncmp(pShaderName + wcsnlen(pShaderName, MAX_PATH) - 2, L"VS", 2)==0) { return stVertexShader; } if (wcsncmp(pShaderName + wcsnlen(pShaderName, MAX_PATH) - 2, L"PS", 2)==0) { return stPixelShader; } return stUnknownShader; } HRESULT ShaderManager::CreatePixelShader(const wchar_t* pShaderName, ID3D11PixelShader*& pPixelShader, ID3DBlob*& pPixelShaderBlob) { std::wstring shaderName = pShaderName + std::wstring(L".cso"); HRESULT result = D3DReadFileToBlob(shaderName.c_str(), &pPixelShaderBlob); if (result == S_OK) { DXDevice::GetDevice()->CreatePixelShader(pPixelShaderBlob->GetBufferPointer(), pPixelShaderBlob->GetBufferSize(), nullptr, &pPixelShader); } return result; } HRESULT ShaderManager::CreateVertexShader(const wchar_t* pShaderName, ID3D11VertexShader*& pVertexShader, ID3DBlob*& pVertexShaderBlob) { std::wstring shaderName = pShaderName + std::wstring(L".cso"); HRESULT result = D3DReadFileToBlob(shaderName.c_str(), &pVertexShaderBlob); if (result == S_OK) { DXDevice::GetDevice()->CreateVertexShader(pVertexShaderBlob->GetBufferPointer(), pVertexShaderBlob->GetBufferSize(), nullptr, &pVertexShader); } return result; } Shader* ShaderManager::LoadShader(const wchar_t* pShaderName) { ShaderEntry& shaderEntry = mShaderList[pShaderName]; if(shaderEntry.ref==0) { Shader* shader = new Shader(); ID3D11DeviceChild* dxshaderPtr=nullptr; ID3D10Blob* dxshaderBlob=nullptr; HRESULT result = S_OK; switch (RetrieveShaderType(pShaderName)) { case stPixelShader: result = CreatePixelShader(pShaderName, (ID3D11PixelShader*&)dxshaderPtr, dxshaderBlob); break; case stVertexShader: result = CreateVertexShader(pShaderName, (ID3D11VertexShader*&)dxshaderPtr, (ID3D10Blob*)dxshaderBlob); break; default: result = E_UNEXPECTED; break; } if FAILED(result) { ShowError(result, "ShaderManager::LoadShader"); } shader->SetShaderName(pShaderName); shader->SetShader(dxshaderPtr); shader->SetBlob(dxshaderBlob); shaderEntry.shader = shader; } shaderEntry.ref++; return shaderEntry.shader; } void ShaderManager::UnloadShader(const wchar_t* pShaderName) { ShaderEntry& shaderEntry = mShaderList[pShaderName]; shaderEntry.ref--; if (shaderEntry.ref == 0) { printf("Releasing shader %ls", pShaderName); delete shaderEntry.shader; } } ShaderList ShaderManager::mShaderList;
[ "roosen5@hotmail.com" ]
roosen5@hotmail.com
41b99b91ab78ef155457d7f33d91259c3f786849
32a5b0a87cb699140e21d4d037f463f4a25ab13a
/Übung 6/src/aabb.h
2f6d38df0a94bcb4dc950a840c4f07a96ff86e96
[]
no_license
Bartzi/CG2
a2944e48b7dae906509a36b9a369b8e3d29c93c0
439546cbb6fda0807ab311f0455475e5b493240c
refs/heads/master
2016-09-10T14:00:06.212126
2013-02-11T18:20:08
2013-02-11T18:20:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
856
h
 #pragma once #include <glm/glm.hpp> class AxisAlignedBoundingBox { public: AxisAlignedBoundingBox(); virtual ~AxisAlignedBoundingBox(); const bool extend(const glm::vec3 & vertex); const bool extend(const AxisAlignedBoundingBox & aabb); const glm::vec3 & center() const; const glm::float_t radius() const; const glm::vec3 & llf() const; const glm::vec3 & urb() const; const bool inside(const glm::vec3 & vertex) const; const bool outside(const glm::vec3 & vertex) const; const void invalidate(); const bool valid() const; const AxisAlignedBoundingBox & operator*(const glm::mat4 & rhs) const; AxisAlignedBoundingBox & operator*=(const glm::mat4 & rhs); protected: glm::vec3 m_llf; glm::vec3 m_urb; glm::vec3 m_center; glm::float_t m_radius; bool m_invalidated; };
[ "christianbartz@gmail.com" ]
christianbartz@gmail.com
03c545a4f5f25a35c109010e315cb6a1895f9594
4e703f340d9e60ffbedb022c928ff18aaefff4da
/ChapterE06_Exception_caution_disadvantages/E_6_Exception_caution_disadvantages.cpp
ffcd2bdc713921f764045cf1190088e744f95021
[]
no_license
pikacsc/CppStudyingHJM
671c3fcb7c83028f940c87fd50d4b9c6f4f2552a
7ff57efbe67c88ebff1bbf9e19034fa1da68fd6c
refs/heads/master
2020-04-05T15:34:00.168306
2018-12-04T16:50:04
2018-12-04T16:50:04
156,973,915
0
0
null
null
null
null
UTF-8
C++
false
false
813
cpp
/* HongJeongMo C++ Chapter E_6 Exception disadvantages and caution if you can spot the exception then use 'if' rather then 'catch' cover try{} only in really unexpected exception can be occurred, and make it short */ #include <iostream> #include <memory> // smart pointer using namespace std; class A { public: ~A() { //throw "error"; //warning C4297, in destructor, can't throw exception } }; int main() { try { int *i = new int[10000000]; unique_ptr<int> up_i(i); // if you use unique_ptr(smart pointer) then it will delete *i automatically // do something with i throw "error"; delete[]i; // if you don't use unique_ptr and "error" occurred then //delete[]i; will be dead code, so memory leak will occurred A a; } catch (...) { cout << "Catch" << endl; } return 0; }
[ "ccc11203@gmail.com" ]
ccc11203@gmail.com
4341547b0dc359ba2498da9512b841fd690d38f8
7a18a745de39ee9c95c417c4a84e0a041a18209f
/Glass.cpp
e8bbafd72a76f90f3069c42c486cd25b7f66525c
[]
no_license
jaimeenahn/Baekjoon-online-judge
7c79ff7bf3862564bc531593171ae01f6c24b22d
8b9595cb23375f6b82d55cd3ad5f98e1644a460c
refs/heads/master
2020-04-15T21:06:25.181501
2019-04-11T01:11:52
2019-04-11T01:11:52
165,020,806
0
0
null
null
null
null
UTF-8
C++
false
false
1,158
cpp
//#include <iostream> //#include <vector> //#include <map> //#include <string> // //using namespace std; // //map<char, char> m; // //bool SameOrNot(string s1, string s2) //{ // if (s1.length() != s2.length()) // return false; // else // { // for (int i = 0; i < s1.length(); i++) // { // if (s1[i] == 'B') // s1[i] = '2'; // else if (s1[i] == 'A' || s1[i] == 'D' || s1[i] == 'O' || s1[i] == 'P' || s1[i] == 'Q' || s1[i] == 'R') // s1[i] = '1'; // else // s1[i] = '0'; // // if (s2[i] == 'B') // s2[i] = '2'; // else if (s2[i] == 'A' || s2[i] == 'D' || s2[i] == 'O' || s2[i] == 'P' || s2[i] == 'Q' || s2[i] == 'R') // s2[i] = '1'; // else // s2[i] = '0'; // if (s1[i] != s2[i]) // return false; // } // } // return true; //} //int main() //{ // int n; // scanf("%d", &n); // vector<pair<string, string>> v; // // for (int i = 0; i < n; i++) // { // string tmp1, tmp2; // cin >> tmp1 >> tmp2; // v.push_back(make_pair(tmp1, tmp2)); // } // for (int i = 0; i < n; i++) // { // if (SameOrNot(v[i].first, v[i].second)) // printf("#%d SAME\n", i + 1); // else // printf("#%d DIFF\n", i + 1); // } // return 0; //}
[ "jahn5@buffalo.edu" ]
jahn5@buffalo.edu
9d47926955417fcb050dd0a5cd835f3ce4bce417
7299aa64739545b0251793ba283548abfb16b24b
/delete_x_in_list/delete_x_in_list/源.cpp
48114abe8a90cfa711a3984914801e154fce82ef
[]
no_license
jhyscode/Data-structure
60e6d935d896262f0f22032eacf4a62dd9a7f400
07cc8892fdbd7b3b3a3c396cb0533d5b0a616cdd
refs/heads/master
2020-03-15T11:10:17.270938
2018-05-04T09:01:58
2018-05-04T09:01:58
null
0
0
null
null
null
null
GB18030
C++
false
false
535
cpp
#include<iostream> using namespace std; typedef int ElemType; struct sqList { int length; int *data; }; void delx(sqList &L, ElemType x) { int k = 0; //记录值不等于x的个数 for (int i = 0; i < L.length; i++) if (L.data[i] != x) { L.data[k] = L.data[i]; k++; } for (int j = 0; j < k; j++) { cout << L.data[j] << " "; } cout << endl; cout << "the repeated number is " << L.length-k; } int main() { sqList L; int x = 2; L.length = 10; int a[10] = { 1,2,2,2,3,5,8,6,9,4 }; L.data = a; delx(L, x); }
[ "1770613507@qq.com" ]
1770613507@qq.com
ac303e28de68dce8be60b3f83a9bc840f4c9b5e0
fe6d55233610a0c78cfd63cc25564400982b0a4e
/src/osd/opensubdiv/bfr/tessellation.cpp
266a9523fb04891de7999b187f95eaa0bf443b61
[ "LicenseRef-scancode-free-unknown", "MIT", "MIT-0", "Zlib", "BSD-3-Clause", "ISC", "BSL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
syoyo/tinyusdz
6cc9c18ec4df61a514571cda8a5f8c3ee4ef279a
cf6e7f3c6428135109c1d66a261e9291b06f4970
refs/heads/dev
2023-08-19T06:06:10.594203
2023-08-18T12:34:09
2023-08-18T12:34:09
255,649,890
345
23
MIT
2023-07-14T09:20:59
2020-04-14T15:36:33
C++
UTF-8
C++
false
false
85,370
cpp
// // Copyright 2021 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trademarks. This License does not grant permission to use the trade // names, trademarks, service marks, or product names of the Licensor // and its affiliates, except as required to comply with Section 4(c) of // the License and to reproduce the content of the NOTICE file. // // You may obtain a copy of the Apache License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the Apache License with the above modification is // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the Apache License for the specific // language governing permissions and limitations under the Apache License. // #include "../bfr/tessellation.h" #include <cstring> #include <cstdio> #include <cassert> #include <limits> #include <algorithm> namespace OpenSubdiv { namespace OPENSUBDIV_VERSION { namespace Bfr { // // Tessellation patterns are composed of concentric rings of points (or // "coords" for coordinates) and facets -- beginning with the boundary // and moving inward. Each ring of can be further divided into subsets // corresponding elements associated with each edge. // // While the nature of these rings is similar for the different types of // parameterizations, each is different enough to have warranted its own // implementation at a high level. Lower level utilities for assembling // the rings from strips of coords and facets are common to all. // // WIP - consider moving some of these implementation details to separate // internal header and source files // namespace { // // Simple classes to provide array-like interfaces to the primitive // data buffers passed by clients. Both parametric coordinate pairs // and the integer tuples (size 3 or 4) representing a single facet // of a tessellation are represented here. // // These array interfaces are "minimal" in the sense that they provide // only what is needed here -- rather than trying to support a wider // range of use where full generality is needed (e.g. the arithmetic // operators are limited to those used here for advancing through and // assigning elements of the array, so the full range required for // arbitrary address arithmetic are not included). // // Both arrays support a user-specified stride within which the tuple // for the coord or facet is assigned. // // Floating point pair and its array for points of a tessellation: template <typename REAL> class Coord2 { public: Coord2(REAL * data) : _uv(data) { } Coord2() : _uv(0) { } ~Coord2() { } void Set(REAL u, REAL v) { _uv[0] = u, _uv[1] = v; } REAL const & operator[](int index) const { return _uv[index]; } REAL & operator[](int index) { return _uv[index]; } private: REAL * _uv; }; template <typename REAL> class Coord2Array { public: Coord2Array(REAL * data, int stride) : _data(data), _stride(stride) { } Coord2Array() : _data(0), _stride(2) { } ~Coord2Array() { } Coord2Array operator+(int offset) { return Coord2Array(_data + offset*_stride, _stride); } Coord2<REAL> operator[](int index) { return Coord2<REAL>(_data + index*_stride); } private: REAL * _data; int _stride; }; // Integer 3- or 4-tuple and its array for facets of a tessellation: class Facet { public: Facet(int * indices, int n) : _T(indices), _size(n) { } Facet() : _T(0), _size(4) { } ~Facet() { } void Set(int a, int b, int c) { // Assign size-1 to ensure last index of 4-tuple is set _T[_size - 1] = -1; _T[0] = a, _T[1] = b, _T[2] = c; } void Set(int a, int b, int c, int d) { _T[0] = a, _T[1] = b, _T[2] = c, _T[3] = d; } int const & operator[](int index) const { return _T[index]; } int & operator[](int index) { return _T[index]; } private: int * _T; int _size; }; class FacetArray { public: FacetArray(int * data, int size, int stride) : _data(data), _size(size), _stride(stride) { } ~FacetArray() { } FacetArray operator+(int offset) { return FacetArray(_data + offset*_stride, _size, _stride); } Facet operator[](int index) { return Facet(_data + index*_stride, _size); } private: FacetArray() : _data(0), _size(4), _stride(4) { } int * _data; int _size; int _stride; }; // // Functions for assembling simple, common sets of coordinate pairs: // template <typename REAL> inline int appendUIsoLine(Coord2Array<REAL> P, int n, REAL u, REAL v, REAL dv) { for (int i = 0; i < n; ++i, v += dv) { P[i].Set(u,v); } return n; } template <typename REAL> inline int appendVIsoLine(Coord2Array<REAL> P, int n, REAL u, REAL v, REAL du) { for (int i = 0; i < n; ++i, u += du) { P[i].Set(u,v); } return n; } template <typename REAL> inline int appendUVLine(Coord2Array<REAL> P, int n, REAL u, REAL v, REAL du, REAL dv) { for (int i = 0; i < n; ++i, u += du, v += dv) { P[i].Set(u,v); } return n; } // // Functions for assembling simple, common sets of facets: // inline int appendTri(FacetArray facets, int t0, int t1, int t2) { facets[0].Set(t0, t1, t2); return 1; } inline int appendQuad(FacetArray facets, int q0, int q1, int q2, int q3, int triangulationSign) { if (triangulationSign == 0) { // no triangulation facets[0].Set(q0, q1, q2, q3); return 1; } else if (triangulationSign > 0) { // triangulate along diagonal in direction of leading edge facets[0].Set(q0, q1, q2); facets[1].Set(q2, q3, q0); return 2; } else { // triangulate along diagonal opposing the leading edge facets[0].Set(q2, q3, q1); facets[1].Set(q0, q1, q3); return 2; } } inline int appendTriFan(FacetArray facets, int size, int startIndex) { for (int i = 1; i <= size; ++i) { facets[i-1].Set(startIndex + (i - 1), startIndex + ((i < size) ? i : 0), startIndex + size); } return size; } // // Useful struct for storing bounding indices and other topology of // a strip of facets so points can be connected in various ways: // // A strip of facets is defined between an outer and inner ring of // points -- denoted as follows, where the "i" and "o" prefixes are // used to designate points on the inner and outer rings: // // oPrev --- iFirst ... iFirst+/-i ... iLast --- oLast+1 // | | // oFirst --- oFirst+1 ... oFirst+j ... oFirst+N-1 --- oLast // // Since these points form part of a ring, they will wrap around to // the beginning of the ring for the last edge and so the sequence // is not always sequential. Transitions to the "first" and "last" // of both the outer and inner rings are potentially discontinuous, // which is why they are provided as separate members. // // This topological structure is similar but slightly different for // quad-based versus triangular parameterizations. For quad-based // parameterizations the parametric range of the inner and outer // sequences are the same, but for triangular, the extent of the // inner ring is one edge less (and the triangular domain may be // offset a half edge length so that uniformly spaced points on // both will alternate). // struct FacetStrip { public: FacetStrip() { std::memset((void*) this, 0, sizeof(*this)); } int connectUniformQuads( FacetArray facets) const; int connectUniformTris( FacetArray facets) const; int connectNonUniformFacets(FacetArray facets) const; public: // Members defining how the strip should be used: unsigned int quadTopology : 1; unsigned int quadTriangulate : 1; unsigned int innerReversed : 1; unsigned int excludeFirstFace : 1; unsigned int splitFirstFace : 1; unsigned int splitLastFace : 1; unsigned int includeLastFace : 1; // Members defining the dimensions of the strip -- the number // of "inner edges" potentially excludes the two edges that // connect the inner ring to the outer: int outerEdges; int innerEdges; // Members containing indices for points noted above. Since // a strip may wrap around the concentric rings of points, // pairs of points that may appear to have successive indices // will not -- which is why these are assigned externally: int outerFirst, outerLast, outerPrev; int innerFirst, innerLast; }; int FacetStrip::connectUniformQuads(FacetArray facets) const { assert(quadTopology); assert(innerEdges == (outerEdges - 2)); // // For connecting quads, the pattern is simplified as follows: // // oPrev ---- iFirst ... iLast ---- oLast+1 // | 3 2 | 3 2 | 3 2 | // | 0 1 | 0 1 | 0 1 | // oFirst -- oFirst+1 ... oFirst+N-1 -- oLast // // with the first and last quads not sharing any inner edges // (between inner-first and inner-last) and potentially being // split to include the triangle on the outer edge. // // It is typical for the first quad to always be included and // for the last to be excluded -- the last quad usually being // included by the next strip in the ring (unless split). // int nFacets = 0; // Split or assign the first quad (precedes inner edges): int out0 = outerFirst; int in0 = innerFirst; if (splitFirstFace) { nFacets += appendTri(facets + nFacets, out0, out0 + 1, in0); } else if (!excludeFirstFace) { nFacets += appendQuad(facets + nFacets, out0, out0 + 1, in0, outerPrev, quadTriangulate); } // Assign quads sharing the inner edges (last is a special case): int outI = outerFirst + 1; int inI = innerFirst; if (innerEdges) { int triSign = quadTriangulate; int inDelta = innerReversed ? -1 : 1; for (int i = 1; i <= innerEdges; ++i, ++outI, inI += inDelta) { if (i > (innerEdges / 2)) triSign = - (int)quadTriangulate; int outJ = outI + 1; int inJ = (i < innerEdges) ? (inI + inDelta) : innerLast; nFacets += appendQuad(facets + nFacets, outI, outJ, inJ, inI, triSign); } } // Split or assign the last quad (follows inner edges): int outN = outerLast; int inN = innerLast; if (splitLastFace) { nFacets += appendTri(facets + nFacets, outI, outN, inN); } else if (includeLastFace) { nFacets += appendQuad(facets + nFacets, outI, outN, outN+1, inN, - (int)quadTriangulate); } return nFacets; } int FacetStrip::connectUniformTris(FacetArray facets) const { assert(!quadTopology); assert(!excludeFirstFace); assert(!includeLastFace); assert(!innerReversed); // // Assign the set of tris for the "sawtooth" strip with N outer // edges and N-3 inner edges of the inner ring: // // 1 3 2M-1 // oPrev --- iFirst -- i1 ... ii --- iLast -- oLast+1 // / 2\1 0/ \ / \ \1 0/ 2\ / \. // /0 1\2 / \ / \ \2 /0 1\ / \. // oFirst --- o1 ---- o2 .. oi ... oM --- oN-1 --- oLast // 0 2 4 2M // // The first and last pair of tris may optionally be split by // connecting the "first" or "last" points between the two rows // (i.e. [oFirst, oFirst+1, iFirst]) which bisects the two // triangles normally included. // // Following the first pair (or single tri if split), a single // leading triangle ([o1, o2, iFirst] above) is then assigned, // followed by pairs of adjacent tris below each inner edge: // the first of the pair based on the inner edge, the second on // the outer edge. // int nFacets = 0; // Split or assign the first pair of tris (precedes inner edges): int out0 = outerFirst; int in0 = innerFirst; if (splitFirstFace) { nFacets += appendTri(facets + nFacets, out0, out0+1, in0); } else { nFacets += appendTri(facets + nFacets, out0, out0+1,outerPrev); nFacets += appendTri(facets + nFacets, in0, outerPrev, out0+1); } // Assign the next tri -- preceding the pairs for the inner edges: nFacets += appendTri(facets + nFacets, out0 + 1, out0 + 2, in0); // Assign pair of tris below each inner edge (last is special): int outI = outerFirst + 2; int inI = innerFirst; if (innerEdges) { for (int i = 1; i <= innerEdges; ++i, ++inI, ++outI) { int outJ = outI + 1; int inJ = (i < innerEdges) ? (inI + 1) : innerLast; nFacets += appendTri(facets + nFacets, inJ, inI, outI); nFacets += appendTri(facets + nFacets, outI, outJ, inJ); } } // Split the last pair of tris (follows inner edges): int outN = outerLast; int inN = innerLast; if (splitLastFace) { nFacets += appendTri(facets + nFacets, outI, outN, inN); } return nFacets; } int FacetStrip::connectNonUniformFacets(FacetArray facets) const { // // General case: // // oPrev -- iFirst . ... i0+/-i ... . iLast --* // | / . . \ | // | / | | \ | // oFirst -------- o0 ... o0+i ... oN-1 ------ oLast // // The sequence of edges -- both inner and outer -- is parameterized // over the integer range [0 .. M*N] where M and N are the resolution // (number of edges) of the inner and outer rings respectively. // // Note that the current implementation expects the faces at the // ends to be "split", i.e. a diagonal edge created between the // first/last points of the inner and outer rings at both ends. // It is possible that this will later be relaxed (allowing an // unsplit quad at the corner to be generated), as is currently // the case with uniform strips. In the meantime, the caller is // expected to explicitly request split corners to make it clear // where they need to adapt later. // assert(splitFirstFace && splitLastFace); int M = innerEdges + (quadTopology ? 2 : 3); int N = outerEdges; int dtOuter = M; int dtInner = N; int dtMin = std::min(dtInner, dtOuter); int dtMax = std::max(dtInner, dtOuter); // Use larger slope when M ~= N to accomodate tri insertion: int dtSlopeMax = ((dtMax / 2) < dtMin) ? (dtMin - 1) : (dtMax / 2); int tOuterLast = dtOuter * N; int tOuterMiddle = tOuterLast / 2; int tInnerOffset = 0; int tInnerLast = dtInner * (M - 1); // If tris, adjust parametric range for the inner edges: if (!quadTopology) { tInnerOffset = dtInner / 2; tInnerLast += tInnerOffset - dtInner; } int dInner = innerReversed ? -1 : 1; // // Two points are successively identified on each of the inner and // outer sequence of edges, from which facets will be generated: // // inner0 inner1 // * ----- * . . . // / // / // * ----------- * . . . // outer0 outer1 // // Identify the parameterization and coordinate indices for the // points starting the sequence: // int tOuter0 = 0; int cOuter0 = outerFirst; int tOuter1 = dtOuter; int cOuter1 = (N == 1) ? outerLast : (outerFirst + 1); int tInner0 = tInnerOffset + dtInner; int cInner0 = innerFirst; int tInner1 = tInner0 + (innerEdges ? dtInner : 0); int cInner1 = (innerEdges == 1) ? innerLast : (innerFirst + dInner); // // Walk forward through the strip, identifying each successive quad // and choosing the most "vertical" edge to use to triangulate it: // bool keepQuads = quadTopology && !quadTriangulate; int nFacetsExpected = 0; if (keepQuads) { nFacetsExpected = std::max(innerEdges, outerEdges); // Include a symmetric center triangle if any side is odd: if ((nFacetsExpected & 1) == 0) { nFacetsExpected += (innerEdges & 1) || (outerEdges & 1); } } else { nFacetsExpected = innerEdges + outerEdges; } // These help maintain symmetry where possible: int nFacetsLeading = nFacetsExpected / 2; int nFacetsMiddle = nFacetsExpected & 1; int middleFacet = nFacetsMiddle ? nFacetsLeading : -1; bool middleQuad = keepQuads && (outerEdges & 1) && (innerEdges & 1); // // Assign all expected facets sequentially -- advancing references // to the inner and outer edges according to what is used for each: // for (int facetIndex = 0; facetIndex < nFacetsExpected; ++facetIndex) { bool generateTriOuter = false; bool generateTriInner = false; bool generateQuad = false; // // Detect simple cases first: the symmetric center face or // triangles in the absence of an inner or outer edge: // if (facetIndex == middleFacet) { if (middleQuad) { generateQuad = true; } else if (outerEdges & 1) { generateTriOuter = true; } else { generateTriInner = true; } } else if (tInner1 == tInner0) { generateTriOuter = true; } else if (tOuter1 == tOuter0) { generateTriInner = true; } else { // // For the general case, assign a quad if specified and // possible. Otherwise continue with a triangle. Both // situations avoid poor aspect and preserve symmetry: // if (keepQuads) { // If face is after the midpoint, use the same kind of // face as its mirrored counterpart. Otherwise, reject a // quad trying to cross the midpoint. Finally, test the // slope of the "vertical" edge of the potential quad: if (facetIndex >= nFacetsLeading) { int mirroredFacetIndex = nFacetsLeading - 1 - (facetIndex - nFacetsLeading - nFacetsMiddle); generateQuad = (facets[mirroredFacetIndex][3] >= 0); } else if ((tInner1 > tOuterMiddle) || (tOuter1 > tOuterMiddle)) { generateQuad = false; } else { int dtSlope1 = std::abs(tOuter1 - tInner1); generateQuad = (dtSlope1 <= dtSlopeMax); } } if (!generateQuad) { // Can't detect symmetric triangles as inner or outer as // easily as quads, but the test is relatively simple -- // choose the diagonal spanning the shortest interval // (when equal, choose relative to midpoint for symmetry): int dtDiagToOuter1 = tOuter1 - tInner0; int dtDiagToInner1 = tInner1 - tOuter0; bool useOuterEdge = (dtDiagToOuter1 == dtDiagToInner1) ? (tOuter1 > tOuterMiddle) : (dtDiagToOuter1 < dtDiagToInner1); if (useOuterEdge) { generateTriOuter = true; } else { generateTriInner = true; } } } // Assign the face as determined above: if (generateTriOuter) { facets[facetIndex].Set(cOuter0, cOuter1, cInner0); } else if (generateTriInner) { facets[facetIndex].Set(cInner1, cInner0, cOuter0); } else { facets[facetIndex].Set(cOuter0, cOuter1, cInner1, cInner0); } // Advance to the next point of the next outer edge: bool advanceOuter = generateTriOuter || generateQuad; if (advanceOuter) { tOuter0 = tOuter1; cOuter0 = cOuter1; tOuter1 += dtOuter; cOuter1 = cOuter1 + 1; if (tOuter1 >= tOuterLast) { tOuter1 = tOuterLast; cOuter1 = outerLast; } } // Advance to the next point of the next inner edge: bool advanceInner = generateTriInner || generateQuad; if (advanceInner) { tInner0 = tInner1; cInner0 = cInner1; tInner1 += dtInner; cInner1 = cInner1 + dInner; if (tInner1 >= tInnerLast) { tInner1 = tInnerLast; cInner1 = innerLast; } } } return nFacetsExpected; } } // // Utility functions to help assembly of tessellation patterns -- grouped // into local structs/namespaces for each of the supported parameterization // types: quad, triangle (tri) or quadrangulated sub-faces (qsub): // // Given the similar structure to these -- the construction of patterns // using concentric rings of Coords, rings of Facets between successive // concentric rings, etc. -- there are some opportunities for refactoring // some of these. (But there are typically subtle differences between // each that complicate doing so.) // class quad { public: // Public methods for counting coords and facets: static int CountUniformFacets(int edgeRes, bool triangulate); static int CountSegmentedFacets(int const uvRes[], bool triangulate); static int CountNonUniformFacets(int const outerRes[], int const uvRes[], bool triangulate); static int CountInteriorCoords(int edgeRes); static int CountInteriorCoords(int const uvRes[]); // Public methods for identifying and assigning coordinate pairs: template <typename REAL> static int GetEdgeCoords(int edge, int edgeRes, Coord2Array<REAL> coords); template <typename REAL> static int GetBoundaryCoords(int const edgeRates[], Coord2Array<REAL> coords); template <typename REAL> static int GetInteriorCoords(int const uvRes[2], Coord2Array<REAL> coords); // Public methods for identifying and assigning facets: static int GetUniformFacets(int edgeRes, bool triangulate, FacetArray facets); static int GetSegmentedFacets(int const uvRes[], bool triangulate, FacetArray facets); static int GetNonUniformFacets(int const outerRes[], int const innerRes[], int nBoundaryEdges, bool triangulate, FacetArray facets); private: // Private methods used by those above: static int countUniformCoords(int edgeRes); static int countNonUniformEdgeFacets(int outerRes, int innerRes); template <typename REAL> static int getCenterCoord(Coord2Array<REAL> coords); template <typename REAL> static int getInteriorRingCoords(int uRes, int vRes, REAL uStart, REAL vStart, REAL uDelta, REAL vDelta, Coord2Array<REAL> coords); static int getInteriorRingFacets(int uRes, int vRes, int indexOfFirstCoord, bool triangulate, FacetArray facets); static int getBoundaryRingFacets(int const outerRes[], int uRes, int vRes, int nBoundaryEdges, bool triangulate, FacetArray facets); static int getSingleStripFacets(int uRes, int vRes, int indexOfFirstCoord, bool triangulate, FacetArray facets); }; class tri { public: // Public methods for counting coords and facets: static int CountUniformFacets(int edgeRes); static int CountNonUniformFacets(int const outerRes[], int innerRes); static int CountInteriorCoords(int edgeRes); // Public methods for identifying and assigning coordinate pairs: template <typename REAL> static int GetEdgeCoords(int edge, int edgeRes, Coord2Array<REAL> coords); template <typename REAL> static int GetBoundaryCoords(int const edgeRates[], Coord2Array<REAL> coords); template <typename REAL> static int GetInteriorCoords(int edgeRes, Coord2Array<REAL> coords); // Public methods for identifying and assigning facets: static int GetUniformFacets(int edgeRes, FacetArray facets); static int GetNonUniformFacets(int const outerRes[], int innerRes, int nBoundaryEdges, FacetArray facets); private: // Private methods used by those above: static int countUniformCoords(int edgeRes); template <typename REAL> static int getCenterCoord(Coord2Array<REAL> coords); template <typename REAL> static int getInteriorRingCoords(int edgeRes, REAL uStart, REAL vStart, REAL tDelta, Coord2Array<REAL> coords); static int getInteriorRingFacets(int edgeRes, int indexOfFirstCoord, FacetArray facets); static int getBoundaryRingFacets(int const outerRes[], int innerRes, int nBoundaryEdges, FacetArray facets); }; class qsub { public: // Public methods for counting coords and facets: static int CountUniformFacets(int N, int edgeRes, bool triangulate); static int CountNonUniformFacets(int N, int const outerRes[], int innerRes, bool triangulate); static int CountInteriorCoords(int N, int edgeRes); // Public methods for identifying and assigning coordinate pairs (note // these require a Parameterization while others only need face size N) template <typename REAL> static int GetEdgeCoords(Parameterization P, int edge, int edgeRes, Coord2Array<REAL> coords); template <typename REAL> static int GetBoundaryCoords(Parameterization P, int const edgeRates[], Coord2Array<REAL> coords); template <typename REAL> static int GetInteriorCoords(Parameterization P, int edgeRes, Coord2Array<REAL> coords); // Public methods for identifying and assigning facets: static int GetUniformFacets(int N, int edgeRes, bool triangulate, FacetArray facets); static int GetNonUniformFacets(int N, int const outerRes[], int innerRes, int nBoundaryEdges, bool triangulate, FacetArray facets); private: // Private methods used by those above: static int countUniformCoords(int N, int edgeRes); template <typename REAL> static int getCenterCoord(Coord2Array<REAL> coords); template <typename REAL> static int getCenterRingCoords(Parameterization P, REAL tStart, Coord2Array<REAL> coords); template <typename REAL> static int getRingEdgeCoords(Parameterization P, int edge, int edgeRes, bool incFirst, bool incLast, REAL tStart, REAL tDelta, Coord2Array<REAL> coords); template <typename REAL> static int getInteriorRingCoords(Parameterization P, int edgeRes, REAL tStart, REAL tDelta, Coord2Array<REAL> coords); static int getCenterFacets(int N, int indexOfFirstCoord, FacetArray facets); static int getInteriorRingFacets(int N, int edgeRes, int indexOfFirstCoord, bool triangulate, FacetArray facets); static int getBoundaryRingFacets(int N, int const outerRes[], int innerRes, int nBoundaryEdges, bool triangulate, FacetArray facets); }; // // Implementations for quad functions: // inline int quad::CountUniformFacets(int edgeRes, bool triangulate) { return (edgeRes * edgeRes) << (int) triangulate; } inline int quad::CountSegmentedFacets(int const uvRes[], bool triangulate) { // WIP - may extend later to handle different opposing outer rates assert((uvRes[0] == 1) || (uvRes[1] == 1)); return (uvRes[0] * uvRes[1]) << (int) triangulate; } int quad::countNonUniformEdgeFacets(int outerRes, int innerRes) { int nFacets = std::max(outerRes, (innerRes - 2)); // If the lesser is odd, a triangle will be added in the middle: if ((nFacets & 1) == 0) { nFacets += (outerRes & 1) || (innerRes & 1); } return nFacets; } int quad::CountNonUniformFacets(int const outerRes[], int const innerRes[], bool triangulate) { int uRes = innerRes[0]; int vRes = innerRes[1]; assert((uRes > 1) && (vRes > 1)); // Count interior facets based on edges of inner ring: int innerUEdges = uRes - 2; int innerVEdges = vRes - 2; int nInterior = innerUEdges * innerVEdges; // If triangulating, things are much simpler: if (triangulate) { int nFacets = nInterior * 2; nFacets += innerUEdges + outerRes[0]; nFacets += innerVEdges + outerRes[1]; nFacets += innerUEdges + outerRes[2]; nFacets += innerVEdges + outerRes[3]; return nFacets; } // // Accumulate boundary facets for each edge based on uniformity... // // A uniform edge contributes a quad for each inner edge, plus one // facet for the leading corner (quad if uniform, tri if not) and a // tri for the trailing corner if it is not uniform. A non-uniform // edge contributes quads and tris based on the larger of the inner // and outer resolutions. // bool uniformEdges[4]; uniformEdges[0] = (outerRes[0] == uRes); uniformEdges[1] = (outerRes[1] == vRes); uniformEdges[2] = (outerRes[2] == uRes); uniformEdges[3] = (outerRes[3] == vRes); bool uniformCorners[4]; uniformCorners[0] = (uniformEdges[0] && uniformEdges[3]); uniformCorners[1] = (uniformEdges[1] && uniformEdges[0]); uniformCorners[2] = (uniformEdges[2] && uniformEdges[1]); uniformCorners[3] = (uniformEdges[3] && uniformEdges[2]); int nBoundary = 0; nBoundary += uniformEdges[0] ? (innerUEdges + 1 + !uniformCorners[1]) : countNonUniformEdgeFacets(outerRes[0], uRes); nBoundary += uniformEdges[1] ? (innerVEdges + 1 + !uniformCorners[2]) : countNonUniformEdgeFacets(outerRes[1], vRes); nBoundary += uniformEdges[2] ? (innerUEdges + 1 + !uniformCorners[3]) : countNonUniformEdgeFacets(outerRes[2], uRes); nBoundary += uniformEdges[3] ? (innerVEdges + 1 + !uniformCorners[0]) : countNonUniformEdgeFacets(outerRes[3], vRes); return nInterior + nBoundary; } inline int quad::countUniformCoords(int edgeRes) { return (edgeRes + 1) * (edgeRes + 1); } inline int quad::CountInteriorCoords(int edgeRes) { return (edgeRes - 1) * (edgeRes - 1); } inline int quad::CountInteriorCoords(int const uvRes[]) { return (uvRes[0] - 1) * (uvRes[1] - 1); } template <typename REAL> inline int quad::getCenterCoord(Coord2Array<REAL> coords) { coords[0].Set(0.5f, 0.5f); return 1; } template <typename REAL> int quad::GetEdgeCoords(int edge, int edgeRes, Coord2Array<REAL> coords) { REAL dt = 1.0f / (REAL)edgeRes; REAL t0 = dt; REAL t1 = 1.0f - dt; int n = edgeRes - 1; switch (edge) { case 0: return appendVIsoLine<REAL>(coords, n, t0, 0.0f, dt); case 1: return appendUIsoLine<REAL>(coords, n, 1.0f, t0, dt); case 2: return appendVIsoLine<REAL>(coords, n, t1, 1.0f, -dt); case 3: return appendUIsoLine<REAL>(coords, n, 0.0f, t1, -dt); } return 0; } template <typename REAL> int quad::GetBoundaryCoords(int const edgeRates[], Coord2Array<REAL> coords) { int nCoords = 0; nCoords += appendVIsoLine<REAL>(coords + nCoords, edgeRates[0], 0.0f, 0.0f, 1.0f / (REAL) edgeRates[0]); nCoords += appendUIsoLine<REAL>(coords + nCoords, edgeRates[1], 1.0f, 0.0f, 1.0f / (REAL) edgeRates[1]); nCoords += appendVIsoLine<REAL>(coords + nCoords, edgeRates[2], 1.0f, 1.0f, -1.0f / (REAL) edgeRates[2]); nCoords += appendUIsoLine<REAL>(coords + nCoords, edgeRates[3], 0.0f, 1.0f, -1.0f / (REAL) edgeRates[3]); return nCoords; } template <typename REAL> int quad::getInteriorRingCoords(int uRes, int vRes, REAL u0, REAL v0, REAL du, REAL dv, Coord2Array<REAL> coords) { int nCoords = 0; if ((uRes > 0) && (vRes > 0)) { REAL u1 = 1.0f - u0; REAL v1 = 1.0f - v0; nCoords += appendVIsoLine(coords + nCoords, uRes, u0, v0, du); nCoords += appendUIsoLine(coords + nCoords, vRes, u1, v0, dv); nCoords += appendVIsoLine(coords + nCoords, uRes, u1, v1,-du); nCoords += appendUIsoLine(coords + nCoords, vRes, u0, v1,-dv); } else if (uRes > 0) { nCoords += appendVIsoLine(coords, uRes+1, u0, v0, du); } else if (vRes > 0) { nCoords += appendUIsoLine(coords, vRes+1, u0, v0, dv); } else { return getCenterCoord(coords); } return nCoords; } template <typename REAL> int quad::GetInteriorCoords(int const uvRes[2], Coord2Array<REAL> coords) { int nIntRings = std::min((uvRes[0] / 2), (uvRes[1] / 2)); if (nIntRings == 0) return 0; REAL du = 1.0f / (REAL) uvRes[0]; REAL dv = 1.0f / (REAL) uvRes[1]; REAL u = du; REAL v = dv; int uRes = uvRes[0] - 2; int vRes = uvRes[1] - 2; // // Note that with separate U and V res, one can go negative so beware // of making any assumptions -- defer to the function for the ring: // int nCoords = 0; for (int i=0; i < nIntRings; ++i, uRes -= 2, vRes -= 2, u += du, v += dv) { nCoords += getInteriorRingCoords(uRes, vRes, u, v, du, dv, coords + nCoords); } return nCoords; } int quad::getSingleStripFacets(int uRes, int vRes, int coord0, bool triangulate, FacetArray facets) { assert((uRes == 1) || (vRes == 1)); FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.splitFirstFace = false; qStrip.splitLastFace = false; qStrip.innerReversed = true; qStrip.includeLastFace = true; if (uRes > 1) { qStrip.outerEdges = uRes; qStrip.innerEdges = uRes - 2; // Assign these successively around the strip: qStrip.outerFirst = coord0; qStrip.outerLast = qStrip.outerFirst + uRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + uRes; qStrip.outerPrev = qStrip.innerFirst + 1; return qStrip.connectUniformQuads(facets); } else { qStrip.outerEdges = vRes; qStrip.innerEdges = vRes - 2; qStrip.outerPrev = coord0; qStrip.outerFirst = coord0 + 1; qStrip.outerLast = qStrip.outerFirst + vRes; qStrip.innerLast = qStrip.outerLast + 2; qStrip.innerFirst = qStrip.outerLast + vRes; return qStrip.connectUniformQuads(facets); } } int quad::getInteriorRingFacets(int uRes, int vRes, int coord0, bool triangulate, FacetArray facets) { assert((uRes >= 0) && (vRes >= 0)); // // Deal with some simple and special cases first: // int totalInnerFacets = uRes * vRes; if (totalInnerFacets == 0) return 0; if (totalInnerFacets == 1) { return appendQuad(facets, coord0, coord0+1, coord0+2, coord0+3, triangulate); } // The single interior strip is enclosed by a single ring: if ((uRes == 1) || (vRes == 1)) { return getSingleStripFacets(uRes, vRes, coord0, triangulate, facets); } // // The general case -- one or more quads for each edge that are // connected to the next interior ring of vertices: // int nFacets = 0; int uResInner = uRes - 2; int vResInner = vRes - 2; int outerRingStart = coord0; int innerRingStart = coord0 + 2 * (uRes + vRes); FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.splitFirstFace = false; qStrip.splitLastFace = false; qStrip.outerEdges = uRes; qStrip.outerFirst = outerRingStart; qStrip.outerPrev = innerRingStart - 1; qStrip.outerLast = outerRingStart + uRes; qStrip.innerEdges = uResInner; qStrip.innerReversed = false; qStrip.innerFirst = innerRingStart; qStrip.innerLast = innerRingStart + uResInner; nFacets += qStrip.connectUniformQuads(facets + nFacets); qStrip.outerEdges = vRes; qStrip.outerFirst += uRes; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.outerLast = qStrip.outerFirst + vRes; qStrip.innerEdges = vResInner; qStrip.innerReversed = false; qStrip.innerFirst = qStrip.innerLast; qStrip.innerLast += vResInner; nFacets += qStrip.connectUniformQuads(facets + nFacets); qStrip.outerEdges = uRes; qStrip.outerFirst += vRes; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.outerLast = qStrip.outerFirst + uRes; qStrip.innerEdges = uResInner; qStrip.innerReversed = (vResInner == 0); qStrip.innerFirst = qStrip.innerLast; qStrip.innerLast += uResInner * (qStrip.innerReversed ? -1 : 1); nFacets += qStrip.connectUniformQuads(facets + nFacets); qStrip.outerEdges = vRes; qStrip.outerFirst += uRes; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.outerLast = outerRingStart; qStrip.innerEdges = vResInner; qStrip.innerReversed = (uResInner == 0); qStrip.innerFirst = qStrip.innerLast; qStrip.innerLast = innerRingStart; nFacets += qStrip.connectUniformQuads(facets + nFacets); return nFacets; } int quad::getBoundaryRingFacets(int const outerRes[], int uRes, int vRes, int nBoundaryEdges, bool triangulate, FacetArray facets) { // Identify edges and corners that should preserve uniform behavior: bool uniformEdges[4]; uniformEdges[0] = (outerRes[0] == uRes); uniformEdges[1] = (outerRes[1] == vRes); uniformEdges[2] = (outerRes[2] == uRes); uniformEdges[3] = (outerRes[3] == vRes); bool uniformCorners[4]; uniformCorners[0] = (uniformEdges[0] && uniformEdges[3]); uniformCorners[1] = (uniformEdges[1] && uniformEdges[0]); uniformCorners[2] = (uniformEdges[2] && uniformEdges[1]); uniformCorners[3] = (uniformEdges[3] && uniformEdges[2]); // Initialize inner edge counts and the FacetStrip for local use: assert((uRes > 1) && (vRes > 1)); int innerResU = uRes - 2; int innerResV = vRes - 2; int nFacets = 0; int outerRingStart = 0; int innerRingStart = nBoundaryEdges; FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; // Assign strip indices for the inner and outer rings: qStrip.outerEdges = outerRes[0]; qStrip.outerFirst = outerRingStart; qStrip.outerPrev = innerRingStart - 1; qStrip.outerLast = outerRingStart + outerRes[0]; qStrip.innerEdges = innerResU; qStrip.innerReversed = false; qStrip.innerFirst = innerRingStart; qStrip.innerLast = innerRingStart + innerResU; if (uniformEdges[0]) { qStrip.splitFirstFace = !uniformCorners[0]; qStrip.splitLastFace = !uniformCorners[1]; nFacets += qStrip.connectUniformQuads(facets + nFacets); } else { qStrip.splitFirstFace = true; qStrip.splitLastFace = true; nFacets += qStrip.connectNonUniformFacets(facets + nFacets); } qStrip.outerEdges = outerRes[1]; qStrip.outerFirst = qStrip.outerLast; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.outerLast += outerRes[1]; qStrip.innerEdges = innerResV; qStrip.innerReversed = false; qStrip.innerFirst = qStrip.innerLast; qStrip.innerLast += innerResV; if (uniformEdges[1]) { qStrip.splitFirstFace = !uniformCorners[1]; qStrip.splitLastFace = !uniformCorners[2]; nFacets += qStrip.connectUniformQuads(facets + nFacets); } else { qStrip.splitFirstFace = true; qStrip.splitLastFace = true; nFacets += qStrip.connectNonUniformFacets(facets + nFacets); } qStrip.outerEdges = outerRes[2]; qStrip.outerFirst = qStrip.outerLast; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.outerLast += outerRes[2]; qStrip.innerEdges = innerResU; qStrip.innerReversed = (innerResV == 0); qStrip.innerFirst = qStrip.innerLast; qStrip.innerLast += innerResU * (qStrip.innerReversed ? -1 : 1); if (uniformEdges[2]) { qStrip.splitFirstFace = !uniformCorners[2]; qStrip.splitLastFace = !uniformCorners[3]; nFacets += qStrip.connectUniformQuads(facets + nFacets); } else { qStrip.splitFirstFace = true; qStrip.splitLastFace = true; nFacets += qStrip.connectNonUniformFacets(facets + nFacets); } qStrip.outerEdges = outerRes[3]; qStrip.outerFirst = qStrip.outerLast; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.outerLast = 0; qStrip.innerEdges = innerResV; qStrip.innerReversed = (innerResU == 0); qStrip.innerFirst = qStrip.innerLast; qStrip.innerLast = innerRingStart; if (uniformEdges[3]) { qStrip.splitFirstFace = !uniformCorners[3]; qStrip.splitLastFace = !uniformCorners[0]; nFacets += qStrip.connectUniformQuads(facets + nFacets); } else { qStrip.splitFirstFace = true; qStrip.splitLastFace = true; nFacets += qStrip.connectNonUniformFacets(facets + nFacets); } return nFacets; } int quad::GetSegmentedFacets(int const innerRes[], bool triangulate, FacetArray facets) { // WIP - may extend later to handle different opposing outer rates // resulting in a non-uniform strip between the opposing edges int uRes = innerRes[0]; int vRes = innerRes[1]; assert((uRes == 1) || (vRes == 1)); return getSingleStripFacets(uRes, vRes, 0, triangulate, facets); } int quad::GetNonUniformFacets(int const outerRes[], int const innerRes[], int nBoundaryEdges, bool triangulate, FacetArray facets) { int uRes = innerRes[0]; int vRes = innerRes[1]; assert((uRes > 1) && (vRes > 1)); // First, generate the ring of boundary facets separately: int nFacets = getBoundaryRingFacets(outerRes, uRes, vRes, nBoundaryEdges, triangulate, facets); // Second, generate the remaining rings of interior facets: int nRings = (std::min(uRes,vRes) + 1) / 2; int coord0 = nBoundaryEdges; for (int ring = 1; ring < nRings; ++ring) { uRes = std::max(uRes - 2, 0); vRes = std::max(vRes - 2, 0); nFacets += getInteriorRingFacets(uRes, vRes, coord0, triangulate, facets + nFacets); coord0 += 2 * (uRes + vRes); } return nFacets; } int quad::GetUniformFacets(int res, bool triangulate, FacetArray facets) { // The trivial case should have been handled by the caller: assert(res > 1); int nRings = (res + 1) / 2; int nFacets = 0; int coord0 = 0; for (int ring = 0; ring < nRings; ++ring, res -= 2) { nFacets += getInteriorRingFacets(res, res, coord0, triangulate, facets + nFacets); coord0 += 4 * res; } return nFacets; } // // REMINDER TO SELF -- according to the OpenGL docs, the "inner" tess // rates are expected to reflect a tessellation of the entire face, i.e. // they are not the outer rates with 2 subtracted, but are the same as // the outer rates. Their minimum is therefore 1 -- no inner vertices, // BUT any non-unit outer rate will trigger an interior point. // // Note that triangles will need considerably different treatment in // some cases given the way we diverge from the OpenGL patterns, e.g. // the corner faces are not bisected in the uniform case but may need // to be when non-uniform. // // // Implementations for tri functions: // inline int tri::CountUniformFacets(int edgeRes) { return edgeRes * edgeRes; } int tri::CountNonUniformFacets(int const outerRes[], int innerRes) { assert(innerRes > 2); // Count interior facets based on edges of inner ring: int nInnerEdges = innerRes - 3; int nInterior = nInnerEdges ? CountUniformFacets(nInnerEdges) : 0; // // Note the number of boundary facets is not affected by the uniform // behavior at corners when rates match -- in contrast to quads. In // both cases, two tris are generated from four points at the corner, // just with a different edge bisecting that "quad". // int nBoundary = (nInnerEdges + outerRes[0]) + (nInnerEdges + outerRes[1]) + (nInnerEdges + outerRes[2]); return nInterior + nBoundary; } inline int tri::countUniformCoords(int edgeRes) { return edgeRes * (edgeRes + 1) / 2; } inline int tri::CountInteriorCoords(int edgeRes) { return countUniformCoords(edgeRes - 2); } template <typename REAL> inline int tri::getCenterCoord(Coord2Array<REAL> coords) { coords[0].Set(1.0f/3.0f, 1.0f/3.0f); return 1; } template <typename REAL> int tri::GetEdgeCoords(int edge, int edgeRes, Coord2Array<REAL> coords) { REAL dt = 1.0f / (REAL)edgeRes; REAL t0 = dt; REAL t1 = 1.0f - dt; int n = edgeRes - 1; switch (edge) { case 0: return appendVIsoLine<REAL>(coords, n, t0, 0.0f, dt); case 1: return appendUVLine<REAL>( coords, n, t1, t0, -dt, dt); case 2: return appendUIsoLine<REAL>(coords, n, 0.0f, t1, -dt); } return 0; } template <typename REAL> int tri::GetBoundaryCoords(int const edgeRates[], Coord2Array<REAL> coords) { int nCoords = 0; nCoords += appendVIsoLine<REAL>(coords + nCoords, edgeRates[0], 0.0f, 0.0f, 1.0f / (REAL) edgeRates[0]); nCoords += appendUVLine<REAL>( coords + nCoords, edgeRates[1], 1.0f, 0.0f, -1.0f / (REAL) edgeRates[1], 1.0f / (REAL) edgeRates[1]); nCoords += appendUIsoLine<REAL>(coords + nCoords, edgeRates[2], 0.0f, 1.0f, -1.0f / (REAL) edgeRates[2]); return nCoords; } template <typename REAL> int tri::getInteriorRingCoords(int edgeRes, REAL u0, REAL v0, REAL dt, Coord2Array<REAL> coords) { assert(edgeRes); REAL u1 = 1.0f - u0*2.0f; REAL v1 = 1.0f - v0*2.0f; int nCoords = 0; nCoords += appendVIsoLine(coords + nCoords, edgeRes, u0, v0, dt); nCoords += appendUVLine( coords + nCoords, edgeRes, u1, v0,-dt, dt); nCoords += appendUIsoLine(coords + nCoords, edgeRes, u0, v1,-dt); return nCoords; } template <typename REAL> int tri::GetInteriorCoords(int edgeRes, Coord2Array<REAL> coords) { int nIntRings = edgeRes / 3; if (nIntRings == 0) return 0; REAL dt = 1.0f / (REAL) edgeRes; REAL u = dt; REAL v = dt; int ringRes = edgeRes - 3; int nCoords = 0; for (int i = 0; i < nIntRings; ++i, ringRes -= 3, u += dt, v += dt) { if (ringRes == 0) { nCoords += getCenterCoord(coords + nCoords); } else { nCoords += getInteriorRingCoords(ringRes, u, v, dt, coords + nCoords); } } return nCoords; } int tri::getInteriorRingFacets(int edgeRes, int coord0, FacetArray facets) { // // Deal with trivial cases with no inner vertices: // if (edgeRes < 1) { return 0; } else if (edgeRes == 1) { return appendTri(facets, coord0, coord0+1, coord0+2); } else if (edgeRes == 2) { appendTri(facets + 0, coord0+0, coord0+1, coord0+5); appendTri(facets + 1, coord0+2, coord0+3, coord0+1); appendTri(facets + 2, coord0+4, coord0+5, coord0+3); appendTri(facets + 3, coord0+1, coord0+3, coord0+5); return 4; } // // Generate facets for the 3 tri-strips for each edge: // int nFacets = 0; int outerEdges = edgeRes; int innerEdges = edgeRes - 3; int outerRingStart = coord0; int innerRingStart = coord0 + 3 * outerEdges; FacetStrip tStrip; tStrip.quadTopology = false; tStrip.innerReversed = false; tStrip.innerEdges = innerEdges; tStrip.outerEdges = outerEdges; tStrip.outerFirst = outerRingStart; tStrip.outerLast = outerRingStart + outerEdges; tStrip.outerPrev = innerRingStart - 1; tStrip.innerFirst = innerRingStart; tStrip.innerLast = innerRingStart + innerEdges; nFacets += tStrip.connectUniformTris(facets + nFacets); tStrip.outerFirst += outerEdges; tStrip.outerLast += outerEdges; tStrip.outerPrev = tStrip.outerFirst - 1; tStrip.innerFirst += innerEdges; tStrip.innerLast += innerEdges; nFacets += tStrip.connectUniformTris(facets + nFacets); tStrip.outerFirst += outerEdges; tStrip.outerLast = outerRingStart; tStrip.outerPrev = tStrip.outerFirst - 1; tStrip.innerFirst += innerEdges; tStrip.innerLast = innerRingStart; nFacets += tStrip.connectUniformTris(facets + nFacets); return nFacets; } int tri::getBoundaryRingFacets(int const outerRes[], int innerRes, int nBoundaryEdges, FacetArray facets) { // Identify edges and corners that should preserve uniform behavior: bool uniformEdges[3]; uniformEdges[0] = (outerRes[0] == innerRes); uniformEdges[1] = (outerRes[1] == innerRes); uniformEdges[2] = (outerRes[2] == innerRes); bool uniformCorners[3]; uniformCorners[0] = (uniformEdges[0] && uniformEdges[2]); uniformCorners[1] = (uniformEdges[1] && uniformEdges[0]); uniformCorners[2] = (uniformEdges[2] && uniformEdges[1]); // Initialize inner edge count and the FacetStrip for local use: assert(innerRes > 2); int innerEdges = innerRes - 3; int nFacets = 0; int outerRingStart = 0; int innerRingStart = nBoundaryEdges; FacetStrip tStrip; tStrip.quadTopology = false; tStrip.innerReversed = false; tStrip.innerEdges = innerEdges; // Assign the three strips of Facets: tStrip.outerEdges = outerRes[0]; tStrip.outerFirst = outerRingStart; tStrip.outerLast = outerRingStart + outerRes[0]; tStrip.outerPrev = innerRingStart - 1; tStrip.innerFirst = innerRingStart; tStrip.innerLast = innerRingStart + innerEdges; if (uniformEdges[0]) { tStrip.splitFirstFace = !uniformCorners[0]; tStrip.splitLastFace = !uniformCorners[1]; nFacets += tStrip.connectUniformTris(facets + nFacets); } else { tStrip.splitFirstFace = true; tStrip.splitLastFace = true; nFacets += tStrip.connectNonUniformFacets(facets + nFacets); } tStrip.outerEdges = outerRes[1]; tStrip.outerFirst = tStrip.outerLast; tStrip.outerLast += outerRes[1]; tStrip.outerPrev = tStrip.outerFirst - 1; tStrip.innerFirst = tStrip.innerLast; tStrip.innerLast += innerEdges; if (uniformEdges[1]) { tStrip.splitFirstFace = !uniformCorners[1]; tStrip.splitLastFace = !uniformCorners[2]; nFacets += tStrip.connectUniformTris(facets + nFacets); } else { tStrip.splitFirstFace = true; tStrip.splitLastFace = true; nFacets += tStrip.connectNonUniformFacets(facets + nFacets); } tStrip.outerEdges = outerRes[2]; tStrip.outerFirst = tStrip.outerLast; tStrip.outerLast = 0; tStrip.outerPrev = tStrip.outerFirst - 1; tStrip.innerFirst = tStrip.innerLast; tStrip.innerLast = innerRingStart; if (uniformEdges[2]) { tStrip.splitFirstFace = !uniformCorners[2]; tStrip.splitLastFace = !uniformCorners[0]; nFacets += tStrip.connectUniformTris(facets + nFacets); } else { tStrip.splitFirstFace = true; tStrip.splitLastFace = true; nFacets += tStrip.connectNonUniformFacets(facets + nFacets); } return nFacets; } int tri::GetUniformFacets(int edgeRes, FacetArray facets) { // The trivial case should have been handled by the caller: assert(edgeRes > 1); int nRings = 1 + (edgeRes / 3); int nFacets = 0; int coord0 = 0; for (int ring = 0; ring < nRings; ++ring, edgeRes -= 3) { nFacets += getInteriorRingFacets(edgeRes, coord0, facets + nFacets); coord0 += 3 * edgeRes; } return nFacets; } int tri::GetNonUniformFacets(int const outerRes[], int innerRes, int nBoundaryEdges, FacetArray facets) { assert(innerRes > 2); // First, generate the ring of boundary facets separately: int nFacets = getBoundaryRingFacets(outerRes, innerRes, nBoundaryEdges, facets); // Second, generate the remaining rings of interior facets: int nRings = 1 + (innerRes / 3); int coord0 = nBoundaryEdges; for (int ring = 1; ring < nRings; ++ring) { innerRes -= 3; nFacets += getInteriorRingFacets(innerRes, coord0, facets + nFacets); coord0 += 3 * innerRes; } return nFacets; } // // These utilities support quadrangulated polygons used for quad-based // subdivision schemes. // // // The formulae to enumerate points and facets for a uniform tessellation // reflect the differing topologies for the odd and even case: // inline int qsub::CountUniformFacets(int N, int edgeRes, bool triangulate) { bool resIsOdd = (edgeRes & 1); int H = edgeRes / 2; int nQuads = (H + resIsOdd) * H * N; int nCenter = resIsOdd ? ((N == 3) ? 1 : N) : 0; return (nQuads << (int)triangulate) + nCenter; } int qsub::CountNonUniformFacets(int N, int const outerRes[], int innerRes, bool triangulate) { assert(innerRes > 1); // Count interior facets based on edges of inner ring: int nInnerEdges = innerRes - 2; int nInterior = 0; if (nInnerEdges) { nInterior = CountUniformFacets(N, nInnerEdges, triangulate); } // // Accumulate boundary facets for uniform vs non-uniform edge. Uniform // has a quad for each inner edge, plus one facet for leading corner // and a tri for the trailing corner if not uniform. Non-uniform has // a tri for each inner edge and each outer edge: // int nBoundary = 0; for (int i = 0; i < N; ++i) { if (triangulate) { nBoundary += nInnerEdges + outerRes[i]; } else if (outerRes[i] == innerRes) { nBoundary += nInnerEdges + 1 + (innerRes != outerRes[(i+1) % N]); } else { int nEdge = std::max(nInnerEdges, outerRes[i]); if ((nEdge & 1) == 0) { nEdge += (nInnerEdges & 1) || (outerRes[i] & 1); } nBoundary += nEdge; } } return nInterior + nBoundary; } inline int qsub::countUniformCoords(int N, int edgeRes) { int H = edgeRes / 2; return (edgeRes & 1) ? (H+1)* (H+1) * N + ((N == 3) ? 0 : 1) : H * (H+1) * N + 1; } inline int qsub::CountInteriorCoords(int N, int edgeRes) { assert(edgeRes > 1); return countUniformCoords(N, edgeRes - 2); } template <typename REAL> inline int qsub::getCenterCoord(Coord2Array<REAL> coords) { coords[0].Set(0.5f, 0.5f); return 1; } template <typename REAL> int qsub::getRingEdgeCoords(Parameterization P, int edge, int edgeRes, bool incFirst, bool incLast, REAL tOrigin, REAL dt, Coord2Array<REAL> coords) { // // Determine number of coords in each half, excluding the ends. The // second half will get the extra when odd so that the sequence starts // exactly on the boundary of the second sub-face (avoiding floating // point error when accumulating to the boundary of the first): // int n0 = (edgeRes - 1) / 2; int n1 = (edgeRes - 1) - n0; int nCoords = 0; if (incFirst || n0) { REAL uv0[2]; P.GetVertexCoord(edge, uv0); // u ranges from [tOrigin < 0.5] while v is constant if (incFirst) { coords[nCoords++].Set(uv0[0] + tOrigin, uv0[1] + tOrigin); } if (n0) { REAL u = uv0[0] + tOrigin + dt; REAL v = uv0[1] + tOrigin; nCoords += appendVIsoLine(coords + nCoords, n0, u, v, dt); } } if (n1 || incLast) { REAL uv1[2]; P.GetVertexCoord((edge + 1) % P.GetFaceSize(), uv1); // u is constant while v ranges from [0.5 > tOrigin] (even) if (n1) { REAL u = uv1[0] + tOrigin; REAL v = uv1[1] + ((edgeRes & 1) ? (0.5f - 0.5f * dt) : 0.5f); nCoords += appendUIsoLine(coords + nCoords, n1, u, v, -dt); } if (incLast) { coords[nCoords++].Set(uv1[0] + tOrigin, uv1[1] + tOrigin); } } return nCoords; } template <typename REAL> int qsub::GetEdgeCoords(Parameterization P, int edge, int edgeRes, Coord2Array<REAL> coords) { return getRingEdgeCoords<REAL>(P, edge, edgeRes, false, false, 0.0f, 1.0f / (REAL)edgeRes, coords); } template <typename REAL> int qsub::GetBoundaryCoords(Parameterization P, int const edgeRates[], Coord2Array<REAL> coords) { int N = P.GetFaceSize(); int nCoords = 0; for (int i = 0; i < N; ++i) { nCoords += getRingEdgeCoords<REAL>(P, i, edgeRates[i], true, false, 0.0f, 1.0f / (REAL)edgeRates[i], coords + nCoords); } return nCoords; } template <typename REAL> int qsub::getInteriorRingCoords(Parameterization P, int edgeRes, REAL tOrigin, REAL dt, Coord2Array<REAL> coords) { assert(edgeRes > 1); int N = P.GetFaceSize(); int nCoords = 0; for (int i = 0; i < N; ++i) { nCoords += getRingEdgeCoords(P, i, edgeRes, true, false, tOrigin, dt, coords + nCoords); } return nCoords; } template <typename REAL> int qsub::getCenterRingCoords(Parameterization P, REAL tOrigin, Coord2Array<REAL> coords) { int N = P.GetFaceSize(); // Just need the single corner point for each edge here: for (int i = 0; i < N; ++i) { REAL uv[2]; P.GetVertexCoord(i, uv); coords[i].Set(uv[0] + tOrigin, uv[1] + tOrigin); } return (N == 3) ? N : (N + getCenterCoord(coords + N)); } template <typename REAL> int qsub::GetInteriorCoords(Parameterization P, int edgeRes, Coord2Array<REAL> coords) { int nIntRings = edgeRes / 2; if (nIntRings == 0) return 0; REAL dt = 1.0f / (REAL) edgeRes; REAL t = dt; int ringRes = edgeRes - 2; int nCoords = 0; for (int i = 0; i < nIntRings; ++i, ringRes -= 2, t += dt) { if (ringRes == 0) { nCoords += getCenterCoord(coords + nCoords); } else if (ringRes == 1) { nCoords += getCenterRingCoords(P, t, coords + nCoords); } else { nCoords += getInteriorRingCoords(P, ringRes, t, dt, coords + nCoords); } } return nCoords; } int qsub::getCenterFacets(int N, int coord0, FacetArray facets) { return (N == 3) ? appendTri(facets, coord0, coord0+1, coord0+2) : appendTriFan(facets, N, coord0); } int qsub::getInteriorRingFacets(int N, int edgeRes, int coord0, bool triangulate, FacetArray facets) { // // Deal with trivial cases with no inner vertices: // if (edgeRes < 1) return 0; if (edgeRes == 1) { return getCenterFacets(N, coord0, facets); } // // Generate facets for the N quad-strips for each edge: // int outerRes = edgeRes; int outerRing = coord0; int innerRes = outerRes - 2; int innerRing = outerRing + N * outerRes; int nFacets = 0; FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.outerEdges = outerRes; qStrip.innerEdges = innerRes; qStrip.innerReversed = false; qStrip.splitFirstFace = false; qStrip.splitLastFace = false; for (int edge = 0; edge < N; ++edge) { qStrip.outerFirst = outerRing + edge * outerRes; qStrip.innerFirst = innerRing + edge * innerRes; qStrip.outerPrev = (edge ? qStrip.outerFirst : innerRing) - 1; if (edge < N-1) { qStrip.outerLast = qStrip.outerFirst + outerRes; qStrip.innerLast = qStrip.innerFirst + innerRes; } else { qStrip.outerLast = outerRing; qStrip.innerLast = innerRing; } nFacets += qStrip.connectUniformQuads(facets + nFacets); } return nFacets; } int qsub::getBoundaryRingFacets(int N, int const outerRes[], int innerRes, int nBoundaryEdges, bool triangulate, FacetArray facets) { int innerEdges = std::max(innerRes - 2, 0); int nFacets = 0; int outerRingStart = 0; int innerRingStart = nBoundaryEdges; // Initialize properties of the strip that are fixed: FacetStrip qStrip; qStrip.quadTopology = true; qStrip.quadTriangulate = triangulate; qStrip.innerReversed = false; qStrip.innerEdges = innerEdges; for (int edge = 0; edge < N; ++edge) { qStrip.outerEdges = outerRes[edge]; // Initialize the indices starting this strip: if (edge) { qStrip.outerFirst = qStrip.outerLast; qStrip.outerPrev = qStrip.outerFirst - 1; qStrip.innerFirst = qStrip.innerLast; } else { qStrip.outerFirst = outerRingStart; qStrip.outerPrev = innerRingStart - 1; qStrip.innerFirst = innerRingStart; } // Initialize the indices ending this strip: if (edge < N-1) { qStrip.outerLast = qStrip.outerFirst + qStrip.outerEdges; qStrip.innerLast = qStrip.innerFirst + qStrip.innerEdges; } else { qStrip.outerLast = outerRingStart; qStrip.innerLast = innerRingStart; } // Test rates at, before and after this edge for uniform behavior: if ((outerRes[edge] == innerRes) && (innerRes > 1)) { qStrip.splitFirstFace = (outerRes[(edge-1+N) % N] != innerRes); qStrip.splitLastFace = (outerRes[(edge + 1) % N] != innerRes); nFacets += qStrip.connectUniformQuads(facets+nFacets); } else { qStrip.splitFirstFace = true; qStrip.splitLastFace = true; nFacets += qStrip.connectNonUniformFacets(facets + nFacets); } } return nFacets; } int qsub::GetUniformFacets(int N, int edgeRes, bool triangulate, FacetArray facets) { // The trivial (single facet) case should be handled externally: if (edgeRes == 1) { return getCenterFacets(N, 0, facets); } int nRings = (edgeRes + 1) / 2; int nFacets = 0; int coord0 = 0; for (int ring = 0; ring < nRings; ++ring, edgeRes -= 2) { nFacets += getInteriorRingFacets(N, edgeRes, coord0, triangulate, facets + nFacets); coord0 += N * edgeRes; } return nFacets; } int qsub::GetNonUniformFacets(int N, int const outerRes[], int innerRes, int nBoundaryEdges, bool triangulate, FacetArray facets) { // First, generate the ring of boundary facets separately: int nFacets = getBoundaryRingFacets(N, outerRes, innerRes, nBoundaryEdges, triangulate, facets); // Second, generate the remaining rings of interior facets: int nRings = (innerRes + 1) / 2; int coord0 = nBoundaryEdges; for (int ring = 1; ring < nRings; ++ring) { innerRes = std::max(innerRes - 2, 0); nFacets += getInteriorRingFacets(N, innerRes, coord0, triangulate, facets + nFacets); coord0 += N * innerRes; } return nFacets; } // // Internal initialization methods: // void Tessellation::initializeDefaults() { std::memset((void*) this, 0, sizeof(*this)); // Assign any non-zero defaults: _triangulate = true; _isValid = false; } bool Tessellation::validateArguments(Parameterization const & p, int numRates, int const rates[], Options const & options) { // Check the Parameterization: if (!p.IsValid()) return false; // Check given tessellation rates: if (numRates < 1) return false; for (int i = 0; i < numRates; ++i) { if (rates[i] < 1) return false; } // Check given buffer strides in Options: int coordStride = options.GetCoordStride(); if (coordStride && (coordStride < 2)) return false; int facetStride = options.GetFacetStride(); if (facetStride && (facetStride < options.GetFacetSize())) return false; return true; } void Tessellation::initialize(Parameterization const & p, int numRates, int const rates[], Options const & options) { // Validate arguments and initialize simple members: initializeDefaults(); if (!validateArguments(p, numRates, rates, options)) return; _param = p; _facetSize = (short) options.GetFacetSize(); _facetStride = options.GetFacetStride() ? options.GetFacetStride() : options.GetFacetSize(); _coordStride = options.GetCoordStride() ? options.GetCoordStride() : 2; // Initialize the full array of rates, returning sum of outer edge rates int sumOfOuterRates = initializeRates(numRates, rates); // Initialize the inventory based on the Parameterization type: _triangulate = (_facetSize == 3) || !options.PreserveQuads(); switch (_param.GetType()) { case Parameterization::QUAD: initializeInventoryForParamQuad(sumOfOuterRates); break; case Parameterization::TRI: initializeInventoryForParamTri(sumOfOuterRates); break; case Parameterization::QUAD_SUBFACES: initializeInventoryForParamQPoly(sumOfOuterRates); break; } _isValid = true; // Debugging output: bool printNonUniform = false; // !_isUniform; if (printNonUniform) { int N = _param.GetFaceSize(); printf("Tessellation::initialize(%d, numRates = %d):\n", N, numRates); printf(" is uniform = %d\n", _isUniform); printf(" outer rates ="); for (int i = 0; i < N; ++i) printf(" %d", _outerRates[i]); printf("\n"); printf(" inner rate(s) = %d", _innerRates[0]); if (N == 4) printf(" %d\n", _innerRates[1]); printf("\n"); printf(" num boundary points = %d\n", _numBoundaryPoints); printf(" num interior points = %d\n", _numInteriorPoints); printf(" num facets = %d\n", _numFacets); } } int Tessellation::initializeRates(int numGivenRates, int const givenRates[]) { _numGivenRates = numGivenRates; // Allocate space for rates of N-sided faces if necessary: int N = _param.GetFaceSize(); if (N > (int)(sizeof(_outerRatesLocal) / sizeof(int))) { _outerRates = new int[N]; } else { _outerRates = &_outerRatesLocal[0]; } bool isQuad = (N == 4); // Keep track of the total tessellation rate for all edges to return: int const MaxRate = std::numeric_limits<short>::max(); int totalEdgeRate = 0; if (numGivenRates < N) { // Given one or two inner rates, infer outer (others < N ignored): if ((numGivenRates == 2) && isQuad) { // Infer outer rates from two given inner rates of quad: _innerRates[0] = std::min(givenRates[0], MaxRate); _innerRates[1] = std::min(givenRates[1], MaxRate); _outerRates[0] = _outerRates[2] = _innerRates[0]; _outerRates[1] = _outerRates[3] = _innerRates[1]; _isUniform = (_innerRates[0] == _innerRates[1]); totalEdgeRate = 2 * (_innerRates[0] + _innerRates[1]); } else { // Infer outer rates from single inner rate (uniform): _innerRates[0] = std::min(givenRates[0], MaxRate); _innerRates[1] = _innerRates[0]; std::fill(_outerRates, _outerRates + N, _innerRates[0]); _isUniform = true; totalEdgeRate = _innerRates[0] * N; } } else { // Assign the N outer rates: _isUniform = true; for (int i = 0; i < N; ++i) { _outerRates[i] = std::min(givenRates[i], MaxRate); _isUniform = _isUniform && (_outerRates[i] == _outerRates[0]); totalEdgeRate += _outerRates[i]; } // Assign any given inner rates or infer: if (numGivenRates > N) { // Assign single inner rate, assign/infer second for quad: _innerRates[0] = std::min(givenRates[N], MaxRate); _innerRates[1] = ((numGivenRates == 6) && isQuad) ? std::min(givenRates[5], MaxRate) : _innerRates[0]; _isUniform = _isUniform && (_innerRates[0] == _outerRates[0]); _isUniform = _isUniform && (_innerRates[1] == _outerRates[0]); } else if (isQuad) { // Infer two inner rates for quads (avg of opposite edges): _innerRates[0] = (_outerRates[0] + _outerRates[2]) / 2; _innerRates[1] = (_outerRates[1] + _outerRates[3]) / 2; } else { // Infer single inner rate for non-quads (avg of edge rates) _innerRates[0] = totalEdgeRate / N; _innerRates[1] = _innerRates[0]; } } return totalEdgeRate; } int Tessellation::GetRates(int rates[]) const { int N = _param.GetFaceSize(); int numOuterRates = std::min<int>(N, _numGivenRates); int numInnerRates = std::max<int>(0, _numGivenRates - N); for (int i = 0; i < numOuterRates; ++i) { rates[i] = _outerRates[i]; } for (int i = 0; i < numInnerRates; ++i) { rates[N + i] = _innerRates[i > 0]; } return _numGivenRates; } void Tessellation::initializeInventoryForParamQuad(int sumOfEdgeRates) { int const * inner = &_innerRates[0]; int const * outer = &_outerRates[0]; if (_isUniform) { if (inner[0] > 1) { _numInteriorPoints = quad::CountInteriorCoords(inner[0]); _numFacets = quad::CountUniformFacets(inner[0], _triangulate); } else if (_triangulate) { _numInteriorPoints = 0; _numFacets = 2; _splitQuad = true; } else { _numInteriorPoints = 0; _numFacets = 1; _singleFace = true; } } else { // // For quads another low-res case is recognized when there are // no interior points, but the face has extra boundary points. // Instead of introducing a center point, the face is considered // to be "segmented" into other faces that cover it without the // addition of any interior vertices. // // This currently occurs for a pure 1 x M tessellation -- from // which a quad strip is generated -- but could be extended to // handle the 1 x M inner case with additional points on the // opposing edges. // if ((inner[0] > 1) && (inner[1] > 1)) { _numInteriorPoints = quad::CountInteriorCoords(_innerRates); _numFacets = quad::CountNonUniformFacets(_outerRates, _innerRates, _triangulate); } else if ((outer[0] == inner[0]) && (inner[0] == outer[2]) && (outer[1] == inner[1]) && (inner[1] == outer[3])) { _numInteriorPoints = 0; _numFacets = quad::CountSegmentedFacets(_innerRates, _triangulate); _segmentedFace = true; } else { _numInteriorPoints = 1; _numFacets = sumOfEdgeRates; _triangleFan = true; } } _numBoundaryPoints = sumOfEdgeRates; } void Tessellation::initializeInventoryForParamTri(int sumOfEdgeRates) { int res = _innerRates[0]; if (_isUniform) { if (res > 1) { _numInteriorPoints = tri::CountInteriorCoords(res); _numFacets = tri::CountUniformFacets(res); } else { _numInteriorPoints = 0; _numFacets = 1; _singleFace = true; } } else { if (res > 2) { _numInteriorPoints = tri::CountInteriorCoords(res); _numFacets = tri::CountNonUniformFacets(_outerRates, res); } else { _numInteriorPoints = 1; _numFacets = sumOfEdgeRates; _triangleFan = true; } } _numBoundaryPoints = sumOfEdgeRates; } void Tessellation::initializeInventoryForParamQPoly(int sumOfEdgeRates) { int N = _param.GetFaceSize(); int res = _innerRates[0]; if (_isUniform) { if (res > 1) { _numInteriorPoints = qsub::CountInteriorCoords(N, res); _numFacets = qsub::CountUniformFacets(N, res, _triangulate); } else if (N == 3) { _numInteriorPoints = 0; _numFacets = 1; _singleFace = true; } else { _numInteriorPoints = 1; _numFacets = N; _triangleFan = true; } } else { if (res > 1) { _numInteriorPoints = qsub::CountInteriorCoords(N, res); _numFacets = qsub::CountNonUniformFacets(N, _outerRates, res, _triangulate); } else { _numInteriorPoints = 1; _numFacets = sumOfEdgeRates; _triangleFan = true; } } _numBoundaryPoints = sumOfEdgeRates; } // // Tessellation constructors and destructor: // Tessellation::Tessellation( Parameterization const & p, int uniformRate, Options const & options) { initialize(p, 1, &uniformRate, options); } Tessellation::Tessellation( Parameterization const & p, int numRates, int const rates[], Options const & options) { initialize(p, numRates, rates, options); } Tessellation::~Tessellation() { if (_outerRates != &_outerRatesLocal[0]) { delete[] _outerRates; } } // // Main methods to retrieve samples and facets: // template <typename REAL> int Tessellation::GetEdgeCoords(int edge, REAL coordBuffer[]) const { // Remember this method excludes coords at the end vertices int edgeRes = _outerRates[edge]; Coord2Array<REAL> coords(coordBuffer, _coordStride); switch (_param.GetType()) { case Parameterization::QUAD: return quad::GetEdgeCoords(edge, edgeRes, coords); case Parameterization::TRI: return tri::GetEdgeCoords(edge, edgeRes, coords); case Parameterization::QUAD_SUBFACES: return qsub::GetEdgeCoords(_param, edge, edgeRes, coords); default: assert(0); } return -1; } template <typename REAL> int Tessellation::GetBoundaryCoords(REAL coordBuffer[]) const { Coord2Array<REAL> coords(coordBuffer, _coordStride); switch (_param.GetType()) { case Parameterization::QUAD: return quad::GetBoundaryCoords(_outerRates, coords); case Parameterization::TRI: return tri::GetBoundaryCoords(_outerRates, coords); case Parameterization::QUAD_SUBFACES: return qsub::GetBoundaryCoords(_param, _outerRates, coords); default: assert(0); } return -1; } template <typename REAL> int Tessellation::GetInteriorCoords(REAL coordBuffer[]) const { if (_numInteriorPoints == 0) return 0; if (_numInteriorPoints == 1) { _param.GetCenterCoord(coordBuffer); return 1; } Coord2Array<REAL> coords(coordBuffer, _coordStride); switch (_param.GetType()) { case Parameterization::QUAD: return quad::GetInteriorCoords(_innerRates, coords); case Parameterization::TRI: return tri::GetInteriorCoords(_innerRates[0], coords); case Parameterization::QUAD_SUBFACES: return qsub::GetInteriorCoords(_param, _innerRates[0], coords); default: assert(0); } return 0; } int Tessellation::GetFacets(int facetIndices[]) const { FacetArray facets(facetIndices, _facetSize, _facetStride); int N = GetFaceSize(); if (_singleFace) { if (N == 3) { return appendTri(facets, 0, 1, 2); } else { return appendQuad(facets, 0, 1, 2, 3, 0); } } if (_triangleFan) { return appendTriFan(facets, _numFacets, 0); } if (_splitQuad) { return appendQuad(facets, 0, 1, 2, 3, _triangulate); } int nFacets = 0; switch (_param.GetType()) { case Parameterization::QUAD: if (_isUniform) { nFacets = quad::GetUniformFacets(_innerRates[0], _triangulate, facets); } else if (_segmentedFace) { nFacets = quad::GetSegmentedFacets(_innerRates, _triangulate, facets); } else { nFacets = quad::GetNonUniformFacets(_outerRates, _innerRates, _numBoundaryPoints, _triangulate, facets); } break; case Parameterization::TRI: if (_isUniform) { nFacets = tri::GetUniformFacets(_innerRates[0], facets); } else { nFacets = tri::GetNonUniformFacets(_outerRates, _innerRates[0], _numBoundaryPoints, facets); } break; case Parameterization::QUAD_SUBFACES: if (_isUniform) { nFacets = qsub::GetUniformFacets(N, _innerRates[0], _triangulate, facets); } else { nFacets = qsub::GetNonUniformFacets(N, _outerRates, _innerRates[0], _numBoundaryPoints, _triangulate, facets); } break; default: assert(0); } assert(nFacets == _numFacets); return nFacets; } void Tessellation::TransformFacetCoordIndices(int facetIndices[], int commonOffset) { if (_facetSize == 4) { for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) { facetIndices[0] += commonOffset; facetIndices[1] += commonOffset; facetIndices[2] += commonOffset; if (facetIndices[3] >= 0) { facetIndices[3] += commonOffset; } } } else { for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) { facetIndices[0] += commonOffset; facetIndices[1] += commonOffset; facetIndices[2] += commonOffset; } } } void Tessellation::TransformFacetCoordIndices(int facetIndices[], int const boundaryIndices[], int interiorOffset) { for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) { for (int j = 0; j < (int)_facetSize; ++j) { int & index = facetIndices[j]; if (index >= 0) { index = (index < _numBoundaryPoints) ? boundaryIndices[index] : (index + interiorOffset); } } } } void Tessellation::TransformFacetCoordIndices(int facetIndices[], int const boundaryIndices[], int const interiorIndices[]) { for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) { for (int j = 0; j < (int)_facetSize; ++j) { int & index = facetIndices[j]; if (index >= 0) { index = (index < _numBoundaryPoints) ? boundaryIndices[index] : interiorIndices[index - _numBoundaryPoints]; } } } } // // Explicit instantiation for multiple precision coordinate pairs: // template int Tessellation::GetBoundaryCoords<float>(float coordBuffer[]) const; template int Tessellation::GetBoundaryCoords<double>(double coordBuffer[]) const; template int Tessellation::GetInteriorCoords<float>(float coordBuffer[]) const; template int Tessellation::GetInteriorCoords<double>(double coordBuffer[]) const; template int Tessellation::GetEdgeCoords<float>(int edge, float coordBuffer[]) const; template int Tessellation::GetEdgeCoords<double>(int edge, double coordBuffer[]) const; } // end namespace Bfr } // end namespace OPENSUBDIV_VERSION } // end namespace OpenSubdiv
[ "syoyo@lighttransport.com" ]
syoyo@lighttransport.com
67d9ee4621a0661c22b43b85ca932175db36b2bf
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5706278382862336_1/C++/AlphardWang/A.cpp
68276b803e1887079049bfcb84369dd976d40f10
[]
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
938
cpp
#include <cstdio> using namespace std; inline long long GCD(long long a, long long b) { long long t; while (a > 0) { t = b % a; b = a; a = t; } return b; } inline bool is2m(long long a) { long long one = 1; while ((a & one) == 0) { a >>= 1; } return a == 1; } int main() { int T; scanf("%d", &T); long long p, q; for (int ca = 1; ca <= T; ++ ca) { scanf("%lld/%lld", &p, &q); printf("Case #%d: ", ca); long long g = GCD(p, q); if (g > 1) { p /= g; q /= g; } if (!is2m(q)) { printf("impossible\n"); } else { int k = 0; int j = 0; while (p > 1) { ++ k; p >>= 1; } while (q > 1) { q >>= 1; ++ j; } if (j > 40) { printf("impossible\n"); } else { printf("%d\n", j - k); } } } return 0; }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
4bcf833cd72daa11cccfb88fb9fcf215479b195c
0297fea81f5e8c09dee6c3777f0f45567f710e02
/juice9000/mrav.h
0e8c291ecd4d230c53986f6ddf77cd0c9f132f44
[]
no_license
medoocs/Ant-colony-simulator
c51bfb7c1e2626ddfaaa5a58623bab6034941328
656fdc955373979b0f73e2682a10fef79ea8baf8
refs/heads/master
2023-08-14T17:17:08.142978
2021-10-21T10:41:54
2021-10-21T10:41:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
788
h
#pragma once #include <SFML/Graphics.hpp> #include "food.h" #include <vector> class Mrav{ private: uint32_t id; sf::Texture tMrav; sf::Vector2f position, velocity, desiredDirection; bool flag = true, foundFood = false, foundHome = false; sf::Sprite sMrav; public: // konstruktor za napravit sprite i settat varijable Mrav(uint32_t idM); ~Mrav() = default; // funkcija za micanje mrava void move(sf::Time dt, sf::RenderWindow& window, std::vector<Food>& hrana, std::vector<Mrav>& mravi, int &pojeli); // vraca sprite sf::Sprite getSprite(); // kolizija sa food void checkFood(std::vector<Food>& hrana); // kolizija za home void checkHome(int &pojeli); };
[ "nikoja.med@gmail.com" ]
nikoja.med@gmail.com
f2a03480ffe228ede84446e2fb1085d70bc7d6ce
a7764174fb0351ea666faa9f3b5dfe304390a011
/inc/Handle_StepGeom_OrientedSurface.hxx
f87cc3cfacb28e35e243c3359dae2a9972f363ce
[]
no_license
uel-dataexchange/Opencascade_uel
f7123943e9d8124f4fa67579e3cd3f85cfe52d91
06ec93d238d3e3ea2881ff44ba8c21cf870435cd
refs/heads/master
2022-11-16T07:40:30.837854
2020-07-08T01:56:37
2020-07-08T01:56:37
276,290,778
0
0
null
null
null
null
UTF-8
C++
false
false
833
hxx
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Handle_StepGeom_OrientedSurface_HeaderFile #define _Handle_StepGeom_OrientedSurface_HeaderFile #ifndef _Standard_HeaderFile #include <Standard.hxx> #endif #ifndef _Standard_DefineHandle_HeaderFile #include <Standard_DefineHandle.hxx> #endif #ifndef _Handle_StepGeom_Surface_HeaderFile #include <Handle_StepGeom_Surface.hxx> #endif class Standard_Transient; class Handle(Standard_Type); class Handle(StepGeom_Surface); class StepGeom_OrientedSurface; DEFINE_STANDARD_HANDLE(StepGeom_OrientedSurface,StepGeom_Surface) #endif
[ "shoka.sho2@excel.co.jp" ]
shoka.sho2@excel.co.jp
7453848544fce41400b6003ebda32b071b35d1cf
cb7ac15343e3b38303334f060cf658e87946c951
/source/runtime/D3D11RHI/D3D11Buffer.cpp
5b87462932bf7b93aa2541d7588453b8a4624a25
[]
no_license
523793658/Air2.0
ac07e33273454442936ce2174010ecd287888757
9e04d3729a9ce1ee214b58c2296188ec8bf69057
refs/heads/master
2021-11-10T16:08:51.077092
2021-11-04T13:11:59
2021-11-04T13:11:59
178,317,006
1
0
null
null
null
null
UTF-8
C++
false
false
1,499
cpp
#include "D3D11Buffer.h" #include "D3D11DynamicRHI.h" namespace Air { void* D3D11DynamicBuffer::lock(uint32 size) { BOOST_ASSERT(mlockedBufferIndex == -1 && mBuffers.size() > 0); int32 bufferIndex = 0; int32 numBuffers = mBuffers.size(); while (bufferIndex < numBuffers && mBufferSizes[bufferIndex] < size) { bufferIndex++; } if (bufferIndex == numBuffers) { bufferIndex--; TRefCountPtr<ID3D11Buffer> buffer; D3D11_BUFFER_DESC desc; ZeroMemory(&desc, sizeof(D3D11_BUFFER_DESC)); desc.Usage = D3D11_USAGE_DYNAMIC; desc.BindFlags = mBindFlags; desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; desc.MiscFlags = 0; desc.ByteWidth = size; VERIFYD3D11RESULT_EX(mD3DRHI->getDevice()->CreateBuffer(&desc, NULL, buffer.getInitReference()), mD3DRHI->getDevice()); updateBufferStats(mBuffers[bufferIndex], false); updateBufferStats(buffer, true); mBuffers[bufferIndex] = buffer; mBufferSizes[bufferIndex] = size; } mlockedBufferIndex = bufferIndex; D3D11_MAPPED_SUBRESOURCE mappedSubresource; VERIFYD3D11RESULT_EX(mD3DRHI->getDeviceContext()->Map(mBuffers[bufferIndex], 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedSubresource), mD3DRHI->getDevice()); return mappedSubresource.pData; } ID3D11Buffer* D3D11DynamicBuffer::unlock() { BOOST_ASSERT(mlockedBufferIndex != -1); ID3D11Buffer* lockedBuffer = mBuffers[mlockedBufferIndex]; mD3DRHI->getDeviceContext()->Unmap(lockedBuffer, 0); mlockedBufferIndex = -1; return lockedBuffer; } }
[ "523793658@qq.com" ]
523793658@qq.com
3336024e83bf0d836952f912025d04909fc55113
91a882547e393d4c4946a6c2c99186b5f72122dd
/Source/XPSP1/NT/multimedia/danim/src/appel/server/statics2.cpp
3059c79e6d860817a284c16eb0aa42b8150244a9
[]
no_license
IAmAnubhavSaini/cryptoAlgorithm-nt5src
94f9b46f101b983954ac6e453d0cf8d02aa76fc7
d9e1cdeec650b9d6d3ce63f9f0abe50dabfaf9e2
refs/heads/master
2023-09-02T10:14:14.795579
2021-11-20T13:47:06
2021-11-20T13:47:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
19,264
cpp
/******************************************************************************* Copyright (c) 1995-1998 Microsoft Corporation. All rights reserved. Second file with methods on statics *******************************************************************************/ #include "headers.h" #include "srvprims.h" #include "results.h" #include "comcb.h" #include "statics.h" #include "context.h" #include <DXTrans.h> #include "privinc/util.h" #include "privinc/geomi.h" STDMETHODIMP CDAStatics::ImportGeometryWrapped( LPOLESTR url, LONG wrapType, double originX, double originY, double originZ, double zAxisX, double zAxisY, double zAxisZ, double yAxisX, double yAxisY, double yAxisZ, double texOriginX, double texOriginY, double texScaleX, double texScaleY, DWORD flags, IDAGeometry **bvr) { TraceTag((tagCOMEntry, "CDAStatics::ImportGeometryWrapped(%lx)", this)); PRIMPRECODE1(bvr); CRGeometryPtr geo; DAComPtr<IBindHost> bh(GetBindHost(), false); DWORD id; id = CRImportGeometryWrapped(GetURLOfClientSite(), url, this, bh, NULL, &geo, NULL, NULL, NULL, wrapType, originX, originY, originZ, zAxisX, zAxisY, zAxisZ, yAxisX, yAxisY, yAxisZ, texOriginX, texOriginY, texScaleX, texScaleY, flags); if (id) { CreateCBvr(IID_IDAGeometry, (CRBvrPtr) geo, (void **) bvr); } PRIMPOSTCODE1(bvr); } STDMETHODIMP CDAStatics::ImportGeometryWrappedAsync( LPOLESTR url, LONG wrapType, double originX, double originY, double originZ, double zAxisX, double zAxisY, double zAxisZ, double yAxisX, double yAxisY, double yAxisZ, double texOriginX, double texOriginY, double texScaleX, double texScaleY, DWORD flags, IDAGeometry *pGeoStandIn, IDAImportationResult **ppResult) { TraceTag((tagCOMEntry, "CDAStatics::ImportGeometryWrappedAsync(%lx)", this)); PRIMPRECODE1(ppResult); DAComPtr<IBindHost> bh(GetBindHost(), false); MAKE_BVR_TYPE_NAME(CRGeometryPtr, geostandin, pGeoStandIn); CRGeometryPtr pGeometry; CREventPtr pEvent; CRNumberPtr pProgress; CRNumberPtr pSize; DWORD id; id = CRImportGeometryWrapped(GetURLOfClientSite(), url, this, bh, geostandin, &pGeometry, &pEvent, &pProgress, &pSize, wrapType, originX, originY, originZ, zAxisX, zAxisY, zAxisZ, yAxisX, yAxisY, yAxisZ, texOriginX, texOriginY, texScaleX, texScaleY, flags); if (id) { CDAImportationResult::Create(NULL, NULL, pGeometry, NULL, pEvent, pProgress, pSize, ppResult); } PRIMPOSTCODE1(ppResult); } STDMETHODIMP CDAStatics::ImportDirect3DRMVisual ( IUnknown *visual, IDAGeometry **bvr) { TraceTag((tagCOMEntry, "CDAStatics::ImportDirect3DRMVisual(%lx)", this)); PRIMPRECODE1(bvr) ; CHECK_RETURN_NULL(visual); CRGeometryPtr geo; geo = CRImportDirect3DRMVisual (visual); if (geo) { CreateCBvr(IID_IDAGeometry, (CRBvrPtr) geo, (void **) bvr) ; } PRIMPOSTCODE1(bvr) ; } STDMETHODIMP CDAStatics::ImportDirect3DRMVisualWrapped ( IUnknown *visual, LONG wrapType, double originX, double originY, double originZ, double zAxisX, double zAxisY, double zAxisZ, double yAxisX, double yAxisY, double yAxisZ, double texOriginX, double texOriginY, double texScaleX, double texScaleY, DWORD flags, IDAGeometry **bvr) { TraceTag((tagCOMEntry, "CDAStatics::ImportDirect3DRMVisualWrapped(%lx)", this)); PRIMPRECODE1(bvr) ; CHECK_RETURN_NULL(visual); CRGeometryPtr geo; geo = CRImportDirect3DRMVisualWrapped ( visual, wrapType, originX, originY, originZ, zAxisX, zAxisY, zAxisZ, yAxisX, yAxisY, yAxisZ, texOriginX, texOriginY, texScaleX, texScaleY, flags ); if (geo) { CreateCBvr(IID_IDAGeometry, (CRBvrPtr) geo, (void **) bvr) ; } PRIMPOSTCODE1(bvr) ; } void CreateTransformHelper(IUnknown *theXfAsUnknown, LONG numInputs, CRBvrPtr *inputs, CRBvrPtr evaluator, IOleClientSite *clientSite, IDADXTransformResult **ppResult) { HRESULT hr; CRDXTransformResultPtr xfResult = CRApplyDXTransform(theXfAsUnknown, numInputs, inputs, evaluator); if (xfResult) { // Set the bindhost on the transform if it'll accept it. DAComPtr<IDXTBindHost> bindHostObj; hr = theXfAsUnknown->QueryInterface(IID_IDXTBindHost, (void **)&bindHostObj); if (SUCCEEDED(hr) && clientSite) { DAComPtr<IServiceProvider> servProv; DAComPtr<IBindHost> bh; hr = clientSite->QueryInterface(IID_IServiceProvider, (void **)&servProv); if (SUCCEEDED(hr)) { hr = servProv->QueryService(SID_IBindHost, IID_IBindHost, (void**)&bh); if (SUCCEEDED(hr)) { hr = bindHostObj->SetBindHost(bh); // Harmless if this fails, just carry on. } } } DAComPtr<IDispatch> xf; hr = theXfAsUnknown->QueryInterface(IID_IDispatch, (void **)&xf); // This NULL-ing should happen automatically, but it doesn't // always work this way, so we do it here. if (FAILED(hr)) { xf.p = NULL; hr = S_OK; } hr = CDADXTransformResult::Create(xf, xfResult, ppResult); } } STDMETHODIMP CDAStatics::ApplyDXTransformEx(IUnknown *theXfAsUnknown, LONG numInputs, IDABehavior **inputs, IDANumber *evaluator, IDADXTransformResult **ppResult) { TraceTag((tagCOMEntry, "CDAStatics::ApplyDXTransformEx(%lx)", this)); PRIMPRECODE1(ppResult); // Grab client site, but don't do an add'l addref, as // GetClientSite() already does one. DAComPtr<IOleClientSite> cs(GetClientSite(), false); CRBvrPtr *bvrArray = CBvrsToBvrs(numInputs, inputs); if (bvrArray == NULL) goto done; CRBvrPtr evalBvr; if (evaluator) { evalBvr = ::GetBvr(evaluator); if (evalBvr == NULL) goto done; } else { evalBvr = NULL; } CreateTransformHelper(theXfAsUnknown, numInputs, bvrArray, evalBvr, cs, ppResult); PRIMPOSTCODE1(ppResult); } #define IS_VARTYPE(x,vt) ((V_VT(x) & VT_TYPEMASK) == (vt)) #define IS_VARIANT(x) IS_VARTYPE(x,VT_VARIANT) #define GET_VT(x) (V_VT(x) & VT_TYPEMASK) // Grabbed mostly from cbvr.cpp:SafeArrayAccessor::SafeArrayAccessor(). bool GrabBvrFromVariant(VARIANT v, CRBvrPtr *res) { CRBvrPtr evalBvr = NULL; HRESULT hr = S_OK; VARIANT *pVar; if (V_ISBYREF(&v) && !V_ISARRAY(&v) && IS_VARIANT(&v)) pVar = V_VARIANTREF(&v); else pVar = &v; if (IS_VARTYPE(pVar, VT_EMPTY) || IS_VARTYPE(pVar, VT_NULL)) { evalBvr = NULL; } else if (IS_VARTYPE(pVar, VT_DISPATCH)) { IDispatch *pdisp; if (V_ISBYREF(pVar)) { pdisp = *V_DISPATCHREF(pVar); } else { pdisp = V_DISPATCH(pVar); } DAComPtr<IDANumber> evalNum; hr = pdisp->QueryInterface(IID_IDANumber, (void **)&evalNum); if (FAILED(hr)) { CRSetLastError(E_INVALIDARG, NULL); } else { evalBvr = ::GetBvr(evalNum); } } else { CRSetLastError(E_INVALIDARG, NULL); evalBvr = NULL; hr = E_INVALIDARG; } *res = evalBvr; return SUCCEEDED(hr); } STDMETHODIMP CDAStatics::ApplyDXTransform(VARIANT varXf, VARIANT inputs, VARIANT evalVariant, IDADXTransformResult **ppResult) { TraceTag((tagCOMEntry, "CDAStatics::ApplyDXTransform(%lx)", this)); DAComPtr<IUnknown> punk; PRIMPRECODE1(ppResult); CComVariant var; HRESULT hr = var.ChangeType(VT_BSTR, &varXf); if (SUCCEEDED(hr)) { CLSID clsid; Assert(var.vt == VT_BSTR); // Extract out clsid from string and try to cocreate on it. hr = CLSIDFromString(V_BSTR(&var), &clsid); if (FAILED(hr)) { TraceTag((tagError, "CDAStatics::ApplyDXTransform(%lx) - CLSIDFromString() failed", this)); RaiseException_UserError(hr, IDS_ERR_EXTEND_DXTRANSFORM_CLSID_FAIL); } // cocreate on clsid hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&punk); if (FAILED(hr)) { TraceTag((tagError, "CDAStatics::ApplyDXTransform(%lx) - CoCreateInstance() failed", this)); RaiseException_UserError(hr, IDS_ERR_EXTEND_DXTRANSFORM_FAILED_LOAD, V_BSTR(&var)); } } else { hr = var.ChangeType(VT_UNKNOWN, &varXf); if (SUCCEEDED(hr)) { punk = var.punkVal; } else { TraceTag((tagError, "CDAStatics::ApplyDXTransform(%lx) - invalidarg", this)); RaiseException_UserError(E_INVALIDARG, IDS_ERR_INVALIDARG); } } // Use NULL for type info, since this may be a heterogenous list SafeArrayAccessor inputSA(inputs, false, CRUNKNOWN_TYPEID, true, true); if (!inputSA.IsOK()) return Error(); CRBvrPtr *inputBvrs = inputSA.ToBvrArray((CRBvrPtr *)_alloca(inputSA.GetNumObjects() * sizeof(CRBvrPtr))); if (inputBvrs==NULL) return Error(); CRBvrPtr evalBvr; if (GrabBvrFromVariant(evalVariant, &evalBvr)) { CreateTransformHelper(punk, inputSA.GetNumObjects(), inputBvrs, evalBvr, GetClientSite(), ppResult); } else { return Error(); } PRIMPOSTCODE1(ppResult); } STDMETHODIMP CDAStatics::ModifiableNumber(double initVal, IDANumber **ppResult) { PRIMPRECODE1(ppResult); CreateCBvr(IID_IDANumber, (CRBvrPtr) CRModifiableNumber(initVal), (void **)ppResult); PRIMPOSTCODE1(ppResult); } STDMETHODIMP CDAStatics::ModifiableString(BSTR initVal, IDAString **ppResult) { TraceTag((tagCOMEntry, "CDAStatics::ModifiableString(%lx)", this)); PRIMPRECODE1(ppResult); CreateCBvr(IID_IDAString, (CRBvrPtr) CRModifiableString(initVal), (void **)ppResult); PRIMPOSTCODE1(ppResult); } STDMETHODIMP CDAStatics::get_ModifiableBehaviorFlags(DWORD * pdwFlags) { TraceTag((tagCOMEntry, "CDAStatics::get_ModifiableBehaviorFlags(%lx)", this)); CHECK_RETURN_NULL(pdwFlags); CritSectGrabber csg(_cs); *pdwFlags = _dwModBvrFlags; return S_OK; } STDMETHODIMP CDAStatics::put_ModifiableBehaviorFlags(DWORD dwFlags) { TraceTag((tagCOMEntry, "CDAStatics::put_ModifiableBehaviorFlags(%lx)", this)); CritSectGrabber csg(_cs); _dwModBvrFlags = dwFlags; return S_OK; } /***************************************************************************** The TriMesh parameters are variant arrays, and should be able to accomodate several types of elements. 'positions' should handle arrays of Point3 or floating-point triples (either 4-byte or 8-byte floats). Similarly, 'normals' should handle arrays of Vector3 or float triples, and UVs should handle arrays of Point2 or float tuples. *****************************************************************************/ STDMETHODIMP CDAStatics::TriMesh ( int nTriangles, // Number of Triangles in Mesh VARIANT positions, // Array of Vertex Positions VARIANT normals, // Array of Vertex Normals VARIANT UVs, // Array of Vertex Surface Coordiantes VARIANT indices, // Array of Triangle Vertex Indices IDAGeometry **result) // Resultant TriMesh Geometry { TraceTag((tagCOMEntry, "CDAStatics::TriMesh(%lx)", this)); PRIMPRECODE1 (result); bool errorflag = true; CRBvr *trimesh = NULL; // The TriMeshData object is used to hold all of the information necessary // to create the trimesh. TriMeshData tm; tm.numTris = nTriangles; // Extract the trimesh indices array. This can either be null or an array // of 32-bit integers. SafeArrayAccessor sa_indices (indices, false, CRNUMBER_TYPEID, true); if (!sa_indices.IsOK()) goto cleanup; tm.numIndices = static_cast<int> (sa_indices.GetNumObjects()); tm.indices = sa_indices.ToIntArray(); if ((tm.numIndices > 0) && !tm.indices) { DASetLastError (DISP_E_TYPEMISMATCH, IDS_ERR_GEO_TMESH_BAD_INDICES); goto cleanup; } // Extract the trimesh vertex positions. These can be a variant array of // either floats, doubles, or Point3's. The SrvArrayBvr() call below will // map doubles and floats to an array of floats, or it will return a // pointer to an array behavior (of Point3's). unsigned int count; // Number of non-behavior elements returned. CRArrayPtr bvrs; // Array of Behaviors void *floats; // Array of Floats bvrs = SrvArrayBvr (positions, false, CRPOINT3_TYPEID, 0, ARRAYFILL_FLOAT, &floats, &count); tm.vPosFloat = static_cast<float*> (floats); Assert (!(bvrs && tm.vPosFloat)); // Expect only one to be non-null. if (bvrs) tm.numPos = (int) ArrayExtractElements (bvrs, tm.vPosPoint3); else if (tm.vPosFloat) tm.numPos = (int) count; else goto cleanup; // Extract the vertex normals. As for positions, this can be a variant // array of floats, doubles, or Vector3's. bvrs = SrvArrayBvr (normals, false, CRVECTOR3_TYPEID, 0, ARRAYFILL_FLOAT, &floats, &count); tm.vNormFloat = static_cast<float*> (floats); Assert (! (bvrs && tm.vNormFloat)); // Expect only one to be non-null. if (bvrs) tm.numNorm = (int) ArrayExtractElements (bvrs, tm.vNormVector3); else if (tm.vPosFloat) tm.numNorm = (int) count; else goto cleanup; // Extract the vertex surface coordinates. This variant array can be // floats, doubles, or Point2's. bvrs = SrvArrayBvr (UVs, false, CRPOINT2_TYPEID, 0, ARRAYFILL_FLOAT, &floats, &count); tm.vUVFloat = static_cast<float*> (floats); Assert (! (bvrs && tm.vUVFloat)); // Expect only one to be non-null. if (bvrs) tm.numUV = (int) ArrayExtractElements (bvrs, tm.vUVPoint2); else if (tm.vUVFloat) tm.numUV = (int) count; else goto cleanup; // Create the resulting trimesh. trimesh = CRTriMesh (tm); if (trimesh && CreateCBvr(IID_IDAGeometry, trimesh, (void **)result)) errorflag = false; cleanup: // All of the scalar arrays passed in were allocated with system memory // in the extractions above. Now that we've created the trimesh we can // release the memory here. if (tm.vPosFloat) delete tm.vPosFloat; if (tm.vNormFloat) delete tm.vNormFloat; if (tm.vUVFloat) delete tm.vUVFloat; if (tm.indices) delete tm.indices; if (errorflag) return Error(); PRIMPOSTCODE1 (result); } STDMETHODIMP CDAStatics::TriMeshEx ( int nTriangles, // Number of Triangles in Mesh int nPositions, // Number of Vertex Positions float positions[], // Array of Vertex Positions int nNormals, // Number of Vertex Normals float normals[], // Array of Vertex Normals int nUVs, // Number of Vertex Surface Coordinates float UVs[], // Array of Vertex Surface Coordinates int nIndices, // Number of Triangle Vertex Indices int indices[], // Array of Triangle Vertex Indices IDAGeometry **result) // Resultant TriMesh Geometry { TraceTag((tagCOMEntry, "CDAStatics::TriMesh(%lx)", this)); PRIMPRECODE1 (result); TriMeshData tm; tm.numTris = nTriangles; tm.numIndices = nIndices; tm.indices = indices; tm.numPos = nPositions; tm.vPosFloat = positions; tm.numNorm = nNormals; tm.vNormFloat = normals; tm.numUV = nUVs; tm.vUVFloat = UVs; CreateCBvr (IID_IDAGeometry, ::CRTriMesh(tm), (void**)result); PRIMPOSTCODE1 (result); }
[ "support@cryptoalgo.cf" ]
support@cryptoalgo.cf
81849a3ef43b734524484d9525bfae966547a259
7042dd8b567f30d926f682907f5b2f53f93e8980
/winxsamp/samples/mfc-port/DimEditCtrl/hello.cpp
1e61d7ebc39226dc6f512e71b66dda1feedfd2ee
[]
no_license
xushiwei/winx
9e02558ddbb4f873119c172f186f06730b93092d
83f6b65193137e9ec08644a4391dfc96c0969313
refs/heads/master
2020-12-24T22:29:36.717051
2018-04-20T11:57:26
2018-04-20T11:57:26
2,092,114
1
1
null
null
null
null
UTF-8
C++
false
false
2,567
cpp
/* ------------------------------------------------------------------------- // WINX: a C++ template GUI library - MOST SIMPLE BUT EFFECTIVE // // This file is a part of the WINX Library. // The use and distribution terms for this software are covered by the // Common Public License 1.0 (http://opensource.org/licenses/cpl.php) // which can be found in the file CPL.txt at this distribution. By using // this software in any fashion, you are agreeing to be bound by the terms // of this license. You must not remove this notice, or any other, from // this software. // // Module: hello.cpp // Creator: xushiwei // Email: xushiweizh@gmail.com // Date: 2006-8-19 18:26:15 // // $Id: hello.cpp,v 1.1 2006/09/16 18:08:23 xushiwei Exp $ // -----------------------------------------------------------------------*/ #include <winx.h> #include <winx/ext/DimEditCtrl.h> #include "resource.h" // ------------------------------------------------------------------------- // CHelloDlg class CHelloDlg : public winx::ModelDialog<CHelloDlg, IDD_DIMEDIT_DIALOG> { WINX_ICON(IDR_MAINFRAME); WINX_REFLECT(); winx::DimEditCtrl* m_decHint; winx::DimEditCtrl* m_decPassword; winx::DimEditCtrl* m_decUsername; public: BOOL OnInitDialog(HWND hDlg, HWND hWndDefaultFocus) { winx::SubclassDlgItem(&m_decUsername, hDlg, IDC_EDIT1); winx::SubclassDlgItem(&m_decPassword, hDlg, IDC_EDIT2); winx::SubclassDlgItem(&m_decHint, hDlg, IDC_EDIT3); // // Set Text Limits... // m_decUsername->LimitText( 32 ); m_decPassword->LimitText( 32 ); m_decHint->LimitText( 128 ); // // Set Dim Text... // m_decUsername->SetDimText( _T( "Username Required (Max 32 Characters)" ) ); m_decPassword->SetDimText( _T( "Password Required (Max 32 Characters)" ) ); m_decHint->SetDimText( _T( "Hint Optional (Max 128 Characters)" ) ); // // Override Dim Colors For Two Controos... // m_decUsername->SetDimColor( RGB( 0xFF, 0x80, 0x80 ) ); m_decPassword->SetDimColor( RGB( 0xFF, 0x80, 0x80 ) ); return TRUE; } }; // ------------------------------------------------------------------------- int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { InitCommonControls(); CHelloDlg dlg; dlg.DoModal(); return 0; } // ------------------------------------------------------------------------- // $Log: hello.cpp,v $ // Revision 1.1 2006/09/16 18:08:23 xushiwei // MFC-Port: // Demo - port MFC controls to WINX (DimEditCtrl) //
[ "xushiweizh@gmail.com" ]
xushiweizh@gmail.com
7067bf0efc002a8d536dc80fc3ce70f005035f93
6862dff7e2ebe05cad0142364a9a618801ffc636
/src/epubbook.h
8bd2a3467e86797f504a25c362dd3debb19d2a73
[]
no_license
iamzko/epub_process
419292746d57205f739097f458056ae64de0870d
adabf05f820f4793120b0bb1b2c0207ea1cfb697
refs/heads/master
2023-07-27T03:17:29.771811
2021-09-13T02:58:51
2021-09-13T02:58:51
405,814,347
0
0
null
null
null
null
UTF-8
C++
false
false
2,676
h
#ifndef EPUBBOOK_H #define EPUBBOOK_H #include <QDebug> #include <QDir> #include <QDomDocument> #include <QDomNode> #include <QFileInfo> #include <QList> #include <QObject> #include <QScopedPointer> #include <QTemporaryDir> #include <algorithm> #define BUFF_SIZE 8192 #include "unzip.h" #ifdef _WIN32 #include "iowin32.h" #endif #include "QCodePage437Codec.h" #define EPUB_BOOK_RETRUN(x) {m_last_state=(x);return m_last_state;} static QCodePage437Codec *cp437 = 0; static const QString EPUB_SUFFIX = u8".epub"; static const QString EPUB_CONTAINER_PATH = u8"/META-INF/container.xml"; static const QString BACK_SLASH = u8"\\"; static const QString SLASH = u8"/"; static const QString OEBPS_MIMETYPE = "application/oebps-package+xml"; static const QString EPUB_STRUCTURE_OPF = "OPF"; class EpubBook : public QObject { Q_OBJECT enum class EPUB_STATE { ERROR_PATH_NULL, ERROR_FILE_MISS, ERROR_PATH_CORRUPT, ERROR_WRONG_SUFFIX, ERROR_CANNOT_EXTRACT, ERROR_EPUB_CONTAINER, ERROR_EPUB_CONTAINER_CONTENT, ERROR_EPUB_OPF_MISS, ERROR_EPUB_OPF_NUM, ERROR_EPUB_OPF, ERROR_UNZIP, OK, }; public: explicit EpubBook(QObject *parent = nullptr); QString get_last_error(); EPUB_STATE open(QString &epub_path); QMap<QString, QString> get_the_meta_data_map() const; QString getCopyritht_content() const; private: EPUB_STATE extract(); EPUB_STATE process_opf(); EPUB_STATE process_container(); EPUB_STATE process_ncx(); EPUB_STATE locate_copyright_page(); QString make_target_dir(); void read_metadata_element(QDomNode node); void read_manifest_element(QDomNode node); void read_spine_element(QDomNode node); signals: private: QString m_epub_version; //EPUB version QString m_unique_id; QString m_unique_value; QString m_epub_temp_dir; //the target dir for unzip epub QString m_epub_name;//the epub file name QString m_epub_book_path;//the epub file path QString m_epub_opf_file_path; EPUB_STATE m_last_state;//the epub process state QScopedPointer<QTemporaryDir> m_epub_temp_folder; QList<QString> m_epub_container_file_list; QMap<QString,QList<QString>> m_epub_file_structure_map;// QMap<QString, QString> m_id_path_map; //id和文件路径表 QMap<QString, QString> m_id_mimetype_map; //id和文件类型表 QMap<QString, QString> m_catalogue_map; //目录表 QList<QString> m_spine_list; //epub内容文件阅读的顺序列表 QMap<QString, QString> m_meta_data_map; //epub元数据表 QString m_copyritht_content; }; #endif // EPUBBOOK_H
[ "iamzko@126.com" ]
iamzko@126.com
b3d3b288ada6ec8232d302fdc6b02e3ea9079abf
dd9b4d4a84ea2bd6f366b9da3d37020144f395c2
/B. Symmetric Matrix/main.cpp
9ce428a63b170b4be194c407c2127465d820b6f3
[]
no_license
meet2mky/Codeforces-Practice
518445b495f7d3b95815c740ee494269fe16542e
a03d224cef951c2e0d7a372f11cd8a09e0235e74
refs/heads/master
2022-12-31T13:13:30.326258
2020-10-25T15:49:30
2020-10-25T15:49:30
289,495,056
1
0
null
null
null
null
UTF-8
C++
false
false
3,936
cpp
/***************************************************************** IN GOD WE TRUST !! Author:- meet2mky Date: - Problem:- Institue:- NITA ******************************************************************/ #include <iostream> #include <bitset> #include <map> #include <unordered_map> #include <vector> #include <cstring> #include <set> #include <utility> #include <algorithm> #include <queue> #include <cmath> #include <cassert> #include <cctype> #include <iomanip> #include <stack> #include <ctime> #include <iterator> #include <sstream> using namespace std; #define sync \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define REP(i, a, b) for (int i = (a); i < (b); i++) #define REPR(i, a, b) for (int i = (a); i > (b); i--) #define ALL(x) (x).begin(), (x).end() #define SETALL(x, val) fill(all(x), val) #define SORT_UNIQUE(c) (sort(c.begin(), c.end()), c.resize(distance(c.begin(), unique(c.begin(), c.end())))) #define SORT(a) (sort(ALL(a))) #define SORTR(a) (SORT(a), reverse(ALL(a))) #define SQUARE(x) ((x) * (x)) #define CUBE(x) ((x) * (x) * (x)) #define ODD(x) (x & 1) #define EVEN(x) (!(x & 1)) #define PB push_back #define F first #define S second #define VB vector<bool> #define VI vector<int> #define VVI vector<vi> #define PII pair<int, int> #define SP(x) setprecision(x) #define endl '\n' #define LL long long #define LD long double #define SZ(z) (int)(z).size() #define INF 0x3f3f3f3f #define LINF 0x3f3f3f3f3f3f3f3f #define EPS 0.0000001 // eps = 1e-7 #define PI 3.141592653589793238 const int MOD = 1000000007; template <class T> void _R(T &x) { cin >> x; } void _R(int &x) { cin >> x; } void _R(int64_t &x) { cin >> x; } void _R(double &x) { cin >> x; } void _R(long double &x) { cin >> x; } void _R(char &x) { cin >> x; } void _R(char *x) { cin >> x; } void _R(string &x) { cin >> x; } void R() {} template <class T, class... U> void R(T &head, U &... tail) { _R(head); R(tail...); } template <class T> void _W(const T &x) { cout << x; } void _W(const int &x) { cout << x; } void _W(const int64_t &x) { cout << x; } void _W(const double &x) { cout << fixed << SP(8) << x; } void _W(const long double &x) { cout << fixed << SP(16) << x; } void _W(const char &x) { cout << x; } void _W(const char *x) { cout << x; } void _W(const string &x) { cout << x; } template <class T, class U> void _W(const pair<T, U> &x) { _W(x.F); cout << ' '; _W(x.S); } template <class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) cout << ' '; } void W() {} template <class T, class... U> void W(const T &head, const U &... tail) { _W(head); cout << (sizeof...(tail) ? ' ' : '\n'); W(tail...); } #ifndef ONLINE_JUDGE #define DEBUG(...) \ cout << "[DEBUG] "; \ W(__VA_ARGS__); #else #define DEBUG(...) #endif //#define NEEDLONG #ifdef NEEDLONG #define int long long #endif /***************************************************************** Read the problem carefully!! Take inputs carefully Care for array index out of bound errors Check for overflow Divide the problem in several parts if possible Keep Calm and believe on yourself. Do not panic & work hard you will get it right one day LOOP ITERATORS MIXING ~ WASTE OF TIME AND LOTS OF BUG ******************************************************************/ void solve() { int n, m; R(n, m); int a, b, c, d; int ok = false; REP(i, 0, n) { R(a, b, c, d); if (b == c) ok = true; } if (ok && EVEN(m)) { W("YES"); } else { W("NO"); } } signed main() { sync; #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t = 1; cin >> t; for (int testcase = 1; testcase <= t; testcase++) { solve(); } return 0; }
[ "meet2mky@gmail.com" ]
meet2mky@gmail.com
c2153f7a5a99a0e3e553d687b6c1b80b84f5986c
427f0a8fae72bcafcafeaa5a62d0fdc1203b7df4
/MinimaxAI.h
53192a78cc8b8c96165fd5c2cbdd5430f514dfc7
[]
no_license
ykozxy/Gomoku-cpp
91cccffe2d8ce85a9d4dd86bd8af850a1eb1a650
b956967dbe1117a17343ba66789039dbd37706de
refs/heads/master
2023-08-12T12:47:48.780012
2021-10-07T05:47:45
2021-10-07T05:47:45
413,606,697
6
0
null
null
null
null
UTF-8
C++
false
false
740
h
#ifndef GOMOKU_MINIMAXAI_H #define GOMOKU_MINIMAXAI_H #include <string> #include "constants.h" #include "Board.h" class MinimaxAI { public: MinimaxAI(Board *board, Chess identity, float weight = 0.5, int pruneLimit = 20) : m_board(board), m_identity(identity), m_weight(weight), m_pruneLimit(pruneLimit), m_breakout(false) {} Point calculate(std::string *buff = nullptr); private: float m_weight; bool m_breakout; int m_pruneLimit; Board *m_board; Chess m_identity; std::chrono::time_point<Clock> startT; int miniMaxWrapper(int depth, Point *candidates, int n); int miniMaxSearch(int depth, int alpha, int beta, Chess player, bool checkmateOnly); }; #endif //GOMOKU_MINIMAXAI_H
[ "nick_zhouxy@outlook.com" ]
nick_zhouxy@outlook.com