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
85f628cca5e31f76b28b97eee0711377277f488f
bb6ebff7a7f6140903d37905c350954ff6599091
/chrome/browser/ui/ash/accessibility/automation_manager_ash.h
4ad089c9c0cf6b7a4b5e948f5485244662bb5a4b
[ "BSD-3-Clause" ]
permissive
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
faa6602bd6bfd9b9b6277ce3cd16df0bd26e7f2f
ccadf4e63dd34be157281f53fe213d09a8c66d2c
refs/heads/master
2022-12-23T18:07:04.568931
2016-04-11T16:03:36
2016-04-11T16:03:36
53,677,925
0
1
BSD-3-Clause
2022-12-09T23:46:46
2016-03-11T15:49:07
C++
UTF-8
C++
false
false
2,575
h
// Copyright 2014 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 CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AUTOMATION_MANAGER_ASH_H_ #define CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AUTOMATION_MANAGER_ASH_H_ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/extensions/api/automation_internal/automation_action_adapter.h" #include "chrome/browser/ui/ash/accessibility/ax_tree_source_ash.h" #include "ui/accessibility/ax_tree_serializer.h" template <typename T> struct DefaultSingletonTraits; namespace content { class BrowserContext; } // namespace content namespace views { class AXAuraObjWrapper; class View; } // namespace views // Manages a tree of automation nodes. class AutomationManagerAsh : public extensions::AutomationActionAdapter { public: // Get the single instance of this class. static AutomationManagerAsh* GetInstance(); // Enable automation support for views. void Enable(content::BrowserContext* context); // Disable automation support for views. void Disable(); // Handle an event fired upon a |View|. void HandleEvent(content::BrowserContext* context, views::View* view, ui::AXEvent event_type); // AutomationActionAdapter implementation. virtual void DoDefault(int32 id) OVERRIDE; virtual void Focus(int32 id) OVERRIDE; virtual void MakeVisible(int32 id) OVERRIDE; virtual void SetSelection(int32 id, int32 start, int32 end) OVERRIDE; protected: virtual ~AutomationManagerAsh(); private: friend struct DefaultSingletonTraits<AutomationManagerAsh>; AutomationManagerAsh(); // Reset all state in this manager. void Reset(); void SendEvent(content::BrowserContext* context, views::AXAuraObjWrapper* aura_obj, ui::AXEvent event_type); // Whether automation support for views is enabled. bool enabled_; // Holds the active views-based accessibility tree. A tree currently consists // of all views descendant to a |Widget| (see |AXTreeSourceViews|). // A tree becomes active when an event is fired on a descendant view. scoped_ptr <AXTreeSourceAsh> current_tree_; // Serializes incremental updates on the currently active tree // |current_tree_|. scoped_ptr<ui::AXTreeSerializer<views::AXAuraObjWrapper*> > current_tree_serializer_; DISALLOW_COPY_AND_ASSIGN(AutomationManagerAsh); }; #endif // CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AUTOMATION_MANAGER_ASH_H_
[ "mrobbeloth@pdiarm.com" ]
mrobbeloth@pdiarm.com
e82886e3cb69d56d7fb85cd308d3b5ffdb9d1556
671108efbc06a6876ddf3d49622ec2af9d2d82cf
/include/pearl/RmaGetEnd_rep.h
712dcdc99569022bdb6083daf41cc35770b6e5d7
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
chrispbradley/scalasca
d545e2ef7c5b22963b8a554ecb5c8ba63f648f66
0f2cfe259ca452cd7e4c0968cfcd9ee3ade9c769
refs/heads/master
2022-02-07T07:51:09.725785
2022-02-04T03:54:56
2022-02-04T03:54:56
68,554,738
0
0
null
2016-09-19T00:16:28
2016-09-19T00:16:27
null
UTF-8
C++
false
false
2,925
h
/**************************************************************************** ** SCALASCA http://www.scalasca.org/ ** ***************************************************************************** ** Copyright (c) 1998-2013 ** ** Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre ** ** ** ** Copyright (c) 2009-2013 ** ** German Research School for Simulation Sciences GmbH, ** ** Laboratory for Parallel Programming ** ** ** ** This software may be modified and distributed under the terms of ** ** a BSD-style license. See the COPYING file in the package base ** ** directory for details. ** ****************************************************************************/ #ifndef PEARL_RMAGETEND_REP_H #define PEARL_RMAGETEND_REP_H #include <pearl/Event_rep.h> /*-------------------------------------------------------------------------*/ /** * @file RmaGetEnd_rep.h * @ingroup PEARL_base * @brief Declaration of the class RmaGetEnd_rep. * * This header file provides the declaration of the class RmaGetEnd_rep. **/ /*-------------------------------------------------------------------------*/ namespace pearl { /*-------------------------------------------------------------------------*/ /** * @internal * * @class RmaGetEnd_rep * @ingroup PEARL_base * @brief %Event representation for RMA_GET_END events. **/ /*-------------------------------------------------------------------------*/ class PEARL_NOPAD_ATTR RmaGetEnd_rep : public Event_rep { public: /// @name Constructors & destructor /// @{ RmaGetEnd_rep(timestamp_t timestamp, uint32_t rma_id); RmaGetEnd_rep(const GlobalDefs& defs, Buffer& buffer); /// @} /// @name Event type information /// @{ virtual event_t getType() const; virtual bool isOfType(event_t type) const; /// @} /// @name Access event data /// @{ virtual uint32_t get_rma_id() const; /// @} protected: /// @name Serialize event data /// @{ virtual void pack(Buffer& buffer) const; /// @} /// @name Generate human-readable output of event data /// @{ virtual std::ostream& output(std::ostream& stream) const; /// @} private: /// RMA ID uint32_t m_rma_id; }; } // namespace pearl #endif // !PEARL_RMAGETEND_REP_H
[ "c.bradley@auckland.ac.nz" ]
c.bradley@auckland.ac.nz
9bc290dc02562cc968a3e62ded18fa9f53538fe2
b6ad8760d4b0261fa976a697d0c42954afd347fa
/expansion.h
60b0f7daa130269a38285021a47498fa56d36c58
[]
no_license
zmunkueva/task_5
51acbab04b8012bef58d6517a3d1111fd33cfae7
2ac7a654aba705ebaddaf91746c317c999bf7418
refs/heads/master
2020-11-27T22:18:35.911357
2019-12-22T20:15:25
2019-12-22T20:15:25
229,623,893
0
0
null
null
null
null
UTF-8
C++
false
false
414
h
#pragma once #include "pch.h" #include "chem_composition.h" #include <iostream> #include <vector> #include <algorithm> class expansion : public chem_composition { public: void type_of_ferroelectric() const override { cout << "type of ferroelectric: ferroelectric with a broad phase transition" << endl; } void form_of_phase() const override { cout << "form of phase transition: gentle\n" << endl; } };
[ "iamjenaless@gmail.com" ]
iamjenaless@gmail.com
440de8669c2aaca802d11476e3687127917b44c5
db5555a23f116e610d82053bfe8bf8759217e198
/resource/MediaInfo/mediainfo-code/.svn/pristine/44/440de8669c2aaca802d11476e3687127917b44c5.svn-base
deef034a31773adabd5e1f7ec72bd4d1932259f6
[]
no_license
SummerZm/leixiaohua1020.github.io
f9c4a64501e127a424fa94470e3e3f6bfb2ae526
2da2365365446eac94e6f7b9315c73e1e09604e7
refs/heads/master
2021-06-28T14:12:38.835812
2021-03-16T04:29:25
2021-03-16T04:29:25
225,857,652
0
0
null
2019-12-04T12:04:44
2019-12-04T12:04:43
null
UTF-8
C++
false
false
6,676
// File_Mpeg_Psi - Info for MPEG Stream files // Copyright (C) 2006-2010 MediaArea.net SARL, Info@MediaArea.net // // This library is free software: you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this library. If not, see <http://www.gnu.org/licenses/>. // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // // Information about MPEG files, Program Map Section // //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //--------------------------------------------------------------------------- #ifndef MediaInfo_Mpeg_PsiH #define MediaInfo_Mpeg_PsiH //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- #include "MediaInfo/File__Analyze.h" #include "MediaInfo/Multiple/File_Mpeg_Descriptors.h" #include <map> using namespace ZenLib; //--------------------------------------------------------------------------- namespace MediaInfoLib { //*************************************************************************** // Class File_Mpeg_Psi //*************************************************************************** class File_Mpeg_Psi : public File__Analyze { public : //In bool From_TS; complete_stream* Complete_Stream; int16u pid; public : File_Mpeg_Psi(); ~File_Mpeg_Psi(); private : //Buffer - Per element void Header_Parse(); void Data_Parse(); //Elements - Base void Table_reserved(); void Table_iso13818_6(); void Table_user_private(); void Table_forbidden(); //Elements - MPEG void program_stream_map(); //From PS void Table_00(); void Table_01(); void Table_02(); void Table_03(); void Table_04() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_05() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_06() {Skip_XX(Element_Size-Element_Offset, "Data");}; //Elements - DVB void Table_38() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_39() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_3A() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_3B() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_3C() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_3D() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_3E() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_3F() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_40(); void Table_41() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_42(); void Table_46(); void Table_4A() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_4E(); void Table_4F(); void Table_5F(); //50 --> 5F void Table_6F(); //60 --> 6F void Table_70(); void Table_71() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_72() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_73(); void Table_74() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_75() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_76() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_77() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_78() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_79() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_7E() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_7F(); //Elements - ASTC void Table_C0() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C1() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C2() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C3() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C4() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C5() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C6() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_C7(); void Table_C8() {Table_C9();}; void Table_C9(); void Table_CA(); void Table_CB(); void Table_CC(); void Table_CD(); void Table_CE() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_CF() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D0() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D1() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D2() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D3() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D4() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D5() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D6(); void Table_D7() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D8() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_D9() {Skip_XX(Element_Size-Element_Offset, "Data");}; void Table_DA() {Table_C9();}; void Table_FC(); void Table_FC_00(); void Table_FC_04(); void Table_FC_05(); void Table_FC_05_break_duration(); void Table_FC_05_splice_time(); void Table_FC_06(); void Table_FC_07(); //Helpers int16u Descriptors_Size; void Descriptors(); void ATSC_multiple_string_structure(Ztring &Value, const char* Info); Ztring Date_MJD(int16u Date); Ztring Time_BCD(int32u Time); //Data int32u CRC_32; int16u transport_stream_id; int16u table_id_extension; int16u elementary_PID; int16u program_number; int8u stream_type; int16u event_id; int8u pointer_field; int8u table_id; int8u version_number; bool current_next_indicator; bool section_syntax_indicator; bool elementary_PID_IsValid; bool program_number_IsValid; bool stream_type_IsValid; bool event_id_IsValid; }; } //NameSpace #endif
[ "1254551981@qq.com" ]
1254551981@qq.com
c59ea754f8fbba4c0c5b64632ec1df62d94b124c
c337ea311615f490a459c46e68af613b6263c572
/Bus Reservation/main.cpp
df52deb79197ec9be171ad368bb19f3a4d69d5d2
[]
no_license
farhan-syed/bus-reservation
0027e99c5f6e847f42799ff2529c6cd8ee7bf3da
2480523668a588169acb0a4c595de8dfe5c15e1b
refs/heads/master
2023-04-03T05:39:04.745853
2021-04-08T21:49:38
2021-04-08T21:49:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
274
cpp
// // main.cpp // Bus Reservation // // Created by Farhan Syed on 5/30/20. // Copyright © 2020 Farhan Syed. All rights reserved. // #include <fstream> #include <iostream> #include "menu.hpp" using namespace std; int main() { showMenu(); return 0; }
[ "farhan@Farhans-iMac.local" ]
farhan@Farhans-iMac.local
1764d0e26905475e10d82a3f3a57a58afd36d78c
6f6f890c5bcd3c090386ff746689488cb1c638ee
/Graphs/JumpingOnCloudsRevisited.cpp
a378f9ab8f6d41a3129d4957dbd7b722eccfe846
[]
no_license
sharnoor404/Competitive-Coding
3068a5dc989dadfced7a22d57f7fbb92839aeafe
5a9a66f1a4cdc78fdc3f454c7205e15aeed5b2bf
refs/heads/master
2022-12-14T19:26:59.447441
2020-09-03T07:42:35
2020-09-03T07:42:35
268,509,588
0
0
null
null
null
null
UTF-8
C++
false
false
302
cpp
/* Jumping on clouds revisited: Hackerrank */ int jumpingOnClouds(vector<int> c, int k) { int energyLevel=100; for(int i=0;i<c.size();i++){ energyLevel--; i=(i+k)%c.size(); if(c[i]==1){ energyLevel-=2; } if(i==0){ break; } i--; } return energyLevel; }
[ "sharnoor404@gmail.com" ]
sharnoor404@gmail.com
80448f4cf166d40794e03822778d30c2cc632339
60805f5904764782c5e16f6bf49266ec4acc2af1
/lib_eplayer/src/main/cpp/mediaplayer/android/com.eplayer.EasyMediaPlayer.cpp
af79e32d7ebc01cff9ed064ab76ec2eb3a23981d
[]
no_license
gaudiwen/EPlayer
57fb606571998178035c183a7cdfec0dbc92cbea
f4b0556f3dc9f1c77fb293c7a2274c02278c0652
refs/heads/master
2023-03-16T00:12:41.796886
2020-05-23T04:19:42
2020-05-23T04:19:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
27,200
cpp
#include <jni.h> #include <Mutex.h> #include <Condition.h> #include <Errors.h> #include <JNIHelp.h> #include <EMediaPlayer.h> #include <cstring> #include <cstdio> #include <memory.h> extern "C" { #include <libavcodec/jni.h> } const char *CLASS_NAME = "com/eplayer/EasyMediaPlayer"; // ------------------------------------------------------------------------------------------------- struct fields_t { jfieldID context; //c++层的easymediaplayer实例在java层的引用的id值 jmethodID post_event; //java层信息回调函数的函数ID }; //结构体引用,声明的时候已经分配好内存,不用手动分配和释放内存空间 static fields_t fields; static JavaVM *javaVM = NULL; static JNIEnv *getJNIEnv() { JNIEnv *env; //assert的作用是先计算()里面的表达式 ,若其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用abort来终止程序运行 assert(javaVM != NULL); //因为要通过GetEnv给指针env赋值,所以用&env,指针引用就是指针的指针 if (javaVM->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { return NULL; } return env; } // ------------------------------------------------------------------------------------------------- class JNIMediaPlayerListener : public MediaPlayerListener { public: JNIMediaPlayerListener(JNIEnv *env, jobject thiz, jobject weak_thiz); ~JNIMediaPlayerListener(); //后面用override,代表重写基类的虚函数 void notify(int msg, int ext1, int ext2, void *obj) override; private: //将无参构造函数设置为私有,不被外界调用 JNIMediaPlayerListener(); jclass mClass; //java层easymediaplayer类的class实例 //cpp层对java层的easymediaplayer实例的弱引用,因为是弱引用,所以当java层的实例要销毁即不再有强引用的时候,这个弱引用不会造成内存泄漏 //回调消息通知notify方法的时候,传递这个弱引用给java层,在java层再通过调用对应的方法通知消息 jobject mObject; }; //定义构造函数 JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv *env, jobject thiz, jobject weak_thiz) { // Hold onto the MediaPlayer class for use in calling the static method // that posts events to the application thread. //获取class对象,参数为java的对象实例 jclass clazz = env->GetObjectClass(thiz); if (clazz == NULL) { LOGE("Can't find com/eplayer/EMediaPlayer"); jniThrowException(env, "java/lang/Exception"); return; } //创建一个全局引用,不用时必须调用 DeleteGlobalRef() 方法释放,参数为某个Java 对象实例,可以是局部引用或全局引用 mClass = (jclass) env->NewGlobalRef(clazz); // We use a weak reference so the MediaPlayer object can be garbage collected // The reference is only used as a proxy for callbacks mObject = env->NewGlobalRef(weak_thiz); } //定义析构函数 JNIMediaPlayerListener::~JNIMediaPlayerListener() { JNIEnv *env = getJNIEnv(); //释放全局引用 env->DeleteGlobalRef(mObject); env->DeleteGlobalRef(mClass); } //ext1和ext2对应msg的arg1和arg2,即仅传递低成本的int值,obj代表传递一个对象 void JNIMediaPlayerListener::notify(int msg, int ext1, int ext2, void *obj) { JNIEnv *env = getJNIEnv(); //获取对应线程的JNIEnv对象,将当前线程跟JVM关联 bool status = (javaVM->AttachCurrentThread(&env, NULL) >= 0); // TODO obj needs changing into jobject //调用java层的static方法,mObject, msg, ext1, ext2, obj 均为方法参数,对应java层handler的方法obtainMessage(what, arg1, arg2, obj),msg为消息ID //调用java层的static方法,关键需要java层对应类的class对象和方法ID,后面就是参数 env->CallStaticVoidMethod(mClass, fields.post_event, mObject, msg, ext1, ext2, obj); if (env->ExceptionCheck()) { LOGW("An exception occurred while notifying an event."); env->ExceptionClear(); } //记得解除链接 if (status) { javaVM->DetachCurrentThread(); } } // ------------------------------------------------------------------------------------------------- static EMediaPlayer *getMediaPlayer(JNIEnv *env, jobject thiz) { //获取java层保存的c++的emediaplayer的实例引用,然后将其转换为EMediaPlayer * 指针的类型 EMediaPlayer *const mp = (EMediaPlayer *) env->GetLongField(thiz, fields.context); return mp; } /** * 将c++的mediaplayer对象保存到java层,其中fields.context是java层的变量的ID,是一个long类型的变量 */ static EMediaPlayer *setMediaPlayer(JNIEnv *env, jobject thiz, long mediaPlayer) { EMediaPlayer *old = (EMediaPlayer *) env->GetLongField(thiz, fields.context); env->SetLongField(thiz, fields.context, mediaPlayer); return old; } // If exception is NULL and opStatus is not OK, this method sends an error // event to the client application; otherwise, if exception is not NULL and // opStatus is not OK, this method throws the given exception to the client // application. static void process_media_player_call(JNIEnv *env, jobject thiz, int opStatus, const char *exception, const char *message) { if (exception == NULL) { // Don't throw exception. Instead, send an event. if (opStatus != (int) OK) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp != 0) mp->notify(MEDIA_ERROR, opStatus, 0); } } else { // Throw exception! if (opStatus == (int) INVALID_OPERATION) { jniThrowException(env, "java/lang/IllegalStateException"); } else if (opStatus == (int) PERMISSION_DENIED) { jniThrowException(env, "java/lang/SecurityException"); } else if (opStatus != (int) OK) { if (strlen(message) > 230) { // if the message is too long, don't bother displaying the status code jniThrowException(env, exception, message); } else { char msg[256]; // append the status code to the message sprintf(msg, "%s: status=0x%X", message, opStatus); jniThrowException(env, exception, msg); } } } } void EMediaPlayer_setDataSourceAndHeaders(JNIEnv *env, jobject thiz, jstring path_, jobjectArray keys, jobjectArray values) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } if (path_ == NULL) { jniThrowException(env, "java/lang/IllegalArgumentException"); return; } //将 Java 风格的 jstring 对象转换成 C 风格的字符串,0为不拷贝 const char *path = env->GetStringUTFChars(path_, 0); if (path == NULL) { return; } //MMS协议:MMS(MicrosoftMediaServerprotocol)是一种串流媒体传送协议,用来访问并流式接收Windows Media服务器中.asf文件的一种协议 //strstr(str1,str2) 函数用于判断字符串str2是否是str1的子串。如果是,则该函数返回str1字符串从str2第一次出现的位置开始到str1结尾的字符串;否则,返回NULL const char *restrict = strstr(path, "mms://"); //是否为mms协议的多媒体 //strdup是复制字符串,返回一个指针,指向为复制字符串分配的空间;如果分配空间失败,则返回NULL值 char *restrict_to = restrict ? strdup(restrict) : NULL; if (restrict_to != NULL) { //把src所指向的字符串复制到dest,最多复制n个字符。当src的长度小于n时,dest的剩余部分将用空字节填充 strncpy(restrict_to, "mmsh://", 6); //将path输出到屏幕 puts(path); } char *headers = NULL; if (keys && values != NULL) { int keysCount = env->GetArrayLength(keys); int valuesCount = env->GetArrayLength(values); if (keysCount != valuesCount) { LOGE("keys and values arrays have different length"); jniThrowException(env, "java/lang/IllegalArgumentException"); return; } int i = 0; const char *rawString = NULL; char hdrs[2048]; for (i = 0; i < keysCount; i++) { jstring key = (jstring) env->GetObjectArrayElement(keys, i); rawString = env->GetStringUTFChars(key, NULL); //char *strcat(char *dest, const char *src) 把src所指向的字符串追加到dest所指向的字符串的结尾 strcat(hdrs, rawString); strcat(hdrs, ": "); env->ReleaseStringUTFChars(key, rawString); jstring value = (jstring) env->GetObjectArrayElement(values, i); rawString = env->GetStringUTFChars(value, NULL); strcat(hdrs, rawString); strcat(hdrs, "\r\n"); //回车换行 env->ReleaseStringUTFChars(value, rawString); } headers = &hdrs[0]; } status_t opStatus = mp->setDataSource(path, 0, headers); process_media_player_call(env, thiz, opStatus, "java/io/IOException", "setDataSource failed."); env->ReleaseStringUTFChars(path_, path); } void EMediaPlayer_changeFilter(JNIEnv *env, jobject thiz, int node_type, jstring filterName_) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } const char *name = env->GetStringUTFChars(filterName_, NULL); mp->changeFilter(node_type, name); env->ReleaseStringUTFChars(filterName_, name); } void EMediaPlayer_setWatermark(JNIEnv *env, jobject thiz, jbyteArray data_, jint dataLen, jint watermarkWidth, jint watermarkHeight, jfloat scale, jint location) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } jbyte *data = env->GetByteArrayElements(data_, NULL); mp->setWatermark((uint8_t *) data, (size_t) dataLen, watermarkWidth, watermarkHeight, scale, location); // 释放 env->ReleaseByteArrayElements(data_, data, 0); } void EMediaPlayer_changeFilterById(JNIEnv *env, jobject thiz, int node_type, jint filterId) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->changeFilter(node_type, filterId); } void EMediaPlayer_setDataSource(JNIEnv *env, jobject thiz, jstring path_) { EMediaPlayer_setDataSourceAndHeaders(env, thiz, path_, NULL, NULL); } void EMediaPlayer_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } if (fileDescriptor == NULL) { jniThrowException(env, "java/lang/IllegalArgumentException"); return; } int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); if (offset < 0 || length < 0 || fd < 0) { if (offset < 0) { LOGE("negative offset (%lld)", offset); } if (length < 0) { LOGE("negative length (%lld)", length); } if (fd < 0) { LOGE("invalid file descriptor"); } jniThrowException(env, "java/lang/IllegalArgumentException"); return; } char path[256] = ""; int myfd = dup(fd); char str[20]; sprintf(str, "pipe:%d", myfd); strcat(path, str); status_t opStatus = mp->setDataSource(path, offset, NULL); process_media_player_call(env, thiz, opStatus, "java/io/IOException", "setDataSourceFD failed."); } //主要获取一个java层的mediaplayer的一个变量ID和一个方法ID,这个方法在java层static块中执行,比构造方法先执行, // 类的static代码块只在第一次调用构造方法适合执行,第二次将不再执行static代码块了 void EMediaPlayer_init(JNIEnv *env) { //根据类的全路径找到相应的 jclass 对象 jclass clazz = env->FindClass(CLASS_NAME); if (clazz == NULL) { return; } //获取类中某个非静态成员变量的ID(域ID) // 参数: // clazz:指定对象的类 // name:这个域(Field)在 Java 类中定义的名字 // sig:这个域(Field)的类型描述符 fields.context = env->GetFieldID(clazz, "mNativeContext", "J"); if (fields.context == NULL) { return; } //获取类中某个静态方法的ID // clazz:指定对象的类 // name:这个方法在 Java 类中定义的名称,构造方法为 // sig:这个方法的类型描述符,例如 “()V”,其中括号内是方法的参数,括号后是返回值类型 //在java中函数名为postEventFromNative,参数类型有object、int、int、int、object四个,返回值为void // private static void postEventFromNative(Object mediaplayer_ref,int what, int arg1, int arg2, Object obj) fields.post_event = env->GetStaticMethodID(clazz, "postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V"); if (fields.post_event == NULL) { return; } //释放某个局部引用 //局部引用在方法执行完后也会自动释放,不过当你在执行一个很大的循环时,里面会产生大量临时的局部引用, // 那么建议的做法是手动的调用该方法去释放这个局部引用 env->DeleteLocalRef(clazz); } /** * java层的mediaplayer构造方法中会调用此方法,在这里会创建c++层的mediaplayer对象,设置mediaplayer消息的监听,然后保持cpp层mediaplayer * 对象的引用到java层的mediaplayer对象中 * @param env * @param thiz * @param mediaplayer_this */ void EMediaPlayer_setup(JNIEnv *env, jobject thiz, jobject mediaplayer_this) { EMediaPlayer *mp = new EMediaPlayer(); if (mp == NULL) { jniThrowException(env, "java/lang/RuntimeException", "Out of memory"); return; } // 这里似乎存在问题 // init EMediaPlayer mp->init(); // create new listener and give it to MediaPlayer JNIMediaPlayerListener *listener = new JNIMediaPlayerListener(env, thiz, mediaplayer_this); //设置监听 mp->setListener(listener); // Stow our new C++ MediaPlayer in an opaque field in the Java object.其中opaque field 不透明的变量,即私有变量 setMediaPlayer(env, thiz, (long) mp); } void EMediaPlayer_release(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp != nullptr) { mp->disconnect(); delete mp; setMediaPlayer(env, thiz, 0); } } void EMediaPlayer_reset(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->reset(); } void EMediaPlayer_finalize(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp != NULL) { LOGW("MediaPlayer finalized without being released"); } LOGD("调用完成"); EMediaPlayer_release(env, thiz); } void EMediaPlayer_setVideoSurface(JNIEnv *env, jobject thiz, jobject surface) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } ANativeWindow *window = NULL; if (surface != NULL) { //将java层Surface转换为C++的ANativeWindow window = ANativeWindow_fromSurface(env, surface); } mp->setVideoSurface(window); } void EMediaPlayer_setLooping(JNIEnv *env, jobject thiz, jboolean looping) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->setLooping(looping); } jboolean EMediaPlayer_isLooping(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return JNI_FALSE; } return (jboolean) (mp->isLooping() ? JNI_TRUE : JNI_FALSE); } void EMediaPlayer_prepare(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->prepare(); } void EMediaPlayer_prepareAsync(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->prepareAsync(); } void EMediaPlayer_start(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->start(); } void EMediaPlayer_pause(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->pause(); } void EMediaPlayer_resume(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->resume(); } void EMediaPlayer_stop(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->stop(); } void EMediaPlayer_seekTo(JNIEnv *env, jobject thiz, jfloat timeMs) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->seekTo(timeMs); } void EMediaPlayer_setMute(JNIEnv *env, jobject thiz, jboolean mute) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->setMute(mute); } void EMediaPlayer_setVolume(JNIEnv *env, jobject thiz, jfloat leftVolume, jfloat rightVolume) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->setVolume(leftVolume, rightVolume); } void EMediaPlayer_setRate(JNIEnv *env, jobject thiz, jfloat speed) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->setRate(speed); } void EMediaPlayer_setPitch(JNIEnv *env, jobject thiz, jfloat pitch) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->setPitch(pitch); } jlong EMediaPlayer_getCurrentPosition(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return 0L; } return mp->getCurrentPosition(); } jlong EMediaPlayer_getDuration(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return 0L; } return mp->getDuration(); } jboolean EMediaPlayer_isPlaying(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return JNI_FALSE; } return (jboolean) (mp->isPlaying() ? JNI_TRUE : JNI_FALSE); } jint EMediaPlayer_getRotate(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return 0; } return mp->getRotate(); } jint EMediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return 0; } return mp->getVideoWidth(); } jint EMediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return 0; } return mp->getVideoHeight(); } void EMediaPlayer_surfaceChange(JNIEnv *env, jobject thiz, jint width, jint height) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } mp->surfaceChanged(width, height); } void EMediaPlayer_setOption(JNIEnv *env, jobject thiz, int category, jstring type_, jstring option_) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } const char *type = env->GetStringUTFChars(type_, 0); const char *option = env->GetStringUTFChars(option_, 0); if (type == NULL || option == NULL) { return; } mp->setOption(category, type, option); env->ReleaseStringUTFChars(type_, type); env->ReleaseStringUTFChars(option_, option); } void EMediaPlayer_setOptionLong(JNIEnv *env, jobject thiz, int category, jstring type_, jlong option_) { EMediaPlayer *mp = getMediaPlayer(env, thiz); if (mp == NULL) { jniThrowException(env, "java/lang/IllegalStateException"); return; } const char *type = env->GetStringUTFChars(type_, 0); if (type == NULL) { return; } mp->setOption(category, type, option_); env->ReleaseStringUTFChars(type_, type); } static const JNINativeMethod gMethods[] = { {"_setDataSource", "(Ljava/lang/String;)V", (void *) EMediaPlayer_setDataSource}, {"_setDataSource", "(Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V", (void *) EMediaPlayer_setDataSourceAndHeaders}, {"_setDataSource", "(Ljava/io/FileDescriptor;JJ)V", (void *) EMediaPlayer_setDataSourceFD}, {"_setVideoSurface", "(Landroid/view/Surface;)V", (void *) EMediaPlayer_setVideoSurface}, {"_prepare", "()V", (void *) EMediaPlayer_prepare}, {"_prepareAsync", "()V", (void *) EMediaPlayer_prepareAsync}, {"_start", "()V", (void *) EMediaPlayer_start}, {"_stop", "()V", (void *) EMediaPlayer_stop}, {"_resume", "()V", (void *) EMediaPlayer_resume}, {"_getRotate", "()I", (void *) EMediaPlayer_getRotate}, {"_getVideoWidth", "()I", (void *) EMediaPlayer_getVideoWidth}, {"_getVideoHeight", "()I", (void *) EMediaPlayer_getVideoHeight}, {"_seekTo", "(F)V", (void *) EMediaPlayer_seekTo}, {"_pause", "()V", (void *) EMediaPlayer_pause}, {"_isPlaying", "()Z", (void *) EMediaPlayer_isPlaying}, {"_getCurrentPosition", "()J", (void *) EMediaPlayer_getCurrentPosition}, {"_getDuration", "()J", (void *) EMediaPlayer_getDuration}, {"_release", "()V", (void *) EMediaPlayer_release}, {"_reset", "()V", (void *) EMediaPlayer_reset}, {"_setLooping", "(Z)V", (void *) EMediaPlayer_setLooping}, {"_isLooping", "()Z", (void *) EMediaPlayer_isLooping}, {"_setVolume", "(FF)V", (void *) EMediaPlayer_setVolume}, {"_setMute", "(Z)V", (void *) EMediaPlayer_setMute}, {"_setRate", "(F)V", (void *) EMediaPlayer_setRate}, {"_setPitch", "(F)V", (void *) EMediaPlayer_setPitch}, {"native_init", "()V", (void *) EMediaPlayer_init}, {"native_setup", "(Ljava/lang/Object;)V", (void *) EMediaPlayer_setup}, {"native_finalize", "()V", (void *) EMediaPlayer_finalize}, {"_setOption", "(ILjava/lang/String;Ljava/lang/String;)V", (void *) EMediaPlayer_setOption}, {"_setOption", "(ILjava/lang/String;J)V", (void *) EMediaPlayer_setOptionLong}, {"_surfaceChange", "(II)V", (void *) EMediaPlayer_surfaceChange}, {"_changeFilter", "(ILjava/lang/String;)V", (void *) EMediaPlayer_changeFilter}, {"_changeFilter", "(II)V", (void *) EMediaPlayer_changeFilterById}, {"_setWatermark", "([BIIIFI)V", (void *) EMediaPlayer_setWatermark}, }; // 注册EMediaPlayer的Native方法 static int register_com_eplayer_EasyMediaPlayer(JNIEnv *env) { int numMethods = (sizeof(gMethods) / sizeof((gMethods)[0])); jclass clazz = env->FindClass(CLASS_NAME); if (clazz == NULL) { LOGE("Native registration unable to find class '%s'", CLASS_NAME); return JNI_ERR; } if (env->RegisterNatives(clazz, gMethods, numMethods) < 0) { LOGE("Native registration unable to find class '%s'", CLASS_NAME); return JNI_ERR; } env->DeleteLocalRef(clazz); return JNI_OK; } extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { av_jni_set_java_vm(vm, NULL); javaVM = vm; JNIEnv *env; if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { return -1; } if (register_com_eplayer_EasyMediaPlayer(env) != JNI_OK) { return -1; } return JNI_VERSION_1_4; }
[ "lxrongdke@163.com" ]
lxrongdke@163.com
28012082edec39e465b0e47302491278ae2cd2d5
5ebd5cee801215bc3302fca26dbe534e6992c086
/blazemark/src/flens/TMat6TMat6Mult.cpp
5fe3456dcf59970f83143a8f682ac8bae0d7e8e2
[ "BSD-3-Clause" ]
permissive
mhochsteger/blaze
c66d8cf179deeab4f5bd692001cc917fe23e1811
fd397e60717c4870d942055496d5b484beac9f1a
refs/heads/master
2020-09-17T01:56:48.483627
2019-11-20T05:40:29
2019-11-20T05:41:35
223,951,030
0
0
null
null
null
null
UTF-8
C++
false
false
4,569
cpp
//================================================================================================= /*! // \file src/flens/TMat6TMat6Mult.cpp // \brief Source file for the FLENS 6D transpose matrix/transpose matrix multiplication kernel // // Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or modify it under // the terms of the New (Revised) BSD License. Redistribution and use in source and binary // forms, with or without modification, are permitted provided that the following conditions // are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // 3. Neither the names of the Blaze development group nor the names of its contributors // may be used to endorse or promote products derived from this software without specific // prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT // SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. */ //================================================================================================= //************************************************************************************************* // Includes //************************************************************************************************* #include <iostream> #include <vector> #include <flens/flens.cxx> #include <blaze/util/Timing.h> #include <blazemark/flens/init/GeMatrix.h> #include <blazemark/flens/TMat6TMat6Mult.h> #include <blazemark/system/Config.h> namespace blazemark { namespace flens { //================================================================================================= // // KERNEL FUNCTIONS // //================================================================================================= //************************************************************************************************* /*!\brief FLENS 6-dimensional transpose matrix/transpose matrix multiplication kernel. // // \param N The number of 6x6 matrices to be computed. // \param steps The number of iteration steps to perform. // \return Minimum runtime of the kernel function. // // This kernel function implements the 6-dimensional transpose matrix/transpose matrix // multiplication by means of the FLENS functionality. */ double tmat6tmat6mult( size_t N, size_t steps ) { using ::blazemark::element_t; using ColGeMatrix = ::flens::GeMatrix< ::flens::FullStorage<element_t,::flens::ColMajor> >; ::blaze::setSeed( seed ); ::std::vector< ColGeMatrix > A( N ), B( N ), C( N ); ::blaze::timing::WcTimer timer; for( size_t i=0UL; i<N; ++i ) { init( A[i] ); init( B[i] ); } for( size_t i=0UL; i<N; ++i ) { C[i] = A[i] * B[i]; } for( size_t rep=0UL; rep<reps; ++rep ) { timer.start(); for( size_t step=0UL, i=0UL; step<steps; ++step, ++i ) { if( i == N ) i = 0UL; C[i] = A[i] * B[i]; } timer.end(); for( size_t i=0UL; i<N; ++i ) if( C[i](0,0) < element_t(0) ) std::cerr << " Line " << __LINE__ << ": ERROR detected!!!\n"; if( timer.last() > maxtime ) break; } const double minTime( timer.min() ); const double avgTime( timer.average() ); if( minTime * ( 1.0 + deviation*0.01 ) < avgTime ) std::cerr << " FLENS kernel 'tmat6tmat6mult': Time deviation too large!!!\n"; return minTime; } //************************************************************************************************* } // namespace flens } // namespace blazemark
[ "klaus.iglberger@gmail.com" ]
klaus.iglberger@gmail.com
9e2c9f786e08b2a487faf5c4d5439ecad098baa6
0ce605d63accf0bfad1a94575ff9d4f6856f59b3
/src/problems/array/partition/75.sort-colors.cpp
ed1ae82fe08b51ac41f708d69b404fc18c839d99
[]
no_license
Adonishl/leetcode
06624e0bda175f9bd5f296e651c1cfcb14fbaae4
76cf853deaa6f0d458d91406dda445ec7237c4b5
refs/heads/master
2023-05-29T07:04:09.025615
2021-06-09T14:06:46
2021-06-09T14:06:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
492
cpp
// // Created by liyingmin on 2020/1/5. // /*! * @brief https://leetcode-cn.com/problems/sort-colors/ * Time: O(n) * Space: O(1) */ void sortColors(vector<int>& nums) { int lt = -1; int eq = 0; int gt = nums.size(); int i = 0; // nums[0...lt] < 1, nums[lt + 1, i) = 1, nums[gt, size-1] > 1 while (i < gt) { if (nums[i] > 1) { std::swap(nums[--gt], nums[i]); } else if (nums[i] < 1) { std::swap(nums[++lt], nums[i++]); } else { ++i; } } }
[ "yingmin.li@horizon.ai" ]
yingmin.li@horizon.ai
2d1ad3da1691309d084f63ff9eef87ce12ca4878
40ef1585129853ca12585f8d352c7034992089bb
/jni/Fighter/src/Personaje/Barra.cpp
f5773a18e9c7b91a2991e153be19c98ab237c8a8
[]
no_license
Turupawn/FighterAndroid
5f8a48954b813a8e1dc7fda55aafb085a9590edf
cafa8d22dbf888c89d27917671bc34152fe85622
refs/heads/master
2021-01-17T09:42:12.916359
2012-08-02T01:11:51
2012-08-02T01:11:51
null
0
0
null
null
null
null
UTF-8
C++
false
false
655
cpp
#include "Personaje/Barra.h" Barra::Barra(stringw nombre, stringw valor_maximo,stringw valor_actual,stringw modificador_periodico,stringw periodo,video::SColor color,core::rect<s32> posicion,irr::video::ITexture* imagen) { this->tiempo=0; this->nombre=nombre; this->valor_maximo=valor_maximo; this->valor_actual=valor_actual; this->modificador_periodico=modificador_periodico; this->periodo=periodo; this->color=color; this->posicion=posicion; this->imagen=imagen; } bool Barra::procesarTiempo(int periodo) { if(tiempo<periodo) { tiempo++; return false; } tiempo=0; return true; }
[ "antares_43@hotmail.com" ]
antares_43@hotmail.com
378fc20b537e1bf662c31da13ab9ea6f95b76f90
e61b99120bdf9e6b4f9537ef78221beb0be04f9c
/POJ/1797/poj1797.cpp
0fb6a46a290ffb0bb60dfb57a972813f687f9186
[]
no_license
plus7wist/accepted-codes
e03892adea0d62063c55917d44fddc2566b52c16
7f0963e7fc2418f6d465e6f117ef9aaf860809d2
refs/heads/master
2021-01-01T19:38:01.057314
2017-07-27T13:54:27
2017-07-27T13:54:27
null
0
0
null
null
null
null
GB18030
C++
false
false
1,338
cpp
#include<cstdio> #include<cstdlib> #include<cmath> #include<string.h> #include<string> #include<iostream> #include<algorithm> #include<queue> #include<stack> #include<map> #include<vector> using namespace std; typedef long long LL; const int INF=0x3f3f3f3f; const int maxn=1e3+5; const int mod=1e9+7; int cnt,n,m; int pic[maxn][maxn]; int vis[maxn];int d[maxn]; //优先队列+邻接表的Dijk TLE //SPFA 1816K 313MS //以下代码 4640K 375MS void Dijkstra(int s) { memset(vis,0,sizeof(vis)); for(int i=1;i<=n;i++) d[i]=pic[1][i]; int id; for(int i=1;i<=n;i++) { int mx=-1; for(int j=1;j<=n;j++) if(!vis[j]&&mx<d[j]) mx=d[id=j]; vis[id]=1; for(int j=1;j<=n;j++) if(!vis[j]&&d[j]<min(d[id],pic[id][j])) d[j]=min(d[id],pic[id][j]); } } int main() { //std::ios::sync_with_stdio(false); //freopen("test.txt","r",stdin); int t,a,b,c;scanf("%d",&t);int ks=1; while(t--) { scanf("%d%d",&n,&m); cnt=1; memset(pic,0,sizeof(pic)); for(int i=1;i<=m;i++) { scanf("%d%d%d",&a,&b,&c); pic[a][b]=pic[b][a]=c; } Dijkstra(1); //for(int i=1;i<=n;i++)cout<<"di"<<i<<' '<<d[i]<<endl; printf("Scenario #%d:\n%d\n\n",ks++,d[n]); } return 0; }
[ "astralknight@163.com" ]
astralknight@163.com
950afd45382699f3c78aae8b493ed3265389ccf9
1a20961af3b03b46c109b09812143a7ef95c6caa
/ZGame/DX11/hieroglyph3/trunk/Hieroglyph3/Applications/LightPrepass/ViewFinalPass.h
1562cd87aba9cb692c75847a7b02add0394b1e9a
[ "MIT" ]
permissive
JetAr/ZNginx
eff4ae2457b7b28115787d6af7a3098c121e8368
698b40085585d4190cf983f61b803ad23468cdef
refs/heads/master
2021-07-16T13:29:57.438175
2017-10-23T02:05:43
2017-10-23T02:05:43
26,522,265
3
1
null
null
null
null
UTF-8
C++
false
false
1,899
h
//-------------------------------------------------------------------------------- // This file is a portion of the Hieroglyph 3 Rendering Engine. It is distributed // under the MIT License, available in the root of this distribution and // at the following URL: // // http://www.opensource.org/licenses/mit-license.php // // Copyright (c) Jason Zink //-------------------------------------------------------------------------------- //-------------------------------------------------------------------------------- // ViewFinalPass // //-------------------------------------------------------------------------------- #ifndef ViewFinalPass_h #define ViewFinalPass_h //-------------------------------------------------------------------------------- #include "SceneRenderTask.h" #include "ShaderResourceParameterDX11.h" //-------------------------------------------------------------------------------- namespace Glyph3 { class ViewFinalPass : public SceneRenderTask { public: ViewFinalPass( RendererDX11& Renderer ); virtual ~ViewFinalPass(); virtual void Update( float fTime ); virtual void QueuePreTasks( RendererDX11* pRenderer ); virtual void ExecuteTask( PipelineManagerDX11* pPipelineManager, IParameterManager* pParamManager ); virtual void Resize( UINT width, UINT height ); virtual void SetRenderParams( IParameterManager* pParamManager ); virtual void SetUsageParams( IParameterManager* pParamManager ); void SetTargets( ResourcePtr LightTarget, ResourcePtr RenderTarget, ResourcePtr DepthTarget, int Viewport ); virtual std::wstring GetName(); protected: ResourcePtr m_LightTarget; ResourcePtr m_RenderTarget; ResourcePtr m_DepthTarget; ShaderResourceParameterDX11* m_pLightTexture; }; } //-------------------------------------------------------------------------------- #endif // ViewFinalPass_h
[ "126.org@gmail.com" ]
126.org@gmail.com
f7aa155170f169e2bafba58dc9e288c7208b3a9b
3965fcb70ef69d7fc8138807af953c3c3422b74a
/sw/scene/Material.h
565a9b47b8360372326a5c0dd5a0e2fb2cfa81f3
[]
no_license
mrbrian/PhotonMap
05e129c8b8289d0efa091c304e36901677155b05
0bc1a0ba0d0e6733824138a6e1823162052b931b
refs/heads/master
2020-03-18T22:49:23.645471
2019-10-26T18:53:07
2019-10-26T18:53:07
135,367,198
0
0
null
null
null
null
UTF-8
C++
false
false
1,026
h
#pragma once #include "algebra.h" class Material { public: virtual ~Material() { } Material() { p = 0; } Material(Color a, Color d, Color s, double p, Color r); Material(Color a, Color d, Color s, double p); // accessor for diffuse color virtual Color GetKd(Point3D p) { p = Point3D(); // get rid of warning return Kd; } Color Ka; // ambient coefficient Color Ks; // specular coefficient double p; // specular power Color Kr; // reflection coefficient Color Kd; // only access kd through accessor func }; class ChromeMaterial : public Material { public: ChromeMaterial() : Material( Color(0,0,0), Color(0,0,0), Color(1,1,1), 100, Color(1,1,1)) { } }; class CheckerMaterial : public Material { public: float squareSize; // size of the checkers CheckerMaterial(Color a, Color d, Color s, double in_p, Color r, float sc); Color GetKd(Point3D p); };
[ "brianyee@hotmail.com" ]
brianyee@hotmail.com
237179ee7c8f29d0acc47fa5f15c80ea49355734
5671c626ee367c9aacb909cd76a06d2fadf941e2
/frameworks/core/components/declaration/svg/svg_fe_flood_declaration.cpp
919faaeba89da1957760d352d658b7920aef1a21
[ "Apache-2.0" ]
permissive
openharmony/ace_ace_engine
fa3f2abad9866bbb329524fb039fa89dd9517592
c9be21d0e8cb9662d5f4f93184fdfdb538c9d4e1
refs/heads/master
2022-07-21T19:32:59.377634
2022-05-06T11:18:20
2022-05-06T11:18:20
400,083,641
2
1
null
null
null
null
UTF-8
C++
false
false
2,043
cpp
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * 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 "core/components/declaration/svg/svg_fe_flood_declaration.h" #include "core/components/declaration/common/declaration_constants.h" namespace OHOS::Ace { using namespace Framework; void SvgFeFloodDeclaration::InitSpecialized() { AddSpecializedAttribute(DeclarationConstants::DEFAULT_SVG_FE_FLOOD_ATTR); } void SvgFeFloodDeclaration::InitializeStyle() { // self attribute must be initialized first. Otherwise, may be initialized as a base attribute. MaybeResetAttribute<SvgFeFloodAttribute>(AttributeTag::SPECIALIZED_ATTR); } bool SvgFeFloodDeclaration::SetSpecializedValue(const std::pair<std::string, std::string>& attr) { static const LinearMapNode<void (*)(const std::string&, SvgFeFloodDeclaration&)> attrs[] = { { DOM_SVG_FE_FLOOD_COLOR, [](const std::string& val, SvgFeFloodDeclaration& declaration) { declaration.SetFloodColor(declaration.ParseColor(val)); } }, { DOM_SVG_FE_FLOOD_OPACITY, [](const std::string& val, SvgFeFloodDeclaration& declaration) { declaration.SetFloodOpacity(declaration.ParseDouble(val)); } }, }; auto attrIter = BinarySearchFindIndex(attrs, ArraySize(attrs), attr.first.c_str()); if (attrIter != -1) { attrs[attrIter].value(attr.second, *this); return true; } return SvgFeDeclaration::SetSpecializedValue(attr); } } // namespace OHOS::Ace
[ "zhongjianfei@huawei.com" ]
zhongjianfei@huawei.com
08261fb7ee4f077fddf96d8c5e3ff2326636d4d3
c33c484dd0c3641243798c46d798d5d0fd307b42
/main.cpp
cb409842b6d492254dceb995dee20d07f95d3667
[]
no_license
AlvaroFuentesSolas/Master-Miner-Game
adf4f387134b845d7ca0e26c424199a7da4dc9e3
882bc1d9643e5ebd3a6b13058e908c7b9868cfbb
refs/heads/main
2023-07-17T08:51:07.485846
2021-08-30T11:28:44
2021-08-30T11:28:44
401,314,885
0
0
null
null
null
null
ISO-8859-2
C++
false
false
2,769
cpp
/* ANTONIO RÓDENAS CILLER ÁLVARO FUENTES SOLAS */ #include "Juego.h" #include "Mina.h" #include "Puntuaciones.h" int main() { int nivel = 0; int pos; string nombre; tJuego juego; bool salir = false; ifstream leerMovimiento; tTecla tecla; tPuntuaciones puntuaciones; inicializar_Marcador(puntuaciones); cargar_Marcador(puntuaciones); nombre = nombreSinBlancos(); if (buscar(nombre, puntuaciones, pos)) { cout << setw(30) << "Ya estas registrado/a.\n\n"; cout << setw(60) << "Mira las minas que has recorrido ordenadas por nivel\n\n"; mostrar_Minas_Usuario(puntuaciones, pos); } else { cout << "\n" << setw(20) << "Eres nuevo/a: " << nombre << "\n\n"; insertar(puntuaciones, nombre, pos); mostrar_Alfabetico(puntuaciones); } if ((nivel = menu3(puntuaciones, pos)) == 0) salir = true; while (!salir) { if (cargar_Juego(juego, nivel)) { int eleccion0, eleccion1 = -1; bool finPartida = false; system("cls"); if ((eleccion0 = menu0()) == 0) salir = true, finPartida = true; if (!salir) if ((eleccion1 = menu1()) == 0) salir = true, finPartida = true; if (eleccion1 == 2) leerMovimiento.open("movimientos.txt"); while (!finPartida) { // salimos del bucle cuando el jugador esté en la ficha SALIDA, que nos lo indicara la funcion hacerMovimiento dibujar(juego, eleccion0); //PRIMERO. Obtenemos el movimiento segun la eleccion del jugador... if (eleccion1 == 1) { //... o pantalla ... tecla = leerTecla(); } else { //... o por fichero. char movimiento; if (!leerMovimiento.eof()) { leerMovimiento >> movimiento; tecla = fichero2tecla(movimiento); Sleep(12); //dormimos el sistema para que se aprecie el movimiento por fichero } else { leerMovimiento.close(); eleccion1 = 1; //Despues de que se ejecuten los movimientos del fichero y si no hemos llegado a Salida, pasamos a opcion manual. } } //SEGUNDO. Realizamos el movimiento correspondiente if (hacerMovimiento(juego, tecla, eleccion0)) { //hacerMovimiento nos devuelve TRUE cuando el jugador haya llegado a la posicion SALIDA system("cls"); bool minaMejorada = volcarDatos(puntuaciones, juego, nivel, pos); mostrar_Datos_Usuario(puntuaciones); if (!minaMejorada) cout << "\nNo has mejorado la puntuacion de la mina " << nivel << ". SIGUE INTENTANDOLO.\n"; system("pause"); finPartida = true; if ((nivel = menu3(puntuaciones, pos)) == 0) salir = true; } system("cls"); } } else { cout << "No se ha podido cargar el juego. Lo siento"; salir = true; } } guardar_Marcador(puntuaciones); }
[ "noreply@github.com" ]
noreply@github.com
cbd4b6b42bfab68e3f25845f2c3c798579737292
898b6c2a978c9dd3ef952d3175810f80f8069d4a
/source/gui/mainMenu.cpp
eaa6b392235d70da9f8a12ab85b6c8a14791cb71
[ "MIT" ]
permissive
ilteroi/earthgen-old
403acf52433075ab02d57abd763f9344f2e88b31
0cb8624fcc150c63e84ccbfc58359a068a6a8a9e
refs/heads/master
2021-01-11T07:01:38.045558
2016-10-29T21:15:46
2016-10-29T21:21:35
72,310,208
0
0
null
2016-10-29T21:23:33
2016-10-29T21:23:33
null
UTF-8
C++
false
false
1,071
cpp
#include "mainMenu.h" #include <QtWidgets\QBoxLayout> #include "terrainBox.h" #include "axisBox.h" #include "climateBox.h" #include "displayBox.h" #include "planetHandler.h" MainMenu::MainMenu (PlanetHandler* p, PlanetWidget* planetWidget) : planetHandler(p) { layout = new QBoxLayout(QBoxLayout::TopToBottom); layout->setAlignment(Qt::AlignTop); terrainBox = new TerrainBox(planetHandler); terrainBox->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); layout->addWidget(terrainBox); axisBox = new AxisBox(planetHandler, planetWidget); axisBox->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); layout->addWidget(axisBox); climateBox = new ClimateBox(planetHandler); climateBox->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); layout->addWidget(climateBox); displayBox = new DisplayBox(planetHandler, planetWidget); displayBox->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); layout->addWidget(displayBox); setLayout(layout); setMinimumWidth(200); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored); }
[ "ilteroi@web.de" ]
ilteroi@web.de
a0d304c3f62c4c463e36c610222d825fec40ad26
16ef0b7f1bd36e5e00ed74cb35eea3bd27bd3997
/src/z80/z80opcodes.hh
fbcfa97a95056b44b0c5f20246ea0999480abef1
[]
no_license
eklitzke/nebula
13183be22d325f8e31936cec45d3dd273c97f2c5
330437b8a434dbd8b1ded4897a6c218caf79fb41
refs/heads/master
2020-12-24T09:39:08.316478
2015-03-05T22:51:56
2015-03-05T22:51:56
31,741,101
0
0
null
2015-03-05T22:49:15
2015-03-05T22:49:14
C++
UTF-8
C++
false
false
323
hh
#ifndef Z___OPCODES_HH_ # define Z___OPCODES_HH_ # include "../memory/mmu.hh" # include "../utils/utils.hh" # include "z80cbopcodes.hh" # include "z80registers.hh" uint16_t di(MMU& mmu, Z80Registers& regs); uint16_t rst_nn(MMU& mmu, Z80Registers& regs, uint16_t a); extern op OPCODES[0x100]; #endif // !Z___OPCODES_HH_
[ "franck.michea@gmail.com" ]
franck.michea@gmail.com
316d296ea49edc8ed259f6cbcb8bc95bf92f55a8
cc17eb854019ceafb8b9d5a7a80d88b14363fee6
/poj-3253-Fence Repair(优先队列).cpp
b291d9bc5745c7ef69a4814a8e113ca8e029d4da
[]
no_license
kuronekonano/OJ_Problem
76ec54f16c4711b0abbc7620df5519b3fff4e41b
ea728084575620538338368f4b6526dfdd6847db
refs/heads/master
2021-06-23T02:19:59.735873
2020-12-30T03:52:59
2020-12-30T03:52:59
166,183,278
0
0
null
null
null
null
GB18030
C++
false
false
1,525
cpp
#include<stdio.h>///优先队列例 #include<queue>///用了vector容器竟然不需要他的头文件? using namespace std; int main() { int i,n; long long a; while(scanf("%d",&n)!=EOF)///注意,如果下方最右边使用了>>会报错,不能粘起来,要用空格分开 { priority_queue<long long,vector<long long>,greater<long long> >q; for(i=0;i<n;i++)///这里用greater是从小到大的优先级,less是从大到小 { scanf("%lld",&a); q.push(a);///入列 } if(n==1) { printf("%lld\n",q.top()); q.pop(); continue; } long long sum=0,small,smaller; while(q.size()>1) { small=q.top(); q.pop();///出列 smaller=small+q.top();///选取出列后最小的,相加,相当于两个最小的合成一堆,这里用到的是,当需要8 5 8三种长度时 q.pop();///取出最小的两个长度,合成一块木板,合成后的长度就是需要切割出来的长度,那么就要花费那么多 sum=sum+smaller;///合成后求和加入sum中,然后再将合成后的长度塞入队列,重新排序选择最短的两组长度并合成 q.push(smaller);///直到最终合成的是n段木板一共有的总长度,只不过合成的路径(切割费用)是两两最小的求和 } printf("%lld\n",sum); } return 0; }
[ "noreply@github.com" ]
noreply@github.com
2f2a23a14060f03fa470cb08b6081f17a2e266c6
2fc9fe67b9a2aa6e5f4c34b0a07ceeed5f8ca442
/include/DynamsoftBarcodeReader.h
f3fc98d0bb48ff92c54141d3770e77d4c63e9601
[ "MIT" ]
permissive
thinkingstorm/cmake
1ccc60e8ff515c6ac8c718b1afdb61f64073e649
df58538150a1cd1fdf48dcd455d22896be6fff88
refs/heads/master
2020-03-13T15:06:26.009401
2018-03-02T09:01:41
2018-03-02T09:01:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
10,311
h
/* * DynamsoftBarcodeReader.h * Dynamsoft Barcode Reader C/C++ API header file. * * Copyright 2017 Dynamsoft Corporation. All rights reserved. */ #ifndef __DYNAMSOFT_BARCODE_READER_H__ #define __DYNAMSOFT_BARCODE_READER_H__ #if !defined(_WIN32) && !defined(_WIN64) #define DBR_API __attribute__((visibility("default"))) typedef signed char BOOL; typedef void* HANDLE; #else #ifdef DBR_EXPORTS #define DBR_API __declspec(dllexport) #else #define DBR_API #endif #include <windows.h> #endif //1. Error Code definition #define DBR_OK 0 #define DBRERR_UNKNOWN -10000 #define DBRERR_NOMEMORY -10001 #define DBRERR_NULL_POINTER -10002 #define DBRERR_LICENSE_INVALID -10003 #define DBRERR_LICENSE_EXPIRED -10004 #define DBRERR_FILE_NOT_FOUND -10005 #define DBRERR_FILETYPE_NOT_SUPPORT -10006 #define DBRERR_BPP_NOT_SUPPORT -10007 #define DBRERR_INDEX_INVALID -10008 #define DBRERR_BARCODE_FORMAT_INVALID -10009 #define DBRERR_CUSTOM_REGION_INVALID -10010 #define DBRERR_MAX_BARCODE_NUMBER_INVALID -10011 #define DBRERR_IMAGE_READ_FAIL -10012 #define DBRERR_TIFF_READ_FAIL -10013 #define DBRERR_QR_LICENSE_INVALID -10016 #define DBRERR_1D_LICENSE_INVALID -10017 #define DBRERR_INVALID_DIB_BUFFER -10018 #define DBRERR_PDF417_LICENSE_INVALID -10019 #define DBRERR_DATAMATRIX_LICENSE_INVALID -10020 #define DBRERR_PDF_READ_FAIL -10021 #define DBRERR_PDF_DLL_MISS -10022 #define DBRERR_PAGE_NUMBER_INVALID -10023 #define DBRERR_CUSTOM_SIZE_INVALID -10024 #define DBRERR_CUSTOM_MODULESIZE_INVALID -10025 #define DBRERR_RECOGNITION_TIMEOUT -10026 //3. Enums typedef enum { BF_All = 0, BF_OneD = 0x3FF, BF_CODE_39 = 0x1, BF_CODE_128 = 0x2, BF_CODE_93 = 0x4, BF_CODABAR = 0x8, BF_ITF = 0x10, BF_EAN_13 = 0x20, BF_EAN_8 = 0x40, BF_UPC_A = 0x80, BF_UPC_E = 0x100, BF_INDUSTRIAL_25 = 0x200, BF_PDF417 = 0x2000000, BF_QR_CODE = 0x4000000, BF_DATAMATRIX = 0x8000000 }BarcodeFormat; typedef enum { ICD_Unknown, ICD_Scanner, ICD_Camera, ICD_Fax }ImageCaptureDevice; typedef enum { BCM_DarkOnLight = 0, BCM_LightOnDark = 1, BCM_DarkAndLight = 2 }BarcodeColorMode; typedef enum { SRS_Left, SRS_Top, SRS_Right, SRS_Bottom }ScanRegionSide; typedef enum { BOT_Horizontal, BOT_Vertical }BarcodeOrientationType; typedef enum { BTE_Default = 0, BTE_SHIFT_JIS_932 = 932, BTE_GB2312_936 = 936, BTE_KOREAN_949 = 949, BTE_BIG5_950 = 950, BTE_UTF16 = 1200, BTE_UTF16BE = 1201, BTE_UTF8 = 65001 }BarcodeTextEncoding; typedef enum { IPF_Binary, //0:Black, 1:White IPF_BinaryInverted, //0:White, 1:Black IPF_GrayScaled, //8bit gray IPF_NV21, //NV21: IPF_RGB_565, //16bit IPF_RGB_555, //16bit IPF_RGB_888, //24bit IPF_ARGB_8888, //32bit }ImagePixelFormat; //4. Structs #pragma pack(push) #pragma pack(1) typedef struct tagSBarcodeResult { BarcodeFormat emBarcodeFormat; char* pBarcodeData; int iBarcodeDataLength; int iLeft; int iTop; int iWidth; int iHeight; int iX1; int iY1; int iX2; int iY2; int iX3; int iY3; int iX4; int iY4; int iPageNum; #if defined(_WIN32) || defined(_WIN64) wchar_t* pBarcodeText; #else char* pBarcodeText; #endif int iAngle; int iModuleSize; BOOL bIsUnrecognized; const char* pBarcodeFormatString; } SBarcodeResult; typedef struct tagSBarcodeResultArray { int iBarcodeCount; SBarcodeResult **ppBarcodes; } SBarcodeResultArray; #pragma pack(pop) //5. C Functions #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ DBR_API void* DBR_CreateInstance(); DBR_API void DBR_DestroyInstance(void* hBarcode); DBR_API int DBR_InitLicenseEx(void* hBarcode, const char* pLicense); DBR_API void DBR_SetBarcodeFormats(void* hBarcode, int iFormat); DBR_API int DBR_GetBarcodeFormats(void* hBarcode); DBR_API void DBR_SetMaxBarcodesNumPerPage(void* hBarcode, int nCount); DBR_API int DBR_GetMaxBarcodesNumPerPage(void* hBarcode); DBR_API void DBR_SetImageCaptureDevice(void* hBarcode, ImageCaptureDevice emDevice); DBR_API ImageCaptureDevice DBR_GetImageCaptureDevice(void* hBarcode); DBR_API void DBR_SetUseOneDDeblur(void* hBarcode, BOOL bFlag); DBR_API BOOL DBR_GetUseOneDDeblur(void* hBarcode); DBR_API void DBR_SetBarcodeColorMode(void* hBarcode, BarcodeColorMode eMode); DBR_API BarcodeColorMode DBR_GetBarcodeColorMode(void* hBarcode); DBR_API void DBR_SetTimeoutPerPage(void* hBarcode, int iMilliSeconds); DBR_API int DBR_GetTimeoutPerPage(void* hBarcode); DBR_API void DBR_SetBarcodeTextEncoding(void* hBarcode, BarcodeTextEncoding emEncoding); DBR_API BarcodeTextEncoding DBR_GetBarcodeTextEncoding(void* hBarcode); DBR_API void DBR_SetReturnUnrecognizedBarcode(void* hBarcode, BOOL bFlag); DBR_API BOOL DBR_GetReturnUnrecognizedBarcode(void* hBarcode); DBR_API int DBR_AddPage(void* hBarcode, int iPage); DBR_API int DBR_GetPageCount(void* hBarcode); DBR_API int DBR_GetPage(void* hBarcode, int iIndex, int* piPage); DBR_API void DBR_ClearAllPages(void* hBarcode); DBR_API int DBR_AddRegion(void* hBarcode, int iLeft, int iTop, int iRight, int iBottom, BOOL bByPercentage); DBR_API int DBR_AddRegion2(void* hBarcode, ScanRegionSide emSide, int iPercentage); DBR_API int DBR_GetRegionCount(void* hBarcode); DBR_API int DBR_GetRegion(void* hBarcode, int iIndex, int *piLeft, int* piTop, int* piRight, int* piBottom, BOOL* pbByPercentage); DBR_API void DBR_ClearAllRegions(void* hBarcode); DBR_API int DBR_AddWidthRange(void* hBarcode, int iMinWidth, int iMaxWidth); DBR_API int DBR_GetWidthRangeCount(void* hBarcode); DBR_API int DBR_GetWidthRange(void* hBarcode, int iIndex, int* piMinWidth, int* piMaxWidth); DBR_API void DBR_ClearAllWidthRanges(void* hBarcode); DBR_API int DBR_AddHeightRange(void* hBarcode, int iMinHeight, int iMaxHeight); DBR_API int DBR_GetHeightRangeCount(void* hBarcode); DBR_API int DBR_GetHeightRange(void* hBarcode, int iIndex, int* piMinHeight, int* piMaxHeight); DBR_API void DBR_ClearAllHeightRanges(void* hBarcode); DBR_API int DBR_AddModuleSizeRange(void* hBarcode, int iMinModuleSize, int iMaxModuleSize); DBR_API int DBR_GetModuleSizeRangeCount(void* hBarcode); DBR_API int DBR_GetModuleSizeRange(void* hBarcode, int iIndex, int* piMinModuleSize, int* piMaxModuleSize); DBR_API void DBR_ClearAllModuleSizeRanges(void* hBarcode); DBR_API void DBR_AddAngleRange(void* hBarcode, int iFromAngle, int iToAngle); DBR_API void DBR_AddAngle(void* hBarcode, BarcodeOrientationType emType); DBR_API int DBR_GetAngleRangeCount(void* hBarcode); DBR_API int DBR_GetAngleRange(void* hBarcode, int iIndex, int* piFromAngle, int* piToAngle); DBR_API void DBR_ClearAllAngleRanges(void* hBarcode); DBR_API BOOL DBR_LoadSetting(void* hBarcode, const char* pJsonSetting); DBR_API int DBR_DecodeFileEx(void* hBarcode, const char* pFileName, SBarcodeResultArray **ppResults); DBR_API int DBR_DecodeBufferEx(void* hBarcode, unsigned char* pBuffer, int iWidth, int iHeight, int iStride, ImagePixelFormat format, SBarcodeResultArray **ppResults); DBR_API int DBR_DecodeStreamEx(void* hBarcode, unsigned char* pFileStream, int iFileSize, SBarcodeResultArray **ppResults); DBR_API int DBR_DecodeBase64StringEx(void* hBarcode, const char* pBase64String, SBarcodeResultArray **ppResults); DBR_API int DBR_DecodeDIBEx(void* hBarcode, HANDLE hDIB, SBarcodeResultArray **ppResults); DBR_API int DBR_FreeBarcodeResults(SBarcodeResultArray **ppResults); DBR_API const char* DBR_GetErrorString(int iErrorCode); DBR_API const char* DBR_GetVersion(); #ifdef __cplusplus } #endif /* __cplusplus */ //6. C++ class #ifdef __cplusplus class BarcodeReaderInner; class DBR_API CBarcodeReader { private: BarcodeReaderInner* m_pBarcodeReader; public: CBarcodeReader(); ~CBarcodeReader(); int InitLicense(const char* pLicense); int DecodeFile(const char* pFileName); int DecodeBufferEx(unsigned char* pBuffer, int iWidth, int iHeight, int iStride, ImagePixelFormat format); int DecodeStream(unsigned char* pFileStream, int iFileSize); int DecodeBase64String(const char* pBase64String); int DecodeDIB(HANDLE hDIB); int GetBarcodes(SBarcodeResultArray** ppResults); static void FreeBarcodeResults(SBarcodeResultArray **ppResults); void SetBarcodeFormats(int iFormat); int GetBarcodeFormats(); void SetMaxBarcodesNumPerPage(int nCount); int GetMaxBarcodesNumPerPage(); void SetImageCaptureDevice(ImageCaptureDevice emDevice); ImageCaptureDevice GetImageCaptureDevice(); void SetUseOneDDeblur(BOOL bFlag); BOOL GetUseOneDDeblur(); void SetBarcodeColorMode(BarcodeColorMode eMode); BarcodeColorMode GetBarcodeColorMode(); void SetTimeoutPerPage(int iMilliSeconds); int GetTimeoutPerPage(); void SetBarcodeTextEncoding(BarcodeTextEncoding emMode); BarcodeTextEncoding GetBarcodeTextEncoding(); void SetReturnUnrecognizedBarcode(BOOL bFlag); BOOL GetReturnUnrecognizedBarcode(); int AddPage(int iPage); int GetPageCount(); int GetPage(int iIndex, int* piPage); void ClearAllPages(); int AddRegion(int iLeft, int iTop, int iRight, int iBottom, BOOL bByPercentage); int AddRegion(ScanRegionSide emSide, int iPercentage); int GetRegionCount(); int GetRegion(int iIndex, int *piLeft, int* piTop, int* piRight, int* piBottom, BOOL* pbByPercentage); void ClearAllRegions(); int AddWidthRange(int iMinWidth, int iMaxWidth); int GetWidthRangeCount(); int GetWidthRange(int iIndex, int *piMinWidth, int* piMaxWdith); void ClearAllWidthRanges(); int AddHeightRange(int iMinHeight, int iMaxHeight); int GetHeightRangeCount(); int GetHeightRange(int iIndex, int* piMinHeight, int* piMaxHeight); void ClearAllHeightRanges(); int AddModuleSizeRange(int iMinModuleSize, int iMaxModuleSize); int GetModuleSizeRangeCount(); int GetModuleSizeRange(int iIndex, int *piMinModuleSize, int* piMaxModuleSize); void ClearAllModuleSizeRanges(); void AddAngleRange(int iFromAngle, int iToAngle); void AddAngle(BarcodeOrientationType emType); int GetAngleRangeCount(); int GetAngleRange(int iIndex, int* piFromAngle, int* piToAngle); void ClearAllAngleRanges(); BOOL LoadSetting(const char* pJsonSetting); private: CBarcodeReader(const CBarcodeReader& r); CBarcodeReader& operator = (const CBarcodeReader& r); }; #endif /* __cplusplus */ #endif
[ "lingxiao1002@gmail.com" ]
lingxiao1002@gmail.com
73f71de971cae90adbee906a6e0203758498f7a9
08fae5bd7f16809b84cf6463693732f2308ab4da
/ETS/IvRmDataLoader/EgFormat/EgFormat/stdafx.h
eaba14f6921aad9d683f13bce17fa587dab29db4
[]
no_license
psallandre/IVRM
a7738c31534e1bbff32ded5cfc7330c52b378f19
5a674d10caba23b126e9bcea982dee30eee72ee1
refs/heads/master
2021-01-21T03:22:33.658311
2014-09-24T11:47:10
2014-09-24T11:47:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,433
h
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #pragma once #ifndef STRICT #define STRICT #endif // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Allow use of features specific to Windows XP or later. #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. #endif #define _ATL_APARTMENT_THREADED #define _ATL_NO_AUTOMATIC_NAMESPACE #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit #include "resource.h" #include <atlbase.h> #include <atlcom.h> #include <windows.h> using namespace ATL;
[ "alex2172@gmail.com" ]
alex2172@gmail.com
4443929e955b520f5c58f1b542471ee0398963c7
d0dec74b14458241670a6a5ce8ee5e1402edd125
/121.cpp
4e82b6937527398b0e2356a67536b84641b7bfc0
[]
no_license
luqian2017/haizeiOJ-1
988cdafce1354b0da03ed43a60eb555f7863a8af
525d256e5162d691f611a07aaa6191516a8bedfa
refs/heads/master
2022-04-07T17:26:35.675046
2020-03-05T14:16:00
2020-03-05T14:16:00
null
0
0
null
null
null
null
UTF-8
C++
false
false
670
cpp
/************************************************************************* > File Name: 121.cpp > Author: > Mail: > Created Time: 2020年01月10日 星期五 18时32分37秒 ************************************************************************/ #include <stdio.h> int main() { char a, b; scanf("%c %c", &a, &b); if ((a == 'O' && b == 'Y') || (a == 'Y' && b == 'H') || (a == 'H' && b == 'O')) { printf("MING\n"); } else if ((a == 'Y' && b == 'O') || (a == 'H' && b == 'Y') || (a == 'O' && b == 'H')) { printf("LI\n"); } else { printf("TIE\n"); } return 0; }
[ "2573052056@qq.com" ]
2573052056@qq.com
e28f81f761b3cbaa74b72074d44d75c68a7eb6d0
b0e8090a73476a38f2c3f2caa346716f8d4d488b
/include/__audio_buffer.h
99cb4ed1f234f6a29b021157934c8de655e51d5d
[ "BSL-1.0" ]
permissive
rjammala/libstdaudio
4cce56c141653d7bcbb8b346ee819d487cb3b222
aafa1173b025da6d870f6363e553f665b0697baf
refs/heads/master
2020-05-17T11:34:19.777578
2019-04-11T15:31:33
2019-04-11T15:31:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,102
h
// libstdaudio // Copyright (c) 2018 - Timur Doumler // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #pragma once _LIBSTDAUDIO_NAMESPACE_BEGIN struct audio_buffer_order_interleaved {}; struct audio_buffer_order_deinterleaved {}; template <typename _SampleType, typename _BufferOrder> class audio_basic_buffer { public: audio_basic_buffer(_SampleType* data, size_t data_size, size_t num_channels) : _samples(data, data_size), _num_channels(num_channels) { // TODO: currently only interleaved is supported static_assert(is_same_v<_BufferOrder, audio_buffer_order_interleaved>); } size_t size_channels() const noexcept { return _num_channels; } size_t size_frames() const noexcept { return size_samples() / size_channels(); } size_t size_samples() const noexcept { return _samples.size(); } size_t size_bytes() const noexcept { return size_samples() * sizeof(_SampleType); } span<_SampleType> samples() const noexcept { return _samples; } _SampleType& operator()(size_t frame_index, size_t channel_index) { const size_t index = (_num_channels * frame_index) + channel_index; assert(index < _samples.size()); return _samples[index]; } private: span<_SampleType> _samples = {}; size_t _num_channels = 0; }; template <typename _SampleType,typename _BufferOrder> struct audio_basic_device_buffers { optional<audio_basic_buffer<_SampleType, _BufferOrder>> __input_buffer; optional<audio_basic_buffer<_SampleType, _BufferOrder>> __output_buffer; auto input_buffer() const noexcept -> optional<audio_basic_buffer<_SampleType, _BufferOrder>> { return __input_buffer; } auto output_buffer() const noexcept -> optional<audio_basic_buffer<_SampleType, _BufferOrder>> { return __output_buffer; } }; using audio_buffer = audio_basic_buffer<float, audio_buffer_order_interleaved>; using audio_device_buffers = audio_basic_device_buffers<float, audio_buffer_order_interleaved>; _LIBSTDAUDIO_NAMESPACE_END
[ "git@timur.audio" ]
git@timur.audio
c4795805f7f4d165515d6baef7ebff8b427539ff
8ea3deb1190bdbd2c3ae982747ff8c0b7968d2ef
/tree/src/adjacency.h
865b937112fec28697e34e91ba22d830a1058c06
[]
no_license
catree/MasterThesis
fb2c019c700a640cf121ff27dbdb3d09a7d387ba
5c9c42eca9258a358e270a27b38655d1b283d5b3
refs/heads/master
2020-07-20T01:08:54.064399
2014-12-24T11:43:52
2014-12-24T11:43:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
416
h
#ifndef ADJACENCY_H_ #define ADJACENCY_H_ class AdjacencyMatrix : public std::vector<Edge> { public: AdjacencyMatrix(int n) { this->n = n; resize((n + 1)*n/2); } Edge& get(int i, int j) { int tmp = i > j ? j : i; j = i > j ? i : j; i = tmp; int ind = index(i, j); return operator[](ind); } protected: int n; int index(int i, int j) { return (n * i) + j - ((i * (i+1)) / 2); } }; #endif
[ "hansg91@gmail.com" ]
hansg91@gmail.com
cb279dd32f8734bf4a79cfcd079e427a8485d9ba
450f923012c5086ca2453421ad0d86fa3f443e4b
/src/timedata.cpp
050b1076e1c549f6b9eee18fe0495cb8920b6ad3
[ "MIT" ]
permissive
mergecard/mergecard-coin
bfb456d56c33a0dbc2f190c2a73e72f66da44166
f7394a4df2b27168993feadc74a7164b8846352a
refs/heads/master
2020-03-20T23:53:55.110456
2018-06-22T00:11:05
2018-06-22T00:11:05
137,868,509
0
0
null
null
null
null
UTF-8
C++
false
false
3,611
cpp
// Copyright (c) 2014 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "timedata.h" #include "netbase.h" #include "sync.h" #include "ui_interface.h" #include "util.h" #include "utilstrencodings.h" #include <boost/foreach.hpp> using namespace std; static CCriticalSection cs_nTimeOffset; static int64_t nTimeOffset = 0; /** * "Never go to sea with two chronometers; take one or three." * Our three time sources are: * - System clock * - Median of other nodes clocks * - The user (asking the user to fix the system clock if the first two disagree) */ int64_t GetTimeOffset() { LOCK(cs_nTimeOffset); return nTimeOffset; } int64_t GetAdjustedTime() { return GetTime() + GetTimeOffset(); } static int64_t abs64(int64_t n) { return (n >= 0 ? n : -n); } void AddTimeData(const CNetAddr& ip, int64_t nTime) { int64_t nOffsetSample = nTime - GetTime(); LOCK(cs_nTimeOffset); // Ignore duplicates static set<CNetAddr> setKnown; if (!setKnown.insert(ip).second) return; // Add data static CMedianFilter<int64_t> vTimeOffsets(200, 0); vTimeOffsets.input(nOffsetSample); LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample / 60); // There is a known issue here (see issue #4521): // // - The structure vTimeOffsets contains up to 200 elements, after which // any new element added to it will not increase its size, replacing the // oldest element. // // - The condition to update nTimeOffset includes checking whether the // number of elements in vTimeOffsets is odd, which will never happen after // there are 200 elements. // // But in this case the 'bug' is protective against some attacks, and may // actually explain why we've never seen attacks which manipulate the // clock offset. // // So we should hold off on fixing this and clean it up as part of // a timing cleanup that strengthens it in a number of other ways. // if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1) { int64_t nMedian = vTimeOffsets.median(); std::vector<int64_t> vSorted = vTimeOffsets.sorted(); // Only let other nodes change our time by so much if (abs64(nMedian) < 70 * 60) { nTimeOffset = nMedian; } else { nTimeOffset = 0; static bool fDone; if (!fDone) { // If nobody has a time different than ours but within 5 minutes of ours, give a warning bool fMatch = false; BOOST_FOREACH (int64_t nOffset, vSorted) if (nOffset != 0 && abs64(nOffset) < 5 * 60) fMatch = true; if (!fMatch) { fDone = true; string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong MergeCard Core will not work properly."); strMiscWarning = strMessage; LogPrintf("*** %s\n", strMessage); uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING); } } } if (fDebug) { BOOST_FOREACH (int64_t n, vSorted) LogPrintf("%+d ", n); LogPrintf("| "); } LogPrintf("nTimeOffset = %+d (%+d minutes)\n", nTimeOffset, nTimeOffset / 60); } }
[ "office@mergecard.com" ]
office@mergecard.com
b58097a5fa4488af5338873ba9686a25eac8947d
cd3a0976a4c44ac7f8a406711942e6e9b672bd40
/LOTS/Projet/lots-cpp/covariance/Graphes.h
8b37662f19d89c07918148939f7a4465b2f6b1b3
[]
no_license
Theo0/M1S2
452ffcd5693ebb2575bab7ae4cf040426e8c0a37
513e73c2243c46b276db06835df4f18be0394ced
refs/heads/master
2021-01-10T19:44:49.393344
2015-06-01T08:27:21
2015-06-01T08:27:21
29,906,019
0
0
null
null
null
null
UTF-8
C++
false
false
527
h
#include "includes.h" class Sommets; class Aretes; using namespace std; #ifndef _Graphes #define _Graphes class Graphes { public: string nom_graphe; static int num; set<Sommets*> sommets; set<Aretes*> aretes; Graphes(); string toString(); void ajouterArete(Aretes*,Sommets*,Sommets*); void ajouterSommet(Sommets*); virtual ~Graphes(); protected: string listeSommets(); string listeAretes(); private: typename set<Sommets*>::iterator itS; typename set<Aretes*>::iterator itA; }; #endif
[ "theo341@gmail.com" ]
theo341@gmail.com
1168c2b973e7cb4fb575df5d6159aa7cbd9ce6ce
17549de67aaf44af6ab7e08a1b5483299951fd86
/Workshop/brdfReRendering/brdfReRendering/stdafx.cpp
5a5a464696c3f24a2679166c74b15737fe06b7dd
[ "MIT" ]
permissive
sky3/RadianceViewerPhotogrammetry
0c9c3ea74b1c46f8093c83def7f239e38a0a2f33
9afb362d56214175f9fe0e476a5eab5671af7b28
refs/heads/master
2021-05-03T23:38:35.791371
2016-10-24T09:46:24
2016-10-24T09:46:24
71,771,976
0
0
null
null
null
null
ISO-8859-1
C++
false
false
345
cpp
// stdafx.cpp : fichier source incluant simplement les fichiers Include standard // brdfReRendering.pch représente l'en-tête précompilé // stdafx.obj contient les informations de type précompilées #include "stdafx.h" // TODO: faites référence aux en-têtes supplémentaires nécessaires dans STDAFX.H // absents de ce fichier
[ "noreply@github.com" ]
noreply@github.com
65feb53ac7d8cfecf8b379da406fab4fb2975f65
eac19c0af63946c304cd58b0a329737cf86d0bf4
/common.h
45d75f5719f7d1e89bc365d4dde7f49202c8a37a
[]
no_license
w23/o08
a88d943663e5aa1a65f415940a3306cc014b33eb
fa432986939feec966b16f8a6cac4d15eb0f34cc
refs/heads/master
2021-01-10T22:28:46.696437
2013-08-06T18:09:27
2013-08-06T18:09:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
111
h
#pragma once #include <kapusha/core.h> #include <kapusha/math.h> #include "config.h" using namespace kapusha;
[ "me@w23.ru" ]
me@w23.ru
0621d695b4acbacd26041f827aa9a895e0168f79
e9abe3a901823f6666c4b0bd1c16e1ba17f28786
/reverse_linked_list.cpp
bd35d43914d79975086bb53068c5268a3246d609
[]
no_license
MickeyMiao7/leetcode
700d455ce17af8305bb286c6f48d4568fc75c240
1e105515ac9557d1c31823ebe162f416b4354239
refs/heads/master
2021-01-02T09:01:17.301173
2017-04-18T07:38:52
2017-04-18T07:38:52
78,620,667
0
0
null
null
null
null
UTF-8
C++
false
false
692
cpp
#include <iostream> using namespace std; struct node{ int val; node *next; node(int i): val(i), next(NULL){} }; node* reverse(node* pHead){ node *res = new node(-1); res->next = pHead; node *first = res->next; node *temp; while(first->next){ temp = first->next; first->next = temp->next; temp->next = res->next; res->next = temp; } return res->next; } int main(void){ node a(1); node b(2); node c(3); node d(4); a.next = &b; b.next = &c; c.next = &d; node *p = &a; node *s = reverse(p); while(s){ cout << s->val << endl; s = s->next; } return 0; }
[ "327191467@qq.com" ]
327191467@qq.com
b580a6aa6fb5e27a9cec887e5c2d6b4c73f84a34
00b41cf423c464d7f5ccc67f8e6a3a9e5cddc7fb
/src/WebPageContent.cpp
ecd773ce000026f1fa2a37116f3bae9b79bafc52
[ "BSD-3-Clause" ]
permissive
shortN0te/Wortuhr
b2dae6605a2479aa6b28e8d7c68df7832c130ce4
24da24b4cfc593b381ecf5d93445cebb80892a22
refs/heads/main
2023-08-28T06:09:19.204575
2021-10-04T09:07:39
2021-10-04T09:07:39
424,342,857
0
0
null
2021-11-03T18:52:21
2021-11-03T18:46:15
null
UTF-8
C++
false
false
117
cpp
// Build the generated webpage #include <Arduino.h> #include "WebPageContent.h" #include "WebPageContent.gen.inc"
[ "tali@admingilde.org" ]
tali@admingilde.org
0f0e4692e7cc4b524263a44ed5ac2271952fbf60
0b63617a487a5a6884aac1d71665e046a370db0a
/src/queue.hpp
ab2052ed9ff68c418a60dcefeaa070fc3f513003
[]
no_license
mrjvs/42-ft_containers
2b14df8a221ce2d68eca85934d862d241dbb5419
f07223c5efd208448142a4d2134971629a1dacff
refs/heads/main
2023-04-16T13:07:25.632296
2021-04-29T14:42:11
2021-04-29T14:42:11
360,851,062
0
0
null
null
null
null
UTF-8
C++
false
false
2,549
hpp
// // Created by jelle on 4/26/2021. // #ifndef QUEUE_HPP #define QUEUE_HPP #include <deque> // for default container namespace ft { template <class T, class Container = std::deque<T> > class queue { public: typedef T value_type; typedef Container container_type; typedef typename Container::size_type size_type; private: container_type _data; public: explicit queue(const container_type& ctnr = container_type()): _data(ctnr) {} bool empty() const { return _data.empty(); } size_type size() const { return _data.size(); } // access value_type &front() { return _data.front(); } const value_type &front() const { return _data.front(); } value_type &back() { return _data.back(); } const value_type &back() const { return _data.back(); } // modifier void push(const value_type &val) { _data.push_back(val); } void pop() { _data.pop_front(); } // friend operators (yes all of them) template <class A, class B> friend bool operator!=(const queue<A,B>& lhs, const queue<A,B>& rhs); template <class A, class B> friend bool operator==(const queue<A,B>& lhs, const queue<A,B>& rhs); template <class A, class B> friend bool operator<(const queue<A,B>& lhs, const queue<A,B>& rhs); template <class A, class B> friend bool operator<=(const queue<A,B>& lhs, const queue<A,B>& rhs); template <class A, class B> friend bool operator>(const queue<A,B>& lhs, const queue<A,B>& rhs); template <class A, class B> friend bool operator>=(const queue<A,B>& lhs, const queue<A,B>& rhs); }; // comparison operators template <class T, class Container> bool operator==(const queue<T,Container>& lhs, const queue<T,Container>& rhs) { return lhs._data == rhs._data; } template <class T, class Container> bool operator!=(const queue<T,Container>& lhs, const queue<T,Container>& rhs) { return lhs._data != rhs._data; } template <class T, class Container> bool operator<(const queue<T,Container>& lhs, const queue<T,Container>& rhs) { return lhs._data < rhs._data; } template <class T, class Container> bool operator<=(const queue<T,Container>& lhs, const queue<T,Container>& rhs) { return lhs._data <= rhs._data; } template <class T, class Container> bool operator>(const queue<T,Container>& lhs, const queue<T,Container>& rhs) { return lhs._data > rhs._data; } template <class T, class Container> bool operator>=(const queue<T,Container>& lhs, const queue<T,Container>& rhs) { return lhs._data >= rhs._data; } } #endif //QUEUE_HPP
[ "jellevs@gmail.com" ]
jellevs@gmail.com
464d855922c0a8e7cbe02eb88fc515617c997744
9cdf46c489666485baddeafd1efc8cae09195a71
/setup2_code/mod-globule-1.3.2/globule/event/RedirectEvent.hpp
9bf9cf9fbcde5b443b63106882462fc032c20746
[ "Apache-2.0" ]
permissive
pragya1990/globule
1b86fa02d9ec180921b4353529dbe218db3e1623
f9f368362cbb596caf6fa897d64b7451fa2825e0
HEAD
2016-08-07T19:40:56.113319
2015-05-09T18:56:16
2015-05-09T18:56:16
26,733,771
0
2
null
null
null
null
UTF-8
C++
false
false
5,097
hpp
/* Copyright (c) 2003-2006, Vrije Universiteit All rights reserved. Redistribution and use of the GLOBULE system in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Vrije Universiteit nor the names of the software authors or contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL VRIJE UNIVERSITEIT OR ANY AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This product includes software developed by the Apache Software Foundation <http://www.apache.org/>. */ #ifndef _REDIRECTEVENT_HPP #define _REDIRECTEVENT_HPP #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <httpd.h> #include <vector> #include "event/HttpReqEvent.hpp" #include "GlobuleEvent.hpp" #include "redirect/dns_policy.hpp" class DNSRecord; class gDNSRecord { friend class DNSRecord; private: gstring _name; int _type; apr_uint32_t _addr; gstring _cname; public: static const int TYPE_A; static const int TYPE_CNAME; gDNSRecord(const DNSRecord* r) throw(); gDNSRecord(const DNSRecord& r) throw(); gDNSRecord(const char* name, apr_uint32_t address) throw(); // creates a A record gDNSRecord(const char* name, const char* cname) throw(); // creates a CNAME record inline const char* name() const throw() { return _name.c_str(); }; inline int type() const throw() { return _type; }; inline apr_uint32_t addr() const throw() { return _addr; }; inline const char* cname() const throw() { return _cname.c_str(); }; }; class DNSRecord { friend class gDNSRecord; private: const char* _name; int _type; apr_uint32_t _addr; const char* _cname; public: static const int TYPE_A; static const int TYPE_CNAME; DNSRecord(Context* ctx, apr_pool_t*, Peer* r) throw(); // creates a A record DNSRecord(apr_pool_t*, const gDNSRecord* r) throw(); DNSRecord(apr_pool_t*, const gDNSRecord& r) throw(); DNSRecord(apr_pool_t*, const char* name, apr_uint32_t address) throw(); DNSRecord(apr_pool_t*, const char* name, const char* cname) throw(); inline const char* name() const throw() { return _name; }; inline int type() const throw() { return _type; }; inline apr_uint32_t addr() const throw() { return _addr; }; inline const char* cname() const throw() { return _cname; }; }; class RedirectEvent : public HttpReqEvent { private: apr_uint32_t _remoteAddress; int _count; void (*_callback)(void*, int, const std::vector<DNSRecord>&, RedirectPolicy*) throw(); void* _callback_data; public: RedirectEvent(apr_pool_t* p, Context* ctx, request_rec *req) throw() : HttpReqEvent(p, ctx, req), _remoteAddress(0), _count(1), _callback(0), _callback_data(0) { _type = REDIRECT_EVT; }; RedirectEvent(apr_pool_t* p, Context* ctx, const HttpReqEvent& req) throw() : HttpReqEvent(p, ctx, getRequest()), _remoteAddress(0), _count(1), _callback(0), _callback_data(0) { _type = REDIRECT_EVT; }; RedirectEvent(apr_pool_t* p, Context* ctx, apr_uri_t *u, apr_uint32_t clientip, int numrequested=0, void (*callback)(void*,int, const std::vector<DNSRecord>&, RedirectPolicy*)=0, void*data=0) throw() : HttpReqEvent(p, ctx, u), _remoteAddress(clientip), _count(numrequested), _callback(callback), _callback_data(data) { _type = REDIRECT_EVT; }; virtual ~RedirectEvent() throw() { }; virtual bool asynchronous() throw(); virtual GlobuleEvent* instantiateEvent() throw() { return 0; }; apr_uint32_t remoteAddress() throw(); int requestedCount() throw() { return _count; }; void callback(Context* ctx, apr_pool_t* pool, int count, std::vector<Peer*>& replicas, RedirectPolicy* policy) throw(); void callback(int count, const DNSRecord answer, RedirectPolicy* policy) throw(); }; #endif /* _REDIRECTEVENT_HPP */
[ "pragya015@gmail.com" ]
pragya015@gmail.com
0403128f0360ac68c6963cba9a419cb9dfe14ff5
c3fe6a82a9a945e4454ba15bf2a5dda67d64a0ec
/coresdk/src/test/test_udp_networking.cpp
95fcc4aae6bdfd87ae69079a128e0d7242137f82
[]
no_license
jarmstrong/splashkit
b787fa9f84f465e2f60a13051e325aa7ec4a9c49
f6098333ca119d6577718c2f9967fd5f7a85b988
refs/heads/develop
2020-07-13T21:12:14.170018
2016-09-21T11:41:51
2016-09-21T11:41:51
65,183,205
0
0
null
2016-08-08T07:37:45
2016-08-08T07:37:44
null
UTF-8
C++
false
false
1,865
cpp
// // test_udp_networking.cpp // splashkit // // Ported by James Armstrong on 15/09/2016. // #include <iostream> #include "easylogging++.h" #include "networking.h" #include "utils.h" const int LISTEN_PORTB = 5000; const int LISTEN_PORTA = LISTEN_PORTB + 1; using namespace splashkit_lib; void pause_tcp_test() { cout << "Please enter to continue;"; char input; cin >> input; } void run_udp_networking_test() { cout << "Listening for UDP connections on port " << LISTEN_PORTB << endl; server_socket server = create_server("MyServer", LISTEN_PORTB, UDP); pause_tcp_test(); cout << "Creating connection to send data to server" << endl; connection to_server = open_connection("to_server", "127.0.0.1", LISTEN_PORTB, UDP); pause_tcp_test(); cout << "Sending message to server" << endl; send_message_to("Hello UDP", to_server); delay(1000); cout << "Checking activity" << endl; check_network_activity(); cout << "Server got message: " << has_messages(server) << endl; message msg = read_message(server); cout << "Message " << message_data(msg) << endl; pause_tcp_test(); cout << "Sending message to client " << message_host(msg) << ":" << message_port(msg) << endl; connection to_client = open_connection("to_client", message_host(msg), message_port(msg), UDP); close_message(msg); cout << "Connection created" << endl; send_message_to("Hello Client", to_client); delay(100); check_network_activity(); cout << "Client got message " << has_messages("to_server") << endl; cout << "Message " << read_message_data(to_server) << endl; close_connection(to_server); cout << "Closing UDP socket on port " << LISTEN_PORTB << endl; close_server(server); cout << "Close all" << endl; close_all_connections(); close_all_servers(); }
[ "itsjarm@gmail.com" ]
itsjarm@gmail.com
b7458bc3d28435d234ce1ad4435f7c35b756a191
2cc132e2a5ea21c0af94e003e1b6d97130f46384
/surroundedRegionsUF.cc
da62948bafbf2c14623d82c0a8f9294e774397e8
[ "MIT" ]
permissive
zxylvlp/MyLeetCode
77d6bd225d21a5e441b9f6cf267ff70a9b558097
7b2fe7a5f6515c365b903511d87e6879c0b62734
refs/heads/master
2021-01-18T15:06:49.569754
2015-11-09T12:00:07
2015-11-09T12:00:07
43,247,810
1
0
null
null
null
null
UTF-8
C++
false
false
2,361
cc
#include <vector> using namespace std; class UF { private: int *id; // id[i]=parent of i int *rank; int count; public: UF(int N) { count = N; id = new int[N]; rank = new int[N]; for (int i=0; i<N; i++) { id[i] = i; rank[i] = 0; } } ~UF() { delete[] id; delete[] rank; } int find(int p) { while (p!=id[p]) { id[p] = id[id[p]]; p = id[p]; } return p; } int getCount() { return count; } bool connected(int p, int q) { return find(p) == find(q); } void connect(int p, int q) { int i = find(p); int j = find(q); if (i==j) return; if (rank[i]<rank[j]) id[i] = j; else if (rank[i]>rank[j]) id[j] = i; else { id[j] = i; rank[i]++; } count--; } }; class Solution { public: void solve(vector<vector<char>> &board) { int m = board.size(); if (m==0) return; int n = board.back().size(); UF uf(m*n+1); for (int i=0; i<m; i++) { for (int j=0; j<n; j++) { if ((i==0||i==m-1||j==0||j==n-1)&&board[i][j]=='O') uf.connect(i*n+j, m*n); else if(board[i][j]=='O') { if (board[i-1][j]=='O') uf.connect(i*n+j, (i-1)*n+j); if (board[i+1][j]=='O') uf.connect(i*n+j, (i+1)*n+j); if (board[i][j-1]=='O') uf.connect(i*n+j, i*n+j-1); if (board[i][j+1]=='O') uf.connect(i*n+j, i*n+j+1); } } } for (int i=0; i<m; i++) { for (int j=0; j<n; j++) { if (!uf.connected(i*n+j, m*n)) board[i][j] = 'X'; } } } }; int main(void) { Solution sl; }
[ "zhaoxingyu19920404@gmail.com" ]
zhaoxingyu19920404@gmail.com
df4472c3bf975083ed821849f7fca7ecce3f2ac4
761b5292d431e8ef25edfcced6292ff001d6ae58
/players.cpp
d99701ac1867b5b32725cc0012e367b00b83df21
[]
no_license
michalszubinski/tictactoe
5ceb3f9bd97313bde65d3ac9bce1802ee8264983
158a0519ba737af5adc3c40c85968b2f45c8b5e4
refs/heads/master
2020-05-15T08:03:25.625576
2019-04-18T20:36:13
2019-04-18T20:36:13
182,153,677
0
0
null
null
null
null
UTF-8
C++
false
false
1,127
cpp
#include <iostream> #include <windows.h> #include "znak.h" #include "players.h" #include "fx.h" using namespace std; void TURN(bool t, team Act, char *Map,_ob *t0, _ob *t1,char n) { c MOVE = turn(t,Act,Map); changer(t,MOVE,t0,t1); //ppos(MOVE); } c turn(bool t, team Act, char *Map, char n) { char *NewM = new char[n*n]; Ltofx(Map,NewM,t); c Move = decide(t,Act,NewM); //cout<<(int)Move.x<<endl<<(int)Move.y<<endl; if(t==0) return Move; else return rev(Move,1); } c decide(bool t, team Act, char *Map, char n) { switch(Act.playertype) { case 0: break; case 1: return player1(Map); break; case 2: break; case 3: return player3(Map,t); break; } } void changer(bool t,c pos,_ob *t0, _ob *t1, char n) { //cout<<pos.y*n + pos.x<<endl; //ppos(pos); switch(t) { case 0: t0[pos.y*n + pos.x].alive=1; break; case 1: t1[pos.y*n + pos.x].alive=1; break; } } bool possible(char *Map,c MOVE,bool team, char n) { if((int)Map[MOVE.y*n + MOVE.x]==2) return 1; else return 0; }
[ "noreply@github.com" ]
noreply@github.com
19b47cccaed5eea2f68b4ea16038e6fc260fe2c7
6e7c15468d05d76c7aa11c0e25049e143e3abc48
/ds1307_test_v1.ino
8394ac6161715979964d054d0fb645a7d4aa7e0e
[]
no_license
stressdidri/Programator-udare-sera
07ed530b5abe80caf0bb2d2fd463bd108a5cd24c
09bddc5d43220a2a1ea4be5970614d2a4f14c24a
refs/heads/master
2020-05-18T20:29:03.076877
2019-05-02T14:40:41
2019-05-02T14:40:41
184,634,547
0
0
null
2019-05-02T18:50:52
2019-05-02T18:50:52
null
UTF-8
C++
false
false
1,994
ino
// Programator pentru udare la ora fixa in sera // Partea de ceas este din exemplul de ceas din biblioteca RTClib // Iesirea pentru releu este definita pentru un LED. Pentru un modul de releu de 5V se inverseaza nivelele logice LOW si HIGH #include <Wire.h> #include "RTClib.h" RTC_DS1307 rtc; char daysOfTheWeek[7][12] = {"Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri ", "Sambata"}; int Relay = 4; const int OnHour = 21; // Definire ora de pornire const int OnMin = 33; const int OffHour = 21; // Definire ora de oprire const int OffMin = 34; void setup () { Serial.begin(57600); pinMode(Relay, OUTPUT); digitalWrite(Relay, HIGH); if (! rtc.begin()) { Serial.println("Couldn't find RTC"); while (1); } if (! rtc.isrunning()) { Serial.println("RTC is NOT running!"); // following line sets the RTC to the date & time this sketch was compiled // rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); // This line sets the RTC with an explicit date & time, for example to set // January 21, 2014 at 3am you would call: // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); } } void loop () { DateTime now = rtc.now(); Serial.print(now.year(), DEC); Serial.print('/'); Serial.print(now.month(), DEC); Serial.print('/'); Serial.print(now.day(), DEC); Serial.print(" ("); Serial.print(daysOfTheWeek[now.dayOfTheWeek()]); Serial.print(") "); Serial.print(now.hour(), DEC); Serial.print(':'); Serial.print(now.minute(), DEC); Serial.print(':'); Serial.print(now.second(), DEC); Serial.println(); Serial.println(); delay(3000); if (now.hour() == OnHour && now.minute() == OnMin) { digitalWrite(Relay,LOW); Serial.println("LIGHT ON"); } else if(now.hour() == OffHour && now.minute() == OffMin) { digitalWrite(Relay,HIGH); Serial.println("LIGHT OFF"); } }
[ "noreply@github.com" ]
noreply@github.com
d086c5a658f3b787ae96fc9fed2dc422b13530dc
9b44e4f14e8b51b5730863a6d34b3e10439770b0
/BinomialCoefficient-using-DP.cpp
1ccd72a183ea5600c9e9e87cf4205ff887ba2b29
[]
no_license
Harshitsj/APS-2020
9fe5a2febf2e86fb85a6dc79430c4eacd3098270
946224cc489f9096a279f574a3ad02e3f05336b6
refs/heads/master
2020-12-21T10:49:13.514158
2020-05-20T01:08:17
2020-05-20T01:08:17
236,408,570
0
0
null
null
null
null
UTF-8
C++
false
false
907
cpp
// A Dynamic Programming based solution that uses // table C[][] to calculate the Binomial Coefficient #include<bits/stdc++.h> using namespace std; // Returns value of Binomial Coefficient C(n, k) int binomialCoeff(int n, int k) { int C[n + 1][k + 1]; int i, j; // Caculate value of Binomial Coefficient // in bottom up manner for (i = 0; i <= n; i++) { for (j = 0; j <= min(i, k); j++) { // Base Cases if (j == 0 || j == i) C[i][j] = 1; // Calculate value using previously // stored values else C[i][j] = C[i - 1][j - 1] + C[i - 1][j]; } } return C[n][k]; } int main() { int n = 5, k = 2; cout << "Value of C[" << n << "][" << k << "] is " << binomialCoeff(n, k); }
[ "noreply@github.com" ]
noreply@github.com
58ce7ba43b173b56df80f0db0959a27e46d9ede0
01104279b836ad0d787e5792ec24159d84516cee
/MyMFC/MyMFC.h
0d9770c7bdde5ea558e9eb0e77a5d4db709ddbeb
[]
no_license
keeplearning/MyHousekeeper
3e019ee85bd781eae16f4c502b012d2e7a18e12f
4706ccbf59669979c8df135929edae53c87cde7f
refs/heads/master
2020-04-03T20:50:51.385523
2018-10-31T13:17:57
2018-10-31T13:17:57
155,560,376
8
6
null
null
null
null
GB18030
C++
false
false
449
h
// MyMFC.h: PROJECT_NAME 应用程序的主头文件 // #pragma once #ifndef __AFXWIN_H__ #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件" #endif #include "resource.h" // 主符号 // CMyMFCApp: // 有关此类的实现,请参阅 MyMFC.cpp // class CMyMFCApp : public CWinApp { public: CMyMFCApp(); // 重写 public: virtual BOOL InitInstance(); // 实现 DECLARE_MESSAGE_MAP() }; extern CMyMFCApp theApp;
[ "573887402@qq.com" ]
573887402@qq.com
6754824d7cde73406b4f76029006b3f98e6217e3
abbd7d47e42607cb4946ffbe356bed213cae0496
/BombermanGame/Portal.cpp
e055b97e31a1a6ab11299eb83742988bbb551481
[]
no_license
aagyo/Enhanced-DynaBlaster-Bomberman
af0f802b3fcc13e0fcc4d695299bc546c0f25529
78c0e27eb32c779a7cafd8e2d8a3756cb38062d3
refs/heads/master
2022-08-03T08:26:12.254772
2020-05-28T19:58:48
2020-05-28T19:58:48
264,981,412
0
0
null
null
null
null
UTF-8
C++
false
false
868
cpp
#include "Portal.h" Portal::Portal(const sf::Vector2f& position) : m_portalBlock(sf::Vector2f(m_tileSize, m_tileSize)) { m_portalBlock.setPosition(position); m_portalTexture.loadFromFile("../_external/sprites/portal.png"); m_portalBlock.setTexture(&m_portalTexture); m_animation.anim = Animation(sf::IntRect(0, 0, static_cast<uint16_t>(m_tileSize), static_cast<uint16_t>(m_tileSize)), m_numberOfFrames); } sf::RectangleShape Portal::GetShape() const { return m_portalBlock; } void Portal::SetIsVisible(bool state) { m_isVisible = state; } bool Portal::GetIsVisible() const { return m_isVisible; } sf::Vector2f Portal::GetPortalPosition() const { return m_portalBlock.getPosition(); } void Portal::Update(float elapsedTime) { m_animation.anim.Update(elapsedTime, m_animation.frameDuration); m_portalBlock.setTextureRect(m_animation.anim.GetFrame()); }
[ "oyga.icl@gmail.com" ]
oyga.icl@gmail.com
f4ceb5dd245aebe8608c89bdef43c8c686849be8
3b4e7a8a9aa18ecfd110e3de2a7f9a8aa8ffe850
/Maze_Gen_DFS/Maze_Gen_DFS/Cell.h
37106780d6aef84f9ab332285f8e492f5bbeec2e
[]
no_license
Martin-Ian/Maze-Gen-DFS
ccdfbd192247bc235b5fed1176c1acb3aa9e7036
6954a039bcd24a762d91d5efb62fb7623fffa575
refs/heads/master
2021-05-01T03:14:55.938468
2018-02-12T02:40:25
2018-02-12T02:40:25
121,188,690
2
0
null
null
null
null
UTF-8
C++
false
false
555
h
#pragma once #ifndef CELL_H #define CELL_H #include <cstdlib> using namespace std; class Cell { public: int _x; int _y; bool _wall; bool _visited; char _val; vector<bool> neighbors; Cell() { _x = -1; _y = -1; _val = '#'; for (int i = 0; i < 4; i++) { neighbors.push_back(false); } _visited = false; } Cell(char val, int x, int y) { _x = x; _y = y; _val = val; for (int i = 0; i < 4; i++) { neighbors.push_back(false); } _visited = false; } }; #endif // !CELL_H
[ "noreply@github.com" ]
noreply@github.com
0aad218011963551e9709524edff866d7d0ded25
5bd159fd522e4ab0232e3e8d35c8809f331fc08d
/tests/cpp/default/Error_if_control23.hpp
e9cb83a7c177c3fcf9f4ede04db5abeff8370b22
[ "BSL-1.0" ]
permissive
zaimoni/Z.C-
5d04bca69d517b12dc7424b06510257cd16186e0
ceef394db6b58de12db974c620bdee31dc4e5191
refs/heads/master
2022-10-15T10:23:32.948310
2022-09-25T03:57:38
2022-09-25T03:58:05
226,466,079
0
0
null
null
null
null
UTF-8
C++
false
false
156
hpp
// default\Error_if_control23.hpp // code coverage: syntax errors for unary-operator [] // (C)2009 Kenneth Boyd, license: MIT.txt #if ||[1] #endif
[ "zaimoni@zaimoni.com" ]
zaimoni@zaimoni.com
1273f6aaaff3f08a44919722c213ba9aaed996a2
2e89249cf36eecfe5d74f7a7dc03d630b89fb5b1
/Arduino_Scripts/Pulse.ino
7dae70ec22bd6ce821964fd3611ac9ebb9b53b6f
[]
no_license
usydtechlab/VirtX_Resources
af1b0b722072e636c3a3593b5a5880dc7c5800e7
d0e3d774fe3c3640976dc9abf4ebf72892b61392
refs/heads/master
2020-03-30T11:37:34.018517
2019-09-04T04:15:17
2019-09-04T04:15:17
151,183,643
1
1
null
null
null
null
UTF-8
C++
false
false
2,052
ino
/* * To measure the BPM (Beats Per Minute) from the Pulse Sensor that is connected to an Arduino. * The Pulse Sensor is a green LED (Light Emitting Diode) and a photoresistor. * The sensor measures the change in volume of blood that is flowing under your skin. * The sensor must be placed evenly over the skin, in order to get a moderately accurate, valid and reliable reading. */ // Constant Integers (Whole numbers) that relate to certain 'pins' (places) on the Arduino. const int pulsePin = A0; const int outputPin = 13; // Dynamic (Changing) Integers that change when something is done in the setup() {} or loop() {} enclosures. int sensorValue = 0; int outputValue = 0; // Runs at the beginning of the 'sketch' (program). And only runs once, initially. void setup() { // Opens a connection to the Serial Port of the Arduino, to communicate with it. Serial.begin(9600); } // Runs continiously, on loop. void loop() { // This uses a function called 'analogRead': This basically reads in the value of the Sensor (Getting the RAW data). sensorValue = analogRead(pulsePin); // This 'maps' (interprets) the values obtained from the RAW data, to values between the average Human BPM (60 - 150). outputValue = map(sensorValue, 0, 1024, 50, 150); // This uses a function called 'analogWrite': It 'writes' or records the mapped data to the output Integer pin. analogWrite(outputPin, outputValue); // This communicates (transfers) the data from the arduino to the computer, to print out the value of the mapped BPM. Serial.println(outputValue); // UNITY CODE: TO interact with the Oculus Rift, we write a specific integer so that Unity can detect when the sensor is reading a heartrate and to react to it. if (outputValue > 60) { // This checks if the heartrate is greater than 60 to be in a 'normal' range. Serial.write(2); // Say to the computer: 2. Serial.flush(); // Clean/erase all excess or unwanted data. delay(20); // Add a 20 millisecond delay to keep things from not overlapping each other. } }
[ "jim.cook@sydney.edu.au" ]
jim.cook@sydney.edu.au
90bd5d788e78b7f27a070bbcc3d9daba29efaf1d
be36d75bb62d595012078e67d22ccbf6788da439
/IOS_GEOPDF_READER/pdfium/fpdfsdk/src/fsdk_rendercontext.cpp
f96db9415032564604f42c737d93ed0c9280601a
[ "BSD-3-Clause" ]
permissive
terragotech/gpkg-lfs
099abbc495ab6e7623891bd8685bb46107b72526
ba9e8bf255d1feee68e401c1804d5d00962dd484
refs/heads/master
2022-07-20T03:55:36.733465
2017-12-08T09:13:19
2017-12-08T09:13:19
87,077,550
0
0
null
null
null
null
UTF-8
C++
false
false
1,037
cpp
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../include/fsdk_rendercontext.h" void CRenderContext::Clear() { m_pDevice = NULL; m_pContext = NULL; m_pRenderer = NULL; m_pAnnots = NULL; m_pOptions = NULL; #ifdef _WIN32_WCE m_pBitmap = NULL; m_hBitmap = NULL; #endif } CRenderContext::~CRenderContext() { delete m_pRenderer; delete m_pContext; delete m_pDevice; delete m_pAnnots; delete m_pOptions->m_pOCContext; delete m_pOptions; #ifdef _WIN32_WCE delete m_pBitmap; if (m_hBitmap) DeleteObject(m_hBitmap); #endif } IFSDK_PAUSE_Adapter::IFSDK_PAUSE_Adapter(IFSDK_PAUSE* IPause ) { m_IPause = IPause; } FX_BOOL IFSDK_PAUSE_Adapter::NeedToPauseNow() { if (m_IPause->NeedToPauseNow) { return m_IPause->NeedToPauseNow(m_IPause); } return FALSE; }
[ "ganesan.r@knetworks.co.in" ]
ganesan.r@knetworks.co.in
b89dc31500192714a1718121372b1db8066e40e1
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/renderer/extensions/i18n_hooks_delegate_unittest.cc
51159c9d8698d65cdc3daabcbe8fb94cdd3813c3
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
C++
false
false
4,504
cc
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "extensions/renderer/i18n_hooks_delegate.h" #include "base/strings/stringprintf.h" #include "extensions/common/extension_builder.h" #include "extensions/common/message_bundle.h" #include "extensions/renderer/bindings/api_binding_test_util.h" #include "extensions/renderer/native_extension_bindings_system.h" #include "extensions/renderer/native_extension_bindings_system_test_base.h" #include "extensions/renderer/script_context.h" namespace extensions { using I18nHooksDelegateTest = NativeExtensionBindingsSystemUnittest; // NOTE(devlin): This test lives in //chrome (rather than //extensions) since // the feature is defined at the chrome level (in // chrome/common/extensions/api/i18n.json). However, all the custom bindings // for i18n live at the //extensions level. We should move these to all be in // the same location. TEST_F(I18nHooksDelegateTest, TestI18nGetMessage) { scoped_refptr<const Extension> extension = ExtensionBuilder("foo").Build(); RegisterExtension(extension); v8::HandleScope handle_scope(isolate()); v8::Local<v8::Context> context = MainContext(); ScriptContext* script_context = CreateScriptContext( context, extension.get(), Feature::BLESSED_EXTENSION_CONTEXT); script_context->set_url(extension->url()); bindings_system()->UpdateBindingsForContext(script_context); // In practice, messages will be retrieved from the browser process on first // request. Since this is a unittest, pre-populate the message bundle. L10nMessagesMap messages = { {"simple", "simple message"}, {"one_placeholder", "placeholder $1 end"}, {"multi_placeholders", "placeholder $1 and $2 end"}}; GetExtensionToL10nMessagesMap()->emplace(extension->id(), messages); auto run_get_message = [context](const char* args) { SCOPED_TRACE(args); constexpr char kRunGetMessageFunction[] = "(function() { return chrome.i18n.getMessage(%s); })"; v8::Local<v8::Function> function = FunctionFromString( context, base::StringPrintf(kRunGetMessageFunction, args)); v8::Local<v8::Value> result = RunFunction(function, context, 0, nullptr); return V8ToString(result, context); }; // Simple tests. EXPECT_EQ(R"("simple message")", run_get_message("'simple'")); EXPECT_EQ(R"("placeholder foo end")", run_get_message("'one_placeholder', 'foo'")); EXPECT_EQ(R"("placeholder foo end")", run_get_message("'one_placeholder', ['foo']")); EXPECT_EQ(R"("placeholder foo and bar end")", run_get_message("'multi_placeholders', ['foo', 'bar']")); // We place the somewhat-arbitrary (but documented) limit of 9 substitutions // on the call. EXPECT_EQ("undefined", run_get_message("'one_placeholder'," "['one', 'two', 'three', 'four', 'five', 'six'," " 'seven', 'eight', 'nine', 'ten']")); // Oddities. All of these should probably behave differently. These tests are // more for documentation than for desirable functionality. // Non-string values passed in the array of placeholders will be implicitly // converted to strings... EXPECT_EQ(R"("placeholder [object Object] end")", run_get_message("'one_placeholder', [{}]")); // ... While non-string values passed as a single placeholder are silently // ignored. EXPECT_EQ(R"("placeholder end")", run_get_message("'one_placeholder', {}")); // And values can throw errors (which are silently caught) in string // conversions, in which case the value is silently ignored. EXPECT_EQ(R"("placeholder end")", run_get_message("'one_placeholder'," "[{toString() { throw new Error('haha'); } }]")); EXPECT_EQ("undefined", run_get_message("'one_placeholder'," "(function() {" " var x = [];" " Object.defineProperty(x, 0, {" " get() { throw new Error('haha'); }" " });" " return x;" " })()")); EXPECT_EQ( R"("placeholder foo end")", run_get_message("'one_placeholder'," "[{toString() { throw new Error('haha'); } }, 'foo']")); } } // namespace extensions
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
c2f905ed5db937255a41872d4148068ae2fc6333
b14a1306b432f85e9af9221124377980e8662809
/app/src/main/cpp/include/shape/BaseShape.h
f1b986f5740c2e1e311b689d3f5b9710df678088
[]
no_license
JianYeung/OpenGLES
4a47d1e962732a8357f6f06f8b453800a179c3e0
d8be85bca0cdafafd26883f3e55a251a6d6edce7
refs/heads/master
2021-08-30T14:20:54.653432
2017-12-18T09:14:15
2017-12-18T09:14:15
104,978,110
1
0
null
null
null
null
UTF-8
C++
false
false
351
h
// // Created by 70889 on 2017/9/27. // #ifndef OPENGLES_BASESHAPE_H #define OPENGLES_BASESHAPE_H #include <GLES2/gl2.h> class BaseShape { private: virtual void setMMatrix(); public: BaseShape(); virtual ~BaseShape(); virtual void init(); virtual void change(); virtual void draw(); }; #endif //OPENGLES_BASESHAPE_H
[ "jian55661818@163.com" ]
jian55661818@163.com
3b709868be2c01637092a117b736f9e70ef307f0
d3cd7126631d1429007dfa7a2e8d6e6bc6a99298
/Project0_F/main.cpp
73c5381cb5ed25270fc45e047504dd7e11596758
[]
no_license
kunalJa/Cpp-Software-Design-and-Implementation-1
b09d3703f7d8a4f83ddd878eecaa7706585e3f84
8ec81faadffe2fa72f65311660aa4468f51cba8d
refs/heads/master
2020-03-20T07:54:45.999922
2018-11-17T22:35:43
2018-11-17T22:35:43
137,294,292
0
0
null
null
null
null
UTF-8
C++
false
false
620
cpp
#include <stdio.h> int gcd(int, int); int main() { int GCDRESULT1 = gcd(48, 18); printf("GCD of %d and %d is: %d \n", 48, 18, GCDRESULT1); int GCDRESULT2 = gcd(144, 60); printf("GCD of %d and %d is: %d \n", 144, 60, GCDRESULT2); int GCDRESULT3 = gcd(65, 12); printf("GCD of %d and %d is: %d \n", 65, 12, GCDRESULT3); int GCDRESULT4 = gcd(179, 7); printf("GCD of %d and %d is: %d \n", 179, 7, GCDRESULT4); } int gcd(int x, int y){ if(x == y){ return x; } else if(x > y){ return gcd(x-y, y); } else if(y > x){ return gcd(x, y-x); } }
[ "kunaljain@utexas.edu" ]
kunaljain@utexas.edu
4a4dab7a72bb1439b44403f659d99fbac6967f6b
4e553cd337dbe885b1d513f0404317d7c01c4135
/src/sandbox/sandbox.cc
8738690f9c87bb6662675ff038e0fae4b4dbc32a
[ "BSD-3-Clause", "SunPro", "Apache-2.0" ]
permissive
nwjs/v8
396e94ce958d56ca0e6cc6c9897f9b410966dd0b
d8e980a32708efecedbdb150b877245a408ea412
refs/heads/nw71
2023-08-31T13:04:34.602085
2022-12-17T18:29:07
2022-12-17T18:29:07
4,082,135
39
55
NOASSERTION
2023-03-03T12:59:38
2012-04-20T01:52:00
C++
UTF-8
C++
false
false
11,777
cc
// Copyright 2021 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/sandbox/sandbox.h" #include "include/v8-internal.h" #include "src/base/bits.h" #include "src/base/bounded-page-allocator.h" #include "src/base/cpu.h" #include "src/base/emulated-virtual-address-subspace.h" #include "src/base/lazy-instance.h" #include "src/base/utils/random-number-generator.h" #include "src/base/virtual-address-space-page-allocator.h" #include "src/base/virtual-address-space.h" #include "src/flags/flags.h" #include "src/sandbox/sandboxed-pointer.h" #include "src/utils/allocation.h" #if defined(V8_OS_WIN) #include <windows.h> // This has to come after windows.h. #include <versionhelpers.h> // For IsWindows8Point1OrGreater(). #endif namespace v8 { namespace internal { #ifdef V8_ENABLE_SANDBOX // Best-effort helper function to determine the size of the userspace virtual // address space. Used to determine appropriate sandbox size and placement. static Address DetermineAddressSpaceLimit() { #ifndef V8_TARGET_ARCH_64_BIT #error Unsupported target architecture. #endif // Assume 48 bits by default, which seems to be the most common configuration. constexpr unsigned kDefaultVirtualAddressBits = 48; // 36 bits should realistically be the lowest value we could ever see. constexpr unsigned kMinVirtualAddressBits = 36; constexpr unsigned kMaxVirtualAddressBits = 64; Address virtual_address_bits = kDefaultVirtualAddressBits; #if defined(V8_TARGET_ARCH_X64) base::CPU cpu; if (cpu.exposes_num_virtual_address_bits()) { virtual_address_bits = cpu.num_virtual_address_bits(); } #endif // V8_TARGET_ARCH_X64 #if defined(V8_TARGET_ARCH_ARM64) && defined(V8_TARGET_OS_ANDROID) // On Arm64 Android assume a 40-bit virtual address space (39 bits for // userspace and kernel each) as that appears to be the most common // configuration and there seems to be no easy way to retrieve the actual // number of virtual address bits from the CPU in userspace. virtual_address_bits = 40; #endif // Guard against nonsensical values. if (virtual_address_bits < kMinVirtualAddressBits || virtual_address_bits > kMaxVirtualAddressBits) { virtual_address_bits = kDefaultVirtualAddressBits; } // Assume virtual address space is split 50/50 between userspace and kernel. Address userspace_virtual_address_bits = virtual_address_bits - 1; Address address_space_limit = 1ULL << userspace_virtual_address_bits; #if defined(V8_OS_WIN_X64) if (!IsWindows8Point1OrGreater()) { // On Windows pre 8.1 userspace is limited to 8TB on X64. See // https://docs.microsoft.com/en-us/windows/win32/memory/memory-limits-for-windows-releases address_space_limit = 8ULL * TB; } #endif // V8_OS_WIN_X64 return address_space_limit; } void Sandbox::Initialize(v8::VirtualAddressSpace* vas) { // Take the number of virtual address bits into account when determining the // size of the address space reservation backing the sandbox. For example, if // there are only 40 bits available, split evenly between userspace and // kernel, then userspace can only address 512GB and so we use a quarter of // that, 128GB, as maximum reservation size. Address address_space_limit = DetermineAddressSpaceLimit(); // Note: this is technically the maximum reservation size excluding the guard // regions (which are not created for partially-reserved sandboxes). size_t max_reservation_size = address_space_limit / 4; // In any case, the sandbox should be smaller than our address space since we // otherwise wouldn't always be able to allocate objects inside of it. CHECK_LT(kSandboxSize, address_space_limit); #if defined(V8_OS_WIN) if (!IsWindows8Point1OrGreater()) { // On Windows pre 8.1, reserving virtual memory is an expensive operation, // apparently because the OS already charges for the memory required for // all page table entries. For example, a 1TB reservation increases private // memory usage by 2GB. As such, it is not possible to create a proper // sandbox there and so a partially reserved sandbox is created which // doesn't reserve most of the virtual memory, and so doesn't incur the // cost, but also doesn't provide the desired security benefits. max_reservation_size = kSandboxMinimumReservationSize; } #endif // V8_OS_WIN if (!vas->CanAllocateSubspaces()) { // If we cannot create virtual memory subspaces, we also need to fall back // to creating a partially reserved sandbox. In practice, this should only // happen on Windows version before Windows 10, maybe including early // Windows 10 releases, where the necessary memory management APIs, in // particular, VirtualAlloc2, are not available. This check should also in // practice subsume the preceeding one for Windows 8 and earlier, but we'll // keep both just to be sure since there the partially reserved sandbox is // technically required for a different reason (large virtual memory // reservations being too expensive). max_reservation_size = kSandboxMinimumReservationSize; } // If the maximum reservation size is less than the size of the sandbox, we // can only create a partially-reserved sandbox. if (max_reservation_size < kSandboxSize) { DCHECK_GE(max_reservation_size, kSandboxMinimumReservationSize); InitializeAsPartiallyReservedSandbox(vas, kSandboxSize, max_reservation_size); } else { constexpr bool use_guard_regions = true; bool success = Initialize(vas, kSandboxSize, use_guard_regions); #ifdef V8_ENABLE_SANDBOX // If sandboxed pointers are enabled, we need the sandbox to be initialized, // so fall back to creating a partially reserved sandbox. if (!success) { // Try halving the size of the backing reservation until the minimum // reservation size is reached. size_t next_reservation_size = kSandboxSize / 2; while (!success && next_reservation_size >= kSandboxMinimumReservationSize) { success = InitializeAsPartiallyReservedSandbox(vas, kSandboxSize, next_reservation_size); next_reservation_size /= 2; } } #endif // V8_ENABLE_SANDBOX } if (!initialized_) { V8::FatalProcessOutOfMemory( nullptr, "Failed to reserve the virtual address space for the V8 sandbox"); } } bool Sandbox::Initialize(v8::VirtualAddressSpace* vas, size_t size, bool use_guard_regions) { CHECK(!initialized_); CHECK(base::bits::IsPowerOfTwo(size)); CHECK(vas->CanAllocateSubspaces()); size_t reservation_size = size; if (use_guard_regions) { reservation_size += 2 * kSandboxGuardRegionSize; } Address hint = RoundDown(vas->RandomPageAddress(), kSandboxAlignment); // There should be no executable pages mapped inside the sandbox since // those could be corrupted by an attacker and therefore pose a security // risk. Furthermore, allowing executable mappings in the sandbox requires // MAP_JIT on macOS, which causes fork() to become excessively slow // (multiple seconds or even minutes for a 1TB sandbox on macOS 12.X), in // turn causing tests to time out. As such, the maximum page permission // inside the sandbox should be read + write. address_space_ = vas->AllocateSubspace( hint, reservation_size, kSandboxAlignment, PagePermissions::kReadWrite); if (!address_space_) return false; reservation_base_ = address_space_->base(); base_ = reservation_base_ + (use_guard_regions ? kSandboxGuardRegionSize : 0); size_ = size; end_ = base_ + size_; reservation_size_ = reservation_size; sandbox_page_allocator_ = std::make_unique<base::VirtualAddressSpacePageAllocator>( address_space_.get()); if (use_guard_regions) { Address front = reservation_base_; Address back = end_; // These must succeed since nothing was allocated in the subspace yet. CHECK(address_space_->AllocateGuardRegion(front, kSandboxGuardRegionSize)); CHECK(address_space_->AllocateGuardRegion(back, kSandboxGuardRegionSize)); } initialized_ = true; InitializeConstants(); DCHECK(!is_partially_reserved()); return true; } bool Sandbox::InitializeAsPartiallyReservedSandbox(v8::VirtualAddressSpace* vas, size_t size, size_t size_to_reserve) { CHECK(!initialized_); CHECK(base::bits::IsPowerOfTwo(size)); CHECK(base::bits::IsPowerOfTwo(size_to_reserve)); CHECK_LT(size_to_reserve, size); // Use a custom random number generator here to ensure that we get uniformly // distributed random numbers. We figure out the available address space // ourselves, and so are potentially better positioned to determine a good // base address for the sandbox than the embedder. base::RandomNumberGenerator rng; if (v8_flags.random_seed != 0) { rng.SetSeed(v8_flags.random_seed); } // We try to ensure that base + size is still (mostly) within the process' // address space, even though we only reserve a fraction of the memory. For // that, we attempt to map the sandbox into the first half of the usable // address space. This keeps the implementation simple and should, In any // realistic scenario, leave plenty of space after the actual reservation. Address address_space_end = DetermineAddressSpaceLimit(); Address highest_allowed_address = address_space_end / 2; DCHECK(base::bits::IsPowerOfTwo(highest_allowed_address)); constexpr int kMaxAttempts = 10; for (int i = 1; i <= kMaxAttempts; i++) { Address hint = rng.NextInt64() % highest_allowed_address; hint = RoundDown(hint, kSandboxAlignment); reservation_base_ = vas->AllocatePages( hint, size_to_reserve, kSandboxAlignment, PagePermissions::kNoAccess); if (!reservation_base_) return false; // Take this base if it meets the requirements or if this is the last // attempt. if (reservation_base_ <= highest_allowed_address || i == kMaxAttempts) break; // Can't use this base, so free the reservation and try again vas->FreePages(reservation_base_, size_to_reserve); reservation_base_ = kNullAddress; } DCHECK(reservation_base_); base_ = reservation_base_; size_ = size; end_ = base_ + size_; reservation_size_ = size_to_reserve; initialized_ = true; address_space_ = std::make_unique<base::EmulatedVirtualAddressSubspace>( vas, reservation_base_, reservation_size_, size_); sandbox_page_allocator_ = std::make_unique<base::VirtualAddressSpacePageAllocator>( address_space_.get()); InitializeConstants(); DCHECK(is_partially_reserved()); return true; } void Sandbox::InitializeConstants() { #ifdef V8_ENABLE_SANDBOX // Place the empty backing store buffer at the end of the sandbox, so that any // accidental access to it will most likely hit a guard page. constants_.set_empty_backing_store_buffer(base_ + size_ - 1); #endif } void Sandbox::TearDown() { if (initialized_) { // This destroys the sub space and frees the underlying reservation. address_space_.reset(); sandbox_page_allocator_.reset(); base_ = kNullAddress; end_ = kNullAddress; size_ = 0; reservation_base_ = kNullAddress; reservation_size_ = 0; initialized_ = false; #ifdef V8_ENABLE_SANDBOX constants_.Reset(); #endif } } #endif // V8_ENABLE_SANDBOX #ifdef V8_ENABLE_SANDBOX DEFINE_LAZY_LEAKY_OBJECT_GETTER(Sandbox, GetProcessWideSandbox) #endif } // namespace internal } // namespace v8
[ "roger@nwjs.io" ]
roger@nwjs.io
65c93ab66ca072eb0e3634893d0a5e16b7336e08
d701eb217f25cad4b9db02dfcb64d14a674ac427
/bike-leds-identical/utilities.ino
ac806c98ebf1f2c95cf1fa2571b97e94a12463b1
[]
no_license
climent/emmanuel-cron-code
4be4c06a0e410cdbb06524c30e0d4af9101a6882
e80bbb5e2463e86ad049cbea85bb2f0c5a0c3c11
refs/heads/master
2020-03-31T00:27:51.985902
2018-10-05T15:23:30
2018-10-05T15:23:30
151,735,708
0
0
null
null
null
null
UTF-8
C++
false
false
10,138
ino
//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // ----- READ UTILITIES uint16_t analogRead1000(uint8_t pin, uint16_t minValue, uint16_t maxValue) { // Analog values are normally from 0-1023, but potentiometers are not... // the most reliable values. This method reads values from 10 to 1000 (a // range of 1,000 values) and maps them to the given min and max values. uint16_t value = map(analogRead(pin), 0, 1000, minValue, maxValue); return constrain(value, minValue, maxValue); } uint8_t average(uint8_t buffer[], uint8_t count, uint8_t lastValue) { uint16_t total = 0; for (uint8_t b = 0; b < count - 1; b++) { buffer[b] = buffer[b + 1]; total += buffer[b]; } buffer[count - 1] = lastValue; total += lastValue; return total / count; } uint16_t average(uint16_t buffer[], uint8_t count, uint16_t lastValue) { uint32_t total = 0; for (uint8_t b = 0; b < count - 1; b++) { buffer[b] = buffer[b + 1]; total += buffer[b]; } buffer[count - 1] = lastValue; total += lastValue; return total / count; } // ----- FRAME UTILITIES void increaseFrameCounter(uint16_t *frameCounter, uint16_t increment) { // UINT16_MAX = 65535. Next value loops back and is 0. if (UINT16_MAX - increment < *frameCounter) { increment -= UINT16_MAX - *frameCounter; *frameCounter = increment; } else { *frameCounter = *frameCounter + increment; } } bool frameMultipleOf(uint16_t frameCounter, uint16_t mod) { return frameCounter % mod == 0; } // Returns the current frame step given a frame rate and a number of steps. // Returns a value between 0 and (steps - 1). // // This is used when a method wants to know "where it is" in an animation. For // example, if an animation lights 30 pixels in succession, it would have 30 // steps. The time between each animation would be the frame rate (e.g. 3 // frames). uint16_t frameStep(uint16_t frameRate, uint16_t steps) { // Suppose we're at frame 28, the frame rate of the method is 3 and // there are 6 steps in the animation: // (28 / 3) % 6 = 9 % 6 = 3 return (videoFrameCounter / frameRate) % steps; } // Returns a value within a range based on the value of param. // If param is < CUSTOM_ANALOG_OPTION_1_THRESHOLD, it returns a range between // minValue and maxValue based on the current beat level. The higher the beat // level, the closer to maxValue the returned value is. // If param is >= CUSTOM_ANALOG_OPTION_1_THRESHOLD, it returns a value between // minValue and maxValue mapped on the value of param. uint16_t getValueInRangePotentiallyMappedByBeat(uint16_t param, uint16_t minValue, uint16_t maxValue) { return getValueInRangePotentiallyMappedByBeat( param, minValue, maxValue, false /* reverseBeat */); } // Same as above, but if value is returned by beat and the beat is high, the // minimum value is returned instead of the maximum value. uint16_t getValueInRangePotentiallyMappedByBeatReverse(uint16_t param, uint16_t minValue, uint16_t maxValue) { return getValueInRangePotentiallyMappedByBeat( param, minValue, maxValue, true /* reverseBeat */); } uint16_t getValueInRangePotentiallyMappedByBeat(uint16_t param, uint16_t minValue, uint16_t maxValue, boolean reverseBeat) { uint16_t value; if (param < CUSTOM_ANALOG_OPTION_1_THRESHOLD) { uint16_t minMappedValue; uint16_t maxMappedValue; if (reverseBeat) { minMappedValue = maxValue; // Goes under to facilitate accessing first value. maxMappedValue = minValue > 0 ? minValue - 1 : 0; } else { minMappedValue = minValue; // Goes over to facilitate accessing last value. maxMappedValue = maxValue + 1; } value = map(beatLevel, 0, MICROPHONE_DC_OFFSET * 2, minMappedValue, maxMappedValue); } else { value = map(param, CUSTOM_ANALOG_OPTION_1_THRESHOLD, MAX_ANALOG_VALUE_PARAM, minValue, // Goes over to facilitate accessing last value. maxValue + 1); } return constrain(value, minValue, maxValue); } // ----- DISPLAY UTILITIES // Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. // Returned value is scaled down by the current brightness. uint32_t scaledWheel(uint8_t wheelPos) { return scaledColor(wheel(wheelPos)); } // Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. uint32_t wheel(uint8_t wheelPos) { wheelPos = 255 - wheelPos; if (wheelPos < 85) { return Adafruit_NeoPixel::Color(255 - wheelPos * 3, 0, wheelPos * 3); } if (wheelPos < 170) { wheelPos -= 85; return Adafruit_NeoPixel::Color(0, wheelPos * 3, 255 - wheelPos * 3); } wheelPos -= 170; return Adafruit_NeoPixel::Color(wheelPos * 3, 255 - wheelPos * 3, 0); } // Input a value 0 to 255 to get a color value. // The colours are a VU Meter (blue --> green --> red). // Returned value is scaled down by the current brightness. // // Over this value, all mapped pixels will be red. This gives an ability to // show a "tail" of red pixels. const uint8_t RED_THRESHOLD = 220; uint32_t scaledVuMeter(uint8_t vuMeterPos) { uint8_t r, g, b; if (vuMeterPos >= RED_THRESHOLD) { r = 255; g = 0; b = 0; } else if (vuMeterPos < RED_THRESHOLD / 2) { r = 0; g = map(vuMeterPos, 0, RED_THRESHOLD / 2, 0, 255); b = 255 - g; } else { r = map(vuMeterPos, RED_THRESHOLD / 2, RED_THRESHOLD, 0, 255); g = 255 - r; b = 0; } return scaledColor(r, g, b); } // Returns the given color expressed as its components, scaled down by the // current brightness. uint32_t scaledColor(uint8_t r, uint8_t g, uint8_t b) { float brightnessRatio = (float) brightness / (float) MAX_BRIGHTNESS; float scaledr = brightnessRatio * (float) r; float scaledg = brightnessRatio * (float) g; float scaledb = brightnessRatio * (float) b; return Adafruit_NeoPixel::Color( (uint8_t) scaledr, (uint8_t) scaledg, (uint8_t) scaledb); } // Returns the given color expressed as a 32 bits int, scaled down by the // current brightness. uint32_t scaledColor(uint32_t color) { return scaledColor((color & 0x00ff0000UL) >> 16, (color & 0x0000ff00UL) >> 8, (color & 0x000000ffUL)); } // Fades the given color using the given threshold and decay. If any of the // components is equal or lower than the threshold, sets it to 0. Otherwise, // lowers the color by max(1, component x decay / 256). uint32_t fadeColor(uint32_t color, uint8_t threshold, uint8_t decay) { uint8_t r = (color & 0x00ff0000UL) >> 16; uint8_t g = (color & 0x0000ff00UL) >> 8; uint8_t b = (color & 0x000000ffUL); r = (r <= threshold) ? 0 : r - max(1, r * decay / 256); g = (g <= threshold) ? 0 : g - max(1, g * decay / 256); b = (b <= threshold) ? 0 : b - max(1, b * decay / 256); return Adafruit_NeoPixel::Color(r, g, b); } // ----- STRIPS UTILITIES // Sets the color of a pixel position on the center strips. Translates the given // position from 0-29 to its actual position based on how the strip is tied // around the bike. void setCenterPixelColor(uint8_t pixel, uint32_t color) { pixel = constrain(pixel, 0, (LEDS_PER_STRIP_COMMON / 2) - 1); if (REVERSE_ALL_EFFECTS) { pixel = (LEDS_PER_STRIP_COMMON / 2) - 1 - pixel; } // Translate pixel position to actual position on physical strip. // 38 first pixels are on right/left center bar (19 each side), then // 22 next pixels are on bar under saddle (11 each side). // Thus the following positions represent each side: // - Start (vertical bar) 49...59; 0...18 End (center bar) // - Start (vertical bar) 48...19 End (center bar) // First side if (pixel < 11) { strips[0].setPixelColor(49 + pixel, color); } else { // Pixel can be 11-29 strips[0].setPixelColor(pixel - 11, color); } // Second side // Pixel can be 0-29 strips[0].setPixelColor(48 - pixel, color); } // Sets the color of a pixel position on the side strips. void setSidePixelColor(uint8_t pixel, uint32_t color) { pixel = constrain(pixel, 0, LEDS_PER_STRIP_COMMON - 1); if (REVERSE_ALL_EFFECTS) { pixel = LEDS_PER_STRIP_COMMON - 1 - pixel; } strips[1].setPixelColor(pixel, color); strips[2].setPixelColor(pixel, color); } // Clears the strips memory (does not actually switch off the LEDs). void clearStrips() { for (uint8_t s = 0; s < STRIPS_COUNT; s++) { strips[s].clear(); } } // Returns a pointer to one of the side strips. Adafruit_NeoPixel * getSideStrip() { return &strips[1]; } // ---- SOUND PROCESSING UTILITIES // Calculation of constants: // http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html // Original code was for a Butterworth filter running at 5,000 Hz: // http://damian.pecke.tt/beat-detection-on-the-arduino // 20 - 200hz Single Pole Bandpass IIR Filter (Butterworth 1500Hz sampling rate) float butter1500_bandpass_20hz_200hz(float sample) { static float bassSamplesX[3] = {0.f, 0.f, 0.f}; static float bassSamplesY[3] = {0.f, 0.f, 0.f}; bassSamplesX[0] = bassSamplesX[1]; bassSamplesX[1] = bassSamplesX[2]; bassSamplesX[2] = sample / 3.291072859e+00f; bassSamplesY[0] = bassSamplesY[1]; bassSamplesY[1] = bassSamplesY[2]; bassSamplesY[2] = (bassSamplesX[2] - bassSamplesX[0]) + (-0.4327386423f * bassSamplesY[0]) + (1.3802466192f * bassSamplesY[1]); return bassSamplesY[2]; } // 10hz Single Pole Lowpass IIR Filter (Butterworth 1500Hz sampling rate) float butter1500_lowpass_10hz(float sample) { //10hz low pass static float envSamplesX[2] = {0.f, 0.f}; static float envSamplesY[2] = {0.f, 0.f}; envSamplesX[0] = envSamplesX[1]; envSamplesX[1] = sample / 4.873950141e+01f; envSamplesY[0] = envSamplesY[1]; envSamplesY[1] = (envSamplesX[0] + envSamplesX[1]) + (0.9589655220f * envSamplesY[0]); return envSamplesY[1]; }
[ "climent@gmail.com" ]
climent@gmail.com
d5cf8e89cbc4d9c7f0e192a776259f350df1014e
623a8be7e988b4006c82f25874e7570312089b96
/dpss/src/qvgeapp/src/CNodeEdgePropertiesUI.h
369fbd4fe19399bfd43690ec9effa8473b271e23
[]
no_license
ArsMasiuk/DPSE
c8f30779bbff823c42552fe23bd0c867e122d314
f04446545d73d19a130eb3a565ad46bf7008eb27
refs/heads/master
2021-01-19T04:08:22.592215
2019-11-07T22:18:57
2019-11-07T22:18:57
84,427,904
2
0
null
null
null
null
UTF-8
C++
false
false
1,427
h
/* This file is a part of QVGE - Qt Visual Graph Editor (c) 2016-2018 Ars L. Masiuk (ars.masiuk@gmail.com) It can be used freely, maintaining the information above. */ #ifndef CNODEPROPERTIESUI_H #define CNODEPROPERTIESUI_H #include <QWidget> #include <QVariant> class CEditorScene; class CNodeEditorScene; namespace Ui { class CNodeEdgePropertiesUI; } class CNodeEdgePropertiesUI : public QWidget { Q_OBJECT public: explicit CNodeEdgePropertiesUI(QWidget *parent = 0); ~CNodeEdgePropertiesUI(); void setScene(CNodeEditorScene* scene); protected: void connectSignals(CEditorScene* scene); void onSceneAttached(CEditorScene* scene); void onSceneDetached(CEditorScene* scene); protected Q_SLOTS: void onSceneChanged(); void onSelectionChanged(); void on_NodeColor_activated(const QColor &color); void on_NodeShape_activated(QVariant data); void on_NodeSize_valueChanged(int value); void on_EdgeColor_activated(const QColor &color); void on_EdgeWeight_valueChanged(double value); void on_EdgeStyle_activated(QVariant data); void on_EdgeDirection_activated(QVariant data); void on_LabelFont_activated(const QFont &font); void on_LabelColor_activated(const QColor &color); void on_LabelSize_valueChanged(int value); private: CNodeEditorScene *m_scene; bool m_updateLock; Ui::CNodeEdgePropertiesUI *ui; }; #endif // CNODEPROPERTIESUI_H
[ "ars.masiuk@gmail.com" ]
ars.masiuk@gmail.com
4e8978ae48b037265058da4cda0c0542a98050a3
5608723d4679080cf88d7ed25b10224e508e99a2
/Codeforces/686/686_A.cpp
0e0c908bf87c5cf1115afd7fe519139d867dba6a
[]
no_license
AndreiMuntea/Contests
1a32e01f4ea19055529cb8206faed26381ef00b8
f76b00d36ce737a1921bdca946bc30eb476dca14
refs/heads/master
2020-04-14T20:43:12.897067
2020-01-03T11:38:56
2020-01-03T11:38:56
164,104,337
1
0
null
null
null
null
UTF-8
C++
false
false
599
cpp
// https://codeforces.com/contest/686/problem/A // https://codeforces.com/contest/686/submission/18716299 #ifndef _CRT_NONSTDC_NO_WARNINGS #define _CRT_NONSTDC_NO_WARNINGS #include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <vector> using namespace std; int main() { long long n, x, d, ct = 0; char sign; scanf("%lld %lld", &n, &x); while (n--) { scanf("%c %c %lld", &sign, &sign, &d); (sign == '+') ? x += d : ((x >= d) ? x -= d : ct++); } printf("%lld %lld \n", x, ct); return EXIT_SUCCESS; } #endif //_CRT_NONSTDC_NO_WARNINGS
[ "amuntea@bitdefender.com" ]
amuntea@bitdefender.com
603d4bc408209daf872d9c76939b4f4f6b2492de
77cf860172de4e72afd39799c45ad82d7652b23d
/Chapter 16/16.64.cc
0d33aa13f8134c5ac17c944ada30a00cbc37fecb
[]
no_license
roycefanproxy/CPP_Primer_5th
ed8c515ff27ed304c71668899a7f3fea65a302e8
449191713d449eb24be394103b73e2b417d52973
refs/heads/master
2021-05-31T08:26:41.242545
2016-01-24T16:33:22
2016-01-24T16:33:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
755
cc
#include <iostream> #include <string> #include <cstring> #include <vector> template <typename T1> unsigned find(const std::vector<T1>& con) { T1 val; std::cin >> val; unsigned ret = 0; for(const auto& x : con) if(val == x) ++ret; return ret; } template <> unsigned find(const std::vector<const char*>& con) { char val[20]; std::cin >> val; unsigned ret = 0; for(const auto& x : con) if(strcmp(x, val) == 0) ++ret; return ret; } int main() { std::vector<const char*> vcc; vcc.push_back("one"); vcc.push_back("two"); vcc.push_back("three"); vcc.push_back("four"); vcc.push_back("five"); std::cout << find(vcc) << std::endl; return 0; }
[ "fchunhuei@gmail.com" ]
fchunhuei@gmail.com
83b15b2c356c7d5fdc6feaa281f9f878e68f5ef5
38d3e2040fc43b83cc2c756af462c228532379be
/UNLI/Materias/Modelos y Algoritmos para Videojuegos II/Practicas/U4/TP4/TP4/GameObject.h
1f283158ca35ebf9019f9b28fd22b219c69e396c
[]
no_license
dexter1986/unli
1690314412daea39b512b03d4e8905de1300b71d
7496bd2162a6170b7e4bb8d54370bdd4f1a700bf
refs/heads/master
2016-09-06T15:10:20.157402
2015-03-13T03:26:34
2015-03-13T03:26:34
40,614,367
1
0
null
null
null
null
UTF-8
C++
false
false
1,231
h
#pragma once #include <list> #include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include "imageManager.h" #include "PhysicManager.h" using namespace sf; using namespace std; class GameObject { private: Sprite _sprite; protected: //cuerpo de box2d b2Body* _controlBody; b2Fixture* _fixture; bool _isLeft; bool _isRight; int _width; int _height; bool _isEnable; bool _isInitPhysic; std::string _textureName; Vector2f _position; public: bool _isNoFlip; bool _isManualFlip; void ManualFlip(); const FloatRect& GetBound(); virtual const Drawable& DrawObject(); bool Enable(); void Disable(); virtual void Draw(RenderWindow* wnd); void SetPosition(float x,float y); const Vector2f& GetPosition(); virtual void InitPhysic(); virtual void Init(); virtual void UpdatePoolEvents(Event& evt); virtual void Update(); virtual void CheckCollitions(bool isColl); virtual bool TestCollitions(GameObject& target); virtual void UpdatePhysics(); virtual void CenterOrigin(); virtual void Rotate(float ang); virtual void Flip(); virtual void Size(float factorX, float factorY); virtual void Move(); GameObject(); virtual ~GameObject(); };
[ "oscar.msdn@gmail.com" ]
oscar.msdn@gmail.com
b95373532b06d7a180869d47c73986b7506a8eaf
f284009b01e9a77b2406e8ad81e5aeac97335c5f
/src/irc.cpp
0e1858523635f985ac709c367985ce191b032a9d
[ "MIT" ]
permissive
wemcoin/wmcoin
379d2940cd3b92235118c46dfd5ded464e8b7fcc
b18ba40143fee12295993509d1e45d4f080c3644
refs/heads/master
2021-01-21T04:59:25.953381
2016-06-19T17:01:45
2016-06-19T17:01:45
59,070,306
0
1
null
null
null
null
UTF-8
C++
false
false
10,919
cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "irc.h" #include "net.h" #include "strlcpy.h" #include "base58.h" using namespace std; using namespace boost; int nGotIRCAddresses = 0; void ThreadIRCSeed2(void* parg); #pragma pack(push, 1) struct ircaddr { struct in_addr ip; short port; }; #pragma pack(pop) string EncodeAddress(const CService& addr) { struct ircaddr tmp; if (addr.GetInAddr(&tmp.ip)) { tmp.port = htons(addr.GetPort()); vector<unsigned char> vch(UBEGIN(tmp), UEND(tmp)); return string("u") + EncodeBase58Check(vch); } return ""; } bool DecodeAddress(string str, CService& addr) { vector<unsigned char> vch; if (!DecodeBase58Check(str.substr(1), vch)) return false; struct ircaddr tmp; if (vch.size() != sizeof(tmp)) return false; memcpy(&tmp, &vch[0], sizeof(tmp)); addr = CService(tmp.ip, ntohs(tmp.port)); return true; } static bool Send(SOCKET hSocket, const char* pszSend) { if (strstr(pszSend, "PONG") != pszSend) printf("IRC SENDING: %s\n", pszSend); const char* psz = pszSend; const char* pszEnd = psz + strlen(psz); while (psz < pszEnd) { int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL); if (ret < 0) return false; psz += ret; } return true; } bool RecvLineIRC(SOCKET hSocket, string& strLine) { loop { bool fRet = RecvLine(hSocket, strLine); if (fRet) { if (fShutdown) return false; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() >= 1 && vWords[0] == "PING") { strLine[1] = 'O'; strLine += '\r'; Send(hSocket, strLine.c_str()); continue; } } return fRet; } } int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL) { loop { string strLine; strLine.reserve(10000); if (!RecvLineIRC(hSocket, strLine)) return 0; printf("IRC %s\n", strLine.c_str()); if (psz1 && strLine.find(psz1) != string::npos) return 1; if (psz2 && strLine.find(psz2) != string::npos) return 2; if (psz3 && strLine.find(psz3) != string::npos) return 3; if (psz4 && strLine.find(psz4) != string::npos) return 4; } } bool Wait(int nSeconds) { if (fShutdown) return false; printf("IRC waiting %d seconds to reconnect\n", nSeconds); for (int i = 0; i < nSeconds; i++) { if (fShutdown) return false; Sleep(1000); } return true; } bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet) { strRet.clear(); loop { string strLine; if (!RecvLineIRC(hSocket, strLine)) return false; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() < 2) continue; if (vWords[1] == psz1) { printf("IRC %s\n", strLine.c_str()); strRet = strLine; return true; } } } bool GetIPFromIRC(SOCKET hSocket, string strMyName, CNetAddr& ipRet) { Send(hSocket, strprintf("USERHOST %s\r", strMyName.c_str()).c_str()); string strLine; if (!RecvCodeLine(hSocket, "302", strLine)) return false; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() < 4) return false; string str = vWords[3]; if (str.rfind("@") == string::npos) return false; string strHost = str.substr(str.rfind("@")+1); // Hybrid IRC used by lfnet always returns IP when you userhost yourself, // but in case another IRC is ever used this should work. printf("GetIPFromIRC() got userhost %s\n", strHost.c_str()); CNetAddr addr(strHost, true); if (!addr.IsValid()) return false; ipRet = addr; return true; } void ThreadIRCSeed(void* parg) { // Make this thread recognisable as the IRC seeding thread RenameThread("bitcoin-ircseed"); try { ThreadIRCSeed2(parg); } catch (std::exception& e) { PrintExceptionContinue(&e, "ThreadIRCSeed()"); } catch (...) { PrintExceptionContinue(NULL, "ThreadIRCSeed()"); } printf("ThreadIRCSeed exited\n"); } void ThreadIRCSeed2(void* parg) { // Don't connect to IRC if we won't use IPv4 connections. if (IsLimited(NET_IPV4)) return; // ... or if we won't make outbound connections and won't accept inbound ones. if (mapArgs.count("-connect") && fNoListen) return; // ... or if IRC is not enabled. if (!GetBoolArg("-irc", true)) return; printf("ThreadIRCSeed started\n"); int nErrorWait = 10; int nRetryWait = 10; int nNameRetry = 0; while (!fShutdown) { CService addrConnect("92.243.23.21", 6667); // irc.lfnet.org CService addrIRC("irc.lfnet.org", 6667, true); if (addrIRC.IsValid()) addrConnect = addrIRC; SOCKET hSocket; if (!ConnectSocket(addrConnect, hSocket)) { printf("IRC connect failed\n"); nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; else return; } if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname", "ignoring hostname")) { closesocket(hSocket); hSocket = INVALID_SOCKET; nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; else return; } CNetAddr addrIPv4("1.2.3.4"); // arbitrary IPv4 address to make GetLocal prefer IPv4 addresses CService addrLocal; string strMyName; // Don't use our IP as our nick if we're not listening // or if it keeps failing because the nick is already in use. if (!fNoListen && GetLocal(addrLocal, &addrIPv4) && nNameRetry<3) strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); if (strMyName == "") strMyName = strprintf("x%"PRI64u"", GetRand(1000000000)); Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str()); int nRet = RecvUntil(hSocket, " 004 ", " 433 "); if (nRet != 1) { closesocket(hSocket); hSocket = INVALID_SOCKET; if (nRet == 2) { printf("IRC name already in use\n"); nNameRetry++; Wait(10); continue; } nErrorWait = nErrorWait * 11 / 10; if (Wait(nErrorWait += 60)) continue; else return; } nNameRetry = 0; Sleep(500); // Get our external IP from the IRC server and re-nick before joining the channel CNetAddr addrFromIRC; if (GetIPFromIRC(hSocket, strMyName, addrFromIRC)) { printf("GetIPFromIRC() returned %s\n", addrFromIRC.ToString().c_str()); // Don't use our IP as our nick if we're not listening if (!fNoListen && addrFromIRC.IsRoutable()) { // IRC lets you to re-nick AddLocal(addrFromIRC, LOCAL_IRC); strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); } } if (fTestNet) { Send(hSocket, "JOIN #WMcoinTEST2\r"); Send(hSocket, "WHO #WMcoinTEST2\r"); } else { // randomly join #WMcoin00-#WMcoin05 // int channel_number = GetRandInt(5); // Channel number is always 0 for initial release int channel_number = 0; Send(hSocket, strprintf("JOIN #WMcoinzz%02d\r", channel_number).c_str()); Send(hSocket, strprintf("WHO #WMcoinzz%02d\r", channel_number).c_str()); } int64 nStart = GetTime(); string strLine; strLine.reserve(10000); while (!fShutdown && RecvLineIRC(hSocket, strLine)) { if (strLine.empty() || strLine.size() > 900 || strLine[0] != ':') continue; vector<string> vWords; ParseString(strLine, ' ', vWords); if (vWords.size() < 2) continue; char pszName[10000]; pszName[0] = '\0'; if (vWords[1] == "352" && vWords.size() >= 8) { // index 7 is limited to 16 characters // could get full length name at index 10, but would be different from join messages strlcpy(pszName, vWords[7].c_str(), sizeof(pszName)); printf("IRC got who\n"); } if (vWords[1] == "JOIN" && vWords[0].size() > 1) { // :username!username@50000007.F000000B.90000002.IP JOIN :#channelname strlcpy(pszName, vWords[0].c_str() + 1, sizeof(pszName)); if (strchr(pszName, '!')) *strchr(pszName, '!') = '\0'; printf("IRC got join\n"); } if (pszName[0] == 'u') { CAddress addr; if (DecodeAddress(pszName, addr)) { addr.nTime = GetAdjustedTime(); if (addrman.Add(addr, addrConnect, 51 * 60)) printf("IRC got new address: %s\n", addr.ToString().c_str()); nGotIRCAddresses++; } else { printf("IRC decode failed\n"); } } } closesocket(hSocket); hSocket = INVALID_SOCKET; if (GetTime() - nStart > 20 * 60) { nErrorWait /= 3; nRetryWait /= 3; } nRetryWait = nRetryWait * 11 / 10; if (!Wait(nRetryWait += 60)) return; } } #ifdef TEST int main(int argc, char *argv[]) { WSADATA wsadata; if (WSAStartup(MAKEWORD(2,2), &wsadata) != NO_ERROR) { printf("Error at WSAStartup()\n"); return false; } ThreadIRCSeed(NULL); WSACleanup(); return 0; } #endif
[ "wemcoin@gmail.com" ]
wemcoin@gmail.com
7843ecde258ef114114c7f1e3af4dd26aa9007e6
b3880ed2d7e8e1605b0674ad5a6bdac855e65146
/test.cpp
6c68a7fb92ba0c7f77225089c63322614370f242
[ "MIT" ]
permissive
path7inder/GithubPractice
a45395d84870da2229cb5c015a859cab9228b367
d19df39d830ff91e4b4f5feb291b308e69c14f19
refs/heads/master
2021-05-31T15:26:19.513289
2016-05-06T10:55:52
2016-05-06T10:55:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
142
cpp
#include <iostream> using namespace std; int add(int a, int b) { return a + b; } int main() { cout << "Hello BCSD!" << endl; return 0; }
[ "path7inder@gmail.com" ]
path7inder@gmail.com
c00d850b6291da0913fd487845610c553816c88e
7b33ac7c4b71d6678b649fc4c22deb37df929577
/1.代码/1.c语言/OJ243.cpp
b592f46f08e21e0ff6c52f3f3ad4de15c6e597e3
[]
no_license
dofo-eat/Code_Learned
0c857e3db14a1a2b6678fe2d7e044d47a3dff157
abba556678adbf5033b16bc5c610dae6a36816db
refs/heads/master
2021-07-10T21:20:34.093910
2020-12-12T09:28:33
2020-12-12T09:28:33
224,192,229
1
1
null
null
null
null
UTF-8
C++
false
false
1,439
cpp
/************************************************************************* > File Name: OJ243.cpp > Author: dofo-eat > Mail:2354787023@qq.com > Created Time: 2020年05月17日 星期日 18时53分52秒 ************************************************************************/ #include<iostream> using namespace std; #define MAX_N 200000 struct Data { int s, e, d, c; }arr[MAX_N + 5]; int n; int check(int pos) { int cnt = 0; for(int i = 0; i < n;i++) { if(arr[i].s > pos) continue; if(arr[i].e <= pos) { cnt += arr[i].c; continue; } cnt += (pos - arr[i].s) / arr[i].d + 1; } return cnt; } int bs(int l, int r) { if(l == r) return l; int mid = ((l ^ r) >> 1) + (l & r); if(check(mid) % 2) return bs(l, mid); return bs(mid + 1, r); } void solve() { int l, r; cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i].s >> arr[i].e >> arr[i].d; arr[i].c = (arr[i].e - arr[i].s) / arr[i].d + 1; if (i == 0) l = arr[i].s, r = arr[i].e; l = min(arr[i].s, l); r = min(arr[i].e, r); } int pos = bs(l, r); long long cnt = bs(n, pos) - bs(n, pos - 1); if (cnt % 2) { cout << pos << " " << cnt << endl; } else { cout << "Poor QIN TENG:(" << endl; } } int main () { int tcase; cin >> tcase; while(tcase--) { solve(); } return 0; }
[ "2354787023@qq.com" ]
2354787023@qq.com
0cf778a9b4f1ff4e942633d89f754e5c635a4c42
648641c5e244b54071a1e90923b4e56eaa531239
/BIT manipulation/Find unique number in list where all numbers are thrice expect one numer.cpp
6ce7a885144a173bccb4a1a9ec4508c4ccd1b500
[]
no_license
islamshaheb/Algorithm_Data_structure_and_OOP
29818d8bc797fcbec67b0d8b1760558fd3e86f8e
3b5c5bd0698f9d75ab49401213968524851099ce
refs/heads/master
2023-06-13T21:56:12.450330
2021-07-03T16:20:43
2021-07-03T16:20:43
378,949,609
0
0
null
null
null
null
UTF-8
C++
false
false
531
cpp
#include<bits/stdc++.h> using namespace std; int getbit(int n,int pos) { return ((1<<pos)&n); } int setbit(int n,int pos) { return ((1<<pos)|n); } int findunique(int arr[],int n) { int res=0; for(int i=0; i<64; i++) { int sum=0; for(int j=0; j<n; j++) { sum+=getbit(arr[j],i); } if(sum%3!=0) { res = setbit(res,i); } } return res; } main() { int arr[]={1,3,2,3,9,2,1,1,3,2}; cout<<findunique(arr,10)<<endl; }
[ "mujahidulislam9345@gmail.com" ]
mujahidulislam9345@gmail.com
08b9d56e25c5c652e8e6d4f9eb951c1df56ed7f8
9ada6ca9bd5e669eb3e903f900bae306bf7fd75e
/case3/ddtFoam_Tutorial/0.002300000/k
ae21ebe2ef3784661dce891998653e2ae86d601a
[]
no_license
ptroyen/DDT
a6c8747f3a924a7039b71c96ee7d4a1618ad4197
6e6ddc7937324b04b22fbfcf974f9c9ea24e48bf
refs/heads/master
2020-05-24T15:04:39.786689
2018-01-28T21:36:40
2018-01-28T21:36:40
null
0
0
null
null
null
null
UTF-8
C++
false
false
132,429
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.002300000"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField nonuniform List<scalar> 12384 ( 0.13929 0.168162 0.188769 0.184318 0.204534 0.22052 0.164412 0.145924 0.153415 0.147761 0.137091 0.138518 0.128676 0.104335 0.107244 0.151953 0.171708 0.180346 0.179797 0.206706 0.228434 0.27324 0.320794 0.384083 0.471955 0.562439 0.69141 0.854065 0.912171 1.15739 1.29023 1.39771 1.38029 1.33785 1.17662 1.31972 1.22153 1.05558 0.780272 0.646994 0.41784 0.285982 0.206756 0.122947 0.111943 0.163005 0.647984 4.33861 15.8759 26.0159 29.1165 29.3262 24.2297 20.822 16.2766 11.6582 7.25637 3.79719 2.2176 1.60794 1.48326 1.58636 1.43303 1.58837 1.40581 1.17985 0.827831 0.651003 0.415795 0.266246 0.181706 0.139476 0.124579 0.111294 0.106978 0.114636 0.114275 0.120631 0.130145 0.14979 0.199602 0.350956 0.910571 2.9556 5.18002 7.79402 8.63561 6.82666 3.70528 2.16396 1.59222 1.37917 1.28639 1.17809 1.01661 0.866162 0.71375 0.520561 0.311299 0.202208 0.140599 0.121566 0.115701 0.112493 0.101846 0.104359 0.105971 0.107812 0.111725 0.116437 0.121266 0.129095 0.132595 0.13917 0.140877 0.141248 0.139576 0.135448 0.1315 0.127407 0.123551 0.121005 0.117412 0.115505 0.112859 0.110694 0.109323 0.107778 0.107189 0.106566 0.105842 0.105269 0.103828 0.102858 0.0993414 0.100178 0.100178 0.100653 0.10064 0.100814 0.100917 0.10081 0.100884 0.100637 0.100678 0.10041 0.100408 0.100115 0.10011 0.0997883 0.0997892 0.0994757 0.0994718 0.0991902 0.0991668 0.098935 0.0988805 0.0986958 0.0986186 0.0984613 0.0983757 0.0982298 0.0981348 0.0980377 0.0976203 0.0976702 0.0976612 0.0976625 0.0976659 0.0976639 0.0976703 0.09766 0.0976602 0.0976427 0.0976462 0.0976246 0.0976306 0.0976096 0.0976131 0.0975973 0.0975987 0.097587 0.0975866 0.0975771 0.0975764 0.0975691 0.0975681 0.0975624 0.0975606 0.0975574 0.0975543 0.097553 0.09755 0.0975163 0.0975088 0.0975394 0.0975402 0.09754 0.0975414 0.0975421 0.0975438 0.0975427 0.0975447 0.0975428 0.0975444 0.097543 0.0975432 0.0975432 0.0975415 0.0975435 0.097542 0.0975428 0.0975428 0.0975419 0.0975428 0.0975412 0.0975424 0.0975406 0.0975409 0.0975389 0.0975386 0.0975369 0.0975322 0.0975244 0.0975251 0.0975345 0.0975359 0.0975377 0.097539 0.0975395 0.0975417 0.0975406 0.0975428 0.0975414 0.0975428 0.097542 0.0975422 0.0975427 0.0975411 0.0975431 0.0975417 0.0975425 0.0975425 0.0975418 0.0975427 0.0975412 0.0975424 0.0975405 0.0975408 0.0975389 0.0975386 0.0975367 0.0975322 0.0975245 0.0975272 0.0975312 0.097535 0.0975383 0.0975411 0.0975422 0.0975419 0.0975436 0.0975422 0.0975437 0.0975424 0.097543 0.0975428 0.0975416 0.0975427 0.0975408 0.0975428 0.0975418 0.0975412 0.0975426 0.0975417 0.0975414 0.0975434 0.0975417 0.0975428 0.0975419 0.0975409 0.0975412 0.0975389 0.0975099 0.0975259 0.0975344 0.0975359 0.0975377 0.097539 0.0975396 0.0975416 0.0975408 0.0975426 0.0975415 0.0975428 0.0975422 0.0975423 0.0975427 0.0975411 0.097543 0.0975417 0.0975425 0.0975427 0.0975417 0.0975426 0.097541 0.0975421 0.0975402 0.0975406 0.0975385 0.0975388 0.0975368 0.0975324 0.0975244 0.0975107 0.0975372 0.0975373 0.0975398 0.097543 0.0975434 0.0975447 0.0975435 0.0975446 0.0975429 0.0975441 0.0975431 0.0975436 0.0975431 0.0975448 0.097545 0.097543 0.0975429 0.0975428 0.0975435 0.0975426 0.0975441 0.097543 0.0975439 0.0975427 0.0975418 0.0975388 0.0975368 0.0975372 0.0975104 0.0975253 0.0975345 0.0975375 0.0975382 0.0975424 0.0975403 0.0975461 0.0975415 0.0975471 0.0975421 0.0975468 0.0975426 0.097545 0.0975431 0.0975428 0.0975427 0.0975407 0.0975424 0.0975422 0.0975413 0.0975432 0.0975411 0.0975433 0.0975404 0.0975416 0.0975386 0.0975389 0.0975367 0.0975322 0.0975245 0.199923 0.558507 0.855387 0.980479 1.14874 1.36313 1.1916 1.2653 1.22472 1.09156 0.888637 0.784038 0.577385 0.14039 0.169566 0.935763 1.19815 1.24464 1.4911 1.9457 2.92532 4.07597 5.43349 7.08541 9.33454 12.4033 15.0088 16.9556 17.9227 18.2409 18.1759 17.5278 15.4591 13.6722 14.6755 14.8793 13.9388 12.4978 10.1837 7.63229 4.97701 3.04852 1.78216 0.271612 4.44098 50.3145 148.689 222.586 245.064 241.839 253.271 247.375 207.146 163.001 113.522 81.9871 52.9268 34.3745 24.0738 20.9748 19.3682 17.6489 19.2614 18.0071 16.6214 15.7739 13.9511 11.7468 9.603 7.24585 4.74872 2.56306 1.1757 0.230287 0.14039 0.545328 1.65061 5.11838 13.7375 33.5463 70.723 121.829 172.227 198.165 185.781 161.242 148.76 102.469 45.9913 21.6175 12.4319 9.32068 8.52179 8.67013 8.97942 9.0312 8.66555 7.81885 6.40435 4.48226 2.58476 1.26477 0.497894 0.14593 0.10444 0.138537 0.153765 0.178551 0.21594 0.260021 0.30862 0.373101 0.437986 0.526629 0.632521 0.735621 0.82563 0.888327 0.926551 0.935624 0.916354 0.866832 0.789696 0.689398 0.580912 0.480248 0.390093 0.313929 0.250456 0.200752 0.162948 0.135925 0.118158 0.104273 0.0999988 0.105821 0.106248 0.106688 0.107388 0.107866 0.108475 0.108748 0.108904 0.108781 0.108499 0.108071 0.107556 0.106931 0.106361 0.105722 0.105215 0.104671 0.104227 0.103761 0.103382 0.102996 0.102687 0.102358 0.102133 0.101858 0.1017 0.1015 0.101326 0.0980104 0.0975629 0.100635 0.100656 0.10068 0.100665 0.100642 0.100647 0.100608 0.100607 0.100547 0.100535 0.100462 0.100442 0.100355 0.100334 0.100274 0.100294 0.100273 0.100295 0.10026 0.100271 0.100228 0.10023 0.100183 0.100188 0.100147 0.100156 0.100117 0.100073 0.0974403 0.0974287 0.10008 0.10012 0.100091 0.1001 0.100065 0.100076 0.100043 0.100054 0.100015 0.100021 0.0999775 0.0999755 0.0999242 0.0999228 0.0999022 0.099945 0.0999533 0.100001 0.0999992 0.10004 0.100031 0.100064 0.10005 0.100082 0.100068 0.100103 0.100117 0.100075 0.0974249 0.0974325 0.100061 0.100133 0.100096 0.100107 0.100072 0.100085 0.100049 0.100063 0.100025 0.100031 0.0999868 0.0999827 0.0999286 0.099924 0.0999006 0.0999416 0.0999496 0.0999985 0.0999964 0.100038 0.10003 0.100064 0.100049 0.100083 0.100067 0.100103 0.100116 0.100075 0.0974251 0.0974229 0.10008 0.100108 0.100105 0.100068 0.10008 0.100046 0.100059 0.100025 0.100033 0.0999941 0.0999974 0.0999516 0.0999443 0.0999026 0.0999217 0.099926 0.09998 0.0999844 0.100023 0.100046 0.100049 0.100083 0.100069 0.1001 0.100087 0.10012 0.100102 0.100074 0.0974259 0.0974324 0.100061 0.100131 0.100095 0.100105 0.10007 0.100083 0.100048 0.10006 0.100021 0.100027 0.0999846 0.0999815 0.0999279 0.0999248 0.0999003 0.0999416 0.0999498 0.0999988 0.0999976 0.100039 0.100032 0.100066 0.100052 0.100086 0.10007 0.100104 0.100118 0.100074 0.0974253 0.0974219 0.100076 0.100101 0.10009 0.100095 0.100065 0.100078 0.100046 0.100058 0.10002 0.100025 0.0999812 0.0999773 0.0999242 0.0999127 0.0999139 0.0999237 0.0999756 0.0999785 0.100022 0.100017 0.100055 0.100042 0.100075 0.100063 0.100093 0.100086 0.100107 0.100075 0.0974234 0.0974319 0.100058 0.100123 0.100083 0.100093 0.10006 0.100076 0.100044 0.100061 0.100025 0.100036 0.0999925 0.0999914 0.0999378 0.099932 0.0999005 0.0999372 0.099946 0.0999962 0.0999955 0.100039 0.100032 0.100066 0.100052 0.100084 0.100068 0.1001 0.100115 0.100071 0.0974253 0.21932 0.689009 0.856282 0.979746 1.19494 1.70501 1.45756 1.35439 1.26773 1.20045 0.993152 0.860618 0.669493 0.142803 0.228859 1.89619 2.63043 3.31237 4.92026 8.23174 12.1983 14.5958 16.4581 18.5093 21.4098 24.9687 28.821 30.3963 30.3395 29.9253 29.6862 25.8411 19.9285 19.275 16.7564 13.5287 13.9564 15.2018 12.0674 8.53388 5.88199 4.2626 2.75779 0.382 9.51235 102.012 191.267 212.357 189.837 236.14 287.569 362.473 481.71 620.804 668.092 647.411 544.374 408.263 269.01 169.331 110.409 76.0855 46.2024 35.502 31.9261 29.5106 24.3862 15.7731 10.2235 6.76247 4.38566 2.68475 1.67431 0.298691 0.207915 1.36482 4.69965 15.3572 45.9296 112.042 207.844 290.194 310.56 273.168 292.136 465.569 694.85 556.757 217.783 108.494 56.4957 34.1694 23.4811 18.1529 14.8925 12.2442 9.90083 7.49845 5.01784 3.0554 1.70846 0.917077 0.458853 0.142838 0.108099 0.187996 0.224542 0.282601 0.377802 0.519565 0.631367 0.729737 0.77314 0.79808 0.829118 0.847907 0.846738 0.823997 0.783046 0.727936 0.663671 0.590838 0.514945 0.443703 0.376438 0.31982 0.268647 0.227393 0.192718 0.165335 0.143691 0.127103 0.115804 0.103834 0.100425 0.1089 0.108745 0.108745 0.108772 0.108696 0.108458 0.108279 0.107833 0.107528 0.107024 0.106539 0.106036 0.105449 0.105036 0.104435 0.104109 0.103619 0.103358 0.102961 0.102751 0.102413 0.102255 0.101976 0.101849 0.101623 0.101526 0.101348 0.101211 0.0981775 0.0978464 0.100643 0.100605 0.100583 0.100554 0.100511 0.10049 0.100429 0.100415 0.100353 0.100332 0.100265 0.100232 0.100156 0.100125 0.100077 0.100106 0.100101 0.100143 0.100125 0.100152 0.100121 0.10014 0.100104 0.100123 0.100086 0.100102 0.100065 0.10006 0.0977066 0.0976998 0.0999822 0.100008 0.0999789 0.0999946 0.0999546 0.0999693 0.0999254 0.0999374 0.0998901 0.099896 0.0998387 0.0998312 0.0997667 0.0997614 0.0997351 0.0997914 0.0998038 0.0998672 0.0998695 0.0999204 0.0999131 0.0999598 0.0999478 0.0999914 0.0999815 0.100015 0.100012 0.100002 0.0976589 0.0976599 0.10002 0.10004 0.0999963 0.100015 0.0999729 0.0999881 0.0999431 0.099954 0.0999047 0.0999093 0.0998514 0.099838 0.0997706 0.0997615 0.0997326 0.0997867 0.0997989 0.0998623 0.0998646 0.0999169 0.0999103 0.0999568 0.099947 0.0999908 0.0999809 0.100015 0.100013 0.100001 0.0976586 0.0976563 0.100001 0.0999971 0.100001 0.0999641 0.0999803 0.09994 0.0999538 0.0999093 0.09992 0.0998699 0.09987 0.0998085 0.0997978 0.0997388 0.0997569 0.0997585 0.0998318 0.0998571 0.0998972 0.0999198 0.0999302 0.0999769 0.0999655 0.100006 0.0999894 0.100024 0.100003 0.100009 0.0977023 0.0976568 0.100015 0.100038 0.0999942 0.100014 0.0999715 0.0999858 0.0999413 0.0999528 0.0999035 0.0999087 0.0998511 0.0998397 0.099773 0.0997632 0.099732 0.0997845 0.0997975 0.0998605 0.0998636 0.0999165 0.0999101 0.0999578 0.099947 0.0999918 0.0999829 0.100016 0.100015 0.100003 0.0976593 0.0976993 0.0999877 0.100002 0.1 0.0999989 0.0999591 0.099972 0.0999285 0.0999393 0.0998914 0.0998978 0.0998403 0.0998331 0.099768 0.0997467 0.0997472 0.0997692 0.099834 0.0998413 0.0998986 0.0998919 0.0999407 0.099929 0.0999733 0.0999596 0.100001 0.0999924 0.0999999 0.0999783 0.0976994 0.0976557 0.100013 0.100033 0.0999894 0.100009 0.0999673 0.0999824 0.0999365 0.0999497 0.0999012 0.0999083 0.0998525 0.0998442 0.0997781 0.0997667 0.0997279 0.0997758 0.0997904 0.0998546 0.0998582 0.0999113 0.0999057 0.099955 0.0999445 0.0999893 0.0999807 0.100013 0.100016 0.100004 0.0976582 0.292408 1.14245 1.24988 1.73939 2.58454 3.44593 3.22 2.80802 2.41226 1.78394 1.2913 1.073 0.822569 0.149501 0.275137 3.73108 10.074 12.4666 15.9564 18.326 22.6696 26.7137 29.4241 32.9986 40.159 52.2788 64.8536 72.9029 78.0523 80.7071 75.3382 61.353 45.9718 39.7046 33.6117 26.165 23.2131 20.7421 16.2841 11.9975 8.26384 6.12708 4.0934 0.645194 13.0621 165.141 223.205 170.72 118.585 195.895 343.496 633.186 1019.45 1415.72 1718.36 1910.09 1904.1 1665.13 1288.2 886.382 561.357 344.293 202.117 125.635 88.0212 64.3892 48.1919 35.6981 19.9641 10.5516 6.11939 3.8263 2.65148 0.42379 0.342095 3.81637 12.3636 35.7176 80.6555 134.598 173.133 177.177 169.753 275.595 867.905 1981.4 2902.41 2079.71 760.618 408.634 239.576 138.489 80.7422 52.0439 35.8344 25.4866 18.3361 12.6813 7.86038 4.3254 2.15867 1.06509 0.538395 0.145328 0.118224 0.326813 0.49755 0.803363 1.29943 1.86886 2.20838 2.41129 2.23118 1.91809 1.67926 1.51739 1.37871 1.24058 1.09517 0.95454 0.821084 0.697432 0.584458 0.48752 0.40643 0.338995 0.281888 0.236232 0.19841 0.169108 0.146082 0.129239 0.117558 0.104084 0.100939 0.115319 0.114176 0.113236 0.112487 0.111637 0.110865 0.110034 0.109264 0.108473 0.10778 0.106994 0.10639 0.105651 0.105161 0.104523 0.104132 0.103577 0.103276 0.102811 0.102579 0.102194 0.102017 0.101708 0.101562 0.101324 0.101208 0.101024 0.100871 0.0980546 0.097725 0.100354 0.100327 0.100297 0.100263 0.100219 0.100199 0.100167 0.100142 0.100114 0.100083 0.100056 0.100022 0.099998 0.0999679 0.0999432 0.0999204 0.0998946 0.0998754 0.0998451 0.0998237 0.099791 0.0997699 0.0997406 0.0997239 0.0996977 0.0996866 0.0996615 0.0996208 0.0975187 0.0975114 0.0996046 0.0996291 0.0996158 0.0996153 0.0996054 0.0996053 0.0995987 0.0995997 0.0995943 0.0995947 0.0995888 0.0995889 0.0995835 0.0995846 0.0995821 0.0995863 0.0995857 0.0995916 0.0995913 0.0995969 0.0995952 0.0996007 0.0996 0.0996074 0.0996051 0.0996203 0.0996196 0.0995896 0.0975366 0.0975382 0.0995804 0.0996147 0.0996041 0.0996038 0.099598 0.0995995 0.0995951 0.0995971 0.0995925 0.0995934 0.0995879 0.0995885 0.0995833 0.0995846 0.0995824 0.0995868 0.0995864 0.0995922 0.099592 0.0995977 0.099596 0.0996013 0.0996005 0.0996078 0.0996051 0.0996199 0.0996197 0.0995901 0.0975369 0.0975378 0.0995898 0.09961 0.0996202 0.0996083 0.0996087 0.0996016 0.0996026 0.099597 0.0995984 0.0995928 0.0995931 0.0995872 0.0995879 0.0995833 0.0995858 0.0995841 0.0995898 0.0995859 0.0996035 0.0996088 0.0995943 0.0995992 0.0995977 0.0996035 0.0996028 0.0996108 0.0996088 0.0995888 0.0975094 0.0975401 0.099585 0.0996151 0.0996042 0.0996039 0.099598 0.0995996 0.0995952 0.0995971 0.0995925 0.0995936 0.0995881 0.0995886 0.0995834 0.0995846 0.0995821 0.0995863 0.0995858 0.0995914 0.0995913 0.099597 0.0995955 0.099601 0.0996008 0.099608 0.0996054 0.0996191 0.0996199 0.099589 0.0975364 0.0975092 0.0995959 0.0996075 0.0996027 0.0996156 0.0996055 0.099606 0.0995988 0.0995999 0.0995942 0.0995949 0.0995888 0.0995893 0.0995832 0.0995963 0.0995957 0.0995824 0.0995882 0.0995876 0.0995932 0.0995924 0.0995978 0.0995966 0.0996031 0.099603 0.0996124 0.0996057 0.099617 0.0995994 0.0975091 0.097539 0.0995823 0.0996132 0.0996031 0.0996031 0.0995983 0.0996 0.0995968 0.0995985 0.0995949 0.0995957 0.0995906 0.09959 0.0995839 0.0995841 0.0995811 0.0995842 0.0995835 0.0995894 0.0995904 0.0995967 0.099596 0.0996017 0.0996016 0.0996093 0.0996058 0.0996195 0.0996204 0.0995903 0.0975372 0.314968 1.60824 1.88297 2.63179 3.91579 6.24697 6.0911 5.1555 4.64369 3.31715 1.99842 1.44918 1.15831 0.18825 0.402017 9.89115 30.7876 41.4455 42.4437 39.9468 41.4709 45.2588 50.6798 60.3893 74.0417 91.6916 106.919 117.252 126.352 134.193 134.877 124.375 105.255 83.8428 71.2012 65.5684 53.9899 41.9828 22.033 13.3131 9.12565 7.44264 5.73042 1.13303 15.2808 242.847 256.319 133.824 74.8465 263.049 583.385 1116.42 1577.54 1890.28 2162.1 2439.61 2662.59 2683.77 2493.31 2107.55 1624.34 1132.41 720.039 426.544 251.591 166.923 119.375 91.706 46.2449 22.7204 11.9668 7.28992 5.22838 0.758154 0.643835 7.83507 19.0906 38.9083 65.6069 83.9961 82.5841 71.8215 126.008 765.125 3020.24 6026.33 8039.71 5521.25 2503.97 1252.63 691.353 394.208 248.107 153.573 94.2351 59.6904 38.7413 25.0462 15.1832 8.18147 4.01788 1.91021 0.901018 0.188365 0.144599 0.726846 1.41397 1.83941 2.60325 4.49262 6.86955 8.2262 7.43312 5.76758 4.24284 3.20722 2.55266 2.10726 1.74353 1.43638 1.17262 0.956008 0.776801 0.625415 0.504306 0.406691 0.332233 0.271753 0.224681 0.187653 0.159104 0.138184 0.123703 0.104809 0.101382 0.126413 0.123466 0.121088 0.119053 0.117272 0.115516 0.11386 0.112222 0.110956 0.109651 0.108615 0.107544 0.106768 0.105815 0.105292 0.10449 0.104104 0.103495 0.103176 0.102727 0.102456 0.102123 0.1019 0.101653 0.10145 0.101274 0.101086 0.100941 0.0980846 0.0978296 0.10047 0.100452 0.100385 0.100382 0.100352 0.100311 0.100289 0.100241 0.100225 0.100176 0.100164 0.10011 0.100102 0.100048 0.100042 0.09999 0.0999843 0.0999339 0.0999271 0.0998775 0.0998697 0.0998188 0.0998137 0.0997668 0.0997659 0.0997235 0.0997229 0.0996526 0.097567 0.0975567 0.0996333 0.0996548 0.0996718 0.0996449 0.0996689 0.0996435 0.0996686 0.0996432 0.0996686 0.099642 0.0996662 0.0996398 0.0996629 0.099638 0.0996618 0.0996387 0.0996643 0.0996409 0.0996668 0.0996424 0.0996673 0.0996421 0.0996664 0.0996416 0.0996662 0.0996453 0.0996561 0.099645 0.0975346 0.0975363 0.0996425 0.099641 0.0996671 0.0996418 0.0996675 0.0996425 0.0996679 0.0996427 0.0996679 0.0996417 0.0996654 0.0996396 0.0996626 0.0996379 0.0996619 0.0996388 0.0996646 0.0996411 0.0996671 0.0996427 0.0996675 0.0996422 0.0996664 0.0996417 0.0996664 0.0996456 0.0996556 0.0996455 0.0975344 0.0975376 0.0996424 0.0996653 0.099644 0.0996678 0.0996426 0.0996683 0.0996429 0.0996689 0.0996431 0.0996679 0.0996416 0.0996652 0.0996395 0.0996627 0.0996385 0.0996625 0.0996382 0.0996621 0.0996488 0.099645 0.0996661 0.0996414 0.0996669 0.0996432 0.0996686 0.0996458 0.0996719 0.0996192 0.0975599 0.0975333 0.0996449 0.0996403 0.0996667 0.0996414 0.0996674 0.0996421 0.0996681 0.0996427 0.0996682 0.0996416 0.0996657 0.0996396 0.0996627 0.0996379 0.0996615 0.0996385 0.099664 0.0996406 0.0996663 0.0996421 0.0996666 0.0996415 0.0996657 0.099641 0.0996657 0.0996461 0.0996543 0.0996446 0.0975344 0.0975608 0.0996234 0.0996667 0.0996648 0.0996445 0.0996683 0.0996427 0.0996675 0.0996424 0.0996679 0.0996415 0.0996656 0.0996389 0.0996623 0.099638 0.0996394 0.0996616 0.0996382 0.0996647 0.0996407 0.099667 0.0996416 0.0996667 0.0996414 0.0996664 0.0996417 0.0996652 0.0996603 0.099626 0.0975585 0.0975348 0.0996421 0.099639 0.0996667 0.099641 0.0996675 0.0996423 0.099669 0.0996434 0.0996697 0.099643 0.0996673 0.0996401 0.0996628 0.0996367 0.0996603 0.0996367 0.0996614 0.0996392 0.0996664 0.0996425 0.0996677 0.0996423 0.099667 0.0996422 0.099667 0.0996479 0.0996555 0.0996472 0.0975348 0.355362 2.00211 2.78838 4.04722 5.57845 7.76512 6.91382 6.23466 5.98819 5.42699 4.92706 2.80802 1.66721 0.223404 0.708887 21.7085 63.1388 82.3175 83.2051 75.3402 75.3541 82.0883 94.0696 108.351 123.594 139.676 150.092 158.893 168.791 179.359 185.135 182.252 170.648 156.894 153.846 162.536 148.239 104.018 41.1657 17.5904 11.8804 10.7526 8.60377 2.4159 13.3731 330.406 304.684 118.494 74.0376 745.853 1039.14 1496.71 1926.55 2191.35 2356.88 2555.46 2811.41 3077.11 3258.89 3229.29 2881.3 2264.89 1587.37 1040.76 660.052 416.927 270.249 199.858 132.719 64.233 30.7647 17.5923 13.1004 1.92667 0.56712 10.9766 19.6455 30.3573 40.8339 43.4494 37.4756 57.4628 664.347 3239.92 7900.5 12824.6 16838.3 10642 5455 2540.4 1377.81 797.883 500.44 343.904 233.647 139.629 85.97 53.699 32.0087 17.3103 8.57421 4.06893 1.96146 0.302192 0.152028 1.17786 1.40479 2.08089 5.28043 14.457 24.3308 28.1659 23.969 17.2505 11.3717 7.40762 5.10934 3.79308 2.92791 2.27858 1.77227 1.38554 1.09138 0.860259 0.672374 0.523768 0.413956 0.328747 0.265773 0.217084 0.180735 0.153465 0.135446 0.105666 0.102489 0.147072 0.142235 0.135341 0.129706 0.125351 0.121616 0.118653 0.11602 0.113854 0.111962 0.110368 0.108994 0.107883 0.10677 0.106034 0.105138 0.104629 0.103919 0.103539 0.103006 0.102701 0.102311 0.102052 0.101781 0.101558 0.101379 0.101181 0.101031 0.0981135 0.0979063 0.100577 0.100569 0.100483 0.100467 0.100411 0.100378 0.100345 0.100307 0.100281 0.100236 0.100213 0.100165 0.100147 0.100102 0.100089 0.100041 0.10003 0.099983 0.0999703 0.0999232 0.0999116 0.0998637 0.0998502 0.0998058 0.0997961 0.099757 0.0997491 0.0996915 0.0975692 0.0975603 0.0996725 0.0996839 0.0996894 0.0996728 0.0996882 0.0996728 0.099689 0.0996736 0.0996893 0.0996723 0.0996868 0.0996694 0.0996834 0.0996674 0.0996828 0.0996681 0.0996849 0.0996709 0.0996873 0.0996724 0.0996873 0.0996712 0.0996848 0.0996695 0.0996831 0.0996726 0.0996849 0.0996673 0.0975557 0.0975562 0.0996636 0.0996729 0.0996865 0.0996703 0.099687 0.0996719 0.099688 0.099673 0.0996883 0.0996717 0.0996859 0.0996693 0.0996831 0.0996674 0.0996832 0.0996685 0.0996851 0.0996712 0.0996874 0.0996726 0.0996874 0.0996714 0.099685 0.0996698 0.0996833 0.0996726 0.0996842 0.0996677 0.0975556 0.0975555 0.0996735 0.0996869 0.0996723 0.0996858 0.0996715 0.0996881 0.0996731 0.0996898 0.0996737 0.0996888 0.0996721 0.0996862 0.0996695 0.0996845 0.0996687 0.0996836 0.0996683 0.0996805 0.0996794 0.0996745 0.099686 0.0996711 0.099687 0.099672 0.0996872 0.0996725 0.0996907 0.0996569 0.0975577 0.0975568 0.0996651 0.0996716 0.0996857 0.0996696 0.0996869 0.0996718 0.0996884 0.0996731 0.0996887 0.0996719 0.0996862 0.0996693 0.0996831 0.0996674 0.0996826 0.0996679 0.0996843 0.0996705 0.0996865 0.0996716 0.0996861 0.0996702 0.099684 0.0996695 0.099683 0.0996746 0.0996825 0.0996661 0.0975556 0.0975584 0.099662 0.0996878 0.0996864 0.0996737 0.099687 0.0996715 0.0996877 0.0996725 0.0996885 0.0996717 0.0996868 0.0996691 0.0996821 0.0996724 0.0996728 0.099681 0.0996682 0.0996858 0.0996708 0.0996875 0.0996716 0.0996866 0.0996702 0.0996848 0.0996698 0.0996831 0.0996862 0.0996641 0.0975573 0.0975576 0.0996626 0.0996705 0.0996847 0.0996689 0.0996863 0.0996712 0.0996882 0.0996733 0.0996897 0.0996736 0.0996877 0.09967 0.0996832 0.0996664 0.0996813 0.099666 0.0996827 0.0996701 0.0996872 0.0996732 0.0996881 0.0996726 0.0996863 0.0996718 0.0996863 0.099677 0.0996849 0.0996715 0.0975556 0.400429 2.42726 3.69998 5.44265 6.87592 8.32349 7.44948 7.2707 7.81865 8.67483 8.74513 5.81199 2.59205 0.271914 2.62923 64.5638 140.617 152.868 143.701 122.301 115.382 121.081 133.934 148.486 161.493 173.555 182.745 197.349 214.157 230.98 245.368 255.869 265.758 285.178 325.338 380.061 386.891 287.289 133.525 41.9556 21.0659 24.4486 16.0398 9.81262 12.6944 430.273 374.781 136.644 152.956 1527.72 1614.78 1869.66 2252.08 2497.22 2625.67 2726.7 2799.84 2898.96 3027.09 3190.62 3258.98 2977.85 2398.49 1773.64 1282.25 897.953 607.249 455.419 359.872 237.347 122.828 66.2176 43.5863 7.58761 0.226174 11.9781 17.3348 26.2353 39.7958 70.1675 200.537 1050.02 4077.32 9283.71 15314.6 20677.2 23291.2 14905.9 8229.74 4128.85 2262.47 1378.71 911.678 620.417 432.547 291.916 178.557 112.574 70.81 42.3991 23.6053 12.6297 6.62124 1.02974 0.123132 1.64108 2.44437 9.48079 30.7483 65.7961 93.3491 93.0705 70.963 46.7767 28.3177 16.8688 10.5122 7.10441 5.11272 3.80702 2.87244 2.17731 1.66348 1.28202 0.988242 0.756569 0.57377 0.441273 0.347037 0.277365 0.225917 0.187103 0.160719 0.108662 0.106591 0.194946 0.185152 0.164932 0.1492 0.138737 0.131281 0.12588 0.121426 0.11805 0.11518 0.11302 0.111019 0.109565 0.108096 0.107093 0.106009 0.105307 0.104498 0.104006 0.1034 0.103033 0.102589 0.102308 0.10197 0.101743 0.10149 0.101294 0.101093 0.0982277 0.0979518 0.100703 0.100678 0.100594 0.100579 0.100516 0.100476 0.10043 0.100391 0.10035 0.100312 0.100278 0.100237 0.100206 0.100168 0.100139 0.100101 0.100077 0.100038 0.100017 0.0999762 0.0999575 0.0999169 0.0998942 0.0998528 0.099832 0.0997964 0.0997783 0.0997237 0.0975225 0.0975141 0.0997012 0.099718 0.0997165 0.0997071 0.0997132 0.0997064 0.0997138 0.0997071 0.0997141 0.0997059 0.0997113 0.0997035 0.0997085 0.0997028 0.099708 0.0997032 0.0997096 0.0997051 0.0997119 0.0997056 0.0997117 0.0997038 0.0997086 0.0997012 0.0997066 0.0997018 0.0997087 0.0996894 0.0975077 0.0975091 0.0996851 0.0997015 0.099707 0.099701 0.0997097 0.099704 0.0997119 0.0997062 0.0997128 0.0997055 0.0997108 0.099704 0.0997085 0.0997033 0.0997085 0.0997039 0.09971 0.0997054 0.0997121 0.0997059 0.0997119 0.099704 0.0997088 0.0997015 0.0997071 0.0997021 0.099708 0.0996896 0.0975079 0.09751 0.0996942 0.0997068 0.0997006 0.0997071 0.099703 0.099711 0.0997058 0.0997136 0.0997071 0.0997132 0.099706 0.0997107 0.0997047 0.0997097 0.099704 0.0997087 0.0997023 0.0997059 0.0997111 0.0997068 0.0997108 0.099703 0.0997103 0.0997031 0.0997079 0.0997014 0.099709 0.0996824 0.0975122 0.0975083 0.0996867 0.0997001 0.0997066 0.0997007 0.09971 0.0997043 0.0997124 0.0997065 0.0997133 0.0997058 0.099711 0.0997039 0.0997084 0.0997032 0.0997079 0.0997032 0.0997093 0.0997046 0.0997112 0.0997047 0.0997105 0.0997028 0.0997078 0.0997011 0.0997068 0.0997044 0.0997068 0.0996882 0.0975078 0.0975129 0.0996856 0.0997099 0.0997101 0.0997035 0.0997086 0.0997027 0.0997104 0.0997048 0.0997121 0.0997047 0.0997114 0.0997032 0.0997081 0.0997042 0.0997047 0.0997071 0.0997025 0.0997105 0.0997042 0.0997114 0.0997043 0.0997099 0.0997019 0.0997069 0.0996995 0.0997048 0.0997111 0.099687 0.097512 0.0975088 0.099683 0.0996979 0.099705 0.0996989 0.0997087 0.0997023 0.0997114 0.0997047 0.0997132 0.0997057 0.099712 0.0997031 0.0997081 0.0997013 0.0997069 0.0997024 0.0997091 0.0997051 0.0997128 0.0997069 0.0997135 0.0997062 0.0997114 0.0997039 0.0997111 0.0997072 0.0997095 0.0996935 0.0975085 0.523441 2.99457 4.67185 6.62158 7.76783 9.25512 9.11681 11.0953 14.1242 17.9023 19.215 15.5183 7.2849 1.28336 8.49697 226.291 301.714 270.736 242.455 192.032 161.881 155.024 160.532 170.715 181.546 192.944 208.653 233.828 267.031 303.376 339.867 381.08 432.574 522.106 675.494 859.884 936.47 779.497 463.323 197.741 84.4633 111.971 52.0659 103.868 22.0028 1144.56 972.494 506.98 455.868 2018.9 2253.25 2274.07 2519.16 2708.39 2806.85 2877.11 2895.58 2854.25 2748.53 2772.53 2921.24 2948.74 2737.9 2347.6 1954.91 1599.09 1266.74 1042.45 908.239 753.369 611.305 218.196 131.986 29.6428 0.729807 13.1639 27.319 75.2854 340.567 972.627 2758.92 6518.71 12144.8 17906.8 23587.9 28264.5 24727.9 16522.6 9856.62 5957.58 3727.08 2308.81 1451.69 1001.22 729.552 515.669 342.365 219.724 144.264 94.0108 57.4309 31.1927 15.6975 2.06027 0.418276 5.99573 32.5415 94.8777 206.979 297.45 331.207 268.072 181.737 109.552 62.2128 35.02 20.8182 13.3671 9.18841 6.56873 4.80542 3.53957 2.63767 1.98853 1.50706 1.14138 0.851888 0.625414 0.463585 0.35151 0.272084 0.218446 0.193462 0.112893 0.143984 0.349339 0.311757 0.238864 0.189101 0.161819 0.145695 0.135632 0.128588 0.12338 0.119353 0.116321 0.113604 0.111636 0.1097 0.108415 0.107025 0.10617 0.105143 0.104577 0.103818 0.103431 0.102863 0.102597 0.102156 0.101993 0.101649 0.101585 0.101407 0.0985465 0.0979539 0.10071 0.100667 0.100619 0.100614 0.100558 0.100526 0.100482 0.100453 0.100408 0.100377 0.100335 0.100301 0.100264 0.100226 0.100196 0.100159 0.100135 0.100095 0.100072 0.100033 0.100012 0.0999741 0.0999464 0.099905 0.0998796 0.0998439 0.0998213 0.0997694 0.0975199 0.0975074 0.0997455 0.0997584 0.0997514 0.0997454 0.0997468 0.0997427 0.099746 0.0997421 0.0997452 0.0997407 0.0997428 0.0997397 0.099742 0.0997383 0.099741 0.0997397 0.0997432 0.0997401 0.0997442 0.0997405 0.0997442 0.099739 0.0997416 0.0997372 0.0997405 0.0997378 0.0997449 0.0997248 0.0975024 0.0975026 0.0997206 0.0997392 0.0997408 0.0997379 0.0997432 0.0997398 0.0997449 0.0997414 0.0997451 0.0997405 0.0997432 0.0997404 0.0997425 0.0997388 0.0997416 0.0997404 0.0997435 0.0997405 0.0997444 0.0997407 0.0997444 0.0997393 0.0997417 0.0997374 0.0997409 0.0997382 0.0997442 0.099725 0.0975022 0.097504 0.0997297 0.0997422 0.0997375 0.0997407 0.099739 0.0997437 0.0997411 0.0997459 0.0997421 0.0997454 0.099741 0.099744 0.099741 0.0997421 0.0997393 0.0997422 0.099739 0.0997386 0.0997455 0.0997417 0.0997434 0.0997387 0.0997431 0.099739 0.0997415 0.0997378 0.0997432 0.0997209 0.0975014 0.097503 0.0997224 0.0997375 0.0997405 0.0997379 0.0997436 0.0997404 0.0997453 0.099742 0.0997455 0.0997409 0.0997433 0.0997402 0.0997423 0.0997388 0.099741 0.0997398 0.0997429 0.0997397 0.0997435 0.0997395 0.0997431 0.0997379 0.0997406 0.0997368 0.0997406 0.0997402 0.0997432 0.0997235 0.0975023 0.0975018 0.0997234 0.0997435 0.0997444 0.0997399 0.0997417 0.0997383 0.099743 0.09974 0.099744 0.0997398 0.0997438 0.0997396 0.099742 0.0997399 0.0997403 0.0997412 0.0997392 0.0997432 0.0997395 0.0997438 0.0997397 0.0997426 0.0997376 0.0997401 0.0997362 0.0997383 0.0997449 0.0997246 0.0975014 0.097503 0.0997183 0.0997353 0.0997396 0.0997366 0.0997426 0.0997382 0.0997445 0.0997406 0.099746 0.0997413 0.099745 0.099739 0.0997414 0.099737 0.0997402 0.0997374 0.0997414 0.0997397 0.0997445 0.0997419 0.0997461 0.099742 0.0997446 0.0997399 0.0997435 0.0997429 0.099746 0.0997302 0.0975038 0.694772 3.768 5.5488 7.47271 9.17315 11.9953 14.3884 19.5151 26.9378 38.1175 50.9577 58.5136 45.4355 38.2685 22.2552 139.411 909.2 1136.38 783.757 518.266 370.38 270.282 213.872 192.309 187.133 190.655 202.957 219.451 241.999 278.335 330.541 396.265 474.574 573.412 709.075 935.691 1321.33 1787.28 2076.97 1943.47 1401.6 793.825 577.621 464.09 359.484 865.509 669.779 587.142 1843.19 2403.34 1947.15 1267.35 1087.05 1811.41 3063.62 2802.46 2849.83 2966.31 3118.79 3354.07 3522.21 3516.22 3166.95 2820.22 2647.74 2674.01 2717.46 2680.65 2560.04 2347.35 2100.58 1884.9 1762.31 1614.71 1547.27 1661.32 1003.11 4370.9 2495.43 1175.08 469.594 482.755 894.959 1824.34 3706.11 6801.42 11302.5 16651.7 22864.2 27642 31445.7 34126.1 26262.3 18299.1 13221.4 9809.81 6880 4396.77 2625.99 1649.45 1159.29 839.235 616.846 415.611 279.328 194.793 135.598 97.83 89.6425 499.577 185.035 56.5876 139.635 264.719 497.687 799.603 1016.11 1075.34 896.956 623.586 380.994 214.968 116.594 64.5598 38.0692 24.3481 16.4534 11.5828 8.30811 6.06247 4.44525 3.30465 2.4706 1.86098 1.3965 1.04979 0.788655 0.61017 0.502401 0.463063 0.51119 0.740251 0.220441 0.137215 0.651297 0.886747 0.657005 0.404237 0.265163 0.201568 0.169788 0.151616 0.140013 0.131824 0.125751 0.121086 0.117366 0.114486 0.112068 0.110226 0.108572 0.107344 0.106201 0.105362 0.104546 0.10397 0.103367 0.102995 0.102517 0.102299 0.101942 0.101843 0.101669 0.10193 0.0983613 0.0985653 0.101771 0.10176 0.101369 0.101127 0.100929 0.100801 0.100701 0.100624 0.100561 0.100502 0.100455 0.100404 0.100367 0.100324 0.100289 0.100251 0.100217 0.100186 0.10015 0.100123 0.100089 0.100066 0.100034 0.100011 0.099982 0.0999655 0.0999535 0.0999557 0.0999537 0.0998481 0.0974495 0.0974485 0.099858 0.0999544 0.0999176 0.0998777 0.0998441 0.0998235 0.0998064 0.0997963 0.099788 0.0997835 0.0997778 0.0997756 0.0997729 0.099772 0.099771 0.099771 0.0997713 0.0997729 0.0997738 0.0997773 0.0997781 0.099784 0.0997868 0.0997956 0.0998059 0.0998238 0.0998438 0.0998708 0.0998857 0.0997707 0.0974345 0.0974347 0.09977 0.0998811 0.0998639 0.0998425 0.0998201 0.0998081 0.0997948 0.09979 0.0997832 0.0997811 0.0997757 0.0997751 0.0997725 0.0997722 0.0997714 0.0997718 0.0997721 0.0997735 0.0997744 0.0997779 0.0997787 0.0997847 0.0997874 0.0997964 0.0998068 0.0998252 0.0998454 0.0998719 0.0998879 0.0997718 0.0974344 0.0974343 0.0997748 0.0998931 0.09987 0.0998441 0.0998234 0.099807 0.0997977 0.0997884 0.0997854 0.0997804 0.0997786 0.0997747 0.0997737 0.0997723 0.0997719 0.0997709 0.0997719 0.0997711 0.0997718 0.0997796 0.0997793 0.0997831 0.0997855 0.0997963 0.0998053 0.0998226 0.0998424 0.0998672 0.0998821 0.0997697 0.097436 0.0974342 0.0997713 0.0998834 0.0998636 0.0998424 0.0998205 0.0998081 0.0997951 0.0997901 0.0997839 0.0997816 0.0997761 0.0997754 0.0997725 0.099772 0.0997713 0.0997713 0.0997715 0.099773 0.0997737 0.0997769 0.0997775 0.0997831 0.0997861 0.0997954 0.0998058 0.0998242 0.0998457 0.0998688 0.0998843 0.0997702 0.0974341 0.0974366 0.0997693 0.0998844 0.099868 0.0998478 0.0998231 0.0998079 0.0997936 0.0997885 0.0997817 0.0997798 0.0997747 0.0997752 0.0997717 0.0997718 0.0997712 0.0997708 0.0997713 0.0997716 0.0997747 0.0997749 0.0997797 0.0997812 0.0997884 0.0997934 0.0998072 0.0998207 0.0998436 0.0998712 0.0998865 0.0997707 0.097436 0.097434 0.0997661 0.0998797 0.099862 0.0998424 0.0998195 0.099807 0.099793 0.0997889 0.0997822 0.0997818 0.0997769 0.0997769 0.0997728 0.0997732 0.0997697 0.0997706 0.0997706 0.0997748 0.0997777 0.0997842 0.099788 0.0997989 0.0998094 0.0998307 0.0998556 0.099899 0.099951 0.10001 0.100053 0.0999661 0.0974393 0.0974375 0.789415 4.07041 5.57795 6.9869 8.47765 11.3712 15.1508 21.6362 30.0017 42.5653 60.6841 85.954 134.697 290.675 657.954 1224.62 1796.84 1579.51 1067.97 653.003 399.959 262.134 209.761 196.846 200.084 210.613 230.389 252.803 287.482 339.434 416.769 519.863 647.535 830.446 1114.26 1595.89 2404.59 3424.77 4262.93 4523.71 3994.51 3034.46 2462.2 1333.3 1888.55 2902.98 3751.75 4002.65 3353.32 2159.43 1966.62 1963.09 2057.64 3132.56 5874.98 5019.5 4654.11 4904.51 5360.29 5951.53 6286.31 6146.19 5370.33 4219.03 3229.36 2747.83 2663.86 2773.76 2948.03 3053.91 3082.22 3077.65 3136.79 3365.58 3745.18 4502.28 4592.32 12638 19412.8 19063.2 17873.2 17304.7 17865.6 18822.7 20493.1 22983.2 26203 29781.5 34411.2 37149.9 38265.4 36048.2 30525 26760.2 23834.7 20368.1 15457.4 9930.4 5517.3 3009.47 1916.57 1408 1051.67 759.866 534.541 387.934 300.909 253.797 264.813 704.242 2786.37 3611 3806.04 3738.71 3670.66 3425.35 3066.26 2460.77 1738.71 1095.42 639.135 351.345 190.491 106.514 63.7679 40.9473 27.7429 19.3749 13.8509 10.0222 7.32052 5.38389 3.98691 2.98085 2.23038 1.68766 1.28017 0.99445 0.802633 0.728719 0.796147 1.24374 1.61036 1.78453 1.7053 1.27777 0.75601 0.432198 0.281494 0.215165 0.181431 0.161728 0.148251 0.138543 0.131051 0.125394 0.120763 0.117293 0.114289 0.112058 0.110044 0.108536 0.107168 0.106143 0.105194 0.104511 0.103825 0.103373 0.10288 0.102607 0.102265 0.10214 0.101991 0.102288 0.101645 0.101856 0.101538 0.101459 0.10113 0.101046 0.10086 0.100806 0.100687 0.100652 0.100574 0.100535 0.100481 0.100439 0.100398 0.100355 0.100324 0.100283 0.100255 0.100219 0.100192 0.100158 0.100131 0.100103 0.100075 0.100047 0.100019 0.0999935 0.0999676 0.0999459 0.0999262 0.0999138 0.0996928 0.0996882 0.0998796 0.0998753 0.0998576 0.0998447 0.0998308 0.0998206 0.0998104 0.0998068 0.0998013 0.0997985 0.0997934 0.0997907 0.0997886 0.0997875 0.0997865 0.0997865 0.0997871 0.0997891 0.0997901 0.0997931 0.0997956 0.0997987 0.0998001 0.0998034 0.0998067 0.0998146 0.099818 0.0998232 0.099823 0.099811 0.0995955 0.0995957 0.0998093 0.099819 0.0998195 0.0998188 0.0998141 0.0998092 0.0998028 0.0998026 0.0997986 0.0997969 0.0997927 0.0997909 0.099789 0.0997878 0.0997869 0.0997871 0.0997878 0.0997897 0.0997906 0.0997935 0.099796 0.0997991 0.0998003 0.0998035 0.099807 0.0998152 0.0998183 0.0998227 0.0998229 0.0998101 0.0995961 0.0995955 0.0998129 0.0998276 0.0998208 0.0998181 0.099814 0.0998076 0.0998042 0.0998011 0.0998003 0.099797 0.0997942 0.0997906 0.0997895 0.0997878 0.099787 0.0997867 0.099788 0.099788 0.0997878 0.0997947 0.0997956 0.099797 0.0997991 0.0998031 0.0998075 0.0998148 0.0998186 0.0998211 0.0998197 0.0998087 0.0995954 0.099596 0.0998109 0.099821 0.0998196 0.0998185 0.0998143 0.0998093 0.0998027 0.0998027 0.0997987 0.0997973 0.0997927 0.0997908 0.0997885 0.0997876 0.0997867 0.0997867 0.0997872 0.0997892 0.09979 0.0997927 0.0997947 0.0997978 0.099799 0.0998024 0.0998061 0.0998146 0.0998194 0.0998215 0.0998218 0.099811 0.099596 0.0995953 0.0998092 0.0998226 0.0998209 0.0998217 0.0998151 0.0998081 0.0998016 0.099801 0.0997976 0.0997958 0.099792 0.0997904 0.0997882 0.0997873 0.0997866 0.0997867 0.0997872 0.0997882 0.0997905 0.0997924 0.0997964 0.0997981 0.0998015 0.0998017 0.0998077 0.0998129 0.0998176 0.0998236 0.0998237 0.0998106 0.0995955 0.0995961 0.0998074 0.09982 0.0998186 0.0998189 0.0998139 0.099809 0.0998014 0.0998017 0.0997979 0.0997974 0.0997933 0.0997924 0.0997887 0.0997877 0.0997856 0.0997862 0.0997863 0.0997889 0.0997909 0.0997963 0.0998001 0.0998063 0.0998099 0.0998172 0.099823 0.099836 0.0998439 0.0998487 0.0998529 0.099849 0.0996258 0.097466 0.808602 3.88897 5.16606 6.23316 7.83493 10.9081 16.1541 25.5796 40.5589 66.0643 101.497 140.439 190.052 289.145 496.792 930.053 1485.97 1375.27 989.367 601.474 367.393 253.616 227.758 238.216 260.574 282.601 301.634 324.777 368.055 437.503 543.107 693.709 901.712 1205.19 1704.85 2547.79 3915.06 5618.69 7487.45 9524.81 11571.8 13970.3 17398.7 20455.2 26753.5 28865.1 24095.4 14650 5889.59 3209.24 3597.53 7100.47 13185.7 24458.9 25305.8 21479.3 18045.1 15416.8 13677.4 12781.9 12253.7 11408.1 10020.5 7769.24 5328.43 3676.65 2993.71 2949.82 3242.18 3666.05 4119.9 4554.15 5064.66 5958.67 7504.03 9900.91 11439 19426.2 30602.4 52139.5 69625.3 75461.8 63946.4 48711.8 41846.5 43328.5 45630.5 47520 50011 48285 43308.6 48248.5 46965 44506.6 41998.3 38013.2 30770.7 20760.1 11466.4 5806.09 3232.19 2181.74 1637.82 1308.38 986.711 752.561 626.644 577.07 615.606 939.321 2099.59 2992.64 3743.38 4293.77 4579.29 4498.94 3946.39 3131.25 2188.77 1409.18 847.173 490.902 281.274 165.055 100.737 64.7229 43.2681 30.1337 21.5522 15.8229 11.7068 8.72876 6.52338 4.92678 3.74894 2.88464 2.23213 1.76733 1.44485 1.27364 1.23827 1.484 1.80664 1.85227 1.65462 1.22199 0.764998 0.47927 0.328531 0.252968 0.209539 0.182682 0.163674 0.150212 0.1399 0.132366 0.126193 0.121656 0.117719 0.114851 0.112243 0.110387 0.108609 0.107396 0.106157 0.105361 0.104485 0.103959 0.103355 0.10302 0.102627 0.102422 0.102215 0.102344 0.101885 0.101865 0.10155 0.101456 0.101184 0.101094 0.100923 0.100873 0.100746 0.100714 0.100623 0.100594 0.100522 0.100491 0.100436 0.100401 0.100359 0.100323 0.10029 0.100255 0.100228 0.100193 0.100167 0.100136 0.100111 0.100083 0.100059 0.100034 0.100011 0.0999859 0.0999628 0.0999603 0.0997927 0.0997776 0.09991 0.0998862 0.0998723 0.0998568 0.0998427 0.0998305 0.099821 0.0998149 0.0998109 0.0998075 0.0998043 0.0998009 0.0997995 0.0997974 0.0997965 0.0997961 0.0997969 0.0997982 0.0998002 0.0998023 0.0998047 0.099806 0.0998078 0.0998108 0.0998157 0.0998223 0.099827 0.0998327 0.0998322 0.0998414 0.0996831 0.0996829 0.0998405 0.0998296 0.0998311 0.0998282 0.0998228 0.099817 0.0998109 0.0998085 0.0998062 0.0998047 0.0998027 0.0998007 0.0997991 0.0997971 0.0997962 0.0997964 0.0997974 0.0997992 0.0998009 0.0998022 0.099805 0.0998062 0.099808 0.0998109 0.0998157 0.0998227 0.0998271 0.0998321 0.0998322 0.099841 0.0996834 0.0996833 0.0998436 0.0998359 0.0998311 0.0998276 0.099822 0.0998165 0.0998108 0.099809 0.0998066 0.0998057 0.0998033 0.0998008 0.0997988 0.0997971 0.0997964 0.0997962 0.0997978 0.0997982 0.099798 0.0998045 0.0998034 0.0998048 0.0998063 0.0998104 0.0998161 0.0998231 0.0998284 0.0998315 0.0998301 0.0998396 0.099683 0.0996833 0.0998423 0.0998312 0.0998302 0.0998281 0.0998234 0.0998172 0.0998107 0.0998089 0.0998061 0.0998052 0.0998025 0.0998006 0.0997985 0.0997969 0.0997962 0.0997961 0.0997969 0.0997987 0.0998003 0.0998015 0.0998037 0.099805 0.0998068 0.0998098 0.0998146 0.0998217 0.0998279 0.099831 0.0998315 0.0998416 0.0996832 0.099683 0.0998406 0.0998331 0.0998307 0.0998298 0.0998228 0.0998152 0.0998098 0.0998075 0.0998058 0.0998036 0.0998023 0.0998005 0.0997986 0.0997968 0.0997955 0.0997954 0.0997966 0.099798 0.0998 0.0998019 0.0998038 0.0998063 0.099808 0.0998107 0.0998157 0.099822 0.0998261 0.0998327 0.0998336 0.099841 0.0996835 0.0996836 0.0998402 0.099832 0.0998313 0.0998285 0.0998234 0.0998173 0.0998105 0.0998084 0.0998073 0.0998058 0.0998041 0.0998018 0.0998002 0.0997982 0.0997968 0.0997957 0.0997962 0.099798 0.0998012 0.099805 0.0998085 0.0998127 0.0998154 0.09982 0.0998246 0.0998348 0.0998413 0.0998435 0.0998476 0.0998594 0.0996777 0.0973739 0.734193 3.28705 4.45848 5.7491 8.13028 12.1841 19.0498 31.8592 55.6408 105.104 191.673 285.122 372.735 503.848 715.781 993.756 1190.18 1056.68 792.92 514.246 355.005 298.478 309.187 342.523 371.542 388.641 403.599 428.157 476.013 562.734 698.397 897.045 1194.65 1658.08 2446.21 3744.9 5566.88 7247.73 8655 9799.52 10563.1 11006 11242.9 11005.3 10502.2 12595.4 15007.2 18093.9 20548.2 18498.4 14290.9 11283.2 10514.5 16511.5 17759.4 17116.4 15671.1 14230.4 13447 13362.2 13570.1 13478.6 12615.8 10497.2 7663.71 5200.36 3799.98 3359.19 3553.26 4107.3 4898.56 5943.02 7240.88 9062.96 12020.7 16858.4 22743.4 34187.8 51149.4 67854.2 78724.1 83574.3 84266.5 83157 80661.3 77913.4 74500.4 70973.8 66854.6 64961.8 56562.6 57046.8 56504.6 58167.5 59790.5 57955.6 49553.4 35147.4 20169.9 10046.1 5171.31 3273.07 2474.74 1978.27 1616.15 1298.18 1122.46 1068.84 1138.79 1399.34 2030.25 2818.04 3723.37 4419.44 4866.2 4794.81 4303.76 3462.58 2526.51 1701.24 1087.61 663.015 397.551 238.792 146.629 92.5641 60.6606 41.2522 29.2003 21.3184 15.9753 12.1388 9.29336 7.14642 5.52224 4.31631 3.41608 2.7606 2.27625 1.95473 1.76644 1.77113 1.8596 1.79736 1.57564 1.21428 0.820829 0.548259 0.385736 0.295465 0.239468 0.204499 0.179188 0.162008 0.14855 0.139045 0.131302 0.125583 0.120863 0.117246 0.114211 0.111893 0.109873 0.108361 0.106985 0.105988 0.105044 0.104381 0.10375 0.103318 0.102911 0.102632 0.102391 0.102352 0.101965 0.101824 0.101574 0.101419 0.101214 0.101087 0.100951 0.100872 0.100759 0.100713 0.100626 0.100592 0.100517 0.10049 0.100426 0.100402 0.100346 0.100322 0.100275 0.10025 0.100212 0.100185 0.100152 0.100124 0.100094 0.100067 0.100042 0.100019 0.0999947 0.0999676 0.0999444 0.0999413 0.0998116 0.0997917 0.0998845 0.0998556 0.0998395 0.0998272 0.0998136 0.0998022 0.0997929 0.0997876 0.0997835 0.0997794 0.0997762 0.0997733 0.0997716 0.0997702 0.0997691 0.0997689 0.0997687 0.0997698 0.0997708 0.099772 0.0997736 0.099775 0.0997763 0.099778 0.0997814 0.0997872 0.0997903 0.0997939 0.099796 0.0998111 0.099696 0.099696 0.0998114 0.0997946 0.0997937 0.0997922 0.099788 0.0997822 0.0997778 0.0997761 0.099775 0.0997732 0.0997725 0.0997713 0.0997704 0.0997691 0.0997683 0.0997688 0.099769 0.0997706 0.0997716 0.0997726 0.099774 0.0997751 0.0997765 0.099778 0.0997816 0.0997876 0.0997906 0.0997937 0.0997963 0.0998115 0.0996962 0.0996962 0.0998127 0.0997983 0.0997931 0.0997917 0.0997871 0.099782 0.0997776 0.0997765 0.0997753 0.0997745 0.0997729 0.0997712 0.0997702 0.0997686 0.0997691 0.0997685 0.0997698 0.0997696 0.0997693 0.0997738 0.0997732 0.0997739 0.0997746 0.0997772 0.0997816 0.0997877 0.0997921 0.0997941 0.0997949 0.0998104 0.0996961 0.0996962 0.0998126 0.0997957 0.0997927 0.0997921 0.0997881 0.0997824 0.0997778 0.0997767 0.099775 0.0997737 0.099772 0.0997711 0.0997695 0.0997688 0.0997682 0.0997685 0.0997687 0.0997703 0.0997712 0.0997722 0.0997733 0.0997744 0.0997755 0.0997771 0.0997805 0.0997865 0.0997909 0.0997928 0.0997959 0.099812 0.0996958 0.0996957 0.0998111 0.0997968 0.0997922 0.0997922 0.0997877 0.0997807 0.0997774 0.0997758 0.0997753 0.0997734 0.0997725 0.099771 0.0997701 0.0997685 0.0997675 0.0997673 0.0997686 0.0997691 0.0997707 0.0997718 0.0997734 0.0997754 0.0997762 0.0997778 0.0997812 0.0997872 0.0997891 0.0997942 0.0997969 0.0998111 0.099696 0.0996958 0.0998117 0.0997958 0.0997924 0.0997901 0.0997863 0.0997818 0.0997773 0.0997765 0.0997754 0.099774 0.099773 0.099772 0.0997702 0.0997681 0.0997669 0.0997675 0.0997672 0.0997689 0.0997702 0.0997737 0.0997763 0.0997795 0.0997813 0.0997847 0.0997893 0.0997956 0.0998037 0.0998086 0.0998187 0.0998441 0.0997101 0.0973668 0.560803 2.37269 3.65772 5.56435 8.99222 14.7525 24.0838 40.5835 70.7164 135.747 267.153 458.283 672.24 867.547 983.639 1011.3 970.356 826.099 663.885 517.517 450.225 446.906 467.082 487.64 500.024 509.099 523.996 563.272 641.184 786.655 1015.12 1334.67 1810.1 2550.03 3848.03 6001.8 9042.65 11707.5 13511.4 14312.2 14162.4 13470.6 12402 11234 10735.8 11480.5 13185.4 15954.4 18279.7 14347.9 11046 7605.93 6044.06 8250.87 9614.98 10372 10618.3 10872.6 11540.7 12444.8 13436.4 13950.2 13489.8 12003 9761.17 7332.85 5439.23 4454.74 4287.13 4726.1 5650.39 7075.01 9071.61 11953.6 16344.2 23309.2 33031 46197.1 63625.1 82463.9 98080.7 107196 108760 107297 105500 105033 104736 102799 97659.1 88617.7 80711.5 76774.8 75420.8 77584.2 79172.1 75180.7 63045.7 44497.6 25948.2 13119.4 6897.88 4329.25 3286.56 2777.88 2465.23 2092.04 1821.85 1721 1785.57 2018.79 2498.44 3169.63 4011.33 4718.48 5106.01 5086.31 4595.97 3794.81 2825.55 1984.94 1306.97 825.988 507.446 310.499 191.454 120.925 78.3718 52.9251 36.8943 26.7774 19.9762 15.335 11.9351 9.40953 7.45256 5.96567 4.82765 3.97361 3.32427 2.87 2.536 2.33206 2.186 1.97207 1.66042 1.27451 0.891834 0.619063 0.444898 0.339904 0.272068 0.227756 0.196377 0.174526 0.158187 0.146251 0.137064 0.129974 0.12444 0.120018 0.116511 0.11366 0.111369 0.109493 0.107972 0.106729 0.105714 0.104884 0.104212 0.103659 0.10322 0.102854 0.102568 0.102397 0.102064 0.101846 0.101637 0.101442 0.101265 0.101109 0.100988 0.100884 0.100786 0.100722 0.10064 0.100595 0.100524 0.100491 0.100426 0.100399 0.100342 0.100319 0.100268 0.100247 0.100203 0.100181 0.100141 0.100119 0.100084 0.10006 0.10003 0.100004 0.0999768 0.0999496 0.0999237 0.0999223 0.099824 0.099801 0.0998575 0.0998229 0.0998082 0.0997965 0.0997856 0.0997767 0.0997686 0.0997637 0.0997585 0.0997546 0.0997501 0.0997478 0.0997448 0.0997425 0.0997403 0.0997397 0.0997405 0.0997422 0.0997432 0.0997445 0.0997451 0.099747 0.0997474 0.0997486 0.0997501 0.0997525 0.0997538 0.0997551 0.0997563 0.0997771 0.0996981 0.0996979 0.099777 0.0997554 0.0997552 0.0997545 0.0997535 0.0997507 0.0997485 0.0997477 0.0997465 0.0997454 0.0997444 0.0997439 0.0997422 0.0997403 0.0997389 0.0997393 0.0997402 0.0997428 0.0997438 0.0997449 0.0997455 0.0997471 0.0997476 0.0997487 0.0997502 0.099753 0.099754 0.0997553 0.0997565 0.0997772 0.0996979 0.0996981 0.099778 0.0997576 0.0997546 0.0997543 0.0997526 0.0997507 0.0997486 0.0997476 0.0997477 0.0997459 0.0997454 0.0997435 0.0997426 0.09974 0.0997395 0.099739 0.0997412 0.0997414 0.0997427 0.0997446 0.0997456 0.099745 0.099747 0.0997471 0.0997507 0.0997524 0.099755 0.0997552 0.0997563 0.0997767 0.0996985 0.0996979 0.0997777 0.0997562 0.0997546 0.0997546 0.0997533 0.099751 0.0997482 0.0997483 0.0997462 0.0997458 0.0997438 0.0997438 0.0997414 0.0997404 0.0997388 0.099739 0.0997398 0.0997425 0.0997433 0.0997446 0.099745 0.0997463 0.099747 0.0997478 0.0997494 0.0997518 0.099754 0.0997545 0.0997563 0.0997775 0.0996976 0.0996982 0.0997771 0.0997571 0.0997544 0.0997548 0.099753 0.0997496 0.0997485 0.0997475 0.0997476 0.0997455 0.0997452 0.0997435 0.0997426 0.0997401 0.0997386 0.0997381 0.09974 0.0997411 0.0997435 0.0997439 0.0997458 0.0997469 0.099748 0.0997485 0.0997503 0.0997529 0.0997531 0.0997558 0.0997574 0.099777 0.0996985 0.0996976 0.0997779 0.0997565 0.099755 0.099754 0.0997529 0.0997513 0.0997494 0.099749 0.0997482 0.0997468 0.0997458 0.0997446 0.0997433 0.0997415 0.0997396 0.0997397 0.0997402 0.0997437 0.0997443 0.0997485 0.0997493 0.099753 0.0997536 0.0997559 0.0997571 0.0997586 0.0997589 0.0997571 0.0997595 0.0997793 0.0996768 0.097287 0.416293 1.62272 2.9762 5.31415 9.52906 16.8718 28.8475 49.7126 83.7092 144.872 263.863 452.189 685.038 907.475 1044.19 1047.79 965.225 855.664 754.178 700.968 692.966 697.668 705.424 719.768 727.818 741.89 771.969 847.769 986.262 1206.57 1535.07 1970.82 2562.48 3496.39 5153.23 8039.34 12227 16525.9 19431.3 20520.2 20117.9 18964.8 17472.5 16031.8 15024.7 14442.8 14020.5 13623.2 12428.2 8341.4 6391.04 4551.72 3968.57 4778.06 5627.02 6396.86 7291.31 8407.49 9711.81 10910.9 11594 11441.5 10641.7 9514.07 8295.85 7164.48 6215.69 5640.63 5532.49 5933.29 6917.23 8583.94 11112.1 14828.7 20284.9 28512.3 40095.4 54782.4 72313.7 91431 109371 120968 125297 124455 122443 120937 120113 118282 114558 108370 101680 96545.2 92933.7 90992.5 86565.3 75131.4 56727.9 36465.6 20867.5 11987.1 7519.23 5271.66 4137.7 3490.18 3237.37 2981.06 2572.78 2368.67 2365.31 2544.63 2896.88 3458.25 4135.47 4750.07 5133.24 5058.65 4598.74 3788.66 2906.12 2072.38 1410.14 915.423 578.794 361.694 226.616 143.433 92.942 61.6699 42.6043 30.4293 22.6239 17.2438 13.4368 10.6098 8.49752 6.86878 5.63341 4.67294 3.94661 3.38611 2.95816 2.6048 2.309 1.97614 1.62264 1.23876 0.89621 0.640499 0.472053 0.360888 0.288995 0.239401 0.205643 0.180996 0.163516 0.15007 0.1402 0.13227 0.126313 0.121399 0.117661 0.114504 0.1121 0.110026 0.108453 0.107071 0.106035 0.105104 0.104425 0.10379 0.103344 0.102914 0.102607 0.102334 0.102067 0.101817 0.101594 0.101384 0.101229 0.101065 0.100954 0.100841 0.10075 0.100673 0.100599 0.100543 0.100481 0.100437 0.100383 0.100345 0.100297 0.100264 0.100221 0.100193 0.100153 0.100127 0.10009 0.100065 0.10003 0.100004 0.0999719 0.0999444 0.0999139 0.0998857 0.0998557 0.0998396 0.0997966 0.099773 0.0997726 0.0997491 0.0997382 0.099728 0.0997194 0.0997122 0.0997055 0.0997007 0.0996956 0.0996917 0.0996872 0.0996844 0.0996814 0.0996796 0.0996784 0.0996778 0.0996778 0.0996784 0.0996793 0.0996803 0.0996806 0.0996817 0.0996816 0.0996819 0.0996815 0.0996816 0.0996806 0.0996806 0.0996784 0.099688 0.0996678 0.0996682 0.0996883 0.0996787 0.0996805 0.0996811 0.0996816 0.0996818 0.0996815 0.0996819 0.0996812 0.099681 0.09968 0.0996793 0.0996781 0.0996771 0.0996769 0.0996769 0.0996773 0.0996782 0.0996792 0.0996801 0.0996806 0.0996817 0.0996816 0.099682 0.0996816 0.0996818 0.0996807 0.0996807 0.0996787 0.0996881 0.0996679 0.0996681 0.0996885 0.0996791 0.0996805 0.0996809 0.0996816 0.0996816 0.0996818 0.0996814 0.0996817 0.0996806 0.0996803 0.0996791 0.0996783 0.0996773 0.0996769 0.0996769 0.0996775 0.0996782 0.0996789 0.0996802 0.0996808 0.0996809 0.0996818 0.0996811 0.0996822 0.0996814 0.0996816 0.0996804 0.099679 0.0996878 0.0996682 0.0996685 0.0996886 0.0996791 0.09968 0.0996812 0.0996812 0.0996819 0.0996813 0.099682 0.0996812 0.099681 0.09968 0.0996794 0.0996781 0.0996771 0.0996769 0.0996768 0.0996771 0.099678 0.0996789 0.0996798 0.0996802 0.0996811 0.0996813 0.0996814 0.0996814 0.0996812 0.0996808 0.0996803 0.0996787 0.0996884 0.0996679 0.0996682 0.0996882 0.0996791 0.0996806 0.0996811 0.0996819 0.0996814 0.0996818 0.0996817 0.0996816 0.0996807 0.09968 0.0996791 0.099678 0.0996772 0.0996765 0.0996766 0.0996769 0.0996776 0.099679 0.0996796 0.0996807 0.0996814 0.099682 0.0996819 0.0996822 0.0996821 0.0996811 0.0996811 0.0996796 0.099688 0.0996682 0.0996681 0.0996885 0.0996789 0.0996805 0.0996816 0.0996826 0.0996834 0.0996837 0.099684 0.0996834 0.0996825 0.0996812 0.09968 0.0996785 0.0996775 0.0996768 0.0996767 0.0996777 0.0996794 0.0996811 0.0996841 0.0996855 0.0996884 0.0996887 0.0996903 0.0996896 0.0996893 0.0996869 0.0996858 0.0996829 0.0996898 0.0996367 0.0972745 0.309298 1.13636 2.4547 5.04432 9.72085 17.893 30.4874 50.1701 80.7257 132.624 231.969 392.475 597.996 824.999 1040.72 1170.44 1209.76 1208.97 1208.52 1202.48 1178.98 1132.6 1109.16 1133.77 1181.54 1240.69 1323.8 1448.14 1614.94 1828.02 2132.87 2578.63 3238.09 4296.67 6113.13 9304.04 14315.5 20566.3 26095.4 29162.1 29706.5 28488.9 26267.9 23608.5 20633.1 17286.9 13735.8 10371.9 7408.83 4678.32 3716.88 3255.48 3384.85 4031.28 4892.64 5942.84 7185.15 8452.62 9354.5 9309.19 8132.7 6675.47 5558.29 4949.46 4877.52 5065.23 5368.53 5817.78 6506.19 7581.03 9161.69 11490.8 14788.6 19428.1 25803.9 34499.5 46159.1 60754.1 77621.5 96017.5 114673 128589 135931 137025 135160 132902 131677 130344 127592 122126 114960 105991 95043.5 81194.7 62270.8 40606.5 24040.2 15385.9 11671.9 9385.8 7675.56 6372.28 5299.58 4427.17 3989.57 3558.52 2961.23 2619.95 2551.74 2684.27 2970.31 3424.99 3966.21 4446.57 4764.83 4728.33 4322.99 3662.42 2851.27 2084.93 1443.24 959.887 617.77 390.743 245.827 155.636 100.556 66.3109 45.6807 32.3618 24.0142 18.2251 14.2255 11.221 9.00545 7.29087 5.99786 4.9823 4.21089 3.58307 3.08471 2.6383 2.25366 1.85458 1.48948 1.11984 0.836451 0.61187 0.467032 0.360537 0.292802 0.241929 0.20878 0.182861 0.165451 0.151195 0.14135 0.132935 0.127051 0.121812 0.118155 0.114767 0.11244 0.110189 0.108688 0.10717 0.106198 0.105164 0.10453 0.103823 0.103408 0.102921 0.102623 0.102298 0.102042 0.101772 0.101564 0.101355 0.101201 0.101036 0.10093 0.100806 0.100729 0.100632 0.100576 0.100499 0.100454 0.100391 0.100352 0.100297 0.100263 0.100215 0.100184 0.100141 0.100112 0.100074 0.100046 0.100011 0.0999821 0.099949 0.0999189 0.0998863 0.0998556 0.0998244 0.0997937 0.0997718 0.0997393 0.0997155 0.0997044 0.0996853 0.0996736 0.0996634 0.0996545 0.0996475 0.0996407 0.0996358 0.0996302 0.0996264 0.0996219 0.0996195 0.0996166 0.0996152 0.0996138 0.0996136 0.0996133 0.0996137 0.0996145 0.0996146 0.0996156 0.0996159 0.0996165 0.0996161 0.099616 0.0996154 0.0996143 0.0996138 0.0996118 0.0996165 0.0996081 0.0996082 0.0996165 0.0996121 0.0996138 0.0996146 0.0996153 0.0996161 0.0996162 0.0996165 0.0996161 0.0996155 0.0996147 0.0996142 0.0996133 0.0996125 0.0996123 0.0996123 0.0996127 0.0996132 0.0996144 0.0996146 0.0996155 0.099616 0.0996163 0.0996162 0.0996161 0.0996154 0.0996145 0.0996138 0.099612 0.0996165 0.0996081 0.0996081 0.0996167 0.0996121 0.0996137 0.0996144 0.0996154 0.0996161 0.0996161 0.0996164 0.099616 0.0996156 0.0996147 0.0996144 0.0996133 0.0996126 0.0996123 0.0996124 0.0996123 0.0996135 0.0996136 0.0996151 0.0996152 0.0996161 0.0996162 0.0996161 0.099616 0.0996153 0.0996148 0.0996137 0.0996123 0.0996165 0.0996084 0.0996084 0.0996165 0.0996123 0.0996135 0.0996148 0.0996152 0.099616 0.0996162 0.0996163 0.0996161 0.0996151 0.0996149 0.0996138 0.0996135 0.0996124 0.0996124 0.0996122 0.0996127 0.0996131 0.0996142 0.0996145 0.0996153 0.0996157 0.0996162 0.0996159 0.099616 0.0996151 0.0996145 0.0996136 0.0996119 0.0996164 0.0996079 0.0996083 0.0996165 0.099612 0.0996138 0.0996143 0.0996154 0.0996159 0.0996162 0.0996164 0.099616 0.0996157 0.0996147 0.0996145 0.0996131 0.0996127 0.099612 0.0996123 0.0996124 0.0996132 0.0996142 0.0996147 0.0996156 0.0996162 0.0996168 0.0996166 0.0996166 0.099616 0.0996147 0.0996144 0.0996125 0.0996168 0.0996084 0.0996081 0.0996164 0.0996122 0.0996137 0.0996153 0.0996164 0.099618 0.0996183 0.0996187 0.0996183 0.0996173 0.0996163 0.0996152 0.0996143 0.099613 0.0996126 0.0996122 0.0996136 0.0996141 0.0996167 0.0996179 0.0996198 0.0996212 0.0996225 0.0996232 0.0996228 0.0996225 0.0996205 0.0996192 0.0996155 0.0996196 0.0995823 0.0972642 0.150549 0.260996 0.346558 0.486669 0.629334 0.765706 0.950722 1.0412 1.34864 1.52689 2.04389 2.77547 3.86573 6.26535 10.5663 15.6567 21.2839 30.4235 35.5184 41.3056 39.4747 33.6814 27.9572 25.0567 27.8628 31.4194 38.335 42.5465 39.3694 46.7434 40.5323 45.9073 45.0376 52.8043 67.5487 98.6485 162.618 282.702 485.532 788.218 1226.9 1860.61 2660.94 3443.64 4151.4 4631.5 4858.72 4821.75 4555 4116.89 3959.27 3758.04 3407.51 3067.61 2635.49 2213.69 1808.73 1565.21 1450.72 1507.02 1592.79 1671.27 1650.28 1448.83 1344.11 1222.2 1120.01 1043.36 1012.34 1055.99 1186.75 1413.11 1807.26 2402.68 3243.46 4458.86 6114.21 8189.38 10349.8 12626.3 14459.1 15798 16165.2 17933.6 16204.5 14106.4 12338.6 10510.1 8902.94 7209.45 6044.37 5129.23 4350.5 3893.36 3307.41 2740.16 2278.79 1990.31 1671.25 1285.02 840.498 540.344 351.246 157.291 21.2735 16.9168 35.5464 59.913 83.978 91.1798 106.683 105.565 83.5736 76.9133 25.5852 13.5129 4.24992 1.93232 1.00833 0.572655 0.33882 0.221127 0.16142 0.133767 0.121764 0.115871 0.113705 0.111826 0.111327 0.110265 0.109897 0.109266 0.110627 0.108621 0.114373 0.108582 0.118012 0.112691 0.11893 0.113326 0.115939 0.108287 0.108654 0.105638 0.105368 0.104589 0.104669 0.103929 0.104105 0.103435 0.10357 0.102938 0.103018 0.102441 0.10247 0.101934 0.101926 0.101437 0.10141 0.100956 0.100922 0.100501 0.100458 0.100069 0.100017 0.0996616 0.0995986 0.0992826 0.0992136 0.0989446 0.0988884 0.0986718 0.0986155 0.0984564 0.098377 0.0982372 0.0981711 0.0980519 0.0979906 0.0978826 0.0978439 0.0977438 0.0977195 0.0976349 0.0976168 0.0975501 0.0975355 0.0974835 0.097472 0.0974312 0.0974223 0.0973905 0.0973843 0.0973596 0.0973554 0.0973355 0.0973329 0.0973171 0.0973155 0.0973031 0.0973019 0.0972929 0.0972909 0.0972853 0.097282 0.0972822 0.0972734 0.0972706 0.0972744 0.0972696 0.0972686 0.0972676 0.0972665 0.0972661 0.0972649 0.0972647 0.0972637 0.0972635 0.0972626 0.0972621 0.0972614 0.0972608 0.0972602 0.0972601 0.0972604 0.0972605 0.0972614 0.0972608 0.0972618 0.0972612 0.0972618 0.0972612 0.0972619 0.0972613 0.0972614 0.0972612 0.0972603 0.0972637 0.0972573 0.0972574 0.0972638 0.0972602 0.0972611 0.0972613 0.0972613 0.0972618 0.0972615 0.0972614 0.0972615 0.0972612 0.097261 0.0972606 0.0972604 0.0972597 0.0972596 0.0972593 0.0972601 0.0972602 0.0972609 0.0972607 0.0972615 0.0972613 0.0972618 0.0972614 0.0972618 0.0972614 0.0972611 0.0972613 0.0972603 0.0972635 0.0972572 0.0972574 0.0972637 0.0972604 0.0972609 0.0972614 0.0972612 0.0972621 0.0972611 0.0972622 0.0972609 0.0972619 0.0972605 0.0972613 0.0972597 0.0972603 0.0972592 0.0972596 0.0972595 0.0972606 0.0972601 0.0972616 0.0972606 0.097262 0.0972611 0.0972618 0.0972616 0.0972613 0.0972616 0.0972609 0.0972605 0.0972639 0.0972576 0.0972572 0.0972634 0.0972602 0.0972611 0.0972611 0.0972618 0.0972613 0.0972623 0.0972608 0.0972623 0.0972604 0.0972617 0.0972601 0.0972608 0.0972595 0.0972598 0.0972594 0.0972599 0.0972602 0.0972607 0.097261 0.0972612 0.0972613 0.0972615 0.0972612 0.0972619 0.097261 0.0972614 0.0972609 0.0972603 0.0972634 0.0972574 0.0972574 0.0972636 0.0972604 0.0972611 0.0972615 0.0972613 0.097262 0.0972611 0.097262 0.0972611 0.0972618 0.0972605 0.0972612 0.0972597 0.0972603 0.0972591 0.0972593 0.0972598 0.0972603 0.0972607 0.097261 0.0972616 0.0972613 0.0972618 0.0972617 0.0972618 0.0972619 0.0972611 0.0972615 0.0972603 0.0972639 0.0972578 0.0972573 0.0972635 0.0972607 0.0972614 0.0972615 0.097262 0.0972621 0.0972623 0.0972619 0.0972623 0.0972616 0.0972618 0.0972609 0.097261 0.0972595 0.0972599 0.0972591 0.0972608 0.0972599 0.0972626 0.0972614 0.0972636 0.0972624 0.0972638 0.0972628 0.0972639 0.0972626 0.0972634 0.0972626 0.0972614 0.097265 0.0972568 0.0972457 0.133388 0.159718 0.175534 0.197623 0.199995 0.217 0.184147 0.148663 0.165213 0.160239 0.156441 0.138886 0.126493 0.117739 0.117588 0.174784 0.189553 0.179358 0.20299 0.211822 0.257606 0.283626 0.328083 0.398945 0.480037 0.576947 0.674514 0.785977 0.981103 1.03436 1.25961 1.31992 1.20155 1.21428 1.41852 1.2925 1.26575 1.05518 0.893292 0.557491 0.400694 0.307713 0.215802 0.131803 0.112529 0.161482 0.651203 4.53762 14.8253 23.2797 27.3796 25.9544 24.2425 18.5462 14.384 9.75655 6.01105 3.46921 2.18083 1.68281 1.46734 1.32227 1.4639 1.30794 1.24365 1.14219 0.9048 0.582099 0.415612 0.249536 0.167766 0.13488 0.119112 0.113793 0.10562 0.110195 0.114494 0.119131 0.129367 0.150222 0.197859 0.318836 0.687175 1.8987 5.75936 7.50061 7.9271 6.38035 3.59061 2.161 1.56213 1.38105 1.26968 1.14988 1.03341 0.854014 0.645143 0.487748 0.343634 0.201314 0.140642 0.124065 0.116411 0.113277 0.102028 0.104483 0.105899 0.108009 0.111244 0.116176 0.122458 0.126438 0.134512 0.137623 0.141172 0.141064 0.138577 0.135537 0.131223 0.127334 0.123997 0.120222 0.118194 0.114987 0.112915 0.111002 0.109026 0.108105 0.107085 0.106547 0.106102 0.10512 0.103937 0.102523 0.0998846 0.100276 0.100579 0.100411 0.100781 0.10083 0.100831 0.100916 0.10072 0.10079 0.100536 0.100553 0.100264 0.100267 0.0999569 0.0999518 0.0996287 0.0996284 0.0993277 0.0993168 0.0990595 0.0990216 0.0988163 0.0987492 0.0985811 0.0984968 0.0983457 0.0982602 0.0981199 0.09803 0.0976416 0.0976519 0.0976759 0.0976653 0.0976646 0.0976689 0.097661 0.097664 0.0976518 0.0976535 0.0976334 0.0976384 0.0976163 0.0976214 0.0976028 0.0976051 0.0975916 0.0975922 0.0975813 0.0975807 0.0975721 0.0975713 0.097564 0.0975626 0.0975572 0.0975544 0.0975512 0.0975482 0.0975438 0.0975348 0.097528 0.0975325 0.0975365 0.0975388 0.0975412 0.0975428 0.0975423 0.0975443 0.0975425 0.0975443 0.0975426 0.0975437 0.0975434 0.0975426 0.0975437 0.0975417 0.0975437 0.0975432 0.0975432 0.0975442 0.0975433 0.0975449 0.0975436 0.0975445 0.097543 0.0975422 0.097539 0.0975367 0.097537 0.0975106 0.0975099 0.097539 0.0975415 0.0975409 0.0975422 0.0975432 0.0975425 0.0975441 0.0975426 0.0975441 0.0975426 0.0975434 0.0975432 0.0975423 0.0975437 0.0975415 0.0975435 0.097543 0.0975431 0.0975441 0.0975432 0.0975448 0.0975435 0.0975445 0.097543 0.0975422 0.097539 0.0975367 0.0975368 0.0975106 0.0975074 0.097539 0.0975393 0.097539 0.0975401 0.0975412 0.0975428 0.0975419 0.0975435 0.0975423 0.0975435 0.0975429 0.0975427 0.0975434 0.0975418 0.0975434 0.0975419 0.0975435 0.0975429 0.0975407 0.0975385 0.0975424 0.0975409 0.0975421 0.0975398 0.0975395 0.097538 0.097536 0.0975346 0.0975253 0.0975098 0.0975385 0.0975413 0.0975411 0.0975423 0.0975432 0.0975425 0.0975439 0.0975428 0.0975439 0.0975428 0.0975435 0.0975433 0.0975423 0.0975436 0.0975416 0.0975436 0.097543 0.0975432 0.0975439 0.0975432 0.0975448 0.0975436 0.0975445 0.0975432 0.0975426 0.0975392 0.0975369 0.0975371 0.0975102 0.0975247 0.0975324 0.0975374 0.0975384 0.0975379 0.09754 0.0975403 0.0975424 0.0975415 0.0975433 0.0975425 0.0975436 0.0975432 0.0975428 0.0975387 0.0975389 0.0975424 0.0975431 0.0975429 0.0975425 0.097543 0.0975416 0.0975426 0.0975408 0.097541 0.0975391 0.0975387 0.0975371 0.0975323 0.0975247 0.0975099 0.0975386 0.0975414 0.0975432 0.0975424 0.097547 0.0975431 0.0975482 0.0975433 0.0975481 0.0975433 0.0975467 0.0975434 0.0975446 0.0975436 0.0975417 0.0975434 0.0975424 0.0975427 0.097544 0.0975428 0.0975455 0.0975433 0.0975455 0.097543 0.0975432 0.0975396 0.0975369 0.0975371 0.09751 0.19412 0.562851 0.883928 1.02384 1.13301 1.32736 1.18211 1.26962 1.22006 1.07352 0.922286 0.790556 0.586413 0.161646 0.166062 0.980709 1.24837 1.27739 1.51819 1.79957 2.90475 4.10782 5.29826 7.02587 9.37275 12.4295 15.0228 16.8923 17.7606 18.1938 17.9706 17.7212 15.3448 13.8155 14.8479 15.0019 13.9832 12.495 10.2696 7.56709 4.90357 3.10562 1.82893 0.370972 4.45376 50.6907 148.292 221.579 243.845 239.993 250.365 247.595 208.744 153.573 112.829 78.5684 50.7499 34.8234 25.4335 21.2446 19.5101 17.1841 19.5261 17.6982 16.4114 15.6551 14.0071 11.7695 9.61243 7.27485 4.75417 2.56548 1.17655 0.236705 0.143925 0.546191 1.67832 5.16259 13.7627 33.4681 70.433 121.825 170.881 195.768 184.556 162.205 139.337 100.084 44.0154 21.6077 12.1909 9.22535 8.47003 8.62904 8.96471 9.02872 8.70435 7.82627 6.38626 4.47166 2.56226 1.26505 0.494061 0.143304 0.104094 0.138039 0.154797 0.177954 0.216103 0.259618 0.310062 0.372844 0.437415 0.527715 0.631797 0.737644 0.824695 0.889281 0.925288 0.935926 0.915813 0.866918 0.789938 0.689257 0.581204 0.479723 0.390563 0.313424 0.250739 0.200834 0.163146 0.1359 0.118215 0.103874 0.0998946 0.105735 0.106164 0.106913 0.107422 0.108105 0.108487 0.108842 0.10889 0.108799 0.108504 0.108077 0.10753 0.106972 0.106311 0.105769 0.105181 0.104707 0.104201 0.103787 0.103361 0.103017 0.102661 0.102391 0.102091 0.101899 0.101658 0.101509 0.101299 0.0980168 0.0975681 0.100634 0.100683 0.100653 0.100662 0.100668 0.100633 0.100632 0.100581 0.100574 0.100506 0.10049 0.100411 0.100385 0.100304 0.100302 0.100269 0.100298 0.100269 0.100285 0.100247 0.100254 0.100205 0.100208 0.100164 0.100172 0.100135 0.10015 0.10006 0.0974448 0.0974232 0.100085 0.100119 0.100113 0.100077 0.100087 0.100053 0.100066 0.100031 0.100038 0.0999974 0.1 0.0999529 0.0999454 0.0999028 0.0999222 0.0999242 0.0999757 0.0999795 0.100023 0.100016 0.100055 0.100041 0.100072 0.100059 0.10009 0.100084 0.100103 0.100074 0.0974228 0.0974273 0.100072 0.100099 0.100115 0.100082 0.100095 0.100061 0.100074 0.10004 0.100049 0.100008 0.100009 0.0999619 0.0999493 0.0999043 0.0999211 0.099921 0.099972 0.0999767 0.10002 0.100015 0.100053 0.10004 0.100071 0.100059 0.100089 0.100083 0.100102 0.100074 0.0974227 0.0974287 0.100075 0.100113 0.100082 0.100092 0.100057 0.100069 0.100036 0.100048 0.10001 0.100017 0.0999757 0.0999739 0.0999234 0.0999223 0.0999008 0.0999443 0.0999591 0.100006 0.10001 0.100027 0.10007 0.100057 0.10009 0.100077 0.10011 0.100099 0.100135 0.100064 0.0974333 0.0974256 0.100072 0.100098 0.100115 0.100081 0.100094 0.10006 0.100072 0.100037 0.100045 0.100005 0.100006 0.0999589 0.0999491 0.0999046 0.0999203 0.0999209 0.0999722 0.099977 0.10002 0.100016 0.100054 0.100042 0.100073 0.100062 0.100092 0.100086 0.100102 0.100073 0.0974225 0.0974254 0.100076 0.100125 0.100107 0.100074 0.100089 0.100056 0.100069 0.100035 0.100042 0.100001 0.100001 0.0999526 0.0999443 0.0998924 0.0998948 0.0999438 0.099951 0.099998 0.099997 0.100038 0.100031 0.100065 0.100052 0.100085 0.100071 0.100106 0.100117 0.100077 0.0974244 0.0974266 0.100067 0.100089 0.100103 0.100068 0.100084 0.100052 0.100069 0.100037 0.10005 0.100012 0.100016 0.0999687 0.0999599 0.0999107 0.0999215 0.0999173 0.0999675 0.0999745 0.100019 0.100016 0.100056 0.100043 0.100074 0.10006 0.100089 0.100083 0.100098 0.100071 0.0974227 0.22689 0.686985 0.851139 0.995422 1.14181 1.69899 1.49097 1.35397 1.28486 1.19963 1.01059 0.854764 0.659707 0.15556 0.247724 1.99047 2.73429 3.44676 5.0818 7.97529 12.1412 14.5572 16.4533 18.5156 21.4379 24.8704 28.6602 30.3709 29.9784 29.6698 29.3735 26.1951 19.9491 19.4245 16.9318 13.4287 14.1338 15.0863 12.0757 8.58631 5.94671 4.336 2.84091 0.514288 9.10887 101.045 189.812 211.084 188.537 233.64 288.246 368.252 479.926 616.499 669.675 634.692 538.928 405.336 269.673 171.137 111.097 75.3419 46.1015 35.1388 31.5197 29.3186 24.5408 15.8483 10.2222 6.76749 4.38363 2.71291 1.68009 0.299214 0.190098 1.30958 4.58712 15.2118 46.6495 114.51 211.879 292.683 306.026 268.881 282.002 477.292 662.805 545.48 216.99 106.032 55.6674 33.6416 23.177 18.0076 14.7734 12.2278 9.97121 7.4477 5.02683 3.0533 1.7076 0.914202 0.457681 0.138081 0.107771 0.187603 0.226342 0.283299 0.381287 0.509966 0.643751 0.724138 0.772038 0.79786 0.828083 0.847898 0.846672 0.824212 0.782679 0.728472 0.663401 0.590723 0.515626 0.442506 0.37796 0.318374 0.269664 0.226966 0.192954 0.165352 0.143711 0.127393 0.115736 0.103638 0.100448 0.109264 0.108815 0.108706 0.108606 0.108488 0.108421 0.108107 0.10792 0.10745 0.107063 0.106547 0.105996 0.105541 0.104926 0.104552 0.104005 0.103713 0.103274 0.103038 0.102672 0.10249 0.102179 0.102039 0.101787 0.101679 0.101474 0.101367 0.101187 0.0981868 0.0978086 0.100657 0.100644 0.100586 0.100548 0.100516 0.100461 0.10045 0.100392 0.100375 0.100312 0.100285 0.100213 0.100176 0.100104 0.100099 0.100084 0.100126 0.100119 0.100151 0.100126 0.100148 0.100114 0.100133 0.100097 0.100119 0.100081 0.100104 0.100069 0.0976708 0.0976576 0.100006 0.100005 0.100002 0.0999668 0.0999818 0.09994 0.0999533 0.0999085 0.0999181 0.0998677 0.0998661 0.099804 0.0997923 0.0997352 0.0997604 0.0997645 0.0998303 0.0998384 0.099896 0.0998903 0.0999398 0.0999295 0.0999727 0.0999599 0.100002 0.0999953 0.099999 0.0999814 0.0976991 0.0977012 0.100009 0.0999985 0.100018 0.0999819 0.0999988 0.0999575 0.09997 0.0999244 0.0999323 0.0998801 0.0998778 0.0998106 0.0997956 0.099735 0.0997577 0.0997598 0.0998252 0.0998333 0.0998914 0.0998868 0.0999368 0.0999264 0.0999718 0.0999592 0.100001 0.0999948 0.0999988 0.0999802 0.0976992 0.0976985 0.0999755 0.100001 0.0999751 0.0999941 0.0999535 0.0999695 0.099926 0.0999387 0.0998917 0.0998984 0.0998426 0.0998348 0.0997712 0.0997632 0.0997298 0.0997814 0.0998049 0.0998755 0.09989 0.0999067 0.0999533 0.0999473 0.0999926 0.0999796 0.100021 0.100002 0.100042 0.100022 0.0976579 0.0977014 0.100002 0.0999965 0.100016 0.0999797 0.0999966 0.0999552 0.0999687 0.0999228 0.0999311 0.09988 0.0998776 0.0998118 0.0997983 0.0997366 0.099757 0.0997577 0.0998231 0.0998321 0.0998903 0.0998864 0.0999359 0.0999274 0.0999718 0.0999602 0.100002 0.0999971 0.1 0.0999834 0.0976994 0.0976595 0.100008 0.100022 0.100016 0.0999827 0.0999916 0.099948 0.0999588 0.0999122 0.0999195 0.099868 0.099865 0.0998029 0.0997914 0.0997373 0.0997387 0.0997914 0.0998036 0.0998658 0.0998691 0.0999195 0.0999122 0.0999581 0.0999463 0.0999898 0.0999788 0.100012 0.10001 0.0999993 0.0976577 0.0977009 0.0999987 0.0999916 0.100011 0.0999752 0.0999921 0.0999511 0.0999635 0.0999196 0.0999291 0.0998791 0.0998796 0.0998163 0.0998043 0.0997401 0.0997532 0.099749 0.0998159 0.0998259 0.0998846 0.0998816 0.0999323 0.0999239 0.0999683 0.099957 0.0999989 0.0999938 0.1 0.0999834 0.0976994 0.291835 1.13065 1.27366 1.78964 2.48912 3.49606 3.22962 2.77362 2.47306 1.79375 1.33803 1.07107 0.84865 0.173445 0.330162 3.88091 10.5748 12.7991 16.0687 17.851 22.2824 26.363 29.3128 32.7868 39.841 51.6439 63.9618 72.3583 77.3104 80.3321 75.5015 61.2501 45.9528 39.9808 33.6489 25.9826 23.7201 20.5852 16.3299 12.028 8.32301 6.17774 4.11679 0.731035 13.1841 165.042 220.578 169.128 121.693 201.565 357.523 652.097 1051.07 1422.33 1738.3 1929.08 1921.57 1700.56 1308.54 879.907 548.217 331.298 195.842 123.144 86.4596 64.5474 48.4604 35.5686 20.1081 10.6358 6.1183 3.8369 2.64151 0.41251 0.411858 4.04605 12.7272 35.862 80.5201 135.582 175.543 182.372 166.498 264.152 779.356 2006.53 2869.33 2027.33 804.835 408.897 235.189 136.371 79.5817 51.6168 35.6981 25.5016 18.3086 12.5941 7.85156 4.31419 2.15754 1.06173 0.541005 0.150347 0.119584 0.328515 0.50462 0.812095 1.31015 1.81588 2.24753 2.38513 2.22601 1.91699 1.67808 1.51474 1.37817 1.23869 1.09613 0.95383 0.8211 0.697994 0.584518 0.487612 0.40644 0.338393 0.282597 0.235679 0.198825 0.168907 0.146315 0.129296 0.117538 0.103885 0.100715 0.115481 0.11382 0.113257 0.112409 0.111828 0.111003 0.110162 0.1093 0.108526 0.107714 0.107062 0.106316 0.105759 0.105057 0.104622 0.104028 0.103684 0.103174 0.10291 0.102486 0.102286 0.101939 0.101779 0.101509 0.101378 0.101156 0.101033 0.100843 0.0980635 0.0977327 0.100357 0.100312 0.100283 0.100247 0.100241 0.100201 0.100175 0.100142 0.100112 0.100085 0.100051 0.100026 0.0999936 0.0999694 0.0999428 0.0999178 0.099898 0.0998698 0.09985 0.0998178 0.0997952 0.0997634 0.0997439 0.0997168 0.0997022 0.0996779 0.0996708 0.0996105 0.097547 0.0975398 0.099591 0.0996117 0.0996226 0.099609 0.0996093 0.0996017 0.0996023 0.0995966 0.0995979 0.0995921 0.0995922 0.0995863 0.0995868 0.0995825 0.0995851 0.0995839 0.0995895 0.0995891 0.0995954 0.0995944 0.0995997 0.0995984 0.0996048 0.0996044 0.0996137 0.0996051 0.0996161 0.0995993 0.0975097 0.0975098 0.0995873 0.0996068 0.0996096 0.0996021 0.0996035 0.0995982 0.0996 0.0995953 0.0995969 0.0995914 0.0995918 0.0995863 0.099587 0.0995828 0.0995857 0.0995846 0.0995902 0.09959 0.0995962 0.0995953 0.0996005 0.0995992 0.0996054 0.0996048 0.099614 0.099605 0.0996158 0.0995998 0.0975097 0.0975098 0.0996042 0.099632 0.0996146 0.0996141 0.099605 0.0996052 0.099599 0.0996005 0.0995951 0.0995961 0.0995902 0.0995906 0.0995852 0.0995864 0.0995836 0.0995878 0.0995866 0.0995954 0.0995822 0.0995878 0.0995983 0.0995948 0.0995999 0.0995991 0.0996053 0.099606 0.0996177 0.0995825 0.0975409 0.0975102 0.099592 0.0996076 0.0996098 0.0996023 0.0996036 0.0995982 0.0996002 0.0995953 0.099597 0.0995916 0.0995921 0.0995864 0.0995871 0.0995829 0.0995855 0.0995842 0.0995897 0.0995893 0.0995956 0.0995947 0.0996002 0.0995991 0.0996057 0.0996051 0.099615 0.0996046 0.0996138 0.0995978 0.0975096 0.0975364 0.0995889 0.0996217 0.0996196 0.0996048 0.0996088 0.0996006 0.0996008 0.099595 0.0995962 0.0995898 0.0995904 0.099585 0.0995899 0.0995744 0.0995747 0.0995899 0.0995844 0.0995897 0.099589 0.0995953 0.0995938 0.0995997 0.099599 0.0996067 0.0996048 0.09962 0.0996169 0.099589 0.0975365 0.0975099 0.0995891 0.0996058 0.0996084 0.0996021 0.0996035 0.0995993 0.0996013 0.0995973 0.0995989 0.0995941 0.0995943 0.099588 0.0995875 0.0995823 0.0995846 0.0995826 0.0995873 0.0995874 0.0995947 0.0995947 0.0996006 0.0995999 0.0996066 0.0996062 0.0996157 0.0996065 0.0996146 0.0995997 0.0975097 0.31612 1.60689 1.91762 2.72138 3.91459 6.417 6.14903 5.18753 4.67663 3.26933 2.11343 1.43865 1.1632 0.187674 0.357647 9.83957 32.0287 42.4034 42.0005 38.2462 40.39 44.1913 49.6543 58.9761 72.7591 90.4586 105.821 116.083 125.373 133.965 135.428 125.201 106.745 84.5241 70.6339 64.8676 54.4645 41.8764 22.1645 13.3835 9.20857 7.48184 5.72629 1.10143 14.6837 242.524 254.687 133.329 74.5638 269.668 612.777 1142.86 1601.39 1908.96 2181.01 2471.07 2687.69 2732.11 2512.8 2081.24 1577.52 1098.81 693.737 411.258 246.242 162.245 116.781 90.7709 46.1233 22.8657 12.1345 7.37302 5.26371 0.784932 0.591389 7.90481 19.3397 39.3732 65.6063 84.1019 82.8914 76.408 160.869 821.835 2856.3 5939.93 7992.63 5493.72 2513.18 1237.85 687.842 393.385 245.129 152.007 93.3063 59.3378 38.9487 24.911 15.1237 8.16491 4.00628 1.90509 0.890179 0.175653 0.143085 0.735489 1.43667 1.84211 2.59599 4.32632 6.93377 8.09827 7.40012 5.74312 4.24524 3.20581 2.55576 2.10495 1.74624 1.4337 1.17321 0.955404 0.776071 0.626568 0.502942 0.408181 0.33117 0.272143 0.224808 0.187755 0.159442 0.138205 0.12363 0.10442 0.101238 0.127139 0.123462 0.12128 0.118988 0.117213 0.115346 0.113636 0.112265 0.110842 0.10972 0.108552 0.107643 0.106625 0.105988 0.105106 0.104663 0.103958 0.10361 0.103088 0.102791 0.102406 0.102163 0.101878 0.101671 0.101459 0.101266 0.101123 0.100899 0.098123 0.0977745 0.100509 0.100421 0.100428 0.10037 0.100338 0.100313 0.100271 0.100255 0.100208 0.100195 0.100143 0.100133 0.100078 0.100072 0.100018 0.100013 0.0999621 0.0999557 0.0999062 0.0998974 0.0998482 0.0998404 0.0997913 0.0997876 0.0997424 0.099742 0.0996994 0.0996732 0.0975485 0.0975397 0.0996461 0.0996662 0.099648 0.0996691 0.0996437 0.0996689 0.0996434 0.099669 0.0996429 0.0996674 0.099641 0.0996645 0.0996386 0.099662 0.0996379 0.0996632 0.0996398 0.0996662 0.099642 0.0996682 0.0996425 0.0996677 0.0996424 0.0996675 0.0996426 0.099666 0.0996633 0.0996264 0.0975592 0.097559 0.0996189 0.0996717 0.0996455 0.0996694 0.0996434 0.0996686 0.0996429 0.0996687 0.0996425 0.0996671 0.0996405 0.0996643 0.0996383 0.099662 0.0996381 0.0996635 0.09964 0.0996665 0.0996421 0.0996685 0.0996426 0.0996679 0.0996424 0.0996677 0.0996429 0.0996658 0.0996632 0.0996268 0.0975593 0.0975556 0.099631 0.0996505 0.09967 0.0996431 0.0996677 0.0996427 0.0996682 0.0996431 0.0996686 0.0996423 0.0996668 0.0996406 0.0996642 0.0996391 0.0996631 0.0996398 0.0996635 0.0996388 0.0996653 0.099665 0.0996408 0.0996668 0.0996427 0.0996674 0.0996422 0.0996676 0.0996421 0.099643 0.0975355 0.0975611 0.0996203 0.0996712 0.0996451 0.0996691 0.0996431 0.0996687 0.0996429 0.0996688 0.0996425 0.0996673 0.0996405 0.0996644 0.0996383 0.099662 0.0996377 0.099663 0.0996395 0.0996659 0.0996417 0.0996678 0.099642 0.0996672 0.0996422 0.0996674 0.099643 0.0996655 0.0996632 0.0996249 0.0975593 0.0975336 0.0996464 0.0996499 0.0996474 0.0996657 0.0996411 0.0996659 0.0996417 0.099667 0.0996424 0.0996666 0.0996409 0.0996645 0.0996382 0.0996645 0.0996639 0.099637 0.0996637 0.0996402 0.0996659 0.0996418 0.0996666 0.0996413 0.0996658 0.0996411 0.0996657 0.0996443 0.0996563 0.0996447 0.0975348 0.0975595 0.0996186 0.0996711 0.0996444 0.0996695 0.0996431 0.0996691 0.0996436 0.0996699 0.0996438 0.0996692 0.0996416 0.0996653 0.0996379 0.0996613 0.0996365 0.0996604 0.0996374 0.0996642 0.0996414 0.0996684 0.0996427 0.0996684 0.0996433 0.0996688 0.0996457 0.099667 0.0996649 0.0996282 0.0975597 0.343069 1.99106 2.80947 4.06732 5.55637 7.85675 6.99071 6.2689 6.01998 5.36672 5.05403 2.75471 1.71216 0.241365 0.765379 23.0272 65.9478 82.4658 82.4774 72.5793 73.2999 80.0014 91.8778 106.485 122.109 138.563 149.251 157.727 168.567 179.087 186.299 184.147 173.457 158.659 153.596 161.606 148.4 103.062 42.1505 17.2955 12.0432 10.8887 8.65427 2.2376 14.129 330.749 303.879 118.374 72.9834 759.152 1042.65 1518.51 1932.31 2188.56 2358.19 2572.89 2837.29 3096.59 3245.84 3150.46 2783.67 2170.17 1527.17 1009.25 642.261 406.336 262.509 193.607 131.751 64.1322 31.0452 17.7935 13.1806 2.02902 0.511991 10.8983 19.6576 30.4362 41.2336 43.3612 37.1024 46.517 776.358 3268.87 8017.4 12734.8 16715 10420.7 5363.08 2563.7 1339.36 795.875 498.227 339.958 232.44 138.889 85.6351 53.841 31.9777 17.3486 8.61536 4.10072 1.97185 0.311255 0.147359 1.1682 1.43083 1.99237 5.35461 13.7754 24.3106 27.7033 23.7455 17.1319 11.3306 7.41476 5.11165 3.79074 2.9308 2.27633 1.77182 1.38595 1.09078 0.86034 0.672052 0.524579 0.412601 0.329957 0.265113 0.217305 0.180708 0.153938 0.135246 0.105685 0.101625 0.147822 0.141192 0.13518 0.129578 0.1254 0.12189 0.118732 0.116157 0.113872 0.111975 0.11036 0.109027 0.107791 0.10689 0.105894 0.105288 0.104484 0.104047 0.103429 0.103092 0.102637 0.10236 0.10203 0.101791 0.101574 0.101366 0.101203 0.10097 0.0981634 0.0978448 0.10062 0.1005 0.100501 0.100452 0.10043 0.100387 0.100348 0.100316 0.100271 0.100246 0.1002 0.100178 0.100132 0.100118 0.100071 0.100058 0.100012 0.0999995 0.0999527 0.0999397 0.0998939 0.0998797 0.0998329 0.0998209 0.0997788 0.099771 0.0997334 0.0996996 0.0975642 0.0975561 0.0996765 0.099692 0.0996771 0.0996882 0.0996729 0.0996885 0.0996735 0.0996896 0.0996735 0.0996884 0.0996713 0.0996854 0.0996683 0.0996834 0.0996678 0.0996843 0.09967 0.0996877 0.0996725 0.0996893 0.0996729 0.099688 0.0996713 0.0996865 0.0996714 0.0996847 0.0996877 0.0996646 0.0975578 0.097559 0.0996565 0.0996904 0.0996726 0.0996883 0.0996728 0.0996892 0.0996736 0.09969 0.0996736 0.0996885 0.0996713 0.0996859 0.0996685 0.099684 0.0996684 0.0996851 0.0996705 0.0996882 0.0996729 0.0996897 0.0996733 0.0996883 0.0996717 0.0996867 0.0996717 0.0996848 0.0996871 0.0996648 0.0975578 0.097557 0.0996701 0.0996776 0.0996857 0.09967 0.099687 0.0996722 0.099689 0.0996739 0.0996898 0.0996731 0.099688 0.0996708 0.0996853 0.0996692 0.0996844 0.0996689 0.0996821 0.099669 0.0996879 0.0996847 0.0996726 0.0996855 0.0996713 0.0996864 0.0996702 0.0996868 0.0996738 0.0996649 0.0975572 0.0975581 0.0996581 0.0996896 0.099672 0.0996883 0.0996727 0.0996895 0.0996738 0.0996905 0.0996739 0.0996889 0.0996714 0.0996859 0.0996685 0.0996839 0.099668 0.0996845 0.0996699 0.0996874 0.0996721 0.0996886 0.0996722 0.0996872 0.099671 0.0996863 0.0996719 0.0996861 0.0996864 0.0996632 0.097558 0.0975553 0.099666 0.0996801 0.0996756 0.0996838 0.0996702 0.0996847 0.0996707 0.099687 0.099672 0.099687 0.099671 0.0996847 0.0996685 0.0996819 0.0996825 0.0996679 0.0996841 0.0996704 0.0996864 0.0996715 0.0996867 0.0996707 0.0996845 0.099669 0.0996825 0.0996712 0.0996853 0.0996678 0.0975556 0.0975579 0.0996558 0.0996885 0.0996713 0.0996875 0.0996722 0.0996887 0.0996737 0.0996905 0.0996747 0.0996906 0.0996729 0.0996866 0.0996685 0.0996827 0.0996665 0.0996825 0.0996685 0.0996869 0.0996729 0.0996903 0.0996742 0.0996895 0.0996733 0.0996884 0.0996758 0.0996883 0.099689 0.0996677 0.0975586 0.41031 2.42185 3.77122 5.46961 6.94352 8.33182 7.40601 7.23846 7.85909 8.37611 8.86849 5.7214 2.76395 0.267539 2.52109 66.9267 145.788 153.593 143.344 118.187 112.5 117.511 131.526 146.812 160.243 172.58 181.921 197.076 215.119 232.1 246.245 257.146 267.189 286.751 325.305 376.034 381.003 285.177 134.053 39.2671 21.3376 24.9642 16.0059 9.8615 12.365 435.595 377.759 137.321 156.982 1528.71 1616.08 1871.72 2261.7 2508.55 2623.48 2717.36 2804.44 2875.34 3019.85 3159.34 3184.21 2896.57 2341.18 1731.63 1266.09 885.236 600.104 446.569 349.177 232.426 122.458 66.8624 44.008 7.82311 0.260907 12.104 17.4359 26.4382 40.0633 72.9872 194.379 897.981 4254 9080.31 15385.6 20735.5 23338.8 14952.8 7932.75 4041.05 2257.06 1350.72 898.81 620.985 434.267 292.846 179.188 112.601 70.9202 42.105 23.4329 12.5256 6.60148 1.01564 0.124813 1.6553 2.63899 8.12253 29.6297 64.0912 92.1576 91.8709 70.1188 46.282 28.2175 16.8251 10.5287 7.10114 5.11751 3.80643 2.86704 2.17885 1.66372 1.28049 0.989344 0.75623 0.573723 0.442148 0.346536 0.277636 0.225994 0.187064 0.160081 0.108363 0.1046 0.193457 0.184644 0.165267 0.14919 0.138571 0.13126 0.125591 0.121417 0.117959 0.11528 0.112913 0.111151 0.109433 0.108228 0.106967 0.106126 0.105193 0.104609 0.103904 0.103484 0.102967 0.102647 0.102262 0.102017 0.101724 0.101522 0.101311 0.10111 0.0981188 0.0979096 0.100746 0.100622 0.100601 0.100543 0.100509 0.100463 0.100428 0.10039 0.100352 0.100313 0.100275 0.100241 0.100202 0.100172 0.100134 0.100107 0.100069 0.100047 0.100006 0.0999861 0.0999473 0.0999257 0.0998843 0.0998613 0.0998222 0.0998047 0.0997711 0.0997302 0.097518 0.0975124 0.0997047 0.0997186 0.0997108 0.099713 0.0997067 0.0997129 0.0997069 0.0997141 0.0997069 0.0997128 0.0997047 0.0997097 0.099703 0.0997083 0.0997031 0.099709 0.0997042 0.0997118 0.0997058 0.0997129 0.0997056 0.099711 0.0997031 0.0997082 0.0997014 0.0997069 0.099712 0.0996872 0.0975123 0.0975117 0.0996812 0.0997084 0.0997013 0.0997085 0.0997039 0.0997113 0.0997058 0.0997135 0.0997066 0.0997123 0.099705 0.0997101 0.0997036 0.0997087 0.099704 0.0997097 0.0997047 0.0997121 0.0997061 0.0997132 0.0997059 0.0997111 0.0997033 0.0997084 0.0997018 0.0997072 0.0997114 0.0996875 0.0975126 0.0975106 0.0996918 0.0997039 0.0997063 0.0997002 0.0997095 0.0997042 0.0997126 0.0997068 0.0997141 0.0997067 0.0997123 0.099705 0.0997103 0.0997046 0.0997089 0.0997041 0.0997067 0.0997024 0.099714 0.0997105 0.0997048 0.0997094 0.0997034 0.0997094 0.0997009 0.0997076 0.0997023 0.0996865 0.0975089 0.0975124 0.0996833 0.0997072 0.0997007 0.0997084 0.0997038 0.0997117 0.0997062 0.0997139 0.099707 0.0997127 0.0997051 0.0997101 0.0997034 0.0997086 0.0997034 0.099709 0.099704 0.0997114 0.0997052 0.0997119 0.0997048 0.0997099 0.0997024 0.099708 0.0997019 0.0997091 0.0997104 0.0996859 0.0975123 0.0975074 0.0996875 0.0997056 0.0997057 0.0997082 0.0997015 0.0997083 0.0997031 0.0997112 0.0997048 0.0997115 0.0997048 0.0997094 0.0997035 0.0997084 0.0997085 0.0997026 0.0997084 0.0997043 0.0997107 0.0997044 0.0997108 0.0997029 0.0997079 0.0997002 0.0997052 0.0996997 0.0997088 0.0996891 0.0975081 0.097512 0.0996794 0.0997049 0.0996989 0.0997069 0.0997022 0.0997102 0.0997043 0.0997127 0.0997059 0.0997134 0.0997051 0.0997102 0.0997022 0.0997071 0.0997023 0.099708 0.0997039 0.0997118 0.0997066 0.0997144 0.0997074 0.0997136 0.0997058 0.0997111 0.099706 0.0997121 0.0997133 0.0996911 0.0975133 0.501752 2.96572 4.74749 6.56846 7.80721 9.24322 9.13957 11.1329 14.1427 17.4828 19.6437 15.0125 7.65644 1.09762 7.79819 236.379 310.462 272.455 243.65 186.817 158.598 149.992 157.128 168.393 180.704 193.386 208.834 234.692 267.377 302.772 339.566 379.953 433.909 524.705 674.013 852.273 928.03 772.691 462.114 191.126 84.4631 112.535 51.779 102.037 22.1243 1137.32 964.632 516.368 461.909 2023.24 2261.03 2263 2511.79 2698.99 2799.07 2875.9 2903.2 2826.03 2745.5 2769.75 2899.67 2918.38 2702.78 2322.36 1948.04 1585.19 1253.55 1032.85 894.468 741.411 611.722 219.653 132.35 29.8012 0.729214 12.7445 27.686 86.5358 325.09 982.331 2772.19 6507.92 12170.5 17772.1 23424.5 28298.4 24674.5 16959.1 9958.62 5867.04 3603.21 2236.46 1431.17 996.314 729.822 515.844 344.155 220.819 144.572 94.5988 57.5079 31.2025 15.6992 2.08695 0.306601 7.02523 26.3479 95.1108 193.916 300.802 320.614 266.196 179.181 108.521 61.7717 35.0419 20.8247 13.3929 9.17796 6.57532 4.79689 3.5423 2.6372 1.98664 1.50946 1.13911 0.852593 0.625411 0.463665 0.351219 0.272233 0.218393 0.193356 0.113013 0.13606 0.335204 0.312315 0.239899 0.189705 0.161722 0.146078 0.135807 0.128593 0.123384 0.119477 0.116209 0.113759 0.11146 0.109876 0.10824 0.107191 0.106001 0.105308 0.104425 0.103957 0.103305 0.102985 0.102485 0.10227 0.10188 0.101791 0.101508 0.101438 0.0984633 0.0978019 0.100728 0.100654 0.100655 0.100617 0.100586 0.10053 0.100495 0.100446 0.100416 0.100371 0.100339 0.100299 0.100263 0.100229 0.100191 0.100165 0.100127 0.100103 0.100063 0.100041 0.100004 0.0999812 0.0999388 0.099912 0.0998724 0.0998505 0.0998167 0.0997751 0.0975132 0.097502 0.0997475 0.0997595 0.0997513 0.0997487 0.099744 0.0997458 0.0997424 0.0997456 0.0997417 0.099744 0.0997397 0.0997425 0.0997396 0.0997409 0.0997386 0.0997425 0.0997405 0.099744 0.0997407 0.0997449 0.0997408 0.0997435 0.0997386 0.0997413 0.099738 0.0997405 0.0997456 0.0997251 0.0975016 0.0975018 0.0997198 0.0997426 0.0997376 0.0997422 0.09974 0.0997442 0.0997412 0.0997458 0.0997414 0.0997445 0.0997401 0.0997436 0.0997402 0.0997416 0.0997395 0.0997433 0.0997409 0.0997443 0.0997411 0.0997451 0.099741 0.0997437 0.0997388 0.0997415 0.0997386 0.0997409 0.0997451 0.0997253 0.097502 0.0975007 0.09973 0.0997404 0.0997397 0.0997369 0.0997428 0.0997399 0.0997451 0.0997419 0.0997462 0.0997417 0.0997445 0.0997411 0.0997436 0.0997399 0.0997412 0.0997406 0.0997407 0.0997376 0.0997458 0.0997432 0.0997402 0.0997423 0.0997389 0.0997426 0.0997371 0.0997411 0.0997399 0.0997216 0.0975031 0.0975015 0.0997218 0.0997409 0.0997375 0.0997422 0.0997404 0.0997446 0.0997418 0.0997462 0.0997419 0.0997448 0.0997402 0.0997435 0.0997401 0.0997415 0.0997389 0.0997426 0.0997402 0.0997436 0.0997401 0.099744 0.0997398 0.0997424 0.0997378 0.0997409 0.0997382 0.099743 0.0997442 0.0997237 0.0975015 0.0975021 0.0997228 0.0997426 0.099742 0.0997421 0.0997375 0.0997414 0.0997384 0.0997438 0.0997396 0.0997437 0.09974 0.0997428 0.09974 0.0997407 0.0997409 0.0997399 0.099742 0.0997397 0.0997432 0.0997397 0.0997435 0.0997384 0.0997409 0.0997362 0.099739 0.0997358 0.0997448 0.0997242 0.0975025 0.0975012 0.0997174 0.099739 0.0997362 0.0997409 0.0997389 0.099743 0.0997402 0.0997455 0.0997415 0.0997463 0.0997408 0.0997432 0.0997381 0.0997403 0.0997372 0.0997406 0.0997386 0.0997435 0.0997412 0.0997463 0.0997426 0.0997464 0.0997418 0.0997438 0.0997408 0.0997454 0.0997469 0.0997302 0.0975026 0.67296 3.79817 5.65727 7.45879 9.24141 12.0315 14.4945 19.6457 27.1445 38.2039 51.3786 58.312 46.237 37.7132 26.0137 138.964 909.018 1132.78 796.627 522.313 374.88 268.503 210.708 186.881 182.202 187.088 200.82 219.547 242.333 280.472 333.735 399.245 474.986 573.272 710.506 935.604 1315.11 1775 2061.58 1923.71 1382.07 773.082 566.651 477.56 355.006 866.671 663.222 586.698 1843.3 2385.95 1938.78 1276.55 1090.15 1817.47 3055.94 2806.68 2840.79 2971.52 3121.17 3357.55 3557.17 3485.51 3160.98 2811.33 2637.99 2647.86 2691.57 2660.88 2555.65 2346.21 2095.24 1880.27 1759.73 1614.44 1546.88 1644.93 1005.67 4370.91 2468.52 1171.3 480.579 441.545 935.198 1830.24 3724.91 6799.78 11278.1 16676.3 22859.4 27620.6 31290.7 34119.5 26361.1 18330.7 13181.8 9747.93 6839.16 4349.92 2655.69 1666.8 1155.55 841.594 617.896 415.925 279.362 193.633 135.252 97.449 89.4619 497.347 190.418 60.3396 136.808 238.96 506.353 775.235 1018.98 1058.16 894.227 616.336 378.278 213.324 116.48 64.5426 38.1809 24.3451 16.4905 11.5579 8.32417 6.04978 4.45411 3.29829 2.47449 1.85808 1.39853 1.04879 0.789825 0.609568 0.504749 0.46043 0.514708 0.737716 0.223639 0.129243 0.637075 0.879687 0.659536 0.404933 0.265774 0.20099 0.169433 0.151457 0.139873 0.131811 0.125754 0.121053 0.117416 0.114433 0.112142 0.110149 0.108647 0.107274 0.106263 0.105303 0.104605 0.103906 0.10344 0.102907 0.102618 0.102188 0.102035 0.101765 0.101782 0.101809 0.0985846 0.0984926 0.101891 0.101712 0.101383 0.101086 0.100923 0.10079 0.100698 0.100626 0.100559 0.100506 0.10045 0.10041 0.100362 0.100327 0.100287 0.100252 0.100218 0.100183 0.100154 0.100119 0.100094 0.100061 0.100039 0.100006 0.0999858 0.0999609 0.0999564 0.0999515 0.0999572 0.099849 0.0974464 0.0974476 0.0998621 0.0999533 0.0999165 0.0998766 0.0998454 0.0998227 0.0998075 0.0997955 0.0997887 0.0997828 0.0997788 0.099775 0.0997732 0.0997719 0.0997712 0.0997709 0.0997718 0.0997722 0.0997752 0.0997755 0.0997806 0.0997824 0.0997891 0.099794 0.0998081 0.0998221 0.099845 0.099871 0.0998863 0.0997701 0.0974358 0.0974359 0.0997691 0.0998805 0.0998658 0.0998409 0.0998225 0.0998066 0.0997973 0.0997883 0.0997852 0.099779 0.0997778 0.0997735 0.0997736 0.0997719 0.0997718 0.0997719 0.0997727 0.0997729 0.0997757 0.0997761 0.0997811 0.0997832 0.0997897 0.0997948 0.099809 0.0998237 0.0998466 0.0998723 0.099888 0.0997712 0.0974356 0.0974358 0.099773 0.0998934 0.0998693 0.0998449 0.099821 0.0998087 0.0997953 0.0997905 0.0997839 0.0997822 0.0997768 0.099776 0.0997729 0.0997728 0.0997716 0.0997711 0.0997719 0.0997711 0.0997718 0.0997787 0.0997801 0.0997815 0.0997876 0.099794 0.0998075 0.0998202 0.0998438 0.0998654 0.0998825 0.0997706 0.0974346 0.0974364 0.0997704 0.099883 0.0998652 0.0998411 0.0998225 0.099807 0.0997965 0.0997889 0.0997854 0.0997804 0.0997781 0.0997743 0.0997734 0.0997718 0.0997716 0.0997712 0.0997721 0.0997723 0.099775 0.0997753 0.0997799 0.099781 0.0997884 0.0997936 0.099808 0.0998226 0.099847 0.0998693 0.0998848 0.0997696 0.0974365 0.097434 0.0997698 0.099883 0.0998676 0.0998466 0.0998246 0.0998052 0.0997954 0.0997862 0.0997836 0.0997773 0.0997768 0.0997737 0.0997728 0.0997714 0.0997712 0.0997708 0.0997713 0.0997722 0.0997736 0.0997766 0.0997777 0.0997832 0.0997865 0.0997952 0.0998051 0.0998227 0.0998422 0.0998711 0.0998856 0.0997716 0.0974334 0.0974359 0.0997654 0.0998795 0.0998633 0.0998411 0.0998217 0.099805 0.0997956 0.0997869 0.0997848 0.0997794 0.0997794 0.0997748 0.0997745 0.0997716 0.0997707 0.0997697 0.0997717 0.099774 0.099779 0.0997826 0.0997902 0.0997971 0.0998114 0.0998293 0.0998577 0.0998975 0.0999531 0.100012 0.100055 0.0999654 0.0974377 0.0974457 0.755573 4.03242 5.57531 6.99348 8.50786 11.3475 15.2163 21.6331 30.1409 42.8338 61.4882 86.0827 136.714 292.223 654.03 1210.04 1788.19 1567.69 1079.65 658.341 401.508 262.469 207.415 193.588 196.696 207.985 228.56 253.308 286.775 340.947 418.49 521.988 651.049 832.537 1115.01 1594.89 2404.56 3407.87 4236.99 4499.05 3962.35 2978.74 2432.69 1326.48 1879.89 2935.4 3741.68 3999.92 3342.15 2152.99 1961.21 1962.93 2054.37 3129.66 5877.71 5035.21 4651.28 4911.05 5378.96 5918.55 6319.52 6141.81 5388.13 4225.12 3216.94 2709.56 2618.19 2739.19 2934.87 3056.18 3075.77 3069.01 3132.97 3363.67 3747.96 4497.82 4568.99 12596.3 19391.9 19057.5 17871.4 17339 17901.8 18852.7 20544.9 23018.1 26231.1 29822.3 34396 37148.2 38284.8 36160.8 30425.4 26805.3 23823.8 20221.2 15400 9906 5501.58 3026.35 1916.48 1399.82 1048.94 758.834 534.846 389.739 301.636 254.153 264.271 700.915 2789.56 3563.87 3781.85 3780.13 3666.31 3472.84 3057.56 2473.46 1733.99 1090.82 637.131 352.312 191.04 107.015 63.882 41.0627 27.7242 19.3954 13.8388 10.0216 7.31746 5.38225 3.99085 2.97512 2.23737 1.6821 1.28377 0.992636 0.805617 0.725879 0.798138 1.24622 1.65858 1.77717 1.70662 1.27868 0.766556 0.43564 0.284183 0.215656 0.181854 0.161666 0.148287 0.138465 0.131127 0.125288 0.120885 0.117168 0.114408 0.111956 0.110126 0.108469 0.107223 0.106088 0.105252 0.104449 0.103892 0.103307 0.102951 0.102536 0.102331 0.102076 0.102057 0.102202 0.101708 0.101808 0.101631 0.101381 0.101226 0.100977 0.100917 0.100761 0.100721 0.100626 0.10059 0.100526 0.100484 0.100439 0.100395 0.10036 0.100317 0.100289 0.100249 0.100223 0.100188 0.10016 0.10013 0.100104 0.100075 0.100046 0.10002 0.0999919 0.0999688 0.0999441 0.0999282 0.0999134 0.0996967 0.0996859 0.0998852 0.099875 0.0998586 0.0998441 0.0998318 0.0998193 0.0998116 0.0998057 0.0998018 0.0997979 0.0997939 0.0997903 0.0997891 0.0997875 0.0997866 0.0997865 0.0997874 0.0997885 0.0997907 0.0997925 0.0997966 0.0997979 0.0998017 0.0998022 0.0998082 0.0998138 0.0998183 0.0998233 0.0998232 0.0998099 0.0995956 0.0995952 0.0998085 0.099819 0.0998205 0.0998183 0.0998148 0.099808 0.0998041 0.0998015 0.0997994 0.0997963 0.0997933 0.0997905 0.0997897 0.0997876 0.099787 0.099787 0.0997881 0.0997892 0.0997911 0.0997929 0.0997969 0.0997983 0.0998018 0.0998024 0.0998085 0.0998144 0.0998187 0.0998227 0.0998232 0.0998093 0.0995953 0.0995955 0.0998112 0.0998272 0.0998208 0.0998185 0.0998127 0.0998088 0.0998026 0.0998024 0.0997989 0.0997983 0.0997934 0.0997912 0.0997889 0.0997878 0.0997872 0.0997867 0.0997881 0.0997883 0.0997885 0.0997949 0.0997956 0.0997965 0.0998 0.099802 0.0998087 0.0998139 0.0998193 0.0998199 0.0998196 0.0998093 0.0995958 0.0995954 0.09981 0.0998213 0.0998199 0.0998177 0.099815 0.0998082 0.099804 0.0998015 0.0997996 0.0997965 0.0997936 0.0997903 0.0997893 0.0997872 0.099787 0.0997867 0.099787 0.0997887 0.0997904 0.099792 0.0997957 0.0997969 0.0998006 0.0998012 0.0998077 0.0998139 0.0998201 0.0998216 0.0998222 0.0998099 0.0995952 0.0995961 0.0998102 0.0998219 0.0998209 0.0998211 0.0998156 0.0998066 0.0998027 0.0997996 0.0997983 0.0997951 0.0997925 0.0997902 0.0997888 0.0997873 0.0997864 0.0997866 0.0997875 0.0997879 0.0997904 0.0997927 0.0997958 0.0997986 0.0998001 0.099803 0.0998062 0.0998138 0.0998168 0.0998238 0.0998232 0.0998117 0.0995963 0.0995953 0.0998066 0.09982 0.0998196 0.0998184 0.0998149 0.0998074 0.099803 0.0998001 0.0997991 0.0997961 0.0997949 0.099791 0.09979 0.0997868 0.0997862 0.0997857 0.099787 0.0997879 0.0997923 0.0997954 0.0998011 0.0998054 0.0998109 0.0998156 0.0998238 0.0998346 0.0998437 0.0998479 0.0998509 0.0998453 0.099622 0.0974612 0.748752 3.98381 5.16313 6.26683 7.78847 10.8497 16.246 25.6706 40.8307 66.4723 102.616 140.525 191.139 284.935 497.452 934.477 1495.12 1374.1 985.419 600.366 363.024 255.075 227.306 236.617 258.901 280.776 300.813 325.864 367.751 437.687 544.689 700.583 903.549 1212.97 1714.89 2570.02 3923.67 5594.7 7453.78 9505.75 11576.3 13930.1 17367.5 20497.2 26723.9 28925.9 23849.9 14656.1 5876.89 3195.06 3584.11 7087.57 13172.6 24469.2 25239.6 21439.3 18047.5 15409.9 13689 12804.5 12233.2 11409 10001.5 7764.43 5332.51 3670.95 2971.96 2921.21 3219.01 3650.96 4104.1 4537.28 5050.03 5950.06 7506.13 9898.71 11462.1 19394.7 30616.2 52077.5 69708.4 75649.8 64030.7 48724 41872.6 43395.7 45646.8 47553.4 49987 48314.4 43302.3 48331.8 47040 44579 42127.1 38123.8 30629.8 20534.4 11398.1 5856.05 3290.8 2225.51 1658.46 1308.41 983.833 749.707 625.41 576.762 616.071 946.53 2092.06 2976.54 3717.49 4274.17 4627.74 4468.28 3972.49 3120.27 2191.3 1405.36 851.069 492.411 282.859 165.386 101.086 64.6326 43.365 30.063 21.5997 15.7949 11.7192 8.71997 6.53288 4.91962 3.75425 2.88109 2.23588 1.76208 1.45137 1.26916 1.24183 1.48734 1.79443 1.85064 1.66108 1.22301 0.773748 0.480023 0.330364 0.252665 0.210034 0.182432 0.163834 0.150052 0.140071 0.132172 0.126378 0.12148 0.117887 0.114694 0.112392 0.110245 0.108747 0.107264 0.106283 0.105241 0.104595 0.103862 0.103439 0.102946 0.102682 0.102386 0.102263 0.102308 0.101862 0.101842 0.10163 0.101394 0.10126 0.101041 0.100982 0.100825 0.100786 0.100681 0.10065 0.100571 0.100541 0.100478 0.100444 0.100396 0.100361 0.100324 0.100288 0.100259 0.100224 0.100197 0.100164 0.100139 0.100109 0.100084 0.100059 0.100034 0.10001 0.0999851 0.0999626 0.0999607 0.0997935 0.0997777 0.0999128 0.0998863 0.0998723 0.0998576 0.0998426 0.0998306 0.0998207 0.0998152 0.0998102 0.0998082 0.0998032 0.0998014 0.099799 0.0997978 0.0997964 0.0997962 0.0997967 0.0997983 0.0998002 0.0998024 0.0998047 0.099806 0.0998081 0.0998109 0.0998158 0.0998224 0.0998269 0.0998328 0.0998327 0.0998407 0.0996831 0.0996832 0.0998395 0.0998298 0.099831 0.0998279 0.0998229 0.0998169 0.099811 0.0998087 0.099806 0.099805 0.0998025 0.0998009 0.099799 0.0997971 0.0997962 0.0997962 0.0997975 0.0997991 0.0998009 0.0998027 0.099805 0.0998063 0.0998081 0.0998108 0.0998159 0.0998227 0.099827 0.0998323 0.0998327 0.09984 0.0996832 0.0996836 0.0998421 0.0998353 0.0998308 0.0998272 0.0998219 0.0998164 0.0998108 0.0998085 0.0998072 0.0998056 0.0998034 0.0998008 0.0997988 0.0997972 0.0997964 0.0997963 0.0997977 0.0997982 0.099798 0.099804 0.0998034 0.0998047 0.0998067 0.0998098 0.0998168 0.0998228 0.0998288 0.0998312 0.09983 0.0998406 0.0996832 0.0996833 0.0998415 0.099832 0.0998299 0.0998278 0.0998233 0.0998168 0.0998111 0.0998086 0.0998063 0.099805 0.0998027 0.0998004 0.0997986 0.0997968 0.0997962 0.0997961 0.099797 0.0997987 0.0998003 0.0998021 0.0998032 0.0998052 0.0998071 0.0998097 0.0998151 0.0998217 0.0998279 0.0998311 0.0998322 0.0998407 0.0996827 0.0996835 0.0998414 0.0998321 0.0998307 0.0998297 0.0998227 0.0998151 0.0998099 0.0998075 0.0998057 0.0998042 0.0998021 0.0998007 0.0997983 0.099797 0.0997952 0.0997953 0.0997967 0.0997978 0.0998003 0.0998012 0.0998046 0.0998059 0.0998081 0.0998105 0.0998156 0.0998218 0.0998261 0.0998332 0.099833 0.0998418 0.0996842 0.099683 0.099839 0.0998324 0.099831 0.099829 0.0998232 0.0998171 0.0998107 0.0998084 0.0998069 0.099806 0.0998039 0.099802 0.0998 0.0997982 0.0997967 0.0997956 0.0997965 0.0997979 0.0998015 0.0998049 0.0998087 0.0998128 0.0998157 0.0998201 0.099825 0.099835 0.0998406 0.0998441 0.0998472 0.0998584 0.0996763 0.0973678 0.656295 3.31545 4.3595 5.79864 8.13596 12.1607 19.1878 31.6935 56.0163 106.081 194.112 288.103 377.573 504.695 722.281 1000.7 1201.98 1070.67 786.096 513.518 350.704 299.974 309.319 340.289 369.517 386.186 402.334 428.138 474.717 561.898 693.004 897.808 1196.55 1666.92 2458.35 3742.85 5545.53 7223.65 8633.27 9765.56 10530.8 10990.8 11167.7 10908.9 10542.9 12541.6 15122.6 18129.8 20543.1 18508.8 14296.2 11251.7 10511.3 16428.9 17744.5 17089.6 15719.3 14276.2 13447.4 13395.9 13555.4 13507.7 12620.2 10468.5 7630.01 5172.76 3778.82 3339.94 3535.29 4092.26 4879.82 5912.76 7210.83 9034.81 11996.7 16789.2 22767 34209.7 51456.8 67882.3 78898.1 83548.6 84291.5 82984 80566.6 77857.1 74438.9 71179.1 67001.2 64898.6 56535.4 56968.9 56647.2 58296.5 59865 57978.7 49483.2 35113.4 20247.8 10149.1 5237.68 3292.49 2480.91 1988.76 1620.52 1300.03 1121.72 1067.52 1137.26 1398.68 2030.13 2821.18 3710.42 4405.95 4818.59 4818.67 4272.13 3471.8 2524.62 1711.13 1086.19 664.908 397.398 239.149 146.575 92.7156 60.6098 41.3071 29.1744 21.3341 15.9675 12.1408 9.29419 7.14495 5.52485 4.31277 3.42082 2.75321 2.28161 1.95135 1.77044 1.77058 1.85757 1.79281 1.58374 1.21295 0.826965 0.54804 0.387868 0.29473 0.240426 0.203799 0.179753 0.161533 0.148905 0.138777 0.131475 0.125476 0.120943 0.117175 0.114282 0.111818 0.10995 0.108286 0.107059 0.105918 0.105106 0.104329 0.10379 0.103285 0.102937 0.102616 0.102421 0.102344 0.101919 0.101839 0.101578 0.101403 0.101243 0.101078 0.10098 0.100845 0.100785 0.100688 0.100649 0.100569 0.100539 0.10047 0.100445 0.100384 0.100361 0.10031 0.100285 0.100243 0.100217 0.100181 0.100154 0.100123 0.100095 0.100067 0.100042 0.100018 0.0999939 0.0999678 0.0999441 0.0999424 0.0998116 0.0997923 0.0998845 0.0998546 0.0998399 0.0998266 0.0998141 0.0998018 0.0997931 0.0997876 0.0997832 0.0997797 0.0997758 0.0997734 0.0997716 0.09977 0.0997693 0.0997687 0.099769 0.0997696 0.0997708 0.0997722 0.0997735 0.0997751 0.0997762 0.0997781 0.0997815 0.0997875 0.0997901 0.0997942 0.0997965 0.0998113 0.0996958 0.099696 0.0998102 0.0997948 0.0997936 0.0997925 0.0997879 0.0997825 0.0997776 0.0997766 0.0997745 0.0997737 0.099772 0.0997715 0.0997702 0.0997689 0.0997685 0.0997684 0.0997694 0.0997702 0.0997716 0.0997726 0.0997738 0.0997754 0.0997762 0.0997782 0.0997816 0.099788 0.0997903 0.0997939 0.0997966 0.0998108 0.0996959 0.0996962 0.0998125 0.0997983 0.0997935 0.0997909 0.0997873 0.0997819 0.0997778 0.0997763 0.0997755 0.0997744 0.0997729 0.0997714 0.0997698 0.0997693 0.0997685 0.099769 0.0997686 0.0997702 0.0997692 0.099774 0.099773 0.0997738 0.0997747 0.0997767 0.0997819 0.0997872 0.0997925 0.0997937 0.0997949 0.0998117 0.0996959 0.0996961 0.099811 0.0997962 0.0997926 0.0997925 0.099788 0.0997826 0.0997778 0.0997767 0.0997751 0.0997737 0.0997723 0.0997707 0.0997698 0.0997684 0.0997686 0.0997681 0.0997691 0.09977 0.0997712 0.0997723 0.0997732 0.0997746 0.0997754 0.0997772 0.0997807 0.0997868 0.0997907 0.0997929 0.0997963 0.0998112 0.0996959 0.099696 0.0998121 0.0997961 0.0997922 0.0997922 0.0997872 0.0997808 0.0997771 0.099776 0.0997748 0.0997739 0.0997719 0.0997717 0.0997695 0.099769 0.0997667 0.0997679 0.0997681 0.0997693 0.0997707 0.0997717 0.0997738 0.099775 0.0997764 0.0997775 0.0997813 0.0997868 0.0997893 0.0997941 0.0997966 0.0998119 0.0996962 0.0996954 0.0998101 0.0997962 0.0997925 0.0997907 0.0997867 0.0997818 0.0997776 0.0997765 0.0997753 0.0997743 0.0997725 0.0997724 0.0997701 0.0997679 0.0997674 0.0997668 0.0997679 0.0997683 0.0997709 0.0997735 0.0997763 0.0997794 0.0997813 0.0997847 0.0997886 0.0997958 0.0998028 0.0998095 0.0998188 0.0998447 0.0997095 0.097363 0.525899 2.41039 3.61671 5.59486 8.96648 14.6528 24.111 40.1791 70.4855 135.809 268.542 463.073 680.987 878.717 998.374 1026.82 978.13 842.257 658.901 517.783 449.471 448.146 467.845 485.884 499.438 505.985 522.543 561.578 635.837 780.465 1005.24 1337.08 1803.34 2551.43 3840.43 6009.08 9029.65 11697.2 13518.9 14325.6 14156.7 13437 12380.7 11221.6 10748.6 11464.7 13241.9 15999.3 18271.6 14357.3 11053.7 7600.79 6061.98 8271.06 9657.08 10389.5 10618.9 10903.6 11507.1 12435 13416.4 13959.2 13508.2 11993.5 9729.13 7257.14 5379.04 4420.86 4264.57 4715.93 5638.81 7049.48 9045.45 11931.6 16330.7 23296.1 33007 46279.9 63839.8 82368.5 98345.5 106957 108920 107572 105432 104907 104720 102417 97539 88593.3 80640.4 76646.6 75450.1 77487.7 79213.7 75207 63003.1 44532.4 25977.7 13199.5 6946.39 4374.22 3273.26 2757.46 2463.62 2100.63 1826.25 1721.83 1786.33 2020.56 2489.61 3189.7 3988.59 4718.09 5127.42 5074.09 4627.78 3774.06 2834.27 1983.65 1310.01 825.608 508.116 310.4 191.897 120.775 78.6243 52.8235 36.9844 26.7203 20.0152 15.3083 11.9514 9.40025 7.45801 5.95812 4.83422 3.96713 3.32962 2.86578 2.539 2.33087 2.18476 1.97346 1.66522 1.27573 0.897651 0.618604 0.446529 0.339394 0.272621 0.227307 0.196673 0.174286 0.15832 0.146184 0.137066 0.129993 0.124421 0.120035 0.116496 0.11367 0.111362 0.109497 0.10797 0.106728 0.105714 0.104885 0.104207 0.103664 0.103216 0.102864 0.102566 0.102417 0.102015 0.101884 0.101613 0.10145 0.101265 0.10112 0.100992 0.100878 0.100796 0.100708 0.100654 0.100579 0.10054 0.100474 0.100444 0.100383 0.100358 0.100304 0.100282 0.100235 0.100214 0.100172 0.100149 0.100113 0.100089 0.100056 0.100032 0.100003 0.0999772 0.099949 0.0999236 0.0999223 0.0998235 0.099801 0.0998578 0.0998223 0.0998084 0.0997962 0.0997859 0.0997763 0.0997689 0.0997633 0.0997588 0.099754 0.0997505 0.0997474 0.0997452 0.0997422 0.0997403 0.0997396 0.0997406 0.0997418 0.0997438 0.0997439 0.0997458 0.0997463 0.099748 0.0997484 0.0997501 0.0997528 0.0997534 0.0997555 0.0997565 0.0997767 0.0996979 0.0996984 0.0997765 0.0997559 0.0997549 0.099755 0.099753 0.0997513 0.0997482 0.099748 0.0997463 0.0997453 0.0997443 0.0997438 0.0997423 0.09974 0.0997389 0.0997389 0.0997408 0.0997422 0.0997443 0.0997443 0.0997459 0.0997467 0.099748 0.0997485 0.0997502 0.0997532 0.0997538 0.0997555 0.0997568 0.0997766 0.0996984 0.0996983 0.0997776 0.0997576 0.0997549 0.099754 0.0997526 0.0997508 0.0997481 0.0997483 0.0997467 0.0997468 0.0997446 0.0997444 0.0997417 0.0997407 0.099739 0.0997395 0.0997403 0.0997427 0.0997415 0.0997459 0.099744 0.0997463 0.099746 0.0997482 0.0997499 0.099753 0.0997545 0.0997554 0.0997558 0.0997773 0.0996977 0.0996985 0.0997772 0.0997568 0.0997543 0.0997549 0.0997531 0.099751 0.0997485 0.0997478 0.0997469 0.0997452 0.0997446 0.099743 0.0997422 0.0997397 0.0997391 0.0997385 0.0997402 0.0997418 0.0997439 0.0997441 0.0997453 0.0997461 0.0997471 0.0997478 0.0997496 0.0997521 0.0997538 0.0997547 0.0997568 0.0997771 0.099698 0.0996977 0.0997776 0.0997566 0.0997541 0.0997553 0.0997524 0.0997501 0.0997478 0.0997482 0.0997467 0.0997463 0.0997443 0.0997445 0.0997419 0.0997407 0.0997384 0.0997385 0.0997395 0.0997417 0.099743 0.0997443 0.0997455 0.0997472 0.0997478 0.0997485 0.0997503 0.0997526 0.0997533 0.0997556 0.0997571 0.0997775 0.0996981 0.0996984 0.099777 0.0997574 0.0997548 0.0997546 0.0997526 0.0997516 0.0997493 0.0997492 0.0997482 0.0997468 0.0997459 0.0997444 0.0997435 0.0997411 0.0997398 0.099739 0.0997412 0.0997422 0.0997457 0.0997471 0.0997507 0.0997519 0.0997545 0.0997554 0.0997575 0.0997591 0.0997584 0.0997578 0.0997597 0.0997797 0.0996765 0.0972848 0.38717 1.6351 3.00665 5.39873 9.60604 17.0601 29.1603 49.6725 83.4746 145.064 263.974 456.44 690.29 918.19 1056.52 1061.59 973.879 869.081 760.665 708.112 700.68 701.84 709.578 717.251 729.655 736.385 767.22 844.746 978.52 1203.83 1522.05 1964.75 2565.96 3496.57 5144.77 8018.64 12242.1 16536.5 19458.8 20567.8 20163.1 18987.1 17471.2 16025.8 15028.8 14428.1 14010.2 13643 12427.7 8331.87 6380.83 4563.76 3973.75 4798.44 5626.86 6409.61 7278.42 8414.86 9704.79 10926.7 11587.2 11411 10622.6 9525.59 8312.9 7142.91 6176.22 5598.14 5495.54 5918.65 6907.48 8564.73 11092.7 14802.7 20256.9 28486.7 40062.9 54811.7 72297 91508.4 109494 120838 125175 124660 122430 120951 120062 118168 114410 108101 101691 96575.2 92819.1 90859.2 86456.5 75166.9 56882.1 36461.2 20828.1 11936.4 7530.96 5285.2 4137.89 3471.65 3223.62 2978.72 2570.13 2364.83 2375.44 2537.58 2909.38 3460.8 4120.55 4781.37 5103.38 5088.28 4577.83 3820.1 2899.99 2080.19 1407.13 915.954 579.091 361.803 226.402 143.601 92.6753 61.8269 42.4834 30.4837 22.5899 17.259 13.4247 10.6198 8.48853 6.87555 5.62703 4.67841 3.94145 3.39132 2.95236 2.6105 2.30226 1.98587 1.62068 1.2446 0.895516 0.642427 0.47123 0.361687 0.288396 0.239791 0.205273 0.181265 0.163272 0.150271 0.140027 0.132409 0.1262 0.121497 0.117573 0.114583 0.11203 0.110088 0.108398 0.107121 0.105987 0.105148 0.104381 0.103831 0.103308 0.102946 0.10258 0.102371 0.102016 0.101858 0.101561 0.101406 0.101213 0.101083 0.100946 0.100843 0.100751 0.100669 0.100604 0.100537 0.100487 0.10043 0.100389 0.100338 0.100303 0.100257 0.100227 0.100186 0.100159 0.100121 0.100096 0.10006 0.100034 0.100001 0.0999741 0.0999427 0.0999148 0.099885 0.0998558 0.09984 0.0997966 0.0997729 0.0997725 0.0997488 0.099738 0.0997278 0.0997197 0.0997119 0.0997059 0.0997002 0.099696 0.0996911 0.0996878 0.099684 0.0996817 0.0996795 0.0996783 0.0996778 0.0996777 0.0996784 0.0996795 0.09968 0.099681 0.0996813 0.0996819 0.0996816 0.0996818 0.0996814 0.0996808 0.0996804 0.099679 0.0996878 0.0996684 0.0996681 0.0996879 0.0996787 0.0996806 0.099681 0.0996816 0.0996818 0.0996816 0.0996816 0.0996815 0.0996806 0.0996801 0.0996791 0.0996782 0.0996771 0.0996768 0.0996769 0.0996771 0.0996782 0.0996792 0.0996799 0.099681 0.0996812 0.099682 0.0996816 0.0996819 0.0996816 0.0996808 0.0996805 0.099679 0.0996878 0.0996683 0.0996682 0.0996883 0.0996795 0.0996802 0.0996811 0.0996812 0.0996819 0.0996814 0.0996819 0.0996812 0.0996811 0.0996799 0.0996794 0.0996782 0.0996773 0.099677 0.0996771 0.0996774 0.0996783 0.0996786 0.0996805 0.0996802 0.0996814 0.0996811 0.0996819 0.0996813 0.099682 0.0996808 0.0996809 0.0996786 0.0996884 0.099668 0.0996683 0.0996883 0.0996787 0.0996805 0.0996808 0.0996817 0.0996815 0.0996817 0.0996814 0.0996816 0.0996807 0.0996802 0.0996791 0.099678 0.0996772 0.0996768 0.0996768 0.099677 0.099678 0.0996789 0.0996796 0.0996804 0.0996809 0.0996814 0.0996814 0.0996814 0.0996813 0.0996808 0.0996803 0.0996788 0.099688 0.0996681 0.0996682 0.0996885 0.0996792 0.0996801 0.0996815 0.0996814 0.0996816 0.0996815 0.0996819 0.0996814 0.099681 0.0996799 0.0996792 0.099678 0.0996771 0.0996767 0.0996765 0.099677 0.099678 0.0996789 0.0996798 0.0996805 0.0996816 0.0996819 0.0996821 0.099682 0.0996822 0.0996811 0.0996813 0.0996792 0.0996884 0.0996679 0.0996683 0.099688 0.0996788 0.0996806 0.0996815 0.0996826 0.0996836 0.0996837 0.0996839 0.0996835 0.0996823 0.0996815 0.0996795 0.0996788 0.0996774 0.0996767 0.0996768 0.0996776 0.0996793 0.0996816 0.0996835 0.0996863 0.0996875 0.0996896 0.0996897 0.0996903 0.0996891 0.0996878 0.0996854 0.0996846 0.0996895 0.0996378 0.0972738 0.293299 1.1077 2.45299 5.01443 9.71009 17.9259 30.4225 50.1978 80.3683 133.202 229.702 396.4 600.096 831.929 1045.49 1177.7 1217.75 1219.79 1223.22 1219.48 1193.1 1141.12 1117.56 1139.03 1185.72 1236.35 1319.62 1445.51 1603.63 1823.71 2128.83 2571.82 3249.24 4302.67 6116.95 9293.91 14318.5 20580 26112.8 29162.1 29708.9 28474.4 26284.6 23621.2 20633.4 17284 13716.8 10369.8 7416.91 4672.28 3713.57 3266.83 3381.95 4029.79 4875.79 5941.31 7177.81 8454.63 9371.83 9311.27 8162.06 6672.13 5535.64 4953.15 4872.4 5062.57 5359.46 5800.64 6477.28 7554.97 9156.4 11473 14763.7 19413.9 25794.9 34526.3 46180.2 60766.6 77586.8 96058 114683 128475 135824 137062 134858 132827 131759 130444 127451 122505 114830 105981 95082.5 81263.3 62293.1 40587.9 24096.2 15356.5 11634.4 9356.66 7675.6 6421.85 5370.68 4442.45 3979.13 3555.89 2953.4 2618.06 2553.32 2678.91 2977.75 3423.26 3954.31 4477.38 4742.19 4730.99 4338.33 3650.44 2859.15 2082.73 1443.18 958.689 618.146 390.623 245.925 155.904 100.15 66.6952 45.4364 32.5177 23.9253 18.277 14.1885 11.247 8.98911 7.30074 5.98888 4.99167 4.20138 3.5917 3.07419 2.64941 2.24289 1.86935 1.47757 1.13582 0.827325 0.618847 0.46256 0.363625 0.290525 0.243524 0.207543 0.183755 0.164735 0.151757 0.140889 0.133322 0.126719 0.1221 0.117902 0.114992 0.112238 0.110371 0.108525 0.107317 0.106066 0.10528 0.104427 0.103915 0.103327 0.102987 0.10257 0.102341 0.101993 0.101813 0.101527 0.101376 0.101183 0.101056 0.100912 0.100822 0.100712 0.100647 0.100562 0.100512 0.100442 0.100402 0.100342 0.100306 0.100255 0.100222 0.100177 0.100147 0.100107 0.100079 0.100042 0.100014 0.09998 0.0999505 0.099918 0.099887 0.0998551 0.0998248 0.0997933 0.099772 0.0997394 0.0997157 0.0997045 0.099685 0.0996737 0.099663 0.0996548 0.0996471 0.099641 0.0996351 0.0996309 0.0996256 0.0996223 0.099619 0.099617 0.0996148 0.0996141 0.0996133 0.0996133 0.0996138 0.0996142 0.0996149 0.0996153 0.0996162 0.0996162 0.0996164 0.0996158 0.0996153 0.0996144 0.0996138 0.0996121 0.0996162 0.0996083 0.0996081 0.0996164 0.099612 0.0996139 0.0996143 0.0996155 0.099616 0.0996164 0.0996164 0.0996161 0.0996153 0.0996147 0.0996141 0.0996132 0.0996124 0.0996123 0.0996123 0.0996124 0.0996135 0.0996139 0.0996149 0.0996152 0.0996161 0.0996162 0.0996164 0.0996159 0.0996155 0.0996145 0.0996137 0.0996122 0.0996163 0.0996084 0.0996082 0.0996165 0.0996125 0.0996136 0.0996146 0.0996153 0.099616 0.0996162 0.0996163 0.0996162 0.0996154 0.099615 0.0996141 0.0996135 0.0996125 0.0996123 0.0996122 0.0996128 0.0996131 0.0996142 0.0996147 0.0996154 0.0996159 0.0996163 0.0996163 0.0996159 0.0996155 0.0996144 0.0996139 0.099612 0.0996165 0.099608 0.0996083 0.0996168 0.099612 0.0996139 0.0996144 0.0996156 0.0996158 0.0996163 0.0996164 0.0996159 0.0996155 0.0996143 0.0996144 0.0996129 0.0996126 0.0996121 0.0996123 0.0996123 0.0996133 0.0996139 0.0996147 0.099615 0.0996159 0.0996159 0.0996162 0.0996156 0.0996154 0.0996142 0.0996137 0.099612 0.0996166 0.0996081 0.0996083 0.0996164 0.0996122 0.0996134 0.0996146 0.0996152 0.099616 0.0996162 0.0996162 0.0996162 0.0996153 0.099615 0.0996141 0.0996136 0.0996124 0.0996123 0.0996119 0.0996125 0.0996132 0.0996141 0.0996147 0.0996155 0.0996164 0.0996166 0.0996168 0.0996164 0.099616 0.0996149 0.0996141 0.0996124 0.0996166 0.0996081 0.0996082 0.0996166 0.0996121 0.0996142 0.099615 0.0996167 0.0996176 0.0996185 0.0996185 0.0996183 0.0996172 0.0996162 0.0996152 0.0996141 0.0996133 0.0996123 0.0996127 0.0996128 0.0996151 0.099616 0.0996185 0.0996196 0.0996214 0.0996227 0.0996232 0.0996233 0.0996225 0.0996214 0.0996187 0.0996172 0.0996193 0.0995844 0.0972638 0.153253 0.258092 0.398407 0.513519 0.640911 0.807918 0.875828 1.15419 1.28902 1.65534 1.95232 2.49841 3.45195 5.85056 9.90461 15.094 22.9097 27.5136 37.6742 39.8487 39.8331 33.7022 26.7645 25.2611 27.0377 33.146 37.6532 41.5032 48.0058 41.9825 48.4214 43.1265 45.5694 51.7727 67.4233 98.5899 160.633 280.682 481.305 782.717 1207.22 1846.81 2636.81 3431.31 4110.85 4626.56 4856.98 4809.62 4559.21 4113.71 3962.71 3763.45 3406.8 3089.78 2652.21 2204.27 1822.88 1551.68 1479.49 1519.7 1593.89 1663.26 1612.07 1466.48 1311.22 1204.91 1108.42 1044.78 1024.11 1051.37 1154.52 1411.53 1811.67 2411.63 3273.84 4481.88 6175.36 8161.3 10409.5 12520.2 14421.7 15991.8 17453.5 16388.1 16627.3 14944.3 13368 11857 10160.2 8241.93 6426.87 5254.71 4556.23 3831.33 3329.42 2712.42 2144.6 2011.91 1727.21 1247.64 881.449 542.688 301.378 131.647 29.4172 12.7308 36.6047 62.0186 76.5048 96.8379 99.2896 102.375 101.26 51.0735 44.029 12.4086 4.37574 1.8619 0.98533 0.562023 0.340691 0.219909 0.16146 0.13405 0.121396 0.11626 0.113231 0.112301 0.110921 0.110521 0.109713 0.109401 0.108873 0.112605 0.108541 0.116632 0.110891 0.119282 0.113696 0.118244 0.111574 0.112874 0.106849 0.106594 0.105059 0.105008 0.104228 0.104368 0.103662 0.103822 0.103174 0.103284 0.102683 0.102738 0.102184 0.102195 0.101684 0.101665 0.101193 0.101164 0.100726 0.100687 0.100282 0.100234 0.0998617 0.0998046 0.0994685 0.0994005 0.0991051 0.099042 0.0987989 0.0987488 0.0985476 0.0985092 0.098324 0.0982863 0.0981253 0.0980811 0.0979627 0.097913 0.0978084 0.0977781 0.0976852 0.097665 0.0975899 0.0975737 0.097515 0.0975017 0.0974558 0.0974456 0.0974096 0.0974022 0.097374 0.097369 0.0973468 0.0973435 0.0973257 0.0973237 0.0973096 0.0973083 0.0972978 0.0972961 0.0972889 0.0972865 0.0972816 0.0972825 0.0972731 0.097271 0.0972744 0.0972694 0.0972689 0.0972674 0.0972668 0.0972657 0.0972652 0.0972642 0.0972641 0.0972631 0.0972628 0.097262 0.0972613 0.0972607 0.0972602 0.09726 0.0972601 0.0972609 0.0972605 0.0972617 0.0972611 0.097262 0.0972611 0.097262 0.0972613 0.0972617 0.0972612 0.0972611 0.0972601 0.0972635 0.0972573 0.0972578 0.0972636 0.0972604 0.0972611 0.0972613 0.0972616 0.0972616 0.0972614 0.0972616 0.0972614 0.0972613 0.097261 0.0972608 0.0972602 0.0972599 0.0972593 0.0972595 0.0972595 0.0972605 0.0972605 0.0972613 0.0972611 0.0972617 0.0972613 0.0972618 0.0972614 0.0972616 0.0972612 0.097261 0.0972604 0.0972636 0.0972575 0.0972576 0.0972635 0.0972604 0.0972611 0.0972611 0.0972617 0.0972613 0.0972621 0.097261 0.097262 0.0972608 0.0972616 0.09726 0.0972609 0.0972593 0.0972597 0.0972592 0.0972601 0.0972601 0.0972609 0.0972607 0.0972618 0.0972611 0.0972618 0.0972612 0.0972617 0.0972615 0.0972609 0.0972612 0.0972601 0.0972634 0.0972574 0.0972575 0.0972639 0.0972603 0.0972609 0.0972615 0.0972611 0.0972622 0.0972609 0.0972622 0.0972607 0.0972621 0.0972604 0.0972613 0.0972597 0.0972601 0.0972591 0.0972594 0.0972595 0.0972604 0.0972605 0.0972609 0.0972611 0.0972614 0.0972613 0.0972618 0.0972612 0.0972617 0.097261 0.0972612 0.0972602 0.0972637 0.0972576 0.0972574 0.0972634 0.0972605 0.0972612 0.0972612 0.0972617 0.0972613 0.0972621 0.0972611 0.097262 0.0972609 0.0972616 0.0972603 0.097261 0.0972593 0.0972597 0.0972594 0.0972598 0.0972603 0.0972607 0.0972612 0.0972611 0.0972619 0.0972615 0.0972618 0.0972619 0.0972617 0.0972615 0.0972612 0.0972605 0.0972635 0.0972575 0.0972574 0.0972636 0.0972602 0.0972612 0.0972616 0.0972618 0.0972625 0.0972621 0.0972624 0.097262 0.097262 0.0972615 0.0972615 0.0972602 0.0972603 0.0972592 0.09726 0.0972594 0.0972619 0.0972606 0.0972633 0.097262 0.0972639 0.0972626 0.0972642 0.0972629 0.0972646 0.0972631 0.0972633 0.0972626 0.0972647 0.0972579 0.097246 ) ; boundaryField { wand { type compressible::kqRWallFunction; value nonuniform List<scalar> 2048 ( 0.13929 0.199923 0.21932 0.292408 0.314968 0.355362 0.400429 0.523441 0.694772 0.789415 0.808602 0.734193 0.560803 0.416293 0.309298 0.150549 0.133388 0.19412 0.22689 0.291835 0.31612 0.343069 0.41031 0.501752 0.67296 0.755573 0.748752 0.656295 0.525899 0.38717 0.293299 0.153253 0.150549 0.153253 0.260996 0.258092 0.346558 0.398407 0.486669 0.513519 0.629334 0.640911 0.765706 0.807918 0.950722 0.875828 1.0412 1.15419 1.34864 1.28902 1.52689 1.65534 2.04389 1.95232 2.77547 2.49841 3.86573 3.45195 6.26535 5.85056 10.5663 9.90461 15.6567 15.094 21.2839 22.9097 30.4235 27.5136 35.5184 37.6742 41.3056 39.8487 39.4747 39.8331 33.6814 33.7022 27.9572 26.7645 25.0567 25.2611 27.8628 27.0377 31.4194 33.146 38.335 37.6532 42.5465 41.5032 39.3694 48.0058 46.7434 41.9825 40.5323 48.4214 45.9073 43.1265 45.0376 45.5694 52.8043 51.7727 67.5487 67.4233 98.6485 98.5899 162.618 160.633 282.702 280.682 485.532 481.305 788.218 782.717 1226.9 1207.22 1860.61 1846.81 2660.94 2636.81 3443.64 3431.31 4151.4 4110.85 4631.5 4626.56 4858.72 4856.98 4821.75 4809.62 4555 4559.21 4116.89 4113.71 3959.27 3962.71 3758.04 3763.45 3407.51 3406.8 3067.61 3089.78 2635.49 2652.21 2213.69 2204.27 1808.73 1822.88 1565.21 1551.68 1450.72 1479.49 1507.02 1519.7 1592.79 1593.89 1671.27 1663.26 1650.28 1612.07 1448.83 1466.48 1344.11 1311.22 1222.2 1204.91 1120.01 1108.42 1043.36 1044.78 1012.34 1024.11 1055.99 1051.37 1186.75 1154.52 1413.11 1411.53 1807.26 1811.67 2402.68 2411.63 3243.46 3273.84 4458.86 4481.88 6114.21 6175.36 8189.38 8161.3 10349.8 10409.5 12626.3 12520.2 14459.1 14421.7 15798 15991.8 16165.2 17453.5 17933.6 16388.1 16204.5 16627.3 14106.4 14944.3 12338.6 13368 10510.1 11857 8902.94 10160.2 7209.45 8241.93 6044.37 6426.87 5129.23 5254.71 4350.5 4556.23 3893.36 3831.33 3307.41 3329.42 2740.16 2712.42 2278.79 2144.6 1990.31 2011.91 1671.25 1727.21 1285.02 1247.64 840.498 881.449 540.344 542.688 351.246 301.378 157.291 131.647 21.2735 29.4172 16.9168 12.7308 35.5464 36.6047 59.913 62.0186 83.978 76.5048 91.1798 96.8379 106.683 99.2896 105.565 102.375 83.5736 101.26 76.9133 51.0735 25.5852 44.029 13.5129 12.4086 4.24992 4.37574 1.93232 1.8619 1.00833 0.98533 0.572655 0.562023 0.33882 0.340691 0.221127 0.219909 0.16142 0.16146 0.133767 0.13405 0.121764 0.121396 0.115871 0.11626 0.113705 0.113231 0.111826 0.112301 0.111327 0.110921 0.110265 0.110521 0.109897 0.109713 0.109266 0.109401 0.110627 0.108873 0.108621 0.112605 0.114373 0.108541 0.108582 0.116632 0.118012 0.110891 0.112691 0.119282 0.11893 0.113696 0.113326 0.118244 0.115939 0.111574 0.108287 0.112874 0.108654 0.106849 0.105638 0.106594 0.105368 0.105059 0.104589 0.105008 0.104669 0.104228 0.103929 0.104368 0.104105 0.103662 0.103435 0.103822 0.10357 0.103174 0.102938 0.103284 0.103018 0.102683 0.102441 0.102738 0.10247 0.102184 0.101934 0.102195 0.101926 0.101684 0.101437 0.101665 0.10141 0.101193 0.100956 0.101164 0.100922 0.100726 0.100501 0.100687 0.100458 0.100282 0.100069 0.100234 0.100017 0.0998617 0.0996616 0.0998046 0.0995986 0.0994685 0.0992826 0.0994005 0.0992136 0.0991051 0.0989446 0.099042 0.0988884 0.0987989 0.0986718 0.0987488 0.0986155 0.0985476 0.0984564 0.0985092 0.098377 0.098324 0.0982372 0.0982863 0.0981711 0.0981253 0.0980519 0.0980811 0.0979906 0.0979627 0.0978826 0.097913 0.0978439 0.0978084 0.0977438 0.0977781 0.0977195 0.0976852 0.0976349 0.097665 0.0976168 0.0975899 0.0975501 0.0975737 0.0975355 0.097515 0.0974835 0.0975017 0.097472 0.0974558 0.0974312 0.0974456 0.0974223 0.0974096 0.0973905 0.0974022 0.0973843 0.097374 0.0973596 0.097369 0.0973554 0.0973468 0.0973355 0.0973435 0.0973329 0.0973257 0.0973171 0.0973237 0.0973155 0.0973096 0.0973031 0.0973083 0.0973019 0.0972978 0.0972929 0.0972961 0.0972909 0.0972889 0.0972853 0.0972865 0.097282 0.0972816 0.0972822 0.0972825 0.0972734 0.0972731 0.0972706 0.097271 0.0972744 0.0972744 0.0972696 0.0972694 0.0972686 0.0972689 0.0972676 0.0972674 0.0972665 0.0972668 0.0972661 0.0972657 0.0972649 0.0972652 0.0972647 0.0972642 0.0972637 0.0972641 0.0972635 0.0972631 0.0972626 0.0972628 0.0972621 0.097262 0.0972614 0.0972613 0.0972608 0.0972607 0.0972602 0.0972602 0.0972601 0.09726 0.0972604 0.0972601 0.0972605 0.0972609 0.0972614 0.0972605 0.0972608 0.0972617 0.0972618 0.0972611 0.0972612 0.097262 0.0972618 0.0972611 0.0972612 0.097262 0.0972619 0.0972613 0.0972613 0.0972617 0.0972614 0.0972612 0.0972612 0.0972611 0.0972603 0.0972601 0.0972637 0.0972635 0.0972573 0.0972573 0.0972574 0.0972578 0.0972638 0.0972636 0.0972602 0.0972604 0.0972611 0.0972611 0.0972613 0.0972613 0.0972613 0.0972616 0.0972618 0.0972616 0.0972615 0.0972614 0.0972614 0.0972616 0.0972615 0.0972614 0.0972612 0.0972613 0.097261 0.097261 0.0972606 0.0972608 0.0972604 0.0972602 0.0972597 0.0972599 0.0972596 0.0972593 0.0972593 0.0972595 0.0972601 0.0972595 0.0972602 0.0972605 0.0972609 0.0972605 0.0972607 0.0972613 0.0972615 0.0972611 0.0972613 0.0972617 0.0972618 0.0972613 0.0972614 0.0972618 0.0972618 0.0972614 0.0972614 0.0972616 0.0972611 0.0972612 0.0972613 0.097261 0.0972603 0.0972604 0.0972635 0.0972636 0.0972572 0.0972575 0.0972574 0.0972576 0.0972637 0.0972635 0.0972604 0.0972604 0.0972609 0.0972611 0.0972614 0.0972611 0.0972612 0.0972617 0.0972621 0.0972613 0.0972611 0.0972621 0.0972622 0.097261 0.0972609 0.097262 0.0972619 0.0972608 0.0972605 0.0972616 0.0972613 0.09726 0.0972597 0.0972609 0.0972603 0.0972593 0.0972592 0.0972597 0.0972596 0.0972592 0.0972595 0.0972601 0.0972606 0.0972601 0.0972601 0.0972609 0.0972616 0.0972607 0.0972606 0.0972618 0.097262 0.0972611 0.0972611 0.0972618 0.0972618 0.0972612 0.0972616 0.0972617 0.0972613 0.0972615 0.0972616 0.0972609 0.0972609 0.0972612 0.0972605 0.0972601 0.0972639 0.0972634 0.0972576 0.0972574 0.0972572 0.0972575 0.0972634 0.0972639 0.0972602 0.0972603 0.0972611 0.0972609 0.0972611 0.0972615 0.0972618 0.0972611 0.0972613 0.0972622 0.0972623 0.0972609 0.0972608 0.0972622 0.0972623 0.0972607 0.0972604 0.0972621 0.0972617 0.0972604 0.0972601 0.0972613 0.0972608 0.0972597 0.0972595 0.0972601 0.0972598 0.0972591 0.0972594 0.0972594 0.0972599 0.0972595 0.0972602 0.0972604 0.0972607 0.0972605 0.097261 0.0972609 0.0972612 0.0972611 0.0972613 0.0972614 0.0972615 0.0972613 0.0972612 0.0972618 0.0972619 0.0972612 0.097261 0.0972617 0.0972614 0.097261 0.0972609 0.0972612 0.0972603 0.0972602 0.0972634 0.0972637 0.0972574 0.0972576 0.0972574 0.0972574 0.0972636 0.0972634 0.0972604 0.0972605 0.0972611 0.0972612 0.0972615 0.0972612 0.0972613 0.0972617 0.097262 0.0972613 0.0972611 0.0972621 0.097262 0.0972611 0.0972611 0.097262 0.0972618 0.0972609 0.0972605 0.0972616 0.0972612 0.0972603 0.0972597 0.097261 0.0972603 0.0972593 0.0972591 0.0972597 0.0972593 0.0972594 0.0972598 0.0972598 0.0972603 0.0972603 0.0972607 0.0972607 0.097261 0.0972612 0.0972616 0.0972611 0.0972613 0.0972619 0.0972618 0.0972615 0.0972617 0.0972618 0.0972618 0.0972619 0.0972619 0.0972617 0.0972611 0.0972615 0.0972615 0.0972612 0.0972603 0.0972605 0.0972639 0.0972635 0.0972578 0.0972575 0.0972573 0.0972574 0.0972635 0.0972636 0.0972607 0.0972602 0.0972614 0.0972612 0.0972615 0.0972616 0.097262 0.0972618 0.0972621 0.0972625 0.0972623 0.0972621 0.0972619 0.0972624 0.0972623 0.097262 0.0972616 0.097262 0.0972618 0.0972615 0.0972609 0.0972615 0.097261 0.0972602 0.0972595 0.0972603 0.0972599 0.0972592 0.0972591 0.09726 0.0972608 0.0972594 0.0972599 0.0972619 0.0972626 0.0972606 0.0972614 0.0972633 0.0972636 0.097262 0.0972624 0.0972639 0.0972638 0.0972626 0.0972628 0.0972642 0.0972639 0.0972629 0.0972626 0.0972646 0.0972634 0.0972631 0.0972626 0.0972633 0.0972614 0.0972626 0.097265 0.0972647 0.0972568 0.0972579 0.0972457 0.097246 0.0974375 0.097466 0.0973739 0.0973668 0.097287 0.0972745 0.0972642 0.0972457 0.0974457 0.0974612 0.0973678 0.097363 0.0972848 0.0972738 0.0972638 0.097246 0.13929 0.133388 0.168162 0.159718 0.188769 0.175534 0.184318 0.197623 0.204534 0.199995 0.22052 0.217 0.164412 0.184147 0.145924 0.148663 0.153415 0.165213 0.147761 0.160239 0.137091 0.156441 0.138518 0.138886 0.128676 0.126493 0.104335 0.117739 0.107244 0.117588 0.151953 0.174784 0.171708 0.189553 0.180346 0.179358 0.179797 0.20299 0.206706 0.211822 0.228434 0.257606 0.27324 0.283626 0.320794 0.328083 0.384083 0.398945 0.471955 0.480037 0.562439 0.576947 0.69141 0.674514 0.854065 0.785977 0.912171 0.981103 1.15739 1.03436 1.29023 1.25961 1.39771 1.31992 1.38029 1.20155 1.33785 1.21428 1.17662 1.41852 1.31972 1.2925 1.22153 1.26575 1.05558 1.05518 0.780272 0.893292 0.646994 0.557491 0.41784 0.400694 0.285982 0.307713 0.206756 0.215802 0.122947 0.131803 0.111943 0.112529 0.163005 0.161482 0.647984 0.651203 4.33861 4.53762 15.8759 14.8253 26.0159 23.2797 29.1165 27.3796 29.3262 25.9544 24.2297 24.2425 20.822 18.5462 16.2766 14.384 11.6582 9.75655 7.25637 6.01105 3.79719 3.46921 2.2176 2.18083 1.60794 1.68281 1.48326 1.46734 1.58636 1.32227 1.43303 1.4639 1.58837 1.30794 1.40581 1.24365 1.17985 1.14219 0.827831 0.9048 0.651003 0.582099 0.415795 0.415612 0.266246 0.249536 0.181706 0.167766 0.139476 0.13488 0.124579 0.119112 0.111294 0.113793 0.106978 0.10562 0.114636 0.110195 0.114275 0.114494 0.120631 0.119131 0.130145 0.129367 0.14979 0.150222 0.199602 0.197859 0.350956 0.318836 0.910571 0.687175 2.9556 1.8987 5.18002 5.75936 7.79402 7.50061 8.63561 7.9271 6.82666 6.38035 3.70528 3.59061 2.16396 2.161 1.59222 1.56213 1.37917 1.38105 1.28639 1.26968 1.17809 1.14988 1.01661 1.03341 0.866162 0.854014 0.71375 0.645143 0.520561 0.487748 0.311299 0.343634 0.202208 0.201314 0.140599 0.140642 0.121566 0.124065 0.115701 0.116411 0.112493 0.113277 0.101846 0.102028 0.104359 0.104483 0.105971 0.105899 0.107812 0.108009 0.111725 0.111244 0.116437 0.116176 0.121266 0.122458 0.129095 0.126438 0.132595 0.134512 0.13917 0.137623 0.140877 0.141172 0.141248 0.141064 0.139576 0.138577 0.135448 0.135537 0.1315 0.131223 0.127407 0.127334 0.123551 0.123997 0.121005 0.120222 0.117412 0.118194 0.115505 0.114987 0.112859 0.112915 0.110694 0.111002 0.109323 0.109026 0.107778 0.108105 0.107189 0.107085 0.106566 0.106547 0.105842 0.106102 0.105269 0.10512 0.103828 0.103937 0.102858 0.102523 0.0993414 0.0998846 0.100178 0.100276 0.100178 0.100579 0.100653 0.100411 0.10064 0.100781 0.100814 0.10083 0.100917 0.100831 0.10081 0.100916 0.100884 0.10072 0.100637 0.10079 0.100678 0.100536 0.10041 0.100553 0.100408 0.100264 0.100115 0.100267 0.10011 0.0999569 0.0997883 0.0999518 0.0997892 0.0996287 0.0994757 0.0996284 0.0994718 0.0993277 0.0991902 0.0993168 0.0991668 0.0990595 0.098935 0.0990216 0.0988805 0.0988163 0.0986958 0.0987492 0.0986186 0.0985811 0.0984613 0.0984968 0.0983757 0.0983457 0.0982298 0.0982602 0.0981348 0.0981199 0.0980377 0.09803 0.0976203 0.0976416 0.0976702 0.0976519 0.0976612 0.0976759 0.0976625 0.0976653 0.0976659 0.0976646 0.0976639 0.0976689 0.0976703 0.097661 0.09766 0.097664 0.0976602 0.0976518 0.0976427 0.0976535 0.0976462 0.0976334 0.0976246 0.0976384 0.0976306 0.0976163 0.0976096 0.0976214 0.0976131 0.0976028 0.0975973 0.0976051 0.0975987 0.0975916 0.097587 0.0975922 0.0975866 0.0975813 0.0975771 0.0975807 0.0975764 0.0975721 0.0975691 0.0975713 0.0975681 0.097564 0.0975624 0.0975626 0.0975606 0.0975572 0.0975574 0.0975544 0.0975543 0.0975512 0.097553 0.0975482 0.09755 0.0975438 0.0975163 0.0975348 0.0975088 0.097528 0.0975394 0.0975325 0.0975402 0.0975365 0.09754 0.0975388 0.0975414 0.0975412 0.0975421 0.0975428 0.0975438 0.0975423 0.0975427 0.0975443 0.0975447 0.0975425 0.0975428 0.0975443 0.0975444 0.0975426 0.097543 0.0975437 0.0975432 0.0975434 0.0975432 0.0975426 0.0975415 0.0975437 0.0975435 0.0975417 0.097542 0.0975437 0.0975428 0.0975432 0.0975428 0.0975432 0.0975419 0.0975442 0.0975428 0.0975433 0.0975412 0.0975449 0.0975424 0.0975436 0.0975406 0.0975445 0.0975409 0.097543 0.0975389 0.0975422 0.0975386 0.097539 0.0975369 0.0975367 0.0975322 0.097537 0.0975244 0.0975106 0.0975251 0.0975099 0.0975345 0.097539 0.0975359 0.0975415 0.0975377 0.0975409 0.097539 0.0975422 0.0975395 0.0975432 0.0975417 0.0975425 0.0975406 0.0975441 0.0975428 0.0975426 0.0975414 0.0975441 0.0975428 0.0975426 0.097542 0.0975434 0.0975422 0.0975432 0.0975427 0.0975423 0.0975411 0.0975437 0.0975431 0.0975415 0.0975417 0.0975435 0.0975425 0.097543 0.0975425 0.0975431 0.0975418 0.0975441 0.0975427 0.0975432 0.0975412 0.0975448 0.0975424 0.0975435 0.0975405 0.0975445 0.0975408 0.097543 0.0975389 0.0975422 0.0975386 0.097539 0.0975367 0.0975367 0.0975322 0.0975368 0.0975245 0.0975106 0.0975272 0.0975074 0.0975312 0.097539 0.097535 0.0975393 0.0975383 0.097539 0.0975411 0.0975401 0.0975422 0.0975412 0.0975419 0.0975428 0.0975436 0.0975419 0.0975422 0.0975435 0.0975437 0.0975423 0.0975424 0.0975435 0.097543 0.0975429 0.0975428 0.0975427 0.0975416 0.0975434 0.0975427 0.0975418 0.0975408 0.0975434 0.0975428 0.0975419 0.0975418 0.0975435 0.0975412 0.0975429 0.0975426 0.0975407 0.0975417 0.0975385 0.0975414 0.0975424 0.0975434 0.0975409 0.0975417 0.0975421 0.0975428 0.0975398 0.0975419 0.0975395 0.0975409 0.097538 0.0975412 0.097536 0.0975389 0.0975346 0.0975099 0.0975253 0.0975259 0.0975098 0.0975344 0.0975385 0.0975359 0.0975413 0.0975377 0.0975411 0.097539 0.0975423 0.0975396 0.0975432 0.0975416 0.0975425 0.0975408 0.0975439 0.0975426 0.0975428 0.0975415 0.0975439 0.0975428 0.0975428 0.0975422 0.0975435 0.0975423 0.0975433 0.0975427 0.0975423 0.0975411 0.0975436 0.097543 0.0975416 0.0975417 0.0975436 0.0975425 0.097543 0.0975427 0.0975432 0.0975417 0.0975439 0.0975426 0.0975432 0.097541 0.0975448 0.0975421 0.0975436 0.0975402 0.0975445 0.0975406 0.0975432 0.0975385 0.0975426 0.0975388 0.0975392 0.0975368 0.0975369 0.0975324 0.0975371 0.0975244 0.0975102 0.0975107 0.0975247 0.0975372 0.0975324 0.0975373 0.0975374 0.0975398 0.0975384 0.097543 0.0975379 0.0975434 0.09754 0.0975447 0.0975403 0.0975435 0.0975424 0.0975446 0.0975415 0.0975429 0.0975433 0.0975441 0.0975425 0.0975431 0.0975436 0.0975436 0.0975432 0.0975431 0.0975428 0.0975448 0.0975387 0.097545 0.0975389 0.097543 0.0975424 0.0975429 0.0975431 0.0975428 0.0975429 0.0975435 0.0975425 0.0975426 0.097543 0.0975441 0.0975416 0.097543 0.0975426 0.0975439 0.0975408 0.0975427 0.097541 0.0975418 0.0975391 0.0975388 0.0975387 0.0975368 0.0975371 0.0975372 0.0975323 0.0975104 0.0975247 0.0975253 0.0975099 0.0975345 0.0975386 0.0975375 0.0975414 0.0975382 0.0975432 0.0975424 0.0975424 0.0975403 0.097547 0.0975461 0.0975431 0.0975415 0.0975482 0.0975471 0.0975433 0.0975421 0.0975481 0.0975468 0.0975433 0.0975426 0.0975467 0.097545 0.0975434 0.0975431 0.0975446 0.0975428 0.0975436 0.0975427 0.0975417 0.0975407 0.0975434 0.0975424 0.0975424 0.0975422 0.0975427 0.0975413 0.097544 0.0975432 0.0975428 0.0975411 0.0975455 0.0975433 0.0975433 0.0975404 0.0975455 0.0975416 0.097543 0.0975386 0.0975432 0.0975389 0.0975396 0.0975367 0.0975369 0.0975322 0.0975371 0.0975245 0.09751 0.104335 0.107244 0.122947 0.111943 0.111294 0.106978 0.112493 0.101846 0.102858 0.0993414 0.0980377 0.0976203 0.0975163 0.0975088 0.0975244 0.0975251 0.0975245 0.0975272 0.0975099 0.0975259 0.0975244 0.0975107 0.0975104 0.0975253 0.0975245 0.14039 0.169566 0.271612 4.44098 0.230287 0.14039 0.14593 0.10444 0.104273 0.0999988 0.0980104 0.0975629 0.0974403 0.0974287 0.0974249 0.0974325 0.0974251 0.0974229 0.0974259 0.0974324 0.0974253 0.0974219 0.0974234 0.0974319 0.0974253 0.142803 0.228859 0.382 9.51235 0.298691 0.207915 0.142838 0.108099 0.103834 0.100425 0.0981775 0.0978464 0.0977066 0.0976998 0.0976589 0.0976599 0.0976586 0.0976563 0.0977023 0.0976568 0.0976593 0.0976993 0.0976994 0.0976557 0.0976582 0.149501 0.275137 0.645194 13.0621 0.42379 0.342095 0.145328 0.118224 0.104084 0.100939 0.0980546 0.097725 0.0975187 0.0975114 0.0975366 0.0975382 0.0975369 0.0975378 0.0975094 0.0975401 0.0975364 0.0975092 0.0975091 0.097539 0.0975372 0.18825 0.402017 1.13303 15.2808 0.758154 0.643835 0.188365 0.144599 0.104809 0.101382 0.0980846 0.0978296 0.097567 0.0975567 0.0975346 0.0975363 0.0975344 0.0975376 0.0975599 0.0975333 0.0975344 0.0975608 0.0975585 0.0975348 0.0975348 0.223404 0.708887 2.4159 13.3731 1.92667 0.56712 0.302192 0.152028 0.105666 0.102489 0.0981135 0.0979063 0.0975692 0.0975603 0.0975557 0.0975562 0.0975556 0.0975555 0.0975577 0.0975568 0.0975556 0.0975584 0.0975573 0.0975576 0.0975556 0.271914 2.62923 9.81262 12.6944 7.58761 0.226174 1.02974 0.123132 0.108662 0.106591 0.0982277 0.0979518 0.0975225 0.0975141 0.0975077 0.0975091 0.0975079 0.09751 0.0975122 0.0975083 0.0975078 0.0975129 0.097512 0.0975088 0.0975085 1.28336 22.2552 8.49697 139.411 103.868 669.779 22.0028 587.142 29.6428 2495.43 0.729807 1175.08 2.06027 185.035 0.418276 56.5876 0.112893 0.220441 0.143984 0.137215 0.0985465 0.0983613 0.0979539 0.0985653 0.0975199 0.0974495 0.0975074 0.0974485 0.0975024 0.0974345 0.0975026 0.0974347 0.0975022 0.0974344 0.097504 0.0974343 0.0975014 0.097436 0.097503 0.0974342 0.0975023 0.0974341 0.0975018 0.0974366 0.0975014 0.097436 0.097503 0.097434 0.0975038 0.0974393 0.0974375 0.117739 0.117588 0.131803 0.112529 0.113793 0.10562 0.113277 0.102028 0.102523 0.0998846 0.09803 0.0976416 0.0975348 0.097528 0.0975106 0.0975099 0.0975106 0.0975074 0.0975253 0.0975098 0.0975102 0.0975247 0.0975247 0.0975099 0.09751 0.161646 0.166062 0.370972 4.45376 0.236705 0.143925 0.143304 0.104094 0.103874 0.0998946 0.0980168 0.0975681 0.0974448 0.0974232 0.0974228 0.0974273 0.0974227 0.0974287 0.0974333 0.0974256 0.0974225 0.0974254 0.0974244 0.0974266 0.0974227 0.15556 0.247724 0.514288 9.10887 0.299214 0.190098 0.138081 0.107771 0.103638 0.100448 0.0981868 0.0978086 0.0976708 0.0976576 0.0976991 0.0977012 0.0976992 0.0976985 0.0976579 0.0977014 0.0976994 0.0976595 0.0976577 0.0977009 0.0976994 0.173445 0.330162 0.731035 13.1841 0.41251 0.411858 0.150347 0.119584 0.103885 0.100715 0.0980635 0.0977327 0.097547 0.0975398 0.0975097 0.0975098 0.0975097 0.0975098 0.0975409 0.0975102 0.0975096 0.0975364 0.0975365 0.0975099 0.0975097 0.187674 0.357647 1.10143 14.6837 0.784932 0.591389 0.175653 0.143085 0.10442 0.101238 0.098123 0.0977745 0.0975485 0.0975397 0.0975592 0.097559 0.0975593 0.0975556 0.0975355 0.0975611 0.0975593 0.0975336 0.0975348 0.0975595 0.0975597 0.241365 0.765379 2.2376 14.129 2.02902 0.511991 0.311255 0.147359 0.105685 0.101625 0.0981634 0.0978448 0.0975642 0.0975561 0.0975578 0.097559 0.0975578 0.097557 0.0975572 0.0975581 0.097558 0.0975553 0.0975556 0.0975579 0.0975586 0.267539 2.52109 9.8615 12.365 7.82311 0.260907 1.01564 0.124813 0.108363 0.1046 0.0981188 0.0979096 0.097518 0.0975124 0.0975123 0.0975117 0.0975126 0.0975106 0.0975089 0.0975124 0.0975123 0.0975074 0.0975081 0.097512 0.0975133 1.09762 26.0137 7.79819 138.964 102.037 663.222 22.1243 586.698 29.8012 2468.52 0.729214 1171.3 2.08695 190.418 0.306601 60.3396 0.113013 0.223639 0.13606 0.129243 0.0984633 0.0985846 0.0978019 0.0984926 0.0975132 0.0974464 0.097502 0.0974476 0.0975016 0.0974358 0.0975018 0.0974359 0.097502 0.0974356 0.0975007 0.0974358 0.0975031 0.0974346 0.0975015 0.0974364 0.0975015 0.0974365 0.0975021 0.097434 0.0975025 0.0974334 0.0975012 0.0974359 0.0975026 0.0974377 0.0974457 ) ; } frontAndBack { type empty; } } // ************************************************************************* //
[ "ubuntu@ip-172-31-45-175.eu-west-1.compute.internal" ]
ubuntu@ip-172-31-45-175.eu-west-1.compute.internal
8fa98c1d1dd77b6dcd060dce8eddd9a59f5485c1
14ac0b7c9d1a4f5a199c02b14cc2e24d46070371
/pyapi.cpp
7b880107489986b4505962abf6fedfb793566521
[]
no_license
cfl0122/genetic_algorithm
c323bb5680a87cd6934538c78c2918080fd21347
2041eda4b65cde0d875fde8299c7747f8eebc5b6
refs/heads/main
2023-06-16T11:18:02.143394
2021-07-08T06:03:43
2021-07-08T06:03:43
384,016,336
0
0
null
null
null
null
UTF-8
C++
false
false
944
cpp
#include "pybind11/pybind11.h" #include "pybind11/stl.h" #include "api_new.h" #include "api.h" #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) namespace py = pybind11; int add(int a,int b) { return a+b; } PYBIND11_MODULE(pyapi, m) { m.doc() = "geneticAlgorithm bindings"; m.def("high_low", &high_low, "villa high-low Collocation geneticAlgorithm"); m.def("high_low_new", &high_low_new, "villa high-low Collocation geneticAlgorithm"); m.def("old_high_low", &old_high_low, "old high-low Collocation geneticAlgorithm"); m.def("old_high_low_new", &old_high_low_new, "old high-low Collocation geneticAlgorithm"); m.def("villa_high_low", &villa_high_low, "old high-low Collocation geneticAlgorithm"); m.def("add", &add, "add function"); #ifdef VERSION_INFO m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO); #else m.attr("__version__") = "dev"; #endif }
[ "noreply@github.com" ]
noreply@github.com
6476dfac6872e4d314a843280dd7a6e8e8ba79b2
08b8cf38e1936e8cec27f84af0d3727321cec9c4
/data/crawl/wget/hunk_721.cpp
b9f23527f5ccd76f74e5a23c96a7bf8c663123ca
[]
no_license
ccdxc/logSurvey
eaf28e9c2d6307140b17986d5c05106d1fd8e943
6b80226e1667c1e0760ab39160893ee19b0e9fb1
refs/heads/master
2022-01-07T21:31:55.446839
2018-04-21T14:12:43
2018-04-21T14:12:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,633
cpp
contlen = parsed; } - /* Check for keep-alive related responses. */ - if (!inhibit_keep_alive && contlen != -1) - { - if (resp_header_copy (resp, "Keep-Alive", NULL, 0)) - keep_alive = true; - else if (resp_header_copy (resp, "Connection", hdrval, sizeof (hdrval))) - { - if (0 == strcasecmp (hdrval, "Keep-Alive")) - keep_alive = true; - } - } - if (keep_alive) - /* The server has promised that it will not close the connection - when we're done. This means that we can register it. */ - register_persistent (conn->host, conn->port, sock, using_ssl); - - if (statcode == HTTP_STATUS_UNAUTHORIZED) - { - /* Authorization is required. */ - if (keep_alive && !head_only && skip_short_body (sock, contlen)) - CLOSE_FINISH (sock); - else - CLOSE_INVALIDATE (sock); - pconn.authorized = false; - if (!auth_finished && (user && passwd)) - { - /* IIS sends multiple copies of WWW-Authenticate, one with - the value "negotiate", and other(s) with data. Loop over - all the occurrences and pick the one we recognize. */ - int wapos; - const char *wabeg, *waend; - char *www_authenticate = NULL; - for (wapos = 0; - (wapos = resp_header_locate (resp, "WWW-Authenticate", wapos, - &wabeg, &waend)) != -1; - ++wapos) - if (known_authentication_scheme_p (wabeg, waend)) - { - BOUNDED_TO_ALLOCA (wabeg, waend, www_authenticate); - break; - } - - if (!www_authenticate) - { - /* If the authentication header is missing or - unrecognized, there's no sense in retrying. */ - logputs (LOG_NOTQUIET, _("Unknown authentication scheme.\n")); - } - else if (!basic_auth_finished - || !BEGINS_WITH (www_authenticate, "Basic")) - { - char *pth; - pth = url_full_path (u); - request_set_header (req, "Authorization", - create_authorization_line (www_authenticate, - user, passwd, - request_method (req), - pth, - &auth_finished), - rel_value); - if (BEGINS_WITH (www_authenticate, "NTLM")) - ntlm_seen = true; - else if (!u->user && BEGINS_WITH (www_authenticate, "Basic")) - { - /* Need to register this host as using basic auth, - * so we automatically send creds next time. */ - register_basic_auth_host (u->host); - } - xfree (pth); - goto retry_with_auth; - } - else - { - /* We already did Basic auth, and it failed. Gotta - * give up. */ - } - } - logputs (LOG_NOTQUIET, _("Authorization failed.\n")); - request_free (req); - return AUTHFAILED; - } - else /* statcode != HTTP_STATUS_UNAUTHORIZED */ - { - /* Kludge: if NTLM is used, mark the TCP connection as authorized. */ - if (ntlm_seen) - pconn.authorized = true; - } request_free (req); hs->statcode = statcode;
[ "993273596@qq.com" ]
993273596@qq.com
3970b53005ec00fc67806b664bd753ecee380703
d21398b6990c02f3b84befc39ff34d1fb97528a5
/Krishna_assignment2.cpp
fe9a890f2199ca73a803439ac2c8a97fffef5431
[]
no_license
kris2692/n-Queens-using-Random-Hill-climbing
7a57edfbf463e847a4c8e35e13244097ab0b76df
c49104469b678e3fdaf321ec56ef81b13990c295
refs/heads/master
2021-04-15T07:32:17.559481
2018-05-10T16:45:59
2018-05-10T16:45:59
126,645,084
0
0
null
null
null
null
UTF-8
C++
false
false
4,917
cpp
#include <iostream> #include <stdlib.h> using namespace std; struct queen { public: int n; //number of queens int least_conflict_row, least_conflict_col; //rows, cols having least number of conflicts between queens bool check_solution; //to check if goal state has been reached int temp_conflicts; //calculating conflicts between queens int current_conflict, least_conflict; //to store least conflict and current conflict int current_row; //to store elements in current row int *state; //storing address of queens }k; //to claculate heuristics for a state int cal_heuristics(int temp_array[]) { int conflict=0; int i=0; while(i<k.n) { int j=i+1; while(j<k.n) { if((temp_array[i]-temp_array[j])==0||(abs(i-j)==abs(temp_array[i]-temp_array[j]))) conflict++; j++; } i++; } return conflict; } //to display the board along with quuen location. void displaystate() { int i=0; while(i<k.n) { int j=0; while(j<k.n) { cout<<" "; if(j!=k.state[i]) cout<<"*"; else cout<<"Q"; j++; } cout<<"\n"; i++; } } //function to randomly generate a state for hill climbing if current one gets stuck void randomstart() { int i =0; do{ k.state[i]=(rand()%k.n); i++; }while(i<k.n); } //actual hill climbing algorithm void randoom_hill_climbing() { int restarts=0; //counter to count restart points int steps=0; //counter to count hill climbing starts from random points int current_conflict=0; do //if goal state is not yet reached { randomstart(); current_conflict=cal_heuristics(k.state); if(current_conflict==0) //checking if goal state is reached k.check_solution=true; do { steps++; //incrementing step count if goal is not reached k.least_conflict=current_conflict; int i=0; while(i<k.n) { int j=0; k.current_row=k.state[i];//storing location of queen in current row while(j<k.n) { if(k.state[i]!=j) //checking if current conflicts is least than lower conflict encountered till now { k.state[i]=j; k.temp_conflicts=cal_heuristics(k.state); if(k.temp_conflicts<k.least_conflict) //if minimum conflict position is found out { k.least_conflict=k.temp_conflicts; k.least_conflict_row=j; k.least_conflict_col=i; } k.state[i]=k.current_row; //getting queen's position } j++; } i++; } //best candidate is obtained if(k.least_conflict==current_conflict) { restarts++; break; } else //update the least conflict values { k.state[k.least_conflict_col]=k.least_conflict_row; current_conflict=k.least_conflict; } if(k.least_conflict==0) //if goal is reached { k.check_solution=true; cout<<"Number of restarts: "<<restarts<<"\n"; cout<<"Count of state changes: "<<steps<<endl; cout<<"Goal state: "<<endl; displaystate(); break; } }while(current_conflict>0); }while(k.check_solution==false); } //main function to take inputs from user and calls the hill climb function int main() { cout<<"Enter number of queens\n"; cin>>k.n; k.state=new int[k.n]; //to create array of size n k.check_solution=false; randoom_hill_climbing(); delete[] k.state; return 0; }
[ "krishnasree2692@gmail.com" ]
krishnasree2692@gmail.com
74f28bbc19339ed10aac9941b70dbd0493f0fbaa
01a42b69633daf62a2eb3bb70c5b1b6e2639aa5f
/SCUM_Prisoner_Right_Foot_classes.hpp
978f94bf3eddf535b7c7ad419bc1754cd8b35261
[]
no_license
Kehczar/scum_sdk
45db80e46dac736cc7370912ed671fa77fcb95cf
8d1770b44321a9d0b277e4029551f39b11f15111
refs/heads/master
2022-07-25T10:06:20.892750
2020-05-21T11:45:36
2020-05-21T11:45:36
265,826,541
1
0
null
null
null
null
UTF-8
C++
false
false
651
hpp
#pragma once // Scum 3.79.22573 (UE 4.24) #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace Classes { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Prisoner_Right_Foot.Prisoner_Right_Foot_C // 0x0000 (0x0688 - 0x0688) class APrisoner_Right_Foot_C : public AEquipmentItem { public: static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass Prisoner_Right_Foot.Prisoner_Right_Foot_C"); return ptr; } }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "65712402+Kehczar@users.noreply.github.com" ]
65712402+Kehczar@users.noreply.github.com
16e3a84df993c4d1fef731267536ef147acbda07
226a892c1e47c029b57b30904d6ef8222fb4613d
/Main/GUIEngine/KudResourceMgr.cpp
1372afa1d2797baf6bae360e371e8e04c85de33b
[]
no_license
zifuma/GUIEngine
51ab52ac043936e1d629ee4aa21a78daf2216baa
b124e9f84d561c26280f68b770bf18b3f7d288f6
refs/heads/master
2021-05-31T11:10:44.620107
2016-04-26T11:48:29
2016-04-26T11:48:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,615
cpp
////////////////////////////////////////////////////////////////////////// /// /// Copyright (C) 2009 Kudeet. All rights reserved. /// /// This file is part of the "Kudeet SkinX" library. /// For conditions of distribution, see copyright notice in license.txt /// /// @file KudResourceMgr.cpp /// @brief Implement the resource manager class /// @version 0.1 /// @author Yiling Lai /// @date March. 2009 /// ////////////////////////////////////////////////////////////////////////// #include "BaseDefines.h" #include "KudResourceMgr.h" KDNAMESTART KDNAMEGUI KResourceMgr* KResourceMgr::m_pInstance = NULL; KResourceMgr::KResourceMgr(void) { m_BmpButton = NULL; } void KResourceMgr::Initialize() { } void KResourceMgr::Uninitialize() { SAFE_DELETE(m_pInstance); } KResourceMgr::~KResourceMgr(void) { SAFE_DELETE(m_BmpButton); } Image* KResourceMgr::GetResourceImage(UInt32 nResID) { return m_BmpButton; } void KResourceMgr::InitializeStream(Image* & pImage, UINT nID) { pImage = NULL; // Load resource into memory DWORD dwResLen = 0; BYTE* lpRsrc = 0; if (lpRsrc == NULL) { return ; } // Allocate global memory to create stream HGLOBAL hMem = GlobalAlloc(GMEM_FIXED, dwResLen); BYTE* pData = (BYTE*)GlobalLock(hMem); memcpy(pData, lpRsrc, dwResLen); IStream * pStream = NULL; CreateStreamOnHGlobal(hMem, FALSE, &pStream); pImage = Image::FromStream(pStream, FALSE); // Free/Release Stuff GlobalUnlock(hMem); GlobalFree(hMem); pStream->Release(); FreeResource(lpRsrc); } KDNAMEGUIEND KDNAMEEND
[ "kudeet@kudeet.com" ]
kudeet@kudeet.com
0352e0e052cf41074d58050ce01654970ceaf4e6
db3a2c294bf9a4fecefa48da1f7080ca80afd128
/ATOMS_2.cpp
8ee0d5cfdc9c1d656339a940e715b0f857250c61
[]
no_license
joyjitc/spoj
a5c5905c821b26f104851b018f4ef7d115537232
7bc07f43a44a97dc6c22882e17527e7fca114250
refs/heads/master
2021-07-21T03:38:24.000901
2021-07-16T07:31:39
2021-07-16T07:31:39
60,032,070
0
0
null
null
null
null
UTF-8
C++
false
false
391
cpp
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); int t; cin>>t; unsigned long long N,n,k,m,ans; while(t--){ cin>>n>>k>>m; // scanf("%llu%llu%llu",&n,&k,&m); ans = 0; if(n>=m){ cout<<"0\n"; continue; } while(1){ N=n*k; if(N<=m&&N/k==n){ ans++; n=N; } else break; } cout<<ans<<"\n"; // printf("%llu\n",ans); } }
[ "jochoudh@jochoudh-mac.dlink" ]
jochoudh@jochoudh-mac.dlink
0adee12288f176b9ab4aec6589c73c65a8092940
a96937ec8b0b7c992afbeabb7a0bbb9a8438d966
/slicer/ui_remapwidget.h
4f6146950fa657a81f27c85045cb81948b437975
[]
no_license
TheProjecter/drishtislicer
debdfd5a7166c850d39b1637dc1937812be41019
244e046559e9d560c3b35bc6373552d32b55349b
refs/heads/master
2020-12-25T18:17:59.526374
2011-03-03T00:30:17
2011-03-03T00:30:17
42,868,949
0
0
null
null
null
null
UTF-8
C++
false
false
6,092
h
/******************************************************************************** ** Form generated from reading ui file 'remapwidget.ui' ** ** Created: Mon Jun 28 10:40:15 2010 ** by: Qt User Interface Compiler version 4.5.2 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ #ifndef UI_REMAPWIDGET_H #define UI_REMAPWIDGET_H #include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QCheckBox> #include <QtGui/QFrame> #include <QtGui/QHBoxLayout> #include <QtGui/QHeaderView> #include <QtGui/QRadioButton> #include <QtGui/QSpacerItem> #include <QtGui/QVBoxLayout> #include <QtGui/QWidget> QT_BEGIN_NAMESPACE class Ui_RemapWidget { public: QVBoxLayout *vboxLayout; QHBoxLayout *hboxLayout; QCheckBox *checkBox; QWidget *colorFrame; QSpacerItem *spacerItem; QRadioButton *butZ; QRadioButton *butY; QRadioButton *butX; QFrame *histogramFrame; QHBoxLayout *hboxLayout1; QFrame *sliderFrame; QFrame *imageFrame; void setupUi(QWidget *RemapWidget) { if (RemapWidget->objectName().isEmpty()) RemapWidget->setObjectName(QString::fromUtf8("RemapWidget")); RemapWidget->resize(466, 627); vboxLayout = new QVBoxLayout(RemapWidget); vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); hboxLayout = new QHBoxLayout(); hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); checkBox = new QCheckBox(RemapWidget); checkBox->setObjectName(QString::fromUtf8("checkBox")); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(checkBox->sizePolicy().hasHeightForWidth()); checkBox->setSizePolicy(sizePolicy); checkBox->setMinimumSize(QSize(70, 30)); checkBox->setMaximumSize(QSize(100, 30)); checkBox->setFocusPolicy(Qt::ClickFocus); checkBox->setChecked(true); hboxLayout->addWidget(checkBox); colorFrame = new QWidget(RemapWidget); colorFrame->setObjectName(QString::fromUtf8("colorFrame")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(colorFrame->sizePolicy().hasHeightForWidth()); colorFrame->setSizePolicy(sizePolicy1); colorFrame->setMinimumSize(QSize(200, 50)); colorFrame->setMaximumSize(QSize(16777215, 50)); hboxLayout->addWidget(colorFrame); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); butZ = new QRadioButton(RemapWidget); butZ->setObjectName(QString::fromUtf8("butZ")); butZ->setChecked(true); hboxLayout->addWidget(butZ); butY = new QRadioButton(RemapWidget); butY->setObjectName(QString::fromUtf8("butY")); hboxLayout->addWidget(butY); butX = new QRadioButton(RemapWidget); butX->setObjectName(QString::fromUtf8("butX")); hboxLayout->addWidget(butX); vboxLayout->addLayout(hboxLayout); histogramFrame = new QFrame(RemapWidget); histogramFrame->setObjectName(QString::fromUtf8("histogramFrame")); histogramFrame->setMaximumSize(QSize(16777215, 300)); histogramFrame->setFocusPolicy(Qt::StrongFocus); histogramFrame->setFrameShape(QFrame::StyledPanel); histogramFrame->setFrameShadow(QFrame::Plain); histogramFrame->setLineWidth(2); histogramFrame->setMidLineWidth(0); vboxLayout->addWidget(histogramFrame); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); sliderFrame = new QFrame(RemapWidget); sliderFrame->setObjectName(QString::fromUtf8("sliderFrame")); QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(sliderFrame->sizePolicy().hasHeightForWidth()); sliderFrame->setSizePolicy(sizePolicy2); sliderFrame->setMinimumSize(QSize(100, 16)); sliderFrame->setMaximumSize(QSize(160, 16777215)); sliderFrame->setFrameShape(QFrame::StyledPanel); sliderFrame->setFrameShadow(QFrame::Plain); hboxLayout1->addWidget(sliderFrame); imageFrame = new QFrame(RemapWidget); imageFrame->setObjectName(QString::fromUtf8("imageFrame")); imageFrame->setFocusPolicy(Qt::StrongFocus); imageFrame->setFrameShape(QFrame::StyledPanel); imageFrame->setFrameShadow(QFrame::Plain); imageFrame->setLineWidth(21); hboxLayout1->addWidget(imageFrame); vboxLayout->addLayout(hboxLayout1); retranslateUi(RemapWidget); QObject::connect(checkBox, SIGNAL(toggled(bool)), histogramFrame, SLOT(setVisible(bool))); QMetaObject::connectSlotsByName(RemapWidget); } // setupUi void retranslateUi(QWidget *RemapWidget) { RemapWidget->setWindowTitle(QApplication::translate("RemapWidget", "Remap Raw Volume", 0, QApplication::UnicodeUTF8)); checkBox->setText(QApplication::translate("RemapWidget", "Histogram", 0, QApplication::UnicodeUTF8)); butZ->setText(QApplication::translate("RemapWidget", "Z", 0, QApplication::UnicodeUTF8)); butY->setText(QApplication::translate("RemapWidget", "Y", 0, QApplication::UnicodeUTF8)); butX->setText(QApplication::translate("RemapWidget", "X", 0, QApplication::UnicodeUTF8)); Q_UNUSED(RemapWidget); } // retranslateUi }; namespace Ui { class RemapWidget: public Ui_RemapWidget {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_REMAPWIDGET_H
[ "rph900@localhost.localdomain" ]
rph900@localhost.localdomain
ca155dfa4458b8b89a423a77eacee8301bbb2258
6b7487a2f9b8bd58b0553e001e7a378c7484d384
/test/util/IdTestHelpers.h
7223b183d97abeb739964fd329032b4b72187c0e
[ "Apache-2.0" ]
permissive
joka921/QLever
7b41039f64690349bc6412a5acb9cb4a5f2c9026
c9b1958a13f41736d43b14da5c74abfbff4e968e
refs/heads/master
2023-08-31T21:30:15.049684
2023-03-16T18:30:07
2023-03-16T18:30:07
127,433,123
0
1
null
2018-03-30T13:47:32
2018-03-30T13:47:32
null
UTF-8
C++
false
false
836
h
// Copyright 2023, University of Freiburg, // // Chair of Algorithms and Data Structures. // Author: Johannes Kalmbach <kalmbach@cs.uni-freiburg.de> #pragma once #include "global/Id.h" // Lambdas to simply create an `Id` with a given value and type during unit // tests. namespace ad_utility::testing { inline auto IntId = [](const auto& i) { return Id::makeFromInt(i); }; inline auto DoubleId = [](const auto& d) { return Id::makeFromDouble(d); }; inline auto VocabId = [](const auto& v) { return Id::makeFromVocabIndex(VocabIndex::make(v)); }; inline auto LocalVocabId = [](const auto& v) { return Id::makeFromLocalVocabIndex(LocalVocabIndex::make(v)); }; inline auto TextRecordId = [](const auto& t) { return Id::makeFromTextRecordIndex(TextRecordIndex ::make(t)); }; } // namespace ad_utility::testing
[ "noreply@github.com" ]
noreply@github.com
01e3ff8b7070a0f0bb4f04241768788d87272c6b
ac8ffabf4d7339c5466e53dafc3f7e87697f08eb
/solutions/495_teemo_attacking.cpp
eb49eb7208db0907f121ed8f56fe818ba825bfd1
[]
no_license
h4hany/leetcode
4cbf23ea7c5b5ecfd26aef61bfc109741f881591
9e4f6f1a2830bd9aab1bba374c98f0464825d435
refs/heads/master
2023-01-09T17:39:06.212421
2020-11-12T07:26:39
2020-11-12T07:26:39
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,072
cpp
#include "aux.cpp" /** In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poisoning time duration per Teemo's attacking, you need to output the total time that Ashe is in poisoned condition. You may assume that Teemo attacks at the very beginning of a specific time point, and makes Ashe be in poisoned condition immediately. Example 1: Input: [1,4], 2 Output: 4 Explanation: At time point 1, Teemo starts attacking Ashe and makes Ashe be poisoned immediately. This poisoned status will last 2 seconds until the end of time point 2. And at time point 4, Teemo attacks Ashe again, and causes Ashe to be in poisoned status for another 2 seconds. So you finally need to output 4. Example 2: Input: [1,2], 2 Output: 3 Explanation: At time point 1, Teemo starts attacking Ashe and makes Ashe be poisoned. This poisoned status will last 2 seconds until the end of time point 2. However, at the beginning of time point 2, Teemo attacks Ashe again who is already in poisoned status. Since the poisoned status won't add up together, though the second poisoning attack will still work at time point 2, it will stop at the end of time point 3. So you finally need to output 3. Note: You may assume the length of given time series array won't exceed 10000. You may assume the numbers in the Teemo's attacking time series and his poisoning time duration per attacking are non-negative integers, which won't exceed 10,000,000. https://leetcode.com/problems/teemo-attacking/description/ **/ class Solution { public: int findPoisonedDuration(vector<int> &timeSeries, int duration) { if (timeSeries.size() <= 1) return duration * timeSeries.size(); int res = 0; for (int i = 0; i < timeSeries.size() - 1; i++) res += min(duration, timeSeries[i + 1] - timeSeries[i]); return res + duration; } }; static const int _ = []() { ios::sync_with_stdio(false); cin.tie(NULL); return 0; }(); int main() { Solution s; }
[ "liugaoang@gmail.com" ]
liugaoang@gmail.com
183d7d0496daeb523f5e2da506570f576eb92562
8044ffbf432ba844a16eff60b122a9346bd2f12e
/source/native-plugins/zynaddsubfx/Effects/Alienwah.h
06a18d62c57993f66835f149e8cb3bd5a6ff403a
[]
no_license
DanielAeolusLaude/Carla
0c1fbfa9ccaecfaef58157be0a7cf0ee21f80b54
71b9d0cbc497506d1b91f42799e0d233e5f883a4
refs/heads/master
2021-01-16T20:06:22.694983
2015-09-18T09:58:27
2015-09-18T09:58:27
42,896,375
2
0
null
2015-09-21T22:07:31
2015-09-21T22:07:31
null
UTF-8
C++
false
false
2,032
h
/* ZynAddSubFX - a software synthesizer Alienwah.h - "AlienWah" effect Copyright (C) 2002-2005 Nasca Octavian Paul Author: Nasca Octavian Paul This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License (version 2 or later) for more details. You should have received a copy of the GNU General Public License (version 2) along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef ALIENWAH_H #define ALIENWAH_H #include "Effect.h" #include "EffectLFO.h" #include <complex> #define MAX_ALIENWAH_DELAY 100 /**"AlienWah" Effect*/ class Alienwah:public Effect { public: Alienwah(EffectParams pars); ~Alienwah(); void out(const Stereo<float *> &smp); void setpreset(unsigned char npreset); void changepar(int npar, unsigned char value); unsigned char getpar(int npar) const; void cleanup(void); private: //Alienwah Parameters EffectLFO lfo; //lfo-ul Alienwah unsigned char Pvolume; unsigned char Pdepth; //the depth of the Alienwah unsigned char Pfb; //feedback unsigned char Pdelay; unsigned char Pphase; //Control Parameters void setvolume(unsigned char _Pvolume); void setdepth(unsigned char _Pdepth); void setfb(unsigned char _Pfb); void setdelay(unsigned char _Pdelay); void setphase(unsigned char _Pphase); //Internal Values float fb, depth, phase; std::complex<float> *oldl, *oldr; std::complex<float> oldclfol, oldclfor; int oldk; }; #endif
[ "falktx@gmail.com" ]
falktx@gmail.com
c8f0e4d5d193271e254f8538384d23966a9bcc7b
b28305dab0be0e03765c62b97bcd7f49a4f8073d
/chrome/chrome_cleaner/ipc/sandbox.cc
6ebd58744bda257dc6e6c8291b35049997d43943
[ "BSD-3-Clause" ]
permissive
svarvel/browser-android-tabs
9e5e27e0a6e302a12fe784ca06123e5ce090ced5
bd198b4c7a1aca2f3e91f33005d881f42a8d0c3f
refs/heads/base-72.0.3626.105
2020-04-24T12:16:31.442851
2019-08-02T19:15:36
2019-08-02T19:15:36
171,950,555
1
2
NOASSERTION
2019-08-02T19:15:37
2019-02-21T21:47:44
null
UTF-8
C++
false
false
16,546
cc
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/chrome_cleaner/ipc/sandbox.h" #include <windows.h> #include <iterator> #include <memory> #include <utility> #include <vector> #include "base/base_switches.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback_helpers.h" #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/strings/string_number_conversions.h" #include "base/synchronization/waitable_event.h" #include "base/time/time.h" #include "base/win/win_util.h" #include "chrome/chrome_cleaner/constants/chrome_cleaner_switches.h" #include "chrome/chrome_cleaner/crash/crash_reporter.h" #include "chrome/chrome_cleaner/os/disk_util.h" #include "chrome/chrome_cleaner/os/inheritable_event.h" #include "chrome/chrome_cleaner/os/initializer.h" #include "chrome/chrome_cleaner/os/pre_fetched_paths.h" #include "chrome/chrome_cleaner/settings/settings.h" #include "components/chrome_cleaner/public/constants/constants.h" #include "sandbox/win/src/sandbox_factory.h" #include "sandbox/win/src/sandbox_types.h" #include "sandbox/win/src/security_level.h" #include "sandbox/win/src/target_services.h" namespace chrome_cleaner { const wchar_t kSandboxLogFileSuffix[] = L"-sandbox"; namespace { // Switches to propagate to the sandbox target process. const char* kSwitchesToPropagate[] = { kEnableCrashReportingSwitch, kExecutionModeSwitch, kExtendedSafeBrowsingEnabledSwitch, switches::kTestChildProcess, }; std::map<SandboxType, base::Process>* g_target_processes = nullptr; // Leaked. scoped_refptr<sandbox::TargetPolicy> GetSandboxPolicy( sandbox::BrokerServices* sandbox_broker_services) { scoped_refptr<sandbox::TargetPolicy> policy( sandbox_broker_services->CreatePolicy()); sandbox::ResultCode sandbox_result = policy->SetTokenLevel( sandbox::USER_RESTRICTED_SAME_ACCESS, sandbox::USER_LOCKDOWN); CHECK_EQ(sandbox::SBOX_ALL_OK, sandbox_result); sandbox_result = policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0); CHECK_EQ(sandbox::SBOX_ALL_OK, sandbox_result); #ifdef NDEBUG // Chromium ignores failures on this function but logs a warning. Do the same // here. // https://chromium.googlesource.com/chromium/src/+/b6a4ff86c730756a73d63cc882ef818fb7818a53/content/common/sandbox_win.cc#420 // TODO(crbug.com/893740): SetAlternateDesktop can cause DCHECK's in unit // tests if called more than once. Until we get to the bottom of why, it's // only enabled in release builds. sandbox::ResultCode result = policy->SetAlternateDesktop(true); LOG_IF(WARNING, result != sandbox::SBOX_ALL_OK) << "Failed to apply desktop security"; #endif sandbox_result = policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_UNTRUSTED); CHECK_EQ(sandbox::SBOX_ALL_OK, sandbox_result); // This is all the mitigations from security_level.h, except those that need // to be enabled later (set in SetDelayedProcessMitigations below). sandbox_result = policy->SetProcessMitigations( sandbox::MITIGATION_DEP | sandbox::MITIGATION_DEP_NO_ATL_THUNK | sandbox::MITIGATION_SEHOP | sandbox::MITIGATION_HEAP_TERMINATE | sandbox::MITIGATION_BOTTOM_UP_ASLR | sandbox::MITIGATION_HIGH_ENTROPY_ASLR | sandbox::MITIGATION_WIN32K_DISABLE | sandbox::MITIGATION_EXTENSION_POINT_DISABLE | sandbox::MITIGATION_NONSYSTEM_FONT_DISABLE | sandbox::MITIGATION_HARDEN_TOKEN_IL_POLICY | sandbox::MITIGATION_IMAGE_LOAD_NO_REMOTE | sandbox::MITIGATION_IMAGE_LOAD_NO_LOW_LABEL); CHECK_EQ(sandbox::SBOX_ALL_OK, sandbox_result); // RELOCATE_IMAGE and RELOCATE_IMAGE_REQUIRED could be in // SetProcessMitigations above, but they need to be delayed in Debug builds. // It's easier to just set them up as delayed for both Debug and Release // builds. sandbox_result = policy->SetDelayedProcessMitigations( sandbox::MITIGATION_RELOCATE_IMAGE | sandbox::MITIGATION_RELOCATE_IMAGE_REQUIRED | sandbox::MITIGATION_STRICT_HANDLE_CHECKS | sandbox::MITIGATION_DLL_SEARCH_ORDER); CHECK_EQ(sandbox::SBOX_ALL_OK, sandbox_result); // This rule is needed to allow user32.dll and gdi32.dll to initialize during // load, while still blocking other WIN32K calls. sandbox_result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_WIN32K_LOCKDOWN, sandbox::TargetPolicy::FAKE_USER_GDI_INIT, nullptr); CHECK_EQ(sandbox::SBOX_ALL_OK, sandbox_result); #if !defined(CHROME_CLEANER_OFFICIAL_BUILD) base::FilePath product_path; GetAppDataProductDirectory(&product_path); if (!product_path.value().empty()) { // In developer builds, let the sandbox target process write logs to the // product directory. sandbox_result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, sandbox::TargetPolicy::FILES_ALLOW_ANY, product_path.Append(L"*").value().c_str()); LOG_IF(ERROR, sandbox_result != sandbox::SBOX_ALL_OK) << "Failed to give the target process access to the product directory"; } // Also let it write to stdout and stderr. (If they point to the Windows // console, these calls will silently fail. But this will let output from the // child be captured on the bots or in the msys terminal.) policy->SetStdoutHandle(::GetStdHandle(STD_OUTPUT_HANDLE)); policy->SetStderrHandle(::GetStdHandle(STD_ERROR_HANDLE)); #endif // CHROME_CLEANER_OFFICIAL_BUILD policy->SetLockdownDefaultDacl(); // Do not include SetDisconnectCsrss because the signature validator uses // wincrypt, which uses a garbage-collected connection to csrss.exe that may // not be cleaned up yet when we call LowerToken. return policy; } } // namespace SandboxSetupHooks::SandboxSetupHooks() = default; SandboxSetupHooks::~SandboxSetupHooks() = default; ResultCode SandboxSetupHooks::UpdateSandboxPolicy( sandbox::TargetPolicy* policy, base::CommandLine* command_line) { return RESULT_CODE_SUCCESS; } ResultCode SandboxSetupHooks::TargetSpawned( const base::Process& target_process, const base::win::ScopedHandle& target_thread) { return RESULT_CODE_SUCCESS; } ResultCode SandboxSetupHooks::TargetResumed() { return RESULT_CODE_SUCCESS; } void SandboxSetupHooks::SetupFailed() {} SandboxTargetHooks::SandboxTargetHooks() = default; SandboxTargetHooks::~SandboxTargetHooks() = default; ResultCode SandboxTargetHooks::TargetStartedWithHighPrivileges() { return RESULT_CODE_SUCCESS; } SandboxType SandboxProcessType() { // This should only be called by children processes. DCHECK(sandbox::SandboxFactory::GetTargetServices() != nullptr); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); int val = -1; const bool success = base::StringToInt( command_line->GetSwitchValueASCII(kSandboxedProcessIdSwitch), &val); SandboxType sandbox_type = SandboxType::kNonSandboxed; if (success) { sandbox_type = static_cast<SandboxType>(val); DCHECK_GT(sandbox_type, SandboxType::kNonSandboxed); DCHECK_LT(sandbox_type, SandboxType::kNumValues); } return sandbox_type; } ResultCode SpawnSandbox(SandboxSetupHooks* setup_hooks, SandboxType type) { base::CommandLine sandbox_command_line( PreFetchedPaths::GetInstance()->GetExecutablePath()); // Propagate the relevant switches from the current process to // |sandbox_command_line|. base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); for (const char* switch_name : kSwitchesToPropagate) { if (command_line->HasSwitch(switch_name)) { sandbox_command_line.AppendSwitchNative( switch_name, command_line->GetSwitchValueNative(switch_name)); } } sandbox_command_line.AppendSwitchNative(kUseCrashHandlerWithIdSwitch, GetCrashReporterIPCPipeName()); sandbox_command_line.AppendSwitchASCII( kSandboxedProcessIdSwitch, base::IntToString(static_cast<int>(type))); return StartSandboxTarget(sandbox_command_line, setup_hooks, type); } ResultCode StartSandboxTarget(const base::CommandLine& sandbox_command_line, SandboxSetupHooks* hooks, SandboxType type) { if (!g_target_processes) g_target_processes = new std::map<SandboxType, base::Process>(); // |StartSandboxTarget| gets called multiple times in tests. if (g_target_processes->erase(type)) DCHECK_EQ(SandboxType::kTest, type); base::ScopedClosureRunner notify_hooks_on_failure(base::DoNothing::Once()); if (hooks) { // Unretained is safe because |hooks| lives for the entire enclosing scope. notify_hooks_on_failure.ReplaceClosure(base::BindOnce( &SandboxSetupHooks::SetupFailed, base::Unretained(hooks))); } sandbox::BrokerServices* sandbox_broker_services = sandbox::SandboxFactory::GetBrokerServices(); CHECK(sandbox_broker_services); // Make init_result static so broker services will only be initialized once. // Otherwise, it could be initialized multiple times during tests. static const sandbox::ResultCode init_result = sandbox_broker_services->Init(); if (init_result != sandbox::SBOX_ALL_OK) { LOG(FATAL) << "Failed to initialize sandbox BrokerServices: " << init_result; return RESULT_CODE_FAILED_TO_START_SANDBOX_PROCESS; } scoped_refptr<sandbox::TargetPolicy> policy = GetSandboxPolicy(sandbox_broker_services); base::CommandLine command_line = sandbox_command_line; // Create an event so the sandboxed process can notify the broker when it // has finished it's setup. This is useful because if the sandboxed process // fails its setup, we can return the exit code to help debug the issue. std::unique_ptr<base::WaitableEvent> init_done_event = chrome_cleaner::CreateInheritableEvent( base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED); command_line.AppendSwitchNative( chrome_cleaner::kInitDoneNotifierSwitch, base::UintToString16( base::win::HandleToUint32(init_done_event->handle()))); policy->AddHandleToShare(init_done_event->handle()); if (hooks) { ResultCode result_code = hooks->UpdateSandboxPolicy(policy.get(), &command_line); if (result_code != RESULT_CODE_SUCCESS) return result_code; } // Spawn the sandbox target process. PROCESS_INFORMATION temp_process_info = {0}; DWORD last_win_error = 0; sandbox::ResultCode last_result_code = sandbox::SBOX_ALL_OK; LOG(INFO) << "Starting sandbox process with command line arguments: " << command_line.GetArgumentsString(); sandbox::ResultCode sandbox_result = sandbox_broker_services->SpawnTarget( command_line.GetProgram().value().c_str(), command_line.GetCommandLineString().c_str(), policy.get(), &last_result_code, &last_win_error, &temp_process_info); if (sandbox_result != sandbox::SBOX_ALL_OK) { LOG(DFATAL) << "Failed to spawn sandbox target: " << sandbox_result << " , last sandbox result : " << last_result_code << " , last windows error: " << last_win_error; return RESULT_CODE_FAILED_TO_START_SANDBOX_PROCESS; } base::Process process_handle = base::Process(temp_process_info.hProcess); base::win::ScopedHandle thread_handle = base::win::ScopedHandle(temp_process_info.hThread); // Because objects on the stack on destroyed in reverse order of allocation, // an early return from |StartSandboxTarget| will first call // process_handle.Terminate() and then close process_handle. base::ScopedClosureRunner terminate_process_on_failure( base::BindOnce(base::IgnoreResult(&base::Process::Terminate), base::Unretained(&process_handle), -1, true)); if (hooks) { ResultCode result_code = hooks->TargetSpawned(process_handle, thread_handle); if (result_code != RESULT_CODE_SUCCESS) return result_code; } // The target is spawned paused, so resume it. if (::ResumeThread(thread_handle.Get()) == static_cast<DWORD>(-1)) { PLOG(ERROR) << "Failed to resume thread"; return RESULT_CODE_FAILED_TO_START_SANDBOX_PROCESS; } // Wait for the sandboxed process to signal it is ready, or for the process // to exit, indicating a failure. std::vector<HANDLE> wait_handles{init_done_event->handle(), process_handle.Handle()}; DWORD wait_result = ::WaitForMultipleObjects( wait_handles.size(), wait_handles.data(), /*bWaitAll=*/false, INFINITE); // WAIT_OBJECT_0 is the first handle in the vector, so if we got any other // result it is a failure. if (wait_result != WAIT_OBJECT_0) { if (wait_result == WAIT_OBJECT_0 + 1) { DWORD exit_code = -1; BOOL result = ::GetExitCodeProcess(process_handle.Handle(), &exit_code); DCHECK(result); LOG(ERROR) << "Sandboxed process exited before signaling it was initialized, " "exit code: " << exit_code; } else { PLOG(ERROR) << "::WaitForMultipleObjects returned an unexpected error, " << wait_result; } return RESULT_CODE_FAILED_TO_START_SANDBOX_PROCESS; } if (hooks) { ResultCode result_code = hooks->TargetResumed(); if (result_code != RESULT_CODE_SUCCESS) return result_code; } // Now that the target process has been started successfully, don't call the // failure closures. Instead transfer ownership of |process_handle| to a // global that will be cleaned up by the OS on exit, so that it can be polled // in |IsSandboxTargetRunning|. g_target_processes->emplace(type, base::Process(std::move(process_handle))); terminate_process_on_failure.ReplaceClosure(base::DoNothing::Once()); notify_hooks_on_failure.ReplaceClosure(base::DoNothing::Once()); return RESULT_CODE_SUCCESS; } bool IsSandboxTargetRunning(SandboxType type) { if (!g_target_processes) return false; auto type_process_iter = g_target_processes->find(type); if (type_process_iter == g_target_processes->end()) return false; int exit_code = 0; if (!type_process_iter->second.WaitForExitWithTimeout(base::TimeDelta(), &exit_code)) { LOG(ERROR) << "WaitForExitWithTimeout failed"; return false; } return (exit_code == STILL_ACTIVE); } std::map<SandboxType, SystemResourceUsage> GetSandboxSystemResourceUsage() { std::map<SandboxType, SystemResourceUsage> result; if (g_target_processes) { for (const auto& type_process : *g_target_processes) { SystemResourceUsage stats; if (GetSystemResourceUsage(type_process.second.Handle(), &stats)) result[type_process.first] = stats; } } return result; } ResultCode RunSandboxTarget(const base::CommandLine& command_line, sandbox::TargetServices* sandbox_target_services, SandboxTargetHooks* hooks) { CHECK(sandbox_target_services); sandbox::ResultCode sandbox_result = sandbox_target_services->Init(); if (sandbox_result != sandbox::SBOX_ALL_OK) { LOG(ERROR) << "Failed to initialize sandbox TargetServices: " << sandbox_result; return RESULT_CODE_FAILED; } DCHECK(hooks); ResultCode result_code = hooks->TargetStartedWithHighPrivileges(); if (result_code != RESULT_CODE_SUCCESS) return result_code; sandbox_target_services->LowerToken(); NotifyInitializationDone(); return hooks->TargetDroppedPrivileges(command_line); } ResultCode GetResultCodeForSandboxConnectionError(SandboxType sandbox_type) { ResultCode result_code = RESULT_CODE_INVALID; switch (sandbox_type) { case SandboxType::kEset: result_code = RESULT_CODE_ESET_SANDBOX_DISCONNECTED_TOO_SOON; break; case SandboxType::kParser: // TODO(joenotcharles): This needs to be renamed to // RESULT_CODE_PARSER_SANDBOX_DISCONNECTED_TOO_SOON. result_code = RESULT_CODE_PARSER_SANDBOX_DISCONNECTED_TOO_SOON; break; case SandboxType::kZipArchiver: result_code = RESULT_CODE_ZIP_ARCHIVER_SANDBOX_DISCONNECTED_TOO_SOON; break; default: NOTREACHED() << "No result code for unknown sandbox type " << static_cast<int>(sandbox_type); } return result_code; } } // namespace chrome_cleaner
[ "artem@brave.com" ]
artem@brave.com
8eaa7eaa7ccc30709fe43ce6d836b291b1bc241d
5e1f5f2090013041b13d1e280f747aa9f914caa4
/src/ui/scenic/lib/gfx/tests/gfx_viewstate_apptest.cc
a924be8285f331beebafcc5dce62582dd7b77f94
[ "BSD-2-Clause" ]
permissive
mvanotti/fuchsia-mirror
477b7d51ae6818e456d5803eea68df35d0d0af88
7fb60ae374573299dcb1cc73f950b4f5f981f95c
refs/heads/main
2022-11-29T08:52:01.817638
2021-10-06T05:37:42
2021-10-06T05:37:42
224,297,435
0
1
BSD-2-Clause
2022-11-21T01:19:37
2019-11-26T22:28:11
C++
UTF-8
C++
false
false
11,299
cc
// Copyright 2019 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/sys/cpp/fidl.h> #include <fuchsia/ui/app/cpp/fidl.h> #include <fuchsia/ui/gfx/cpp/fidl.h> #include <fuchsia/ui/policy/cpp/fidl.h> #include <fuchsia/ui/scenic/cpp/fidl.h> #include <fuchsia/ui/views/cpp/fidl.h> #include <lib/sys/cpp/testing/test_with_environment_fixture.h> #include <lib/syslog/cpp/macros.h> #include <lib/ui/scenic/cpp/session.h> #include <lib/ui/scenic/cpp/view_ref_pair.h> #include <lib/ui/scenic/cpp/view_token_pair.h> #include <zircon/status.h> #include <gtest/gtest.h> #include "src/lib/ui/base_view/base_view.h" #include "src/lib/ui/base_view/embedded_view_utils.h" #include "src/ui/scenic/lib/gfx/tests/pixel_test.h" #include "src/ui/scenic/lib/gfx/tests/vk_session_test.h" #include "src/ui/testing/views/embedder_view.h" namespace { const int64_t kTestTimeout = 90; // Test fixture that sets up an environment suitable for Scenic pixel tests // and provides related utilities. The environment includes Scenic and // RootPresenter, and their dependencies. class ViewEmbedderTest : public gfx::PixelTest { public: ViewEmbedderTest() : gfx::PixelTest("ViewEmbedderTest") {} }; TEST_F(ViewEmbedderTest, BouncingBall) { auto info = scenic::LaunchComponentAndCreateView( environment_->launcher_ptr(), "fuchsia-pkg://fuchsia.com/bouncing_ball#meta/bouncing_ball.cmx", {}); scenic::EmbedderView embedder_view(CreatePresentationContext()); bool view_state_changed_observed = false; embedder_view.EmbedView(std::move(info), [&view_state_changed_observed](auto) { view_state_changed_observed = true; }); EXPECT_TRUE(RunLoopWithTimeoutOrUntil( [&view_state_changed_observed] { return view_state_changed_observed; }, zx::sec(kTestTimeout))); } TEST_F(ViewEmbedderTest, ProtectedVkcube) { // vkcube-on-scenic does not produce protected content if platform does not allow. Check if // protected memory is available beforehand to skip these cases. { if (!scenic_impl::gfx::test::VkSessionTest::CreateVulkanDeviceQueues( /*use_protected_memory=*/true)) { GTEST_SKIP(); } } auto info = scenic::LaunchComponentAndCreateView( environment_->launcher_ptr(), "fuchsia-pkg://fuchsia.com/vkcube-on-scenic#meta/vkcube-on-scenic.cmx", {"--protected_output"}); scenic::EmbedderView embedder_view(CreatePresentationContext()); bool view_state_changed_observed = false; embedder_view.EmbedView(std::move(info), [&view_state_changed_observed](auto) { view_state_changed_observed = true; }); EXPECT_TRUE(RunLoopWithTimeoutOrUntil( [&view_state_changed_observed] { return view_state_changed_observed; }, zx::sec(kTestTimeout))); } // Initialize two sessions and their associated views, and ensure that killing the embedded // session triggers a ViewDisconnected event to the holding one. TEST_F(ViewEmbedderTest, DeadBindingShouldKillSession) { // Initialize session 1. auto test_session = SetUpTestSession(); scenic::Session* const session = &test_session->session; const auto [display_width, display_height] = test_session->display_dimensions; scenic::Scene* const scene = &test_session->scene; test_session->SetUpCamera().SetProjection(0); // Initialize session 2. auto unique_session2 = std::make_unique<scenic::Session>(scenic()); auto session2 = unique_session2.get(); session2->set_error_handler([this](zx_status_t status) { FX_LOGS(INFO) << "Session2 terminated."; QuitLoop(); }); auto [view_token, view_holder_token] = scenic::ViewTokenPair::New(); auto [view_token2, view_holder_token2] = scenic::ViewTokenPair::New(); scenic::View view(session, std::move(view_token), "ClipView"); scenic::ViewHolder view_holder(session, std::move(view_holder_token), "ClipViewHolder"); // View 2 is embedded by view 1. scenic::View view2(session2, std::move(view_token2), "ClipView2"); scenic::ViewHolder view_holder2(session, std::move(view_holder_token2), "ClipViewHolder2"); scene->AddChild(view_holder); // Transform and embed view holder 2 in first view. scenic::EntityNode transform_node(session); transform_node.SetTranslation(display_width / 2, 0, 0); view.AddChild(transform_node); transform_node.AddChild(view_holder2); // Ensure that view2 connects to view1. bool view_connected_observed = false; bool view2_connected_observed = false; session->set_event_handler([&](std::vector<fuchsia::ui::scenic::Event> events) { for (const auto& event : events) { if (event.Which() == fuchsia::ui::scenic::Event::Tag::kGfx && event.gfx().Which() == fuchsia::ui::gfx::Event::Tag::kViewConnected) { if (view_holder.id() == event.gfx().view_connected().view_holder_id) { view_connected_observed = true; } else if (view_holder2.id() == event.gfx().view_connected().view_holder_id) { view2_connected_observed = true; } return; } } }); Present(session); Present(session2); EXPECT_TRUE(RunLoopWithTimeoutOrUntil( [&]() { return view_connected_observed && view2_connected_observed; })); // Crash Session2 by submitting an invalid release resource command. session2->AllocResourceId(); session2->ReleaseResource(session2->next_resource_id() + 1); bool view_disconnected_observed = false; session->set_event_handler( [&view_disconnected_observed](std::vector<fuchsia::ui::scenic::Event> events) { for (const auto& event : events) { if (event.Which() == fuchsia::ui::scenic::Event::Tag::kGfx && event.gfx().Which() == fuchsia::ui::gfx::Event::Tag::kViewDisconnected) { view_disconnected_observed = true; return; } } ASSERT_FALSE(true); }); // Observe results. Present(session2); Present(session); EXPECT_TRUE(RunLoopWithTimeoutOrUntil( [&view_disconnected_observed]() { return view_disconnected_observed; })); } // Test fixture that sets up an environment suitable for Scenic pixel tests // and provides related utilities. The environment includes Scenic and // RootPresenter, and their dependencies. class AnnotationViewTest : public gfx::PixelTest { public: AnnotationViewTest() : gfx::PixelTest("AnnotationViewTest") {} }; // When annotation View and annotation ViewHolder are created within the same // frame (i.e. the same SessionUpdate() call), we need to ensure that they are // created in the correct order. // // ViewTree update of annotation ViewHolder should be created earlier before // annotation View, since the update of latter one refers to the ViewHolder // in ViewTree. Otherwise it will trigger a DCHECK() within ViewTree and lead // to a bad tree state. TEST_F(AnnotationViewTest, AnnotationViewAndViewHolderInSingleFrame) { auto test_session = SetUpTestSession(); scenic::Session* const session = &test_session->session; const auto [display_width, display_height] = test_session->display_dimensions; // Initialize second session auto unique_session_view = std::make_unique<scenic::Session>(scenic()); auto unique_session_annotation = std::make_unique<scenic::Session>(scenic()); auto session_view = unique_session_view.get(); auto session_annotation = unique_session_annotation.get(); session_view->set_error_handler([this](zx_status_t status) { FX_LOGS(ERROR) << "Session terminated."; FAIL(); QuitLoop(); }); session_annotation->set_error_handler([this](zx_status_t status) { FX_LOGS(ERROR) << "Annotation Session terminated."; FAIL(); QuitLoop(); }); test_session->SetUpCamera().SetProjection(0); scenic::EntityNode entity_node(session); entity_node.SetTranslation(0, 0, 0); test_session->scene.AddChild(entity_node); // Create two sets of view/view-holder token pairs. auto [view_token, view_holder_token] = scenic::ViewTokenPair::New(); auto [view_control_ref, view_ref] = scenic::ViewRefPair::New(); auto [view_token_annotation, view_holder_token_annotation] = scenic::ViewTokenPair::New(); fuchsia::ui::views::ViewRef view_ref_create; view_ref.Clone(&view_ref_create); scenic::View view(session_view, std::move(view_token), std::move(view_control_ref), std::move(view_ref_create), "View"); scenic::View view_annotation(session_annotation, std::move(view_token_annotation), "View Annotation"); scenic::ViewHolder view_holder(session, std::move(view_holder_token), "ViewHolder"); // Bounds of each view should be the size of a quarter of the display with // origin at 0,0 relative to its transform node. const std::array<float, 3> bmin = {0.f, 0.f, -2.f}; const std::array<float, 3> bmax = {display_width, display_height / 2, 1.f}; const std::array<float, 3> imin = {0, 0, 0}; const std::array<float, 3> imax = {0, 0, 0}; view_holder.SetViewProperties(bmin, bmax, imin, imax); view_holder.SetTranslation(0, display_height / 2, 0); // Pane extends across the entire right-side of the display, even though // its containing view is only in the top-right corner. int32_t pane_width = display_width; int32_t pane_height = display_height / 2; scenic::Rectangle pane_shape2(session_view, pane_width / 2, pane_height); scenic::Rectangle pane_shape_annotation(session_annotation, pane_width / 2, pane_height); // Create pane materials. scenic::Material pane_material_view(session_view); scenic::Material pane_material_annotation(session_annotation); pane_material_view.SetColor(0, 0, 255, 255); // Blue pane_material_annotation.SetColor(0, 255, 0, 255); // Green scenic::ShapeNode pane_node(session_view); pane_node.SetShape(pane_shape2); pane_node.SetMaterial(pane_material_view); pane_node.SetTranslation(pane_width / 4, pane_height / 2, 0); scenic::ShapeNode pane_node_annotation(session_annotation); pane_node_annotation.SetShape(pane_shape_annotation); pane_node_annotation.SetMaterial(pane_material_annotation); pane_node_annotation.SetTranslation(pane_width * 3 / 4, pane_height / 2, 0); // Add view holders to the transform. entity_node.AddChild(view_holder); view.AddChild(pane_node); view_annotation.AddChild(pane_node_annotation); Present(session); Present(session_view); RunLoopWithTimeout(zx::msec(100)); // In this way we'll trigger the annotation ViewHolder creation and // annotation View creation in the same UpdateSessions() call and we // should ensure that there is no error nor any gfx crash. bool view_holder_annotation_created = false; fuchsia::ui::views::ViewRef view_ref_annotation; view_ref.Clone(&view_ref_annotation); annotation_registry()->CreateAnnotationViewHolder( std::move(view_ref_annotation), std::move(view_holder_token_annotation), [&view_holder_annotation_created]() { view_holder_annotation_created = true; }); EXPECT_FALSE(view_holder_annotation_created); session_view->Present(zx::time(0), [this](auto) { QuitLoop(); }); session_annotation->Present(zx::time(0), [this](auto) { QuitLoop(); }); RunLoopWithTimeout(zx::msec(100)); EXPECT_TRUE(view_holder_annotation_created); } } // namespace
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
a04f3c2b9ce1f5b30509c99c09c659e07611e051
7adc0b44a76665a4828e64f175286e4bcebadb10
/Algo 2 term/2_sem_laba_1_10(J)/2_sem_laba_1_10(J)/Source.cpp
67206de6e222773de475006ae677ac548ee695ac
[]
no_license
niki999922/Algo-DM-laba
6d851ea8c41232074d606ea63fa83a10acf99f01
3568a4c106168149d6732ed4888547bbd681e0ae
refs/heads/master
2021-04-09T14:40:49.349691
2020-03-06T17:18:17
2020-03-06T17:18:17
125,762,355
1
2
null
2020-10-13T20:08:07
2018-03-18T19:56:43
C++
UTF-8
C++
false
false
2,993
cpp
#include <iostream> #include <algorithm> #include <string> using namespace std; int n, m, tmp1, tmp2, tmp3; string str; int netr_max = INT32_MAX; class Wall { public: int value = 0; bool flag = false; }; class WeakWall { public: int minimal_hight, index; WeakWall() { this->minimal_hight = netr_max; this->index = -100; } WeakWall(int mini, int index) { this->minimal_hight = mini; this->index = index; } }; WeakWall netr; class Tree { public: int begin, end; Tree *left_child = nullptr; Tree *right_child = nullptr; Wall wall; Tree(int begin, int end) { this->begin = begin; this->end = end; build(); } int build() { if (end - begin > 1) { int mid = (begin + end) / 2; left_child = new Tree(begin, mid); right_child = new Tree(mid, end); wall.value = min(left_child->wall.value, right_child->wall.value); } return wall.value; } void propagate() { if (wall.flag == true) { left_child->wall.flag = true; right_child->wall.flag = true; left_child->wall.value = max(left_child->wall.value, wall.value); right_child->wall.value = max(right_child->wall.value, wall.value); wall.flag = false; } } int update(int begin, int end, int new_value) { if (begin >= end) { return wall.value; } else if (begin == this->begin && end == this->end) { wall.flag = true; wall.value = max(wall.value, new_value); return wall.value; } else { propagate(); wall.value = min(left_child->update(begin, min(end, left_child->end), new_value), right_child->update(max(begin, right_child->begin), end, new_value)); return wall.value; } } WeakWall min_wall(int begin, int end) { if (begin >= end) { return netr; } else if (begin == this->begin && end == this->end) { if (end - begin > 1) { propagate(); if (left_child->wall.value == wall.value) return left_child->min_wall(begin, min(end, left_child->end)); else return right_child->min_wall(max(begin, right_child->begin), end); } else { return WeakWall(wall.value, begin); } } else { propagate(); WeakWall left = left_child->min_wall(begin, min(end, left_child->end)); WeakWall right = right_child->min_wall(max(begin, right_child->begin), end); if (left.minimal_hight > right.minimal_hight) { return right; } else if (left.minimal_hight < right.minimal_hight) { return left; } else { int ind = max(left.index, right.index); return WeakWall(left.minimal_hight, ind); } } } }; int main() { ios::sync_with_stdio(false); cin >> n >> m; Tree tree(0, n); for (int i = 0; i < m; ++i) { cin >> str >> tmp1 >> tmp2; tmp1--; if (str[0] == 'd') { cin >> tmp3; tree.update(tmp1, tmp2, tmp3); } if (str[0] == 'a') { WeakWall res = tree.min_wall(tmp1, tmp2); cout << res.minimal_hight << ' ' << res.index + 1 << '\n'; } } return 0; }
[ "noreply@github.com" ]
noreply@github.com
192c8fcb845727df789f93402c04a820e2e0125d
dca653bb975528bd1b8ab2547f6ef4f48e15b7b7
/tags/wxPy-2.8.11.0/src/motif/toolbar.cpp
092893e0061efd99eb69c4a46ee4250f71b35c8d
[]
no_license
czxxjtu/wxPython-1
51ca2f62ff6c01722e50742d1813f4be378c0517
6a7473c258ea4105f44e31d140ea5c0ae6bc46d8
refs/heads/master
2021-01-15T12:09:59.328778
2015-01-05T20:55:10
2015-01-05T20:55:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
26,234
cpp
///////////////////////////////////////////////////////////////////////////// // Name: src/motif/toolbar.cpp // Purpose: wxToolBar // Author: Julian Smart // Modified by: 13.12.99 by VZ during toolbar classes reorganization // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ // declarations // ============================================================================ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #include "wx/toolbar.h" #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/frame.h" #include "wx/timer.h" #include "wx/settings.h" #endif #ifdef __VMS__ #pragma message disable nosimpint #endif #include <Xm/Xm.h> #include <Xm/PushBG.h> #include <Xm/PushB.h> #include <Xm/Label.h> #include <Xm/ToggleB.h> #include <Xm/ToggleBG.h> #include <Xm/Form.h> #ifdef __VMS__ #pragma message enable nosimpint #endif #include "wx/motif/private.h" #include "wx/motif/bmpmotif.h" // ---------------------------------------------------------------------------- // wxWin macros // ---------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- static void wxToolButtonCallback (Widget w, XtPointer clientData, XtPointer ptr); static void wxToolButtonPopupCallback (Widget w, XtPointer client_data, XEvent *event, Boolean *continue_to_dispatch); // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- class wxToolBarTimer : public wxTimer { public: virtual void Notify(); static Widget help_popup; static Widget buttonWidget; static wxString helpString; }; class wxToolBarTool : public wxToolBarToolBase { public: wxToolBarTool(wxToolBar *tbar, int id, const wxString& label, const wxBitmap& bmpNormal, const wxBitmap& bmpToggled, wxItemKind kind, wxObject *clientData, const wxString& shortHelp, const wxString& longHelp) : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpToggled, kind, clientData, shortHelp, longHelp) { Init(); } wxToolBarTool(wxToolBar *tbar, wxControl *control) : wxToolBarToolBase(tbar, control) { Init(); } virtual ~wxToolBarTool(); // accessors void SetWidget(Widget widget) { m_widget = widget; } Widget GetButtonWidget() const { return m_widget; } Pixmap GetArmPixmap() { m_bitmapCache.SetBitmap( GetNormalBitmap() ); return (Pixmap)m_bitmapCache.GetArmPixmap( (WXWidget)m_widget ); } Pixmap GetInsensPixmap() { m_bitmapCache.SetBitmap( GetNormalBitmap() ); return (Pixmap)m_bitmapCache.GetInsensPixmap( (WXWidget)m_widget ); } protected: void Init(); Widget m_widget; wxBitmapCache m_bitmapCache; }; // ---------------------------------------------------------------------------- // globals // ---------------------------------------------------------------------------- static wxToolBarTimer* wxTheToolBarTimer = (wxToolBarTimer*) NULL; Widget wxToolBarTimer::help_popup = (Widget) 0; Widget wxToolBarTimer::buttonWidget = (Widget) 0; wxString wxToolBarTimer::helpString; // ============================================================================ // implementation // ============================================================================ // ---------------------------------------------------------------------------- // wxToolBarTool // ---------------------------------------------------------------------------- wxToolBarToolBase *wxToolBar::CreateTool(int id, const wxString& label, const wxBitmap& bmpNormal, const wxBitmap& bmpToggled, wxItemKind kind, wxObject *clientData, const wxString& shortHelp, const wxString& longHelp) { return new wxToolBarTool(this, id, label, bmpNormal, bmpToggled, kind, clientData, shortHelp, longHelp); } wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) { return new wxToolBarTool(this, control); } void wxToolBarTool::Init() { m_widget = (Widget)0; } wxToolBarTool::~wxToolBarTool() { if ( m_widget ) XtDestroyWidget(m_widget); } // ---------------------------------------------------------------------------- // wxToolBar construction // ---------------------------------------------------------------------------- void wxToolBar::Init() { m_maxWidth = -1; m_maxHeight = -1; m_defaultWidth = 24; m_defaultHeight = 22; m_toolPacking = 2; m_toolSeparation = 8; m_xMargin = 2; m_yMargin = 2; m_maxRows = 100; m_maxCols = 100; } bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { if( !wxControl::CreateControl( parent, id, pos, size, style, wxDefaultValidator, name ) ) return false; FixupStyle(); m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); Widget parentWidget = (Widget) parent->GetClientWidget(); Widget toolbar = XtVaCreateManagedWidget("toolbar", xmBulletinBoardWidgetClass, (Widget) parentWidget, XmNmarginWidth, 0, XmNmarginHeight, 0, XmNresizePolicy, XmRESIZE_NONE, NULL); /* Widget toolbar = XtVaCreateManagedWidget("toolbar", xmFormWidgetClass, (Widget) m_clientWidget, XmNtraversalOn, False, XmNhorizontalSpacing, 0, XmNverticalSpacing, 0, XmNleftOffset, 0, XmNrightOffset, 0, XmNmarginWidth, 0, XmNmarginHeight, 0, NULL); */ m_mainWidget = (WXWidget) toolbar; ChangeFont(false); wxPoint rPos = pos; wxSize rSize = size; if( rPos.x == -1 ) rPos.x = 0; if( rPos.y == -1 ) rPos.y = 0; if( rSize.x == -1 && GetParent() ) rSize.x = GetParent()->GetSize().x; AttachWidget (parent, m_mainWidget, (WXWidget) NULL, rPos.x, rPos.y, rSize.x, rSize.y); ChangeBackgroundColour(); return true; } wxToolBar::~wxToolBar() { delete wxTheToolBarTimer; wxTheToolBarTimer = NULL; } bool wxToolBar::Realize() { if ( m_tools.GetCount() == 0 ) { // nothing to do return true; } bool isVertical = GetWindowStyle() & wxTB_VERTICAL; // Separator spacing const int separatorSize = GetToolSeparation(); // 8; wxSize margins = GetToolMargins(); int packing = GetToolPacking(); int marginX = margins.x; int marginY = margins.y; int currentX = marginX; int currentY = marginY; int buttonHeight = 0, buttonWidth = 0; Widget button; Pixmap pixmap, insensPixmap; wxBitmap bmp, insensBmp; wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); while ( node ) { wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); switch ( tool->GetStyle() ) { case wxTOOL_STYLE_CONTROL: { wxControl* control = tool->GetControl(); wxSize sz = control->GetSize(); wxPoint pos = control->GetPosition(); // Allow a control to specify a y[x]-offset by setting // its initial position, but still don't allow it to // position itself above the top[left] margin. int controlY = (pos.y > 0) ? pos.y : currentY; int controlX = (pos.x > 0) ? pos.x : currentX; control->Move( isVertical ? controlX : currentX, isVertical ? currentY : controlY ); if ( isVertical ) currentY += sz.y + packing; else currentX += sz.x + packing; break; } case wxTOOL_STYLE_SEPARATOR: // skip separators for vertical toolbars if( !isVertical ) { currentX += separatorSize; } break; case wxTOOL_STYLE_BUTTON: button = (Widget) 0; if ( tool->CanBeToggled() && !tool->GetButtonWidget() ) { button = XtVaCreateWidget("toggleButton", xmToggleButtonWidgetClass, (Widget) m_mainWidget, XmNx, currentX, XmNy, currentY, XmNindicatorOn, False, XmNshadowThickness, 2, XmNborderWidth, 0, XmNspacing, 0, XmNmarginWidth, 0, XmNmarginHeight, 0, XmNmultiClick, XmMULTICLICK_KEEP, XmNlabelType, XmPIXMAP, NULL); XtAddCallback ((Widget) button, XmNvalueChangedCallback, (XtCallbackProc) wxToolButtonCallback, (XtPointer) this); XtVaSetValues ((Widget) button, XmNselectColor, m_backgroundColour.AllocColour (XtDisplay((Widget) button)), NULL); } else if( !tool->GetButtonWidget() ) { button = XtVaCreateWidget("button", xmPushButtonWidgetClass, (Widget) m_mainWidget, XmNx, currentX, XmNy, currentY, XmNpushButtonEnabled, True, XmNmultiClick, XmMULTICLICK_KEEP, XmNlabelType, XmPIXMAP, NULL); XtAddCallback (button, XmNactivateCallback, (XtCallbackProc) wxToolButtonCallback, (XtPointer) this); } if( !tool->GetButtonWidget() ) { wxDoChangeBackgroundColour((WXWidget) button, m_backgroundColour, true); tool->SetWidget(button); } else { button = (Widget)tool->GetButtonWidget(); XtVaSetValues( button, XmNx, currentX, XmNy, currentY, NULL ); } // For each button, if there is a mask, we must create // a new wxBitmap that has the correct background colour // for the button. Otherwise the background will just be // e.g. black if a transparent XPM has been loaded. bmp = tool->GetNormalBitmap(); insensBmp = tool->GetDisabledBitmap(); if ( bmp.GetMask() || insensBmp.GetMask() ) { WXPixel backgroundPixel; XtVaGetValues(button, XmNbackground, &backgroundPixel, NULL); wxColour col; col.SetPixel(backgroundPixel); if( bmp.Ok() && bmp.GetMask() ) { bmp = wxCreateMaskedBitmap(bmp, col); tool->SetNormalBitmap(bmp); } if( insensBmp.Ok() && insensBmp.GetMask() ) { insensBmp = wxCreateMaskedBitmap(insensBmp, col); tool->SetDisabledBitmap(insensBmp); } } // Create a selected/toggled bitmap. If there isn't a 2nd // bitmap, we need to create it (with a darker, selected // background) WXPixel backgroundPixel; if ( tool->CanBeToggled() ) XtVaGetValues(button, XmNselectColor, &backgroundPixel, NULL); else XtVaGetValues(button, XmNarmColor, &backgroundPixel, NULL); wxColour col; col.SetPixel(backgroundPixel); pixmap = (Pixmap) bmp.GetDrawable(); { wxBitmap tmp = tool->GetDisabledBitmap(); insensPixmap = tmp.Ok() ? (Pixmap)tmp.GetDrawable() : tool->GetInsensPixmap(); } if (tool->CanBeToggled()) { // Toggle button Pixmap pixmap2 = tool->GetArmPixmap(); Pixmap insensPixmap2 = tool->GetInsensPixmap(); XtVaSetValues (button, XmNfillOnSelect, True, XmNlabelPixmap, pixmap, XmNselectPixmap, pixmap2, XmNlabelInsensitivePixmap, insensPixmap, XmNselectInsensitivePixmap, insensPixmap2, XmNlabelType, XmPIXMAP, NULL); } else { Pixmap pixmap2 = tool->GetArmPixmap(); // Normal button XtVaSetValues(button, XmNlabelPixmap, pixmap, XmNlabelInsensitivePixmap, insensPixmap, XmNarmPixmap, pixmap2, NULL); } XtManageChild(button); { Dimension width, height; XtVaGetValues(button, XmNwidth, &width, XmNheight, & height, NULL); if ( isVertical ) currentY += height + packing; else currentX += width + packing; buttonHeight = wxMax(buttonHeight, height); buttonWidth = wxMax(buttonWidth, width); } XtAddEventHandler (button, EnterWindowMask | LeaveWindowMask, False, wxToolButtonPopupCallback, (XtPointer) this); break; } node = node->GetNext(); } SetSize( -1, -1, isVertical ? buttonWidth + 2 * marginX : -1, isVertical ? -1 : buttonHeight + 2*marginY ); return true; } wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) const { wxFAIL_MSG( _T("TODO") ); return (wxToolBarToolBase *)NULL; } bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool) { tool->Attach(this); return true; } bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool) { tool->Detach(); bool isVertical = GetWindowStyle() & wxTB_VERTICAL; const int separatorSize = GetToolSeparation(); // 8; int packing = GetToolPacking(); int offset = 0; for( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); node; node = node->GetNext() ) { wxToolBarTool *t = (wxToolBarTool*)node->GetData(); if( t == tool ) { switch ( t->GetStyle() ) { case wxTOOL_STYLE_CONTROL: { wxSize size = t->GetControl()->GetSize(); offset = isVertical ? size.y : size.x; offset += packing; break; } case wxTOOL_STYLE_SEPARATOR: offset = isVertical ? 0 : separatorSize; break; case wxTOOL_STYLE_BUTTON: { Widget w = t->GetButtonWidget(); Dimension width, height; XtVaGetValues( w, XmNwidth, &width, XmNheight, &height, NULL ); offset = isVertical ? height : width; offset += packing; break; } } } else if( offset ) { switch ( t->GetStyle() ) { case wxTOOL_STYLE_CONTROL: { wxPoint location = t->GetControl()->GetPosition(); if( isVertical ) location.y -= offset; else location.x -= offset; t->GetControl()->Move( location ); break; } case wxTOOL_STYLE_SEPARATOR: break; case wxTOOL_STYLE_BUTTON: { Dimension x, y; XtVaGetValues( t->GetButtonWidget(), XmNx, &x, XmNy, &y, NULL ); if( isVertical ) y = (Dimension)(y - offset); else x = (Dimension)(x - offset); XtVaSetValues( t->GetButtonWidget(), XmNx, x, XmNy, y, NULL ); break; } } } } return true; } void wxToolBar::DoEnableTool(wxToolBarToolBase *toolBase, bool enable) { wxToolBarTool *tool = (wxToolBarTool *)toolBase; if (tool->GetButtonWidget()){ XtSetSensitive(tool->GetButtonWidget(), (Boolean) enable); } else if (wxTOOL_STYLE_CONTROL == tool->GetStyle()){ // Controls (such as wxChoice) do not have button widgets tool->GetControl()->Enable(enable); } } void wxToolBar::DoToggleTool(wxToolBarToolBase *toolBase, bool toggle) { wxToolBarTool *tool = (wxToolBarTool *)toolBase; XmToggleButtonSetState(tool->GetButtonWidget(), (Boolean) toggle, False); } void wxToolBar::DoSetToggle(wxToolBarToolBase * WXUNUSED(tool), bool WXUNUSED(toggle)) { // nothing to do } void wxToolBar::DoSetSize(int x, int y, int width, int height, int sizeFlags) { int old_width, old_height; GetSize(&old_width, &old_height); // Correct width and height if needed. if ( width == -1 || height == -1 ) { wxSize defaultSize = GetSize(); if ( width == -1 ) width = defaultSize.x; if ( height == -1 ) height = defaultSize.y; } wxToolBarBase::DoSetSize(x, y, width, height, sizeFlags); // We must refresh the frame size when the toolbar changes size // otherwise the toolbar can be shown incorrectly if ( old_width != width || old_height != height ) { // But before we send the size event check it // we have a frame that is not being deleted. wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); if ( frame && !frame->IsBeingDeleted() ) { frame->SendSizeEvent(); } } } // ---------------------------------------------------------------------------- // Motif callbacks // ---------------------------------------------------------------------------- wxToolBarToolBase *wxToolBar::FindToolByWidget(WXWidget w) const { wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); while ( node ) { wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); if ( tool->GetButtonWidget() == w) { return tool; } node = node->GetNext(); } return (wxToolBarToolBase *)NULL; } static void wxToolButtonCallback(Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr)) { wxToolBar *toolBar = (wxToolBar *) clientData; wxToolBarToolBase *tool = toolBar->FindToolByWidget((WXWidget) w); if ( !tool ) return; if ( tool->CanBeToggled() ) tool->Toggle(); if ( !toolBar->OnLeftClick(tool->GetId(), tool->IsToggled()) ) { // revert tool->Toggle(); } } static void wxToolButtonPopupCallback(Widget w, XtPointer client_data, XEvent *event, Boolean *WXUNUSED(continue_to_dispatch)) { // TODO: retrieve delay before popping up tooltip from wxSystemSettings. static const int delayMilli = 800; wxToolBar* toolBar = (wxToolBar*) client_data; wxToolBarToolBase *tool = toolBar->FindToolByWidget((WXWidget) w); if ( !tool ) return; wxString tooltip = tool->GetShortHelp(); if ( !tooltip ) return; if (!wxTheToolBarTimer) wxTheToolBarTimer = new wxToolBarTimer; wxToolBarTimer::buttonWidget = w; wxToolBarTimer::helpString = tooltip; /************************************************************/ /* Popup help label */ /************************************************************/ if (event->type == EnterNotify) { if (wxToolBarTimer::help_popup != (Widget) 0) { XtDestroyWidget (wxToolBarTimer::help_popup); XtPopdown (wxToolBarTimer::help_popup); } wxToolBarTimer::help_popup = (Widget) 0; // One shot wxTheToolBarTimer->Start(delayMilli, true); } /************************************************************/ /* Popdown help label */ /************************************************************/ else if (event->type == LeaveNotify) { if (wxTheToolBarTimer) wxTheToolBarTimer->Stop(); if (wxToolBarTimer::help_popup != (Widget) 0) { XtDestroyWidget (wxToolBarTimer::help_popup); XtPopdown (wxToolBarTimer::help_popup); } wxToolBarTimer::help_popup = (Widget) 0; } } void wxToolBarTimer::Notify() { Position x, y; /************************************************************/ /* Create shell without window decorations */ /************************************************************/ help_popup = XtVaCreatePopupShell ("shell", overrideShellWidgetClass, (Widget) wxTheApp->GetTopLevelWidget(), NULL); /************************************************************/ /* Get absolute position on display of toolbar button */ /************************************************************/ XtTranslateCoords (buttonWidget, (Position) 0, (Position) 0, &x, &y); // Move the tooltip more or less above the button int yOffset = 20; // TODO: What should be really? y = (Position)(y - yOffset); if (y < yOffset) y = 0; /************************************************************/ /* Set the position of the help popup */ /************************************************************/ XtVaSetValues (help_popup, XmNx, (Position) x, XmNy, (Position) y, NULL); /************************************************************/ /* Create help label */ /************************************************************/ XmString text = XmStringCreateSimple ((char*) (const char*) helpString); XtVaCreateManagedWidget ("help_label", xmLabelWidgetClass, help_popup, XmNlabelString, text, XtVaTypedArg, XmNforeground, XtRString, "black", strlen("black")+1, XtVaTypedArg, XmNbackground, XtRString, "LightGoldenrod", strlen("LightGoldenrod")+1, NULL); XmStringFree (text); /************************************************************/ /* Popup help label */ /************************************************************/ XtPopup (help_popup, XtGrabNone); }
[ "RD@c3d73ce0-8a6f-49c7-b76d-6d57e0e08775" ]
RD@c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
5e2a21bf6f415bbc1bb9d73e9d0e3507fc6df928
46bc4918be57a0e6600be7b9435d75020cd35e54
/src/MathParser/src/Tan.h
6a5dfd7ab009ec3fc5a9ffb487c2f63c8cdff60c
[ "MIT" ]
permissive
tsemaylo/DerivativeSolver
fcd7e7e364084a726477acb9767711223862dffc
1d98caa3bfce96673364315fbdd3eb79096bea07
refs/heads/master
2021-09-09T21:29:59.936494
2018-03-19T20:16:16
2018-03-19T20:16:16
92,815,141
0
0
null
null
null
null
UTF-8
C++
false
false
688
h
/* Licensed to Oleg Tsemaylo under the MIT license. * Refer to the LICENSE.txt file in the project root for more information. */ /** * @file Tan.h * * Definition of Tan class. * * @author agor * @since 22.08.2017 */ #ifndef TAN_H #define TAN_H #include "Expression.h" /** * The Expression class representing tangent function. */ class Tan : public Expression, public EnableSPointerFromThis<Tan>{ public: PExpression arg; Tan(); bool isComplete() const final; void traverse(Visitor&) const throw(TraverseException) final; }; // shortcuts for pointers typedef SPointer<Tan> PTan; typedef SPointer<const Tan> PConstTan; #endif /* TAN_H */
[ "helge.agr@gmail.com" ]
helge.agr@gmail.com
16a33f966deb5ce1cc56f325749b804cf2533c05
816539dd91017d036650bd29d32f8c0a044066eb
/linorobot_ws/src/openslam_gmapping/gridfastslam/gfs2log.cpp
e688e77c2eea7e9fe52b8fbef3852455d6d38754
[ "BSD-2-Clause" ]
permissive
jamestiotio/soar-linorobot-2019
0a824ac8f1f441e09a089ed27040abaa0deb144e
e412ee595caae32547271f40f05be0a1506ebde7
refs/heads/master
2021-06-18T21:10:53.224195
2021-06-02T14:56:35
2021-06-02T14:56:35
205,554,447
7
4
BSD-2-Clause
2020-06-24T11:43:56
2019-08-31T14:25:34
C++
UTF-8
C++
false
false
1,304
cpp
#include <cstring> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <list> #include <gmapping/utils/point.h> #include "gmapping/gridfastslam/gfsreader.h" #define MAX_LINE_LENGHT (1000000) using namespace std; using namespace GMapping; using namespace GMapping::GFSReader; int main (int argc, const char * const * argv){ if (argc<3){ cout << "usage gfs2log [-err] [-neff] [-part] [-odom] <infilename> <outfilename>" << endl; cout << " -odom : dump raw odometry in ODOM message instead of inpolated corrected one" << endl; return -1; } bool err=0; bool neff=0; bool part=0; bool odom=0; // int particle_num; unsigned int c=1; if (!strcmp(argv[c],"-err")){ err=true; c++; } if (!strcmp(argv[c],"-neff")){ neff=true; c++; } if (!strcmp(argv[c],"-part")){ part=true; c++; } if (!strcmp(argv[c],"-odom")){ odom=true; c++; } ifstream is(argv[c]); if (!is){ cout << "could read file "<< endl; return -1; } c++; RecordList rl; rl.read(is); unsigned int bestidx=rl.getBestIdx(); cout << endl << "best index = " << bestidx<< endl; ofstream os(argv[c]); if (! os){ cout << "could write file "<< endl; return -1; } rl.printPath(os,bestidx,err,odom); if(part) rl.printLastParticles(os); os.close(); return 0; }
[ "jamestiotio@gmail.com" ]
jamestiotio@gmail.com
cb315cb31cb344cc1e878723801ba1b55e79b3e5
681fdfee4e742a3ba96b47624a75f6b1ffc2f86a
/Problem_solving_on_2d_Array/Sum_of_submatrix_approch_2.cpp
b6bac28c270c0e82c53aec83c7754efcee2c78e0
[]
no_license
sagarr70/Interview-prepration
ca297f6beb13befe406b205bdaf0e42e854cfbd9
f91af38907b9f054561b3d67ecf81c838feb77f1
refs/heads/master
2023-01-25T00:38:19.011137
2020-12-04T12:58:49
2020-12-04T12:58:49
308,427,565
2
0
null
null
null
null
UTF-8
C++
false
false
1,233
cpp
#include<iostream> using namespace std; int main(){ int n,m; cin>>n>>m; int a[100][100]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin>>a[i][j]; } } for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (j>=1) { a[i][j]+=a[i][j-1];} } for (int j = 0; j < m; j++) { if (i>=1) { a[i][j]+=a[i-1][j];} } } int sum=0; for (int li = 0; li < n; li++) { for (int lj = 0; lj < m; lj++) { for (int bri = li; bri < n; bri++) { for (int brj = lj; brj < m; brj++) { sum+=a[bri][brj]; if (li-1>=0) { sum-=a[li-1][brj]; } if (lj-1>=0) { sum-=a[bri][lj-1]; } if (li-1>=0&&lj-1>=0) { sum+=a[li-1][lj-1]; } } } } } cout<<sum; return 0; }
[ "sagar_aggarwal@outlook.com" ]
sagar_aggarwal@outlook.com
e652aee3f5c36943a0a2dac93fe6ca8993812aac
24f26275ffcd9324998d7570ea9fda82578eeb9e
/third_party/blink/renderer/modules/webgl/webgl2_compute_rendering_context.cc
fc2ae8662cc0343150705ff15ed5beefc8058906
[ "BSD-3-Clause", "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "GPL-2.0-only", "LGPL-2.0-only", "BSD-2-Clause", "LicenseRef-scancode-other-copyleft" ]
permissive
Vizionnation/chromenohistory
70a51193c8538d7b995000a1b2a654e70603040f
146feeb85985a6835f4b8826ad67be9195455402
refs/heads/master
2022-12-15T07:02:54.461083
2019-10-25T15:07:06
2019-10-25T15:07:06
217,557,501
2
1
BSD-3-Clause
2022-11-19T06:53:07
2019-10-25T14:58:54
null
UTF-8
C++
false
false
7,752
cc
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/modules/webgl/webgl2_compute_rendering_context.h" #include <memory> #include "gpu/command_buffer/client/gles2_interface.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/web_graphics_context_3d_provider.h" #include "third_party/blink/renderer/bindings/modules/v8/offscreen_rendering_context.h" #include "third_party/blink/renderer/bindings/modules/v8/rendering_context.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_client.h" #include "third_party/blink/renderer/core/frame/settings.h" #include "third_party/blink/renderer/core/loader/frame_loader.h" #include "third_party/blink/renderer/modules/webgl/ext_color_buffer_float.h" #include "third_party/blink/renderer/modules/webgl/ext_disjoint_timer_query_webgl2.h" #include "third_party/blink/renderer/modules/webgl/ext_float_blend.h" #include "third_party/blink/renderer/modules/webgl/ext_texture_filter_anisotropic.h" #include "third_party/blink/renderer/modules/webgl/oes_texture_float_linear.h" #include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_astc.h" #include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_etc.h" #include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_etc1.h" #include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_pvrtc.h" #include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_s3tc.h" #include "third_party/blink/renderer/modules/webgl/webgl_compressed_texture_s3tc_srgb.h" #include "third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.h" #include "third_party/blink/renderer/modules/webgl/webgl_context_event.h" #include "third_party/blink/renderer/modules/webgl/webgl_debug_renderer_info.h" #include "third_party/blink/renderer/modules/webgl/webgl_debug_shaders.h" #include "third_party/blink/renderer/modules/webgl/webgl_lose_context.h" #include "third_party/blink/renderer/modules/webgl/webgl_video_texture.h" #include "third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h" namespace blink { // An helper function for the two create() methods. The return value is an // indicate of whether the create() should return nullptr or not. static bool ShouldCreateWebGL2ComputeContext( WebGraphicsContext3DProvider* context_provider, CanvasRenderingContextHost* host) { if (!context_provider) { host->HostDispatchEvent(WebGLContextEvent::Create( event_type_names::kWebglcontextcreationerror, "Failed to create a WebGL2 Compute context.")); return false; } gpu::gles2::GLES2Interface* gl = context_provider->ContextGL(); std::unique_ptr<Extensions3DUtil> extensions_util = Extensions3DUtil::Create(gl); if (!extensions_util) return false; if (extensions_util->SupportsExtension("GL_EXT_debug_marker")) { String context_label( String::Format("WebGL2ComputeRenderingContext-%p", context_provider)); gl->PushGroupMarkerEXT(0, context_label.Ascii().c_str()); } return true; } CanvasRenderingContext* WebGL2ComputeRenderingContext::Factory::Create( CanvasRenderingContextHost* host, const CanvasContextCreationAttributesCore& attrs) { bool using_gpu_compositing; std::unique_ptr<WebGraphicsContext3DProvider> context_provider( CreateWebGraphicsContext3DProvider(host, attrs, Platform::kWebGL2ComputeContextType, &using_gpu_compositing)); if (!ShouldCreateWebGL2ComputeContext(context_provider.get(), host)) return nullptr; WebGL2ComputeRenderingContext* rendering_context = MakeGarbageCollected<WebGL2ComputeRenderingContext>( host, std::move(context_provider), using_gpu_compositing, attrs); if (!rendering_context->GetDrawingBuffer()) { host->HostDispatchEvent(WebGLContextEvent::Create( event_type_names::kWebglcontextcreationerror, "Could not create a WebGL2 Compute context.")); return nullptr; } rendering_context->InitializeNewContext(); rendering_context->RegisterContextExtensions(); return rendering_context; } void WebGL2ComputeRenderingContext::Factory::OnError(HTMLCanvasElement* canvas, const String& error) { canvas->DispatchEvent(*WebGLContextEvent::Create( event_type_names::kWebglcontextcreationerror, error)); } WebGL2ComputeRenderingContext::WebGL2ComputeRenderingContext( CanvasRenderingContextHost* host, std::unique_ptr<WebGraphicsContext3DProvider> context_provider, bool using_gpu_compositing, const CanvasContextCreationAttributesCore& requested_attributes) : WebGL2ComputeRenderingContextBase(host, std::move(context_provider), using_gpu_compositing, requested_attributes) {} void WebGL2ComputeRenderingContext::SetCanvasGetContextResult( RenderingContext& result) { result.SetWebGL2ComputeRenderingContext(this); } void WebGL2ComputeRenderingContext::SetOffscreenCanvasGetContextResult( OffscreenRenderingContext& result) { result.SetWebGL2ComputeRenderingContext(this); } ImageBitmap* WebGL2ComputeRenderingContext::TransferToImageBitmap( ScriptState* script_state) { return TransferToImageBitmapBase(script_state); } void WebGL2ComputeRenderingContext::RegisterContextExtensions() { // Register extensions. RegisterExtension<EXTColorBufferFloat>(ext_color_buffer_float_); RegisterExtension<EXTDisjointTimerQueryWebGL2>( ext_disjoint_timer_query_web_gl2_); RegisterExtension<EXTFloatBlend>(ext_float_blend_); RegisterExtension<EXTTextureFilterAnisotropic>( ext_texture_filter_anisotropic_); RegisterExtension<OESTextureFloatLinear>(oes_texture_float_linear_); RegisterExtension<WebGLCompressedTextureASTC>(webgl_compressed_texture_astc_); RegisterExtension<WebGLCompressedTextureETC>(webgl_compressed_texture_etc_); RegisterExtension<WebGLCompressedTextureETC1>(webgl_compressed_texture_etc1_); RegisterExtension<WebGLCompressedTexturePVRTC>( webgl_compressed_texture_pvrtc_); RegisterExtension<WebGLCompressedTextureS3TC>(webgl_compressed_texture_s3tc_); RegisterExtension<WebGLCompressedTextureS3TCsRGB>( webgl_compressed_texture_s3tc_srgb_); RegisterExtension<WebGLDebugRendererInfo>(webgl_debug_renderer_info_); RegisterExtension<WebGLDebugShaders>(webgl_debug_shaders_); RegisterExtension<WebGLLoseContext>(webgl_lose_context_); RegisterExtension<WebGLVideoTexture>(webgl_video_texture_, kDraftExtension); } void WebGL2ComputeRenderingContext::Trace(blink::Visitor* visitor) { visitor->Trace(ext_color_buffer_float_); visitor->Trace(ext_disjoint_timer_query_web_gl2_); visitor->Trace(ext_float_blend_); visitor->Trace(ext_texture_filter_anisotropic_); visitor->Trace(oes_texture_float_linear_); visitor->Trace(webgl_compressed_texture_astc_); visitor->Trace(webgl_compressed_texture_etc_); visitor->Trace(webgl_compressed_texture_etc1_); visitor->Trace(webgl_compressed_texture_pvrtc_); visitor->Trace(webgl_compressed_texture_s3tc_); visitor->Trace(webgl_compressed_texture_s3tc_srgb_); visitor->Trace(webgl_debug_renderer_info_); visitor->Trace(webgl_debug_shaders_); visitor->Trace(webgl_lose_context_); visitor->Trace(webgl_video_texture_); WebGL2ComputeRenderingContextBase::Trace(visitor); } } // namespace blink
[ "rjkroege@chromium.org" ]
rjkroege@chromium.org
4f396d831fa59328f0c4537fea8f5428485cb5d4
44f6f315f38d145b655570e616c9b25344392899
/include/packages/yocto/ArrayChannel.h
bda3c6933130a0bd71f90246424eb2b678b9bc68
[]
no_license
radiganm/yoctomsg
4bd14c033065a6e7092002992fdd4276641611af
3734d948e72e49c93c91ed461eb007a4e3af90ef
refs/heads/master
2021-07-20T15:38:43.437774
2017-12-15T01:10:15
2017-12-15T01:10:15
96,011,822
0
0
null
null
null
null
UTF-8
C++
false
false
3,246
h
/* ArrayChannel.h * Copyright 2017 Mac Radigan * All Rights Reserved */ #include "packages/yocto/Channel.h" #include <stdlib.h> #include <inttypes.h> #include <pthread.h> #include <thread> #include <functional> #include <mutex> #include <condition_variable> #include <array> #include <atomic> #include <sstream> #pragma once #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif namespace rad::yocto { template<typename T, std::size_t N> class ArrayChannel : public rad::yocto::Channel<T,N> { public: ArrayChannel() : Channel<T,N>(), n_in_(0), n_out_(0) { this->buffer_ = reinterpret_cast<unsigned char *>(&storage_[0]); }; virtual ~ArrayChannel() {}; inline std::size_t read(T *buf, std::size_t size); inline std::size_t write(const T* const buf, std::size_t size); void summarize(std::ostream &os); private: std::atomic_uint64_t n_in_; // write in std::atomic_uint64_t n_out_; // read out std::mutex lck_in_; std::mutex lck_out_; std::condition_variable cv_in_; std::condition_variable cv_out_; std::array<T, N> storage_; unsigned char *buffer_; std::size_t buffer_size_ = N * sizeof(T); }; } // namespace template<typename T, std::size_t N> void rad::yocto::ArrayChannel<T,N>::summarize(std::ostream &os) { std::stringstream ss; os << ss.str(); } template<typename T, std::size_t N> std::size_t rad::yocto::ArrayChannel<T,N>::read(T *data, std::size_t data_size) { std::unique_lock<std::mutex> lck(lck_out_); auto test_fn = [&](void) -> bool { return n_in_.load() <= n_out_.load(); }; while(data_size > 0) { if(test_fn()) cv_out_.wait(lck, [&]{return !test_fn();}); const std::size_t n_in = n_in_.load(); const std::size_t n_out = n_out_.load(); const std::size_t n_delta = std::min(data_size, n_in - n_out); const std::size_t k1 = (n_out + n_delta) % buffer_size_; const std::size_t k2 = std::min(k1+n_delta, buffer_size_); const std::size_t m_delta = (k2 - k1) % sizeof(T); const std::size_t M = m_delta / sizeof(T); data_size -= M; n_out_ -= m_delta; std::copy(&storage_[k1], &storage_[k2], data); cv_in_.notify_one(); } return data_size; } template<typename T, std::size_t N> std::size_t rad::yocto::ArrayChannel<T,N>::write(const T* const data, std::size_t data_size) { std::unique_lock<std::mutex> lck(lck_in_); auto test_fn = [&](void) -> bool { n_in_.load() - n_out_.load() >= buffer_size_; }; while(data_size > 0) { if(test_fn()) cv_in_.wait(lck, [&]{return !test_fn();}); const std::size_t n_in = n_in_.load(); const std::size_t n_out = n_out_.load(); const std::size_t n_delta = std::min(data_size, n_in - n_out); const std::size_t k1 = (n_out + n_delta) % buffer_size_; const std::size_t k2 = std::min(k1+n_delta, buffer_size_); const std::size_t m_delta = (k2 - k1) % sizeof(T); const std::size_t M = m_delta / sizeof(T); data_size -= M; n_in_ -= m_delta; std::copy(data, data+M, &storage_[k1]); cv_in_.notify_one(); } return data_size; } /* *EOF* */
[ "mac@radigan.org" ]
mac@radigan.org
731ff4aeade1a6bdd1e72480e1d5f47d318092fd
e9e93fc858b0c2164c7cb26e761564f54676d9be
/Source/Logic/Logic.cpp
9d4ffd0c1e2df39a9f6a6d4ecdf19a3294b6471a
[]
no_license
apjones6/Tetris
230e8418ef419372ec23228fc5ec86a8dd2f74a5
65c8b800bb5698124d0cc94ba71c047c75cafa7e
refs/heads/master
2021-01-01T19:01:27.264725
2012-12-23T11:48:30
2012-12-23T11:48:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,875
cpp
#include "../Application.h" #include "../Process/Process.h" #include "../Views/View.h" #include "Logic.h" #include "Manager.h" #include <algorithm> #include <boost/foreach.hpp> #include <boost/lambda/lambda.hpp> #include <boost/lambda/bind.hpp> namespace dxut { Actor::Actor(const ActorId id, const ActorType type, float x, float y) : mId(id), mType(type), mX(x), mY(y) { } //-------------------------------------------------------------------------------------- Actor::Actor(const ActorId id, const ActorType type) : mId(id), mType(type), mX(0), mY(0) { } //-------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------- LogicBase::LogicBase() : mProcessManager(new ProcessManager()), mInitialized(false), mPaused(false) { } //-------------------------------------------------------------------------------------- void LogicBase::Initialize() { mInitialized = true; } //-------------------------------------------------------------------------------------- void LogicBase::Update(double time, float elapsedTime) { assert(mInitialized); assert(!mPaused); // Update processes mProcessManager->Update(elapsedTime); // Update views BOOST_FOREACH (std::shared_ptr<IView> view, mViewList) { view->Update(time, elapsedTime); } } //-------------------------------------------------------------------------------------- std::shared_ptr<Actor> LogicBase::GetActor(const ActorId id) const { assert(mInitialized); // Use find to ensure we don't insert a default constructed pointer into map const ActorMap::const_iterator i = mActorMap.find(id); if (i != mActorMap.end()) { return i->second; } else { return NULL; } } //-------------------------------------------------------------------------------------- void LogicBase::AddActor(std::shared_ptr<Actor> actor) { assert(mInitialized); assert(mActorMap.count(actor->Id()) == 0); assert(!mPaused); // Insert mActorMap[actor->Id()] = actor; } //-------------------------------------------------------------------------------------- void LogicBase::AddView(std::shared_ptr<IView> view) { assert(mInitialized); // Ensure not duplicate const ViewList::const_iterator i = std::find(mViewList.begin(), mViewList.end(), view); if (i != mViewList.end()) return; // Insert mViewList.push_back(view); } //-------------------------------------------------------------------------------------- std::shared_ptr<IHumanView> LogicBase::HumanView() const { using namespace boost::lambda; std::shared_ptr<IView> view = *std::find_if(mViewList.begin(), mViewList.end(), bind(&IView::Type, *_1) == VIEW_HUMAN); return std::static_pointer_cast<IHumanView>(view); } };
[ "alastair.peter@gmail.com" ]
alastair.peter@gmail.com
b7bafe4bf8084d7458b5f71183470824ac89aa4a
891a936449d6d8bfbc744f9b6c44e9a744d0ae11
/src/Text.h
91e7084fea559532f4e60ca97c3befe6297542c9
[]
no_license
cg-final-project/CG_Final
0b7edbab3aef7e2eb5c5c6b9636c41e664ffe076
8ee4229a9370b44b0f12935ec0e25c4414830cdf
refs/heads/master
2020-06-04T12:27:42.828781
2019-07-20T05:22:18
2019-07-20T05:22:18
192,020,947
0
2
null
null
null
null
UTF-8
C++
false
false
4,905
h
#include <glad/glad.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include "Shader.h" #include <iostream> #include <ft2build.h> #include FT_FREETYPE_H /// Holds all state information relevant to a character as loaded using FreeType struct Character { GLuint TextureID; // ID handle of the glyph texture glm::ivec2 Size; // Size of glyph glm::ivec2 Bearing; // Offset from baseline to left/top of glyph GLuint Advance; // Horizontal offset to advance to next glyph }; std::map<GLchar, Character> Characters; GLuint VAO, VBO; class Text { public: void loadText(Shader shader) { // Configure VAO/VBO for texture quads glGenVertexArrays(1, &VAO); glGenBuffers(1, &VBO); glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 6 * 4, NULL, GL_DYNAMIC_DRAW); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(GLfloat), 0); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); //prepare========================================== glm::mat4 projection = glm::ortho(0.0f, 1280.0f, 0.0f, 720.0f); shader.use(); shader.setInt("shader_text", 0); shader.setMat4("projection", projection); // FreeType FT_Library ft = NULL; // All functions return a value different than 0 whenever an error occurred if (FT_Init_FreeType(&ft)) std::cout << "ERROR::FREETYPE: Could not init FreeType Library" << std::endl; // Load font as face FT_Face face = NULL; if (FT_New_Face(ft, "C:/Windows/Fonts/Inkfree.ttf", 0, &face)) std::cout << "ERROR::FREETYPE: Failed to load font" << std::endl; // Set size to load glyphs as FT_Set_Pixel_Sizes(face, 0, 100); // Disable byte-alignment restriction glPixelStorei(GL_UNPACK_ALIGNMENT, 1); // Load first 128 characters of ASCII set for (GLubyte c = 0; c < 128; c++) { // Load character glyph if (FT_Load_Char(face, c, FT_LOAD_RENDER)) { std::cout << "ERROR::FREETYTPE: Failed to load Glyph" << std::endl; continue; } // Generate texture GLuint texture; glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexImage2D( GL_TEXTURE_2D, 0, GL_RED, face->glyph->bitmap.width, face->glyph->bitmap.rows, 0, GL_RED, GL_UNSIGNED_BYTE, face->glyph->bitmap.buffer ); // Set texture options glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Now store character for later use Character character = { texture, glm::ivec2(face->glyph->bitmap.width, face->glyph->bitmap.rows), glm::ivec2(face->glyph->bitmap_left, face->glyph->bitmap_top), face->glyph->advance.x }; Characters.insert(std::pair<GLchar, Character>(c, character)); } glBindTexture(GL_TEXTURE_2D, 0); // Destroy FreeType once we're finished FT_Done_Face(face); FT_Done_FreeType(ft); //========================================================= } void RenderText(Shader shader, std::string text, GLfloat x, GLfloat y, GLfloat scale, glm::vec3 color) { // Activate corresponding render state shader.use(); shader.setVec3("color", color); glActiveTexture(GL_TEXTURE0); glBindVertexArray(VAO); // Iterate through all characters std::string::const_iterator c; for (c = text.begin(); c != text.end(); c++) { Character ch = Characters[*c]; GLfloat xpos = x + ch.Bearing.x * scale; GLfloat ypos = y - (ch.Size.y - ch.Bearing.y) * scale; GLfloat w = ch.Size.x * scale; GLfloat h = ch.Size.y * scale; // Update VBO for each character GLfloat vertices[6][4] = { { xpos, ypos + h, 0.0, 0.0 }, { xpos, ypos, 0.0, 1.0 }, { xpos + w, ypos, 1.0, 1.0 }, { xpos, ypos + h, 0.0, 0.0 }, { xpos + w, ypos, 1.0, 1.0 }, { xpos + w, ypos + h, 1.0, 0.0 } }; // Render glyph texture over quad glBindTexture(GL_TEXTURE_2D, ch.TextureID); // Update content of VBO memory glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), vertices); // Be sure to use glBufferSubData and not glBufferData glBindBuffer(GL_ARRAY_BUFFER, 0); // Render quad glDrawArrays(GL_TRIANGLES, 0, 6); // Now advance cursors for next glyph (note that advance is number of 1/64 pixels) x += (ch.Advance >> 6) * scale; // Bitshift by 6 to get value in pixels (2^6 = 64 (divide amount of 1/64th pixels by 64 to get amount of pixels)) } glBindVertexArray(0); glBindTexture(GL_TEXTURE_2D, 0); } void deleteFreeType() { glDeleteVertexArrays(1, &VAO); glDeleteBuffers(1, &VAO); } };
[ "2450412461@qq.com" ]
2450412461@qq.com
19e2f1bf909782e9c4f9835f7258b67b3ee625ff
97170d8e0edf4cf3cf116f685eac56e136715f24
/lmicp/src/common/cxy_config.cpp
6c9075d1e1e15b24fb7eb4ee2ff06dee553c192f
[]
no_license
cuixiongyi/cxy-ros
03e2ecc95ac47db25dbc70788e115323a75858cb
2ab38631f6f597b7050584c978c7f16b804e20c0
refs/heads/master
2021-01-15T15:25:36.555432
2016-07-15T00:12:00
2016-07-15T00:12:00
36,745,068
0
0
null
2015-09-08T18:51:09
2015-06-02T16:07:57
C++
UTF-8
C++
false
false
6,402
cpp
#include "common/cxy_config.h" namespace cxy { std::string cxy_config::filePrefix_ = {"/home/xiongyi/cxy_workspace/src/cxyros/lmicp/"}; std::string cxy_config::filename_ = {filePrefix_+"include/common/config"}; bool cxy_config::isOpen_ = {false}; unsigned int cxy_config::joint_number_ = {0}; std::vector<cxy_joint_info> cxy_config::joint_config_; std::vector<int> cxy_config::jointParaIdx_; unsigned int cxy_config::random_seed = 0.0; int cxy_config::joint_DoFs = {0}; bool cxy_config::withJacobianEffectChild = {true}; int cxy_config::withJacobianEffectChild_HierarchyMax = {5}; bool cxy_config::with_icp_jacobian = {true}; float cxy_config::icp_jaclbian_weight = {10}; bool cxy_config::with_collision_jacobian = {false}; float cxy_config::collision_jacobian_weight = {10}; bool cxy_config::with_silhouette_jacobian = {false}; float cxy_config::silhouette_jacobian_weight = {10}; bool cxy_config::with_push_jacobian = {false}; float cxy_config::push_jacobian_weight = {10}; std::ifstream cxy_config::fin_; const std::string cxy_config::rviz_frame_name_ {"icp"} ; cxy_config::cxy_config() { //kinematic_ptr_ = std::make_shared<cxy_lmicp_lib::cxy_icp_kinematic<float>>(this); }; cxy_config::~cxy_config() { } void cxy_config::serialize() { } std::shared_ptr<const cxy_config> cxy_config::getConfig() { return std::make_shared<const cxy_config>(); } void cxy_config::unserialize() { if (isOpen_) return; if (fin_.is_open()) fin_.close(); fin_.open(filename_); //std::cout<<filename_<<std::endl; if (! fin_.is_open()) throw std::runtime_error("open file fail"); std::string line; int8_t lineStatus = 0; while (getline(fin_, line, lineStatus)) { if (-2 == lineStatus) { //std::cout<<"comment : "<<line<<std::endl; continue; } std::stringstream iss(line); std::string var_name; iss >> var_name; if ( "random_seed" == var_name) { } if ( "joint_number" == var_name) { iss >> joint_number_; joint_DoFs = 0; jointParaIdx_.resize(joint_number_); parseJoints(); } } #ifdef CXY_JACO_TYPE_FITTING with_icp_jacobian = true; icp_jaclbian_weight = 1.0; #else with_icp_jacobian = false; #endif #ifdef CXY_JACO_TYPE_COLLISION with_collision_jacobian = true; collision_jacobian_weight = 1.0; #else with_collision_jacobian = false; #endif #ifdef CXY_JACO_TYPE_PUSH with_push_jacobian = true; push_jacobian_weight = 1.0; #else with_push_jacobian = false; #endif #ifdef CXY_JACO_TYPE_SILHOUETTE with_silhouette_jacobian = true; silhouette_jacobian_weight = 1.0; #else with_silhouette_jacobian = false; #endif isOpen_ = true; std::cout<<"config test"<<with_collision_jacobian<<" "<<collision_jacobian_weight; } void cxy_config::parseJoints() { std::string line; int8_t lineStatus = 0; joint_config_.reserve(joint_number_); int jointParaIdxCount = 0; for (int ii = 0; ii < joint_number_; ++ii) { if ( ! getline(fin_, line, lineStatus)) throw std::runtime_error("config file incomplete, no joint info found"); if ( -2 == lineStatus) { --ii; continue; } std::stringstream iss(line); cxy_joint_info kj; // joint index iss>>kj.joint_idx; CXY_ASSERT(kj.joint_idx == ii); //std::cout<<"joint line: "<<line<<std::endl; // joint parent iss>>kj.joint_parent; CXY_ASSERT(kj.joint_parent < ii && kj.joint_parent >= -1 ); iss>>kj.model_sample_number; CXY_ASSERT(kj.model_sample_number > 0 ); // joint joint type std::string jointType; iss>>jointType; kj.jointType = parseJointType(jointType); CXY_ASSERT(kj.jointType != cxy_transform::Axis::error_code); if (cxy_transform::Axis::Six_DoF == kj.jointType) kj.DoF = 6; else kj.DoF = 1; jointParaIdx_[ii] = jointParaIdxCount; jointParaIdxCount += kj.DoF; // joint model file name std::string modelFile; iss>>modelFile; kj.model_filename = "file://" + cxy_config::filePrefix_+modelFile; // the second line while (1) { if (!getline(fin_, line, lineStatus)) throw std::runtime_error("config file incomplete, no joint info found"); if (0 == lineStatus) { break; } } //std::stringstream ss2(line); iss.clear(); iss.str(line); //std::cout<<"iss: "<<line<<std::endl; iss>>kj.t[0]>>kj.t[1]>>kj.t[2]>>kj.r[0]>>kj.r[1]>>kj.r[2]; joint_config_.push_back(kj); } } cxy_transform::Axis cxy_config::parseJointType(const std::string& str) { if ("X_axis_rotation" == str) { ++joint_DoFs; return cxy_transform::Axis::X_axis_rotation; } if ("Y_axis_rotation" == str) { ++joint_DoFs; return cxy_transform::Axis::Y_axis_rotation; } if ("Z_axis_rotation" == str) { ++joint_DoFs; return cxy_transform::Axis::Z_axis_rotation; } if ("X_axis_translation" == str) { ++joint_DoFs; return cxy_transform::Axis::X_axis_translation; } if ("Y_axis_translation" == str) { ++joint_DoFs; return cxy_transform::Axis::Y_axis_translation; } if ("Z_axis_translation" == str) { ++joint_DoFs; return cxy_transform::Axis::Z_axis_translation; } if ("Six_DoF" == str) { joint_DoFs += 6; return cxy_transform::Axis::Six_DoF; } return cxy_transform::Axis::error_code; } }
[ "cuixiongyi2013@gmail.com" ]
cuixiongyi2013@gmail.com
433f2fe7bb2a68d61807f77d6cf545ac169c8b61
99c3367241944b41a480effb01f01f401ca2298e
/chapter7/window_mgr_7-32.hxx
fdb0eb42d2dac9faacb5b237d08a3e382c105966
[]
no_license
loeiten/cpp-primer
a07c89c1bc9cbdcdb7e3bbcf250f96afcdf1d88f
27834a2842963b6b600bd91a454d8a2567e6bbd5
refs/heads/master
2023-03-23T15:31:55.740980
2021-03-17T18:10:40
2021-03-18T10:10:41
298,062,289
0
0
null
null
null
null
UTF-8
C++
false
false
577
hxx
#ifndef CHAPTER7_WINDOW_MGR_7_32_HXX_ #define CHAPTER7_WINDOW_MGR_7_32_HXX_ #include <vector> using std::vector; #include "screen_7-32.hxx" class Window_mgr { public: using ScreenIndex = std::vector<Screen>::size_type; void clear(ScreenIndex); Window_mgr& add(Screen* s) { screens.push_back(s); return *this; } Screen* get(const ScreenIndex& i) { return screens[i]; } private: // In order to use the pointer, we need something to point to Screen init{24, 80, ' '}; std::vector<Screen*> screens{&init}; }; #endif // CHAPTER7_WINDOW_MGR_7_32_HXX_
[ "michael.l.magnussen@gmail.com" ]
michael.l.magnussen@gmail.com
e47c5f755fc693bc85ea69724c4c83ecbbfcb1ef
553d5058dd91754cc21b5a5d57b8d37a91b98f06
/Demos/duidemo/ControlEx.cpp
3218ef9da10dae9775a3e3228fac55ccfd802ca1
[ "MIT" ]
permissive
qq82850696/DuiLib_Ultimate
50279ee6d15a76e6c1dd160d4c3e1cdda68740db
850eb55149bf27c6d118ef877f7e246d07707276
refs/heads/master
2022-12-08T15:36:23.344289
2020-09-04T08:27:13
2020-09-04T08:27:13
292,857,442
1
0
MIT
2020-09-04T13:39:30
2020-09-04T13:39:30
null
GB18030
C++
false
false
9,504
cpp
#include "StdAfx.h" #include "ControlEx.h" ////////////////////////////////////////////////////////////////////////// // IMPLEMENT_DUICONTROL(CCircleProgressUI) IMPLEMENT_DUICONTROL(CMyComboUI) ////////////////////////////////////////////////////////////////////////// // IMPLEMENT_DUICONTROL(CChartViewUI) CChartViewUI::CChartViewUI(void) : m_ViewStyle(CHARTVIEW_PIE), m_sShadowImage(_T("")), m_ShadowImageHeight(0), m_sPillarImage(_T("")), m_PillarImageWidth(0), m_dwTextColor(0), m_dwDisabledTextColor(0), m_bShowHtml(false), m_bShowText(true), m_iFont(-1) { } CChartViewUI::~CChartViewUI(void) { } bool CChartViewUI::Add(LPCTSTR name, double value) { CHARTITEM item; item.name = name; item.value = value; m_items.push_back(item); return true; } bool CChartViewUI::AddAt(LPCTSTR name, double value, int iIndex) { if (iIndex < 0 || iIndex > (int)m_items.size()) { return false; } CHARTITEM item; item.name = name; item.value = value; m_items.insert(m_items.begin() + iIndex, item); return true; } void CChartViewUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { CControlUI::SetAttribute(pstrName, pstrValue); if (_tcscmp(pstrName, _T("view")) == 0) { if (_tcscmp(pstrValue, _T("pie")) == 0) { m_ViewStyle = CHARTVIEW_PIE; } else if (_tcscmp(pstrValue, _T("histpgram")) == 0) { m_ViewStyle = CHARTVIEW_HISTOGRAM; } } else if (_tcscmp(pstrName, _T("shadowimage")) == 0) { m_sShadowImage = pstrValue; } else if (_tcscmp(pstrName, _T("shadowimageheight")) == 0) { LPTSTR pstr = NULL; m_ShadowImageHeight = _tcstol(pstrValue, &pstr, 10); } else if (_tcscmp(pstrName, _T("pillarimage")) == 0) { m_sPillarImage = pstrValue; } else if (_tcscmp(pstrName, _T("pillarimagewidth")) == 0) { LPTSTR pstr = NULL; m_PillarImageWidth = _tcstol(pstrValue, &pstr, 10); } else if (_tcscmp(pstrName, _T("showhtml")) == 0) { m_bShowHtml = (_tcscmp(pstrValue, _T("true")) == 0); } else if (_tcscmp(pstrName, _T("showtext")) == 0) { m_bShowText = (_tcscmp(pstrValue, _T("true")) == 0); } else if (_tcscmp(pstrName, _T("font")) == 0) { LPTSTR pstr = NULL; m_iFont = _tcstol(pstrValue, &pstr, 10); } } bool CChartViewUI::DoPaint(HDC hDC, const RECT& rcPaint, CControlUI* pStopControl) { if( !::IntersectRect(&m_rcPaint, &rcPaint, &m_rcItem) ) return true; CControlUI::DoPaint(hDC, rcPaint, pStopControl); if (CHARTVIEW_PIE == m_ViewStyle) { DoPaintPie(hDC, rcPaint); } else if (CHARTVIEW_HISTOGRAM == m_ViewStyle) { DoPaintHistogram(hDC, rcPaint); } return true; } void CChartViewUI::DoPaintPie(HDC hDC, const RECT& rcPaint) { // 画饼图, 这下面使用了一些硬编码, 根据变量名, 就可以知道大概意思了 // 颜色总数以及颜色 const int NumOfColor = 18; static COLORREF bkColor[] = { RGB(63, 150, 245), RGB(255, 90, 1), RGB(106, 244, 192), RGB(245, 234, 106), RGB(252, 123, 151), RGB(162, 245, 63), RGB(157, 144, 252), RGB(210, 144, 252), RGB(127, 176, 203), RGB(244, 196, 113), RGB(162, 194, 133), RGB(189, 23, 23), RGB(189, 23, 179), RGB(97, 23, 189), RGB(23, 43, 189), RGB(18, 136, 76), RGB(136, 121, 18), RGB(136, 38, 18) }; int numOfItem = (int)m_items.size(); if (0 == numOfItem) { return; } // 绘画文字留出该值的宽度 int drawTextWidth = (m_bShowText ? 100 : 0); int drawTextHeight = 18; int i = 0; double amountOfItem = 0.f; for (i = 0; i < numOfItem; i++) { amountOfItem += m_items[i].value; } Gdiplus::Graphics graphics(hDC); graphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias); int drawPadding = 5; // 留出一定位置画阴影 // 计算绘图的合适位置(居中画饼图) int itemWidth = m_rcItem.right - m_rcItem.left; int itemHeight = m_rcItem.bottom - m_rcItem.top; int drawWidth = itemWidth - drawTextWidth - drawPadding * 2; int drawHeight = itemHeight - drawPadding * 2; int drawMaxSize = min(drawWidth, drawHeight); int drawLeft = m_rcItem.left + drawPadding + (drawWidth - drawMaxSize) / 2; int drawTop = m_rcItem.top + drawPadding + (drawHeight - drawMaxSize) / 2; int drawTextTop = m_rcItem.top + (drawHeight - numOfItem * drawTextHeight - numOfItem * 4) / 2; if ( drawTextTop <= m_rcItem.top + drawPadding) { drawTextTop = m_rcItem.top + drawPadding; } // 画外部的浅色阴影 Gdiplus::Color ellipseColor1(30, 30, 30, 30); Gdiplus::SolidBrush ellipseBrush1(ellipseColor1); graphics.FillEllipse(&ellipseBrush1, drawLeft - 4, drawTop - 4, drawMaxSize + 8, drawMaxSize + 8); // 画外部的深色轮廓 Gdiplus::Color ellipseColor2(100, 100, 100, 100); Gdiplus::SolidBrush ellipseBrush2(ellipseColor2); graphics.FillEllipse(&ellipseBrush2, drawLeft - 1, drawTop - 1, drawMaxSize + 2, drawMaxSize + 2); Gdiplus::REAL startAngle = 0; for (int i = 0; i < numOfItem; i++) { // 画饼图 Gdiplus::Color color; color.SetFromCOLORREF(bkColor[i % NumOfColor]); Gdiplus::SolidBrush brush(color); Gdiplus::REAL endAngle = (Gdiplus::REAL)(m_items[i].value / amountOfItem * 360); graphics.FillPie(&brush,drawLeft, drawTop, drawMaxSize, drawMaxSize, startAngle, endAngle); startAngle += endAngle; // 画文字 if (m_bShowText) { // 绘画文字 RECT rcText = {0}; rcText.left = drawLeft + drawMaxSize + 10; // 10为饼图和文字之间的间距 rcText.top = drawTextTop; rcText.right = rcText.left + drawTextWidth + drawTextHeight; rcText.bottom = rcText.top + drawTextHeight; if (::IntersectRect(&m_rcPaint, &rcText, &m_rcItem)) { graphics.FillRectangle(&brush, rcText.left, rcText.top, drawTextHeight, drawTextHeight); rcText.left += drawTextHeight + 5; // 因为在文字前面画了一个色块, 所以文字要在色块后面输出, 5为文字和色块的间距 int nLinks = 0; DWORD clrColor = IsEnabled() ? m_dwTextColor : m_dwDisabledTextColor; if(clrColor << 8 == 0) clrColor = 1; if( m_bShowHtml ) { CRenderEngine::DrawHtmlText(hDC, m_pManager, rcText, m_items[i].name, clrColor, \ NULL, NULL, nLinks, m_iFont, DT_LEFT | DT_VCENTER | DT_SINGLELINE); } else { CRenderEngine::DrawText(hDC, m_pManager, rcText, m_items[i].name, clrColor, \ m_iFont, DT_LEFT | DT_VCENTER | DT_SINGLELINE); } } // 计算下一个文字输出垂直位置的偏移量, 4为文字垂直间距 drawTextTop += drawTextHeight + 4; } } } void CChartViewUI::DoPaintHistogram(HDC hDC, const RECT& rcPaint) { // 画柱状图 int drawTextHeight = (m_bShowText ? 25 : 0); // 柱状图底部留出该值的高度以绘制文字 // 画柱状图阴影 if (!m_sShadowImage.IsEmpty()) { RECT rcShadow = m_rcItem; rcShadow.top = m_rcItem.bottom - m_ShadowImageHeight - drawTextHeight; rcShadow.right = m_rcItem.right; rcShadow.bottom = m_rcItem.bottom - drawTextHeight; if (!CRenderEngine::DrawImageString(hDC, m_pManager, rcShadow, m_rcPaint, m_sShadowImage, NULL)) { m_sShadowImage.Empty(); } } int numOfItem = (int)m_items.size(); if (0 == numOfItem) { return; } int i = 0; double maxOfItem = 0.f; double amountOfItem = 0.f; for (i = 0; i < numOfItem; i++) { if (m_items[i].value > maxOfItem) { maxOfItem = m_items[i].value; } amountOfItem += m_items[i].value; } int drawWidth = m_rcItem.right - m_rcItem.left; // 绘图宽度 int drawHeight = m_rcItem.bottom - m_rcItem.top - drawTextHeight; // 绘图高度 int pillarSpacing = (drawWidth / m_PillarImageWidth) * 2; // 柱子间间距 // 柱子的绘制水平偏移位置 int drawLeft = pillarSpacing; for (i = 0; i < numOfItem; i++) { // 绘画柱子 if (!m_sPillarImage.IsEmpty()) { double rateOfItem = m_items[i].value / maxOfItem; RECT rcPillar = m_rcItem; rcPillar.left = m_rcItem.left + drawLeft; rcPillar.top = m_rcItem.bottom - drawTextHeight - (int)( drawHeight * rateOfItem ); rcPillar.right = m_rcItem.left + drawLeft + m_PillarImageWidth; rcPillar.bottom = m_rcItem.bottom - drawTextHeight; if (!CRenderEngine::DrawImageString(hDC, m_pManager, rcPillar, m_rcPaint, m_sPillarImage, NULL)) { m_sPillarImage.Empty(); } } if (m_bShowText) { // 绘画文字 RECT rcText = m_rcItem; rcText.left = m_rcItem.left + drawLeft - pillarSpacing; rcText.top = m_rcItem.bottom - drawTextHeight; rcText.right = m_rcItem.left + drawLeft + m_PillarImageWidth + pillarSpacing; rcText.bottom = m_rcItem.bottom; int nLinks = 0; DWORD clrColor = IsEnabled() ? m_dwTextColor : m_dwDisabledTextColor; if(clrColor << 8 == 0) clrColor = 1; if( m_bShowHtml ) { CRenderEngine::DrawHtmlText(hDC, m_pManager, rcText, m_items[i].name, clrColor, \ NULL, NULL, nLinks, m_iFont, DT_CENTER | DT_VCENTER | DT_SINGLELINE); } else { CRenderEngine::DrawText(hDC, m_pManager, rcText, m_items[i].name, clrColor, \ m_iFont, DT_CENTER | DT_VCENTER | DT_SINGLELINE); } } // 计算下一个柱子的偏移位置 drawLeft += pillarSpacing; drawLeft += m_PillarImageWidth; } } ////////////////////////////////////////////////////////////////////////// // IMPLEMENT_DUICONTROL(CWndUI)
[ "qdtroy@qq.com" ]
qdtroy@qq.com
4ccb53a17f949982843645a0bacef17909a126e6
63a345a814273a8c3fb40a45efd0c7255b96091c
/arithmetic-slices-1.cpp
a558b945e629c831e342b492f0cc21abad063db2
[]
no_license
mamunhpath/leet-code
ed3f4aebcca850c2c7defbc6972acbedde57e7d3
7e2fc8f03dd5a637cf374e092f4626f10af15250
refs/heads/master
2022-02-01T22:07:52.115410
2019-03-17T21:48:54
2019-03-17T21:48:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
608
cpp
// https://leetcode.com/problems/arithmetic-slices/description/ class Solution { public: int numberOfArithmeticSlices(vector<int>& A) { int ans = 0, n = A.size(); if (n < 3) return ans; int diff = A[1] - A[0], len = 2; for(int i = 2; i < n; i++){ int temp = A[i] - A[i-1]; if (temp == diff) len++; else { ans += (len - 2) * (len - 1) / 2; diff = temp; len = 2; } } if (len > 2) ans += (len - 2) * (len - 1) / 2; return ans; } };
[ "noreply@github.com" ]
noreply@github.com
c6c0f4d01e5a2c991f6188587778f00a55f546b6
f5b0071f086ad6cb169923b195872eadde6b7f6d
/include/tchv_cof.cpp
e282d249ead13e824dab0af42140fe5536cb4779
[]
no_license
ijlabarca/cqmtf
3519659ffc77089cacf07659aa5620b65033c62d
86fb203e4aa7ae8ddfca28262ce2373024a120de
refs/heads/main
2023-01-07T00:24:27.022482
2020-11-09T18:03:26
2020-11-09T18:03:26
310,893,744
0
0
null
null
null
null
UTF-8
C++
false
false
1,182
cpp
#include <complex> #include <fftw3.h> #include "tchv_cof.h" using namespace std; typedef complex<double> dcomp; const dcomp i(0.0,1.0); const double pi= 4.0*atan(1.0); void *Tchv_cof(int n, dcomp* fxc,fftw_plan p){ int m; m= n-1; dcomp* vec =new dcomp[2*n-2]; vec[0]=fxc[n-1]; vec[n-1]=fxc[0]; for(int j=1; j<n-1;j++){ vec[j]=fxc[n-1-j]; vec[j+n-1]=fxc[j]; } fftw_execute_dft(p, reinterpret_cast<fftw_complex*>(vec),reinterpret_cast<fftw_complex*>(vec)); for (int j=0; j<n;j++){ fxc[j]=vec[j]/(double)m; } fxc[0]=0.5*fxc[0]; fxc[n-1]=0.5*fxc[n-1]; delete [] vec; } fftw_plan plan_0(int n, dcomp* fxc){ fftw_plan p; dcomp* vec= new dcomp[2*n-2]; vec[0]=fxc[n-1]; vec[n-1]=fxc[0]; for(int j=1; j<n-1;j++){ vec[j]=fxc[n-1-j]; vec[j+n-1]=fxc[j]; } fftw_complex* vecf =reinterpret_cast<fftw_complex*>(vec); p=fftw_plan_dft_1d(2*n-2, vecf, vecf, FFTW_FORWARD, FFTW_ESTIMATE); delete [] vec ; return p; } double *chebpts(int n){ double* x= new double[n]; for(int j=0; j<n;j++){ x[j]=cos((n-1-j)*pi/(n-1)); } return x; }
[ "ijlabarca@uc.cl" ]
ijlabarca@uc.cl
ae0fa2eab5056917ddb79c1fadda2dfda5145af6
f4f16016aa32bed9d3435dacd2d05b02aaf6f823
/roxlu/src/3d/Ray.h
19cb1e6b948d08ca3692eafacf6a4ad85214ac7a
[]
no_license
arneboon/roxlu
fafdfe9a2bb52a58512ec9c846477498b448123e
8deac64726006b5100941b768897990ce11d569b
refs/heads/master
2021-01-15T23:03:08.467744
2012-05-30T13:14:03
2012-05-30T13:14:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
394
h
#ifndef ROXLU_VEC3RAYH #define ROXLU_VEC3RAYH #include "Vec3.h" namespace roxlu { struct Ray { Ray() { }; Ray(Vec3 rayOrigin, Vec3 rayDir) :origin(rayOrigin) ,direction(rayDir) { } inline Ray& setOrigin(Vec3 o) { origin = o; return *this; } inline Ray& setDirection(Vec3 d) { direction = d; return *this; } Vec3 origin; Vec3 direction; }; } // roxlu #endif
[ "diederick@apollomedia.nl" ]
diederick@apollomedia.nl
a417a952f6a2bb9f6b4b2c298ccf6056cbbaf582
a0967fb856ef54124187716b39523d1206a1c007
/19-5-16-2(C++建立一个被称为sroot()的函数,返回其参数的二次方根.可以重载3次)/19-5-16-2(C++建立一个被称为sroot()的函数,返回其参数的二次方根.可以重载3次)/源.cpp
dbb308a2c334f9e096745c602aadf078c9c317e2
[]
no_license
yyaihh/Cpp
21b4d0da4ef351b9d97f1fb47c11f055b6690622
dbfa2361ae8e1a31ce6c29bb286507d36da5099d
refs/heads/master
2020-09-21T23:22:23.464218
2020-04-20T15:31:30
2020-04-20T15:31:30
224,968,447
0
0
null
null
null
null
GB18030
C++
false
false
596
cpp
#include<iostream> #include<stdlib.h> #include<cmath> using namespace std; double sroot(int n) { return sqrt(n); } double sroot(long n) { return sqrt(n); } double sroot(double n) { return sqrt(n); } int main() { int a = 10; long b = 10000; double c = 13.14; cout << a << "的二次方根为" << sroot(a) << endl;//此时调用的是参数为int型的sroot cout << b << "的二次方根为" << sroot(b) << endl;//此时调用的是参数为long型的sroot cout << c << "的二次方根为" << sroot(c) << endl;//此时调用的是参数为double型的sroot system("pause"); return 0; }
[ "1903870154@qq.com" ]
1903870154@qq.com
3c01e023f6c4b3550ed226bd1427b89a34de219c
c7ea2e805970570e50f8a88271d09f6d7392d93c
/Examples/Doc-GettingStarted-Yocto-milliVolt-Rx/main.cpp
af90d73587c8a275f0f3e33aa5844690e1383db0
[]
no_license
OdyX/yoctolib_cpp
8395d01228303415968d6e99b0f52f7d50d57100
697cd550799d88d9f6479d6f3c89718f1af4b60a
refs/heads/master
2021-01-20T06:03:54.199940
2017-08-03T17:04:01
2017-08-03T17:04:01
101,479,324
1
0
null
2017-08-26T10:36:28
2017-08-26T10:36:27
null
UTF-8
C++
false
false
1,510
cpp
#include "yocto_api.h" #include "yocto_genericsensor.h" #include <iostream> #include <stdlib.h> using namespace std; static void usage(void) { cout << "usage: demo <serial_number> " << endl; cout << " demo <logical_name>" << endl; cout << " demo any (use any discovered device)" << endl; u64 now = yGetTickCount(); while (yGetTickCount() - now < 3000) { // wait 3 sec to show the message } exit(1); } int main(int argc, const char * argv[]) { string errmsg, target; YGenericSensor *sensor; if (argc < 2) { usage(); } target = (string) argv[1]; // Setup the API to use local USB devices if (yRegisterHub("usb", errmsg) != YAPI_SUCCESS) { cerr << "RegisterHub error: " << errmsg << endl; return 1; } if (target == "any") { sensor = yFirstGenericSensor(); if (sensor == NULL) { cout << "No module connected (check USB cable)" << endl; return 1; } } else { sensor = yFindGenericSensor(target + ".genericSensor1"); } YGenericSensor *s1 = yFindGenericSensor(sensor->get_module()->get_serialNumber() + ".genericSensor1"); string unitSensor1; if (s1->isOnline()) unitSensor1 = s1->get_unit(); while (s1->isOnline()) { double value = s1->get_currentValue(); cout << "Voltage : " << value << unitSensor1 << endl; ySleep(1000, errmsg); }; yFreeAPI(); cout << "Module not connected (check identification and USB cable)"; return 0; }
[ "dev@yoctopuce.com" ]
dev@yoctopuce.com
bad81250d8f6a08e8ebacbbd072b8102bc0c17bf
8a1871b177729fc63fe42893f53b246f54ef1505
/GameEngine/Game/Scenes/GameScene.cpp
cb136a955f00cce50b2c7f4383d93dd6c1f48e32
[]
no_license
jasonpercival/GameEngine
953e1164121e112317c2168e2bb5be2500a686ec
1f518559e952dc725de0fc448f409ecdf2814d31
refs/heads/master
2023-01-08T12:17:45.788077
2020-11-13T00:46:36
2020-11-13T00:46:36
297,813,961
0
0
null
null
null
null
UTF-8
C++
false
false
2,665
cpp
#include "GameScene.h" GameScene::GameScene() : Scene(), backgroundMusic(nullptr), particleEmitter(nullptr) { Random::SetSeed(); } GameScene::~GameScene() { delete backgroundMusic, backgroundMusic = nullptr; delete particleEmitter, particleEmitter = nullptr; SceneGraph::GetInstance()->OnDestroy(); } bool GameScene::OnCreate() { Debug::Info("Creating game scene", "GameScene.cpp", __LINE__); // setup the shaders ShaderHandler::GetInstance()->CreateProgram("basicShader", "Engine/Shaders/VertexShader.glsl", "Engine/Shaders/FragmentShader.glsl"); ShaderHandler::GetInstance()->CreateProgram("colorShader", "Engine/Shaders/ColorVertexShader.glsl", "Engine/Shaders/ColorFragmentShader.glsl"); ShaderHandler::GetInstance()->CreateProgram("spriteShader", "Engine/Shaders/SpriteVertShader.glsl", "Engine/Shaders/SpriteFragShader.glsl"); ShaderHandler::GetInstance()->CreateProgram("particleShader", "Engine/Shaders/particleVertShader.glsl", "Engine/Shaders/particleFragShader.glsl"); // setup camera CoreEngine::GetInstance()->SetCamera(new Camera()); CoreEngine::GetInstance()->GetCamera()->SetPosition(glm::vec3(0.0f, 0.0f, 20.0f)); // setup audio AudioHandler::GetInstance()->Initialize(CoreEngine::GetInstance()->GetCamera()->GetPosition()); // light sources CoreEngine::GetInstance()->GetCamera()->AddLightSource(glm::vec3(0.0f, 0.0f, 2.0f), 0.1f, 0.5f, glm::vec3(1.0f, 1.0f, 1.0f)); // setup collision handler CollisionHandler::GetInstance()->OnCreate(100.0f); // create the apple model Model* appleModel = new Model("./Resources/Models/Apple.obj", "./Resources/Materials/Apple.mtl", ShaderHandler::GetInstance()->GetShader("basicShader")); SceneGraph::GetInstance()->AddModel(appleModel); // create an apple for testing mouse picking GameObject* apple = new GameObject(appleModel, glm::vec3(0.0f, 0.0f, -10.0f)); // setup sound FX on a game object when clicked apple->AddComponent<AudioSource>("quack.wav", false, true, false); // add game object to the scene graph SceneGraph::GetInstance()->AddGameObject(apple, "Crab Apple"); // create particle system particleEmitter = new ParticleEmitter(1000, "star", "particleShader"); return true; } void GameScene::Update(const float deltaTime_) { SceneGraph::GetInstance()->Update(deltaTime_); if (particleEmitter) particleEmitter->Update(deltaTime_); } void GameScene::Render() { SceneGraph::GetInstance()->Render(CoreEngine::GetInstance()->GetCamera()); if (particleEmitter) particleEmitter->Render(CoreEngine::GetInstance()->GetCamera()); } void GameScene::Draw() { SceneGraph::GetInstance()->Draw(CoreEngine::GetInstance()->GetCamera()); }
[ "jaepercival@gmail.com" ]
jaepercival@gmail.com
a7d9298456b26a84d83b1068f51310d89efc2da2
cc426fede0b4ecc7af978f23227e01b6e962df44
/src/vpg/data/handle.cpp
5649777d8b2e4994b05d99a30bfa0bbb7d9b17f5
[ "MIT" ]
permissive
RiscadoA/voxel-platformer
0618cef1b524eb9983e779c93fc8faa4c3d3adb0
4e7aadad978c333a59f452a8ee9f4612ee128614
refs/heads/master
2023-03-14T20:42:32.566603
2021-03-05T20:35:05
2021-03-05T20:35:05
342,795,753
5
2
null
null
null
null
UTF-8
C++
false
false
1,482
cpp
#include <vpg/data/handle.hpp> #include <vpg/data/manager.hpp> using namespace vpg::data; Handle<void>::Handle(Asset* asset) { this->asset = asset; if (this->asset != nullptr) { this->asset->inc_ref(); } } Handle<void>::Handle(const Handle& rhs) { this->asset = rhs.asset; if (this->asset != nullptr) { this->asset->inc_ref(); } } Handle<void>::Handle(Handle&& rhs) noexcept { this->asset = rhs.asset; rhs.asset = nullptr; } Handle<void>& Handle<void>::operator=(Asset* asset) { if (this->asset != nullptr) { this->asset->dec_ref(); this->asset = nullptr; } this->asset = asset; if (this->asset != nullptr) { this->asset->inc_ref(); } return *this; } Handle<void>& Handle<void>::operator=(const Handle& rhs) { if (this->asset != nullptr) { this->asset->dec_ref(); this->asset = nullptr; } this->asset = rhs.asset; if (this->asset != nullptr) { this->asset->inc_ref(); } return *this; } Handle<void>& Handle<void>::operator=(Handle&& rhs) noexcept { if (this->asset != nullptr) { this->asset->dec_ref(); this->asset = nullptr; } this->asset = rhs.asset; rhs.asset = nullptr; return *this; } Handle<void>::~Handle() { if (this->asset != nullptr) { this->asset->dec_ref(); this->asset = nullptr; } } Asset* Handle<void>::get_asset() const { return this->asset; }
[ "riscado.antunes@gmail.com" ]
riscado.antunes@gmail.com
1fa8d568a250166ced417277d032aaaee556d3d0
9434982dd261cd02f72d080d86ef02d929075ba3
/FileButton.cpp
47aba1bd6a07aa9eb0f9cffb709887e4ed05375c
[]
no_license
sunweile/yunpan
6f1de0bc8fcbd8aebe22196be4dfa428f12deb4f
a3b9b6cf2267b02b8129a1c8ae595ea0cbb5c158
refs/heads/master
2022-11-17T19:54:06.537371
2020-07-16T21:04:20
2020-07-16T21:04:20
280,255,280
0
0
null
null
null
null
UTF-8
C++
false
false
10,463
cpp
#include "FileButton.h" #include "DetailedFileView.h" #include "MainWindows.h" #pragma execution_character_set("utf-8") FileButton::FileButton(QWidget*parent) : QFrame(parent) { nameEdit = new QLineEdit(this); nameEdit->setFont(QFont("微软雅黑", 10, 50)); //nameEdit->installEventFilter(this); connect(nameEdit, SIGNAL(returnPressed()), this, SLOT(nameEditReturn())); nameEdit->adjustSize(); nameEdit->hide(); fileName = new QLabel(this); fileName->setFont(QFont("微软雅黑", 10, 50)); fileName->installEventFilter(this); fileName->setAttribute(Qt::WA_TranslucentBackground); fileImage = new QLabel(this); fileImage->setAttribute(Qt::WA_TranslucentBackground); fileDate = new QLabel(this); fileDate->setGeometry(740, 7, 300, 18); fileDate->setAttribute(Qt::WA_TranslucentBackground); fileDateLabel = new QLabel(this); fileDateLabel->setText("修改日期:"); fileDateLabel->setGeometry(660, 7, 80, 18); fileDateLabel->setAttribute(Qt::WA_TranslucentBackground); fileType = new QLabel(this); fileType->setGeometry(380, 7, 300, 18); fileType->setAttribute(Qt::WA_TranslucentBackground); fileTypeLabel = new QLabel(this); fileTypeLabel->setText("类型:"); fileTypeLabel->setGeometry(330, 7, 50, 18); fileTypeLabel->setAttribute(Qt::WA_TranslucentBackground); fileSize = new QLabel(this); fileSize->setGeometry(710, 28, 300, 18); fileSize->setAttribute(Qt::WA_TranslucentBackground); fileSizeLabel = new QLabel(this); fileSizeLabel->setText("大小:"); fileSizeLabel->setGeometry(660, 28, 50, 18); fileSizeLabel->setAttribute(Qt::WA_TranslucentBackground); mode = 0; fileName->hide(); fileImage->hide(); fileDate->hide(); fileDateLabel->hide(); fileType->hide(); fileTypeLabel->hide(); fileSize->hide(); fileSizeLabel->hide(); isUse = false; isChoose = false; timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(click())); time = 0; file = ""; } FileButton::~FileButton() { } int FileButton::setFile(VirtualDisk::fileTree* file, int mode) { VirtualDisk::fileTree file_ = *file; isUse = false; isChoose = false; this->file = file_.getNetPath(); this->mode = mode; fileDate->hide(); fileDateLabel->hide(); fileType->hide(); fileTypeLabel->hide(); fileSize->hide(); fileSizeLabel->hide(); fileName->setText(file_.name); nameEdit->setText(file_.name); long long size = file_.size; fileSize->setText(FileStringTools::getSize(size)); QFileIconProvider fp; QIcon file_icon; QIcon qi; QIcon fi; switch (file_.type) { case DIR: fileType->setText("文件夹"); fi = FileButton::IconsMap->value("<DIR>", qi); if (fi.isNull()) { file_icon = fp.icon(QFileInfo(this->file)); FileButton::IconsMap->insert("<DIR>", file_icon); } else { file_icon = fi; } break; default: QStringList fns = file_.name.split("."); if (fns.size() > 1) { fi = FileButton::IconsMap->value(file_.name.split(".").last(),qi); if (fi.isNull()) { if (QFile(this->file).exists()) { file_icon = fp.icon(QFileInfo(this->file)); FileButton::IconsMap->insert(file_.name.split(".").last(), file_icon); } else { } } else { file_icon = fi; } QString fn = FileStringTools::getFileType(fns.last()); fileType->setText(fn); } else { fi = FileButton::IconsMap->value("<FILE>",qi); if (fi.isNull()) { if (QFile(this->file).exists()) { file_icon = fp.icon(QFileInfo(this->file)); FileButton::IconsMap->insert("<FILE>", file_icon); } else { } } else { file_icon = fi; } QString fn = FileStringTools::getFileType(fns.last()); fileType->setText("文件"); } break; } qDebug() << this->file; qDebug() << file_icon; int m = 16 << (4-mode); if (mode == 0) { m = 256; } else if (mode == 1) { m = 32; } else if (mode == 2 || mode == 3) { m = 16; } QPixmap f = file_icon.pixmap(m, m); qDebug() << this->file; int w = f.width(); int h = f.height(); qDebug() << m; fileImage->setPixmap(f); fileImage->show(); switch (mode){ case 0: {//超大 fileName->setLineWidth(m); fileName->adjustSize(); fileImage->setGeometry((m-w)/2, (m - h) / 2, w, h); fileName->setGeometry((m - fileName->width()) / 2, m, fileName->width(), fileName->height()); fileName->show(); return m + fileName->height() + 24; } case 1: {//内容 setStyleSheet("FileButton{background:#ffffff;border-bottom:1px solid #dcdcdc;}"); fileName->setLineWidth(m); fileImage->setGeometry(3, 7, w, h); fileName->setGeometry(42, 1, 270, 20); fileName->adjustSize(); nameEdit->setGeometry(42, 1, fileName->width(), fileName->height()); nameEdit->adjustSize(); fileName->show(); fileDateLabel->show(); fileDate->show(); fileDate->setText(file->date); if (file->type != DIR) { fileSizeLabel->show(); fileSize->show(); fileType->show(); fileTypeLabel->show(); } return 50; } case 2: {//小 fileName->setLineWidth(m); fileName->setWordWrap(false); fileImage->setGeometry(3, 3, w, h); fileName->setGeometry(22, 1, 270, 20); fileName->show(); return 22; } default: break; } //fileDate->setText(file->date); return 300; } void FileButton::enterEvent(QEvent* event) { if (mode == 0) { setStyleSheet("FileButton{background:#e5f3ff;}"); } else if (mode == 1) { if (!isUse) { if (isChoose) { setStyleSheet("FileButton{background:#cde8ff;border-bottom:1px solid #b1cce3;border-left:1px solid #b1cce3;border-right:1px solid #b1cce3;}"); } else { setStyleSheet("FileButton{background:#e5f3ff;border-bottom:1px solid #dcdcdc;}"); } } else { if (isChoose) { setStyleSheet("FileButton{background:#cde8ff;border-bottom:1px solid #b1cce3;border-left:1px solid #b1cce3;border-right:1px solid #b1cce3;}"); } else { setStyleSheet("FileButton{background:#e5f3ff;border-bottom:1px solid #dcdcdc;}"); } } } else if (mode == 2) { setStyleSheet("FileButton{background:#e5f3ff;}"); } } void FileButton::leaveEvent(QEvent* event) { if (mode == 0) { setStyleSheet("FileButton{background:#ffffff;}"); } else if (mode == 1) { if (!isUse) { if (isChoose) { setStyleSheet("FileButton{background:#cde8ff;border-bottom:1px solid #dcdcdc;}"); } else { setStyleSheet("FileButton{background:#ffffff;border-bottom:1px solid #dcdcdc;}"); } } else { if (isChoose) { setStyleSheet("FileButton{background:#cde8ff;border-bottom:1px solid #b1cce3;border-left:1px solid #b1cce3;border-right:1px solid #b1cce3;}"); } else { setStyleSheet("FileButton{background:#ffffff;border-bottom:1px solid #b1cce3;border-left:1px solid #b1cce3;border-right:1px solid #b1cce3;}"); } } } else if (mode == 2) { setStyleSheet("FileButton{background:#ffffff;}"); } } void FileButton::mouseReleaseEvent(QMouseEvent* event) { QObject* f = parent(); while (f->parent() != NULL) { f = f->parent(); } if (((MainWindows*)f)->getShift()) { isChoose = true; ((DetailedFileView*)parent())->otherUse(this); } else { ((DetailedFileView*)parent())->otherUnUse(this); ((DetailedFileView*)parent())->setUsed(this); isUse = true; isChoose = true; } if (mode == 0) { setStyleSheet("FileButton{background:#cde8ff;border:1px solid #b1cce3;}"); } else if (mode == 1) { setStyleSheet("FileButton{background:#cde8ff;border-bottom:1px solid #b1cce3;border-left:1px solid #b1cce3;border-right:1px solid #b1cce3;}"); } else if (mode == 2) { setStyleSheet("FileButton{background:#cde8ff;border:1px solid #b1cce3;}"); } } void FileButton::mousePressEvent(QMouseEvent* event) { if (!timer->isActive()) { time = 0; timer->start(100); } else { timer->stop(); time = 0; if (time <= 4) { ((DetailedFileView*)(this->parent()))->open(file); } } if (mode == 0) { setStyleSheet("FileButton{background:#d8eaf9;}"); } else if (mode == 1) { if (!isUse) { setStyleSheet("FileButton{background:#d8eaf9;border-bottom:1px solid #dcdcdc;}"); } } else if (mode == 2) { setStyleSheet("FileButton{background:#d8eaf9;}"); } } void FileButton::focusOut() { setStyleSheet("FileButton{background:#ffffff;border-bottom:1px solid #dcdcdc;}"); isUse = false; isChoose = false; } void FileButton::focusOutChoose() { if (isUse) { setStyleSheet("FileButton{background:#ffffff;border-bottom:1px solid #b1cce3;border-left:1px solid #b1cce3;border-right:1px solid #b1cce3;}"); } else { setStyleSheet("FileButton{background:#ffffff;border-bottom:1px solid #dcdcdc;}"); } isChoose = false; } void FileButton::click() { time++; if (time == 5) { timer->stop(); time = 0; } } void FileButton::choose() { setStyleSheet("FileButton{background:#cde8ff;border-bottom:1px solid #dcdcdc;}"); isChoose = true; } void FileButton::use() { isUse = true; } void FileButton::unUse() { isUse = false; } void FileButton::unChoose() { isChoose = false; } QString FileButton::getFile() { return file; } bool FileButton::eventFilter(QObject* obj, QEvent* event) { if (obj == fileName) { if (isChoose && event->type() == QEvent::MouseButtonPress) { QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event); if (mouseEvent->button() == Qt::LeftButton){ QObject* f = parent(); while (f->parent() != NULL) { f = f->parent(); } ((MainWindows*)f)->setLineEdit(nameEdit); fileName->hide(); nameEdit->show(); return true; } else { return false; } } else { return false; } } else if (obj == nameEdit) { if (event->type() == QEvent::FocusOut) { QObject* f = parent(); while (f->parent() != NULL) { f = f->parent(); } if (((MainWindows*)f)->getLineEdit() == nameEdit) { nameEditReturn(); } } } return QFrame::eventFilter(obj, event); } void FileButton::nameEditReturn() { QObject* f = parent(); while (f->parent() != NULL) { f = f->parent(); } ((MainWindows*)f)->setLineEdit(NULL); fileName->setText(nameEdit->text()); nameEdit->hide(); fileName->show(); ((DetailedFileView*)parent())->getUh()->rename(file, nameEdit->text()); }
[ "2930657262@qq.com" ]
2930657262@qq.com
dd689b0af349cc0728980b7320f6308d62d9621f
b77aa57740e99c19d6aaa140afa4523f7520dc03
/Projekt/Projekt/Wojownik.cpp
106f91330939826de1a191645ffbaa11d11d9e85
[]
no_license
km95/Programowanie_obiektowe
9a8ab221b82cf66ff53ad074630a47bde3cf3cf3
9f00307c9f693b09c525b44d12101d991708b444
refs/heads/master
2021-07-07T22:56:14.230140
2017-10-04T15:48:30
2017-10-04T15:48:30
105,784,105
0
0
null
null
null
null
WINDOWS-1250
C++
false
false
2,995
cpp
#include "Wojownik.h" Wojownik::Wojownik() { } //*************************************************************************************************************************************************************************************************** Wojownik::Wojownik(string n) { nick = n; Klasa = "Wojownik"; level = 1; MaxExp = 50; Exp = 0; MaxHP = 100; HP = MaxHP; Sila = 10; Zrecznosc = 5; skalowanie_sily = 1.5; skalowanie_zrecznosci = 1.5; odpornosc = 1.1; Kasa = 100; Prawa_reka_id = 5; Lewa_reka_id = 5; Zbroja_id = 20; Punkty_statystyk = 0; arena = 1; } //*************************************************************************************************************************************************************************************************** Wojownik::~Wojownik() { } //*************************************************************************************************************************************************************************************************** void Wojownik::wypisz_staty() { cout << "Statystyki: " << endl; cout << "Klasa postaci: " << Klasa << endl; cout << "Posiadany poziom: " << level << endl; cout << "Doswiadczenie: " << Exp << " / " << MaxExp << endl; cout << "Zycie: " << HP << " / " << MaxHP << endl; cout << "Sila: " << Sila << endl; cout << "Zrecznosc: " << Zrecznosc << endl; cout << "Punkty statystyk: " << Punkty_statystyk << endl; cout << "Kasa: " << Kasa << endl; } //*************************************************************************************************************************************************************************************************** void Wojownik::atak(Postac &Przeciwnik, Przedmiot ** E) { //cout << E[Prawa_reka_id]->getMin(); int atak = sredni_atak(E); //+E[Prawa_reka_id]->getMin() ); HANDLE hOut; hOut = GetStdHandle(STD_OUTPUT_HANDLE); cout << nick; SetConsoleTextAttribute(hOut, FOREGROUND_RED); cout << " Zadał: " << atak << setw(21) << " Obr "; SetConsoleTextAttribute(hOut, 0x0007); Przeciwnik.przyjmij_obrazenia(atak,E); } //*************************************************************************************************************************************************************************************************** void Wojownik::przyjmij_obrazenia(double atak, Przedmiot **E) { double redukcja_obrazen = Pancerz(E); atak = atak - redukcja_obrazen; if (atak > 0) { HP = HP - atak; obrazenia_otrzymane += atak; } else atak = 0; HANDLE hOut; hOut = GetStdHandle(STD_OUTPUT_HANDLE); cout << nick; SetConsoleTextAttribute(hOut, FOREGROUND_GREEN); cout << " Otrzymał: " << atak << " Obr " << endl << endl; SetConsoleTextAttribute(hOut, 0x0007); } int Wojownik::Pancerz(Przedmiot ** E) { return ((odpornosc *E[Zbroja_id]->getPancerz())); } int Wojownik::sredni_atak(Przedmiot ** E) { return((skalowanie_zrecznosci*Zrecznosc) + (skalowanie_sily*Sila) + ((E[Prawa_reka_id]->getMax() + E[Prawa_reka_id]->getMin()) / 2) + rand() % 10 ); }
[ "sz.ka@interia.pl" ]
sz.ka@interia.pl
b8ac94bd0a43e5db9013625f9400b1cb567f6cc4
affd22e02952603e95fd1cfdb5ec3cffded764b7
/tests/CoreTests/Chaingen.h
93305747ecae1233139b62feb2af6d25527b8755
[]
no_license
rizcrypto/bitcoin2
f549d19f63ca323fe9f362d7698ddd08443837b1
99c297640dd136254d589ceeae2aeb4a9a73fdf6
refs/heads/master
2020-03-10T09:31:00.486865
2018-04-13T01:33:49
2018-04-13T01:33:49
128,750,936
0
0
null
null
null
null
UTF-8
C++
false
false
28,358
h
// Copyright (c) 2011-2016 The Cryptonote developers // Copyright (c) 2017-2018 B2N-project developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include <boost/program_options.hpp> #include <boost/serialization/variant.hpp> #include "CryptoNoteCore/CoreConfig.h" #include "Common/CommandLine.h" #include "Common/ConsoleTools.h" #include "CryptoNoteCore/Account.h" #include "CryptoNoteCore/Core.h" #include "CryptoNoteCore/TransactionExtra.h" #include "../TestGenerator/TestGenerator.h" #include "CryptoNoteCore/CryptoNoteTools.h" #include "BoostSerializationHelper.h" #include "AccountBoostSerialization.h" #include <Logging/LoggerGroup.h> #include <Logging/ConsoleLogger.h> namespace concolor { using namespace Common::Console; inline std::basic_ostream<char, std::char_traits<char> >& bright_white(std::basic_ostream<char, std::char_traits<char> >& ostr) { setTextColor(Color::BrightWhite); return ostr; } inline std::basic_ostream<char, std::char_traits<char> >& red(std::basic_ostream<char, std::char_traits<char> >& ostr) { setTextColor(Color::BrightRed); return ostr; } inline std::basic_ostream<char, std::char_traits<char> >& green(std::basic_ostream<char, std::char_traits<char> >& ostr) { setTextColor(Color::BrightGreen); return ostr; } inline std::basic_ostream<char, std::char_traits<char> >& magenta(std::basic_ostream<char, std::char_traits<char> >& ostr) { setTextColor(Color::BrightMagenta); return ostr; } inline std::basic_ostream<char, std::char_traits<char> >& yellow(std::basic_ostream<char, std::char_traits<char> >& ostr) { setTextColor(Color::BrightYellow); return ostr; } inline std::basic_ostream<char, std::char_traits<char> >& normal(std::basic_ostream<char, std::char_traits<char> >& ostr) { setTextColor(Color::Default); return ostr; } } #define LOG_ERROR(msg) std::cout << concolor::red << msg << concolor::normal << std::endl #define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message) do{if(!(expr)) {std::cout << concolor::red << message << concolor::normal << std::endl; return fail_ret_val;};}while(0) #define CHECK_AND_NO_ASSERT_MES(expr, fail_ret_val, message) do{if(!(expr)) {std::cout << concolor::red << message << concolor::normal << std::endl; return fail_ret_val;};}while(0) struct callback_entry { std::string callback_name; //BEGIN_SERIALIZE_OBJECT() // FIELD(callback_name) //END_SERIALIZE() private: friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int /*version*/) { ar & callback_name; } }; template<typename T> struct serialized_object { serialized_object() { } serialized_object(const CryptoNote::BinaryArray& a_data) : data(a_data) { } CryptoNote::BinaryArray data; //BEGIN_SERIALIZE_OBJECT() // FIELD(data) // END_SERIALIZE() private: friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int /*version*/) { ar & data; } }; typedef serialized_object<CryptoNote::Block> serialized_block; typedef serialized_object<CryptoNote::Transaction> serialized_transaction; struct event_visitor_settings { int valid_mask; bool txs_keeped_by_block; enum settings { set_txs_keeped_by_block = 1 << 0 }; event_visitor_settings(int a_valid_mask = 0, bool a_txs_keeped_by_block = false) : valid_mask(a_valid_mask) , txs_keeped_by_block(a_txs_keeped_by_block) { } private: friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int /*version*/) { ar & valid_mask; ar & txs_keeped_by_block; } }; //VARIANT_TAG(binary_archive, callback_entry, 0xcb); //VARIANT_TAG(binary_archive, CryptoNote::account_base, 0xcc); //VARIANT_TAG(binary_archive, serialized_block, 0xcd); //VARIANT_TAG(binary_archive, serialized_transaction, 0xce); //VARIANT_TAG(binary_archive, event_visitor_settings, 0xcf); typedef boost::variant<CryptoNote::Block, CryptoNote::Transaction, CryptoNote::AccountBase, callback_entry, serialized_block, serialized_transaction, event_visitor_settings> test_event_entry; typedef std::unordered_map<Crypto::Hash, const CryptoNote::Transaction*> map_hash2tx_t; class test_chain_unit_base: boost::noncopyable { public: test_chain_unit_base() : m_currency(CryptoNote::CurrencyBuilder(m_logger).currency()) { } typedef std::function<bool (CryptoNote::core& c, size_t ev_index, const std::vector<test_event_entry> &events)> verify_callback; typedef std::map<std::string, verify_callback> callbacks_map; const CryptoNote::Currency& currency() const; void register_callback(const std::string& cb_name, verify_callback cb); bool verify(const std::string& cb_name, CryptoNote::core& c, size_t ev_index, const std::vector<test_event_entry> &events); protected: mutable Logging::ConsoleLogger m_logger; CryptoNote::Currency m_currency; private: callbacks_map m_callbacks; }; bool construct_tx_to_key(Logging::ILogger& logger, const std::vector<test_event_entry>& events, CryptoNote::Transaction& tx, const CryptoNote::Block& blk_head, const CryptoNote::AccountBase& from, const CryptoNote::AccountBase& to, uint64_t amount, uint64_t fee, size_t nmix); CryptoNote::Transaction construct_tx_with_fee(Logging::ILogger& logger, std::vector<test_event_entry>& events, const CryptoNote::Block& blk_head, const CryptoNote::AccountBase& acc_from, const CryptoNote::AccountBase& acc_to, uint64_t amount, uint64_t fee); void get_confirmed_txs(const std::vector<CryptoNote::Block>& blockchain, const map_hash2tx_t& mtx, map_hash2tx_t& confirmed_txs); bool find_block_chain(const std::vector<test_event_entry>& events, std::vector<CryptoNote::Block>& blockchain, map_hash2tx_t& mtx, const Crypto::Hash& head); void fill_tx_sources_and_destinations(const std::vector<test_event_entry>& events, const CryptoNote::Block& blk_head, const CryptoNote::AccountBase& from, const CryptoNote::AccountBase& to, uint64_t amount, uint64_t fee, size_t nmix, std::vector<CryptoNote::TransactionSourceEntry>& sources, std::vector<CryptoNote::TransactionDestinationEntry>& destinations); uint64_t get_balance(const CryptoNote::AccountBase& addr, const std::vector<CryptoNote::Block>& blockchain, const map_hash2tx_t& mtx); //-------------------------------------------------------------------------- template<class t_test_class> auto do_check_tx_verification_context(const CryptoNote::tx_verification_context& tvc, bool tx_added, size_t event_index, const CryptoNote::Transaction& tx, t_test_class& validator, int) -> decltype(validator.check_tx_verification_context(tvc, tx_added, event_index, tx)) { return validator.check_tx_verification_context(tvc, tx_added, event_index, tx); } //-------------------------------------------------------------------------- template<class t_test_class> bool do_check_tx_verification_context(const CryptoNote::tx_verification_context& tvc, bool tx_added, size_t /*event_index*/, const CryptoNote::Transaction& /*tx*/, t_test_class&, long) { // Default block verification context check if (tvc.m_verifivation_failed) throw std::runtime_error("Transaction verification failed"); return true; } //-------------------------------------------------------------------------- template<class t_test_class> bool check_tx_verification_context(const CryptoNote::tx_verification_context& tvc, bool tx_added, size_t event_index, const CryptoNote::Transaction& tx, t_test_class& validator) { // SFINAE in action return do_check_tx_verification_context(tvc, tx_added, event_index, tx, validator, 0); } //-------------------------------------------------------------------------- template<class t_test_class> auto do_check_block_verification_context(const CryptoNote::block_verification_context& bvc, size_t event_index, const CryptoNote::Block& blk, t_test_class& validator, int) -> decltype(validator.check_block_verification_context(bvc, event_index, blk)) { return validator.check_block_verification_context(bvc, event_index, blk); } //-------------------------------------------------------------------------- template<class t_test_class> bool do_check_block_verification_context(const CryptoNote::block_verification_context& bvc, size_t /*event_index*/, const CryptoNote::Block& /*blk*/, t_test_class&, long) { // Default block verification context check if (bvc.m_verifivation_failed) throw std::runtime_error("Block verification failed"); return true; } //-------------------------------------------------------------------------- template<class t_test_class> bool check_block_verification_context(const CryptoNote::block_verification_context& bvc, size_t event_index, const CryptoNote::Block& blk, t_test_class& validator) { // SFINAE in action return do_check_block_verification_context(bvc, event_index, blk, validator, 0); } /************************************************************************/ /* */ /************************************************************************/ template<class t_test_class> struct push_core_event_visitor: public boost::static_visitor<bool> { private: CryptoNote::core& m_c; const std::vector<test_event_entry>& m_events; t_test_class& m_validator; size_t m_ev_index; bool m_txs_keeped_by_block; public: push_core_event_visitor(CryptoNote::core& c, const std::vector<test_event_entry>& events, t_test_class& validator) : m_c(c) , m_events(events) , m_validator(validator) , m_ev_index(0) , m_txs_keeped_by_block(false) { } void event_index(size_t ev_index) { m_ev_index = ev_index; } bool operator()(const event_visitor_settings& settings) { log_event("event_visitor_settings"); if (settings.valid_mask & event_visitor_settings::set_txs_keeped_by_block) { m_txs_keeped_by_block = settings.txs_keeped_by_block; } return true; } bool operator()(const CryptoNote::Transaction& tx) const { log_event("CryptoNote::Transaction"); CryptoNote::tx_verification_context tvc = boost::value_initialized<decltype(tvc)>(); size_t pool_size = m_c.get_pool_transactions_count(); m_c.handle_incoming_tx(toBinaryArray(tx), tvc, m_txs_keeped_by_block); bool tx_added = pool_size + 1 == m_c.get_pool_transactions_count(); bool r = check_tx_verification_context(tvc, tx_added, m_ev_index, tx, m_validator); CHECK_AND_NO_ASSERT_MES(r, false, "tx verification context check failed"); return true; } bool operator()(const CryptoNote::Block& b) const { log_event("CryptoNote::Block"); CryptoNote::block_verification_context bvc = boost::value_initialized<decltype(bvc)>(); m_c.handle_incoming_block_blob(toBinaryArray(b), bvc, false, false); bool r = check_block_verification_context(bvc, m_ev_index, b, m_validator); CHECK_AND_NO_ASSERT_MES(r, false, "block verification context check failed"); return r; } bool operator()(const callback_entry& cb) const { log_event(std::string("callback_entry ") + cb.callback_name); return m_validator.verify(cb.callback_name, m_c, m_ev_index, m_events); } bool operator()(const CryptoNote::AccountBase& ab) const { log_event("CryptoNote::account_base"); return true; } bool operator()(const serialized_block& sr_block) const { log_event("serialized_block"); CryptoNote::block_verification_context bvc = boost::value_initialized<decltype(bvc)>(); m_c.handle_incoming_block_blob(sr_block.data, bvc, false, false); CryptoNote::Block blk; if (!CryptoNote::fromBinaryArray(blk, sr_block.data)) { blk = CryptoNote::Block(); } bool r = check_block_verification_context(bvc, m_ev_index, blk, m_validator); CHECK_AND_NO_ASSERT_MES(r, false, "block verification context check failed"); return true; } bool operator()(const serialized_transaction& sr_tx) const { log_event("serialized_transaction"); CryptoNote::tx_verification_context tvc = boost::value_initialized<decltype(tvc)>();; size_t pool_size = m_c.get_pool_transactions_count(); m_c.handle_incoming_tx(sr_tx.data, tvc, m_txs_keeped_by_block); bool tx_added = pool_size + 1 == m_c.get_pool_transactions_count(); CryptoNote::Transaction tx; if (!CryptoNote::fromBinaryArray(tx, sr_tx.data)) { tx = CryptoNote::Transaction(); } bool r = check_tx_verification_context(tvc, tx_added, m_ev_index, tx, m_validator); CHECK_AND_NO_ASSERT_MES(r, false, "transaction verification context check failed"); return true; } private: void log_event(const std::string& event_type) const { std::cout << concolor::yellow << "=== EVENT # " << m_ev_index << ": " << event_type << concolor::normal << std::endl; } }; //-------------------------------------------------------------------------- template<class t_test_class> inline bool replay_events_through_core(CryptoNote::core& cr, const std::vector<test_event_entry>& events, t_test_class& validator) { try { CHECK_AND_ASSERT_MES(typeid(CryptoNote::Block) == events[0].type(), false, "First event must be genesis block creation"); cr.set_genesis_block(boost::get<CryptoNote::Block>(events[0])); bool r = true; push_core_event_visitor<t_test_class> visitor(cr, events, validator); for (size_t i = 1; i < events.size() && r; ++i) { visitor.event_index(i); r = boost::apply_visitor(visitor, events[i]); } return r; } catch (std::exception& e) { std::cout << "replay_events_through_core: " << e.what(); return false; } } //-------------------------------------------------------------------------- template<class t_test_class> inline bool do_replay_events(std::vector<test_event_entry>& events, t_test_class& validator) { boost::program_options::options_description desc("Allowed options"); CryptoNote::CoreConfig::initOptions(desc); command_line::add_arg(desc, command_line::arg_data_dir); boost::program_options::variables_map vm; bool r = command_line::handle_error_helper(desc, [&]() { boost::program_options::store(boost::program_options::basic_parsed_options<char>(&desc), vm); boost::program_options::notify(vm); return true; }); if (!r) return false; Logging::ConsoleLogger logger; CryptoNote::CoreConfig coreConfig; coreConfig.init(vm); CryptoNote::MinerConfig emptyMinerConfig; CryptoNote::cryptonote_protocol_stub pr; //TODO: stub only for this kind of test, make real validation of relayed objects CryptoNote::core c(validator.currency(), &pr, logger); if (!c.init(coreConfig, emptyMinerConfig, false)) { std::cout << concolor::magenta << "Failed to init core" << concolor::normal << std::endl; return false; } return replay_events_through_core<t_test_class>(c, events, validator); } //-------------------------------------------------------------------------- template<class t_test_class> inline bool do_replay_file(const std::string& filename) { std::vector<test_event_entry> events; if (!Tools::unserialize_obj_from_file(events, filename)) { std::cout << concolor::magenta << "Failed to deserialize data from file: " << filename << concolor::normal << std::endl; return false; } t_test_class validator; return do_replay_events<t_test_class>(events, validator); } //-------------------------------------------------------------------------- #define GENERATE_ACCOUNT(account) \ CryptoNote::AccountBase account; \ account.generate(); #define MAKE_ACCOUNT(VEC_EVENTS, account) \ CryptoNote::AccountBase account; \ account.generate(); \ VEC_EVENTS.push_back(account); #define DO_CALLBACK(VEC_EVENTS, CB_NAME) \ { \ callback_entry CALLBACK_ENTRY; \ CALLBACK_ENTRY.callback_name = CB_NAME; \ VEC_EVENTS.push_back(CALLBACK_ENTRY); \ } #define REGISTER_CALLBACK(CB_NAME, CLBACK) \ register_callback(CB_NAME, std::bind(&CLBACK, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); #define REGISTER_CALLBACK_METHOD(CLASS, METHOD) \ register_callback(#METHOD, std::bind(&CLASS::METHOD, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); #define MAKE_GENESIS_BLOCK(VEC_EVENTS, BLK_NAME, MINER_ACC, TS) \ test_generator generator(this->m_currency); \ CryptoNote::Block BLK_NAME; \ generator.constructBlock(BLK_NAME, MINER_ACC, TS); \ VEC_EVENTS.push_back(BLK_NAME); #define MAKE_NEXT_BLOCK(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC) \ CryptoNote::Block BLK_NAME; \ generator.constructBlock(BLK_NAME, PREV_BLOCK, MINER_ACC); \ VEC_EVENTS.push_back(BLK_NAME); #define MAKE_NEXT_BLOCK_TX1(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TX1) \ CryptoNote::Block BLK_NAME; \ { \ std::list<CryptoNote::Transaction> tx_list; \ tx_list.push_back(TX1); \ generator.constructBlock(BLK_NAME, PREV_BLOCK, MINER_ACC, tx_list); \ } \ VEC_EVENTS.push_back(BLK_NAME); #define MAKE_NEXT_BLOCK_TX_LIST(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, TXLIST) \ CryptoNote::Block BLK_NAME; \ generator.constructBlock(BLK_NAME, PREV_BLOCK, MINER_ACC, TXLIST); \ VEC_EVENTS.push_back(BLK_NAME); #define REWIND_BLOCKS_N(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, COUNT) \ CryptoNote::Block BLK_NAME; \ { \ CryptoNote::Block blk_last = PREV_BLOCK; \ for (size_t i = 0; i < COUNT; ++i) \ { \ MAKE_NEXT_BLOCK(VEC_EVENTS, blk, blk_last, MINER_ACC); \ blk_last = blk; \ } \ BLK_NAME = blk_last; \ } #define REWIND_BLOCKS(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC) \ REWIND_BLOCKS_N(VEC_EVENTS, BLK_NAME, PREV_BLOCK, MINER_ACC, this->m_currency.minedMoneyUnlockWindow()) #define MAKE_TX_MIX(VEC_EVENTS, TX_NAME, FROM, TO, AMOUNT, NMIX, HEAD) \ CryptoNote::Transaction TX_NAME; \ construct_tx_to_key(this->m_logger, VEC_EVENTS, TX_NAME, HEAD, FROM, TO, AMOUNT, this->m_currency.minimumFee(), NMIX); \ VEC_EVENTS.push_back(TX_NAME); #define MAKE_TX(VEC_EVENTS, TX_NAME, FROM, TO, AMOUNT, HEAD) MAKE_TX_MIX(VEC_EVENTS, TX_NAME, FROM, TO, AMOUNT, 0, HEAD) #define MAKE_TX_MIX_LIST(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, NMIX, HEAD) \ { \ CryptoNote::Transaction t; \ construct_tx_to_key(this->m_logger, VEC_EVENTS, t, HEAD, FROM, TO, AMOUNT, this->m_currency.minimumFee(), NMIX); \ SET_NAME.push_back(t); \ VEC_EVENTS.push_back(t); \ } #define MAKE_TX_LIST(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD) MAKE_TX_MIX_LIST(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, 0, HEAD) #define MAKE_TX_LIST_START(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD) \ std::list<CryptoNote::Transaction> SET_NAME; \ MAKE_TX_LIST(VEC_EVENTS, SET_NAME, FROM, TO, AMOUNT, HEAD); #define MAKE_MINER_TX_AND_KEY_MANUALLY(TX, BLK, KEY) \ Transaction TX; \ if (!constructMinerTxManually(this->m_currency, get_block_height(BLK) + 1, generator.getAlreadyGeneratedCoins(BLK), \ miner_account.getAccountKeys().address, TX, 0, KEY)) \ return false; #define MAKE_MINER_TX_MANUALLY(TX, BLK) MAKE_MINER_TX_AND_KEY_MANUALLY(TX, BLK, 0) #define SET_EVENT_VISITOR_SETT(VEC_EVENTS, SETT, VAL) VEC_EVENTS.push_back(event_visitor_settings(SETT, VAL)); #define GENERATE(filename, genclass) \ { \ std::vector<test_event_entry> events; \ genclass g; \ g.generate(events); \ if (!Tools::serialize_obj_to_file(events, filename)) \ { \ std::cout << concolor::magenta << "Failed to serialize data to file: " << filename << concolor::normal << std::endl; \ throw std::runtime_error("Failed to serialize data to file"); \ } \ } #define PLAY(filename, genclass) \ if(!do_replay_file<genclass>(filename)) \ { \ std::cout << concolor::magenta << "Failed to pass test : " << #genclass << concolor::normal << std::endl; \ return 1; \ } #define GENERATE_AND_PLAY(genclass) \ { \ std::vector<test_event_entry> events; \ ++tests_count; \ bool generated = false; \ try \ { \ genclass g; \ generated = g.generate(events);; \ } \ catch (const std::exception& ex) \ { \ std::cout << #genclass << " generation failed: what=" << ex.what(); \ } \ catch (...) \ { \ std::cout << #genclass << " generation failed: generic exception"; \ } \ genclass validator; \ if (generated && do_replay_events< genclass >(events, validator)) \ { \ std::cout << concolor::green << "#TEST# Succeeded " << #genclass << concolor::normal << '\n'; \ } \ else \ { \ std::cout << concolor::magenta << "#TEST# Failed " << #genclass << concolor::normal << '\n'; \ failed_tests.push_back(#genclass); \ } \ std::cout << std::endl; \ } template <typename GenClassT> bool GenerateAndPlay(const char* testname, GenClassT&& g) { std::vector<test_event_entry> events; bool generated = false; try { generated = g.generate(events); } catch (const std::exception& ex) { std::cout << testname << " generation failed: what=" << ex.what(); } catch (...) { std::cout << testname << " generation failed: generic exception"; } bool succeeded = generated && do_replay_events<GenClassT>(events, g); if (succeeded) { std::cout << concolor::green << "#TEST# Succeeded " << testname << concolor::normal << '\n'; } else { std::cout << concolor::magenta << "#TEST# Failed " << testname << concolor::normal << '\n'; } std::cout << std::endl; return succeeded; } #define GENERATE_AND_PLAY_EX(genclass) { ++tests_count; if (!GenerateAndPlay(#genclass, genclass)) failed_tests.push_back(#genclass); } #define CALL_TEST(test_name, function) \ { \ if(!function()) \ { \ std::cout << concolor::magenta << "#TEST# Failed " << test_name << concolor::normal << std::endl; \ return 1; \ } \ else \ { \ std::cout << concolor::green << "#TEST# Succeeded " << test_name << concolor::normal << std::endl; \ } \ } template<uint64_t N> struct Pow10 { static const uint64_t value = 10 * Pow10<N - 1>::value; }; template<> struct Pow10<0> { static const uint64_t value = 1; }; const uint64_t COIN = Pow10<CryptoNote::parameters::CRYPTONOTE_DISPLAY_DECIMAL_POINT>::value; #define QUOTEME(x) #x #define DEFINE_TESTS_ERROR_CONTEXT(text) const char* perr_context = text; #define CHECK_TEST_CONDITION(cond) CHECK_AND_ASSERT_MES(cond, false, "[" << perr_context << "] failed: \"" << QUOTEME(cond) << "\"") #define CHECK_EQ(v1, v2) CHECK_AND_ASSERT_MES(v1 == v2, false, "[" << perr_context << "] failed: \"" << QUOTEME(v1) << " == " << QUOTEME(v2) << "\", " << v1 << " != " << v2) #define CHECK_NOT_EQ(v1, v2) CHECK_AND_ASSERT_MES(!(v1 == v2), false, "[" << perr_context << "] failed: \"" << QUOTEME(v1) << " != " << QUOTEME(v2) << "\", " << v1 << " == " << v2) #define MK_COINS(amount) (UINT64_C(amount) * COIN)
[ "rizcrypto@gmail.com" ]
rizcrypto@gmail.com
077d742ef7684e0b795085c3c11df9130609eb43
7ec4ce13fe476404a1769d9958dc41bef48661bc
/04032018/staticPrivate.cpp
7e1092116ad736a20cc7d70b3bc4b6256ceb075b
[]
no_license
meihao1203/learning
45679e1b0912b62f7a6ef1999fb2a374733f5926
dbef1a1b6ccb704c53b2439661d062eb69060a0d
refs/heads/master
2021-07-19T23:36:50.602595
2018-12-09T02:03:06
2018-12-09T02:03:06
113,955,622
11
4
null
null
null
null
UTF-8
C++
false
false
805
cpp
/// /// @file staticPrivate.cpp /// @author meihao1203(meihao19931203@outlook.com) /// @date 2018-04-03 10:54:51 /// #include<iostream> using namespace std; class A { public: static A* createObject(int x) { return new A(x); } ~A() // 静态对象没有this指针 { cout<<"~A()"<<endl; } static void deleteObject(A* p) { // 所以要这样来析构 if(NULL!=p) { delete p; p = NULL; } } void disp() { cout<<"x = "<<_x<<endl; } private: int _x; A(int x=0):_x(x){} }; int main() { //A a; //错误, Example的构造函数是private类型, 不能访问 //A* a = new A(1); //错误, Example的构造函数是private类型, 不能new A* a = A::createObject(1); a->disp(); //A::deleteObject(a); delete a; return 0; } //x = 1 //~A()
[ "meihao19931203@outlook.com" ]
meihao19931203@outlook.com
1e3ed7552612e820e5e259ca6033fc4e44fdb0a7
f3e0f1eb1e692606c08b7f1ed13d726b32e4741c
/TestDuilib/TestDuilib/MainWnd.cpp
cd3df288daeb5c0a4eabfb32583f3aae3659bfbc
[]
no_license
Lange-Taylor/test
a9ecdd6e9db7cd6498f2703c2f1af91ceb131022
da5630a3f2538fad3433e3c0965e19ccbc104baf
refs/heads/master
2022-03-13T21:54:43.013580
2019-11-20T07:05:34
2019-11-20T07:05:34
193,446,452
0
0
null
null
null
null
GB18030
C++
false
false
6,086
cpp
#include "MainWnd.h" //xml文件对应的目录 CDuiString MainWnd::GetSkinFolder() { return _T(""); } //xml文件的名字 CDuiString MainWnd::GetSkinFile() { //return _T("CashierManage.xml"); return _T("MainWnd.xml"); } //窗口类的名字: 在注册窗口时必须提供 LPCTSTR MainWnd::GetWindowClassName(void) const { return _T("MainWnd"); } void MainWnd::Notify(TNotifyUI& msg) { //拦截消息 CDuiString strName = msg.pSender->GetName(); if (msg.sType == _T("click")) { if (strName == _T("BTN_CLOSE")) Close(); else if (strName == _T("BTN_MIN")) ::SendMessage(m_hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); else if (strName == _T("BTN_SELECT")) //MessageBox(NULL, _T("SelectBTN"), _T("Cashier"), IDOK); SelectceshiInfo(); else if (strName == _T("BTN_INSERT")) //MessageBox(NULL, _T("BTN_INSERT"), _T("Cashier"), IDOK); InsertceshiInfo(); else if (strName == _T("BTN_DELETE")) Deleteceshiinfo(); else if (strName == _T("BTN_UPDATE")) MessageBox(NULL, _T("BTN_UPDATE"), _T("Cashier"), IDOK); else if (strName == _T("BTN_SELL_RECORD")) MessageBox(NULL, _T("BTN_SELL_RECORD"), _T("Cashier"), IDOK); } else if (msg.sType == _T("selectchanged")) { CTabLayoutUI* pTab = (CTabLayoutUI*)m_PaintManager.FindControl(_T("tablayout")); if (strName == _T("OPTION_EMPLOYEE")) pTab->SelectItem(0); else pTab->SelectItem(1); } else if (msg.sType == _T("windowinit")) { //窗口在创建期间,将一些空间初始化 CComboBoxUI* pGender = (CComboBoxUI*)m_PaintManager.FindControl(_T("usergender")); pGender->SelectItem(0); CComboBoxUI* pPosition = (CComboBoxUI*)m_PaintManager.FindControl(_T("position")); pPosition->SelectItem(0); CComboBoxUI* pSelect = (CComboBoxUI*)m_PaintManager.FindControl(_T("COMOB_SELECT")); pSelect->SelectItem(0); } } void MainWnd::SelectceshiInfo() { string strSQL("select * from ceshi "); CComboBoxUI* pCombo = (CComboBoxUI*)m_PaintManager.FindControl(_T("COMOB_SELECT")); CDuiString strStyle = pCombo->GetText(); if (strStyle == _T("无")) strSQL += ";"; else if (strStyle == _T("名字")) { strSQL += "where name1 = '"; CDuiString strName = ((CEditUI*)m_PaintManager.FindControl(_T("username")))->GetText(); if (strName.IsEmpty()) { MessageBox(m_hWnd, _T("请输入查询用户的名字"), _T("Cashier"), IDOK); } strSQL += UnicodeToANSI(strName); strSQL += "';"; } else if (strStyle == _T("性别")) ; else if (strStyle == _T("薪资")) ; vector<vector<string>> vRet = m_pMySQL->Select(strSQL); if (vRet.empty()) return; CListUI* pListUI = (CListUI*)m_PaintManager.FindControl(_T("ListceshiInfo")); pListUI->RemoveAll(); for (size_t i = 0; i < vRet.size(); ++i) { vector<string>& strItm = vRet[i]; CListTextElementUI* pData = new CListTextElementUI; pData->SetAttribute(_T("align"), _T("center")); pListUI->Add(pData); //名字 pData->SetText(0, ANSIToUnicode(strItm[1])); pData->SetText(1, ANSIToUnicode(strItm[2])); pData->SetText(2, ANSIToUnicode(strItm[3])); pData->SetText(3, ANSIToUnicode(strItm[4])); pData->SetText(4, ANSIToUnicode(strItm[5])); pData->SetText(5, ANSIToUnicode(strItm[6])); pData->SetText(6, ANSIToUnicode(strItm[7])); } } void MainWnd::InsertceshiInfo() { CDuiString strName = ((CEditUI*)m_PaintManager.FindControl(_T("username")))->GetText(); CDuiString strGender = ((CComboBoxUI*)m_PaintManager.FindControl(_T("usergender")))->GetText(); CDuiString strBirthday = ((CEditUI*)m_PaintManager.FindControl(_T("userbirthday")))->GetText(); CDuiString strPosition = ((CComboBoxUI*)m_PaintManager.FindControl(_T("position")))->GetText(); CDuiString strTel = ((CEditUI*)m_PaintManager.FindControl(_T("telphone")))->GetText(); CDuiString strSalary = ((CEditUI*)m_PaintManager.FindControl(_T("salary")))->GetText(); CListUI* pListUI = (CListUI*)m_PaintManager.FindControl(_T("ListceshiInfo")); char szCount[32] = { 0 }; _itoa(pListUI->GetCount() + 1, szCount, 10); //pListUI->GetCurSel(); //构造SQL命令 string strSQL("insert into ceshi values("); strSQL += szCount; strSQL += ",'"; strSQL += UnicodeToANSI(strName); strSQL += "','"; strSQL += UnicodeToANSI(strGender); strSQL += "','"; strSQL += UnicodeToANSI(strBirthday); strSQL += "','000000','"; strSQL += UnicodeToANSI(strPosition); strSQL += "','"; strSQL += UnicodeToANSI(strTel); strSQL += "','"; strSQL += UnicodeToANSI(strSalary); strSQL += "');"; //响应SQL命令 m_pMySQL->Insert(strSQL); //将该员工的信息插入到List CListTextElementUI* pItem = new CListTextElementUI; pListUI->Add(pItem); pItem->SetText(0, strName); pItem->SetText(1, strGender); pItem->SetText(2, strBirthday); pItem->SetText(3, strPosition); pItem->SetText(4, strTel); pItem->SetText(5, strSalary); } //void MainWnd::Updatainfo() //{ // CDuiString strName = ((CEditUI*)m_PaintManager.FindControl(_T("username")))->GetText(); // CDuiString strGender = ((CComboBoxUI*)m_PaintManager.FindControl(_T("usergender")))->GetText(); // CDuiString strBirthday = ((CEditUI*)m_PaintManager.FindControl(_T("userbirthday")))->GetText(); // CDuiString strPosition = ((CComboBoxUI*)m_PaintManager.FindControl(_T("position")))->GetText(); // CDuiString strTel = ((CEditUI*)m_PaintManager.FindControl(_T("telphone")))->GetText(); // CDuiString strSalary = ((CEditUI*)m_PaintManager.FindControl(_T("salary")))->GetText(); // // CListUI* pListUI = (CListUI*)m_PaintManager.FindControl(_T("ListceshiInfo")); // char szCount[32] = { 0 }; // _itoa(pListUI->GetCount() + 1, szCount, 10); // // //} void MainWnd::Deleteceshiinfo() { //获取当前选中 CListUI* pListUI = (CListUI*)m_PaintManager.FindControl(_T("ListceshiInfo")); //pListUI->RemoveAll(); int lineNo = pListUI->GetCurSel(); CListTextElementUI* pRow = (CListTextElementUI*)pListUI->GetItemAt(lineNo); //从数据库中删除该员工信息 string strSQL("delete from ceshi where name1 = '"); strSQL += UnicodeToANSI(pRow->GetText(0)); strSQL += "';"; m_pMySQL->Delete(strSQL); //从List移除 pListUI->RemoveAt(lineNo); }
[ "1418152092@qq.com" ]
1418152092@qq.com
97a77314a04402d07ff70dbc6fab6ebdfaeaead0
6c43ff06c0ea2158f4936b470b71fb535df81901
/Day-1 (Arrays)/2.Sort_array_of_0_1_2.cpp
eee2058976c741e895a3c3734d33c61e7b00ac45
[]
no_license
Rishabhchauhan30/SDE_Questions--
45bc5c510e1f827ccedffbca029e2752e0941ba3
b9e2ddaa24e5a08af9f49fabaf0de884723154c8
refs/heads/master
2023-01-23T20:05:18.688791
2020-11-24T19:41:28
2020-11-24T19:41:28
298,398,556
0
0
null
null
null
null
UTF-8
C++
false
false
1,451
cpp
//There are three approaches //1--by using sorting method which will do this is in //T.C[O(nLogn)] //S.c[O(1)] class Solution { public: void sortColors(vector<int>& a) { sort(a.begin(),a.end()); } }; //2--Using counting method which will take //T.C[O[2n]] //S.C[O[1]] class Solution { public: void sortColors(vector<int>& nums ) { int mid=0,l=0,r=nums.size()-1,e=0 ; for(int i=0;i<=r;i++) { if(nums[i]==0) l++; else if(nums[i]==2) e++; else if(nums[i]==1) mid++; } nums.clear(); for(int i=0;i<l;i++) { nums.push_back(0); } for(int i=0;i<mid;i++) { nums.push_back(1); } for(int i=0;i<e;i++) { nums.push_back(2); } } } //3--Using Dutch National Flag Algorithm //T.C[O(n)] //S.C[O(1)] //The idea is to take three pointers namely low mid and high //all the 0's before low --- all the 1's are between low and mid -- and all the 2's are to the right of high class Solution { public: void sortColors(vector<int>& nums) { int low = 0; int mid = 0; int high = nums.size() - 1; while(mid<=high) { if(nums[mid]==0) swap(nums[low++],nums[mid++]); else if(nums[mid]==1) nums[mid++]; else if(nums[mid]==2) swap(nums[mid],nums[high--]); } } };
[ "64160163+rishabh1057@users.noreply.github.com" ]
64160163+rishabh1057@users.noreply.github.com
322a5c1ff06314cea0f4d83d32c9443c728af2ff
5d83739af703fb400857cecc69aadaf02e07f8d1
/Archive/777e087ec3d514006db966002776d67a-f674c1a6d04c632b71a62362c0ccfc51/main.cpp
8ba13fbeb7c89dba436f6e653ec81732b788ff2e
[]
no_license
WhiZTiM/coliru
3a6c4c0bdac566d1aa1c21818118ba70479b0f40
2c72c048846c082f943e6c7f9fa8d94aee76979f
refs/heads/master
2021-01-01T05:10:33.812560
2015-08-24T19:09:22
2015-08-24T19:09:22
56,789,706
3
0
null
null
null
null
UTF-8
C++
false
false
6,322
cpp
#include <iostream> #include <string> #include <vector> #include <cmath> struct Point3f { float x,y,z; Point3f(float _x, float _y,float _z) : x(_x),y(_y),z(_z) {} Point3f(const Point3f& p) :x(p.x),y(p.y),z(p.z) {} Point3f operator-(const Point3f& p) const { return Point3f(x-p.x,y-p.y,z-p.z); } Point3f operator+(const Point3f& p) const { return Point3f(x+p.x,y+p.y,z+p.z); } Point3f operator*(const Point3f& p) const { return Point3f(x*p.x,y*p.y,z*p.z); } Point3f operator/(const float scalar) const { return Point3f(x/scalar,y/scalar,z/scalar); } Point3f operator*(const float scalar) const { return Point3f(x*scalar,y*scalar,z*scalar); } bool operator==(const Point3f& p) const { return x == p.x && y == p.y && z == p.z; } bool isNull() { return x+y+z == 0; } }; std::ostream& operator<<(std::ostream& os, const Point3f& p) { os << p.x << " " << p.y << " " << p.z <<" " ; return os; } struct Vector3f { Point3f point; Vector3f(const Point3f& p) : point(p) { } Vector3f(const Vector3f& v) : point(v.point) {} Vector3f(const Point3f& p0, const Point3f& p1 ) :point(p1-p0) { } Vector3f operator-(const Vector3f& p) const { return Vector3f(point-p.point); } Vector3f operator+(const Vector3f& p) const { return Vector3f(point+p.point); } Vector3f operator*(const Vector3f& p) const { return Vector3f(point*p.point); } Vector3f operator/(const float scalar) const { return Vector3f(point/scalar); } Vector3f operator*(const float scalar) const { return Vector3f(point*scalar); } bool operator==(const Vector3f& v) const { return point == v.point; } Vector3f Cross(const Vector3f& v) const { float x = (point.y*v.point.z - point.z*v.point.y); float y = (point.z*v.point.x - point.x*v.point.z); float z = (point.x*v.point.y - point.y*v.point.x); return Vector3f(Point3f(x,y,z)); } void Normalize() { float mag = std::sqrt((point.x*point.x) + (point.y*point.y) + (point.z*point.z)); point = point/mag; } float Dot(const Vector3f& vector) const { return (point.x*vector.point.x + point.y*vector.point.y + point.z*vector.point.z); } bool IsZero() { return point.isNull(); } }; std::ostream& operator<<(std::ostream& os, const Vector3f& p) { os << "(" <<p.point << ")" ; return os; } struct Line { Vector3f origin; Vector3f direction; Line(const Vector3f& _origin, const Vector3f& _direction) :origin(_origin), direction(_direction) {} }; std::ostream& operator<<(std::ostream& os, const Line& p) { os << "(" <<p.origin<<"," << p.direction<< ")" ; return os; } typedef int Int; typedef unsigned int UInt; Line FoundMediatrice(const Vector3f& _origin, const Vector3f& _direction, const Vector3f& _normal) { //Middle point const Vector3f middle(_origin+(_direction/2.0f)); return Line(middle , _direction.Cross(_normal)); } float DistanceSquared( const Line& line0, const Line& line1, float& s_c, float& t_c ) { Vector3f w0 = line0.origin - line1.origin; float a = line0.direction.Dot( line0.direction ); float b = line0.direction.Dot( line1.direction ); float c = line1.direction.Dot( line1.direction ); float d = line0.direction.Dot( w0 ); float e = line1.direction.Dot( w0 ); float denom = a*c - b*b; if ( denom == 0.0f ) { s_c = 0.0f; t_c = e/c; Vector3f wc = w0 - line1.direction*t_c; return wc.Dot(wc); } else { s_c = ((b*e - c*d)/denom); t_c = ((a*e - b*d)/denom); Vector3f wc = w0 + line0.direction*s_c - line1.direction*t_c; return wc.Dot(wc); } } int main() { Point3f v[7] = {Point3f(-0.5f,1.f,0.f),Point3f(-1.f,0.f,0.f),Point3f(-0.5f,-1.f,0.f),Point3f(0.f,-2.f,0.f), Point3f(0.5f,-1.f,0.f),Point3f(1.f,0.f,0.f),Point3f(0.f,0.f,0.f)}; std::vector<Point3f> vertices(v,v+7); //index list in CCW Int i[7] = {0,1,2,3,4,5,6}; std::vector<int> index(i,i+7); //Loop for triangle test for(UInt i=0;i<(index.size()-2);++i) for(UInt j=i+1; j<(index.size()-1);++j ) for(UInt k=j+1; k<(index.size());++k ) { std::cout << index[i] << index[j] << index[k] << "\t"; //Normal Vector3f vectorJK(Vector3f(vertices[k]) - Vector3f(vertices[j])); Vector3f vectorJI(Vector3f(vertices[i]) - Vector3f(vertices[j])); Vector3f normal(vectorJK.Cross(vectorJI)); if(!normal.IsZero()) { std::cout << "ok"; //found mediatrice vectorJK Line m1(FoundMediatrice( Vector3f(vertices[j]), vectorJK, normal)); //found mediatrice vectorJI Line m2(FoundMediatrice( Vector3f(vertices[j]), vectorJI, normal)); std::cout << " m1 :" << m1; std::cout << " m2 :" << m2; float d1(0.0f),d2(0.0f); float dist = DistanceSquared(m1,m2,d1,d2); //Collision if(dist == 0.0f) { Vector3f center1(m1.origin + m1.direction * d1); Vector3f center2(m2.origin + m2.direction * d2); //Collision OK if(center1 == center2) { std::cout << " d:" << dist << " d1:" << d1 << " d2:" << d2 << " CENTER:" << center1 << "" << center2 <<std::endl; } } } else std::cout << "bad" << std::endl; } }
[ "francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df" ]
francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df
0fba9994dbab294676652453813f03eed7e70ddb
e7db7fe12474d777ed7d7210d8400b69e4564319
/firmware/apps/px4/px4io/driver/uploader.h
8d41992f85d5022ee10d62c0225b10695cef8963
[]
no_license
tpetri/rgb_cube
26a139a5d55cc25d0fc77538e5f2a64a7b44e8cb
b25e0dafde2043b408706b0b4ebb0b7d8755cb43
refs/heads/master
2016-09-10T11:17:03.811426
2013-02-17T18:54:26
2013-02-17T18:54:26
4,640,840
1
0
null
null
null
null
UTF-8
C++
false
false
3,189
h
/**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name PX4 nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /** * @file Firmware uploader for PX4IO */ #ifndef _PX4IO_UPLOADER_H #define _PX4IO_UPLOADER_H value #include <stdint.h> #include <stdbool.h> class PX4IO_Uploader { public: PX4IO_Uploader(); ~PX4IO_Uploader(); int upload(const char *filenames[]); private: enum { PROTO_NOP = 0x00, PROTO_OK = 0x10, PROTO_FAILED = 0x11, PROTO_INSYNC = 0x12, PROTO_EOC = 0x20, PROTO_GET_SYNC = 0x21, PROTO_GET_DEVICE = 0x22, PROTO_CHIP_ERASE = 0x23, PROTO_CHIP_VERIFY = 0x24, PROTO_PROG_MULTI = 0x27, PROTO_READ_MULTI = 0x28, PROTO_REBOOT = 0x30, INFO_BL_REV = 1, /**< bootloader protocol revision */ BL_REV = 2, /**< supported bootloader protocol */ INFO_BOARD_ID = 2, /**< board type */ INFO_BOARD_REV = 3, /**< board revision */ INFO_FLASH_SIZE = 4, /**< max firmware size in bytes */ PROG_MULTI_MAX = 60, /**< protocol max is 255, must be multiple of 4 */ READ_MULTI_MAX = 60, /**< protocol max is 255, something overflows with >= 64 */ }; int _io_fd; int _fw_fd; void log(const char *fmt, ...); int recv(uint8_t &c, unsigned timeout = 1000); int recv(uint8_t *p, unsigned count); void drain(); int send(uint8_t c); int send(uint8_t *p, unsigned count); int get_sync(unsigned timeout = 1000); int sync(); int get_info(int param, uint32_t &val); int erase(); int program(); int verify(); int reboot(); int compare(bool &identical); }; #endif
[ "pixhawk@pixhawk01.(none)" ]
pixhawk@pixhawk01.(none)
12cef6cefddbcf0bbed336479458d9442354fec7
47b755444e700332877d8bb432e5739045ba2c8b
/wxWidgets/tests/controls/slidertest.cpp
d02b3ee0be958e642dee6496c901c0ae4a105e08
[ "MIT" ]
permissive
andr3wmac/Torque6Editor
5b30e103f0b3a81ae7a189725e25d807093bf131
0f8536ce90064adb9918f004a45aaf8165b2a343
refs/heads/master
2021-01-15T15:32:54.537291
2016-06-09T20:45:49
2016-06-09T20:45:49
39,276,153
25
14
null
null
null
null
UTF-8
C++
false
false
4,880
cpp
/////////////////////////////////////////////////////////////////////////////// // Name: tests/controls/slidertest.cpp // Purpose: wxSlider unit test // Author: Steven Lamerton // Created: 2010-07-20 // Copyright: (c) 2010 Steven Lamerton /////////////////////////////////////////////////////////////////////////////// #include "testprec.h" #if wxUSE_SLIDER #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/slider.h" #endif // WX_PRECOMP #include "wx/uiaction.h" #include "testableframe.h" class SliderTestCase : public CppUnit::TestCase { public: SliderTestCase() { } void setUp(); void tearDown(); private: CPPUNIT_TEST_SUITE( SliderTestCase ); #ifndef __WXOSX__ WXUISIM_TEST( PageUpDown ); WXUISIM_TEST( LineUpDown ); WXUISIM_TEST( LinePageSize ); #endif CPPUNIT_TEST( Value ); CPPUNIT_TEST( Range ); WXUISIM_TEST( Thumb ); CPPUNIT_TEST( PseudoTest_Inversed ); CPPUNIT_TEST( Value ); CPPUNIT_TEST( Range ); CPPUNIT_TEST_SUITE_END(); void PageUpDown(); void LineUpDown(); void LinePageSize(); void Value(); void Range(); void Thumb(); void PseudoTest_Inversed() { ms_inversed = true; } static bool ms_inversed; wxSlider* m_slider; wxDECLARE_NO_COPY_CLASS(SliderTestCase); }; bool SliderTestCase::ms_inversed = false; // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( SliderTestCase ); // also include in its own registry so that these tests can be run alone CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SliderTestCase, "SliderTestCase" ); void SliderTestCase::setUp() { long style = wxSL_HORIZONTAL; if ( ms_inversed ) style |= wxSL_INVERSE; m_slider = new wxSlider(wxTheApp->GetTopWindow(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, style); } void SliderTestCase::tearDown() { wxDELETE(m_slider); } void SliderTestCase::PageUpDown() { #if wxUSE_UIACTIONSIMULATOR EventCounter pageup(m_slider, wxEVT_SCROLL_PAGEUP); EventCounter pagedown(m_slider, wxEVT_SCROLL_PAGEDOWN); wxUIActionSimulator sim; m_slider->SetFocus(); sim.Char(WXK_PAGEUP); sim.Char(WXK_PAGEDOWN); wxYield(); CPPUNIT_ASSERT_EQUAL(1, pageup.GetCount()); CPPUNIT_ASSERT_EQUAL(1, pagedown.GetCount()); #endif } void SliderTestCase::LineUpDown() { #if wxUSE_UIACTIONSIMULATOR EventCounter lineup(m_slider, wxEVT_SCROLL_LINEUP); EventCounter linedown(m_slider, wxEVT_SCROLL_LINEDOWN); wxUIActionSimulator sim; wxYield(); m_slider->SetFocus(); sim.Char(WXK_UP); sim.Char(WXK_DOWN); wxYield(); CPPUNIT_ASSERT_EQUAL(1, lineup.GetCount()); CPPUNIT_ASSERT_EQUAL(1, linedown.GetCount()); #endif } void SliderTestCase::LinePageSize() { #if wxUSE_UIACTIONSIMULATOR wxUIActionSimulator sim; wxYield(); m_slider->SetFocus(); m_slider->SetPageSize(20); sim.Char(WXK_PAGEUP); wxYield(); CPPUNIT_ASSERT_EQUAL(20, m_slider->GetPageSize()); CPPUNIT_ASSERT_EQUAL(30, m_slider->GetValue()); m_slider->SetLineSize(2); sim.Char(WXK_UP); wxYield(); CPPUNIT_ASSERT_EQUAL(2, m_slider->GetLineSize()); CPPUNIT_ASSERT_EQUAL(28, m_slider->GetValue()); #endif } void SliderTestCase::Value() { m_slider->SetValue(30); CPPUNIT_ASSERT_EQUAL(30, m_slider->GetValue()); //When setting a value larger that max or smaller than min //max and min are set m_slider->SetValue(-1); CPPUNIT_ASSERT_EQUAL(0, m_slider->GetValue()); m_slider->SetValue(110); CPPUNIT_ASSERT_EQUAL(100, m_slider->GetValue()); } void SliderTestCase::Range() { CPPUNIT_ASSERT_EQUAL(0, m_slider->GetMin()); CPPUNIT_ASSERT_EQUAL(100, m_slider->GetMax()); // Changing range shouldn't change the value. m_slider->SetValue(17); m_slider->SetRange(0, 200); CPPUNIT_ASSERT_EQUAL(17, m_slider->GetValue()); //Test negative ranges m_slider->SetRange(-50, 0); CPPUNIT_ASSERT_EQUAL(-50, m_slider->GetMin()); CPPUNIT_ASSERT_EQUAL(0, m_slider->GetMax()); } void SliderTestCase::Thumb() { #if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__) EventCounter track(m_slider, wxEVT_SCROLL_THUMBTRACK); EventCounter release(m_slider, wxEVT_SCROLL_THUMBRELEASE); EventCounter changed(m_slider, wxEVT_SCROLL_CHANGED); wxUIActionSimulator sim; m_slider->SetValue(0); sim.MouseDragDrop(m_slider->ClientToScreen(wxPoint(10, 10)),m_slider->ClientToScreen(wxPoint(50, 10))); wxYield(); CPPUNIT_ASSERT(track.GetCount() != 0); CPPUNIT_ASSERT_EQUAL(1, release.GetCount()); #ifdef __WXMSW__ CPPUNIT_ASSERT_EQUAL(1, changed.GetCount()); #endif #endif } #endif
[ "andrewmac@gmail.com" ]
andrewmac@gmail.com
dc3e788c0ed0faaf1da3c1c1bde650d4b3aa4eaf
93294d148df93b4378f59ac815476919273d425f
/src/Wopr/AllegianceInterop/NativeClient.cpp
ceff1fd51a24ea42d76cd4abe4fe373bdfc2bb57
[ "MIT" ]
permissive
FreeAllegiance/Allegiance
f1addb3b26efb6b8518705a0b0300974820333c3
3856ebcd8c35a6d63dbf398a4bc7f0264d6c823c
refs/heads/master
2023-07-06T17:53:24.363387
2023-06-29T00:24:26
2023-06-29T00:24:26
98,829,929
86
34
MIT
2023-06-28T03:57:34
2017-07-30T23:09:14
C++
UTF-8
C++
false
false
8,075
cpp
#include "stdafx.h" #include "NativeClient.h" #include "NativeClientClusterSite.h" #include "NativeClientThingSite.h" //#include "AllMessages.h" #include "MessageTypeNative.h" CriticalSectionManager AllegianceInterop::NativeClient::m_criticalSection = CriticalSectionManager(); namespace AllegianceInterop { int NativeClient::ExceptionFilter(unsigned int code, struct _EXCEPTION_POINTERS *ep) { debugf("NativeClient::ExceptionFilter()"); if (code == EXCEPTION_ACCESS_VIOLATION) { debugf("\tcaught AV as expected."); return EXCEPTION_EXECUTE_HANDLER; } else { debugf("\tdidn't catch AV, unexpected."); return EXCEPTION_CONTINUE_SEARCH; }; } HRESULT NativeClient::OnAppMessage(FedMessaging * pthis, CFMConnection & cnxnFrom, FEDMESSAGE * pfm) { __try { //if(m_counter < 400) OnAppMessageEvent(pthis, cnxnFrom, pfm); } __except (ExceptionFilter(GetExceptionCode(), GetExceptionInformation())) { debugf("Exception Hit!"); } //m_counter++; return S_OK; } void NativeClient::OnLogonLobbyAck(bool fValidated, bool bRetry, LPCSTR szFailureReason) { OnLogonLobbyAckEvent(fValidated, bRetry, szFailureReason); } void NativeClient::OnLogonAck(bool fValidated, bool bRetry, LPCSTR szFailureReason) { OnLogonAckEvent(fValidated, bRetry, szFailureReason); } NativeClient::NativeClient(const char * artpath) { // Intercept underlying exceptions so that the application can't crash out. /*typedef void(*SignalHandlerPointer)(int); SignalHandlerPointer previousHandler; previousHandler = signal(SIGSEGV, SignalHandler);*/ // TODO: Read this from the registry or config. UTL::SetArtPath(artpath); // Ensure that cluster info isn't deleted when the server sends us FM_S_DOCKED m_deleteShipInfoOnDockMessage = false; m_allowClientToReceiveClusterUpdatesForAllClusters = true; } //void NativeClient::HookOnAppMessageEvent(void * function) //void NativeClient::HookOnAppMessageEvent(HRESULT(*function)(FedMessaging * pthis, CFMConnection & cnxnFrom, FEDMESSAGE * pfm)) void NativeClient::HookOnAppMessageEvent(OnAppMessageEventFunction function) { m_OnAppMessageDelegate = function; __hook(&NativeClient::OnAppMessageEvent, this, &NativeClient::OnAppMessageEventHandler); } //void NativeClient::HookOnLogonLobbyAckEvent(void(*function)(bool fValidated, bool bRetry, LPCSTR szFailureReason)) void NativeClient::HookOnLogonLobbyAckEvent(OnLogonLobbyAckEventFunction function) { m_OnLogonLobbyAckDelegate = function; __hook(&NativeClient::OnLogonLobbyAckEvent, this, &NativeClient::OnLogonLobbyAckEventHandler); } //void NativeClient::HookOnLogonAckEvent(void(*function)(bool fValidated, bool bRetry, LPCSTR szFailureReason)) void NativeClient::HookOnLogonAckEvent(OnLogonAckEventFunction function) { m_OnLogonAckDelegate = function; __hook(&NativeClient::OnLogonAckEvent, this, &NativeClient::OnLogonAckEventHandler); } // From CPig::ReceiveSendAndUpdate() void NativeClient::SendAndReceiveUpdate() { m_lastUpdate = m_timeLastUpdate; m_now = Time::Now(); // Call the base class to receive messages and perform periodic updates HRESULT hr = BaseClient::ReceiveMessages(); // OnAppMessage will process all messages // Send updates and messages if (SUCCEEDED(hr) && BaseClient::GetNetwork()->IsConnected()) { m_now = Time::Now(); //debugf("NativeClient::SendAndReceiveUpdate() m_lastUpdate: %ld, m_now: %ld\n", m_lastUpdate.clock(), m_now.clock()); // Update the ship { if (BaseClient::GetShip()) { BaseClient::SendUpdate(m_lastUpdate); } } // Check for server lag BaseClient::CheckServerLag(Time::Now()); // Send messages if still connected if (BaseClient::GetNetwork()->IsConnected()) BaseClient::SendMessages(); // Update damage //if (BaseClient::GetCore()->GetLastUpdate() <= m_now) //{ // Update IGC //this->GetCore()->Update(m_now); BaseClient::GetCore()->Update(m_now); /*} else { printf("WTF? GetLastUpdate(): %ld, m_now: %ld, m_timeLastUpdate: %ld, Time::Now(): %ld \n", BaseClient::GetCore()->GetLastUpdate(), m_now, m_timeLastUpdate, Time::Now()); }*/ } // Reset the last update time m_timeLastUpdate = m_now; } void NativeClient::OnAppMessageEventHandler(FedMessaging * pthis, CFMConnection & cnxnFrom, FEDMESSAGE * pfm) { //Time m_now = Time::Now(); try { // Let the underlying client perform message housekeeping. // if the message will be modifying the static code, then ensure that only one thread is updating the static core at a time // it appears that something in the core variables is actually static, but I haven't found it yet. // Pigs handles this by ensuring that all messages are processed serially, but this will cause lag in the bots. // Hopefully we can work around it like this. if (pfm->fmid == AllegianceInterop::MessageTypeNative::FM_S_JOINED_MISSION || pfm->fmid == AllegianceInterop::MessageTypeNative::FM_S_EXPORT || pfm->fmid == AllegianceInterop::MessageTypeNative::FM_S_BUY_LOADOUT_ACK) { m_criticalSection.Lock(); BaseClient::HandleMsg(pfm, m_lastUpdate, m_now); m_criticalSection.UnLock(); } else { BaseClient::HandleMsg(pfm, m_lastUpdate, m_now); } } catch (char * exceptionText) { debugf("\n\n*** OnAppMessageEventHandler Exception: %s\n\n", exceptionText); } if (m_OnAppMessageDelegate != nullptr) { (m_OnAppMessageDelegate)(pthis, cnxnFrom, pfm); } //m_lastUpdate = m_now; } void NativeClient::OnLogonLobbyAckEventHandler(bool fValidated, bool bRetry, LPCSTR szFailureReason) { if (m_OnLogonLobbyAckDelegate != nullptr) { m_OnLogonLobbyAckDelegate(fValidated, bRetry, szFailureReason); } } void NativeClient::OnLogonAckEventHandler(bool fValidated, bool bRetry, LPCSTR szFailureReason) { if (m_OnLogonAckDelegate != nullptr) { m_OnLogonAckDelegate(fValidated, bRetry, szFailureReason); } } ///////////////////////////////////////////////////////////////////////////// // IIgcSite Overrides TRef<ThingSite> NativeClient::CreateThingSite(ImodelIGC* pModel) { return new NativeClientThingSite(this->GetSide()); } TRef<ClusterSite> NativeClient::CreateClusterSite(IclusterIGC* pCluster) { return new NativeClientClusterSite(pCluster); } void NativeClient::ChangeStation(IshipIGC* pship, IstationIGC* pstationOld, IstationIGC* pstationNew) { if (pship == BaseClient::GetShip()) { if (pstationNew) { // We just moved to a new station. Raise any events to handle that here. } else if (pstationOld) { // Reset the AutoPilot flag BaseClient::SetAutoPilot(false); // Get the source ship and base hull type assert(pstationOld); IshipIGC* pshipSource = BaseClient::GetShip()->GetSourceShip(); assert(pshipSource); const IhullTypeIGC* pht = pshipSource->GetBaseHullType(); assert(pht); //If no weapon is selected, try to select a weapon if (pshipSource && pshipSource->GetObjectID() == BaseClient::GetShip()->GetObjectID()) //imago 10/14 { if (BaseClient::m_selectedWeapon >= pht->GetMaxFixedWeapons() || !BaseClient::GetWeapon()) BaseClient::NextWeapon(); } // Reset the Vector Lock bit GetShip()->SetStateBits(coastButtonIGC, 0); // Reset the controls ControlData cd; cd.Reset(); BaseClient::GetShip()->SetControls(cd); } } // Perform default processing BaseClient::ChangeStation(pship, pstationOld, pstationNew); } void NativeClient::ChangeCluster(IshipIGC* pship, IclusterIGC* pclusterOld, IclusterIGC* pclusterNew) { if (pship && pship->GetObjectID() == BaseClient::GetShip()->GetObjectID()) { if (pclusterOld && BaseClient::GetNetwork()->IsConnected()) pclusterOld->SetActive(false); // Perform default processing BaseClient::ChangeCluster(pship, pclusterOld, pclusterNew); if (pclusterNew && BaseClient::GetNetwork()->IsConnected()) pclusterNew->SetActive(true); } } }
[ "nick@zaphop.com" ]
nick@zaphop.com
ddbb8e3fd693472bf23e794b448bc605eae1bd0a
801e3e3a6f101f5b11398b0af0dc6e0f4b0276f7
/tools/prelude.inc
cffd5431930f5f91a867e40fab615e1ebdfc8bab
[]
no_license
ElvargThemSelf/mm
6312340d1acc1337b754d8947a66e76bccdc1735
6046720adcafb1b296d3120d89272efd701a0f3b
refs/heads/master
2022-09-01T04:10:24.005974
2020-05-12T21:08:58
2020-05-12T21:08:58
444,893,628
1
0
null
null
null
null
UTF-8
C++
false
false
92
inc
.set noat .set noreorder .set gp=64 .macro glabel label .global \label \label: .endm
[ "uberpanzermensch@gmail.com" ]
uberpanzermensch@gmail.com
643c0ddfcae2cb313188aa970d6b3acb48ca61b9
4c23be1a0ca76f68e7146f7d098e26c2bbfb2650
/ic8h18/0.0005/HCCOH
3fc99e7ed161aeece933d0712e36fe514a4d87f4
[]
no_license
labsandy/OpenFOAM_workspace
a74b473903ddbd34b31dc93917e3719bc051e379
6e0193ad9dabd613acf40d6b3ec4c0536c90aed4
refs/heads/master
2022-02-25T02:36:04.164324
2019-08-23T02:27:16
2019-08-23T02:27:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
838
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.0005"; object HCCOH; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 4.20212e-24; boundaryField { boundary { type empty; } } // ************************************************************************* //
[ "jfeatherstone123@gmail.com" ]
jfeatherstone123@gmail.com
15e1404b696375e14e5f0881bb307691b133e195
a35da9a98043d38a273374ef3825bca28a142a69
/U.S.A.cpp
44f2361d13afd43c7b4b25d82bede9385c59a166
[]
no_license
hdhwang/U.S.A
9695852d920f3e554a0ecf4e54f4db42f9879409
83c6248cc266721990030870f4b87553d746ae95
refs/heads/master
2022-06-15T23:08:29.064903
2018-10-06T16:38:20
2018-10-06T16:38:20
151,858,887
0
0
null
null
null
null
UHC
C++
false
false
2,588
cpp
// U.S.A.cpp : 응용 프로그램에 대한 클래스 동작을 정의합니다. // #include "stdafx.h" #include "U.S.A.h" #include "U.S.ADlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CUSAApp BEGIN_MESSAGE_MAP(CUSAApp, CWinApp) ON_COMMAND(ID_HELP, &CWinApp::OnHelp) END_MESSAGE_MAP() // CUSAApp 생성 CUSAApp::CUSAApp() { // TODO: 여기에 생성 코드를 추가합니다. // InitInstance에 모든 중요한 초기화 작업을 배치합니다. } // 유일한 CUSAApp 개체입니다. CUSAApp theApp; // CUSAApp 초기화 BOOL CUSAApp::InitInstance() { // 응용 프로그램 매니페스트가 ComCtl32.dll 버전 6 이상을 사용하여 비주얼 스타일을 // 사용하도록 지정하는 경우, Windows XP 상에서 반드시 InitCommonControlsEx()가 필요합니다. // InitCommonControlsEx()를 사용하지 않으면 창을 만들 수 없습니다. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // 응용 프로그램에서 사용할 모든 공용 컨트롤 클래스를 포함하도록 // 이 항목을 설정하십시오. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinApp::InitInstance(); AfxEnableControlContainer(); // 대화 상자에 셸 트리 뷰 또는 // 셸 목록 뷰 컨트롤이 포함되어 있는 경우 셸 관리자를 만듭니다. CShellManager *pShellManager = new CShellManager; // 표준 초기화 // 이들 기능을 사용하지 않고 최종 실행 파일의 크기를 줄이려면 // 아래에서 필요 없는 특정 초기화 // 루틴을 제거해야 합니다. // 해당 설정이 저장된 레지스트리 키를 변경하십시오. // TODO: 이 문자열을 회사 또는 조직의 이름과 같은 // 적절한 내용으로 수정해야 합니다. SetRegistryKey(_T("로컬 응용 프로그램 마법사에서 생성된 응용 프로그램")); CUSADlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: 여기에 [확인]을 클릭하여 대화 상자가 없어질 때 처리할 // 코드를 배치합니다. } else if (nResponse == IDCANCEL) { // TODO: 여기에 [취소]를 클릭하여 대화 상자가 없어질 때 처리할 // 코드를 배치합니다. } // 위에서 만든 셸 관리자를 삭제합니다. if (pShellManager != NULL) { delete pShellManager; } // 대화 상자가 닫혔으므로 응용 프로그램의 메시지 펌프를 시작하지 않고 응용 프로그램을 끝낼 수 있도록 FALSE를 // 반환합니다. return FALSE; }
[ "hadong0624@naver.com" ]
hadong0624@naver.com