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
d27ba07344a6375ecf23b1f794fe0c8d4d7effc5
e50a00093f39cb44485284c78931c244d5b6206d
/DecorateModel/Person.h
244f2c79f791b85ef70e17198e561b08e589e7f3
[]
no_license
xuzhixiang/Src
1fef2526ff2e968389e7e967cb66bb0b0e86e2bf
3b9be9b805333b746fb7d603bb5f5cc6ac8649cc
refs/heads/master
2016-09-06T04:14:00.352209
2015-10-10T08:32:51
2015-10-10T08:32:51
42,848,464
0
0
null
null
null
null
UTF-8
C++
false
false
265
h
#ifndef PERSON_H #define PERSON_H #include <string> #include "BaseClass.h" // 装扮对象类 class Person : public BaseClass { public: Person(const std::string & name); virtual ~Person(); virtual void show(); protected: std::string m_name; }; #endif
[ "zhixiangxu@126.com" ]
zhixiangxu@126.com
ebfa92d73f94ea54dce9dbd58496307ad2e2a45b
82bba04be05e518845b99d749a3293668725e9e7
/QHG3_python_package/QHG3/tools_ico/oldstuff/IGCFlatPanel.h
87b25d8f899a0df4ffd859ee6909dfffdde4f236
[]
no_license
Achandroth/QHG
e914618776f38ed765da3f9c64ec62b983fc3df3
7e64d82dc3b798a05f2a725da4286621d2ba9241
refs/heads/master
2023-06-04T06:24:41.078369
2018-07-04T11:01:08
2018-07-04T11:01:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,494
h
#ifndef _IGCFLATPANEL_H__ #define _IGCFLATPANEL_H__ #include <gtkmm.h> #include "Observable.h" #include "SurfaceHandler.h" #include "IcoScene.h" #include "Lattice.h" class GridProjection; class RectGridCreator; //class Lattice; class Lattice_OGL; class IcoGridNodes; class RegionSplitter; #define MODE_FULL 0 #define MODE_RECT 1 #define MODE_LAND 2 #define MODE_FLAT 3 class IGCFlatPanel : public Gtk::Table, public Observable, public SurfaceHandler { public: IGCFlatPanel(IcoScene *pIcoScene); virtual ~IGCFlatPanel(); int saveSurface(const char *pNameSurface, const char *pNameIGN, const char *pNameQDF, RegionSplitter *pRS); int loadSurface(const char *pNameSurface); void activateSurface(); void displaySurface() { m_pLattice->display(); }; protected: int createGridProjection(double dSqueeze); void ptype_action(); virtual void on_button_create_clicked(); virtual bool focus_action(GdkEventFocus* event); virtual void setMode(int iMode); virtual void mode_action(); void cleanVertList(); protected: GridProjection *m_pGP; IcoScene *m_pIcoScene; Lattice *m_pLattice; Lattice_OGL *m_pOGL; int m_iGW; int m_iGH; int m_iMode; Gtk::Label m_lblProjType; Gtk::ComboBox m_lstProjTypes; Gtk::Label m_lblProjLon; Gtk::Entry m_txtProjLon; Gtk::Label m_lblProjLat; Gtk::Entry m_txtProjLat; Gtk::HBox m_HBox4; Gtk::HSeparator m_hSep2; Gtk::Label m_lblGridSize; Gtk::Entry m_txtGridW; Gtk::Label m_lblTimes1; Gtk::Entry m_txtGridH; Gtk::Label m_lblRealSize; Gtk::Entry m_txtRealW; Gtk::Label m_lblTimes2; Gtk::Entry m_txtRealH; Gtk::Label m_lblOffset; Gtk::Entry m_txtOffsX; Gtk::Label m_lblPlus; Gtk::Entry m_txtOffsY; Gtk::HSeparator m_hSep3; Gtk::Label m_lblConnectivity; Gtk::RadioButton m_radConn4; Gtk::RadioButton m_radConn6; Gtk::Button m_butCreate; class ModelColumns : public Gtk::TreeModel::ColumnRecord { public: ModelColumns() { add(m_colType); add(m_colName); } Gtk::TreeModelColumn<int> m_colType; Gtk::TreeModelColumn<Glib::ustring> m_colName; }; ModelColumns m_ProjColumns; //Child widgets: Glib::RefPtr<Gtk::ListStore> m_refTreeModelProj; }; #endif
[ "nataliet@physik.uzh.ch" ]
nataliet@physik.uzh.ch
3a9bd9351c2f2ca784f325f35ba1e9e367f53d19
c094d381422c2788d67a3402cff047b464bf207b
/c++_primer_plus/c++_primer_plus/p328using声明和using编译指令的区别.cpp
393d7bb207b0cb68764f0ab4475e995fc017ede7
[]
no_license
liuxuanhai/C-code
cba822c099fd4541f31001f73ccda0f75c6d9734
8bfeab60ee2f8133593e6aabfeefaf048357a897
refs/heads/master
2020-04-18T04:26:33.246444
2016-09-05T08:32:33
2016-09-05T08:32:33
67,192,848
1
0
null
null
null
null
GB18030
C++
false
false
1,189
cpp
// 1. 名称空间只能在非代码区, 所以他的链接性默认为外部(除非它引用了常量); // 2. 名称空间是开放的, 可以在不同文件将变量放在统一名称空间; // 3. using namespace Jill; 是编译指令, 编译器自动为变量前面加上Jill::, 然而using Namespace::n;进行声明的时候, 就好像声明了相应的名称一样, 这样再声明局部变量int n的时候出现了重定义的错误; #include <iostream> using namespace std; namespace Jill{ double bucket(double n){return n;}; double fetch; struct Hill{ int a; int b; }; }; namespace Namespace{ int n; }; char fetch; // 全局变量 int main(void) { using namespace Jill; // 导入所有空间名 Hill Thrll; // 创建结构体: Jill::Hill double water = bucket(2); // 使用Jill::bucket(); double fetch; // 没有错, 隐藏了Jill::fetch; // 这里不会导致重定义的错 cin >> fetch; // local fetch cin >> ::fetch; // global fetch cin >> Jill::fetch; // Jill::fetch using Namespace::n; // 这里将会报出重定义的错 int n; cin >> n; return 0; } int foom() { //Hill top; // Error Jill::Hill create; // valid }
[ "heabking@gmail.com" ]
heabking@gmail.com
3552f2505ce1dc2bc48b9241b80968b30270a006
5913467eeae102ce6867f17bcff700a02a7532e0
/main.cpp
129b4b236e91500f8ad68668fc1107422af1f403
[ "MIT" ]
permissive
fangcun010/TileMerge
fb0e4fce7f233b9f57035609403cb5d677137b5c
ec4543905029f7555f170b20c5aa3784ef78bec5
refs/heads/main
2023-01-05T04:42:59.545595
2020-11-06T10:20:35
2020-11-06T10:20:35
310,544,245
1
0
null
null
null
null
UTF-8
C++
false
false
7,729
cpp
#include <QCoreApplication> #include <QGuiApplication> #include <QXmlStreamReader> #include <QFile> #include <QImage> #include <QPainter> #include <iostream> #define VERSION 1 #define SUB_VERSION 0 struct ErrorInfo { unsigned int id; QString text; }; struct TileSet { QString name; unsigned int width,height; unsigned int tile_width,tile_height; QColor background; }; struct ImageInfo { QString source; QColor transparent_color; bool has_transparent_color; }; struct TextInfo { QString content; unsigned int size; QColor color; }; void Help(); QImage HandleImage(TileSet &tile_set,QXmlStreamReader &reader); QImage HandleText(TileSet &tile_set,QXmlStreamReader &reader); void HandleXMLFile(const QString &file_name); int main(int argc, char *argv[]) { QGuiApplication a(argc, argv); if(argc!=2) { Help(); return 1; } try { HandleXMLFile(argv[1]); return 0; } catch (ErrorInfo &error) { if(error.id==0) { Help(); return 1; } else { std::cout<<error.id<<":"<<error.text.toStdString()<<std::endl; return 1; } } return a.exec(); } QColor ValueToColor(const QString &value) { if(value.length()<9) return QColor(0,0,0,0); auto red=value.mid(1,2).toUInt(nullptr,16); auto green=value.mid(3,2).toUInt(nullptr,16); auto blue=value.mid(5,2).toUInt(nullptr,16); auto alpha=value.mid(7,2).toUInt(nullptr,16); return QColor(red,green,blue,alpha); } void HandleTileSetAttributes(TileSet &tile_set,QXmlStreamReader &reader) { auto attributes=reader.attributes(); if(attributes.hasAttribute("name")) tile_set.name=attributes.value("name").toString(); else tile_set.name="unamed"; if(attributes.hasAttribute("width")) tile_set.width=attributes.value("width").toUInt(); else tile_set.width=1; if(attributes.hasAttribute("height")) tile_set.height=attributes.value("height").toUInt(); else tile_set.height=1; if(attributes.hasAttribute("tilewidth")) tile_set.tile_width=attributes.value("tilewidth").toUInt(); else tile_set.tile_width=32; if(attributes.hasAttribute("tileheight")) tile_set.tile_height=attributes.value("tileheight").toUInt(); else tile_set.tile_height=32; if(attributes.hasAttribute("background")) { tile_set.background=ValueToColor(attributes.value("background").toString()); } else tile_set.background=QColor(0,0,0,0); } QImage MakeCanvas(TileSet &tile_set) { QImage image(tile_set.width*tile_set.tile_width,tile_set.height*tile_set.tile_height, QImage::Format_RGBA8888); image.fill(tile_set.background); return image; } bool HandleTileSet(QXmlStreamReader &reader) { TileSet tile_set; HandleTileSetAttributes(tile_set,reader); QImage canvas=MakeCanvas(tile_set); QPainter painter(&canvas); unsigned int index=0; while(!reader.isEndElement()) { auto token_type=reader.readNext(); if(token_type==QXmlStreamReader::StartElement) { QImage tile_image; if(reader.name()=="image") tile_image=HandleImage(tile_set,reader); else if(reader.name()=="text") tile_image=HandleText(tile_set,reader); unsigned int x=(index%tile_set.width)*tile_set.tile_width; unsigned int y=(index/tile_set.width)*tile_set.tile_height; painter.drawImage(x,y,tile_image,0,0,tile_image.width(),tile_image.height(),Qt::ColorOnly); reader.readNext(); index++; } } canvas.save(tile_set.name+".png"); return true; } void HandleImageAttributes(ImageInfo &image_info,QXmlStreamReader &reader) { auto attributes=reader.attributes(); if(attributes.hasAttribute("source")) image_info.source=attributes.value("source").toString(); else { ErrorInfo error; error.id=1; error.text="Failed to get image source!"; throw error; } if(attributes.hasAttribute("transparentcolor")) { image_info.has_transparent_color=true; image_info.transparent_color=ValueToColor(attributes.value("transparentcolor").toString()); } else { image_info.has_transparent_color=false; } } QImage HandleImage(TileSet &tile_set,QXmlStreamReader &reader) { ImageInfo image_info; QImage tile_image(tile_set.tile_width,tile_set.tile_height,QImage::Format_RGBA8888); QPainter painter(&tile_image); HandleImageAttributes(image_info,reader); QImage source_image(image_info.source); QRect target_rect(0,0,tile_set.tile_width,tile_set.tile_height); QRect source_rect(0,0,source_image.width(),source_image.height()); painter.drawImage(target_rect,source_image,source_rect); if(image_info.has_transparent_color) { QColor color(0,0,0,0); for(auto y=0;y<tile_image.height();y++) for(auto x=0;x<tile_image.width();x++) if(tile_image.pixelColor(x,y)==image_info.transparent_color) tile_image.setPixelColor(x,y,color); } while(!reader.isEndElement()) { reader.readNext(); } return tile_image; } void HandleTextAttrbutes(TextInfo &text_info,QXmlStreamReader &reader) { auto attributes=reader.attributes(); if(attributes.hasAttribute("content")) text_info.content=attributes.value("content").toString(); else text_info.content="T"; if(attributes.hasAttribute("size")) text_info.size=attributes.value("size").toUInt(); else text_info.size=16; if(attributes.hasAttribute("color")) text_info.color=ValueToColor(attributes.value("color").toString()); else text_info.color=QColor(255,255,0,255); } QImage HandleText(TileSet &tile_set,QXmlStreamReader &reader) { QImage tile_image(tile_set.tile_width,tile_set.tile_height,QImage::Format_RGBA8888); QColor color(0,0,0,0); tile_image.fill(color); QPainter painter(&tile_image); TextInfo text_info; HandleTextAttrbutes(text_info,reader); while(!reader.isEndElement()) { reader.readNext(); } QFont font("Times", text_info.size, QFont::Bold); painter.setFont(font); QRect rect(0,0,tile_set.tile_width,tile_set.tile_height); painter.setPen(text_info.color); painter.drawText(rect,Qt::AlignCenter,text_info.content); return tile_image; } void HandleXMLFile(const QString &file_name) { QFile xml_file(file_name); if(!xml_file.open(QIODevice::ReadOnly | QIODevice::Text)) { ErrorInfo error; error.id=0; error.text="Failed to open file!"; throw error; } QXmlStreamReader reader(&xml_file); while(!reader.atEnd()) { auto token_type=reader.readNext(); if(token_type==QXmlStreamReader::StartElement || reader.name()=="tileset") { HandleTileSet(reader); } } if(reader.hasError()) { ErrorInfo error; throw error; } } void Help() { std::cout<<"TileMerge"<<" v"<<VERSION<<"."<<SUB_VERSION<<std::endl; }
[ "fangcun010@gmail.com" ]
fangcun010@gmail.com
05027979a54eb9c5f29ff958a557b1c7b29e06f1
711b05c35211a6f733b825c413bf05ede7581821
/ZF/ZFCore/zfsrc/ZFCore/protocol/ZFProtocolZFThreadTaskRequest.h
33310c38c04947ce86f2122aadad4ae452804928
[ "MIT" ]
permissive
chmodawk/ZFFramework
67a5232f8853febe72eae5f314a8f78a51f0c637
cfac6ca5e71662ad2ebfc5d681f3877fe56742cd
refs/heads/master
2021-07-18T13:10:24.849114
2017-10-20T09:27:20
2017-10-20T09:27:20
108,427,246
1
0
null
2017-10-26T15:05:18
2017-10-26T15:05:18
null
UTF-8
C++
false
false
1,172
h
/* ====================================================================== * * Copyright (c) 2010-2016 ZFFramework * home page: http://ZFFramework.com * blog: http://zsaber.com * contact: master@zsaber.com (Chinese and English only) * Distributed under MIT license: * https://github.com/ZFFramework/ZFFramework/blob/master/license/license.txt * ====================================================================== */ /** * @file ZFProtocolZFThreadTaskRequest.h * @brief protocol for #ZFThreadTaskRequest */ #ifndef _ZFI_ZFProtocolZFThreadTaskRequest_h_ #define _ZFI_ZFProtocolZFThreadTaskRequest_h_ #include "ZFCore/ZFProtocol.h" #include "ZFCore/ZFThread.h" ZF_NAMESPACE_GLOBAL_BEGIN /** * @brief protocol for #ZFThreadTaskRequest */ ZFPROTOCOL_INTERFACE_BEGIN(ZFThreadTaskRequest) public: /** * @brief see #ZFThreadTaskRequest */ virtual void taskRequest(ZF_IN const ZFListener &task, ZF_IN ZFObject *param0, ZF_IN ZFObject *param1) zfpurevirtual; ZFPROTOCOL_INTERFACE_END(ZFThreadTaskRequest) ZF_NAMESPACE_GLOBAL_END #endif // #ifndef _ZFI_ZFProtocolZFThreadTaskRequest_h_
[ "z@zsaber.com" ]
z@zsaber.com
501367baa3b4032162b3df5e8fae2334ad354332
8c1eaf4dcd39c40e7bb5fc7dd797d88584f6e42a
/tsc/src/ncurses/.svn/text-base/hzk.cpp.svn-base
ff540f5cfecca14c5998f558bacfaa2cba12b767
[]
no_license
guillaume-lin/tsc
11bd95478bf32c573bb04423d84275b01c3c93f2
b1a0d3f0e185ea8ce2837caab5acbefa09785d32
refs/heads/master
2020-04-04T09:11:46.859448
2019-03-24T11:06:21
2019-03-24T11:06:21
155,810,906
2
0
null
null
null
null
UTF-8
C++
false
false
4,323
/* @(#)hzk.cpp */ #include "hzk.hpp" #include "../frame-buffer/bpsf.h" #define STATIC_MEM_ITEM_COUNT 23 typedef struct { int m_size; int m_used; char m_data[48*48*sizeof(color_t)]; } static_mem_item_t; static_mem_item_t static_mem[STATIC_MEM_ITEM_COUNT]; void static_init() { for(int i=0; i<STATIC_MEM_ITEM_COUNT; i++){ static_mem[i].m_size = 48*48*sizeof(color_t); static_mem[i].m_used = 0; } } void* static_malloc(size_t size) { for(int i=0; i<STATIC_MEM_ITEM_COUNT; i++){ if(static_mem[i].m_used == 0){ static_mem[i].m_used = 1; return static_mem[i].m_data; } } return NULL; } void static_free(void* ptr) { for(int i=0; i<STATIC_MEM_ITEM_COUNT; i++){ if(static_mem[i].m_data == ptr){ static_mem[i].m_used = 0; } } } static mem_allocator_t allocator; CHzk::CHzk() :m_ascii_counter(0),m_chinese_counter(0) { allocator.malloc = static_malloc; allocator.free = static_free; for(int i=0; i<MAX_CHINESE_CHARACTER; i++){ if(mem_bitmap_init(&m_chinese[i],48,48,&allocator) != 0) throw 1; m_chinese_index[i] = 0; } for(int i=0; i<MAX_ASCII_CHARACTER; i++){ if(mem_bitmap_init(&m_ascii[i],24,48,&allocator) != 0) throw 2; m_ascii_index[i] = 0; } } CHzk::~CHzk() { for(int i=0; i<MAX_ASCII_CHARACTER; i++){ mem_bitmap_fini(&m_ascii[i]); } for(int i=0; i<MAX_CHINESE_CHARACTER; i++){ mem_bitmap_fini(&m_chinese[i]); } } int CHzk::loadChineseFont(char* fontfile) { m_chinese_font = fontfile; bpsf_t bpsf; bitmap_t bitmap; bitmap.m_fg = make_color(0,0,0); bitmap.m_bg = make_color(255,255,255); bitmap.get_width = mem_bitmap_get_width; bitmap.get_height = mem_bitmap_get_height; bitmap.get_pixel = mem_bitmap_get_pixel; bitmap.put_pixel = mem_bitmap_put_pixel; bpsf_open(&bpsf,fontfile); for(int i=0; i<MAX_CHINESE_CHARACTER; i++){ bitmap.m_private_data = &m_chinese[i]; char c1, c2; if(get_char_code(i,c1,c2) == 0){ if(bpsf_get_char(&bpsf,c1,c2,&bitmap) == 0){ #if 0 char s[10]; s[0] = c1; s[1] = c2; s[2] = '\0'; printf("load chinese %s\n",s); s[2] = '.'; s[3] = 'b'; s[4] = 'm'; s[5] = 'p'; s[6] = '\0'; bitmap_save_to_file(&bitmap,s); #endif } } } bpsf_close(&bpsf); return 0; } int CHzk::loadAsciiFont(char* fontfile) { m_ascii_font = fontfile; bpsf_t bpsf; bitmap_t bitmap; bitmap.m_fg = make_color(0,0,0); bitmap.m_bg = make_color(255,255,255); bitmap.get_width = mem_bitmap_get_width; bitmap.get_height = mem_bitmap_get_height; bitmap.get_pixel = mem_bitmap_get_pixel; bitmap.put_pixel = mem_bitmap_put_pixel; bpsf_open(&bpsf,fontfile); for(int i=0; i<MAX_ASCII_CHARACTER; i++){ bitmap.m_private_data = &m_ascii[i]; char c; if(get_char_code(i,c) == 0){ if(bpsf_get_ascii(&bpsf,c,&bitmap) == 0){ #if 0 char buf[10]; printf("load ascii %c\n",c); sprintf(buf,"%c.bmp",c); bitmap_save_to_file(&bitmap,buf); #endif } } } bpsf_close(&bpsf); return 0; } int CHzk::get_char_code(int i, char& c1, char& c2) { if(i >= MAX_CHINESE_CHARACTER || i < 0) return -1; int index = m_chinese_index[i]; c2 = index & 0xff; c1 = (index >> 8) & 0xff; return 0; } int CHzk::get_char_code(int i, char& c) { if(i >= MAX_ASCII_CHARACTER || i < 0) return -1; c = m_ascii_index[i] & 0xff; return 0; } static int make_index(char c1, char c2) { unsigned int i; i = (unsigned char)c1; i<<= 8; i |= (unsigned char)c2; return i; } int CHzk::addChar(char c1, char c2) { if(m_chinese_counter >= MAX_CHINESE_CHARACTER) return -1; m_chinese_index[m_chinese_counter++] = make_index(c1,c2); #if 0 char s[3]; s[0] = c1; s[1] = c2; s[2] = '\0'; printf("add %d : %s\n",m_chinese_counter-1,s); #endif return 0; } int CHzk::addChar(char c) { if(m_ascii_counter >= MAX_ASCII_CHARACTER) return -1; m_ascii_index[m_ascii_counter++] = make_index(0,c); #if 0 char s[2]; s[0] = c; s[1] = '\0'; printf("add %d : %s\n",m_ascii_counter-1,s); #endif return 0; } mem_bitmap_t* CHzk::getBitmap(char c1, char c2) { int index = make_index(c1,c2); for(int i=0; i<MAX_CHINESE_CHARACTER; i++) if(m_chinese_index[i] == index) return &m_chinese[i]; return NULL; } mem_bitmap_t* CHzk::getBitmap(char c) { int index = make_index(0,c); for(int i=0; i<MAX_ASCII_CHARACTER; i++) if(m_ascii_index[i] == index) return &m_ascii[i]; return NULL; }
[ "jingxian@gmail.com" ]
jingxian@gmail.com
332e768749d02ff0c1d3163345c58914c38890db
f6244209f8ecff355822843f64d6368281266143
/173.BinarySearchTreeIterator.cc
40dbd860f8ebf6a90e3ebc4a627bf49cf87bc70e
[]
no_license
seesealonely/old-leetcode
5711fc0d583ca15c14cb8fb3a241e860e6d6fcd4
28e4bc6e28ba8c36e90a05a6214c7c716fe03431
refs/heads/master
2022-04-26T10:18:43.770677
2020-04-28T21:20:35
2020-04-28T21:20:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
683
cc
/* Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: next() and hasNext() should run in average O(1) time and uses O(h) memory, where h is the height of the tree. */ #include"173.BinarySearchTreeIterator.h" /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ int main() { TreeNode *r=buildTree(); BSTIterator bi(r); cout<<bi.next()<<endl; cout<<bi.next()<<endl; cout<<bi.next()<<endl; return 0; }
[ "seesealonely@gmail.com" ]
seesealonely@gmail.com
5729fb04121c6b36016fdecdaa10347f60fe3aed
c5d68844759f45d194a571290e4c04f4a49fa90b
/cpp/stack/nearestSmallerElement.cpp
418ed62d913b66ce144d602c686a2bab24722815
[]
no_license
AnjaliG1999/DSA
0be65ab39b78e0eee7b96cdd3386346ed07b5bfb
fd90c3ce1319383175bfcf91639c48c043de4c34
refs/heads/master
2023-06-05T17:47:54.833967
2021-06-29T19:51:57
2021-06-29T19:51:57
275,578,418
0
0
null
null
null
null
UTF-8
C++
false
false
1,348
cpp
#include <bits/stdc++.h> using namespace std; void printArray(int arr[], int n){ for(int i=0; i<n; i++) cout << arr[i] << " "; } void printVector(vector<int> v) { for(auto elem : v){ cout << elem << " "; } } void nearestSmallerElementRight (int arr[], int n) { vector<int> output; stack<int> s; for(int i=n-1; i>=0; i--) { while(s.size() > 0 && s.top() >= arr[i]) s.pop(); if (s.size() == 0) output.push_back(-1); else output.push_back(s.top()); s.push(arr[i]); } printVector(output); } void nearestSmallerElementLeft (int arr[], int n) { vector<int> output; stack<int> s; for(int i=0; i<n; i++) { while(s.size() > 0 && s.top() >= arr[i]) s.pop(); if (s.size() == 0) output.push_back(-1); else output.push_back(s.top()); s.push(arr[i]); } printVector(output); } int main(){ int arr[] = {10, 5, 11, 6, 20, 12}; int n = sizeof(arr) / sizeof(arr[0]); cout << "The next smaller elements of "; printArray(arr, n); cout << "to right are "; nearestSmallerElementRight(arr, n); cout << "\nThe next smaller elements of "; printArray(arr, n); cout << "to left are "; nearestSmallerElementLeft(arr, n); }
[ "anjali24.7goyal@gmail.com" ]
anjali24.7goyal@gmail.com
4d907a19709cf692b6f2f90d968206ff63b918dd
c60f77b83c430a4164a32a75d00bf27888ed0534
/cuda/runtime/ocelot/executive/implementation/NVIDIAGPUDevice.cpp
3601869388d1232af3ebbded1b0496ce364a7a21
[ "MIT" ]
permissive
juniorprincewang/gdev
106c78da96ad3f4e7e017890d5d886c00287f93b
511667b1d02bb08f36afb468be51ba1fe0f96def
refs/heads/master
2022-12-07T18:40:20.893439
2020-09-02T07:44:14
2020-09-02T07:44:14
267,276,283
0
1
MIT
2020-05-27T09:25:32
2020-05-27T09:25:31
null
UTF-8
C++
false
false
49,203
cpp
/*! \file NVIDIAGPUDevice.cpp \author Gregory Diamos \date April 7, 2010 \brief The source file for the NVIDIAGPUDevice class. */ #ifndef NVIDIA_GPU_DEVICE_CPP_INCLUDED #define NVIDIA_GPU_DEVICE_CPP_INCLUDED // C++ includes #include <iomanip> // ocelot includes #include <ocelot/executive/interface/NVIDIAGPUDevice.h> #include <ocelot/executive/interface/NVIDIAExecutableKernel.h> #include <ocelot/cuda/interface/CudaDriver.h> #include <ocelot/cuda/interface/cuda_runtime.h> #include <ocelot/transforms/interface/PassManager.h> #include <ocelot/transforms/interface/SharedPtrAttribute.h> // hydrazine includes #include <hydrazine/interface/SystemCompatibility.h> #include <hydrazine/interface/Casts.h> #include <hydrazine/interface/Exception.h> #include <hydrazine/interface/debug.h> #include <hydrazine/interface/string.h> // standard library includes #include <cstring> //////////////////////////////////////////////////////////////////////////////// #ifdef REPORT_BASE #undef REPORT_BASE #endif #define checkError(x) if((_lastError = x) != CUDA_SUCCESS) { \ report("exception"); \ throw hydrazine::Exception("Cuda Driver Error - " #x + \ driver::toString(_lastError)); } #define Throw(x) {std::stringstream s; s << x; report(s.str()); \ throw hydrazine::Exception(s.str()); } //////////////////////////////////////////////////////////////////////////////// // Turn on report messages #define REPORT_BASE 0/*1*/ // Print out the full ptx for each module as it is loaded #define REPORT_PTX 0 // if 1, adds line numbers to reported PTX #define REPORT_PTX_WITH_LINENUMBERS 0 // if 1, overrides REPORT_PTX in the event of a JIT compilation error #define REPORT_PTX_ON_ERROR 1 // if 1, turns on error reporting for PTX JIT error even when REPORT_BASE is 0 #define OVERRIDE_REPORT_BASE_ON_PTX_ERROR 1 //////////////////////////////////////////////////////////////////////////////// typedef cuda::CudaDriver driver; namespace executive { NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation() : _flags(0), _size(0), _devicePointer(0), _hostPointer(0), _external(false) { } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation(size_t size) : _flags(0), _size(size), _hostPointer(0), _external(false) { checkError(driver::cuMemAlloc(&_devicePointer, size)); report("MemoryAllocation::MemoryAllocation() - allocated " << _size << " bytes of host-allocated memory"); report(" device pointer: " << (const void *)_devicePointer); } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation(size_t size, unsigned int flags) : Device::MemoryAllocation(false, true), _flags(flags), _size(size), _external(false) { checkError(driver::cuMemHostAlloc(&_hostPointer, size, _flags)); if(CUDA_SUCCESS != driver::cuMemHostGetDevicePointer(&_devicePointer, _hostPointer, 0)) { _devicePointer = 0; } report("MemoryAllocation::MemoryAllocation() - allocated " << _size << " bytes of host-allocated memory"); report(" host: " << (const void *)_hostPointer << ", device pointer: " << (const void *)_devicePointer); } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation(CUmodule module, const ir::Global& g) : Device::MemoryAllocation(true, false), _flags(0), _size(g.statement.bytes()), _hostPointer(0), _external(false) { size_t bytes; checkError(driver::cuModuleGetGlobal(&_devicePointer, &bytes, module, g.statement.name.c_str())); if(bytes != _size) { Throw("Global variable - " << g.statement.name << " - declared with " << _size << " bytes in Ocelot, but " << bytes << " in the CUDA driver."); } } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation( void* pointer, size_t size) : Device::MemoryAllocation(false, false), _flags(0), _size(size), _devicePointer(hydrazine::bit_cast<CUdeviceptr>(pointer)), _hostPointer(0), _external(true) { } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation( void* pointer, size_t size, unsigned int flags) : Device::MemoryAllocation(false, true), _flags(flags), _size(size), _devicePointer(0), _hostPointer(pointer), _external(true) { checkError(driver::cuMemHostRegister(_hostPointer, size, _flags)); if(CUDA_SUCCESS != driver::cuMemHostGetDevicePointer(&_devicePointer, _hostPointer, 0)) { _devicePointer = 0; } report("MemoryAllocation::MemoryAllocation() - registered " << _size << " bytes of host-allocated memory"); report(" host: " << (const void *)_hostPointer << ", device pointer: " << (const void *)_devicePointer); } NVIDIAGPUDevice::MemoryAllocation::~MemoryAllocation() { report("MemoryAllocation::~MemoryAllocation() : _external = " << _external << ", host() = " << host()); if(!_external) { if(host()) { checkError(driver::cuMemFreeHost(_hostPointer)); } else if(!global()) { checkError(driver::cuMemFree(_devicePointer)); } } } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation( const MemoryAllocation& a) : Device::MemoryAllocation( a.global(), a.host()), _flags(a.flags()), _size(a.size()), _devicePointer(0), _hostPointer(0), _external(a._external) { if(host()) { report("MemoryAllocation::MemoryAllocation() - allocated " << _size << " bytes of host-allocated memory"); checkError(driver::cuMemHostAlloc(&_hostPointer, _size, _flags)); checkError(driver::cuMemHostGetDevicePointer(&_devicePointer, _hostPointer, 0)); memcpy(_hostPointer, a._hostPointer, _size); } else if(global() || _external) { _devicePointer = a._devicePointer; } else if(!_external) { checkError(driver::cuMemAlloc(&_devicePointer, _size)); checkError(driver::cuMemcpyDtoD(_devicePointer, a._devicePointer, _size)); } } NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation(MemoryAllocation&& a) : _flags(0), _size(0), _devicePointer(0), _hostPointer(0) { std::swap(_host, a._host); std::swap(_global, a._global); std::swap(_flags, a._flags); std::swap(_size, a._size); std::swap(_devicePointer, a._devicePointer); std::swap(_hostPointer, a._hostPointer); std::swap(_external, a._external); } NVIDIAGPUDevice::MemoryAllocation& NVIDIAGPUDevice::MemoryAllocation::operator=(const MemoryAllocation& a) { if(this == &a) return *this; if(host()) { checkError(driver::cuMemFreeHost(_hostPointer)); } else if(!global() && !_external) { checkError(driver::cuMemFree(_devicePointer)); } _host = a._host; _global = a._global; _flags = a._flags; _size = a._size; _hostPointer = 0; _devicePointer = 0; _external = a._external; if(host()) { checkError(driver::cuMemHostAlloc(&_hostPointer, _size, _flags)); checkError(driver::cuMemHostGetDevicePointer(&_devicePointer, _hostPointer, 0)); memcpy(_hostPointer, a._hostPointer, _size); } else if(global() || _external) { _devicePointer = a._devicePointer; } else { checkError(driver::cuMemAlloc(&_devicePointer, _size)); checkError(driver::cuMemcpyDtoD(_devicePointer, a._devicePointer, _size)); } return *this; } NVIDIAGPUDevice::MemoryAllocation& NVIDIAGPUDevice::MemoryAllocation::operator=(MemoryAllocation&& a) { if(this == &a) return *this; std::swap(_host, a._host); std::swap(_global, a._global); std::swap(_flags, a._flags); std::swap(_size, a._size); std::swap(_devicePointer, a._devicePointer); std::swap(_hostPointer, a._hostPointer); std::swap(_external, a._external); return *this; } unsigned int NVIDIAGPUDevice::MemoryAllocation::flags() const { return _flags; } void* NVIDIAGPUDevice::MemoryAllocation::mappedPointer() const { return _hostPointer; } void* NVIDIAGPUDevice::MemoryAllocation::pointer() const { return (void*)_devicePointer; } size_t NVIDIAGPUDevice::MemoryAllocation::size() const { return _size; } void NVIDIAGPUDevice::MemoryAllocation::copy(size_t offset, const void* src, size_t s) { report("NVIDIAGPUDevice::..::copy() 1"); assert(offset + s <= size()); if(host()) { memcpy((char*)_hostPointer + offset, src, s); } else { CUdeviceptr dst = _devicePointer + offset; checkError(driver::cuMemcpyHtoD(dst, src, s)); } } void NVIDIAGPUDevice::MemoryAllocation::copy(void* dst, size_t offset, size_t s) const { report("NVIDIAGPUDevice::..::copy() 2 - is host? " << host() << ", " << s << " bytes"); assert(offset + s <= size()); if(host()) { std::memcpy(dst, (char*)_hostPointer + offset, s); } else { CUdeviceptr src = _devicePointer + offset; checkError(driver::cuMemcpyDtoH(dst, src, s)); } } void NVIDIAGPUDevice::MemoryAllocation::memset(size_t offset, int value, size_t s) { assert(s + offset <= size()); if(host()) { std::memset((char*)_hostPointer + offset, value, s); } else { CUdeviceptr dst = _devicePointer + offset; checkError(driver::cuMemsetD8(dst, value, s)); } } void NVIDIAGPUDevice::MemoryAllocation::copy(Device::MemoryAllocation* a, size_t toOffset, size_t fromOffset, size_t s) const { report("NVIDIAGPUDevice::..::copy() 3"); MemoryAllocation* allocation = static_cast<MemoryAllocation*>(a); assert(fromOffset + s <= size()); assert(toOffset + s <= allocation->size()); if(host()) { if(allocation->host()) { void* src = (char*)_hostPointer + fromOffset; void* dst = (char*)allocation->_hostPointer + toOffset; memcpy(dst, src, s); } else { void* src = (char*)_hostPointer + fromOffset; CUdeviceptr dst = allocation->_devicePointer + toOffset; checkError(driver::cuMemcpyHtoD(dst, src, s)); } } else { if(allocation->host()) { CUdeviceptr src = _devicePointer + fromOffset; void* dst = (char*)allocation->_hostPointer + toOffset; checkError(driver::cuMemcpyDtoH(dst, src, s)); } else { CUdeviceptr src = _devicePointer + fromOffset; CUdeviceptr dst = allocation->_devicePointer + toOffset; checkError(driver::cuMemcpyDtoD(dst, src, s)); } } } NVIDIAGPUDevice::Module::Module(NVIDIAGPUDevice * device, const ir::Module* m) : _handle(0), _device(device), ir(m) { } NVIDIAGPUDevice::Module::Module(const Module& m) : _handle(0), _device(m._device), ir(m.ir) { } NVIDIAGPUDevice::Module::~Module() { for(KernelMap::iterator kernel = kernels.begin(); kernel != kernels.end(); ++kernel) { delete kernel->second; } if(_handle != 0) { assert(driver::cuModuleUnload(_handle) == CUDA_SUCCESS ); } } void NVIDIAGPUDevice::Module::load() { report("Loading module - " << ir->path() << " on NVIDIA GPU."); // deal with .ptr.shared kernel parameter attributes const ir::Module *module = ir; ir::Module *copyModule = 0; if (transforms::SharedPtrAttribute::testModule(*module)) { transforms::SharedPtrAttribute ptrAttributePass; copyModule = new ir::Module(*ir); transforms::PassManager manager(copyModule); manager.addPass(ptrAttributePass); manager.runOnModule(); module = copyModule; } assert(!loaded()); #if 0 std::stringstream stream; module->writeIR(stream, ir::PTXEmitter::Target_NVIDIA_PTX30); #if REPORT_PTX_WITH_LINENUMBERS == 1 reportE(REPORT_PTX, " Binary is:\n" << hydrazine::addLineNumbers(stream.str())); #else reportE(REPORT_PTX, stream.str()); #endif #endif CUjit_option options[] = { CU_JIT_TARGET, CU_JIT_ERROR_LOG_BUFFER, CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, }; const uint32_t errorLogSize = 2048; uint32_t errorLogActualSize = errorLogSize - 1; uint8_t errorLogBuffer[errorLogSize]; std::memset(errorLogBuffer, 0, errorLogSize); void* optionValues[3] = { (void*)CU_TARGET_COMPUTE_20, (void*)errorLogBuffer, hydrazine::bit_cast<void*>(errorLogActualSize), }; if (_device->properties().major == 3) { optionValues[0] = (void *)CU_TARGET_COMPUTE_30; } #if 0 std::string ptxModule = stream.str(); #endif #if 0 CUresult result = driver::cuModuleLoadDataEx(&_handle, stream.str().c_str(), 3, options, optionValues); #else CUresult result; if (module->getCubin()) result = driver::cuModuleLoadDataEx(&_handle, module->getCubin(), 3, options, optionValues); else result = driver::cuModuleLoadDataEx(&_handle, module->getPTX(), 3, options, optionValues); #endif if(result != CUDA_SUCCESS) { #if 0 #if OVERRIDE_REPORT_BASE_ON_PTX_ERROR #undef REPORT_BASE #define REPORT_BASE 1 #endif #if REPORT_PTX_WITH_LINENUMBERS == 1 reportE(REPORT_PTX_ON_ERROR, " Binary is:\n" << hydrazine::addLineNumbers(stream.str())); #else reportE(REPORT_PTX_ON_ERROR, stream.str()); #endif #if OVERRIDE_REPORT_BASE_ON_PTX_ERROR #undef REPORT_BASE #define REPORT_BASE 0/*1*/ #endif #endif Throw("cuModuleLoadDataEx() - returned " << result << ". Failed to JIT module - " << ir->path() << " using NVIDIA JIT with error:\n" << errorLogBuffer); } report(" Module loaded successfully."); for(ir::Module::TextureMap::const_iterator texture = module->textures().begin(); texture != module->textures().end(); ++texture) { unsigned int flags = texture->second.normalizedFloat ? 0 : CU_TRSF_READ_AS_INTEGER; CUtexref reference; checkError(driver::cuModuleGetTexRef(&reference, _handle, texture->first.c_str())); checkError(driver::cuTexRefSetFlags(reference, flags)); } if (copyModule) { delete copyModule; } } bool NVIDIAGPUDevice::Module::loaded() const { return _handle != 0; } void NVIDIAGPUDevice::Module::translate() { if(!loaded()) load(); report("Creating NVIDIA kernels for module - " << ir->path()); for(ir::Module::KernelMap::const_iterator kernel = ir->kernels().begin(); kernel != ir->kernels().end(); ++kernel) { if (!kernel->second->function()) { CUfunction function; report(" - " << kernel->first); checkError(driver::cuModuleGetFunction(&function, _handle, kernel->first.c_str())); kernels.insert(std::make_pair(kernel->first, new NVIDIAExecutableKernel(*kernel->second, function))); } } } NVIDIAGPUDevice::Module::AllocationVector NVIDIAGPUDevice::Module::loadGlobals() { if(!loaded()) load(); assert(globals.empty()); AllocationVector allocations; report("Loading globals in module - " << ir->path()); for(ir::Module::GlobalMap::const_iterator global = ir->globals().begin(); global != ir->globals().end(); ++global) { if(global->second.statement.directive == ir::PTXStatement::Shared) continue; report(" " << global->first); MemoryAllocation* allocation = new MemoryAllocation(_handle, global->second); report(" pointer - " << allocation->pointer()); globals.insert(std::make_pair(global->first, allocation->pointer())); allocations.push_back(allocation); } return allocations; } bool NVIDIAGPUDevice::Module::translated() const { return kernels.size() == ir->kernels().size(); } NVIDIAExecutableKernel* NVIDIAGPUDevice::Module::getKernel( const std::string& name) { if(!translated()) translate(); NVIDIAExecutableKernel* kernel = 0; KernelMap::iterator k = kernels.find(name); if(k != kernels.end()) { kernel = k->second; } return kernel; } void* NVIDIAGPUDevice::Module::getTexture(const std::string& name) { if(!loaded()) load(); CUtexref texture; checkError(driver::cuModuleGetTexRef(&texture, _handle, name.c_str())); return texture; } static unsigned int channels(const cudaChannelFormatDesc& desc) { unsigned int channels = 0; channels = (desc.x > 0) ? channels + 1 : channels; channels = (desc.y > 0) ? channels + 1 : channels; channels = (desc.z > 0) ? channels + 1 : channels; channels = (desc.w > 0) ? channels + 1 : channels; return channels; } static CUarray_format_enum format(const cudaChannelFormatDesc& desc) { switch(desc.f) { case cudaChannelFormatKindSigned: { if(desc.x == 8) { return CU_AD_FORMAT_SIGNED_INT8; } else if(desc.y == 16) { return CU_AD_FORMAT_SIGNED_INT16; } else { return CU_AD_FORMAT_SIGNED_INT32; } } case cudaChannelFormatKindUnsigned: { if(desc.x == 8) { return CU_AD_FORMAT_UNSIGNED_INT8; } else if(desc.y == 16) { return CU_AD_FORMAT_UNSIGNED_INT16; } else { return CU_AD_FORMAT_UNSIGNED_INT32; } } case cudaChannelFormatKindFloat: { if(desc.x == 16) { return CU_AD_FORMAT_HALF; } else { return CU_AD_FORMAT_FLOAT; } } case cudaChannelFormatKindNone: break; } return CU_AD_FORMAT_UNSIGNED_INT8; } static CUaddress_mode_enum convert(cudaTextureAddressMode mode) { // Note that the cuda runtime does not expose CU_TR_ADDRESS_MODE_MIRROR if(mode == cudaAddressModeWrap) return CU_TR_ADDRESS_MODE_WRAP; return CU_TR_ADDRESS_MODE_CLAMP; } NVIDIAGPUDevice::Array3D::Array3D(const cudaChannelFormatDesc& desc, const ir::Dim3& size, CUdeviceptr d) : ptr(d), size(size) { CUDA_ARRAY3D_DESCRIPTOR descriptor; descriptor.Width = size.x; descriptor.Height = size.y; descriptor.Depth = size.z; descriptor.NumChannels = channels(desc); descriptor.Format = format(desc); descriptor.Flags = 0; bytesPerElement = ((desc.x + desc.y + desc.z + desc.w) / 8); checkError(driver::cuArray3DCreate(&array, &descriptor)); } NVIDIAGPUDevice::Array3D::Array3D() : array(0) { } NVIDIAGPUDevice::Array3D::~Array3D() { checkError(driver::cuArrayDestroy(array)); } void NVIDIAGPUDevice::Array3D::update() { report("Updating texture."); CUDA_MEMCPY3D memcpy; memcpy.srcLOD = 0; memcpy.dstLOD = 0; memcpy.WidthInBytes = bytesPerElement * size.x; memcpy.Height = size.y; memcpy.Depth = size.z; memcpy.srcMemoryType = CU_MEMORYTYPE_DEVICE; memcpy.srcDevice = ptr; memcpy.srcPitch = 0; memcpy.srcHeight = 0; memcpy.dstMemoryType = CU_MEMORYTYPE_ARRAY; memcpy.dstArray = array; memcpy.srcXInBytes = 0; memcpy.srcY = 0; memcpy.srcZ = 0; memcpy.dstXInBytes = 0; memcpy.dstY = 0; memcpy.dstZ = 0; checkError(driver::cuMemcpy3D(&memcpy)); } bool NVIDIAGPUDevice::_cudaDriverInitialized = false; CUresult NVIDIAGPUDevice::_lastError = CUDA_SUCCESS; DeviceVector NVIDIAGPUDevice::createDevices(unsigned int flags, int computeCapability) { report("NVIDIAGPUDevice::createDevices()"); if(!_cudaDriverInitialized) { driver::cuInit(0); _cudaDriverInitialized = true; report("driver::cuInit(0) called"); } DeviceVector devices; int count; checkError(driver::cuDeviceGetCount(&count)); for(int i = 0; i != count; ++i) { int major = 0; int minor = 0; checkError(driver::cuDeviceComputeCapability(&major, &minor, i)); if(major < computeCapability) { char name[256]; checkError(driver::cuDeviceGetName(name, 255, i)); std::cerr << "==Ocelot== WARNING - This version of Ocelot only " "supports compute capability " << computeCapability << ".0 and higher, ignoring device: '" << name << "'\n"; } else { devices.push_back(new NVIDIAGPUDevice(i, flags)); } } return devices; } unsigned int NVIDIAGPUDevice::deviceCount(int computeCapability) { if(!_cudaDriverInitialized) { driver::cuInit(0); _cudaDriverInitialized = true; } int count; checkError(driver::cuDeviceGetCount(&count)); int ignored = 0; for(int i = 0; i < count; ++i) { int major = 0; int minor = 0; checkError(driver::cuDeviceComputeCapability(&major, &minor, i)); if(major < computeCapability) ++ignored; } return count - ignored; } NVIDIAGPUDevice::NVIDIAGPUDevice(int id, unsigned int flags) : Device(flags), _selected(false), _next(0), _selectedStream(0)/*, _opengl(false)*/ { if(!_cudaDriverInitialized) { checkError(driver::cuInit(0)); _cudaDriverInitialized = true; } _runtimeVersion = 3020; checkError(driver::cuDriverGetVersion(&_driverVersion)); CUdevice device; checkError(driver::cuDeviceGet(&device, id)); // _opengl = hydrazine::isAnOpenGLContextAvailable(); report(" creating context"); #if 0 if(_opengl) { report(" creating GL context - flags: " << flags << ", device: " << device); checkError(driver::cuGLCtxCreate(&_context, flags, device)); } else { #endif report(" creating context - flags: " << flags << ", device: " << device); checkError(driver::cuCtxCreate(&_context, flags, device)); #if 0 } #endif report("NVIDIAGPUDevice::NVIDIAGPUDevice() - created context." /*"_opengl = " << _opengl*/); checkError(driver::cuCtxPopCurrent(&_context)); checkError(driver::cuDeviceGetName(_properties.name, 255, device)); size_t total; checkError(driver::cuDeviceTotalMem(&total, device)); _properties.totalMemory = total; _properties.ISA = ir::Instruction::SASS; checkError(driver::cuDeviceGetAttribute( (int*)&_properties.multiprocessorCount, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, device)); checkError(driver::cuDeviceGetAttribute(&_properties.memcpyOverlap, CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxThreadsPerBlock, CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxThreadsDim[0], CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxThreadsDim[1], CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxThreadsDim[2], CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxGridSize[0], CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxGridSize[1], CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, device)); checkError(driver::cuDeviceGetAttribute(&_properties.maxGridSize[2], CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, device)); checkError(driver::cuDeviceGetAttribute(&_properties.sharedMemPerBlock, CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, device)); checkError(driver::cuDeviceGetAttribute( &_properties.totalConstantMemory, CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, device)); checkError(driver::cuDeviceGetAttribute(&_properties.SIMDWidth, CU_DEVICE_ATTRIBUTE_WARP_SIZE, device)); checkError(driver::cuDeviceGetAttribute(&_properties.memPitch, CU_DEVICE_ATTRIBUTE_MAX_PITCH, device)); checkError(driver::cuDeviceGetAttribute(&_properties.regsPerBlock, CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, device)); checkError(driver::cuDeviceGetAttribute(&_properties.clockRate, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, device)); checkError(driver::cuDeviceGetAttribute(&_properties.textureAlign, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, device)); checkError(driver::cuDeviceGetAttribute(&_properties.integrated, CU_DEVICE_ATTRIBUTE_INTEGRATED, device)); checkError(driver::cuDeviceGetAttribute(&_properties.concurrentKernels, CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, device)); checkError(driver::cuDeviceComputeCapability(&_properties.major, &_properties.minor, device)); int unifiedAddressing = false; checkError(driver::cuDeviceGetAttribute(&unifiedAddressing, CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, device)); _properties.unifiedAddressing = unifiedAddressing; checkError(driver::cuDeviceGetAttribute(&_properties.memoryClockRate, CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, device)); checkError(driver::cuDeviceGetAttribute(&_properties.memoryBusWidth, CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, device)); checkError(driver::cuDeviceGetAttribute(&_properties.l2CacheSize, CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, device)); checkError(driver::cuDeviceGetAttribute( &_properties.maxThreadsPerMultiProcessor, CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, device)); } NVIDIAGPUDevice::~NVIDIAGPUDevice() { assert(!selected()); select(); _modules.clear(); checkError(driver::cuCtxDestroy(_context)); } Device::MemoryAllocation* NVIDIAGPUDevice::getMemoryAllocation( const void* address, AllocationType type) const { MemoryAllocation* allocation = 0; if(type == DeviceAllocation || type == AnyAllocation) { if(!_allocations.empty()) { AllocationMap::const_iterator alloc = _allocations.upper_bound( (void*)address); if(alloc != _allocations.begin()) --alloc; if(alloc != _allocations.end()) { if(!alloc->second->host() && (char*)address >= (char*)alloc->second->pointer()) { allocation = alloc->second; return allocation; } } } } if(type == HostAllocation || type == AnyAllocation) { for(AllocationMap::const_iterator alloc = _hostAllocations.begin(); alloc != _hostAllocations.end(); ++alloc) { if(alloc->second->host()) { if((char*)address >= alloc->second->mappedPointer() && (char*)address < (char*)alloc->second->mappedPointer() + alloc->second->size()) { allocation = alloc->second; break; } } } } return allocation; } Device::MemoryAllocation* NVIDIAGPUDevice::getGlobalAllocation( const std::string& moduleName, const std::string& name) { if(moduleName.empty()) { // try a brute force search over all modules for(ModuleMap::iterator module = _modules.begin(); module != _modules.end(); ++module) { if(module->second.globals.empty()) { Module::AllocationVector allocations = std::move( module->second.loadGlobals()); for(Module::AllocationVector::iterator allocation = allocations.begin(); allocation != allocations.end(); ++allocation) { _allocations.insert(std::make_pair( (*allocation)->pointer(), *allocation)); } } Module::GlobalMap::iterator global = module->second.globals.find(name); if(global != module->second.globals.end()) { return getMemoryAllocation(global->second, DeviceAllocation); } } return 0; } ModuleMap::iterator module = _modules.find(moduleName); if(module == _modules.end()) return 0; if(module->second.globals.empty()) { Module::AllocationVector allocations = std::move( module->second.loadGlobals()); for(Module::AllocationVector::iterator allocation = allocations.begin(); allocation != allocations.end(); ++allocation) { _allocations.insert(std::make_pair((*allocation)->pointer(), *allocation)); } } Module::GlobalMap::iterator global = module->second.globals.find(name); if(global == module->second.globals.end()) return 0; return getMemoryAllocation(global->second, DeviceAllocation); } Device::MemoryAllocation* NVIDIAGPUDevice::allocate(size_t size) { MemoryAllocation* allocation = new MemoryAllocation(size); _allocations.insert(std::make_pair(allocation->pointer(), allocation)); return allocation; } Device::MemoryAllocation* NVIDIAGPUDevice::allocateHost( size_t size, unsigned int flags) { MemoryAllocation* allocation = new MemoryAllocation(size, flags); _hostAllocations.insert(std::make_pair(allocation->mappedPointer(), allocation)); report("NVIDIAGPUDevice::allocateHost() - adding key " << allocation->mappedPointer()); return allocation; } Device::MemoryAllocation* NVIDIAGPUDevice::registerHost(void* pointer, size_t size, unsigned int flags) { MemoryAllocation* allocation = new MemoryAllocation(pointer, size, flags); _hostAllocations.insert(std::make_pair(allocation->pointer(), allocation)); report("NVIDIAGPUDevice::registerHost() - adding key " << allocation->pointer()); return allocation; } void NVIDIAGPUDevice::free(void* pointer) { if(pointer == 0) return; AllocationMap::iterator allocation = _allocations.find(pointer); if(allocation != _allocations.end()) { if(allocation->second->global()) { report("cannot free global pointer"); Throw("Cannot free global pointer - " << pointer); } delete allocation->second; _allocations.erase(allocation); } else { allocation = _hostAllocations.find(pointer); if(allocation != _hostAllocations.end()) { delete allocation->second; _hostAllocations.erase(allocation); } else { Throw("Tried to free invalid pointer - " << pointer); } } } Device::MemoryAllocationVector NVIDIAGPUDevice::getNearbyAllocations( void* pointer) const { MemoryAllocationVector allocations; for(AllocationMap::const_iterator allocation = _allocations.begin(); allocation != _allocations.end(); ++allocation) { allocations.push_back(allocation->second); } return std::move(allocations); } Device::MemoryAllocationVector NVIDIAGPUDevice::getAllAllocations() const { MemoryAllocationVector allocations; for(AllocationMap::const_iterator allocation = _allocations.begin(); allocation != _allocations.end(); ++allocation) { allocations.push_back(allocation->second); } for(AllocationMap::const_iterator allocation = _hostAllocations.begin(); allocation != _hostAllocations.end(); ++allocation) { allocations.push_back(allocation->second); } return allocations; } void NVIDIAGPUDevice::clearMemory() { for(AllocationMap::iterator allocation = _allocations.begin(); allocation != _allocations.end();) { if(allocation->second->global()) { ++allocation; } else { delete allocation->second; _allocations.erase(allocation++); } } for(AllocationMap::iterator allocation = _hostAllocations.begin(); allocation != _hostAllocations.end(); ++allocation) { delete allocation->second; } _hostAllocations.clear(); } #if 0 void* NVIDIAGPUDevice::glRegisterBuffer(unsigned int buffer, unsigned int flags) { report("Regstering open gl buffer " << buffer); if(!_opengl) Throw("No active opengl contexts."); CUgraphicsResource resource; checkError(driver::cuGraphicsGLRegisterBuffer(&resource, buffer, CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE)); report(" to resource - " << resource); return hydrazine::bit_cast<void*>(resource); } void* NVIDIAGPUDevice::glRegisterImage(unsigned int image, unsigned int target, unsigned int flags) { report("Regstering open gl image " << image << ", target " << target); if(!_opengl) Throw("No active opengl contexts."); CUgraphicsResource resource; checkError(driver::cuGraphicsGLRegisterImage(&resource, image, target, flags)); report(" to resource " << resource); return resource; } #endif void NVIDIAGPUDevice::unRegisterGraphicsResource(void* resource) { report("Unregistering graphics resource - " << resource); // if(!_opengl) Throw("No active opengl contexts."); checkError(driver::cuGraphicsUnregisterResource( hydrazine::bit_cast<CUgraphicsResource>(resource))); } void NVIDIAGPUDevice::mapGraphicsResource(void** resourceVoidPtr, int count, unsigned int streamId) { CUstream id = 0; if(streamId != 0) { StreamMap::iterator stream = _streams.find(streamId); if(stream == _streams.end()) { Throw("Invalid stream - " << streamId); } id = stream->second; } CUgraphicsResource * graphicsResources = (CUgraphicsResource *)resourceVoidPtr; // if(!_opengl) Throw("No active opengl contexts."); report("NVIDIAGPUDevice::mapGraphicsResource() - count = " << count ); CUresult result = driver::cuGraphicsMapResources(count, graphicsResources, id); report("driver::cuGraphicsMapresources() - " << result << ", " << cuda::CudaDriver::toString(result)); checkError(result); } void* NVIDIAGPUDevice::getPointerToMappedGraphicsResource(size_t& size, void* resource) { CUdeviceptr pointer; size_t bytes = 0; report("Getting pointer to mapped resource " << resource); // if(!_opengl) Throw("No active opengl contexts."); CUresult result = driver::cuGraphicsResourceGetMappedPointer( &pointer, &bytes, (CUgraphicsResource)resource); report(" cuGraphicsResourceGetMappedPointer() returned " << result) checkError(result); void* p = (void*)pointer; if (_allocations.find(p) == _allocations.end()) { _allocations.insert(std::make_pair(p, new MemoryAllocation(p, bytes))); } size = bytes; report(" size - " << size << ", pointer - " << pointer); return hydrazine::bit_cast<void*>(pointer); } void NVIDIAGPUDevice::setGraphicsResourceFlags(void* resource, unsigned int flags) { report("Setting flags to " << flags << " for graphics resource " << resource); // if(!_opengl) Throw("No active opengl contexts."); checkError(driver::cuGraphicsResourceSetMapFlags( (CUgraphicsResource)resource, flags)); } void NVIDIAGPUDevice::unmapGraphicsResource(void** resourceVoidPtr, int count, unsigned int streamID) { CUstream id = 0; if(_selectedStream != 0) { StreamMap::iterator stream = _streams.find(_selectedStream); assert(stream != _streams.end()); id = stream->second; } // if(!_opengl) Throw("No active opengl contexts."); CUdeviceptr pointer; size_t bytes = 0; CUgraphicsResource * graphicsResources = (CUgraphicsResource *)resourceVoidPtr; checkError(driver::cuGraphicsResourceGetMappedPointer(&pointer, &bytes, graphicsResources[0])); AllocationMap::iterator allocation = _allocations.find( hydrazine::bit_cast<void*>(pointer)); assert(allocation != _allocations.end()); delete allocation->second; _allocations.erase(allocation); checkError(driver::cuGraphicsUnmapResources(1, graphicsResources, id)); } void NVIDIAGPUDevice::load(const ir::Module* module) { assert(selected()); if(_modules.count(module->path()) != 0) { Throw("Duplicate module - " << module->path()); } _modules.insert(std::make_pair(module->path(), Module(this, module))); } void NVIDIAGPUDevice::unload(const std::string& name) { assert(selected()); ModuleMap::iterator module = _modules.find(name); if(module == _modules.end()) { Throw("Cannot unload unknown module - " << name); } for(Module::GlobalMap::iterator global = module->second.globals.begin(); global != module->second.globals.end(); ++global) { AllocationMap::iterator allocation = _allocations.find(global->second); assert(allocation != _allocations.end()); delete allocation->second; _allocations.erase(allocation); } _modules.erase(module); } ExecutableKernel* NVIDIAGPUDevice::getKernel(const std::string& moduleName, const std::string& kernelName) { ModuleMap::iterator module = _modules.find(moduleName); if(module == _modules.end()) return 0; return module->second.getKernel(kernelName); } unsigned int NVIDIAGPUDevice::createEvent(int flags) { CUevent event; checkError(driver::cuEventCreate(&event, flags)); unsigned int handle = _next++; _events.insert(std::make_pair(handle, event)); return handle; } void NVIDIAGPUDevice::destroyEvent(unsigned int handle) { EventMap::iterator event = _events.find(handle); if(event == _events.end()) { Throw("Invalid event - " << handle); } checkError(driver::cuEventDestroy(event->second)); _events.erase(event); } bool NVIDIAGPUDevice::queryEvent(unsigned int handle) { EventMap::const_iterator event = _events.find(handle); if(event == _events.end()) { Throw("Invalid event - " << handle); } CUresult result = driver::cuEventQuery(event->second); if(result == CUDA_SUCCESS) return true; return false; } void NVIDIAGPUDevice::recordEvent(unsigned int handle, unsigned int sHandle) { EventMap::const_iterator event = _events.find(handle); if(event == _events.end()) { Throw("Invalid event - " << handle); } if(sHandle != 0) { StreamMap::const_iterator stream = _streams.find(sHandle); if(stream == _streams.end()) { Throw("Invalid stream - " << sHandle); } checkError(driver::cuEventRecord(event->second, stream->second)); } else { checkError(driver::cuEventRecord(event->second, 0)); } } void NVIDIAGPUDevice::synchronizeEvent(unsigned int handle) { EventMap::const_iterator event = _events.find(handle); if(event == _events.end()) { Throw("Invalid event - " << handle); } checkError(driver::cuEventSynchronize(event->second)); } float NVIDIAGPUDevice::getEventTime(unsigned int startHandle, unsigned int endHandle) { EventMap::const_iterator start = _events.find(startHandle); if(start == _events.end()) { report("invalid start event"); Throw("Invalid start event - " << startHandle); } EventMap::const_iterator end = _events.find(endHandle); if(end == _events.end()) { report("invalid end event"); Throw("Invalid end event - " << endHandle); } float time = 0.0f; checkError(driver::cuEventElapsedTime(&time, start->second, end->second)); return time; } unsigned int NVIDIAGPUDevice::createStream() { CUstream stream; checkError(driver::cuStreamCreate(&stream, 0)); unsigned int handle = _next++; _streams.insert(std::make_pair(handle, stream)); return handle; } void NVIDIAGPUDevice::destroyStream(unsigned int handle) { StreamMap::iterator stream = _streams.find(handle); if(stream == _streams.end()) { Throw("Invalid stream - " << handle); } checkError(driver::cuStreamDestroy(stream->second)); _streams.erase(stream); } bool NVIDIAGPUDevice::queryStream(unsigned int handle) { StreamMap::const_iterator stream = _streams.find(handle); if(stream == _streams.end()) { Throw("Invalid stream - " << handle); } CUresult result = driver::cuStreamQuery(stream->second); if(result == CUDA_SUCCESS) return true; return false; } void NVIDIAGPUDevice::synchronizeStream(unsigned int handle) { StreamMap::iterator stream = _streams.find(handle); if(stream == _streams.end()) { Throw("Invalid stream - " << handle); } checkError(driver::cuStreamSynchronize(stream->second)); } void NVIDIAGPUDevice::setStream(unsigned int stream) { _selectedStream = stream; } void NVIDIAGPUDevice::select() { Device::select(); report("NVIDIAGPUDevice::select()"); checkError(driver::cuCtxPushCurrent(_context)); } void NVIDIAGPUDevice::unselect() { Device::unselect(); checkError(driver::cuCtxPopCurrent(&_context)); report("NVIDIAGPUDevice::unselect()"); } void NVIDIAGPUDevice::bindTexture(void* pointer, const std::string& moduleName, const std::string& textureName, const textureReference& texref, const cudaChannelFormatDesc& desc, const ir::Dim3& size) { ModuleMap::iterator module = _modules.find(moduleName); if(module == _modules.end()) { Throw("Invalid Module - " << moduleName); } void* tex = module->second.getTexture(textureName); if(tex == 0) { Throw("Invalid Texture - " << textureName << " in Module - " << moduleName); } if(_arrays.count(textureName) != 0) { unbindTexture(moduleName, textureName); } report("Binding texture " << textureName << " in module " << moduleName << " to pointer " << pointer << " with dimensions (" << size.x << "," << size.y << "," << size.z << ")"); CUtexref ref = hydrazine::bit_cast<CUtexref>(tex); CUdeviceptr ptr = hydrazine::bit_cast<CUdeviceptr>(pointer); size_t offset = 0; unsigned int bytesPerElement = ((desc.x + desc.y + desc.z + desc.w) / 8); unsigned int pitch = bytesPerElement * size.x; if(size.z > 1) { Array3D* array = new Array3D(desc, size, ptr); _arrays[textureName] = array; checkError(driver::cuTexRefSetArray(ref, array->array, CU_TRSA_OVERRIDE_FORMAT)); } else if(size.y > 1) { CUDA_ARRAY_DESCRIPTOR descriptor; descriptor.Width = size.x; descriptor.Height = size.y; descriptor.NumChannels = channels(desc); descriptor.Format = format(desc); checkError(driver::cuTexRefSetAddress2D(ref, &descriptor, ptr, pitch)); _arrays[textureName] = 0; } else { checkError(driver::cuTexRefSetAddress(&offset, ref, ptr, pitch)); _arrays[textureName] = 0; } if(texref.filterMode == cudaFilterModeLinear) { checkError(driver::cuTexRefSetFilterMode(ref, CU_TR_FILTER_MODE_LINEAR)); } else { checkError(driver::cuTexRefSetFilterMode(ref, CU_TR_FILTER_MODE_POINT)); } checkError(driver::cuTexRefSetAddressMode(ref, 0, convert(texref.addressMode[0]))); checkError(driver::cuTexRefSetAddressMode(ref, 1, convert(texref.addressMode[1]))); checkError(driver::cuTexRefSetAddressMode(ref, 2, convert(texref.addressMode[2]))); unsigned int flags = 0; checkError(driver::cuTexRefGetFlags(&flags, ref)); flags &= CU_TRSF_READ_AS_INTEGER; flags |= (texref.normalized) ? CU_TRSF_NORMALIZED_COORDINATES : 0; checkError(driver::cuTexRefSetFlags(ref, flags)); } void NVIDIAGPUDevice::unbindTexture(const std::string& moduleName, const std::string& textureName) { // this is a nop, textures cannot be unbound ModuleMap::iterator module = _modules.find(moduleName); if(module == _modules.end()) { Throw("Invalid Module - " << moduleName); } void* tex = module->second.getTexture(textureName); if(tex == 0) { Throw("Invalid Texture - " << textureName << " in Module - " << moduleName); } report("Unbinding texture " << textureName << " in module " << moduleName); ArrayMap::iterator array = _arrays.find(textureName); if (array != _arrays.end()) { assert(array != _arrays.end()); delete array->second; _arrays.erase(array); } } void* NVIDIAGPUDevice::getTextureReference(const std::string& moduleName, const std::string& textureName) { ModuleMap::iterator module = _modules.find(moduleName); if(module == _modules.end()) return 0; return module->second.getTexture(textureName); } void NVIDIAGPUDevice::launch(const std::string& moduleName, const std::string& kernelName, const ir::Dim3& grid, const ir::Dim3& block, size_t sharedMemory, const void* argumentBlock, size_t argumentBlockSize/*, const trace::TraceGeneratorVector& traceGenerators, const ir::ExternalFunctionSet* externals*/) { ModuleMap::iterator module = _modules.find(moduleName); if(module == _modules.end()) { Throw("Unknown module - " << moduleName); } NVIDIAExecutableKernel* kernel = module->second.getKernel(kernelName); if(kernel == 0) { Throw("Unknown kernel - " << kernelName << " in module " << moduleName); } if(kernel->sharedMemorySize() + sharedMemory > (size_t)properties().sharedMemPerBlock) { Throw("Out of shared memory for kernel \"" << kernel->name << "\" : \n\tpreallocated " << kernel->sharedMemorySize() << " + requested " << sharedMemory << " is greater than available " << properties().sharedMemPerBlock << " for device " << properties().name); } if(kernel->constMemorySize() > (size_t)properties().totalConstantMemory) { Throw("Out of constant memory for kernel \"" << kernel->name << "\" : \n\tpreallocated " << kernel->constMemorySize() << " is greater than available " << properties().totalConstantMemory << " for device " << properties().name); } kernel->device = this; kernel->setKernelShape(block.x, block.y, block.z); kernel->setArgumentBlock((const unsigned char*)argumentBlock, argumentBlockSize); kernel->updateArgumentMemory(); kernel->updateMemory(); kernel->setExternSharedMemorySize(sharedMemory); // kernel->setTraceGenerators(traceGenerators); for(ArrayMap::iterator array = _arrays.begin(); array != _arrays.end(); ++array) { if(array->second != 0) array->second->update(); } kernel->launchGrid(grid.x, grid.y, grid.z); synchronize(); } cudaFuncAttributes NVIDIAGPUDevice::getAttributes(const std::string& path, const std::string& kernelName) { ModuleMap::iterator module = _modules.find(path); if(module == _modules.end()) { Throw("Unknown module - " << path); } NVIDIAExecutableKernel* kernel = module->second.getKernel(kernelName); if(kernel == 0) { Throw("Unknown kernel - " << kernelName << " in module " << path); } cudaFuncAttributes attributes; memset(&attributes, 0, sizeof(cudaFuncAttributes)); attributes.sharedSizeBytes = kernel->sharedMemorySize(); attributes.constSizeBytes = kernel->constMemorySize(); attributes.localSizeBytes = kernel->localMemorySize(); attributes.maxThreadsPerBlock = kernel->maxThreadsPerBlock(); attributes.numRegs = kernel->registerCount(); attributes.ptxVersion = 21; attributes.binaryVersion = 21; return std::move(attributes); } static unsigned int translateError(CUresult error) { switch(error) { case CUDA_SUCCESS: return cudaSuccess; case CUDA_ERROR_INVALID_VALUE: return cudaErrorInvalidValue; case CUDA_ERROR_OUT_OF_MEMORY: return cudaErrorMemoryAllocation; case CUDA_ERROR_NOT_INITIALIZED: return cudaErrorInitializationError; case CUDA_ERROR_DEINITIALIZED: return cudaErrorInitializationError; case CUDA_ERROR_NO_DEVICE: return cudaErrorNoDevice; case CUDA_ERROR_INVALID_DEVICE: return cudaErrorInvalidDevice; case CUDA_ERROR_INVALID_IMAGE: return cudaErrorInvalidDeviceFunction; case CUDA_ERROR_INVALID_CONTEXT: return cudaErrorApiFailureBase; case CUDA_ERROR_CONTEXT_ALREADY_CURRENT: return cudaErrorApiFailureBase; case CUDA_ERROR_MAP_FAILED: return cudaErrorMapBufferObjectFailed; case CUDA_ERROR_UNMAP_FAILED: return cudaErrorUnmapBufferObjectFailed; case CUDA_ERROR_ARRAY_IS_MAPPED: return cudaErrorMapBufferObjectFailed; case CUDA_ERROR_ALREADY_MAPPED: return cudaErrorMapBufferObjectFailed; case CUDA_ERROR_NO_BINARY_FOR_GPU: return cudaErrorInvalidDeviceFunction; case CUDA_ERROR_ALREADY_ACQUIRED: return cudaErrorSetOnActiveProcess; case CUDA_ERROR_NOT_MAPPED: return cudaErrorUnmapBufferObjectFailed; case CUDA_ERROR_INVALID_SOURCE: return cudaErrorInvalidValue; case CUDA_ERROR_FILE_NOT_FOUND: return cudaErrorInvalidValue; case CUDA_ERROR_INVALID_HANDLE: return cudaErrorInvalidValue; case CUDA_ERROR_NOT_FOUND: return cudaErrorInvalidValue; case CUDA_ERROR_NOT_READY: return cudaErrorNotReady; case CUDA_ERROR_LAUNCH_FAILED: return cudaErrorLaunchFailure; case CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: return cudaErrorLaunchOutOfResources; case CUDA_ERROR_LAUNCH_TIMEOUT: return cudaErrorLaunchTimeout; case CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING: return cudaErrorInvalidTexture; case CUDA_ERROR_UNKNOWN: return cudaErrorUnknown; default: break; } return cudaErrorUnknown; } unsigned int NVIDIAGPUDevice::getLastError() { return translateError(_lastError); } void NVIDIAGPUDevice::synchronize() { checkError(driver::cuCtxSynchronize()); } void NVIDIAGPUDevice::limitWorkerThreads(unsigned int threads) { // this is a nop here } #if 0 void NVIDIAGPUDevice::setOptimizationLevel( translator::Translator::OptimizationLevel level) { // TODO work in something with the PTX JIT optimization level here } #endif } //////////////////////////////////////////////////////////////////////////////// #endif
[ "iwata@axe-inc.co.jp" ]
iwata@axe-inc.co.jp
1b2eb07fed1b8f8c1c8b3b7c3e75a43211d9566e
886b26344649454f234b95f8c49ff42aa517bd39
/fung_ExpressionNode__evaluate.cpp
735f220fb22a361050d3282bca5c222b485fc93f
[]
no_license
mugisaku/fung
0f19be7d67a607d2573ecdb96a4cc5809f910cac
6c0df5403f4394260ccae98ac7af5b61be3beba1
refs/heads/master
2021-01-19T12:53:21.221940
2017-09-08T13:40:02
2017-09-08T13:40:02
100,816,382
1
1
null
null
null
null
UTF-8
C++
false
false
6,387
cpp
#include"fung_ExpressionNode.hpp" #include"fung_function.hpp" #include"fung_error.hpp" #include"fung_context.hpp" namespace fung{ Value ExpressionNode:: tail_call(Context& ctx) const { if((*left == ExpressionNodeKind::identifier) && (*right == ExpressionNodeKind::value)) { auto& id = (*left )->identifier.string; auto rv = (*right).evaluate(ctx,true); auto& function_name = ctx->front().get_function_name(); if((id == function_name) && (rv == ValueKind::list)) { return Value(TailCalling(std::move(rv->list))); } } return cal(ctx,left->evaluate(ctx,true)); } Value ExpressionNode:: choice(Context& ctx, Value const& lv, bool multi) const { auto b = lv.convert_to_boolean(); if(b.is_undefined()) { throw Error("論理値が未定義"); } if(*right != ExpressionNodeKind::paired) { throw Error("条件演算の右辺が@airedでない"); } return b->boolean? right->get_left()->evaluate(ctx,multi) : right->get_right()->evaluate(ctx,multi); } Value ExpressionNode:: log_or(Context& ctx, Value const& lv) const { auto b = lv.convert_to_boolean(); if(b.is_undefined()) { throw Error("論理値が未定義"); } if(b->boolean) { return Value(true); } auto rv = right->evaluate(ctx,true); return rv.convert_to_boolean(); } Value ExpressionNode:: log_and(Context& ctx, Value const& lv) const { auto b = lv.convert_to_boolean(); if(b.is_undefined()) { throw Error("論理値が未定義"); } if(!b->boolean) { return Value(false); } auto rv = right->evaluate(ctx,true); return rv.convert_to_boolean(); } Value ExpressionNode:: cal(Context& ctx, Value const& lv) const { static std::string const fn_name("無名関数"); auto rv = right->evaluate(ctx,true); if(rv != ValueKind::list) { throw Error("関数呼び出しの右辺が引数リストではない"); } if(lv != ValueKind::function) { throw Error("関数呼び出しの左辺が関数参照ではない"); } auto flag = left->get_kind() == ExpressionNodeKind::identifier; auto& name = flag? (*left)->identifier.string:fn_name; return ctx.call(name,*lv->function,std::move(rv->list)); } Value ExpressionNode:: sus(Context& ctx, Value const& lv) const { auto rv = right->evaluate(ctx,true).convert_to_integer(); if(rv != ValueKind::integer) { throw Error("添字が整数でない"); } return Value::sus(lv,rv->integer); } Value ExpressionNode:: binop(Context& ctx, Value const& lv, Value const& rv) const { switch(data.mnemonic) { case(Mnemonic::add): return Value::add(lv,rv); case(Mnemonic::sub): return Value::sub(lv,rv); case(Mnemonic::mul): return Value::mul(lv,rv); case(Mnemonic::div): if(!rv) { throw Error(Cursor(),"ゼロ除算\n"); } return Value::div(lv,rv); break; case(Mnemonic::rem): if(!rv) { throw Error(Cursor(),"ゼロ除算\n"); } return Value::rem(lv,rv); break; case(Mnemonic::shl ): return Value::shl( lv,rv); case(Mnemonic::shr ): return Value::shr( lv,rv); case(Mnemonic::bit_and): return Value::bit_and(lv,rv); case(Mnemonic::bit_or ): return Value::bit_or( lv,rv); case(Mnemonic::bit_xor): return Value::bit_xor(lv,rv); case(Mnemonic::eq ): return Value::eq( lv,rv); case(Mnemonic::neq ): return Value::neq( lv,rv); case(Mnemonic::lt ): return Value::lt( lv,rv); case(Mnemonic::lteq ): return Value::lteq( lv,rv); case(Mnemonic::gt ): return Value::gt( lv,rv); case(Mnemonic::gteq ): return Value::gteq( lv,rv); default: throw Error(Cursor(),""); } return undefined; } Value ExpressionNode:: operate(Context& ctx, bool multi) const { auto& mnemonic = data.mnemonic; if(multi && (mnemonic == Mnemonic::cal)) { return tail_call(ctx); } auto lv = left->evaluate(ctx,true); if(mnemonic == Mnemonic::cho) { return choice(ctx,lv,multi); } else if(mnemonic == Mnemonic::log_or) { return log_or(ctx,lv); } else if(mnemonic == Mnemonic::log_and) { return log_and(ctx,lv); } if(mnemonic == Mnemonic::neg ){return Value::neg( lv);} else if(mnemonic == Mnemonic::log_not){return Value::log_not(lv);} else if(mnemonic == Mnemonic::bit_not){return Value::bit_not(lv);} else if(mnemonic == Mnemonic::der ){return Value::der( lv);} if(mnemonic == Mnemonic::cal) { return cal(ctx,lv); } if(mnemonic == Mnemonic::acc) { if(right->get_kind() != ExpressionNodeKind::identifier) { throw Error("メンバー呼び出しの右辺が識別子ではない"); } return lv.get_property((*right)->identifier.string); } if(mnemonic == Mnemonic::sus) { return sus(ctx,lv); } auto rv = right->evaluate(ctx,true); if(rv == ValueKind::list) { rv = rv->list.back(); } return binop(ctx,lv,rv); } Value ExpressionNode:: evaluate(Context& ctx, bool multi) const { switch(kind) { case(ExpressionNodeKind::null): case(ExpressionNodeKind::operator_): throw Error("未定義の値"); break; case(ExpressionNodeKind::paired): throw Error("pairedがここで評価されてはいけない"); break; case(ExpressionNodeKind::operation): return operate(ctx,multi); break; case(ExpressionNodeKind::value): return data.value; break; case(ExpressionNodeKind::identifier): return ctx[data.identifier.string]; break; case(ExpressionNodeKind::list): return Value(to_list(data.list,ctx)); break; case(ExpressionNodeKind::function_body): return ctx.call(*data.function_body); break; } return undefined; } List read_list(List ls, ExpressionList::const_iterator it, ExpressionList::const_iterator end, Context& ctx) { return(it != end)? read_list(ls+(*it)->evaluate(ctx),it+1,end,ctx):ls; } List to_list(ExpressionList const& ls, Context& ctx) { return read_list(List(),ls.cbegin(),ls.cend(),ctx); } }
[ "lentilspring@gmail.com" ]
lentilspring@gmail.com
5cbcfdc6ace72cd34ea01aeeb7570e39fd84ed95
802e71f0fba696021f7e9e2bf11fdd7e72e48529
/project/framework/Manager/LevelEditor.cpp
3a451dc8e84941fa997fc763f149290f753a9837
[]
no_license
Supreeth55/Metronome
7754e303dbe4c02282f865b2331865deaa19202a
244a3f1b61a441ab3565137e32b7af3158e8373f
refs/heads/master
2020-12-20T02:57:31.338973
2020-01-24T04:36:43
2020-01-24T04:36:43
235,939,199
0
0
null
null
null
null
UTF-8
C++
false
false
1,009
cpp
/** * @file LevelEditor.cpp * @author Supreeth Rao Pejawar * @date 10/31/19 * @brief This file has functions related to creating a level editor * Copyright (C) 2019 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited. */ #include "../Source/pch.h" #include "LevelEditor.h" #include"ObjectFactoryManager.h" #include "..\Source\Components\Body.h" LevelEditor::LevelEditor() { pBody = new Body(); levelEditoris_on = false; key = -1; } LevelEditor::~LevelEditor() { } LevelEditor* LevelEditor::GetInstance() { if (!mInstance) { mInstance = new LevelEditor(); } return mInstance; } void LevelEditor::hightlightObject(Asset* pAs) { pAs->obj->SetDiffuse(0, 0, 0); } void LevelEditor::createObject(const char* object, unsigned int i) { //ObjectFactoryManager::GetInstance()->CreateRunTimeObject(object, pBody); } void LevelEditor::Destroy() { delete mInstance; }
[ "58317818+Supreeth55@users.noreply.github.com" ]
58317818+Supreeth55@users.noreply.github.com
d33a1e7ba2accebb5c5836af20c4f3b71583532c
e5d2ac0ca952944365a03fe10a8dbab688bf85fd
/src/common/util/timespec.cc
26c127e6c320068d7247b749aaf45ec8dc5efd8b
[]
no_license
dezgeg/udpgame
fbb25b2a2e5764d59f2f10220be9e7ba22807f4a
23d9779f097c9cce79c7bb4f443c8a8e8a00b1ef
refs/heads/master
2021-01-13T12:08:57.552848
2014-01-14T18:04:10
2014-01-14T18:04:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,296
cc
#include "common/util/timespec.h" #include "common/config.h" std::ostream& operator<<(std::ostream& out, const timespec& ts) { long t = (ts.tv_sec * GIGA + ts.tv_nsec)/MEGA; return out << t; } void normalize(timespec& ts) { time_t secs = ts.tv_nsec / GIGA; ts.tv_nsec -= secs * GIGA; ts.tv_sec += secs; if (ts.tv_sec * ts.tv_nsec >= 0) return; if (ts.tv_nsec < 0) { ts.tv_sec -= 1; ts.tv_nsec += GIGA; } else { ts.tv_sec += 1; ts.tv_nsec -= GIGA; } } timespec& operator-=(timespec& lhs, timespec& rhs) { lhs.tv_sec -= rhs.tv_sec; lhs.tv_nsec -= rhs.tv_nsec; normalize(lhs); return lhs; } timespec operator-(timespec& lhs, timespec& rhs) { timespec ts(lhs); return ts -= rhs; } timespec& operator+=(timespec& lhs, timespec& rhs) { lhs.tv_sec += rhs.tv_sec; lhs.tv_nsec += rhs.tv_nsec; normalize(lhs); return lhs; } timespec operator+(timespec& lhs, timespec& rhs) { timespec ts(lhs); return ts += rhs; } int ts_comp(timespec& lhs, timespec& rhs) { if (lhs.tv_sec > rhs.tv_sec) return 1; if (lhs.tv_sec < rhs.tv_sec) return -1; if (lhs.tv_nsec > rhs.tv_nsec) return 1; if (lhs.tv_nsec < rhs.tv_nsec) return -1; return 0; } bool operator<(timespec& lhs, timespec& rhs) { return ts_comp(lhs, rhs) == -1; }
[ "martti.rannanjarvi@iki.fi" ]
martti.rannanjarvi@iki.fi
e30bf369e355ab94b055fba32792b4eb5d2513b3
baa703c07b3e75308c53d5d33cd4f322d25dbdd4
/Labs/Rational/Rational/main.cpp
73437a22ff624b32006ef9b9b4c1432785d285a2
[ "MIT" ]
permissive
hanselcheong/CS122
4b37edd3854177c296590d04ecf7db147c422f8c
5975cd001a9943455a5664b199c33490d4deb4be
refs/heads/master
2021-01-17T21:45:45.250840
2015-05-27T19:44:59
2015-05-27T19:44:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
133
cpp
#include "rational.h" int main (void) { // instantiate an object Rational num1; num1.setNumerator (5); result = return 0; }
[ "ricky.webber@hotmail.com" ]
ricky.webber@hotmail.com
8c68b3800be5ad9e32e717cfe1b85ee275b264cd
ac69d51762ab192b60780444e14080545b00bd68
/src/greedyMethod/MINASTIRITH.cpp
22a37b002733381281ca3b5bdb640c91f8d7c426
[]
no_license
inpyeong/Algorithmic-problem-solving-strategies
6ef192472f324a4131a2abf85dc8b60cd2e6340f
a3aadd68428321ac493d7603fa14de60c7f1fa84
refs/heads/master
2023-03-01T19:32:13.844773
2021-02-17T00:34:27
2021-02-17T00:34:27
290,264,353
0
0
null
null
null
null
UTF-8
C++
false
false
1,417
cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; const double pi = 2.0 * acos(0); const int INF = 987654321; int n; double y[100], x[100], r[100]; pair<double, double> ranges[100]; void convertToRanges() { for (int i = 0; i < n; ++i) { double loc = fmod(2*pi + atan2(y[i], x[i]), 2*pi); double range = 2.0 * asin(r[i] / 2.0 / 8.0); ranges[i] = make_pair(loc - range, loc + range); } sort(ranges, ranges+n); } int solveLinear(double begin, double end) { int used = 0, idx = 0; while(begin < end) { double maxCover = -1; while(idx < n && ranges[idx].first <= begin) { maxCover = max(maxCover, ranges[idx].second); ++idx; } if(maxCover <= begin) return INF; begin = maxCover; ++used; } return used; } int solveCircle() { int ret = INF; sort(ranges, ranges+n); for (int i = 0; i < n; ++i) { if(ranges[i].first <= 0 || ranges[i].second >= 2*pi) { double begin = fmod(ranges[i].second, 2*pi); double end = fmod(ranges[i].first + 2*pi, 2*pi); ret = min(ret, 1 + solveLinear(begin, end)); } } return ret; } void solve() { cin >> n; for (int i = 0; i < n; ++i) cin >> y[i] >> x[i] >> r[i]; convertToRanges(); int answer = solveCircle(); if(answer == INF) cout << "IMPOSSIBLE" << "\n"; else cout << answer << "\n"; } int main() { int t; cin >> t; while(t--) solve(); }
[ "jinipyung@gmail.com" ]
jinipyung@gmail.com
3f5c0ffb55f15c0817cfd281f8ca3d449696a222
bc5b6f0b42d53adb704cc2185a31ca0706209bec
/old/transport/event_loop.hpp
7bf5c60a51ae9a30fdcb3f02f6bfaa399e94c77e
[]
no_license
codex-tk/deprecated-tcode
45caf53b2fb3d2b50b4d54a80ce1d8f907e9ec3c
876a5f2f79ef9cff74f02b74ba0e7236a9471637
refs/heads/master
2021-05-31T12:57:46.045164
2015-10-28T14:55:34
2015-10-28T14:55:34
38,053,428
0
0
null
null
null
null
UTF-8
C++
false
false
1,376
hpp
#ifndef __tcode_transport_event_loop_h__ #define __tcode_transport_event_loop_h__ #if defined( TCODE_TARGET_WINDOWS ) #include <io/completion_port.hpp> #elif defined( TCODE_TARGET_LINUX ) #include <io/epoll.hpp> #endif #include <io/completion_handler_one_shot.hpp> #include <transport/event_timer.hpp> #include <thread> #include <list> namespace tcode { namespace transport { #if defined( TCODE_TARGET_WINDOWS ) typedef tcode::io::completion_port dispatcher; #elif defined( TCODE_TARGET_LINUX ) typedef tcode::io::epoll dispatcher; #endif class event_loop { public: event_loop( void ); ~event_loop( void ); void links_add( void ); void links_release( void ); transport::dispatcher& dispatcher( void ); void run( void ); bool in_event_loop( void ); void execute_handler( tcode::io::completion_handler* handler ); template < typename Handler > void execute( const Handler& handler ) { tcode::io::completion_handler* h = new tcode::io::completion_handler_one_shot_no_param< Handler >( handler ); execute_handler(h); } void schedule( const event_timer_ptr& ptr ); void cancel( const event_timer_ptr& ptr ); tcode::time_span wake_up_time( void ); void schedule_timer( void ); private: transport::dispatcher _dispatcher; std::atomic< int > _active_links; std::thread::id _thread_id; std::list< event_timer_ptr > _event_timers; }; }} #endif
[ "aoziczero@gmail.com" ]
aoziczero@gmail.com
b22cd4ba636a9c8d3f9cffbd1eba160c67c2e42d
0a6c0f765d7890914c431180b97aa9e46f1e5e14
/vtable.cpp
cec29b4023fecadfb9e7e4109912d2b16146405b
[]
no_license
HarlanHW/My_Compiler
ea7389363c09c8ce0474a19131458138b052d2ee
1b99aa8db16742a4be4f3b212648995cc0d07435
refs/heads/master
2020-03-14T15:20:11.216342
2018-05-14T10:59:35
2018-05-14T10:59:35
131,673,636
1
0
null
null
null
null
UTF-8
C++
false
false
6,886
cpp
#include"vtable.h" #define CONVERTTOHASH(l, r, op) ((((__int64) l) <<34) | (((__int64)r) << 4) | (op & 15)) #define EXTRELEFT 0xfffffffc00000000 #define EXTRERIGHT 0x00000003fffffff0 VTable::~VTable(){ for (int i = 0; i < curLevel; ++i) { if(vItems[i] != NULL) delNodes(i); } } void VTable::delNodes(int pos) { VNode *temp; while (vItems[pos] != NULL) { temp = vItems[pos]; vItems[pos] = vItems[pos]->next; delete temp; } } /*bool VTable::isValid(int id) { VNode *temp; for (int i = curLevel; i > -1; --i) { temp = vItems[i]; while (temp != NULL) { if (!temp->isTemp && temp->lID == id) return true; temp = temp->next; } } return false; }*/ int VTable::getGId(int id) { VNode *temp; for (int i = curLevel; i > -1; --i) { temp = vItems[i]; while (temp != NULL) { if (!temp->isTemp && temp->lId == id) return temp->gId; temp = temp->next; } } return -1; } /* *item是一个后缀表达式,前两个是操作数,第三个是操作符, *首先操作数要区分id和value,对于NUM类型,id1,id2的值为 value<<1 | 1; ID、TEMP类型值为 value<<1 *输入的后缀表达式为第一个 op 第二个 返回负一说明表达式不对 */ int VTable::newTemp(treeNode *item) { treeNode *temp1; temp1 = item->sibleNode; int id1, id2; switch (item->type) { case ID: id1 = getGId(item->value) << 1; break; case TEMP: id1 = item->value << 1; break; case NUM: id1 = item->value << 1 | 1; break; default: return -1; break; } switch (temp1->type) { case ID: id2 = getGId(temp1->value) << 1; break; case TEMP: id2 = temp1->value << 1; break; case NUM: id2 = temp1->value << 1 | 1; break; default: return -1; break; } temp1 = temp1->sibleNode; bool flag = false; int opCode = 0; //RELOP 为原始值, OP1 OP2随后 if (temp1->type == RELOP) { opCode = temp1->value; flag = opCode > 3; } else if (temp1->type == OP1) { flag = (temp1->value == 0); opCode = temp1->value + 6; } else if (temp1->type == OP2) { flag = (temp1->value == 0); opCode = temp1->value + 8; } else return -1; __int64 value; int ret; if (flag) { //对称的操作符 value = CONVERTTOHASH(id2, id1, opCode); ret = myHash(value); if (ret > -1) return ret; } value = CONVERTTOHASH(id1, id2, opCode); ret = myHash(value); if (ret > -1) return ret; VNode *vtemp = new VNode; vtemp->hashValue = value; vtemp->gId = allGId++; vtemp->lId = allLId++; vtemp->isTemp = true; vtemp->next = vItems[curLevel]; vItems[curLevel] = vtemp; return vtemp->gId; } int VTable::myHash(__int64 val) { VNode *temp; for (int i = curLevel; i > -1; --i) { temp = vItems[i]; while (temp != NULL) { if (temp->isTemp && temp->hashValue == val) return temp->gId; temp = temp->next; } } return -1; } bool VTable::newTemp(int id) { if (hasCur(id)) return false; VNode *temp = new VNode; temp->gId = allGId++; temp->lId = id; temp->next = vItems[curLevel]; vItems[curLevel] = temp; return true; } void VTable::dirty(int id) { int gId = getGId(id); if (gId == -1) return; VNode *temp, *temp2; __int64 hval1, hval2; std::stack<int, std::vector<int>> st1; st1.push(gId); while (!st1.empty()) { gId = st1.top(); st1.pop(); hval1 = CONVERTTOHASH(gId, 0, 0); hval2 = CONVERTTOHASH(0, gId, 0); for (int i = curLevel; i > -1; --i) { temp2 = temp = vItems[i]; while (temp != NULL) { if (temp->isTemp && ((temp->hashValue&EXTRELEFT) == hval1 || (temp->hashValue&EXTRERIGHT) == hval2)) { st1.push(temp->gId); if (temp == vItems[i]) { temp2 = vItems[i] = temp->next; delete temp; temp = vItems[i]; } else { temp2->next = temp->next; delete temp; temp = temp2; } } else { temp2 = temp; temp = temp->next; } } } } } void VTable::newLevel() { curLevel++; } void VTable::backLevel() { delNodes(curLevel); --curLevel; } bool VTable::hasCur(int id) { VNode *temp = vItems[curLevel]; while (temp!=NULL) { if (!temp->isTemp && temp->lId == id) return true; temp = temp->next; } return false; } int VTable::getLId(int id) { VNode *temp; for (int i = curLevel; i > -1; --i) { temp = vItems[i]; while (temp != NULL) { if (temp->isTemp && temp->gId == id) return temp->lId; temp = temp->next; } } return -1; } bool VTable::hasCur(treeNode *temp) { treeNode *temp1; temp1 = temp->sibleNode; int id1, id2; switch (temp->type) { case ID: id1 = getGId(temp->value) << 1; break; case TEMP: id1 = temp->value << 1; break; case NUM: id1 = temp->value << 1 | 1; break; default: return false; break; } switch (temp1->type) { case ID: id2 = getGId(temp1->value) << 1; break; case TEMP: id2 = temp1->value << 1; break; case NUM: id2 = temp1->value << 1 | 1; break; default: return false; break; } temp1 = temp1->sibleNode; bool flag = false; int opCode = 0; //RELOP 为原始值, OP1 OP2随后 if (temp1->type == RELOP) { opCode = temp1->value; flag = opCode > 3; } else if (temp1->type == OP1) { flag = (temp1->value == 0); opCode = temp1->value + 6; } else if (temp1->type == OP2) { flag = (temp1->value == 0); opCode = temp1->value + 8; } else return false; __int64 value; int ret; if (flag) { //对称的操作符 value = CONVERTTOHASH(id2, id1, opCode); ret = myHash(value); if (ret > -1) return true; } value = CONVERTTOHASH(id1, id2, opCode); ret = myHash(value); if (ret > -1) return true; return false; }
[ "1223101214@qq.com" ]
1223101214@qq.com
b780e181ac64d44efe3b09e6b37fed4e76a664a3
d2b8fe1806ed60301f32f7f4ce3d444d068ff93b
/ssf_core/structures.h
4aaa175701789679a939db87e7bd8e07011b3b10
[]
no_license
acnazarejr/ssf
142abf74003affe0ff97cc349b4a687a048aa1a8
27d18e4ea44e61739cec02ee4e00ced1c2d18c58
refs/heads/master
2022-11-20T00:54:04.425397
2020-07-29T01:13:10
2020-07-29T01:13:10
283,364,245
1
1
null
null
null
null
UTF-8
C++
false
false
398
h
#ifndef _STRUCTURES_H_ #define _STRUCTURES_H_ // class that keeps a list of structures used with the shared memory class SSFStructures { map<string, SSFData *> structureMap; public: SSFStructures(); static SSFStructures& Instance() { static SSFStructures instance; return instance; } // check if dataType is valid bool CheckDataType(string dataType); }; #endif
[ "acnazarejr@gmail.com" ]
acnazarejr@gmail.com
7b45c931a3b04ad8958b3e43286d008258dbc1ff
d00d604cbdea1d459a0b15a564d921d58b5f4276
/DnD/dependencies/include/Gaia/WidgetManager.h
7ac4db9fb5c7da161941cc1ae4a0a7665653ebe5
[]
no_license
Iscandel/DnD
bc1fee8fe485dd1ca94ddd1c99a41a28f696a86d
82810a45ba3ba1b13ebbdd3de9961423e4a7719f
refs/heads/master
2020-06-23T17:44:33.079494
2019-07-25T00:21:08
2019-07-25T00:21:08
198,702,771
1
0
null
null
null
null
UTF-8
C++
false
false
5,078
h
#ifndef H__WIDGETSMANAGER_100920111722__H #define H__WIDGETSMANAGER_100920111722__H /////////////////////////////////////////////////////////////////////////////// // Headers /////////////////////////////////////////////////////////////////////////////// #include "Gaia/widgets/WidgetList.h" #include "Gaia/WidgetFactory.h" #include "Gaia/tools/Exceptions.h" #include "Gaia/tools/Singleton.h" #include <string> #include <map> namespace gaia { class GAIA_DLL WidgetsManager : public Singleton<WidgetsManager> { public: typedef std::map<std::string, PtrWidget> WidgetMap; /////////////////////////////////////////////////////////////////////////// /// \brief Creates a new widget with the given type and associates the name. /// /// \param type : Widget type. /// \param name : Name to give. /// /// \return A smart pointer to the created widget /////////////////////////////////////////////////////////////////////////// PtrWidget createWidget(const std::string& type, const std::string& name); /////////////////////////////////////////////////////////////////////////// /// \brief Affects the look the specified widget /// /// \param widget : Widget considered. /// \param type : Widget type. /// /////////////////////////////////////////////////////////////////////////// void affectLook(PtrWidget widget, const std::string& type); /////////////////////////////////////////////////////////////////////////// /// \brief Registers the widget in the manager. /// /// \param w : The widget to register /////////////////////////////////////////////////////////////////////////// bool registerWidget(PtrWidget w); /////////////////////////////////////////////////////////////////////////// /// \brief Removes the widget from the manager. /// /// \param name : Widget name. /// /// \return true if it was successfully removed, false it if was not. /////////////////////////////////////////////////////////////////////////// bool removeWidget(const std::string& nom); /////////////////////////////////////////////////////////////////////////// /// \brief Removes the widget from the manager. /// /// \param w : Widget to remove. /// /// \return true if it was successfully removed, false it if was not. /////////////////////////////////////////////////////////////////////////// bool removeWidget(PtrWidget w); /////////////////////////////////////////////////////////////////////////// /// \brief Removes all the widgets which only exist in the widget manager. /// /// Nb: The root widget is duplicated in a member variable of GuiManager, /// so it is not unique. /////////////////////////////////////////////////////////////////////////// void removeUniqueWidgets(); /////////////////////////////////////////////////////////////////////////// /// \brief Removes all the widgets. /////////////////////////////////////////////////////////////////////////// void clean(); /////////////////////////////////////////////////////////////////////////// /// \brief Returns all the widgets. /// /// \return A vector containing smart pointers to all the widgets. /////////////////////////////////////////////////////////////////////////// std::vector<PtrWidget> getAllWidgets(); /////////////////////////////////////////////////////////////////////////// /// \brief Returns the widget corresponding to the given name. /// /// If the widget cannot be casted to the right type, an exception is thrown. /// If it cannot be found, a null pointer is returned. /// /// \param name : Widget name. /// /// \return A smart pointer to the widget. /////////////////////////////////////////////////////////////////////////// template<class T> boost::shared_ptr<T> getWidget(const std::string& name) { std::map<std::string, PtrWidget>::iterator it = myWidgets.find(name); if(it != myWidgets.end()) { #ifdef _DEBUG //assert(boost::dynamic_pointer_cast<T>(it->second) != 0); boost::shared_ptr<T> res = boost::dynamic_pointer_cast<T>(it->second); if(res == NULL) { throw GuiException("Widget " + name + " cannot be converted"); } return res; #else return boost::dynamic_pointer_cast<T>(it->second); //change to static #endif } ILogger::log(ILogger::ERRORS) << "Widget " << name << " not found\n"; return boost::shared_ptr<T>(); } /////////////////////////////////////////////////////////////////////////// /// \brief Indicates whether the widget exists. /// /// \param name : Widget name. /// /// \return true if the widget was found, false if it was not found. /////////////////////////////////////////////////////////////////////////// bool exists(const std::string& name); void removeDestructedWidgets(); protected: /////////////////////////////////////////////////////////////////////////// /// \brief Generates a unique widget name. /// /// \return An automatic and unique widget name. /////////////////////////////////////////////////////////////////////////// std::string generateUniqueName(); std::map<std::string, PtrWidget> myWidgets; }; }; #endif
[ "Moi@moi" ]
Moi@moi
91919dcc0de21c80757b34a4a4406e9f740ac083
1996b91caa6bf233ffd2677a44923f5e2a94c13f
/cse250/PeekDeque2MDO.cpp
58f7442d9ac354f162c02f4e45f6aa4f799c5483
[]
no_license
Oswamano/SchoolProjects
35bf041802f288e9a354c5f57c3449c272bbc68a
d0a0d39422fd2220ebc1d7beb7e75c6f2937bcc8
refs/heads/master
2021-01-10T16:00:09.645068
2016-03-02T01:34:04
2016-03-02T01:34:04
52,919,239
0
0
null
null
null
null
UTF-8
C++
false
false
6,150
cpp
// Matthew O'Connor Homework 4 50000250 #include <iostream> #include <string> #include <vector> #include <cmath> #include <fstream> using namespace std; int findSmallerString( const string& x, const string& y){// finds the smaller string and it's size if(x.size()< y.size()){return x.size();} else{return y.size();} } int tellSmallerString( const string& x, const string& y){// tells which string is smaller if(x.size()< y.size()){return 1;} else{return 2;} } int firstChange( const string& x,const string& y){// finds the first position that a string changes at int a = findSmallerString(x,y); for(int i = 0;i<a;i++){ if (x.at(i)!=y.at(i)){ return i; } } return -1;} bool ed1(const string&x, const string& y){ int numOfChanges=0; int ySize=y.size(); int xSize= x.size(); int difference = abs(ySize-xSize);// gets difference between the strings if (difference>1){// if difference is larger than two edit distance is larger than one return false; } if( difference==0){ for (int i = 0; i<ySize; i++){// if there is no difference in size looks for any changes if(y.at(i)!=x.at(i)){// if a change is found increments change count numOfChanges++; } } if (numOfChanges==1){return true;}// only allows 1 change otherwise it is false else{return false;} } if(difference==1){ int temp = firstChange(x,y); if (temp==-1){ return true;} else { int tell = tellSmallerString(x,y); string xtemp = x; string ytemp =y; if (tell==1){xtemp.erase(temp,1);}// this line and the next takes out the first difference else if (tell==2){ytemp.erase(temp,1);}// the difference is taken out so it can check for more for (int i = 0; i<xtemp.size(); i++){ if(ytemp.at(i)!=xtemp.at(i)) numOfChanges++;} if (numOfChanges>0){return false;} else{return true;} } } return false; } class StringDeque{// Deque time protected: vector<string>* elements; // its kind of like an array int frontItem; //CLASS INV: indexes item with least index int rearSpace; int upperBound; //CLASS INV: indexes space after item with greatest index public: StringDeque(int guaranteedCapacity): elements (new vector<string>(2*guaranteedCapacity)), frontItem (guaranteedCapacity), rearSpace (guaranteedCapacity), upperBound (2*guaranteedCapacity) {} virtual bool isEmpty() const { return frontItem == rearSpace; } virtual bool isFull() const { return rearSpace == upperBound || frontItem == 0; } virtual int size() const { return rearSpace - frontItem; } virtual string popRear() { if (isEmpty()) { cerr<<("Later we'll define and throw an EmptyQException"); return ""; } else { return elements->at(--rearSpace); } } virtual string popFront() { if (isEmpty()) { cerr<<("Later we'll define and throw an EmptyQException"); return ""; } else { return elements->at(frontItem++); } } virtual void pushFront(string newItem) { elements->at(--frontItem) = newItem; } virtual void pushRear(string newItem) { elements->at(rearSpace++) = newItem; } virtual string toString() const { string out = ""; for (int i = frontItem; i < rearSpace; i++) { out += elements->at(i) + " "; } return out; } }; class PeekDeque : public StringDeque{ // new peeking class private: int peekindex = frontItem; public: int count = 0; int back = 0; PeekDeque(int peekCapacity): StringDeque(peekCapacity){} virtual void moveFrontward(){ if (peekindex >= rearSpace){ cerr<< ("Index not within bounds"); } else{ peekindex++;} } virtual void moveRearward(){ if(peekindex<=(frontItem-1)){ cerr<<("Index out of bounds"); } else{ peekindex--;}} virtual string peek(){ return elements->at(peekindex); } virtual string peekAhead(){ return elements->at(peekindex+1); } virtual string peekBack(){ return elements->at(peekindex-1); } virtual void setloop(){ count = frontItem; back = rearSpace; } virtual void printAllWords(){ setloop(); while(count<back){ cout << elements->at(count)<<" "<<endl; count++; } } virtual void printAllStartingWith(char s){ setloop(); while(count<back){ if (elements->at(count)[0]== s){ cout << elements->at(count)<<" "<<endl; } count++; } } virtual string popRear() { if (isEmpty()) { cerr<<("Attempt to pop from empty PeekDeque"); return ""; } else { return elements->at(--rearSpace); } } virtual string popFront() { if (isEmpty()) { cerr<<("Attempt to pop from empty PeekDeque"); return ""; } else { return elements->at(frontItem++); } } virtual void setPeekFront(){peekindex=frontItem;} virtual void setPeekBack(){peekindex=rearSpace;} }; int main(){ //cout<< "entered"<<endl; int count=0; string first; string second; ifstream in("wordz.txt",ios::in); string read; PeekDeque* peeker = new PeekDeque(100); while(getline(in,read)){ peeker->pushRear(read); //cout<<"adding"<<endl; } bool check = true; if(!peeker->isEmpty()){ while(count<(peeker->size())-1){ first = peeker->peek(); // cout<<"first:"<<first<<endl; second = peeker->peekAhead(); //cout<<"second:"<<second<<endl; count++; if(!ed1(first,second)){ // cout<<"failed check"<<endl; check = false; } } } if (check ==false){cout<<"false"<<endl;return false;} if (check ==true){cout<<"true"<<endl;return true;} }
[ "matt@mainstreetcomputing.com" ]
matt@mainstreetcomputing.com
45e4758833d889866c9cfe8d239c504703b5a7fb
68d081a771f400c0238d1084f31ff6e6d95f0d28
/tests/main.cpp
eac80fee8b3322c2283a4618395491f7084c93d6
[]
no_license
pmakara/tooploox
8648ad8e1ee712a4f57d5875bc72f581b9f4b9a8
f14f9fbb42f5e0970da70f1579528c400550dc8a
refs/heads/master
2020-06-27T04:07:55.883477
2019-07-31T11:41:13
2019-07-31T11:41:13
199,840,507
0
0
null
null
null
null
UTF-8
C++
false
false
134
cpp
#include <gtest/gtest.h> int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
[ "pawelma@debian.pawelma_dom" ]
pawelma@debian.pawelma_dom
54e49a5107e54cd2a38fccc2511d8b6919a2b21a
2849698c84ecc7f7341e0b473839b1faf06cefc7
/src/Record.cpp
08538a2d55bc74dc1e3d55c04f16b2b6c1cd2209
[]
no_license
vmfrutos/P2_Arkanoid3D
504fec8042bc8f5bbff4af6f7f36a19fc7119f9c
50539b562f7b52580b86ca7e8a15eeb0639cb08f
refs/heads/master
2016-09-06T00:03:34.005721
2015-02-23T19:06:50
2015-02-23T19:06:50
28,781,039
0
0
null
null
null
null
UTF-8
C++
false
false
1,467
cpp
#include "Record.h" Record::Record(){ _nombre = ""; _segundosTranscurridos = 0.0; _nivel = 0; } Record::Record(const Record& r){ _nombre = r.getNombre(); _segundosTranscurridos = r.getSegundosTranscurridos(); _nivel = r.getNivel(); } Record::~Record(){ } void Record::setNombre(string nombre){ _nombre = nombre; } void Record::setSegundosTranscurridos(Ogre::Real segundosTranscurridos){ _segundosTranscurridos = segundosTranscurridos; } void Record::setNivel(int nivel){ _nivel = nivel; } string Record::getNombre() const{ return _nombre; } Ogre::Real Record::getSegundosTranscurridos() const{ return _segundosTranscurridos; } string Record::getTiempoTranscurridoStr() const { Contador cont; cont.incrementar(getSegundosTranscurridos()); return cont.getContadorStr(); } int Record::getNivel() const{ return _nivel; } string Record::getNivelStr() const { std::ostringstream nivelStr; nivelStr << getNivel(); return nivelStr.str(); } bool Record::operator<(const Record& r) const{ //cout << "Se va a ordenar "; if (this->getNivel() == r.getNivel()) { //cout << "nivel igual " << endl; return this->getSegundosTranscurridos() < r.getSegundosTranscurridos(); } else { //cout << "nivel igual " << endl; return this->getNivel() > r.getNivel(); } } Record &Record::operator = (const Record &r){ _nivel = r.getNivel(); _nombre = r.getNombre(); _segundosTranscurridos = r.getSegundosTranscurridos(); return(*this); }
[ "vmfrutos@gmail.com" ]
vmfrutos@gmail.com
4abcaea9dfc683d63d5507fbb43ad8da0c27e8b2
c1b0209fc4d4b91ea2d9c6427fe5fdb86232ff74
/SpamDetector.cpp
c9b463a73628fb96ca9d2af07807c83238ab4b64
[]
no_license
shirbrosh/CPP-ex3
74f96ff6af3a24614415736a8953c95ab86faf33
3ed7136092c01d3bb6757e5dd096791766329a17
refs/heads/main
2023-01-08T21:10:09.257675
2020-11-01T13:35:53
2020-11-01T13:35:53
309,103,126
0
0
null
null
null
null
UTF-8
C++
false
false
6,755
cpp
#include "HashMap.hpp" #include <iostream> #include <boost/tokenizer.hpp> #include <boost/filesystem.hpp> #define NUM_OF_ARGS 3 #define NUM_OF_COLS 2 #define NUM_OF_ARGS_MSG "Usage: SpamDetector <database path> <message path> <threshold>" #define INVALID_MSG "Invalid input" #define COMMA "," #define SPACE_CHAR ' ' #define SPAM "SPAM" #define NOT_SPAM "NOT_SPAM" #define ENTER '\r' /** * This function receives a string and checks if it contains more than 1 comma * @param line- the string to check */ void findDoubleComma(const std::string &line) { std::size_t found = line.find(COMMA); found = line.find(COMMA, found + 1); if (found != std::string::npos) { throw std::invalid_argument(INVALID_MSG); } } /** * This function receives a string and checks if it contains only digits * @param num - the string to check * @return true- if the string contains only digits, false-otherwise */ bool isNumber(std::string &num) { if (num[num.length() - 1] == ENTER) { num = num.erase(num.length() - 1); } for (char ch : num) { if (isdigit(ch) == 0) { return false; } } return true; } /** * This function converts chars in string into lowercase letters * @param data - the string to convert */ void makeLower(std::string &data) { std::transform(data.begin(), data.end(), data.begin(), [](unsigned char c) { return std::tolower(c); }); } /** * Parser for the database file * @param database - the file to parse * @param hashMap - the map to insert the data from the database file */ void databaseParser(std::ifstream &database, HashMap<std::string, int> &hashMap) { if (!database.is_open()) { throw std::invalid_argument(INVALID_MSG); } std::string line; std::vector<std::string> parameters; typedef boost::tokenizer<boost::char_separator<char>> tokenizer; boost::char_separator<char> sep{COMMA}; //reads one line at a time while (std::getline(database, line)) { //check if the the line is empty or contains only spaces if (line.empty() || line.find_first_not_of(SPACE_CHAR) == std::string::npos) { database.close(); throw std::invalid_argument(INVALID_MSG); } //exit if there is more than 1 comma findDoubleComma(line); tokenizer tok{line, sep}; parameters.assign(tok.begin(), tok.end()); //check if the line contains exactly 2 columns if (parameters.size() != NUM_OF_COLS) { database.close(); throw std::invalid_argument(INVALID_MSG); } //check if the second argument is a number if (!isNumber(parameters[1])) { database.close(); throw std::invalid_argument(INVALID_MSG); } std::string badWord = parameters[0]; int score = std::stoi(parameters[1]); //check if the given score is within the given range if (score < 0) { database.close(); throw std::invalid_argument(INVALID_MSG); } //convert every char to lower case makeLower(badWord); //finally after validating all arguments, insert the line to the hashMap hashMap.insert(badWord, score); } database.close(); } /** * Parser for the message file * @param messageFile - the message file to read * @return a string with the message file content */ std::string messageParser(std::ifstream &messageFile) { if (!messageFile.is_open()) { throw std::invalid_argument(INVALID_MSG); } std::string line; std::string message; while (std::getline(messageFile, line)) { message += line + ENTER; } //convert every char to lower case makeLower(message); messageFile.close(); return message; } /** * This function checks that the threshold argument received is valid * @param strThreshold - the threshold argument received * @return an int type with the received threshold value */ int thresholdParser(std::string &strThreshold) { if (!isNumber(strThreshold)) { throw std::invalid_argument(INVALID_MSG); } int threshold = std::stoi(strThreshold); if (threshold <= 0) { throw std::invalid_argument(INVALID_MSG); } return threshold; } /** * This function compares the message to the hashMap database and decides if the message is spam * or not * @param message - the message to check is spam * @param hashMap - the hashMap object containing the received database * @param threshold - the score from which the message considers a spam */ void isSpam(const std::string &message, const HashMap<std::string, int> &hashMap, int threshold) { int messageScore = 0; HashMap<std::string, int>::const_iterator it = hashMap.begin(); while (it != hashMap.end()) { //save the bad word to search for, and its matching score std::string badWord = (*it).first; int score = (*it).second; //search the message, and update the total message score std::size_t found = message.find(badWord); while (found != std::string::npos) { messageScore += score; found = message.find(badWord, found + 1); } ++it; } if (messageScore >= threshold) { std::cout << SPAM << std::endl; } else { std::cout << NOT_SPAM << std::endl; } } int main(int argc, char *argv[]) { if (argc != NUM_OF_ARGS + 1) { std::cerr << NUM_OF_ARGS_MSG << std::endl; return EXIT_FAILURE; } //if the files does not exists- exit failure if (!boost::filesystem::exists(argv[1]) || !boost::filesystem::exists(argv[2])) { std::cerr << INVALID_MSG << std::endl; return EXIT_FAILURE; } //if one or both of the files are empty- print "NOT_SPAM" if (boost::filesystem::is_empty(argv[1]) || boost::filesystem::is_empty(argv[2])) { std::cout << NOT_SPAM << std::endl; return EXIT_SUCCESS; } try { std::string strThreshold = argv[3]; int threshold = thresholdParser(strThreshold); HashMap<std::string, int> hashMap; //open and parse the database, close after std::ifstream database(argv[1]); databaseParser(database, hashMap); //open and parse messageFile, close after std::ifstream messageFile(argv[2]); std::string message = messageParser(messageFile); isSpam(message, hashMap, threshold); } catch (...) { std::cerr << INVALID_MSG << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; }
[ "noreply@github.com" ]
noreply@github.com
ddaa45e62abfd386a8a11413c5ea39b063060f53
11ef4bbb8086ba3b9678a2037d0c28baaf8c010e
/Source Code/server/binaries/chromium/gen/services/shape_detection/public/mojom/facedetection.mojom-blink.h
c7fd10fa41f9a74147577c7b73b773d3c25fabb8
[]
no_license
lineCode/wasmview.github.io
8f845ec6ba8a1ec85272d734efc80d2416a6e15b
eac4c69ea1cf0e9af9da5a500219236470541f9b
refs/heads/master
2020-09-22T21:05:53.766548
2019-08-24T05:34:04
2019-08-24T05:34:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
25,509
h
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_SHAPE_DETECTION_PUBLIC_MOJOM_FACEDETECTION_MOJOM_BLINK_H_ #define SERVICES_SHAPE_DETECTION_PUBLIC_MOJOM_FACEDETECTION_MOJOM_BLINK_H_ #include <stdint.h> #include <limits> #include <type_traits> #include <utility> #include "base/callback.h" #include "base/macros.h" #include "base/optional.h" #include "mojo/public/cpp/bindings/mojo_buildflags.h" #if BUILDFLAG(MOJO_TRACE_ENABLED) #include "base/trace_event/trace_event.h" #endif #include "mojo/public/cpp/bindings/clone_traits.h" #include "mojo/public/cpp/bindings/equals_traits.h" #include "mojo/public/cpp/bindings/lib/serialization.h" #include "mojo/public/cpp/bindings/struct_ptr.h" #include "mojo/public/cpp/bindings/struct_traits.h" #include "mojo/public/cpp/bindings/union_traits.h" #include "services/shape_detection/public/mojom/facedetection.mojom-shared.h" #include "services/shape_detection/public/mojom/facedetection.mojom-blink-forward.h" #include "skia/public/interfaces/bitmap.mojom-blink.h" #include "ui/gfx/geometry/mojo/geometry.mojom-blink.h" #include "mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h" #include "mojo/public/cpp/bindings/lib/wtf_hash_util.h" #include "third_party/blink/renderer/platform/wtf/hash_functions.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" #include "mojo/public/cpp/bindings/associated_interface_ptr.h" #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" #include "mojo/public/cpp/bindings/associated_interface_request.h" #include "mojo/public/cpp/bindings/interface_ptr.h" #include "mojo/public/cpp/bindings/interface_request.h" #include "mojo/public/cpp/bindings/lib/control_message_handler.h" #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h" #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h" #include "mojo/public/cpp/bindings/lib/native_enum_serialization.h" #include "mojo/public/cpp/bindings/lib/native_struct_serialization.h" namespace WTF { struct shape_detection_mojom_internal_LandmarkType_DataHashFn { static unsigned GetHash(const ::shape_detection::mojom::LandmarkType& value) { using utype = std::underlying_type<::shape_detection::mojom::LandmarkType>::type; return DefaultHash<utype>::Hash().GetHash(static_cast<utype>(value)); } static bool Equal(const ::shape_detection::mojom::LandmarkType& left, const ::shape_detection::mojom::LandmarkType& right) { return left == right; } static const bool safe_to_compare_to_empty_or_deleted = true; }; template <> struct HashTraits<::shape_detection::mojom::LandmarkType> : public GenericHashTraits<::shape_detection::mojom::LandmarkType> { static_assert(true, "-1000000 is a reserved enum value"); static_assert(true, "-1000001 is a reserved enum value"); static const bool hasIsEmptyValueFunction = true; static bool IsEmptyValue(const ::shape_detection::mojom::LandmarkType& value) { return value == static_cast<::shape_detection::mojom::LandmarkType>(-1000000); } static void ConstructDeletedValue(::shape_detection::mojom::LandmarkType& slot, bool) { slot = static_cast<::shape_detection::mojom::LandmarkType>(-1000001); } static bool IsDeletedValue(const ::shape_detection::mojom::LandmarkType& value) { return value == static_cast<::shape_detection::mojom::LandmarkType>(-1000001); } }; } // namespace WTF namespace shape_detection { namespace mojom { namespace blink { class FaceDetectionProxy; template <typename ImplRefTraits> class FaceDetectionStub; class FaceDetectionRequestValidator; class FaceDetectionResponseValidator; class FaceDetection : public FaceDetectionInterfaceBase { public: static const char Name_[]; static constexpr uint32_t Version_ = 0; static constexpr bool PassesAssociatedKinds_ = false; static constexpr bool HasSyncMethods_ = false; using Base_ = FaceDetectionInterfaceBase; using Proxy_ = FaceDetectionProxy; template <typename ImplRefTraits> using Stub_ = FaceDetectionStub<ImplRefTraits>; using RequestValidator_ = FaceDetectionRequestValidator; using ResponseValidator_ = FaceDetectionResponseValidator; enum MethodMinVersions : uint32_t { kDetectMinVersion = 0, }; virtual ~FaceDetection() {} using DetectCallback = base::OnceCallback<void(WTF::Vector<FaceDetectionResultPtr>)>; virtual void Detect(const SkBitmap& bitmap_data, DetectCallback callback) = 0; }; class FaceDetectionProxy : public FaceDetection { public: using InterfaceType = FaceDetection; explicit FaceDetectionProxy(mojo::MessageReceiverWithResponder* receiver); void Detect(const SkBitmap& bitmap_data, DetectCallback callback) final; private: mojo::MessageReceiverWithResponder* receiver_; }; class FaceDetectionStubDispatch { public: static bool Accept(FaceDetection* impl, mojo::Message* message); static bool AcceptWithResponder( FaceDetection* impl, mojo::Message* message, std::unique_ptr<mojo::MessageReceiverWithStatus> responder); }; template <typename ImplRefTraits = mojo::RawPtrImplRefTraits<FaceDetection>> class FaceDetectionStub : public mojo::MessageReceiverWithResponderStatus { public: using ImplPointerType = typename ImplRefTraits::PointerType; FaceDetectionStub() {} ~FaceDetectionStub() override {} void set_sink(ImplPointerType sink) { sink_ = std::move(sink); } ImplPointerType& sink() { return sink_; } bool Accept(mojo::Message* message) override { if (ImplRefTraits::IsNull(sink_)) return false; return FaceDetectionStubDispatch::Accept( ImplRefTraits::GetRawPointer(&sink_), message); } bool AcceptWithResponder( mojo::Message* message, std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { if (ImplRefTraits::IsNull(sink_)) return false; return FaceDetectionStubDispatch::AcceptWithResponder( ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder)); } private: ImplPointerType sink_; }; class FaceDetectionRequestValidator : public mojo::MessageReceiver { public: bool Accept(mojo::Message* message) override; }; class FaceDetectionResponseValidator : public mojo::MessageReceiver { public: bool Accept(mojo::Message* message) override; }; class FaceDetectorOptions { public: template <typename T> using EnableIfSame = std::enable_if_t<std::is_same<FaceDetectorOptions, T>::value>; using DataView = FaceDetectorOptionsDataView; using Data_ = internal::FaceDetectorOptions_Data; template <typename... Args> static FaceDetectorOptionsPtr New(Args&&... args) { return FaceDetectorOptionsPtr( base::in_place, std::forward<Args>(args)...); } template <typename U> static FaceDetectorOptionsPtr From(const U& u) { return mojo::TypeConverter<FaceDetectorOptionsPtr, U>::Convert(u); } template <typename U> U To() const { return mojo::TypeConverter<U, FaceDetectorOptions>::Convert(*this); } FaceDetectorOptions(); FaceDetectorOptions( uint32_t max_detected_faces, bool fast_mode); ~FaceDetectorOptions(); // Clone() is a template so it is only instantiated if it is used. Thus, the // bindings generator does not need to know whether Clone() or copy // constructor/assignment are available for members. template <typename StructPtrType = FaceDetectorOptionsPtr> FaceDetectorOptionsPtr Clone() const; // Equals() is a template so it is only instantiated if it is used. Thus, the // bindings generator does not need to know whether Equals() or == operator // are available for members. template <typename T, FaceDetectorOptions::EnableIfSame<T>* = nullptr> bool Equals(const T& other) const; size_t Hash(size_t seed) const; template <typename UserType> static WTF::Vector<uint8_t> Serialize(UserType* input) { return mojo::internal::SerializeImpl< FaceDetectorOptions::DataView, WTF::Vector<uint8_t>>(input); } template <typename UserType> static mojo::Message SerializeAsMessage(UserType* input) { return mojo::internal::SerializeAsMessageImpl< FaceDetectorOptions::DataView>(input); } // The returned Message is serialized only if the message is moved // cross-process or cross-language. Otherwise if the message is Deserialized // as the same UserType |input| will just be moved to |output| in // DeserializeFromMessage. template <typename UserType> static mojo::Message WrapAsMessage(UserType input) { return mojo::Message(std::make_unique< internal::FaceDetectorOptions_UnserializedMessageContext< UserType, FaceDetectorOptions::DataView>>(0, 0, std::move(input))); } template <typename UserType> static bool Deserialize(const void* data, size_t data_num_bytes, UserType* output) { return mojo::internal::DeserializeImpl<FaceDetectorOptions::DataView>( data, data_num_bytes, std::vector<mojo::ScopedHandle>(), output, Validate); } template <typename UserType> static bool Deserialize(const WTF::Vector<uint8_t>& input, UserType* output) { return FaceDetectorOptions::Deserialize( input.size() == 0 ? nullptr : &input.front(), input.size(), output); } template <typename UserType> static bool DeserializeFromMessage(mojo::Message input, UserType* output) { auto context = input.TakeUnserializedContext< internal::FaceDetectorOptions_UnserializedMessageContext< UserType, FaceDetectorOptions::DataView>>(); if (context) { *output = std::move(context->TakeData()); return true; } input.SerializeIfNecessary(); return mojo::internal::DeserializeImpl<FaceDetectorOptions::DataView>( input.payload(), input.payload_num_bytes(), std::move(*input.mutable_handles()), output, Validate); } uint32_t max_detected_faces; bool fast_mode; private: static bool Validate(const void* data, mojo::internal::ValidationContext* validation_context); }; // The comparison operators are templates, so they are only instantiated if they // are used. Thus, the bindings generator does not need to know whether // comparison operators are available for members. template <typename T, FaceDetectorOptions::EnableIfSame<T>* = nullptr> bool operator<(const T& lhs, const T& rhs); template <typename T, FaceDetectorOptions::EnableIfSame<T>* = nullptr> bool operator<=(const T& lhs, const T& rhs) { return !(rhs < lhs); } template <typename T, FaceDetectorOptions::EnableIfSame<T>* = nullptr> bool operator>(const T& lhs, const T& rhs) { return rhs < lhs; } template <typename T, FaceDetectorOptions::EnableIfSame<T>* = nullptr> bool operator>=(const T& lhs, const T& rhs) { return !(lhs < rhs); } class Landmark { public: template <typename T> using EnableIfSame = std::enable_if_t<std::is_same<Landmark, T>::value>; using DataView = LandmarkDataView; using Data_ = internal::Landmark_Data; template <typename... Args> static LandmarkPtr New(Args&&... args) { return LandmarkPtr( base::in_place, std::forward<Args>(args)...); } template <typename U> static LandmarkPtr From(const U& u) { return mojo::TypeConverter<LandmarkPtr, U>::Convert(u); } template <typename U> U To() const { return mojo::TypeConverter<U, Landmark>::Convert(*this); } Landmark(); Landmark( const WTF::Vector<::blink::WebFloatPoint>& locations, LandmarkType type); ~Landmark(); // Clone() is a template so it is only instantiated if it is used. Thus, the // bindings generator does not need to know whether Clone() or copy // constructor/assignment are available for members. template <typename StructPtrType = LandmarkPtr> LandmarkPtr Clone() const; // Equals() is a template so it is only instantiated if it is used. Thus, the // bindings generator does not need to know whether Equals() or == operator // are available for members. template <typename T, Landmark::EnableIfSame<T>* = nullptr> bool Equals(const T& other) const; template <typename UserType> static WTF::Vector<uint8_t> Serialize(UserType* input) { return mojo::internal::SerializeImpl< Landmark::DataView, WTF::Vector<uint8_t>>(input); } template <typename UserType> static mojo::Message SerializeAsMessage(UserType* input) { return mojo::internal::SerializeAsMessageImpl< Landmark::DataView>(input); } // The returned Message is serialized only if the message is moved // cross-process or cross-language. Otherwise if the message is Deserialized // as the same UserType |input| will just be moved to |output| in // DeserializeFromMessage. template <typename UserType> static mojo::Message WrapAsMessage(UserType input) { return mojo::Message(std::make_unique< internal::Landmark_UnserializedMessageContext< UserType, Landmark::DataView>>(0, 0, std::move(input))); } template <typename UserType> static bool Deserialize(const void* data, size_t data_num_bytes, UserType* output) { return mojo::internal::DeserializeImpl<Landmark::DataView>( data, data_num_bytes, std::vector<mojo::ScopedHandle>(), output, Validate); } template <typename UserType> static bool Deserialize(const WTF::Vector<uint8_t>& input, UserType* output) { return Landmark::Deserialize( input.size() == 0 ? nullptr : &input.front(), input.size(), output); } template <typename UserType> static bool DeserializeFromMessage(mojo::Message input, UserType* output) { auto context = input.TakeUnserializedContext< internal::Landmark_UnserializedMessageContext< UserType, Landmark::DataView>>(); if (context) { *output = std::move(context->TakeData()); return true; } input.SerializeIfNecessary(); return mojo::internal::DeserializeImpl<Landmark::DataView>( input.payload(), input.payload_num_bytes(), std::move(*input.mutable_handles()), output, Validate); } WTF::Vector<::blink::WebFloatPoint> locations; LandmarkType type; private: static bool Validate(const void* data, mojo::internal::ValidationContext* validation_context); }; // The comparison operators are templates, so they are only instantiated if they // are used. Thus, the bindings generator does not need to know whether // comparison operators are available for members. template <typename T, Landmark::EnableIfSame<T>* = nullptr> bool operator<(const T& lhs, const T& rhs); template <typename T, Landmark::EnableIfSame<T>* = nullptr> bool operator<=(const T& lhs, const T& rhs) { return !(rhs < lhs); } template <typename T, Landmark::EnableIfSame<T>* = nullptr> bool operator>(const T& lhs, const T& rhs) { return rhs < lhs; } template <typename T, Landmark::EnableIfSame<T>* = nullptr> bool operator>=(const T& lhs, const T& rhs) { return !(lhs < rhs); } class FaceDetectionResult { public: template <typename T> using EnableIfSame = std::enable_if_t<std::is_same<FaceDetectionResult, T>::value>; using DataView = FaceDetectionResultDataView; using Data_ = internal::FaceDetectionResult_Data; template <typename... Args> static FaceDetectionResultPtr New(Args&&... args) { return FaceDetectionResultPtr( base::in_place, std::forward<Args>(args)...); } template <typename U> static FaceDetectionResultPtr From(const U& u) { return mojo::TypeConverter<FaceDetectionResultPtr, U>::Convert(u); } template <typename U> U To() const { return mojo::TypeConverter<U, FaceDetectionResult>::Convert(*this); } FaceDetectionResult(); FaceDetectionResult( const ::blink::WebFloatRect& bounding_box, WTF::Vector<LandmarkPtr> landmarks); ~FaceDetectionResult(); // Clone() is a template so it is only instantiated if it is used. Thus, the // bindings generator does not need to know whether Clone() or copy // constructor/assignment are available for members. template <typename StructPtrType = FaceDetectionResultPtr> FaceDetectionResultPtr Clone() const; // Equals() is a template so it is only instantiated if it is used. Thus, the // bindings generator does not need to know whether Equals() or == operator // are available for members. template <typename T, FaceDetectionResult::EnableIfSame<T>* = nullptr> bool Equals(const T& other) const; template <typename UserType> static WTF::Vector<uint8_t> Serialize(UserType* input) { return mojo::internal::SerializeImpl< FaceDetectionResult::DataView, WTF::Vector<uint8_t>>(input); } template <typename UserType> static mojo::Message SerializeAsMessage(UserType* input) { return mojo::internal::SerializeAsMessageImpl< FaceDetectionResult::DataView>(input); } // The returned Message is serialized only if the message is moved // cross-process or cross-language. Otherwise if the message is Deserialized // as the same UserType |input| will just be moved to |output| in // DeserializeFromMessage. template <typename UserType> static mojo::Message WrapAsMessage(UserType input) { return mojo::Message(std::make_unique< internal::FaceDetectionResult_UnserializedMessageContext< UserType, FaceDetectionResult::DataView>>(0, 0, std::move(input))); } template <typename UserType> static bool Deserialize(const void* data, size_t data_num_bytes, UserType* output) { return mojo::internal::DeserializeImpl<FaceDetectionResult::DataView>( data, data_num_bytes, std::vector<mojo::ScopedHandle>(), output, Validate); } template <typename UserType> static bool Deserialize(const WTF::Vector<uint8_t>& input, UserType* output) { return FaceDetectionResult::Deserialize( input.size() == 0 ? nullptr : &input.front(), input.size(), output); } template <typename UserType> static bool DeserializeFromMessage(mojo::Message input, UserType* output) { auto context = input.TakeUnserializedContext< internal::FaceDetectionResult_UnserializedMessageContext< UserType, FaceDetectionResult::DataView>>(); if (context) { *output = std::move(context->TakeData()); return true; } input.SerializeIfNecessary(); return mojo::internal::DeserializeImpl<FaceDetectionResult::DataView>( input.payload(), input.payload_num_bytes(), std::move(*input.mutable_handles()), output, Validate); } ::blink::WebFloatRect bounding_box; WTF::Vector<LandmarkPtr> landmarks; private: static bool Validate(const void* data, mojo::internal::ValidationContext* validation_context); DISALLOW_COPY_AND_ASSIGN(FaceDetectionResult); }; // The comparison operators are templates, so they are only instantiated if they // are used. Thus, the bindings generator does not need to know whether // comparison operators are available for members. template <typename T, FaceDetectionResult::EnableIfSame<T>* = nullptr> bool operator<(const T& lhs, const T& rhs); template <typename T, FaceDetectionResult::EnableIfSame<T>* = nullptr> bool operator<=(const T& lhs, const T& rhs) { return !(rhs < lhs); } template <typename T, FaceDetectionResult::EnableIfSame<T>* = nullptr> bool operator>(const T& lhs, const T& rhs) { return rhs < lhs; } template <typename T, FaceDetectionResult::EnableIfSame<T>* = nullptr> bool operator>=(const T& lhs, const T& rhs) { return !(lhs < rhs); } template <typename StructPtrType> LandmarkPtr Landmark::Clone() const { return New( mojo::Clone(locations), mojo::Clone(type) ); } template <typename T, Landmark::EnableIfSame<T>*> bool Landmark::Equals(const T& other_struct) const { if (!mojo::Equals(this->locations, other_struct.locations)) return false; if (!mojo::Equals(this->type, other_struct.type)) return false; return true; } template <typename T, Landmark::EnableIfSame<T>*> bool operator<(const T& lhs, const T& rhs) { if (lhs.locations < rhs.locations) return true; if (rhs.locations < lhs.locations) return false; if (lhs.type < rhs.type) return true; if (rhs.type < lhs.type) return false; return false; } template <typename StructPtrType> FaceDetectionResultPtr FaceDetectionResult::Clone() const { return New( mojo::Clone(bounding_box), mojo::Clone(landmarks) ); } template <typename T, FaceDetectionResult::EnableIfSame<T>*> bool FaceDetectionResult::Equals(const T& other_struct) const { if (!mojo::Equals(this->bounding_box, other_struct.bounding_box)) return false; if (!mojo::Equals(this->landmarks, other_struct.landmarks)) return false; return true; } template <typename T, FaceDetectionResult::EnableIfSame<T>*> bool operator<(const T& lhs, const T& rhs) { if (lhs.bounding_box < rhs.bounding_box) return true; if (rhs.bounding_box < lhs.bounding_box) return false; if (lhs.landmarks < rhs.landmarks) return true; if (rhs.landmarks < lhs.landmarks) return false; return false; } template <typename StructPtrType> FaceDetectorOptionsPtr FaceDetectorOptions::Clone() const { return New( mojo::Clone(max_detected_faces), mojo::Clone(fast_mode) ); } template <typename T, FaceDetectorOptions::EnableIfSame<T>*> bool FaceDetectorOptions::Equals(const T& other_struct) const { if (!mojo::Equals(this->max_detected_faces, other_struct.max_detected_faces)) return false; if (!mojo::Equals(this->fast_mode, other_struct.fast_mode)) return false; return true; } template <typename T, FaceDetectorOptions::EnableIfSame<T>*> bool operator<(const T& lhs, const T& rhs) { if (lhs.max_detected_faces < rhs.max_detected_faces) return true; if (rhs.max_detected_faces < lhs.max_detected_faces) return false; if (lhs.fast_mode < rhs.fast_mode) return true; if (rhs.fast_mode < lhs.fast_mode) return false; return false; } } // namespace blink } // namespace mojom } // namespace shape_detection namespace mojo { template <> struct StructTraits<::shape_detection::mojom::blink::Landmark::DataView, ::shape_detection::mojom::blink::LandmarkPtr> { static bool IsNull(const ::shape_detection::mojom::blink::LandmarkPtr& input) { return !input; } static void SetToNull(::shape_detection::mojom::blink::LandmarkPtr* output) { output->reset(); } static const decltype(::shape_detection::mojom::blink::Landmark::locations)& locations( const ::shape_detection::mojom::blink::LandmarkPtr& input) { return input->locations; } static decltype(::shape_detection::mojom::blink::Landmark::type) type( const ::shape_detection::mojom::blink::LandmarkPtr& input) { return input->type; } static bool Read(::shape_detection::mojom::blink::Landmark::DataView input, ::shape_detection::mojom::blink::LandmarkPtr* output); }; template <> struct StructTraits<::shape_detection::mojom::blink::FaceDetectionResult::DataView, ::shape_detection::mojom::blink::FaceDetectionResultPtr> { static bool IsNull(const ::shape_detection::mojom::blink::FaceDetectionResultPtr& input) { return !input; } static void SetToNull(::shape_detection::mojom::blink::FaceDetectionResultPtr* output) { output->reset(); } static const decltype(::shape_detection::mojom::blink::FaceDetectionResult::bounding_box)& bounding_box( const ::shape_detection::mojom::blink::FaceDetectionResultPtr& input) { return input->bounding_box; } static const decltype(::shape_detection::mojom::blink::FaceDetectionResult::landmarks)& landmarks( const ::shape_detection::mojom::blink::FaceDetectionResultPtr& input) { return input->landmarks; } static bool Read(::shape_detection::mojom::blink::FaceDetectionResult::DataView input, ::shape_detection::mojom::blink::FaceDetectionResultPtr* output); }; template <> struct StructTraits<::shape_detection::mojom::blink::FaceDetectorOptions::DataView, ::shape_detection::mojom::blink::FaceDetectorOptionsPtr> { static bool IsNull(const ::shape_detection::mojom::blink::FaceDetectorOptionsPtr& input) { return !input; } static void SetToNull(::shape_detection::mojom::blink::FaceDetectorOptionsPtr* output) { output->reset(); } static decltype(::shape_detection::mojom::blink::FaceDetectorOptions::max_detected_faces) max_detected_faces( const ::shape_detection::mojom::blink::FaceDetectorOptionsPtr& input) { return input->max_detected_faces; } static decltype(::shape_detection::mojom::blink::FaceDetectorOptions::fast_mode) fast_mode( const ::shape_detection::mojom::blink::FaceDetectorOptionsPtr& input) { return input->fast_mode; } static bool Read(::shape_detection::mojom::blink::FaceDetectorOptions::DataView input, ::shape_detection::mojom::blink::FaceDetectorOptionsPtr* output); }; } // namespace mojo #endif // SERVICES_SHAPE_DETECTION_PUBLIC_MOJOM_FACEDETECTION_MOJOM_BLINK_H_
[ "wasmview@gmail.com" ]
wasmview@gmail.com
8bf1af275e144c5aa1b05f0830352b689004c2d0
443472f27f33765031fc7291c7723574288266e3
/code/bridges.cpp
2434a0c31c05bd611b89ae088d8d6ec7e42a58ca
[]
no_license
victorcolombo/caderno
fcc41cf16642ff190f1569717e0a85034b1b9c7a
f7c3595aee9dab33ed93b143f3f89b6fc242572a
refs/heads/master
2020-04-04T00:41:49.360135
2018-11-08T03:33:37
2018-11-08T03:33:44
155,659,473
0
0
null
2018-11-05T17:36:46
2018-11-01T03:54:33
C++
UTF-8
C++
false
false
1,002
cpp
#include <bits/stdc++.h> #define pb push_back using namespace std; typedef int node; typedef int edge; // Semelhante ao algoritmo de achar vertices de corte, // uma aresta (u,v) onde u eh pai de v na arvore de dfs, // eh uma ponte se nao existe uma aresta que volta para // u ou seus ancestrais na subarvore rooteada em v. // obs: usando a representacao de listas encadeadas estaticas, // sabemos que a aresta 'e' liga (to[e^1], to[e]) // N = no de vertices, M = no de arestas const int N = 7, M = 13; int tim = 0; int visited[N], disc[N], low[N], parent[N]; int head[N], to[2*M], nx[2*M]; vector<int> bridges; void get_bridges(node u){ visited[u] = true; disc[u] = low[u] = tim++; for(edge e = head[u]; e; e = nx[e]){ node v = to[e]; if(!visited[v]){ parent[v] = u; get_bridges(v); low[u] = min(low[u],low[v]); if(low[v] > disc[u]) bridges.pb(e); } else if (v != parent[u]) low[u] = min(low[u], disc[v]); } }
[ "gabrielrcarmo@gmail.com" ]
gabrielrcarmo@gmail.com
88d394010660b2e24079b16d7d1471f37d1c0baa
01d675fa45b21f502d18f41735fad7869c3671b2
/HuffmanCompress/HuffmanTree.hpp
8a257bac690a76f2176b08560e0dcf0774d8b90e
[]
no_license
duixin111/Pojects
a360fb385639408bc3e837a07a7c14abe2ffbab8
b364f6d0599f0806733282071ac5f5e76af10096
refs/heads/main
2023-08-31T13:17:26.330631
2021-09-13T01:33:13
2021-09-13T01:33:13
396,279,709
0
0
null
null
null
null
UTF-8
C++
false
false
1,578
hpp
#pragma once #include <iostream> #include <vector> #include <queue> using namespace std; template<class W> struct HuffmanTreeNode { HuffmanTreeNode<W>* left; HuffmanTreeNode<W>* right; HuffmanTreeNode<W>* parent; W weight; HuffmanTreeNode(const W& w) : left(nullptr) , right(nullptr) , parent(nullptr) , weight(w) {} }; template<class W> struct Com { typedef HuffmanTreeNode<W> Node; bool operator()(const Node* left, const Node* right) { return left->weight > right->weight; } }; template<class W> class HuffmanTree { typedef HuffmanTreeNode<W> Node; public: HuffmanTree() : root(nullptr) {} ~HuffmanTree() { Destroy(root); } void CreatHuffmanTree(const W array[], size_t size, const W& invalid) { // 小堆 priority_queue<Node*, vector<Node*>, Com<W>> q; // 1. 创建只有根节点的森林 for (size_t i = 0; i < size; ++i) { if(array[i] != invalid) q.push(new Node(array[i])); } // 2. 循环进行以下步骤 while (q.size() > 1) { // 取权值最小两棵树 Node* left = q.top(); q.pop(); Node* right = q.top(); q.pop(); Node* parent = new Node(left->weight + right->weight); parent->left = left; parent->right = right; left->parent = parent; right->parent = parent; // 将新创建的二叉树插入到二叉树 q.push(parent); } root = q.top(); } Node* GetRoot() { return root; } void Destroy(Node*& proot) { if (proot) { Destroy(proot->left); Destroy(proot->right); delete proot; proot = nullptr; } } private: Node* root; };
[ "noreply@github.com" ]
noreply@github.com
a98ca3f83e9fd23920be69f61acc973e8a555e60
f8ee8a60ea45b6079df2a4fce9fecfda9cb5d43a
/devel/include/visp_tracker/Init.h
20eddf6ea6260e68e06705761405b4f27d49731d
[]
no_license
superbigzz/ros_hdy
cadb26aa4c34497a83a37cf7f18f968cdce39059
f4bb894214ce23c82748dd896209332b9e4f690a
refs/heads/master
2020-07-25T05:49:45.996421
2019-11-03T02:44:08
2019-11-03T02:44:08
208,179,562
3
0
null
null
null
null
UTF-8
C++
false
false
2,529
h
// Generated by gencpp from file visp_tracker/Init.msg // DO NOT EDIT! #ifndef VISP_TRACKER_MESSAGE_INIT_H #define VISP_TRACKER_MESSAGE_INIT_H #include <ros/service_traits.h> #include <visp_tracker/InitRequest.h> #include <visp_tracker/InitResponse.h> namespace visp_tracker { struct Init { typedef InitRequest Request; typedef InitResponse Response; Request request; Response response; typedef Request RequestType; typedef Response ResponseType; }; // struct Init } // namespace visp_tracker namespace ros { namespace service_traits { template<> struct MD5Sum< ::visp_tracker::Init > { static const char* value() { return "99679e33547ba56c949bb75d2a309602"; } static const char* value(const ::visp_tracker::Init&) { return value(); } }; template<> struct DataType< ::visp_tracker::Init > { static const char* value() { return "visp_tracker/Init"; } static const char* value(const ::visp_tracker::Init&) { return value(); } }; // service_traits::MD5Sum< ::visp_tracker::InitRequest> should match // service_traits::MD5Sum< ::visp_tracker::Init > template<> struct MD5Sum< ::visp_tracker::InitRequest> { static const char* value() { return MD5Sum< ::visp_tracker::Init >::value(); } static const char* value(const ::visp_tracker::InitRequest&) { return value(); } }; // service_traits::DataType< ::visp_tracker::InitRequest> should match // service_traits::DataType< ::visp_tracker::Init > template<> struct DataType< ::visp_tracker::InitRequest> { static const char* value() { return DataType< ::visp_tracker::Init >::value(); } static const char* value(const ::visp_tracker::InitRequest&) { return value(); } }; // service_traits::MD5Sum< ::visp_tracker::InitResponse> should match // service_traits::MD5Sum< ::visp_tracker::Init > template<> struct MD5Sum< ::visp_tracker::InitResponse> { static const char* value() { return MD5Sum< ::visp_tracker::Init >::value(); } static const char* value(const ::visp_tracker::InitResponse&) { return value(); } }; // service_traits::DataType< ::visp_tracker::InitResponse> should match // service_traits::DataType< ::visp_tracker::Init > template<> struct DataType< ::visp_tracker::InitResponse> { static const char* value() { return DataType< ::visp_tracker::Init >::value(); } static const char* value(const ::visp_tracker::InitResponse&) { return value(); } }; } // namespace service_traits } // namespace ros #endif // VISP_TRACKER_MESSAGE_INIT_H
[ "dy1han@163.com" ]
dy1han@163.com
e5d52eb9d39c7a2ba7a5e558298627dd0457c1e0
3c8c5189fa408092a04aa24df0763b194a9c84d0
/detupvms/DetuPVMS/GeneratedFiles/ui_feedback.h
0cc9f016041fd9125c0597b88d56d143c23da432
[]
no_license
zengweicheng666/DetuPro
2970d70cbcd6cd9f5c2dbd55bc981313fc853d46
bd76deaaabd3eee7e460d9895f2fa37c4bed1804
refs/heads/master
2022-07-28T22:36:28.849221
2020-05-21T13:31:14
2020-05-21T13:31:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,354
h
/******************************************************************************** ** Form generated from reading UI file 'feedback.ui' ** ** Created by: Qt User Interface Compiler version 5.6.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_FEEDBACK_H #define UI_FEEDBACK_H #include <QtCore/QVariant> #include <QtWidgets/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QButtonGroup> #include <QtWidgets/QDialog> #include <QtWidgets/QHBoxLayout> #include <QtWidgets/QHeaderView> #include <QtWidgets/QLabel> #include <QtWidgets/QPushButton> #include <QtWidgets/QSpacerItem> #include <QtWidgets/QWidget> QT_BEGIN_NAMESPACE class Ui_feedback { public: QHBoxLayout *horizontalLayout_2; QWidget *widget; QHBoxLayout *horizontalLayout; QSpacerItem *horizontalSpacer; QLabel *imageLabel_; QLabel *tipLabel_; QSpacerItem *horizontalSpacer_2; QPushButton *closeButton_; void setupUi(QDialog *feedback) { if (feedback->objectName().isEmpty()) feedback->setObjectName(QStringLiteral("feedback")); feedback->resize(339, 41); feedback->setStyleSheet(QString::fromUtf8("QWidget#widget{\n" "background:#eeeeee;\n" "border-radius:4px;\n" "}\n" "QLabel{\n" "font-family:\"\345\276\256\350\275\257\351\233\205\351\273\221\";\n" "font-size:12px;\n" "color:#323434;\n" "text-align:center;\n" "}")); horizontalLayout_2 = new QHBoxLayout(feedback); horizontalLayout_2->setSpacing(0); horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); widget = new QWidget(feedback); widget->setObjectName(QStringLiteral("widget")); horizontalLayout = new QHBoxLayout(widget); horizontalLayout->setSpacing(10); horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); horizontalLayout->setContentsMargins(9, 9, 9, 9); horizontalSpacer = new QSpacerItem(98, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalLayout->addItem(horizontalSpacer); imageLabel_ = new QLabel(widget); imageLabel_->setObjectName(QStringLiteral("imageLabel_")); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(imageLabel_->sizePolicy().hasHeightForWidth()); imageLabel_->setSizePolicy(sizePolicy); imageLabel_->setMinimumSize(QSize(22, 22)); imageLabel_->setMaximumSize(QSize(22, 22)); horizontalLayout->addWidget(imageLabel_); tipLabel_ = new QLabel(widget); tipLabel_->setObjectName(QStringLiteral("tipLabel_")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(tipLabel_->sizePolicy().hasHeightForWidth()); tipLabel_->setSizePolicy(sizePolicy1); horizontalLayout->addWidget(tipLabel_); horizontalSpacer_2 = new QSpacerItem(98, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalLayout->addItem(horizontalSpacer_2); closeButton_ = new QPushButton(widget); closeButton_->setObjectName(QStringLiteral("closeButton_")); closeButton_->setMinimumSize(QSize(16, 16)); closeButton_->setMaximumSize(QSize(16, 16)); closeButton_->setStyleSheet(QLatin1String("#closeButton_{\n" "border-image:url(:/image/image/bubblex.png);\n" "}\n" "#closeButton_:pressed{\n" "margin:1px;\n" "}")); horizontalLayout->addWidget(closeButton_); horizontalLayout_2->addWidget(widget); retranslateUi(feedback); QMetaObject::connectSlotsByName(feedback); } // setupUi void retranslateUi(QDialog *feedback) { feedback->setWindowTitle(QString()); imageLabel_->setText(QString()); tipLabel_->setText(QString()); closeButton_->setText(QString()); } // retranslateUi }; namespace Ui { class feedback: public Ui_feedback {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_FEEDBACK_H
[ "1596072327@qq.com" ]
1596072327@qq.com
624bb92a1311195507b9261eb4bef1315d5e0364
dd62d226dc68c87a5cd377785bf32b3b8531845b
/proj.android/Photon-AndroidNDK_SDK/LoadBalancing-cpp/src/Internal/MutableRoomFactory.cpp
6d38aaeb6fc3954a25b558fff41fc94ab4bc1b14
[ "MIT" ]
permissive
h-iwata/MultiplayPaint
f3d1dd1d5cba2f304ed581f3ba9560df3c2d5466
b170ec60bdda93c041ef59625ac2d6eba54d0335
refs/heads/master
2016-09-05T15:00:27.678210
2015-07-09T09:52:18
2015-07-09T09:52:18
35,269,936
1
0
null
null
null
null
UTF-8
C++
false
false
919
cpp
/* Exit Games Photon LoadBalancing - C++ Client Lib * Copyright (C) 2004-2015 by Exit Games GmbH. All rights reserved. * http://www.exitgames.com * mailto:developer@exitgames.com */ #include "LoadBalancing-cpp/inc/Internal/MutableRoomFactory.h" #include "LoadBalancing-cpp/inc/MutableRoom.h" namespace ExitGames { namespace LoadBalancing { using namespace Common::MemoryManagement; MutableRoomFactory::~MutableRoomFactory(void) { } MutableRoom* MutableRoomFactory::create(const Common::JString& name, const Common::Hashtable& properties, Client* pClient, const Common::JVector<Common::JString>& propsListedInLobby, int playerTtl, int roomTtl) { MutableRoom* p; return ALLOCATE(MutableRoom, p, name, properties, pClient, propsListedInLobby, playerTtl, roomTtl); } void MutableRoomFactory::destroy(const MutableRoom* pRoom) { deallocate(pRoom); } } }
[ "hiwata@autock-one.jp" ]
hiwata@autock-one.jp
540c0d34cac45075850931b18d69c37490f52df2
4b404aa7779cdcd31da4fe1a8de890d77f81948c
/3D팀/160524 Bless 58/Client/Code/PlayerInfo.h
0c96b014fb56c7617a94a2eed888fad39db76f13
[]
no_license
Jisean/BlessProjectBackup
dd738a535d9180a364a88f1401ac8f027654cb04
fc2fc079731bb6212ba860c40981f46afe97d603
refs/heads/master
2021-05-13T17:59:27.410635
2018-01-09T14:04:52
2018-01-09T14:04:52
116,822,909
0
0
null
null
null
null
UTF-8
C++
false
false
1,309
h
/*! * \file UI.h * \date 2016/03/15 13:45 * * \author Administrator * Contact: user@company.com * * \brief * * TODO: long description * * \note */ #ifndef PlayerInfo_h__ #define PlayerInfo_h__ #include "GameObject.h" #include "Include.h" #include "UI.h" namespace Engine { class CTransform; class CTexture; class CVIBuffer; class CShader; }; class CPlayerInfo : public CUI { private: explicit CPlayerInfo(LPDIRECT3DDEVICE9 pDevice); virtual ~CPlayerInfo(void); public: virtual HRESULT Initialize(void); virtual _int Update(const _float& fTimeDelta); virtual void Render(void); private: virtual HRESULT AddComponent(void); virtual HRESULT SetComponent(WORD wContainerID, const TCHAR* pResourcekey); public: static CPlayerInfo* Create(LPDIRECT3DDEVICE9 pDevice); virtual void Free(void); private: Engine::CTransform* m_pInfo; Engine::CTexture* m_pTexture; Engine::CVIBuffer* m_pBuffer; Engine::CShader* m_pShader; D3DMATERIAL9 m_tMtrl; private: _float m_fX, m_fY; _float m_fSizeX, m_fSizeY; _float m_fSaveX[8]; _float m_fSaveY[8]; D3DXMATRIX m_matView, m_matProj; bool m_bActivate , m_bPush; bool m_bPressed; RECT m_Rect; private: void SetUp(); void CollisionUI(); void LoadData(const wstring& wstrPath); }; #endif // PlayerInfo_h__
[ "hsp0522@gmail.com" ]
hsp0522@gmail.com
71da74424f3cfc40fee112948d6e92b88bfb9621
623ba918b95e6fbb2df7c13fa1906acfd85aa676
/Manipulators.h
207de615bcf451e8c1a05badc642475310d2ba2c
[]
no_license
charliewheate98/Capsule-3D-Game-Engine
8e33855d1da36130606871868dad42b52bc7843b
795dff2abe5ca1d45a4210b3204f880e34240082
refs/heads/master
2022-08-01T10:26:21.773235
2019-07-05T21:40:33
2019-07-05T21:40:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,095
h
#ifndef __MANIPULATORS_H__ #define __MANIPULATORS_H__ #include <iostream> #include "Content.h" #include "DataIO.h" class Manipulators { private: static bool _active; static unsigned int _program; static glm::vec3 _pos; public: inline Manipulators(unsigned int program) { Create(program); } inline ~Manipulators() {} inline static void SetActive(bool val) { _active = val; } inline static void SetPosition(glm::vec3 pos) { _pos = pos; } inline static void Create(unsigned int program) { _program = program; _active = false; if (!DataIO::Import::WavefrontObjI(program, "arrow.obj")) // If the importation failed... std::cout << "Error: Failed to import obj file!\n"; Content::_arrows.push_back(Content::_meshes[Content::_meshes.size() - 1]); if (!DataIO::Import::WavefrontObjI(program, "arrow_up.obj")) // If the importation failed... std::cout << "Error: Failed to import obj file!\n"; Content::_arrows.push_back(Content::_meshes[Content::_meshes.size() - 1]); if (!DataIO::Import::WavefrontObjI(program, "arrow_front.obj")) // If the importation failed... std::cout << "Error: Failed to import obj file!\n"; Content::_arrows.push_back(Content::_meshes[Content::_meshes.size() - 1]); } inline static void Render() { glUseProgram(_program); glm::mat4 mod = glm::translate(glm::vec3(_pos.x, _pos.y, _pos.z)); glm::mat4 MVP = Content::_map->GetCamera()->GetProjectionMatrix() * Content::_map->GetCamera()->GetViewMatrix() * mod; glUniformMatrix4fv(glGetUniformLocation(_program, "MVP"), 1, GL_FALSE, glm::value_ptr(MVP)); glDisable(GL_DEPTH_TEST); glUniform3f(glGetUniformLocation(_program, "colour_id"), 1.0f, 0.0f, 0.0f); Content::_arrows[0]->Render(); glUniform3f(glGetUniformLocation(_program, "colour_id"), 0.0f, 1.0f, 0.0f); Content::_arrows[1]->Render(); glUniform3f(glGetUniformLocation(_program, "colour_id"), 0.0f, 0.0f, 1.0f); Content::_arrows[2]->Render(); } }; unsigned int Manipulators::_program; glm::vec3 Manipulators::_pos; #endif
[ "noreply@github.com" ]
noreply@github.com
1cd3800ec7247b1a2d752a11dcf7ae009c0de08d
3c305dfca2e726c4959f980a8c287cd5bdd7fc05
/Gray_Code.cpp
6a937dc51b116d322f1096cce8df497954ea75d6
[]
no_license
huy312100/leetcode-solutions
2f17105fb40dea2a512ef5e59c855c1320a4ad5b
b4abae73e5351ce1c0d1a2bdfd29d9fd56a9dee1
refs/heads/master
2021-12-02T22:36:05.238588
2013-01-13T13:37:20
2013-01-13T13:37:20
422,103,718
1
0
null
null
null
null
UTF-8
C++
false
false
785
cpp
/* Gray Code The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0. For example, given n = 2, return [0,1,3,2]. Its gray code sequence is: 00 - 0 01 - 1 11 - 3 10 - 2 */ class Solution { public: vector<int> grayCode(int n) { vector<int> result; result.push_back(0); int k = 0; //index int bit = 1; while (result.size() < (1<<n)) { result.push_back(result[k] + bit); k--; if (k < 0) { k = result.size() - 1; bit *= 2; } } return result; } };
[ "kofreestyler@gmail.com" ]
kofreestyler@gmail.com
0400fcb75dcac996c2e3df40b77c5236bf7ab4cb
6b14c1af690314c9f27bb9702f3d35945c114cff
/Proj 9/Proj_9/stdafx.cpp
a0752bc0645f61e9d243c9b36471985577e630fd
[]
no_license
Gebreyesus/CSCI-301-proj
92a9a09663cb5ea4e59fd186069a98718a465692
f55655fc9bccb575a45117b683ed0ed9474628a2
refs/heads/master
2021-01-15T18:21:48.632334
2019-01-24T19:09:27
2019-01-24T19:09:27
99,780,157
0
0
null
null
null
null
UTF-8
C++
false
false
285
cpp
// stdafx.cpp : source file that includes just the standard includes // Proj_9.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
[ "beteab@live.com" ]
beteab@live.com
3dfff22b57fdfe96f92d8b0a0cc6e8644c4c5f4e
8fb2d485f2c84ac5d0552d7d100473d907d7713d
/src/Event.cc
6db4d234a0ab72daf945589b456913b1bc446012
[]
no_license
gonzaponte/irene
df802e199a3854d9393e002e5d1197932fe311dd
6d0cbfbd21f6e8e2a37c2502554a4a7f659e9cec
refs/heads/master
2020-05-17T00:13:50.811606
2015-01-14T09:56:18
2015-01-14T09:56:18
29,238,012
0
0
null
null
null
null
UTF-8
C++
false
false
5,434
cc
// ---------------------------------------------------------------------------- // $Id: Event.cc 9914 2014-07-13 07:51:27Z gomez $ // // Author: <paola.ferrario@ific.uv.es> // Created: 14 Feb 2013 // // Copyright (c) 2013 NEXT Collaboration // ---------------------------------------------------------------------------- #include "Event.h" #include "SensorHit.h" #include "Track.h" #include "Particle.h" #include <TLorentzVector.h> ClassImp(irene::Event) namespace irene { Event::Event() : _eventID(0) { _sensor_hits = 0; _tracks = 0; _particles = 0; } Event::Event(int id) : _eventID(id) { _sensor_hits = new TObjArray(); _tracks = new TObjArray(); _particles = new TObjArray(); } Event::Event(const Event& right) { *this = right; } Event& Event::operator=(const Event& right) { if (this != &right) { _sensor_hits = (TObjArray*)right._sensor_hits->Clone(); _tracks = (TObjArray*)right._tracks->Clone(); _particles = (TObjArray*)right._particles->Clone(); _eventID = right._eventID; } return *this; } Event::~Event() { IClear(); delete _sensor_hits; delete _tracks; delete _particles; } void Event::AddSensorHit(SensorHit* hit) { _sensor_hits->AddLast(hit); } void Event::AddTrack(Track* track) { _tracks->AddLast(track); } void Event::AddParticle(Particle* particle) { _particles->AddLast(particle); } void Event::FillHitVector(std::vector<std::pair<TLorentzVector,double> >& evthits, std::string det) const { const TObjArray* tracks = GetTracks(); for (int itr=0; itr<tracks->GetLast()+1; ++itr) { Track* mytrack = (Track*)tracks->At(itr); if (mytrack->GetDetectorName() == det) { for (int ihit=0; ihit<mytrack->GetHits().size(); ++ihit) { std::pair<TLorentzVector,double> myhit = (mytrack->GetHits())[ihit]; evthits.push_back(myhit); } } } } std::vector<std::pair<TLorentzVector,double> > Event::FillHitVector(std::string det) const { std::vector<std::pair<TLorentzVector,double> > evthits; FillHitVector(evthits,det); return evthits; } void Event::IClear() { if (_sensor_hits) { _sensor_hits->Delete(); } if (_tracks) { _tracks->Delete(); } if (_particles) { _particles->Delete(); } _eventID = 0; } std::vector<const irene::Track*> Event::Tracks() const { size_t n_itrks = _tracks->GetEntries(); std::vector<const Track*> trks; for (size_t it = 0; it < n_itrks; ++it) { const Track* itrk = dynamic_cast<const Track*> (_tracks->At(it)) ; trks.push_back(itrk); } return trks; } std::vector<const irene::Track*> Event::Tracks(std::string det) const { size_t n_itrks = _tracks->GetEntries(); std::vector<const Track*> trks; for (size_t it = 0; it < n_itrks; ++it) { const Track* itrk = dynamic_cast<const Track*> (_tracks->At(it)) ; if (itrk->GetDetectorName() == det) { trks.push_back(itrk); } } return trks; } std::vector<const irene::Particle*> Event::Particles() const { size_t n_p = _particles->GetEntries(); std::vector<const Particle*> parts; for (size_t it = 0; it < n_p; ++it) { const Particle* ip = dynamic_cast<const Particle*> (_particles->At(it)) ; parts.push_back(ip); } return parts; } void Event::IInfo(ostream& s) const { s << std::endl; s << "event number = " << GetID() << std::endl; const TObjArray* tracks = GetTracks(); int tothits=0; for (unsigned int itrack=0; itrack<tracks->GetLast()+1; ++itrack) { Track* mytrack = (Track*)tracks->At(itrack); tothits = tothits + mytrack->GetHits().size(); } s << "event has " << tothits << " true hits" << std::endl; s << "event has " << GetSensorHits()->GetLast()+1 << " sensor hits" << std::endl; s << "event has " << GetParticles()->GetLast()+1 << " particles" << std::endl; s << std::endl; s << " List of sensor hits in the event" << "------------------------------------" << std::endl; s << std::endl; const TObjArray* sensorhits = GetSensorHits(); for (unsigned int ihit=0; ihit<sensorhits->GetLast()+1; ++ihit) { SensorHit* myhit = (SensorHit*)sensorhits->At(ihit); s << *myhit <<std::endl; } s << " List of true hits in the event" << "------------------------------------" << std::endl; s << std::endl; for (unsigned int itrack=0; itrack<tracks->GetLast()+1; ++itrack) { Track* mytrack = (Track*)tracks->At(itrack); s << std::endl; s << "Detector " << mytrack->GetDetectorName() << std::endl; s << std::endl; s << *mytrack <<std::endl; } s << " List of particles in the event" << "------------------------------------" << std::endl; const TObjArray* particles = GetParticles(); for (unsigned int ipart=0; ipart<particles->GetLast()+1; ipart++){ Particle* mypart = (Particle*)particles->At(ipart); s << *mypart <<std::endl; } } } // end namespace irene ostream& operator << (ostream& s, const irene::Event& ev) { ev.IInfo(s); return s; }
[ "gonzaponte@gmail.com" ]
gonzaponte@gmail.com
833076cc62f6e3337394effecf5ab09f9a9a169a
30aea0eba0be9d02f6fd1445762887d39912f8fe
/src/mx/router/router_impl.cpp
24ebf8fe7d7309c63fe1517ff6e5e5cff5d879b2
[]
no_license
pymba86/mx
a72e41ce61fa00ae550819f61e4754fc2f086a7f
c539232a03daf7dfc8bbfb71604995a252aadd29
refs/heads/master
2023-08-12T03:23:36.082913
2018-11-20T20:06:30
2018-11-20T20:06:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,728
cpp
#include "router.hpp" #include <mx/trace/trace.hpp> namespace mx { router_impl::router_impl(boost::asio::io_service &io_service, const std::string &realm) : m_realm(realm), m_broker(realm), m_session_id_generator(generator_factory::create(realm)), m_sessions() { } const std::string &router_impl::get_realm() const { return m_realm; } const std::shared_ptr<generator> &router_impl::get_session_id_generator() const { return m_session_id_generator; } bool router_impl::has_session(const session_id &session_id) { return m_sessions.find(session_id) != m_sessions.end(); } void router_impl::close_session(const session_id &session_id, const std::string &reason) { } bool router_impl::attach_session(const std::shared_ptr<session> &session) { MX_TRACE("attaching session: %1%", session); auto result = m_sessions.insert( std::make_pair(session->get_session_id(), session)); if (result.second) { m_broker.attach_session(session); return true; } MX_TRACE("failed to attach session: %1%", session); return false; } bool router_impl::detach_session(const session_id &session_id) { return false; } void router_impl::process_subscribe_message(const session_id &session_id, subscribe_message *subscribe_message) { m_broker.process_subscribe_message(session_id, subscribe_message); } void router_impl::process_publish_message(const session_id &session_id, publish_message *publish_message) { m_broker.process_publish_message(session_id, publish_message); } }
[ "pymba-96@mail.ru" ]
pymba-96@mail.ru
16d7334c7ea1e059dbe280a06fed2bf91409f724
88e378f925bbd8dddd271e19a51477a5201c32eb
/GRMFixes/AntiAliasing/Application.cpp
815a0822bb1af77534c9f930adea9efe6d2adee8
[ "MIT" ]
permissive
ThielHater/GRMFixes_Union
d71dcc71f77082feaf4036785acc32255fbeaaa9
4cfff09b5e7b1ecdbc13d903d44727eab52703ff
refs/heads/master
2022-11-26T21:41:37.680547
2022-11-06T16:30:08
2022-11-06T16:30:08
240,788,948
0
1
null
null
null
null
UTF-8
C++
false
false
1,697
cpp
#include "UnionAfx.h" #include "Interface_HeaderInclusion.h" void Game_Entry() { } void Game_Init() { } void Game_Exit() { NAMESPACE::Release(); } void Game_Loop() { } void Game_SaveBegin() { } void Game_SaveEnd() { } void LoadBegin() { } void LoadEnd() { } void Game_LoadBegin_NewGame() { LoadBegin(); } void Game_LoadEnd_NewGame() { LoadEnd(); } void Game_LoadBegin_SaveGame() { LoadBegin(); } void Game_LoadEnd_SaveGame() { LoadEnd(); } void Game_LoadBegin_ChangeLevel() { LoadBegin(); } void Game_LoadEnd_ChangeLevel() { LoadEnd(); } void Game_LoadBegin_Trigger() { } void Game_LoadEnd_Trigger() { } void Game_Pause() { } void Game_Unpause() { } void Game_DefineExternals() { } // please disable unused functions. // write 'false' in 'Enabled' macro. #define AppDefault False CApplication* lpApplication = CApplication::CreateRefApplication ( Enabled( AppDefault ) Game_Entry, Enabled( AppDefault ) Game_Init, Enabled( True ) Game_Exit, Enabled( AppDefault ) Game_Loop, Enabled( AppDefault ) Game_SaveBegin, Enabled( AppDefault ) Game_SaveEnd, Enabled( AppDefault ) Game_LoadBegin_NewGame, Enabled( AppDefault ) Game_LoadEnd_NewGame, Enabled( AppDefault ) Game_LoadBegin_SaveGame, Enabled( AppDefault ) Game_LoadEnd_SaveGame, Enabled( AppDefault ) Game_LoadBegin_ChangeLevel, Enabled( AppDefault ) Game_LoadEnd_ChangeLevel, Enabled( AppDefault ) Game_LoadBegin_Trigger, Enabled( AppDefault ) Game_LoadEnd_Trigger, Enabled( AppDefault ) Game_Pause, Enabled( AppDefault ) Game_Unpause, Enabled( AppDefault ) Game_DefineExternals );
[ "pierre.beckmann@yahoo.de" ]
pierre.beckmann@yahoo.de
e17c6a0da52fa263473cf416c6b004e785e0f292
dbb147fd5c2344e2429ad96a32b498e2eb0eb738
/With-graph-partition/mpi_main.cpp
4977fff080a55998d6a3406ab032c5f4e7f4f07f
[]
no_license
smilealvin92/TRUST
6220ce6c6472753a60e1b12be415ed218987b518
b89fee910555855ad5fd72b81dfff3b4fc28c382
refs/heads/master
2023-06-04T20:47:20.814055
2021-06-28T07:29:30
2021-06-28T07:29:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,939
cpp
#include <stdio.h> #include <string.h> #include <mpi.h> #include "TC.cuh" #include <stdlib.h> #include <assert.h> #include <iostream> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <errno.h> #include <netdb.h> using namespace std; int get_cpu_id() { /* Get the the current process' stat file from the proc filesystem */ FILE* procfile = fopen("/proc/self/stat", "r"); long to_read = 8192; char buffer[to_read]; int read = fread(buffer, sizeof(char), to_read, procfile); fclose(procfile); // Field with index 38 (zero-based counting) is the one we want char* line = strtok(buffer, " "); for (int i = 1; i < 38; i++) { line = strtok(NULL, " "); } line = strtok(NULL, " "); int cpu_id = atoi(line); return cpu_id; } void check_host_name(int hostname) { //This function returns host name for if (hostname == -1) { perror("gethostname"); exit(1); } } void check_host_entry(struct hostent * hostentry) { //find host info from if (hostentry == NULL) { perror("gethostbyname"); exit(1); } } void IP_formatter(char *IPbuffer) { //convert IP string to dotted decimal if (NULL == IPbuffer) { perror("inet_ntoa"); exit(1); } } void IP(int rank, int cpu_id) { char host[256]; char *IP; struct hostent *host_entry; int hostname; hostname = gethostname(host, sizeof(host)); //find the host name check_host_name(hostname); host_entry = gethostbyname(host); //find host information check_host_entry(host_entry); IP = inet_ntoa(*((struct in_addr*) host_entry->h_addr_list[0])); //Convert into IP string //printf("Current Host Name: %s, Host IP: %s, Rank: %d, CPU_ID: %d\n", host,IP,rank,cpu_id); } int main(int argc, char *argv[]) { int myrank,numtasks; int total_rank=atoi(argv[2]); int N_THREADS= atoi(argv[3]); int N_BLOCKS=atoi(argv[4]); int chunk_size=atoi(argv[5]); int partition_num=atoi(argv[6]); // assert(1>3); //fprintf(stderr," %s \n", argv[1]); //[For p2p08]: //int stat[16]= {1313,2451,3704,4682,6005,7118,8562,9878,11177,12506,13800,15148,16410,17716,19200,20777}; // For Facebook combined: //int stat[16]={6660,12003,17400,23208,29515,34223,38163,41771,45113,48885,52745,56454,59673,65882,74390,88234}; MPI_Status status; struct arguments args; /* Initialize the MPI library */ MPI_Init(&argc, &argv); /* Determine unique id of the calling process of all processes participating in this MPI program. This id is usually called MPI rank. */ MPI_Comm_rank(MPI_COMM_WORLD, &myrank); MPI_Comm_size(MPI_COMM_WORLD,&numtasks); long long global_sum,now_sum=0; double global_min_time,global_max_time,now_min_time=9999,now_max_time=0; // myrank=705; while (myrank<total_rank) { // cout<<myrank<<"start"<<endl; args=Triangle_count(myrank,argv[1],args, total_rank,N_THREADS, N_BLOCKS, chunk_size, partition_num); // cout<<myrank<<"end"<<endl; myrank+=numtasks; if (now_min_time>args.time) now_min_time=args.time; if (now_max_time<args.time) now_max_time=args.time; now_sum+=args.count; } int cpu_id = get_cpu_id(); //printf("Rank %d, CPU: %d\n",myrank,cpu_id); //IP(myrank, cpu_id); //printf("%s,GPU: %d,%d, %d, %f\n",argv[1],myrank,args.edge_count,args.degree,args.time); //MPI_Barrier(MPI_COMM_WORLD); // cout<<args.time<<endl; MPI_Reduce(&now_sum, &global_sum, 1, MPI_LONG_LONG_INT, MPI_SUM, 0, MPI_COMM_WORLD); MPI_Reduce(&now_max_time, &global_max_time, 1, MPI_DOUBLE,MPI_MAX, 0, MPI_COMM_WORLD); MPI_Reduce(&now_min_time, &global_min_time, 1, MPI_DOUBLE,MPI_MIN, 0, MPI_COMM_WORLD); if(myrank%numtasks==0) { printf("\n%s,triangle:%lld,%f,%f\n",argv[1],global_sum,global_min_time,global_max_time); } MPI_Finalize(); return 0; }
[ "958215422@qq.com" ]
958215422@qq.com
c4e5c57520341e208ed1628a1692a59bd6f17853
bf4d0c11c38a477f248276fa74ae6881a33df91f
/src/essentials/coding.h
96914587f67d86af59c1a9f9307d359269bb88d0
[ "MIT" ]
permissive
shriveledDude/MaxestFramework
41e86b51108e1fec9844c3b9de4e45bc7fcbae54
5495948d5fa9ad130ea14ed6baa1c68cc7835627
refs/heads/master
2020-04-07T16:54:00.639302
2018-11-09T16:34:08
2018-11-09T16:34:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,332
h
#pragma once #include "bit.h" #include "assert.h" namespace NMaxestFramework { namespace NEssentials { uint8 Encode_R8SInt_In_R8UInt(int8 r); int8 Decode_R8SInt_From_R8UInt(uint8 value_encoded); uint16 Encode_R8G8SInt_In_R16UInt(int8 r, int8 g); void Decode_R8G8SInt_From_R16UInt(uint16 value_encoded, int8& r, int8& g); uint32 Encode_R8G8G8A8UInt_In_R32UInt(uint8 r, uint8 g, uint8 b, uint8 a); void Decode_R8G8SInt_From_R16UInt(uint32 value_encoded, uint8& r, uint8& g, uint8& b, uint8& a); uint32 Encode_R32SInt_In_R32UInt(int32 value, uint8 bitsCount); int32 Decode_R32SInt_From_R32UInt(uint32 value_encoded, uint8 bitsCount); // inline uint8 Encode_R8SInt_In_R8UInt(int8 r) { return r + 128; } inline int8 Decode_R8SInt_From_R8UInt(uint8 value_encoded) { return value_encoded - 128; } inline uint16 Encode_R8G8SInt_In_R16UInt(int8 r, int8 g) { uint8 r2 = r + 128; uint8 g2 = g + 128; return (r2) | ((uint16)g2 << 8); } inline void Decode_R8G8SInt_From_R16UInt(uint16 value_encoded, int8& r, int8& g) { r = (value_encoded & 255) - 128; g = ((value_encoded >> 8) & 255) - 128; } inline uint32 Encode_R8G8G8A8UInt_In_R32UInt(uint8 r, uint8 g, uint8 b, uint8 a) { uint32 value_encoded = r & 255; value_encoded |= (g & 255) << 8; value_encoded |= (b & 255) << 16; value_encoded |= (a & 255) << 24; return value_encoded; } inline void Decode_R8G8SInt_From_R16UInt(uint32 value_encoded, uint8& r, uint8& g, uint8& b, uint8& a) { r = (value_encoded >> 0) & 255; g = (value_encoded >> 8) & 255; b = (value_encoded >> 16) & 255; a = (value_encoded >> 24) & 255; } inline uint32 Encode_R32SInt_In_R32UInt(int32 value, uint8 bitsCount) { uint32 mask = NBit::Mask32(bitsCount - 1); uint32 value_abs = Abs(value); MF_ASSERT(value_abs <= mask); uint32 value_encoded = value_abs & mask; if (value > 0) NBit::Set((uint8*)&value_encoded, bitsCount - 1, true); return value_encoded; } inline int32 Decode_R32SInt_From_R32UInt(uint32 value_encoded, uint8 bitsCount) { uint32 mask = NBit::Mask32(bitsCount - 1); int32 value = value_encoded & mask; if (NBit::Get((uint8*)&value_encoded, bitsCount - 1) == 0) value = -value; return value; } } }
[ "maxest@gct-game.net" ]
maxest@gct-game.net
9f9908ff9e079c99bd029f1cab66e3f603059588
1bf79bf873305d7890969dbca25f5ff1755409e2
/DataParse/expression.h
941ab41b87a40b0bea35e772bcb74c8c55a50435
[]
no_license
whoisallo/Datalog
1da8536a463c26b91e46402ec8f6cf94b3e26227
529129cf46ac601e19636ae3c1aa6d1787fd0b30
refs/heads/master
2022-06-20T21:29:14.553741
2016-11-30T03:07:47
2016-11-30T03:07:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
264
h
#pragma once #include "parameter.h" class expression : public parameter { public: expression(parameter* head, parameter* op, parameter* tail); ~expression(); std::string toString(); int type(); private: parameter* head; parameter* tail; parameter* op; };
[ "price.mc1x@gmail.com" ]
price.mc1x@gmail.com
3e183fcb5c0689f7c618cc008675f5a42534c7fd
82023d5edbeed912543b7354b1526d25ab65a02d
/windows/runner/main.cpp
2295310d1c7ba638f3eaebe4263eb639e2819664
[]
no_license
YeFei572/getxAndDioDemo
eb598832ec09ab4ebb2376c2cdca546494aeec85
82529c8ad91150227a959953917464315fed8a85
refs/heads/main
2023-06-24T22:18:00.330489
2021-04-30T04:03:59
2021-04-30T04:03:59
362,419,565
3
0
null
null
null
null
UTF-8
C++
false
false
1,216
cpp
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { CreateAndAttachConsole(); } // Initialize COM, so that it is available for use in the library and/or // plugins. ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); RunLoop run_loop; flutter::DartProject project(L"data"); std::vector<std::string> command_line_arguments = GetCommandLineArguments(); project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); FlutterWindow window(&run_loop, project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); if (!window.CreateAndShow(L"demo01", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); run_loop.Run(); ::CoUninitialize(); return EXIT_SUCCESS; }
[ "572yefei@163.com" ]
572yefei@163.com
4007134be4b861df166d99788da609e00fd3bed3
f07b324193e027f0612e39007c92bd995679cdaa
/402_Remove_K_Digits/solution3.cpp
dc4ffdf6ec81cfdf705d2dae50e2f9c9c1b945d3
[]
no_license
hitwlh/leetcode
ebea30b3cc1ce390beb9b0e8963e92fe1b388845
a0eeb131a869b12163c266dd2ee289dd340c43e8
refs/heads/master
2021-01-23T07:50:52.996310
2019-10-11T16:38:59
2019-10-11T16:38:59
86,457,155
0
0
null
null
null
null
UTF-8
C++
false
false
628
cpp
class Solution { public: string removeKdigits(string num, int k) { int i = 1; while(i < num.size() && k){ if(num[i] < num[i-1]){ int now = i; while(now-1 >= 0 && num[now-1] > num[now] && k){ num.erase(num.begin()+now-1); now--; k--; } i = now; }else{ i++; } } while(k--) num.pop_back(); while(num.size() > 0 && num[0] == '0') num.erase(num.begin()); return num == "" ? "0" : num; } };
[ "wanglonghua@hua-4.local" ]
wanglonghua@hua-4.local
eda4f4498bdfd548bafb33de9284398788b08653
6baa2d08e433da59e4b0fcb7bfda95fdc0ca3a4e
/codeforces/1245/C.cpp
1bab8d84edebf3b7e685b64099f0fa12c2ffe889
[]
no_license
raihankhan/ACM_Problem_Solving
7ce4d7b91ab2e481d849d0b0e5b1aebbb452623f
57760c3f869373c289e8af3228a3f2a211f0e447
refs/heads/master
2023-02-16T10:08:50.792808
2021-01-17T09:58:43
2021-01-17T09:58:43
323,376,030
2
1
null
null
null
null
UTF-8
C++
false
false
4,715
cpp
#include<bits/stdc++.h> ///...................................*****................................................./// /// Author : Raihan Khan Raka ( raihankhanraka@gmail.com ) /// /// Department of Computer Science /// /// & Engineering /// /// Comilla University , Bangladesh. /// ///...................................*****................................................./// /*....................................Values................................................*/ #define p5 100007 #define p6 1000007 #define PI acos(-1) #define M 1000000007 #define inf 1LL << 62 #define white 0 #define gray 1 #define black 2 /*....................................Functions.............................................*/ #define sqr(x) x*x #define sc scanf #define pf printf #define pfn printf("\n") #define scin(x) sc("%d",&(x)) #define scin2(xx,zz) scanf("%d %d",&xx,&zz) #define scln(x) sc("%lld",&(x)) #define scln2(xx,zz) scanf("%lld %lld",&xx,&zz) #define min3(a,b,c) min(a,b<c?b:c) #define max3(a,b,c) max(a,b>c?b:c) #define all(v) v.begin(), v.end() #define ok cout << "ok" << endl #define mem(x,y) memset(x,y,sizeof(x)) #define clr(a) a.clear() #define READ(f) freopen(f, "r", stdin) #define WRITE(f) freopen(f, "w", stdout) /*...................................Data_Types............................................*/ #define lli long long int #define ull unsigned long long int #define pii pair < int, int> #define pll pair < ll, ll> #define veci vector<int> #define vecl vector<long long int> #define vecp vector< pair<int,int> > #define mapstrint map< string , int > #define mapstrstr map< string , string > #define mapint map< int, int > #define uset unordered_set #define umap unordered_map #define pq priority_queue #define pb push_back #define mp make_pair #define ff first #define ss second /*.....................................Loops...............................................*/ #define rep( i , a , b ) for( i=a ; i<b ; i++) #define rev( i , a , b ) for( i=a ; i>=b ; i--) #define repx( i ,a,b, x) for( i=a ; i<b ; i+=x) #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); //int month[]={31,28,31,30,31,30,31,31,30,31,30,31}; //long power(long int x, long int y){ int temp; if( y == 0) return 1; temp = power(x, y/2); if (y%2 == 0) return temp*temp; else return x*temp*temp; } /*lli gcd(lli x,lli y) { if(x==0) return y; return gcd(y%x,x); } lli bigmod(lli n, lli k) { lli ans=1; while(k) { if(k&1) ans=(ans*n)%M; k=k>>1; n=(n*n)%M; } return ans; } */ /* int dx4[5] = {1, -1, 0, 0 }; int dy4[5] = {0, 0, 1, -1}; int dx8[9] = { 0 , 0 , -1 , 1 , -1 , -1 , 1 , 1 } ; int dy8[9] = { -1 , 1 , 0 , 0 , -1 , 1 , -1 , 1 } ; int knightx[9] = { -1 , 1 , -2 , 2 , -2 , 2 , -1 , 1 } ; int knighty[9] = { -2 , -2 , -1 , -1 , 1 , 1 , 2 , 2 } ; bool valid( int r , int c , int x , int y ){ if( x >= 1 && x <= r && y >= 1 && y <= c ) return 1 ; return 0 ; } */ using namespace std; int len; int dp[p5]; int main() { string s; cin >> s ; int i,j,k,p; s=" "+s; len = s.length(); dp[0]=1; rep(i , 1 , len ) { dp[i]=dp[i-1]; if(s[i]=='m' or s[i]=='w') { dp[len-1]=0; break; } if(i>1) if(s[i]=='n' and s[i-1]=='n') { dp[i]=(dp[i-2]+dp[i])%M; } else if(s[i]=='u' and s[i-1]=='u') { dp[i]=(dp[i-2]+dp[i])%M; } } cout << dp[len-1] << endl; #ifdef HOME cerr << "Time elapsed: " << clock() / 1000 << " ms" << endl; #endif return 0; }
[ "raihankhanraka@googledreamer.com" ]
raihankhanraka@googledreamer.com
a1a0060bf4d86f45967be631bdae63578027e97e
052f6ced95deac1997eed004be80c667965ef198
/include/response/AddServiceResponse.h
ff046ba8a1514a2fad7fa357b6bb66472841f482
[]
no_license
Doc-Zegno/handmada
5ea7bbfd0bc198e163b6ea8a97a49e26f7c4ab5f
819a4677a17205f0cb8ac5be258875bd97991ef8
refs/heads/master
2021-01-22T02:04:32.301812
2017-05-28T18:43:01
2017-05-28T18:43:01
92,331,114
0
0
null
null
null
null
UTF-8
C++
false
false
643
h
// // Created by syzegno on 14.05.17. // #ifndef EQUEUE_V2_ADDSERVICERESPONSE_H #define EQUEUE_V2_ADDSERVICERESPONSE_H #include <memory> #include "IResponse.h" #include "Types.h" namespace Handmada { class AddServiceResponse : public IResponse { private: ServiceId serviceId_; public: AddServiceResponse(ServiceId serviceId); virtual OpCode code() const override; virtual void accept(IResponseVisitor& visitor) const override; ServiceId serviceId() const; static std::unique_ptr<IResponse> create(ServiceId serviceId); }; } #endif //EQUEUE_V2_ADDSERVICERESPONSE_H
[ "ralegen@gmail.com" ]
ralegen@gmail.com
00a60068e62fa9a59d6cec34ab974f92c07faf05
8dfe4bef840a00972ebe18634bbf28636dec9949
/FKCWLib/FKCW_TMX/Include/FKCW_TMX_Object.h
c2c04e859bf291ff04b92890d413b053f313ff6c
[]
no_license
pingfanJerry/FKCocos2dxWrapper_2.x
ba644308746557e99f8fa201a832aafa7e806927
2ff906f10a030d7a2dbe968ba9d17798e2537a37
refs/heads/master
2020-03-10T16:58:40.391923
2017-03-16T06:43:05
2017-03-16T06:43:05
129,487,589
1
0
null
2018-04-14T06:12:13
2018-04-14T06:12:13
null
GB18030
C++
false
false
1,643
h
//************************************************************************* // 创建日期: 2014-12-29 // 文件名称: FKCW_TMX_Object.h // 创 建 人: 王宏张 FreeKnight // 版权所有: MIT // 说 明: //************************************************************************* #pragma once //------------------------------------------------------------------------- #include "FKCW_TMX_Macros.h" //------------------------------------------------------------------------- class FKCW_TMX_Object : public CCObject { public: // 对象类型 enum ENUM_Shape { eShape_NORMAL, // 普通对象,格式为 Key = value 组 eShape_POLYGON, // 多边形对象,可以获取顶点点列表 eShape_POLYLINE // 折线对象,首尾节点不连接 }; protected: FKCW_TMX_Object(); public: virtual ~FKCW_TMX_Object(); static FKCW_TMX_Object* create(); // 根据Key获取一个属性值 string getProperty(const string& key); // 添加一个属性 void addProperty(const string& key, const string& value); public: CC_SYNTHESIZE_PASS_BY_REF_NC(CCDictionary, m_properties, Properties); // 属性词典 CC_SYNTHESIZE_PASS_BY_REF_NC(FKCW_Base_PointList, m_points, Points); // 点列表(仅用于POLYGON和POLYLINE对象) CC_SYNTHESIZE(ENUM_Shape, m_shape, Shape); // 对象类型 CC_SYNTHESIZE_PASS_BY_REF_NC(string, m_name, Name); // 名字 CC_SYNTHESIZE_PASS_BY_REF_NC(string, m_type, Type); // 类型 CC_SYNTHESIZE_PASS_BY_REF_NC(CCPoint, m_pos, Position); // 位置 CC_SYNTHESIZE_PASS_BY_REF_NC(CCSize, m_size, Size); // 大小 };
[ "duzhi5368@163.com" ]
duzhi5368@163.com
4047c60bc6a5f07415c736de2d6a14ba10b5679b
32008c385f0f676714133fcddc8904b180b379ae
/code_book/Thinking C++/master1/Chapter 6/DefineInitialize.cpp
8f7f8d9832a5cbd7497f2836238b1a824fc40d90
[]
no_license
dracohan/code
d92dca0a4ee6e0b3c10ea3c4f381cb1068a10a6e
378b6fe945ec2e859cc84bf50375ec44463f23bb
refs/heads/master
2023-08-18T23:32:30.565886
2023-08-17T17:16:29
2023-08-17T17:16:29
48,644,403
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
428
cpp
//: C06:DefineInitialize.cpp // Определение переменных в произвольной точке #include "../require.h" #include <iostream> #include <string> using namespace std; class G { int i; public: G(int ii); }; G::G(int ii) { i = ii; } int main() { cout << "initialize value? "; int retval = 0; cin >> retval; require(retval != 0); int y = retval + 3; G g(y); } ///:~
[ "jimmy.han@enflame-tech.com" ]
jimmy.han@enflame-tech.com
8a5e1b39389b4188726d0d9d06bb2bd76cd41d13
c315f5b1980f7512b904d8df30be6111772be3c5
/第八周实验课2_2/0420_2(2)/0420_2(2)View.cpp
14ab7fb9a95b428041f26d6cb974f615e0e295c4
[]
no_license
1234bnmhjk/2020VC
a88eb802bcb682c5a7923b1ceacda4c99f375717
16d1653f1951557bba947a6c86fa041d2310c65e
refs/heads/master
2022-11-06T23:31:31.308515
2020-06-23T08:23:33
2020-06-23T08:23:33
264,122,214
0
0
null
null
null
null
GB18030
C++
false
false
2,622
cpp
// 0420_2(2)View.cpp : CMy0420_22View 类的实现 // #include "stdafx.h" // SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的 // ATL 项目中进行定义,并允许与该项目共享文档代码。 #ifndef SHARED_HANDLERS #include "0420_2(2).h" #endif #include "0420_2(2)Doc.h" #include "0420_2(2)View.h" #include "MyDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMy0420_22View IMPLEMENT_DYNCREATE(CMy0420_22View, CView) BEGIN_MESSAGE_MAP(CMy0420_22View, CView) // 标准打印命令 ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CView::OnFilePrintPreview) ON_COMMAND(ID_DRAWELLISPE, &CMy0420_22View::OnDrawellispe) END_MESSAGE_MAP() // CMy0420_22View 构造/析构 CMy0420_22View::CMy0420_22View() { // TODO: 在此处添加构造代码 } CMy0420_22View::~CMy0420_22View() { } BOOL CMy0420_22View::PreCreateWindow(CREATESTRUCT& cs) { // TODO: 在此处通过修改 // CREATESTRUCT cs 来修改窗口类或样式 return CView::PreCreateWindow(cs); } // CMy0420_22View 绘制 void CMy0420_22View::OnDraw(CDC* /*pDC*/) { CMy0420_22Doc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) return; // TODO: 在此处为本机数据添加绘制代码 } // CMy0420_22View 打印 BOOL CMy0420_22View::OnPreparePrinting(CPrintInfo* pInfo) { // 默认准备 return DoPreparePrinting(pInfo); } void CMy0420_22View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: 添加额外的打印前进行的初始化过程 } void CMy0420_22View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: 添加打印后进行的清理过程 } // CMy0420_22View 诊断 #ifdef _DEBUG void CMy0420_22View::AssertValid() const { CView::AssertValid(); } void CMy0420_22View::Dump(CDumpContext& dc) const { CView::Dump(dc); } CMy0420_22Doc* CMy0420_22View::GetDocument() const // 非调试版本是内联的 { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMy0420_22Doc))); return (CMy0420_22Doc*)m_pDocument; } #endif //_DEBUG // CMy0420_22View 消息处理程序 void CMy0420_22View::OnDrawellispe() { // TODO: 在此添加命令处理程序代码 MyDlg dlg; if (dlg.DoModal() == IDOK){ CClientDC dc(this); CRect rect; this->GetClientRect(&rect); CPoint point; point.x = (rect.right - rect.left) / 2; point.y = (rect.bottom - rect.top) / 2; int a, b; UpdateData(true); a = dlg.number1; b = dlg.number2; dc.Ellipse(point.x - dlg.number1, point.y - dlg.number2, point.x + dlg.number1, point.y + dlg.number2); } }
[ "1871304618@qq.com" ]
1871304618@qq.com
63216d6232500c2028572db43787440bfd146833
30f097bfd3f8e6bcbda2ee010dafc2ce7109441e
/EasyBMP/EasyBMP.cpp
d80d194640cd21cdb40d0c7723d585dd90dad9df
[ "BSD-3-Clause" ]
permissive
SenderOK/RoadSigns
af50f66d64d2cb2f64010332ad121e7d2f55c791
f19989064482fe1075477aeb1cc0ae077e35e2c7
refs/heads/master
2020-04-22T05:34:34.213772
2014-05-28T18:24:58
2014-05-28T18:24:58
20,267,685
4
1
null
null
null
null
UTF-8
C++
false
false
48,188
cpp
/************************************************* * * * EasyBMP Cross-Platform Windows Bitmap Library * * * * Author: Paul Macklin * * email: macklin01@users.sourceforge.net * * support: http://easybmp.sourceforge.net * * * * file: EasyBMP.cpp * * date added: 03-31-2006 * * date modified: 12-01-2006 * * version: 1.06 * * * * License: BSD (revised/modified) * * Copyright: 2005-6 by the EasyBMP Project * * * * description: Actual source file * * * *************************************************/ #include "EasyBMP.h" /* These functions are defined in EasyBMP.h */ bool EasyBMPwarnings = true; void SetEasyBMPwarningsOff( void ) { EasyBMPwarnings = false; } void SetEasyBMPwarningsOn( void ) { EasyBMPwarnings = true; } bool GetEasyBMPwarningState( void ) { return EasyBMPwarnings; } /* These functions are defined in EasyBMP_DataStructures.h */ int IntPow( int base, int exponent ) { int i; int output = 1; for( i=0 ; i < exponent ; i++ ) { output *= base; } return output; } BMFH::BMFH() { bfType = 19778; bfReserved1 = 0; bfReserved2 = 0; } void BMFH::SwitchEndianess( void ) { bfType = FlipWORD( bfType ); bfSize = FlipDWORD( bfSize ); bfReserved1 = FlipWORD( bfReserved1 ); bfReserved2 = FlipWORD( bfReserved2 ); bfOffBits = FlipDWORD( bfOffBits ); return; } BMIH::BMIH() { biPlanes = 1; biCompression = 0; biXPelsPerMeter = DefaultXPelsPerMeter; biYPelsPerMeter = DefaultYPelsPerMeter; biClrUsed = 0; biClrImportant = 0; } void BMIH::SwitchEndianess( void ) { biSize = FlipDWORD( biSize ); biWidth = FlipDWORD( biWidth ); biHeight = FlipDWORD( biHeight ); biPlanes = FlipWORD( biPlanes ); biBitCount = FlipWORD( biBitCount ); biCompression = FlipDWORD( biCompression ); biSizeImage = FlipDWORD( biSizeImage ); biXPelsPerMeter = FlipDWORD( biXPelsPerMeter ); biYPelsPerMeter = FlipDWORD( biYPelsPerMeter ); biClrUsed = FlipDWORD( biClrUsed ); biClrImportant = FlipDWORD( biClrImportant ); return; } void BMIH::display( void ) { using namespace std; cout << "biSize: " << (int) biSize << endl << "biWidth: " << (int) biWidth << endl << "biHeight: " << (int) biHeight << endl << "biPlanes: " << (int) biPlanes << endl << "biBitCount: " << (int) biBitCount << endl << "biCompression: " << (int) biCompression << endl << "biSizeImage: " << (int) biSizeImage << endl << "biXPelsPerMeter: " << (int) biXPelsPerMeter << endl << "biYPelsPerMeter: " << (int) biYPelsPerMeter << endl << "biClrUsed: " << (int) biClrUsed << endl << "biClrImportant: " << (int) biClrImportant << endl << endl; } void BMFH::display( void ) { using namespace std; cout << "bfType: " << (int) bfType << endl << "bfSize: " << (int) bfSize << endl << "bfReserved1: " << (int) bfReserved1 << endl << "bfReserved2: " << (int) bfReserved2 << endl << "bfOffBits: " << (int) bfOffBits << endl << endl; } /* These functions are defined in EasyBMP_BMP.h */ RGBApixel BMP::GetPixel( int i, int j ) const { using namespace std; bool Warn = false; if( i >= Width ) { i = Width-1; Warn = true; } if( i < 0 ) { i = 0; Warn = true; } if( j >= Height ) { j = Height-1; Warn = true; } if( j < 0 ) { j = 0; Warn = true; } if( Warn && EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to access non-existent pixel;" << endl << " Truncating request to fit in the range [0," << Width-1 << "] x [0," << Height-1 << "]." << endl; } return Pixels[i][j]; } bool BMP::SetPixel( int i, int j, RGBApixel NewPixel ) { Pixels[i][j] = NewPixel; return true; } bool BMP::SetColor( int ColorNumber , RGBApixel NewColor ) { using namespace std; if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to change color table for a BMP object" << endl << " that lacks a color table. Ignoring request." << endl; } return false; } if( !Colors ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to set a color, but the color table" << endl << " is not defined. Ignoring request." << endl; } return false; } if( ColorNumber >= TellNumberOfColors() ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Requested color number " << ColorNumber << " is outside the allowed" << endl << " range [0," << TellNumberOfColors()-1 << "]. Ignoring request to set this color." << endl; } return false; } Colors[ColorNumber] = NewColor; return true; } // RGBApixel BMP::GetColor( int ColorNumber ) const RGBApixel BMP::GetColor( int ColorNumber ) { RGBApixel Output; Output.Red = 255; Output.Green = 255; Output.Blue = 255; Output.Alpha = 0; using namespace std; if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to access color table for a BMP object" << endl << " that lacks a color table. Ignoring request." << endl; } return Output; } if( !Colors ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Requested a color, but the color table" << endl << " is not defined. Ignoring request." << endl; } return Output; } if( ColorNumber >= TellNumberOfColors() ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Requested color number " << ColorNumber << " is outside the allowed" << endl << " range [0," << TellNumberOfColors()-1 << "]. Ignoring request to get this color." << endl; } return Output; } Output = Colors[ColorNumber]; return Output; } BMP::BMP() { Width = 1; Height = 1; BitDepth = 24; Pixels = new RGBApixel* [Width]; Pixels[0] = new RGBApixel [Height]; Colors = NULL; XPelsPerMeter = 0; YPelsPerMeter = 0; MetaData1 = NULL; SizeOfMetaData1 = 0; MetaData2 = NULL; SizeOfMetaData2 = 0; } BMP::BMP( const BMP& Input ) { copy(const_cast<BMP&>(Input)); } BMP::BMP( BMP& Input ) { copy(Input); } void BMP::copy( BMP& Input ) { // first, make the image empty. Width = 1; Height = 1; BitDepth = 24; Pixels = new RGBApixel* [Width]; Pixels[0] = new RGBApixel [Height]; Colors = NULL; XPelsPerMeter = 0; YPelsPerMeter = 0; MetaData1 = NULL; SizeOfMetaData1 = 0; MetaData2 = NULL; SizeOfMetaData2 = 0; // now, set the correct bit depth SetBitDepth( Input.TellBitDepth() ); // set the correct pixel size SetSize( Input.TellWidth() , Input.TellHeight() ); // set the DPI information from Input SetDPI( Input.TellHorizontalDPI() , Input.TellVerticalDPI() ); // if there is a color table, get all the colors if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) { for( int k=0 ; k < TellNumberOfColors() ; k++ ) { SetColor( k, Input.GetColor( k )); } } // get all the pixels for( int j=0; j < Height ; j++ ) { for( int i=0; i < Width ; i++ ) { Pixels[i][j] = *Input(i,j); // Pixels[i][j] = Input.GetPixel(i,j); // *Input(i,j); } } } BMP::~BMP() { int i; for(i=0;i<Width;i++) { delete [] Pixels[i]; } delete [] Pixels; if( Colors ) { delete [] Colors; } if( MetaData1 ) { delete [] MetaData1; } if( MetaData2 ) { delete [] MetaData2; } } RGBApixel* BMP::operator()(int i, int j) { using namespace std; bool Warn = false; if( i >= Width ) { i = Width-1; Warn = true; } if( i < 0 ) { i = 0; Warn = true; } if( j >= Height ) { j = Height-1; Warn = true; } if( j < 0 ) { j = 0; Warn = true; } if( Warn && EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to access non-existent pixel;" << endl << " Truncating request to fit in the range [0," << Width-1 << "] x [0," << Height-1 << "]." << endl; } return &(Pixels[i][j]); } // int BMP::TellBitDepth( void ) const int BMP::TellBitDepth( void ) { return BitDepth; } // int BMP::TellHeight( void ) const int BMP::TellHeight( void ) { return Height; } // int BMP::TellWidth( void ) const int BMP::TellWidth( void ) { return Width; } // int BMP::TellNumberOfColors( void ) const int BMP::TellNumberOfColors( void ) { int output = IntPow( 2, BitDepth ); if( BitDepth == 32 ) { output = IntPow( 2, 24 ); } return output; } bool BMP::SetBitDepth( int NewDepth ) { using namespace std; if( NewDepth != 1 && NewDepth != 4 && NewDepth != 8 && NewDepth != 16 && NewDepth != 24 && NewDepth != 32 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: User attempted to set unsupported bit depth " << NewDepth << "." << endl << " Bit depth remains unchanged at " << BitDepth << "." << endl; } return false; } BitDepth = NewDepth; if( Colors ) { delete [] Colors; } int NumberOfColors = IntPow( 2, BitDepth ); if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) { Colors = new RGBApixel [NumberOfColors]; } else { Colors = NULL; } if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) { CreateStandardColorTable(); } return true; } bool BMP::SetSize(int NewWidth , int NewHeight ) { using namespace std; if( NewWidth <= 0 || NewHeight <= 0 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: User attempted to set a non-positive width or height." << endl << " Size remains unchanged at " << Width << " x " << Height << "." << endl; } return false; } int i,j; for(i=0;i<Width;i++) { delete [] Pixels[i]; } delete [] Pixels; Width = NewWidth; Height = NewHeight; Pixels = new RGBApixel* [ Width ]; for(i=0; i<Width; i++) { Pixels[i] = new RGBApixel [ Height ]; } for( i=0 ; i < Width ; i++) { for( j=0 ; j < Height ; j++ ) { Pixels[i][j].Red = 255; Pixels[i][j].Green = 255; Pixels[i][j].Blue = 255; Pixels[i][j].Alpha = 0; } } return true; } bool BMP::WriteToFile( const char* FileName ) { using namespace std; if( !EasyBMPcheckDataSize() ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Data types are wrong size!" << endl << " You may need to mess with EasyBMP_DataTypes.h" << endl << " to fix these errors, and then recompile." << endl << " All 32-bit and 64-bit machines should be" << endl << " supported, however." << endl << endl; } return false; } FILE* fp = fopen( FileName, "wb" ); if( fp == NULL ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Cannot open file " << FileName << " for output." << endl; } fclose( fp ); return false; } // some preliminaries double dBytesPerPixel = ( (double) BitDepth ) / 8.0; double dBytesPerRow = dBytesPerPixel * (Width+0.0); dBytesPerRow = ceil(dBytesPerRow); int BytePaddingPerRow = 4 - ( (int) (dBytesPerRow) )% 4; if( BytePaddingPerRow == 4 ) { BytePaddingPerRow = 0; } double dActualBytesPerRow = dBytesPerRow + BytePaddingPerRow; double dTotalPixelBytes = Height * dActualBytesPerRow; double dPaletteSize = 0; if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) { dPaletteSize = IntPow(2,BitDepth)*4.0; } // leave some room for 16-bit masks if( BitDepth == 16 ) { dPaletteSize = 3*4; } double dTotalFileSize = 14 + 40 + dPaletteSize + dTotalPixelBytes; // write the file header BMFH bmfh; bmfh.bfSize = (ebmpDWORD) dTotalFileSize; bmfh.bfReserved1 = 0; bmfh.bfReserved2 = 0; bmfh.bfOffBits = (ebmpDWORD) (14+40+dPaletteSize); if( IsBigEndian() ) { bmfh.SwitchEndianess(); } fwrite( (char*) &(bmfh.bfType) , sizeof(ebmpWORD) , 1 , fp ); fwrite( (char*) &(bmfh.bfSize) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmfh.bfReserved1) , sizeof(ebmpWORD) , 1 , fp ); fwrite( (char*) &(bmfh.bfReserved2) , sizeof(ebmpWORD) , 1 , fp ); fwrite( (char*) &(bmfh.bfOffBits) , sizeof(ebmpDWORD) , 1 , fp ); // write the info header BMIH bmih; bmih.biSize = 40; bmih.biWidth = Width; bmih.biHeight = Height; bmih.biPlanes = 1; bmih.biBitCount = BitDepth; bmih.biCompression = 0; bmih.biSizeImage = (ebmpDWORD) dTotalPixelBytes; if( XPelsPerMeter ) { bmih.biXPelsPerMeter = XPelsPerMeter; } else { bmih.biXPelsPerMeter = DefaultXPelsPerMeter; } if( YPelsPerMeter ) { bmih.biYPelsPerMeter = YPelsPerMeter; } else { bmih.biYPelsPerMeter = DefaultYPelsPerMeter; } bmih.biClrUsed = 0; bmih.biClrImportant = 0; // indicates that we'll be using bit fields for 16-bit files if( BitDepth == 16 ) { bmih.biCompression = 3; } if( IsBigEndian() ) { bmih.SwitchEndianess(); } fwrite( (char*) &(bmih.biSize) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biWidth) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biHeight) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biPlanes) , sizeof(ebmpWORD) , 1 , fp ); fwrite( (char*) &(bmih.biBitCount) , sizeof(ebmpWORD) , 1 , fp ); fwrite( (char*) &(bmih.biCompression) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biSizeImage) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biXPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biYPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp ); fwrite( (char*) &(bmih.biClrUsed) , sizeof(ebmpDWORD) , 1 , fp); fwrite( (char*) &(bmih.biClrImportant) , sizeof(ebmpDWORD) , 1 , fp); // write the palette if( BitDepth == 1 || BitDepth == 4 || BitDepth == 8 ) { int NumberOfColors = IntPow(2,BitDepth); // if there is no palette, create one if( !Colors ) { if( !Colors ) { Colors = new RGBApixel [NumberOfColors]; } CreateStandardColorTable(); } int n; for( n=0 ; n < NumberOfColors ; n++ ) { fwrite( (char*) &(Colors[n]) , 4 , 1 , fp ); } } // write the pixels int i,j; if( BitDepth != 16 ) { ebmpBYTE* Buffer; int BufferSize = (int) ( (Width*BitDepth)/8.0 ); while( 8*BufferSize < Width*BitDepth ) { BufferSize++; } while( BufferSize % 4 ) { BufferSize++; } Buffer = new ebmpBYTE [BufferSize]; for( j=0 ; j < BufferSize; j++ ) { Buffer[j] = 0; } j=Height-1; while( j > -1 ) { bool Success = false; if( BitDepth == 32 ) { Success = Write32bitRow( Buffer, BufferSize, j ); } if( BitDepth == 24 ) { Success = Write24bitRow( Buffer, BufferSize, j ); } if( BitDepth == 8 ) { Success = Write8bitRow( Buffer, BufferSize, j ); } if( BitDepth == 4 ) { Success = Write4bitRow( Buffer, BufferSize, j ); } if( BitDepth == 1 ) { Success = Write1bitRow( Buffer, BufferSize, j ); } if( Success ) { int BytesWritten = (int) fwrite( (char*) Buffer, 1, BufferSize, fp ); if( BytesWritten != BufferSize ) { Success = false; } } if( !Success ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Could not write proper amount of data." << endl; } j = -1; } j--; } delete [] Buffer; } if( BitDepth == 16 ) { // write the bit masks ebmpWORD BlueMask = 31; // bits 12-16 ebmpWORD GreenMask = 2016; // bits 6-11 ebmpWORD RedMask = 63488; // bits 1-5 ebmpWORD ZeroWORD; if( IsBigEndian() ) { RedMask = FlipWORD( RedMask ); } fwrite( (char*) &RedMask , 2 , 1 , fp ); fwrite( (char*) &ZeroWORD , 2 , 1 , fp ); if( IsBigEndian() ) { GreenMask = FlipWORD( GreenMask ); } fwrite( (char*) &GreenMask , 2 , 1 , fp ); fwrite( (char*) &ZeroWORD , 2 , 1 , fp ); if( IsBigEndian() ) { BlueMask = FlipWORD( BlueMask ); } fwrite( (char*) &BlueMask , 2 , 1 , fp ); fwrite( (char*) &ZeroWORD , 2 , 1 , fp ); int DataBytes = Width*2; int PaddingBytes = ( 4 - DataBytes % 4 ) % 4; // write the actual pixels for( j=Height-1 ; j >= 0 ; j-- ) { // write all row pixel data i=0; int WriteNumber = 0; while( WriteNumber < DataBytes ) { ebmpWORD TempWORD; ebmpWORD RedWORD = (ebmpWORD) ((Pixels[i][j]).Red / 8); ebmpWORD GreenWORD = (ebmpWORD) ((Pixels[i][j]).Green / 4); ebmpWORD BlueWORD = (ebmpWORD) ((Pixels[i][j]).Blue / 8); TempWORD = (RedWORD<<11) + (GreenWORD<<5) + BlueWORD; if( IsBigEndian() ) { TempWORD = FlipWORD( TempWORD ); } fwrite( (char*) &TempWORD , 2, 1, fp); WriteNumber += 2; i++; } // write any necessary row padding WriteNumber = 0; while( WriteNumber < PaddingBytes ) { ebmpBYTE TempBYTE; fwrite( (char*) &TempBYTE , 1, 1, fp); WriteNumber++; } } } fclose(fp); return true; } bool BMP::ReadFromFile( const char* FileName ) { using namespace std; if( !EasyBMPcheckDataSize() ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Data types are wrong size!" << endl << " You may need to mess with EasyBMP_DataTypes.h" << endl << " to fix these errors, and then recompile." << endl << " All 32-bit and 64-bit machines should be" << endl << " supported, however." << endl << endl; } return false; } FILE* fp = fopen( FileName, "rb" ); if( fp == NULL ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Cannot open file " << FileName << " for input." << endl; } SetBitDepth(1); SetSize(1,1); return false; } // read the file header BMFH bmfh; bool NotCorrupted = true; NotCorrupted &= SafeFread( (char*) &(bmfh.bfType) , sizeof(ebmpWORD), 1, fp); bool IsBitmap = false; if( IsBigEndian() && bmfh.bfType == 16973 ) { IsBitmap = true; } if( !IsBigEndian() && bmfh.bfType == 19778 ) { IsBitmap = true; } if( !IsBitmap ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " is not a Windows BMP file!" << endl; } fclose( fp ); return false; } NotCorrupted &= SafeFread( (char*) &(bmfh.bfSize) , sizeof(ebmpDWORD) , 1, fp); NotCorrupted &= SafeFread( (char*) &(bmfh.bfReserved1) , sizeof(ebmpWORD) , 1, fp); NotCorrupted &= SafeFread( (char*) &(bmfh.bfReserved2) , sizeof(ebmpWORD) , 1, fp); NotCorrupted &= SafeFread( (char*) &(bmfh.bfOffBits) , sizeof(ebmpDWORD) , 1 , fp); if( IsBigEndian() ) { bmfh.SwitchEndianess(); } // read the info header BMIH bmih; NotCorrupted &= SafeFread( (char*) &(bmih.biSize) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biWidth) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biHeight) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biPlanes) , sizeof(ebmpWORD) , 1, fp); NotCorrupted &= SafeFread( (char*) &(bmih.biBitCount) , sizeof(ebmpWORD) , 1, fp); NotCorrupted &= SafeFread( (char*) &(bmih.biCompression) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biSizeImage) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biXPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biYPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biClrUsed) , sizeof(ebmpDWORD) , 1 , fp); NotCorrupted &= SafeFread( (char*) &(bmih.biClrImportant) , sizeof(ebmpDWORD) , 1 , fp); if( IsBigEndian() ) { bmih.SwitchEndianess(); } // a safety catch: if any of the header information didn't read properly, abort // future idea: check to see if at least most is self-consistent if( !NotCorrupted ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " is obviously corrupted." << endl; } SetSize(1,1); SetBitDepth(1); fclose(fp); return false; } XPelsPerMeter = bmih.biXPelsPerMeter; YPelsPerMeter = bmih.biYPelsPerMeter; // if bmih.biCompression 1 or 2, then the file is RLE compressed if( bmih.biCompression == 1 || bmih.biCompression == 2 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " is (RLE) compressed." << endl << " EasyBMP does not support compression." << endl; } SetSize(1,1); SetBitDepth(1); fclose(fp); return false; } // if bmih.biCompression > 3, then something strange is going on // it's probably an OS2 bitmap file. if( bmih.biCompression > 3 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " is in an unsupported format." << endl << " (bmih.biCompression = " << bmih.biCompression << ")" << endl << " The file is probably an old OS2 bitmap or corrupted." << endl; } SetSize(1,1); SetBitDepth(1); fclose(fp); return false; } if( bmih.biCompression == 3 && bmih.biBitCount != 16 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " uses bit fields and is not a" << endl << " 16-bit file. This is not supported." << endl; } SetSize(1,1); SetBitDepth(1); fclose(fp); return false; } // set the bit depth int TempBitDepth = (int) bmih.biBitCount; if( TempBitDepth != 1 && TempBitDepth != 4 && TempBitDepth != 8 && TempBitDepth != 16 && TempBitDepth != 24 && TempBitDepth != 32 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " has unrecognized bit depth." << endl; } SetSize(1,1); SetBitDepth(1); fclose(fp); return false; } SetBitDepth( (int) bmih.biBitCount ); // set the size if( (int) bmih.biWidth <= 0 || (int) bmih.biHeight <= 0 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: " << FileName << " has a non-positive width or height." << endl; } SetSize(1,1); SetBitDepth(1); fclose(fp); return false; } SetSize( (int) bmih.biWidth , (int) bmih.biHeight ); // some preliminaries double dBytesPerPixel = ( (double) BitDepth ) / 8.0; double dBytesPerRow = dBytesPerPixel * (Width+0.0); dBytesPerRow = ceil(dBytesPerRow); int BytePaddingPerRow = 4 - ( (int) (dBytesPerRow) )% 4; if( BytePaddingPerRow == 4 ) { BytePaddingPerRow = 0; } // if < 16 bits, read the palette if( BitDepth < 16 ) { // determine the number of colors specified in the // color table int NumberOfColorsToRead = ((int) bmfh.bfOffBits - 54 )/4; if( NumberOfColorsToRead > IntPow(2,BitDepth) ) { NumberOfColorsToRead = IntPow(2,BitDepth); } if( NumberOfColorsToRead < TellNumberOfColors() ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: file " << FileName << " has an underspecified" << endl << " color table. The table will be padded with extra" << endl << " white (255,255,255,0) entries." << endl; } } int n; for( n=0; n < NumberOfColorsToRead ; n++ ) { SafeFread( (char*) &(Colors[n]) , 4 , 1 , fp); } for( n=NumberOfColorsToRead ; n < TellNumberOfColors() ; n++ ) { RGBApixel WHITE; WHITE.Red = 255; WHITE.Green = 255; WHITE.Blue = 255; WHITE.Alpha = 0; SetColor( n , WHITE ); } } // skip blank data if bfOffBits so indicates int BytesToSkip = bmfh.bfOffBits - 54;; if( BitDepth < 16 ) { BytesToSkip -= 4*IntPow(2,BitDepth); } if( BitDepth == 16 && bmih.biCompression == 3 ) { BytesToSkip -= 3*4; } if( BytesToSkip < 0 ) { BytesToSkip = 0; } if( BytesToSkip > 0 && BitDepth != 16 ) { if( EasyBMPwarnings ) { //cout << "EasyBMP Warning: Extra meta data detected in file " << FileName << endl // << " Data will be skipped." << endl; } ebmpBYTE* TempSkipBYTE; TempSkipBYTE = new ebmpBYTE [BytesToSkip]; SafeFread( (char*) TempSkipBYTE , BytesToSkip , 1 , fp); delete [] TempSkipBYTE; } // This code reads 1, 4, 8, 24, and 32-bpp files // with a more-efficient buffered technique. int i,j; if( BitDepth != 16 ) { int BufferSize = (int) ( (Width*BitDepth) / 8.0 ); while( 8*BufferSize < Width*BitDepth ) { BufferSize++; } while( BufferSize % 4 ) { BufferSize++; } ebmpBYTE* Buffer; Buffer = new ebmpBYTE [BufferSize]; j= Height-1; while( j > -1 ) { int BytesRead = (int) fread( (char*) Buffer, 1, BufferSize, fp ); if( BytesRead < BufferSize ) { j = -1; if( EasyBMPwarnings ) { cout << "EasyBMP Error: Could not read proper amount of data." << endl; } } else { bool Success = false; if( BitDepth == 1 ) { Success = Read1bitRow( Buffer, BufferSize, j ); } if( BitDepth == 4 ) { Success = Read4bitRow( Buffer, BufferSize, j ); } if( BitDepth == 8 ) { Success = Read8bitRow( Buffer, BufferSize, j ); } if( BitDepth == 24 ) { Success = Read24bitRow( Buffer, BufferSize, j ); } if( BitDepth == 32 ) { Success = Read32bitRow( Buffer, BufferSize, j ); } if( !Success ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Could not read enough pixel data!" << endl; } j = -1; } } j--; } delete [] Buffer; } if( BitDepth == 16 ) { int DataBytes = Width*2; int PaddingBytes = ( 4 - DataBytes % 4 ) % 4; // set the default mask ebmpWORD BlueMask = 31; // bits 12-16 ebmpWORD GreenMask = 992; // bits 7-11 ebmpWORD RedMask = 31744; // bits 2-6 // read the bit fields, if necessary, to // override the default 5-5-5 mask if( bmih.biCompression != 0 ) { // read the three bit masks ebmpWORD TempMaskWORD; ebmpWORD ZeroWORD; SafeFread( (char*) &RedMask , 2 , 1 , fp ); if( IsBigEndian() ) { RedMask = FlipWORD(RedMask); } SafeFread( (char*) &TempMaskWORD , 2, 1, fp ); SafeFread( (char*) &GreenMask , 2 , 1 , fp ); if( IsBigEndian() ) { GreenMask = FlipWORD(GreenMask); } SafeFread( (char*) &TempMaskWORD , 2, 1, fp ); SafeFread( (char*) &BlueMask , 2 , 1 , fp ); if( IsBigEndian() ) { BlueMask = FlipWORD(BlueMask); } SafeFread( (char*) &TempMaskWORD , 2, 1, fp ); } // read and skip any meta data if( BytesToSkip > 0 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Extra meta data detected in file " << FileName << endl << " Data will be skipped." << endl; } ebmpBYTE* TempSkipBYTE; TempSkipBYTE = new ebmpBYTE [BytesToSkip]; SafeFread( (char*) TempSkipBYTE , BytesToSkip , 1 , fp); delete [] TempSkipBYTE; } // determine the red, green and blue shifts int GreenShift = 0; ebmpWORD TempShiftWORD = GreenMask; while( TempShiftWORD > 31 ) { TempShiftWORD = TempShiftWORD>>1; GreenShift++; } int BlueShift = 0; TempShiftWORD = BlueMask; while( TempShiftWORD > 31 ) { TempShiftWORD = TempShiftWORD>>1; BlueShift++; } int RedShift = 0; TempShiftWORD = RedMask; while( TempShiftWORD > 31 ) { TempShiftWORD = TempShiftWORD>>1; RedShift++; } // read the actual pixels for( j=Height-1 ; j >= 0 ; j-- ) { i=0; int ReadNumber = 0; while( ReadNumber < DataBytes ) { ebmpWORD TempWORD; SafeFread( (char*) &TempWORD , 2 , 1 , fp ); if( IsBigEndian() ) { TempWORD = FlipWORD(TempWORD); } ReadNumber += 2; ebmpWORD Red = RedMask & TempWORD; ebmpWORD Green = GreenMask & TempWORD; ebmpWORD Blue = BlueMask & TempWORD; ebmpBYTE BlueBYTE = (ebmpBYTE) 8*(Blue>>BlueShift); ebmpBYTE GreenBYTE = (ebmpBYTE) 8*(Green>>GreenShift); ebmpBYTE RedBYTE = (ebmpBYTE) 8*(Red>>RedShift); (Pixels[i][j]).Red = RedBYTE; (Pixels[i][j]).Green = GreenBYTE; (Pixels[i][j]).Blue = BlueBYTE; i++; } ReadNumber = 0; while( ReadNumber < PaddingBytes ) { ebmpBYTE TempBYTE; SafeFread( (char*) &TempBYTE , 1, 1, fp); ReadNumber++; } } } fclose(fp); return true; } bool BMP::CreateStandardColorTable( void ) { using namespace std; if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to create color table at a bit" << endl << " depth that does not require a color table." << endl << " Ignoring request." << endl; } return false; } if( BitDepth == 1 ) { int i; for( i=0 ; i < 2 ; i++ ) { Colors[i].Red = i*255; Colors[i].Green = i*255; Colors[i].Blue = i*255; Colors[i].Alpha = 0; } return true; } if( BitDepth == 4 ) { int i = 0; int j,k,ell; // simplify the code for the first 8 colors for( ell=0 ; ell < 2 ; ell++ ) { for( k=0 ; k < 2 ; k++ ) { for( j=0 ; j < 2 ; j++ ) { Colors[i].Red = j*128; Colors[i].Green = k*128; Colors[i].Blue = ell*128; i++; } } } // simplify the code for the last 8 colors for( ell=0 ; ell < 2 ; ell++ ) { for( k=0 ; k < 2 ; k++ ) { for( j=0 ; j < 2 ; j++ ) { Colors[i].Red = j*255; Colors[i].Green = k*255; Colors[i].Blue = ell*255; i++; } } } // overwrite the duplicate color i=8; Colors[i].Red = 192; Colors[i].Green = 192; Colors[i].Blue = 192; for( i=0 ; i < 16 ; i++ ) { Colors[i].Alpha = 0; } return true; } if( BitDepth == 8 ) { int i=0; int j,k,ell; // do an easy loop, which works for all but colors // 0 to 9 and 246 to 255 for( ell=0 ; ell < 4 ; ell++ ) { for( k=0 ; k < 8 ; k++ ) { for( j=0; j < 8 ; j++ ) { Colors[i].Red = j*32; Colors[i].Green = k*32; Colors[i].Blue = ell*64; Colors[i].Alpha = 0; i++; } } } // now redo the first 8 colors i=0; for( ell=0 ; ell < 2 ; ell++ ) { for( k=0 ; k < 2 ; k++ ) { for( j=0; j < 2 ; j++ ) { Colors[i].Red = j*128; Colors[i].Green = k*128; Colors[i].Blue = ell*128; i++; } } } // overwrite colors 7, 8, 9 i=7; Colors[i].Red = 192; Colors[i].Green = 192; Colors[i].Blue = 192; i++; // 8 Colors[i].Red = 192; Colors[i].Green = 220; Colors[i].Blue = 192; i++; // 9 Colors[i].Red = 166; Colors[i].Green = 202; Colors[i].Blue = 240; // overwrite colors 246 to 255 i=246; Colors[i].Red = 255; Colors[i].Green = 251; Colors[i].Blue = 240; i++; // 247 Colors[i].Red = 160; Colors[i].Green = 160; Colors[i].Blue = 164; i++; // 248 Colors[i].Red = 128; Colors[i].Green = 128; Colors[i].Blue = 128; i++; // 249 Colors[i].Red = 255; Colors[i].Green = 0; Colors[i].Blue = 0; i++; // 250 Colors[i].Red = 0; Colors[i].Green = 255; Colors[i].Blue = 0; i++; // 251 Colors[i].Red = 255; Colors[i].Green = 255; Colors[i].Blue = 0; i++; // 252 Colors[i].Red = 0; Colors[i].Green = 0; Colors[i].Blue = 255; i++; // 253 Colors[i].Red = 255; Colors[i].Green = 0; Colors[i].Blue = 255; i++; // 254 Colors[i].Red = 0; Colors[i].Green = 255; Colors[i].Blue = 255; i++; // 255 Colors[i].Red = 255; Colors[i].Green = 255; Colors[i].Blue = 255; return true; } return true; } bool SafeFread( char* buffer, int size, int number, FILE* fp ) { using namespace std; int ItemsRead; if( feof(fp) ) { return false; } ItemsRead = (int) fread( buffer , size , number , fp ); if( ItemsRead < number ) { return false; } return true; } void BMP::SetDPI( int HorizontalDPI, int VerticalDPI ) { XPelsPerMeter = (int) ( HorizontalDPI * 39.37007874015748 ); YPelsPerMeter = (int) ( VerticalDPI * 39.37007874015748 ); } // int BMP::TellVerticalDPI( void ) const int BMP::TellVerticalDPI( void ) { if( !YPelsPerMeter ) { YPelsPerMeter = DefaultYPelsPerMeter; } return (int) ( YPelsPerMeter / (double) 39.37007874015748 ); } // int BMP::TellHorizontalDPI( void ) const int BMP::TellHorizontalDPI( void ) { if( !XPelsPerMeter ) { XPelsPerMeter = DefaultXPelsPerMeter; } return (int) ( XPelsPerMeter / (double) 39.37007874015748 ); } /* These functions are defined in EasyBMP_VariousBMPutilities.h */ BMFH GetBMFH( const char* szFileNameIn ) { using namespace std; BMFH bmfh; FILE* fp; fp = fopen( szFileNameIn,"rb"); if( !fp ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Cannot initialize from file " << szFileNameIn << "." << endl << " File cannot be opened or does not exist." << endl; } bmfh.bfType = 0; return bmfh; } SafeFread( (char*) &(bmfh.bfType) , sizeof(ebmpWORD) , 1 , fp ); SafeFread( (char*) &(bmfh.bfSize) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmfh.bfReserved1) , sizeof(ebmpWORD) , 1 , fp ); SafeFread( (char*) &(bmfh.bfReserved2) , sizeof(ebmpWORD) , 1 , fp ); SafeFread( (char*) &(bmfh.bfOffBits) , sizeof(ebmpDWORD) , 1 , fp ); fclose( fp ); if( IsBigEndian() ) { bmfh.SwitchEndianess(); } return bmfh; } BMIH GetBMIH( const char* szFileNameIn ) { using namespace std; BMFH bmfh; BMIH bmih; FILE* fp; fp = fopen( szFileNameIn,"rb"); if( !fp ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Cannot initialize from file " << szFileNameIn << "." << endl << " File cannot be opened or does not exist." << endl; } return bmih; } // read the bmfh, i.e., first 14 bytes (just to get it out of the way); ebmpBYTE TempBYTE; int i; for( i = 14 ; i > 0 ; i-- ) { SafeFread( (char*) &TempBYTE , sizeof(ebmpBYTE) , 1, fp ); } // read the bmih SafeFread( (char*) &(bmih.biSize) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biWidth) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biHeight) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biPlanes) , sizeof(ebmpWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biBitCount) , sizeof(ebmpWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biCompression) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biSizeImage) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biXPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biYPelsPerMeter) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biClrUsed) , sizeof(ebmpDWORD) , 1 , fp ); SafeFread( (char*) &(bmih.biClrImportant) , sizeof(ebmpDWORD) , 1 , fp ); fclose( fp ); if( IsBigEndian() ) { bmih.SwitchEndianess(); } return bmih; } void DisplayBitmapInfo( const char* szFileNameIn ) { using namespace std; FILE* fp; fp = fopen( szFileNameIn,"rb"); if( !fp ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: Cannot initialize from file " << szFileNameIn << "." << endl << " File cannot be opened or does not exist." << endl; } return; } fclose( fp ); // don't duplicate work! Just use the functions from above! BMFH bmfh = GetBMFH(szFileNameIn); BMIH bmih = GetBMIH(szFileNameIn); cout << "File information for file " << szFileNameIn << ":" << endl << endl; cout << "BITMAPFILEHEADER:" << endl << "bfType: " << bmfh.bfType << endl << "bfSize: " << bmfh.bfSize << endl << "bfReserved1: " << bmfh.bfReserved1 << endl << "bfReserved2: " << bmfh.bfReserved2 << endl << "bfOffBits: " << bmfh.bfOffBits << endl << endl; cout << "BITMAPINFOHEADER:" << endl << "biSize: " << bmih.biSize << endl << "biWidth: " << bmih.biWidth << endl << "biHeight: " << bmih.biHeight << endl << "biPlanes: " << bmih.biPlanes << endl << "biBitCount: " << bmih.biBitCount << endl << "biCompression: " << bmih.biCompression << endl << "biSizeImage: " << bmih.biSizeImage << endl << "biXPelsPerMeter: " << bmih.biXPelsPerMeter << endl << "biYPelsPerMeter: " << bmih.biYPelsPerMeter << endl << "biClrUsed: " << bmih.biClrUsed << endl << "biClrImportant: " << bmih.biClrImportant << endl << endl; return; } int GetBitmapColorDepth( const char* szFileNameIn ) { BMIH bmih = GetBMIH( szFileNameIn ); return (int) bmih.biBitCount; } void PixelToPixelCopy( BMP& From, int FromX, int FromY, BMP& To, int ToX, int ToY) { *To(ToX,ToY) = *From(FromX,FromY); return; } void PixelToPixelCopyTransparent( BMP& From, int FromX, int FromY, BMP& To, int ToX, int ToY, RGBApixel& Transparent ) { if( From(FromX,FromY)->Red != Transparent.Red || From(FromX,FromY)->Green != Transparent.Green || From(FromX,FromY)->Blue != Transparent.Blue ) { *To(ToX,ToY) = *From(FromX,FromY); } return; } void RangedPixelToPixelCopy( BMP& From, int FromL , int FromR, int FromB, int FromT, BMP& To, int ToX, int ToY ) { // make sure the conventions are followed if( FromB < FromT ) { int Temp = FromT; FromT = FromB; FromB = Temp; } // make sure that the copied regions exist in both bitmaps if( FromR >= From.TellWidth() ) { FromR = From.TellWidth()-1; } if( FromL < 0 ){ FromL = 0; } if( FromB >= From.TellHeight() ) { FromB = From.TellHeight()-1; } if( FromT < 0 ){ FromT = 0; } if( ToX+(FromR-FromL) >= To.TellWidth() ) { FromR = To.TellWidth()-1+FromL-ToX; } if( ToY+(FromB-FromT) >= To.TellHeight() ) { FromB = To.TellHeight()-1+FromT-ToY; } int i,j; for( j=FromT ; j <= FromB ; j++ ) { for( i=FromL ; i <= FromR ; i++ ) { PixelToPixelCopy( From, i,j, To, ToX+(i-FromL), ToY+(j-FromT) ); } } return; } void RangedPixelToPixelCopyTransparent( BMP& From, int FromL , int FromR, int FromB, int FromT, BMP& To, int ToX, int ToY , RGBApixel& Transparent ) { // make sure the conventions are followed if( FromB < FromT ) { int Temp = FromT; FromT = FromB; FromB = Temp; } // make sure that the copied regions exist in both bitmaps if( FromR >= From.TellWidth() ) { FromR = From.TellWidth()-1; } if( FromL < 0 ){ FromL = 0; } if( FromB >= From.TellHeight() ) { FromB = From.TellHeight()-1; } if( FromT < 0 ){ FromT = 0; } if( ToX+(FromR-FromL) >= To.TellWidth() ) { FromR = To.TellWidth()-1+FromL-ToX; } if( ToY+(FromB-FromT) >= To.TellHeight() ) { FromB = To.TellHeight()-1+FromT-ToY; } int i,j; for( j=FromT ; j <= FromB ; j++ ) { for( i=FromL ; i <= FromR ; i++ ) { PixelToPixelCopyTransparent( From, i,j, To, ToX+(i-FromL), ToY+(j-FromT) , Transparent); } } return; } bool CreateGrayscaleColorTable( BMP& InputImage ) { using namespace std; int BitDepth = InputImage.TellBitDepth(); if( BitDepth != 1 && BitDepth != 4 && BitDepth != 8 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Warning: Attempted to create color table at a bit" << endl << " depth that does not require a color table." << endl << " Ignoring request." << endl; } return false; } int i; int NumberOfColors = InputImage.TellNumberOfColors(); ebmpBYTE StepSize; if( BitDepth != 1 ) { StepSize = 255/(NumberOfColors-1); } else { StepSize = 255; } for( i=0 ; i < NumberOfColors ; i++ ) { ebmpBYTE TempBYTE = i*StepSize; RGBApixel TempColor; TempColor.Red = TempBYTE; TempColor.Green = TempBYTE; TempColor.Blue = TempBYTE; TempColor.Alpha = 0; InputImage.SetColor( i , TempColor ); } return true; } bool BMP::Read32bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int i; if( Width*4 > BufferSize ) { return false; } for( i=0 ; i < Width ; i++ ) { memcpy( (char*) &(Pixels[i][Row]), (char*) Buffer+4*i, 4 ); } return true; } bool BMP::Read24bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int i; if( Width*3 > BufferSize ) { return false; } for( i=0 ; i < Width ; i++ ) { memcpy( (char*) &(Pixels[i][Row]), Buffer+3*i, 3 ); } return true; } bool BMP::Read8bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int i; if( Width > BufferSize ) { return false; } for( i=0 ; i < Width ; i++ ) { int Index = Buffer[i]; *( this->operator()(i,Row) )= GetColor(Index); } return true; } bool BMP::Read4bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int Shifts[2] = {4 ,0 }; int Masks[2] = {240,15}; int i=0; int j; int k=0; if( Width > 2*BufferSize ) { return false; } while( i < Width ) { j=0; while( j < 2 && i < Width ) { int Index = (int) ( (Buffer[k]&Masks[j]) >> Shifts[j]); *( this->operator()(i,Row) )= GetColor(Index); i++; j++; } k++; } return true; } bool BMP::Read1bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int Shifts[8] = {7 ,6 ,5 ,4 ,3,2,1,0}; int Masks[8] = {128,64,32,16,8,4,2,1}; int i=0; int j; int k=0; if( Width > 8*BufferSize ) { return false; } while( i < Width ) { j=0; while( j < 8 && i < Width ) { int Index = (int) ( (Buffer[k]&Masks[j]) >> Shifts[j]); *( this->operator()(i,Row) )= GetColor(Index); i++; j++; } k++; } return true; } bool BMP::Write32bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int i; if( Width*4 > BufferSize ) { return false; } for( i=0 ; i < Width ; i++ ) { memcpy( (char*) Buffer+4*i, (char*) &(Pixels[i][Row]), 4 ); } return true; } bool BMP::Write24bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int i; if( Width*3 > BufferSize ) { return false; } for( i=0 ; i < Width ; i++ ) { memcpy( (char*) Buffer+3*i, (char*) &(Pixels[i][Row]), 3 ); } return true; } bool BMP::Write8bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int i; if( Width > BufferSize ) { return false; } for( i=0 ; i < Width ; i++ ) { Buffer[i] = FindClosestColor( Pixels[i][Row] ); } return true; } bool BMP::Write4bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int PositionWeights[2] = {16,1}; int i=0; int j; int k=0; if( Width > 2*BufferSize ) { return false; } while( i < Width ) { j=0; int Index = 0; while( j < 2 && i < Width ) { Index += ( PositionWeights[j]* (int) FindClosestColor( Pixels[i][Row] ) ); i++; j++; } Buffer[k] = (ebmpBYTE) Index; k++; } return true; } bool BMP::Write1bitRow( ebmpBYTE* Buffer, int BufferSize, int Row ) { int PositionWeights[8] = {128,64,32,16,8,4,2,1}; int i=0; int j; int k=0; if( Width > 8*BufferSize ) { return false; } while( i < Width ) { j=0; int Index = 0; while( j < 8 && i < Width ) { Index += ( PositionWeights[j]* (int) FindClosestColor( Pixels[i][Row] ) ); i++; j++; } Buffer[k] = (ebmpBYTE) Index; k++; } return true; } ebmpBYTE BMP::FindClosestColor( RGBApixel& input ) { using namespace std; int i=0; int NumberOfColors = TellNumberOfColors(); ebmpBYTE BestI = 0; int BestMatch = 999999; while( i < NumberOfColors ) { RGBApixel Attempt = GetColor( i ); int TempMatch = IntSquare( (int) Attempt.Red - (int) input.Red ) + IntSquare( (int) Attempt.Green - (int) input.Green ) + IntSquare( (int) Attempt.Blue - (int) input.Blue ); if( TempMatch < BestMatch ) { BestI = (ebmpBYTE) i; BestMatch = TempMatch; } if( BestMatch < 1 ) { i = NumberOfColors; } i++; } return BestI; } bool EasyBMPcheckDataSize( void ) { using namespace std; bool ReturnValue = true; if( sizeof( ebmpBYTE ) != 1 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: ebmpBYTE has the wrong size (" << sizeof( ebmpBYTE ) << " bytes)," << endl << " Compared to the expected 1 byte value" << endl; } ReturnValue = false; } if( sizeof( ebmpWORD ) != 2 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: ebmpWORD has the wrong size (" << sizeof( ebmpWORD ) << " bytes)," << endl << " Compared to the expected 2 byte value" << endl; } ReturnValue = false; } if( sizeof( ebmpDWORD ) != 4 ) { if( EasyBMPwarnings ) { cout << "EasyBMP Error: ebmpDWORD has the wrong size (" << sizeof( ebmpDWORD ) << " bytes)," << endl << " Compared to the expected 4 byte value" << endl; } ReturnValue = false; } return ReturnValue; } bool Rescale( BMP& InputImage , char mode, int NewDimension ) { using namespace std; int CapMode = toupper( mode ); BMP OldImage( InputImage ); if( CapMode != 'P' && CapMode != 'W' && CapMode != 'H' && CapMode != 'F' ) { if( EasyBMPwarnings ) { char ErrorMessage [1024]; sprintf( ErrorMessage, "EasyBMP Error: Unknown rescale mode %c requested\n" , mode ); cout << ErrorMessage; } return false; } int NewWidth =0; int NewHeight =0; int OldWidth = OldImage.TellWidth(); int OldHeight= OldImage.TellHeight(); if( CapMode == 'P' ) { NewWidth = (int) floor( OldWidth * NewDimension / 100.0 ); NewHeight = (int) floor( OldHeight * NewDimension / 100.0 ); } if( CapMode == 'F' ) { if( OldWidth > OldHeight ) { CapMode = 'W'; } else { CapMode = 'H'; } } if( CapMode == 'W' ) { double percent = (double) NewDimension / (double) OldWidth; NewWidth = NewDimension; NewHeight = (int) floor( OldHeight * percent ); } if( CapMode == 'H' ) { double percent = (double) NewDimension / (double) OldHeight; NewHeight = NewDimension; NewWidth = (int) floor( OldWidth * percent ); } if( NewWidth < 1 ) { NewWidth = 1; } if( NewHeight < 1 ) { NewHeight = 1; } InputImage.SetSize( NewWidth, NewHeight ); InputImage.SetBitDepth( 24 ); int I,J; double ThetaI,ThetaJ; for( int j=0; j < NewHeight-1 ; j++ ) { ThetaJ = (double)(j*(OldHeight-1.0)) /(double)(NewHeight-1.0); J = (int) floor( ThetaJ ); ThetaJ -= J; for( int i=0; i < NewWidth-1 ; i++ ) { ThetaI = (double)(i*(OldWidth-1.0)) /(double)(NewWidth-1.0); I = (int) floor( ThetaI ); ThetaI -= I; InputImage(i,j)->Red = (ebmpBYTE) ( (1.0-ThetaI-ThetaJ+ThetaI*ThetaJ)*(OldImage(I,J)->Red) +(ThetaI-ThetaI*ThetaJ)*(OldImage(I+1,J)->Red) +(ThetaJ-ThetaI*ThetaJ)*(OldImage(I,J+1)->Red) +(ThetaI*ThetaJ)*(OldImage(I+1,J+1)->Red) ); InputImage(i,j)->Green = (ebmpBYTE) ( (1.0-ThetaI-ThetaJ+ThetaI*ThetaJ)*OldImage(I,J)->Green +(ThetaI-ThetaI*ThetaJ)*OldImage(I+1,J)->Green +(ThetaJ-ThetaI*ThetaJ)*OldImage(I,J+1)->Green +(ThetaI*ThetaJ)*OldImage(I+1,J+1)->Green ); InputImage(i,j)->Blue = (ebmpBYTE) ( (1.0-ThetaI-ThetaJ+ThetaI*ThetaJ)*OldImage(I,J)->Blue +(ThetaI-ThetaI*ThetaJ)*OldImage(I+1,J)->Blue +(ThetaJ-ThetaI*ThetaJ)*OldImage(I,J+1)->Blue +(ThetaI*ThetaJ)*OldImage(I+1,J+1)->Blue ); } InputImage(NewWidth-1,j)->Red = (ebmpBYTE) ( (1.0-ThetaJ)*(OldImage(OldWidth-1,J)->Red) + ThetaJ*(OldImage(OldWidth-1,J+1)->Red) ); InputImage(NewWidth-1,j)->Green = (ebmpBYTE) ( (1.0-ThetaJ)*(OldImage(OldWidth-1,J)->Green) + ThetaJ*(OldImage(OldWidth-1,J+1)->Green) ); InputImage(NewWidth-1,j)->Blue = (ebmpBYTE) ( (1.0-ThetaJ)*(OldImage(OldWidth-1,J)->Blue) + ThetaJ*(OldImage(OldWidth-1,J+1)->Blue) ); } for( int i=0 ; i < NewWidth-1 ; i++ ) { ThetaI = (double)(i*(OldWidth-1.0)) /(double)(NewWidth-1.0); I = (int) floor( ThetaI ); ThetaI -= I; InputImage(i,NewHeight-1)->Red = (ebmpBYTE) ( (1.0-ThetaI)*(OldImage(I,OldHeight-1)->Red) + ThetaI*(OldImage(I,OldHeight-1)->Red) ); InputImage(i,NewHeight-1)->Green = (ebmpBYTE) ( (1.0-ThetaI)*(OldImage(I,OldHeight-1)->Green) + ThetaI*(OldImage(I,OldHeight-1)->Green) ); InputImage(i,NewHeight-1)->Blue = (ebmpBYTE) ( (1.0-ThetaI)*(OldImage(I,OldHeight-1)->Blue) + ThetaI*(OldImage(I,OldHeight-1)->Blue) ); } *InputImage(NewWidth-1,NewHeight-1) = *OldImage(OldWidth-1,OldHeight-1); return true; }
[ "niksettler@gmail.com" ]
niksettler@gmail.com
8338ce738c53db09ed4ecddcb9f0f0a579271d52
41b113964d597590b58d43f9b24219d6e2a2f6ac
/LAB/tree.cpp
db0c07edd95531ad55fdf995b6d0608e5fcd6edd
[]
no_license
Eto322/OPT
95faef12962f7adb6ae3561453f0d4d5ec5e651c
59211e20975b6cea69e5be1f422dfae89adee52a
refs/heads/main
2023-07-06T23:16:30.068156
2021-08-11T17:01:37
2021-08-11T17:01:37
395,059,873
0
0
null
null
null
null
UTF-8
C++
false
false
1,031
cpp
#include "tree.h" Tree::Tree(string notTerminal, string terminal, int depth, int code,int row,int column) { this->notTerminal = notTerminal; this->terminal = terminal; this->depth = depth; this->lexemCode = code; this->row = row; this->column = column; } Tree* Tree::getLastChild() { return this->children[this->children.size() - 1]; } void Tree::addNotTerm(string notTerminal, int code) { this->children.push_back(new Tree(notTerminal, "", this->depth + 1, code)); } void Tree::addTerm(Lexer::Token lexem) { this->children.push_back(new Tree("", lexem.name, this->depth + 1, lexem.code,lexem.row,lexem.colm)); } void Tree::output(ofstream* fout) { string name; if (this->terminal.empty()) { name = this->notTerminal; } else { name = std::to_string(this->lexemCode) + " " + this->terminal; } string spaces = ""; for (int i = 0; i < this->depth; i++) { spaces += ".."; } *fout << spaces << name << endl; if (this->lexemCode > 0) return; for (auto& it : this->children) { it->output(fout); } }
[ "etoakame322@yahoo.com" ]
etoakame322@yahoo.com
5cc78e6e8a1d6127fb572ab763cd3c8f102a5038
fb7efe44f4d9f30d623f880d0eb620f3a81f0fbd
/content/browser/frame_host/navigation_entry_impl_unittest.cc
73b50be56d724ef8a1abb0683022c6ac2fac7dd9
[ "BSD-3-Clause" ]
permissive
wzyy2/chromium-browser
2644b0daf58f8b3caee8a6c09a2b448b2dfe059c
eb905f00a0f7e141e8d6c89be8fb26192a88c4b7
refs/heads/master
2022-11-23T20:25:08.120045
2018-01-16T06:41:26
2018-01-16T06:41:26
117,618,467
3
2
BSD-3-Clause
2022-11-20T22:03:57
2018-01-16T02:09:10
null
UTF-8
C++
false
false
12,532
cc
// Copyright 2013 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 "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "build/build_config.h" #include "content/browser/frame_host/navigation_entry_impl.h" #include "content/browser/site_instance_impl.h" #include "content/public/browser/ssl_status.h" #include "testing/gtest/include/gtest/gtest.h" using base::ASCIIToUTF16; namespace content { namespace { // A test class for testing SSLStatus user data. class TestSSLStatusData : public SSLStatus::UserData { public: TestSSLStatusData() {} ~TestSSLStatusData() override {} void set_user_data_flag(bool user_data_flag) { user_data_flag_ = user_data_flag; } bool user_data_flag() { return user_data_flag_; } // SSLStatus implementation: std::unique_ptr<SSLStatus::UserData> Clone() override { std::unique_ptr<TestSSLStatusData> cloned = base::MakeUnique<TestSSLStatusData>(); cloned->set_user_data_flag(user_data_flag_); return std::move(cloned); } private: bool user_data_flag_ = false; DISALLOW_COPY_AND_ASSIGN(TestSSLStatusData); }; } // namespace class NavigationEntryTest : public testing::Test { public: NavigationEntryTest() : instance_(NULL) { } void SetUp() override { entry1_.reset(new NavigationEntryImpl); instance_ = SiteInstanceImpl::Create(NULL); entry2_.reset(new NavigationEntryImpl( instance_, GURL("test:url"), Referrer(GURL("from"), blink::kWebReferrerPolicyDefault), ASCIIToUTF16("title"), ui::PAGE_TRANSITION_TYPED, false)); } void TearDown() override {} protected: std::unique_ptr<NavigationEntryImpl> entry1_; std::unique_ptr<NavigationEntryImpl> entry2_; // SiteInstances are deleted when their NavigationEntries are gone. scoped_refptr<SiteInstanceImpl> instance_; }; // Test unique ID accessors TEST_F(NavigationEntryTest, NavigationEntryUniqueIDs) { // Two entries should have different IDs by default EXPECT_NE(entry1_->GetUniqueID(), entry2_->GetUniqueID()); // Can set an entry to have the same ID as another entry2_->set_unique_id(entry1_->GetUniqueID()); EXPECT_EQ(entry1_->GetUniqueID(), entry2_->GetUniqueID()); } // Test URL accessors TEST_F(NavigationEntryTest, NavigationEntryURLs) { // Start with no virtual_url (even if a url is set) EXPECT_FALSE(entry1_->has_virtual_url()); EXPECT_FALSE(entry2_->has_virtual_url()); EXPECT_EQ(GURL(), entry1_->GetURL()); EXPECT_EQ(GURL(), entry1_->GetVirtualURL()); EXPECT_TRUE(entry1_->GetTitleForDisplay().empty()); // Setting URL affects virtual_url and GetTitleForDisplay entry1_->SetURL(GURL("http://www.google.com")); EXPECT_EQ(GURL("http://www.google.com"), entry1_->GetURL()); EXPECT_EQ(GURL("http://www.google.com"), entry1_->GetVirtualURL()); EXPECT_EQ(ASCIIToUTF16("www.google.com"), entry1_->GetTitleForDisplay()); // Setting URL with RTL characters causes it to be wrapped in an LTR // embedding. entry1_->SetURL(GURL("http://www.xn--rgba6eo.com")); EXPECT_EQ(base::WideToUTF16(L"\x202a" L"www.\x062c\x0648\x062c\x0644" L".com\x202c"), entry1_->GetTitleForDisplay()); // file:/// URLs should only show the filename. entry1_->SetURL(GURL("file:///foo/bar baz.txt")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt"), entry1_->GetTitleForDisplay()); // file:/// URLs should *not* be wrapped in an LTR embedding. entry1_->SetURL(GURL("file:///foo/%D8%A7%D8%A8 %D8%AC%D8%AF.txt")); EXPECT_EQ(base::WideToUTF16(L"\x0627\x0628" L" \x062c\x062f" L".txt"), entry1_->GetTitleForDisplay()); // For file:/// URLs, make sure that slashes after the filename are ignored. // Regression test for https://crbug.com/503003. entry1_->SetURL(GURL("file:///foo/bar baz.txt#foo/bar")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt#foo/bar"), entry1_->GetTitleForDisplay()); entry1_->SetURL(GURL("file:///foo/bar baz.txt?x=foo/bar")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt?x=foo/bar"), entry1_->GetTitleForDisplay()); entry1_->SetURL(GURL("file:///foo/bar baz.txt#baz/boo?x=foo/bar")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt#baz/boo?x=foo/bar"), entry1_->GetTitleForDisplay()); entry1_->SetURL(GURL("file:///foo/bar baz.txt?x=foo/bar#baz/boo")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt?x=foo/bar#baz/boo"), entry1_->GetTitleForDisplay()); entry1_->SetURL(GURL("file:///foo/bar baz.txt#foo/bar#baz/boo")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt#foo/bar#baz/boo"), entry1_->GetTitleForDisplay()); entry1_->SetURL(GURL("file:///foo/bar baz.txt?x=foo/bar?y=baz/boo")); EXPECT_EQ(ASCIIToUTF16("bar baz.txt?x=foo/bar?y=baz/boo"), entry1_->GetTitleForDisplay()); // Title affects GetTitleForDisplay entry1_->SetTitle(ASCIIToUTF16("Google")); EXPECT_EQ(ASCIIToUTF16("Google"), entry1_->GetTitleForDisplay()); // Setting virtual_url doesn't affect URL entry2_->SetVirtualURL(GURL("display:url")); EXPECT_TRUE(entry2_->has_virtual_url()); EXPECT_EQ(GURL("test:url"), entry2_->GetURL()); EXPECT_EQ(GURL("display:url"), entry2_->GetVirtualURL()); // Having a title set in constructor overrides virtual URL EXPECT_EQ(ASCIIToUTF16("title"), entry2_->GetTitleForDisplay()); // User typed URL is independent of the others EXPECT_EQ(GURL(), entry1_->GetUserTypedURL()); EXPECT_EQ(GURL(), entry2_->GetUserTypedURL()); entry2_->set_user_typed_url(GURL("typedurl")); EXPECT_EQ(GURL("typedurl"), entry2_->GetUserTypedURL()); } // Test Favicon inner class construction. TEST_F(NavigationEntryTest, NavigationEntryFavicons) { EXPECT_EQ(GURL(), entry1_->GetFavicon().url); EXPECT_FALSE(entry1_->GetFavicon().valid); } // Test SSLStatus inner class TEST_F(NavigationEntryTest, NavigationEntrySSLStatus) { // Default (unknown) EXPECT_FALSE(entry1_->GetSSL().initialized); EXPECT_FALSE(entry2_->GetSSL().initialized); EXPECT_FALSE(!!entry1_->GetSSL().certificate); EXPECT_EQ(0U, entry1_->GetSSL().cert_status); EXPECT_EQ(-1, entry1_->GetSSL().security_bits); int content_status = entry1_->GetSSL().content_status; EXPECT_FALSE(!!(content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT)); EXPECT_FALSE(!!(content_status & SSLStatus::RAN_INSECURE_CONTENT)); } // Tests that SSLStatus user data can be added, retrieved, and copied. TEST_F(NavigationEntryTest, SSLStatusUserData) { // Set up an SSLStatus with some user data on it. SSLStatus ssl; ssl.user_data = base::MakeUnique<TestSSLStatusData>(); TestSSLStatusData* ssl_data = static_cast<TestSSLStatusData*>(ssl.user_data.get()); ASSERT_TRUE(ssl_data); ssl_data->set_user_data_flag(true); // Clone the SSLStatus and test that the user data has been cloned. SSLStatus cloned(ssl); TestSSLStatusData* cloned_ssl_data = static_cast<TestSSLStatusData*>(cloned.user_data.get()); ASSERT_TRUE(cloned_ssl_data); EXPECT_TRUE(cloned_ssl_data->user_data_flag()); EXPECT_NE(cloned_ssl_data, ssl_data); } // Test other basic accessors TEST_F(NavigationEntryTest, NavigationEntryAccessors) { // SiteInstance EXPECT_TRUE(entry1_->site_instance() == NULL); EXPECT_EQ(instance_, entry2_->site_instance()); entry1_->set_site_instance(instance_); EXPECT_EQ(instance_, entry1_->site_instance()); // Page type EXPECT_EQ(PAGE_TYPE_NORMAL, entry1_->GetPageType()); EXPECT_EQ(PAGE_TYPE_NORMAL, entry2_->GetPageType()); entry2_->set_page_type(PAGE_TYPE_INTERSTITIAL); EXPECT_EQ(PAGE_TYPE_INTERSTITIAL, entry2_->GetPageType()); // Referrer EXPECT_EQ(GURL(), entry1_->GetReferrer().url); EXPECT_EQ(GURL("from"), entry2_->GetReferrer().url); entry2_->SetReferrer( Referrer(GURL("from2"), blink::kWebReferrerPolicyDefault)); EXPECT_EQ(GURL("from2"), entry2_->GetReferrer().url); // Title EXPECT_EQ(base::string16(), entry1_->GetTitle()); EXPECT_EQ(ASCIIToUTF16("title"), entry2_->GetTitle()); entry2_->SetTitle(ASCIIToUTF16("title2")); EXPECT_EQ(ASCIIToUTF16("title2"), entry2_->GetTitle()); // State EXPECT_FALSE(entry1_->GetPageState().IsValid()); EXPECT_FALSE(entry2_->GetPageState().IsValid()); entry2_->SetPageState(PageState::CreateFromEncodedData("state")); EXPECT_EQ("state", entry2_->GetPageState().ToEncodedData()); // Transition type EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( entry1_->GetTransitionType(), ui::PAGE_TRANSITION_LINK)); EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( entry2_->GetTransitionType(), ui::PAGE_TRANSITION_TYPED)); entry2_->SetTransitionType(ui::PAGE_TRANSITION_RELOAD); EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( entry2_->GetTransitionType(), ui::PAGE_TRANSITION_RELOAD)); // Is renderer initiated EXPECT_FALSE(entry1_->is_renderer_initiated()); EXPECT_FALSE(entry2_->is_renderer_initiated()); entry2_->set_is_renderer_initiated(true); EXPECT_TRUE(entry2_->is_renderer_initiated()); // Post Data EXPECT_FALSE(entry1_->GetHasPostData()); EXPECT_FALSE(entry2_->GetHasPostData()); entry2_->SetHasPostData(true); EXPECT_TRUE(entry2_->GetHasPostData()); // Restored EXPECT_EQ(RestoreType::NONE, entry1_->restore_type()); EXPECT_FALSE(entry1_->IsRestored()); EXPECT_EQ(RestoreType::NONE, entry2_->restore_type()); EXPECT_FALSE(entry2_->IsRestored()); entry2_->set_restore_type(RestoreType::LAST_SESSION_EXITED_CLEANLY); EXPECT_EQ(RestoreType::LAST_SESSION_EXITED_CLEANLY, entry2_->restore_type()); EXPECT_TRUE(entry2_->IsRestored()); // Original URL EXPECT_EQ(GURL(), entry1_->GetOriginalRequestURL()); EXPECT_EQ(GURL(), entry2_->GetOriginalRequestURL()); entry2_->SetOriginalRequestURL(GURL("original_url")); EXPECT_EQ(GURL("original_url"), entry2_->GetOriginalRequestURL()); // User agent override EXPECT_FALSE(entry1_->GetIsOverridingUserAgent()); EXPECT_FALSE(entry2_->GetIsOverridingUserAgent()); entry2_->SetIsOverridingUserAgent(true); EXPECT_TRUE(entry2_->GetIsOverridingUserAgent()); // Post data EXPECT_FALSE(entry1_->GetPostData()); EXPECT_FALSE(entry2_->GetPostData()); const int length = 11; const char* raw_data = "post\n\n\0data"; scoped_refptr<ResourceRequestBody> post_data = ResourceRequestBody::CreateFromBytes(raw_data, length); entry2_->SetPostData(post_data); EXPECT_EQ(post_data, entry2_->GetPostData()); } // Test basic Clone behavior. TEST_F(NavigationEntryTest, NavigationEntryClone) { // Set some additional values. entry2_->SetTransitionType(ui::PAGE_TRANSITION_RELOAD); entry2_->set_should_replace_entry(true); std::unique_ptr<NavigationEntryImpl> clone(entry2_->Clone()); // Value from FrameNavigationEntry. EXPECT_EQ(entry2_->site_instance(), clone->site_instance()); // Value from constructor. EXPECT_EQ(entry2_->GetTitle(), clone->GetTitle()); // Value set after constructor. EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( clone->GetTransitionType(), entry2_->GetTransitionType())); // Value not copied due to ResetForCommit. EXPECT_NE(entry2_->should_replace_entry(), clone->should_replace_entry()); } // Test timestamps. TEST_F(NavigationEntryTest, NavigationEntryTimestamps) { EXPECT_EQ(base::Time(), entry1_->GetTimestamp()); const base::Time now = base::Time::Now(); entry1_->SetTimestamp(now); EXPECT_EQ(now, entry1_->GetTimestamp()); } // Test extra data stored in the navigation entry. TEST_F(NavigationEntryTest, NavigationEntryExtraData) { base::string16 test_data = ASCIIToUTF16("my search terms"); base::string16 output; entry1_->SetExtraData("search_terms", test_data); EXPECT_FALSE(entry1_->GetExtraData("non_existent_key", &output)); EXPECT_EQ(ASCIIToUTF16(""), output); EXPECT_TRUE(entry1_->GetExtraData("search_terms", &output)); EXPECT_EQ(test_data, output); // Data is cleared. entry1_->ClearExtraData("search_terms"); // Content in |output| is not modified if data is not present at the key. EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output)); EXPECT_EQ(test_data, output); // Using an empty string shows that the data is not present in the map. base::string16 output2; EXPECT_FALSE(entry1_->GetExtraData("search_terms", &output2)); EXPECT_EQ(ASCIIToUTF16(""), output2); } } // namespace content
[ "jacob-chen@iotwrt.com" ]
jacob-chen@iotwrt.com
b6640338c63bcd2ec54da2aaba0c67abc1ce9635
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/CMake/CMake-gumtree/Kitware_CMake_repos_basic_block_block_7528.cpp
e232a6d409f83ed535a6d7376873cb16bbb36d85
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
320
cpp
{ if (parser == NULL) return 0; if (parser->m_parentParser) return XML_SetHashSalt(parser->m_parentParser, hash_salt); /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return 0; hash_secret_salt = hash_salt; return 1; }
[ "993273596@qq.com" ]
993273596@qq.com
0683a1179ca983a981b21f5562ab5e18c00fcb95
edaadf9f9ee0192ceea5ab0e361d85d0bc7eca2d
/nclgl/Mesh.h
bfd166609a4c4dcddc0d3d8c93cad4d3b86614e6
[]
no_license
mmengelsgjerd/GraphicsCoursework
88f8f1d43ff4c036ed46443f31182493db36c3b4
1df5bc394dab56ef3ca7a8c1c5e14acbddfc721f
refs/heads/master
2020-04-06T23:35:37.891789
2018-11-23T12:02:31
2018-11-23T12:02:31
157,874,868
0
0
null
null
null
null
UTF-8
C++
false
false
2,148
h
#pragma once #include "OGLRenderer.h" enum MeshBuffer { VERTEX_BUFFER, COLOUR_BUFFER, TEXTURE_BUFFER, NORMAL_BUFFER, TANGENT_BUFFER, INDEX_BUFFER, MAX_BUFFER }; class Mesh { public: Mesh(void); ~Mesh(void); virtual void Draw(); static Mesh* GenerateTriangle(); static Mesh* GenerateHouse(); static Mesh* GenerateScreenQuad(float startX, float startY, float endX, float endY) { Mesh* m = new Mesh(); m->numVertices = 4; m->type = GL_TRIANGLE_STRIP; m->vertices = new Vector3[m->numVertices]; m->vertices[0] = Vector3(startX, startY, 0.0f); m->vertices[1] = Vector3(startX, endY, 0.0f); m->vertices[2] = Vector3(endX, startY, 0.0f); m->vertices[3] = Vector3(endX, endY, 0.0f); m->textureCoords = new Vector2[m->numVertices]; m->textureCoords[0] = Vector2(0.0f, 1.0f); m->textureCoords[1] = Vector2(0.0f, 0.0f); m->textureCoords[2] = Vector2(1.0f, 1.0f); m->textureCoords[3] = Vector2(1.0f, 0.0f); m->colours = new Vector4[m->numVertices]; m->normals = new Vector3[m->numVertices]; m->tangents = new Vector3[m->numVertices]; for (int i = 0; i < m->numVertices; i++) { m->colours[i] = Vector4(1.0f, 1.0f, 1.0f, 1.0f); m->normals[i] = Vector3(0.0f, 0.0f, -1.0f); m->tangents[i] = Vector3(1.0f, 0.0f, 0.0f); } m->BufferData(); return m; } //Tutorial 3 void SetTexture(GLuint tex) { texture = tex; } GLuint GetTexture() { return texture; } //Tutorial 4 static Mesh* GenerateQuad(); //Tutorial 12 void SetBumpMap(GLuint tex) { bumpTexture = tex; } GLuint GetBumpMap() { return bumpTexture; } protected: void BufferData(); GLuint arrayObject; GLuint bufferObject[MAX_BUFFER]; GLuint numVertices; GLuint type; Vector3* vertices; Vector4* colours; //Tutorial 3 GLuint texture; Vector2* textureCoords; //Tutorial 8 GLuint numIndices; unsigned int* indices; //Tutorial 11 void GenerateNormals(); Vector3* normals; //Tutorial 12 void GenerateTangents(); Vector3 GenerateTangent(const Vector3 &a, const Vector3 &b, const Vector3 &c, const Vector2 & ta, const Vector2 & tb, const Vector2 & tc); Vector3 * tangents; GLuint bumpTexture; };
[ "m.m.engelsgjerd2@newcastle.ac.uk" ]
m.m.engelsgjerd2@newcastle.ac.uk
9ce63b2c34aa88190057fa106d8c83f2a1da615b
b507b35a27caabed712685046c7ba813306ab8c8
/src/player.h
199b864bccc5332d07b474c6c3ee17d26ebc3de8
[]
no_license
tedajax/valix
ed834a2d967b549939a2a4e86e2e7b8e5d1674b2
a1cf3644718891cbf69d29cb8ac9103138b1b66a
refs/heads/master
2020-12-24T17:35:51.581434
2008-07-01T20:11:34
2008-07-01T20:11:34
35,700,618
0
0
null
null
null
null
UTF-8
C++
false
false
6,065
h
#include <math.h> //This class stores player statistics //as well as skills, experience, etc... class PlayerData { private: int level; //current experience level int totalexp; //Total exp ever gained int currentexp; //current exp for the current level int totalpoints; //total skillpoints ever gained int skillpoints; //skillpoints remaining after using skillpoints int rateoffire; //rate of fire measured in frames int bulletcount; //number of bullets to fire at one time, code automatically spaces them bool laser; //if false lasers destroyed on impact, else penetrate enemies float movespeed; //how quickly the player moves based on input int requiredexp; //required exp for next level //Checks for level up and adjusts level, exp, and skillpoints accordingly void levelUp() { //In case they get a lot of EXP we use a while loop while (currentexp > requiredexp) { //Wrap extra EXP around currentexp -= requiredexp; //Increase the level and skillpoints level += 1; skillpoints += 3; //Increase the required EXP requiredexp += level * 50; } } public: PlayerData() { level = 0; totalexp = 0; currentexp = 0; requiredexp = 50; skillpoints = 0; rateoffire = 20; bulletcount = 1; laser = false; movespeed = 3.0f; } ~PlayerData() { } //Series of accessors and mutators int getLevel() { return level; }; int getTotalExp() { return totalexp; }; int getCurrentExp() { return currentexp; }; int getRequiredExp() { return requiredexp; }; int getSkillPoints() { return skillpoints; }; int getRateOfFire() { return rateoffire; }; int getBulletCount() { return bulletcount; }; float getMoveSpeed() { return movespeed; }; bool getLaser() { return laser; }; void setLevel(int l) { level = l; }; //adjusts multiple values and potentially levelup void incExp(int e) { totalexp += e; currentexp += e; levelUp(); } void setSkillPoints(int sp) { skillpoints = sp; }; void setRateOfFire(int rof) { rateoffire = rof; }; void setBulletCount(int bc) { bulletcount = bc; }; void setLaser(bool la) { laser = la; }; void setMoveSpeed(float m) { movespeed = m; }; }; //Handles player updating, game logic, drawing, etc... class Player { private: //data storage class PlayerData data; //image for representing player SDL_Surface *shipimage; //Manages projectiles from the player ProjectileManager *ProjMngr; //For counting the frames between each shot //used to maintain rate of fire specified in player data class int framesSinceLastShot; //define position and velocity values float posx, posy; float velx, vely; //for checking input Uint8 *keystates; public: //Specify image filename Player(string imagefn) { //load image position player to left side of screen in the middle shipimage = load_image( imagefn ); posx = 5.0f, posy = 320.0f - 32.0f; velx = 0.0f, vely = 0.0f; keystates = SDL_GetKeyState( NULL ); ProjMngr = new ProjectileManager; framesSinceLastShot = data.getRateOfFire(); } ~Player() { delete ProjMngr; SDL_FreeSurface( shipimage ); } void Update() { //update inpute keystates = SDL_GetKeyState( NULL ); float velchange = data.getMoveSpeed(); float maxvel = data.getMoveSpeed(); velx *= 0.95f; vely *= 0.95f; //Simply change velocity based on key input if ( keystates[ SDLK_UP ] ) vely -= velchange; if ( keystates[ SDLK_DOWN ] ) vely += velchange; if ( keystates[ SDLK_LEFT ] ) velx -= velchange; if ( keystates[ SDLK_RIGHT ] ) velx += velchange; //Cap velocity if (velx > maxvel) velx = maxvel; if (velx < -maxvel) velx = -maxvel; if (vely > maxvel) vely = maxvel; if (vely < -maxvel) vely = -maxvel; //Adjust position based on velocity; posx += velx; posy += vely; //Boundaries if ( posx < 5 ) { posx = 5; velx = 0; } if ( posx > 640 - 133 ) { posx = 640 - 133; velx = 0; } if ( posy < 5 ) { posy = 5; vely = 0; } if ( posy > 480 - ( 32 + 69 ) ) { posy = 480 - ( 32 + 69 ); vely = 0; } //increase counter framesSinceLastShot++; //If shoot key (in this case z) and framessinchlastshot at the rate of fire //create a bullet launch it if ( keystates[ SDLK_z ] && framesSinceLastShot >= data.getRateOfFire() ) { int bposmult = 1; int xplus = 0; int yplus = 0; int distance = 0; int xdistance = -20; for ( int i = 0; i < data.getBulletCount(); i++ ) { //For determining how to position multiple lasers at once if ( data.getBulletCount() % 2 == 0 ) { distance = 18; xplus = (bposmult - 1) * xdistance; if ( i % 2 == 0 ) { yplus = -bposmult * distance; } else { yplus = bposmult * distance; bposmult++; } } else { distance = 20; if ( i == 0 ) { bposmult = 0; yplus = 0; } else if ( i % 2 == 1 ) { bposmult++; yplus = bposmult * distance; } else if ( i % 2 == 0 ) { yplus = -bposmult * distance; } xplus = (bposmult - 1) * xdistance; } //Add projectiles to the manager ProjMngr->AddProjectile( posx + 75 + xplus, posy + 18 + yplus, data.getLaser() ); data.incExp( 1 ); //testing exp bar } //reset the frame counter framesSinceLastShot = 0; } //Update the projectile manager ProjMngr->Update(); } void Draw( SDL_Surface *apply_s) { apply_surface( posx, posy, shipimage, apply_s ); ProjMngr->Draw( apply_s ); } float getPositionX() { return posx; } float getPositionY() { return posy; } int getProjectileCount() { return ProjMngr->getCount(); } //Gets percentage of exp for current level so a box can be drawn for the exp bar float getExpPercent() { return ( (float)data.getCurrentExp() / (float)data.getRequiredExp() ) * 100; } };
[ "ted.antidote@43c7a599-d050-0410-afa2-9d8075206d52" ]
ted.antidote@43c7a599-d050-0410-afa2-9d8075206d52
b54010f17232219871d9ad2099f423d44c6c4a57
a23b2110aa8eea65b9e435e4fd5ca1bbfac9fed7
/A. Is it rated - 2.cpp
9dd6a2ddae05f2b616306fbecd457c6be008ab9f
[]
no_license
sbswarna/CodeForces
abfd92738255557590e8a82b305876d6a48113f0
29a9099446be51201b0bd0d6402ccc8fe77056d7
refs/heads/main
2023-08-28T18:31:03.851047
2021-09-29T02:48:16
2021-09-29T02:48:16
348,233,677
0
0
null
null
null
null
UTF-8
C++
false
false
307
cpp
#include<bits/stdc++.h> using namespace std; string s; void F() { #ifndef ONLINE_JUDGE freopen("input.in", "r", stdin); freopen("output.in", "w", stdout); #endif } int main(int argc, char const *argv[]) { F(); while(getline(cin,s)) { cout<<"NO"<<endl; } return 0; }
[ "noreply@github.com" ]
noreply@github.com
e62a0f34ca6fb4508325b87efe965c0d11f38149
3cf9e141cc8fee9d490224741297d3eca3f5feff
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-12428.cpp
a4b4e7d2df0f516b4a82376d6f4271fd7d4be40a
[]
no_license
TeamVault/tauCFI
e0ac60b8106fc1bb9874adc515fc01672b775123
e677d8cc7acd0b1dd0ac0212ff8362fcd4178c10
refs/heads/master
2023-05-30T20:57:13.450360
2021-06-14T09:10:24
2021-06-14T09:10:24
154,563,655
0
1
null
null
null
null
UTF-8
C++
false
false
3,584
cpp
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 { bool active1; c1() : active1(true) {} virtual ~c1() { tester1(this); active1 = false; } virtual void f1(){} }; void __attribute__ ((noinline)) tester1(c1* p) { p->f1(); } struct c2; void __attribute__ ((noinline)) tester2(c2* p); struct c2 : virtual c1, virtual c0 { bool active2; c2() : active2(true) {} virtual ~c2() { tester2(this); c0 *p0_0 = (c0*)(c2*)(this); tester0(p0_0); c1 *p1_0 = (c1*)(c2*)(this); tester1(p1_0); active2 = false; } virtual void f2(){} }; void __attribute__ ((noinline)) tester2(c2* p) { p->f2(); if (p->active0) p->f0(); if (p->active1) p->f1(); } struct c3; void __attribute__ ((noinline)) tester3(c3* p); struct c3 : virtual c0, virtual c1, virtual c2 { bool active3; c3() : active3(true) {} virtual ~c3() { tester3(this); c0 *p0_0 = (c0*)(c3*)(this); tester0(p0_0); c0 *p0_1 = (c0*)(c2*)(c3*)(this); tester0(p0_1); c1 *p1_0 = (c1*)(c3*)(this); tester1(p1_0); c1 *p1_1 = (c1*)(c2*)(c3*)(this); tester1(p1_1); c2 *p2_0 = (c2*)(c3*)(this); tester2(p2_0); active3 = false; } virtual void f3(){} }; void __attribute__ ((noinline)) tester3(c3* p) { p->f3(); if (p->active0) p->f0(); if (p->active1) p->f1(); if (p->active2) p->f2(); } struct c4; void __attribute__ ((noinline)) tester4(c4* p); struct c4 : virtual c2, virtual c3, virtual c0 { bool active4; c4() : active4(true) {} virtual ~c4() { tester4(this); c0 *p0_0 = (c0*)(c2*)(c4*)(this); tester0(p0_0); c0 *p0_1 = (c0*)(c3*)(c4*)(this); tester0(p0_1); c0 *p0_2 = (c0*)(c2*)(c3*)(c4*)(this); tester0(p0_2); c0 *p0_3 = (c0*)(c4*)(this); tester0(p0_3); c1 *p1_0 = (c1*)(c2*)(c4*)(this); tester1(p1_0); c1 *p1_1 = (c1*)(c3*)(c4*)(this); tester1(p1_1); c1 *p1_2 = (c1*)(c2*)(c3*)(c4*)(this); tester1(p1_2); c2 *p2_0 = (c2*)(c4*)(this); tester2(p2_0); c2 *p2_1 = (c2*)(c3*)(c4*)(this); tester2(p2_1); c3 *p3_0 = (c3*)(c4*)(this); tester3(p3_0); active4 = false; } virtual void f4(){} }; void __attribute__ ((noinline)) tester4(c4* p) { p->f4(); if (p->active0) p->f0(); if (p->active1) p->f1(); if (p->active2) p->f2(); if (p->active3) p->f3(); } int __attribute__ ((noinline)) inc(int v) {return ++v;} int main() { c0* ptrs0[25]; ptrs0[0] = (c0*)(new c0()); ptrs0[1] = (c0*)(c2*)(new c2()); ptrs0[2] = (c0*)(c3*)(new c3()); ptrs0[3] = (c0*)(c2*)(c3*)(new c3()); ptrs0[4] = (c0*)(c2*)(c4*)(new c4()); ptrs0[5] = (c0*)(c3*)(c4*)(new c4()); ptrs0[6] = (c0*)(c2*)(c3*)(c4*)(new c4()); ptrs0[7] = (c0*)(c4*)(new c4()); for (int i=0;i<8;i=inc(i)) { tester0(ptrs0[i]); delete ptrs0[i]; } c1* ptrs1[25]; ptrs1[0] = (c1*)(new c1()); ptrs1[1] = (c1*)(c2*)(new c2()); ptrs1[2] = (c1*)(c3*)(new c3()); ptrs1[3] = (c1*)(c2*)(c3*)(new c3()); ptrs1[4] = (c1*)(c2*)(c4*)(new c4()); ptrs1[5] = (c1*)(c3*)(c4*)(new c4()); ptrs1[6] = (c1*)(c2*)(c3*)(c4*)(new c4()); for (int i=0;i<7;i=inc(i)) { tester1(ptrs1[i]); delete ptrs1[i]; } c2* ptrs2[25]; ptrs2[0] = (c2*)(new c2()); ptrs2[1] = (c2*)(c3*)(new c3()); ptrs2[2] = (c2*)(c4*)(new c4()); ptrs2[3] = (c2*)(c3*)(c4*)(new c4()); for (int i=0;i<4;i=inc(i)) { tester2(ptrs2[i]); delete ptrs2[i]; } c3* ptrs3[25]; ptrs3[0] = (c3*)(new c3()); ptrs3[1] = (c3*)(c4*)(new c4()); for (int i=0;i<2;i=inc(i)) { tester3(ptrs3[i]); delete ptrs3[i]; } c4* ptrs4[25]; ptrs4[0] = (c4*)(new c4()); for (int i=0;i<1;i=inc(i)) { tester4(ptrs4[i]); delete ptrs4[i]; } return 0; }
[ "ga72foq@mytum.de" ]
ga72foq@mytum.de
cac02c6584fe77d2a3fd44ab4c3c481cc73541eb
8ccb0f1f30f5867829acc6d4796b8c298c892af9
/Examples/14. SimpModelControlledSourcesAsym/stdafx.cpp
efda4a84cfab0b2b487bb3d74044803fb9c3afad
[ "MIT" ]
permissive
lasotek/PDDwithHOSC
ab535534535755cc1e69e0476430f7864969e930
92514c9f08b4626c900e6807e19f7ad7cd5272dd
refs/heads/master
2023-05-24T23:51:52.572798
2023-05-17T21:58:14
2023-05-17T21:58:14
326,828,225
1
0
null
null
null
null
UTF-8
C++
false
false
309
cpp
// stdafx.cpp : source file that includes just the standard includes // SimpModelControlledSourcesAsym.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
[ "lasotek@gmail.com" ]
lasotek@gmail.com
d8d3bca3f2605a40305cd5c7e79be36645e9afe9
04a77b65a2fabc7893b7af098fc1e3f52e043faf
/leet/leet/mergeKLists.cpp
fa4761da8d80fac95a81d6a41480711c13b4a6cb
[]
no_license
skeletao/leet
78cc524f53929a56ffec2b69f789b833a2f94e55
686e53234909a635f0ba85b31845f45f4ed3d06e
refs/heads/master
2021-01-19T19:17:42.758099
2018-07-05T02:38:29
2018-07-05T02:38:29
88,411,379
0
0
null
null
null
null
UTF-8
C++
false
false
1,002
cpp
#include <iostream> //Definition for singly-linked list. struct ListNode { int val; struct ListNode *next; }; struct ListNode* merge2Lists(struct ListNode *l1, struct ListNode *l2) { struct ListNode *head = (struct ListNode *)malloc(sizeof(struct ListNode)); struct ListNode *tmp = head; if (!l1) { return l2; } if (!l2) { return l1; } while (l1 && l2) { if (l1->val <= l2->val) { head->next = l1; head = head->next; l1 = l1->next; } else { head->next = l2; head = head->next; l2 = l2->next; } } head->next = l1 ? l1 : l2; return tmp->next; } struct ListNode* mergeKLists(struct ListNode** lists, int listsSize) { int i = 0; if (listsSize == 0) { return NULL; } if (listsSize == 1) { return *lists; } for (i = 0; i < listsSize / 2; i++) { *(lists + i) = merge2Lists(*(lists + i * 2), *(lists + i * 2 + 1)); } if (listsSize % 2) { *(lists + i) = *(lists + listsSize - 1); i++; } return mergeKLists(lists, i); }
[ "xiaotao.zhou@wdc.com" ]
xiaotao.zhou@wdc.com
1390199b98ef2c85a5aa4a75c551c854231638e7
7ee32ddb0cdfdf1993aa4967e1045790690d7089
/Codeforces/Yandex13ProductOfDifferent.cpp
c63626a402acda54377d611f3320bde8bcfd57a9
[]
no_license
ajimenezh/Programing-Contests
b9b91c31814875fd5544d63d7365b3fc20abd354
ad47d1f38b780de46997f16fbaa3338c9aca0e1a
refs/heads/master
2020-12-24T14:56:14.154367
2017-10-16T21:05:01
2017-10-16T21:05:01
11,746,917
1
2
null
null
null
null
UTF-8
C++
false
false
2,022
cpp
#include <iostream> #include <sstream> #include <vector> #include <string> #include <algorithm> #include <utility> #include <set> #include <map> #include <deque> #include <queue> #include <cmath> #include <cstdlib> #include <ctime> #include <cstdio> #include <stdio.h> using namespace std; #define fo(i,n) for(int i=0; i<(int)n; i++) #define rep(it,s) for(__typeof((s).begin()) it=(s).begin();it!=(s).end();it++) #define mp(a,b) make_pair(a,b) #define pb(x) push_back(x) #define pii pair<int,int> int pr[32000]; int c[32000]; int m; int all[100000]; int cnt; bool rec(int i, int k, int t) { if (i==m) return false; if (k==0) {all[cnt++] = t; return true;} if (c[i]>0) { bool done = rec(i+1,k-1,t*pr[i]); if (done) c[i]--; return done; } else return rec(i+1,k,t); } int main() { //freopen("input.txt","r",stdin); //freopen("output.txt","w",stdout); int n; cin>>n; m = 0; cnt = 0; for (int i=2; (long long)i*(long long)i<=n; i++) if (n%i==0) { int t = 0; while (n%i==0) { n /= i; t++; } pr[m] = i; c[m] = t; m++; } if (n!=1) { all[cnt++] = n; } for (int i=0; i<m; i++) { c[i]--; all[cnt++] = pr[i]; } for (int i=0; i<m; i++) { int k = 1; while (c[i]>0) { if (rec(i+1,k,pr[i])) c[i]--; else break; } } for (int i=0; i<m; i++) if (c[i]>0) { c[i]++; int j = 1; int t = pr[i]; while (true) { if (c[i]<j+j+1) { t = 1; for (int k=0; k<c[i]; k++) t *= pr[i]; c[i] = 0; all[cnt++] = t; } else { cnt -= j; j++; all[cnt++] = t; t *= pr[i]; } } } sort(all,all+cnt); cout<<cnt<<endl; for (int i=0; i<cnt; i++) cout<<all[i]<<" "; return 0; }
[ "alejandrojh90@gmail.com" ]
alejandrojh90@gmail.com
e658db010baff367ad823958487d375f545ff24f
e9f3aed4d520b7a2634ae6bd9467a5504dbbdfa2
/obj/MessageIdAckParser.hpp
2dce2fc560b51dce7ec32b2beaef69b2363c141d
[]
no_license
tfoerch/LMP
4b7e50f72796e96f8c40691c3cfab1c5c64f2ca9
b82e2665778e6d984f166ba2242add0f78cf4857
refs/heads/master
2021-01-01T03:48:57.646358
2018-12-18T22:01:17
2018-12-18T22:01:17
58,702,868
0
0
null
null
null
null
UTF-8
C++
false
false
1,683
hpp
#ifndef LMP_OBJ_MESSAGE_ID_ACK_PARSER_HPP_ #define LMP_OBJ_MESSAGE_ID_ACK_PARSER_HPP_ /* * MessageIdAckParser.hpp * * Created on: 28.02.2015 * Author: tom */ #include "obj/MessageIdAckAst.hpp" #ifdef USE_SPIRIT_X3_PARSER #include <boost/spirit/home/x3/support/traits/is_variant.hpp> #include <boost/spirit/home/x3/support/traits/tuple_traits.hpp> #include <boost/spirit/home/x3/nonterminal/rule.hpp> #else #include "obj/ObjectHeaderParser.hpp" #include <boost/spirit/include/qi.hpp> #endif /* USE_SPIRIT_X3_PARSER */ namespace lmp { namespace obj { namespace parser { #ifdef USE_SPIRIT_X3_PARSER namespace x3 = boost::spirit::x3; struct message_id_ack_class; typedef x3::rule<message_id_ack_class, msgid::ast::MessageIdAck> message_id_ack_type; BOOST_SPIRIT_DECLARE(message_id_ack_type); #else namespace qi = boost::spirit::qi; template <typename Iterator> struct message_id_ack_grammar : qi::grammar<Iterator, msgid::ast::MessageIdAck()> { message_id_ack_grammar(); lmp::obj::parser::object_header_fix_length_grammar<Iterator, msgid::ClassType, msgid::ClassType::MessageIdAck> object_header; qi::rule<Iterator, msgid::ast::MessageIdAck()> message_id_ack_rule; }; #endif /* USE_SPIRIT_X3_PARSER */ } #ifdef USE_SPIRIT_X3_PARSER parser::message_id_ack_type const& message_id_ack(); #endif /* USE_SPIRIT_X3_PARSER */ } // namespace obj } // namespace lmp #endif /* LMP_OBJ_MESSAGE_ID_ACK_PARSER_HPP_ */
[ "thomas@tfoerch.de" ]
thomas@tfoerch.de
f1ddb0955aa6841cc43fff5c9ac931f51729e309
d45e1368de00b28f91e835cb58a3f066ecb1b17a
/CodeForces/707-D2-D.cpp
dca44289abcf709e1416b5afa2c6305418498895
[]
no_license
OmarElsaeed/competitive-programming-
f6736b173766c2f6700db741fc602d8e89340573
62f735d3a50e9687e8d526cfd804c0efbcf9f361
refs/heads/master
2021-05-17T16:12:42.794546
2020-03-23T20:14:13
2020-03-23T20:14:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,776
cpp
#include <bits/stdc++.h> using namespace std; const int N=(1<<20); struct node; node* emp; struct node { int sum,lazy; node *l,*r; node() { l=r=this; sum=0; lazy=0; } node(int ss,node* lf=emp,node* rt=emp,int lz=0) { l=lf; r=rt; sum=ss; lazy=lz; } }; node* build(int s,int e) { if(s==e) return new node(0); int mid=s+((e-s)>>1); node* l=build(s,mid); node* r=build(mid+1,e); return new node(l->sum+r->sum,l,r); } node* update(node* cur,int s,int e,int n,int val) { if(cur->lazy) { cur->sum=(e-s+1)-cur->sum; if(s!=e) { cur->l=new node(cur->l->sum,cur->l->l,cur->l->r,cur->l->lazy ^1); cur->r=new node(cur->r->sum,cur->r->l,cur->r->r,cur->r->lazy ^1); } cur->lazy=0; } if(n<s||n>e) return cur; if(s==e) return new node(val); int mid=s+((e-s)>>1); node* l=update(cur->l,s,mid,n,val); node* r=update(cur->r,mid+1,e,n,val); return new node(l->sum+r->sum,l,r); } node* updateRange(node* cur,int s,int e,int x,int y) { if(cur->lazy) { cur->sum=(e-s+1)-cur->sum; if(s!=e) { cur->l=new node(cur->l->sum,cur->l->l,cur->l->r,cur->l->lazy^1); cur->r=new node(cur->r->sum,cur->r->l,cur->r->r,cur->r->lazy^1); } cur->lazy=0; } if(s>y||e<x) return cur; if(s>=x&&e<=y) { node* n=new node(cur->sum,cur->l,cur->r); n->lazy ^=1; if(n->lazy) { n->sum=(e-s+1)-n->sum; if(s!=e) { n->l=new node(n->l->sum,n->l->l,n->l->r,n->l->lazy^1); n->r=new node(n->r->sum,n->r->l,n->r->r,n->r->lazy^1); } n->lazy=0; } return n; } int mid=s+((e-s)>>1); node* l=updateRange(cur->l,s,mid,x,y); node* r=updateRange(cur->r,mid+1,e,x,y); return new node(l->sum+r->sum,l,r); } node* nd[100005]; int main() { int n,m,q,t,a,b; cin>>n>>m>>q; emp=new node; nd[0]=build(1,N); for(int i=1; i<=q; i++) { cin>>t; if(t==1) { cin>>a>>b; nd[i]=update(nd[i-1],1,N,(a-1)*m+b,1); cout<<nd[i]->sum<<endl; } else if(t==2) { cin>>a>>b; nd[i]=update(nd[i-1],1,N,(a-1)*m+b,0); cout<<nd[i]->sum<<endl; } else if(t==3) { cin>>a; nd[i]=updateRange(nd[i-1],1,N,(a-1)*m+1,a*m); cout<<nd[i]->sum<<endl; } else { cin>>a; nd[i]=nd[a]; cout<<nd[i]->sum<<endl; } } return 0; }
[ "noreply@github.com" ]
noreply@github.com
0fa9f7cabbbb2457955bd94385d69a1bc73b5435
acae644df7091d09e82d42ab35ed2ce21168bc62
/CreationOfDungeon_master/cd_666s/TilebaseAI/ParameterRiser.cpp
fe4a0ab6731bef84ca79266f1ef5cd0a36955fed
[]
no_license
NortonGitHub/Creation_of_dungeon
891b89447d4f61d80691008c991434c9da8c728c
621ce6592596c0a99efa213c1e6490ef00cf0e68
refs/heads/master
2020-04-06T04:29:15.092955
2018-03-23T21:11:00
2018-03-23T21:11:00
73,819,317
0
1
null
null
null
null
SHIFT_JIS
C++
false
false
756
cpp
#include "ParameterRiser.h" #include "../DebugDraw.h" ParameterRiser::ParameterRiser(BattleParameter addedParameter, int count, bool isPositive) : ParameterEffecter(count, isPositive) , _addedParameter(std::move(addedParameter)) { } ParameterRiser::~ParameterRiser() { } //対象に効果を付与 void ParameterRiser::AffectParameter(BattleParameter& param) { param += _addedParameter; } // MEMO : バフの表現方法が決まるまでのデバッグ表示 void ParameterRiser::DrawEffecter(Vector2D anchorPos) { Debug::DrawCircle(anchorPos, 16, ColorPalette::BLACK4, false); if (IsPositive()) Debug::DrawString(anchorPos - Vector2D(8, 8), "P+"); else Debug::DrawString(anchorPos - Vector2D(8, 8), "P-"); }
[ "1k9k1n@gmail.com" ]
1k9k1n@gmail.com
f6b3e1011901ec60b7fe4b9832a96bd37576fdf5
69dd4bd4268e1c361d8b8d95f56b5b3f5264cc96
/GPU Pro5/06_Compute/Object-order Ray Tracing for Fully Dynamic Scenes/beMath/header/beMath/beVector.h
37ab3a7df3f8525002a67d2897c9b6e60818d969
[ "MIT", "BSD-3-Clause" ]
permissive
AnabaenaQing/Source-Code_ShaderX_GPU-Pro_GPU-Zen
65c16710d1abb9207fd7e1116290336a64ddfc86
f442622273c6c18da36b61906ec9acff3366a790
refs/heads/master
2022-12-15T00:40:42.931271
2020-09-07T16:48:25
2020-09-07T16:48:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,932
h
/*****************************************************/ /* breeze Engine Math Module (c) Tobias Zirr 2011 */ /*****************************************************/ #pragma once #ifndef BE_MATH_VECTOR #define BE_MATH_VECTOR #include "beMath.h" #include "beVectorDef.h" #include <cmath> namespace beMath { /// Computes the dot product of the given two vectors. template <class LeftClass, class RightClass, class Component, size_t Dimension> LEAN_INLINE Component dot(const tuple<LeftClass, Component, Dimension> &left, const tuple<RightClass, Component, Dimension> &right) { Component scalar(0); for (size_t i = 0; i < Dimension; ++i) scalar += left[i] * right[i]; return scalar; } /// Reflects the given vector on the given normalized axis. template <class Class, class Component, size_t Dimension> LEAN_INLINE vector<Component, 3> reflect(const tuple<Class, Component, Dimension> &vec, const tuple<Class, Component, Dimension> &axis) { return vec - 2.0f * dot(vec, axis) * axis; } /// Flattens the given vector on the given normalized axis. template <class Class, class Component, size_t Dimension> LEAN_INLINE vector<Component, 3> flatten(const tuple<Class, Component, Dimension> &vec, const tuple<Class, Component, Dimension> &axis) { return vec - dot(vec, axis) * axis; } /// Computes the squared length of the given vector. template <class Class, class Component, size_t Dimension> LEAN_INLINE Component lengthSq(const tuple<Class, Component, Dimension> &vector) { return dot(vector, vector); } /// Computes the length of the given vector. template <class Class, class Component, size_t Dimension> inline Component length(const tuple<Class, Component, Dimension> &vector) { using std::sqrt; return Component( sqrt( lengthSq(vector) ) ); } /// Computes the squared distance between the given two vectors. template <class LeftClass, class RightClass, class Component, size_t Dimension> LEAN_INLINE Component distSq(const tuple<LeftClass, Component, Dimension> &left, const tuple<RightClass, Component, Dimension> &right) { return lengthSq(left - right); } /// Computes the distance between the given two vectors. template <class LeftClass, class RightClass, class Component, size_t Dimension> LEAN_INLINE Component dist(const tuple<LeftClass, Component, Dimension> &left, const tuple<RightClass, Component, Dimension> &right) { return length(left - right); } /// Normalizes the given vector. template <class Class, class Component, size_t Dimension> inline Class normalize(const tuple<Class, Component, Dimension> &vector) { return vector * (Component(1) / length(vector)); } /// Computes the cross product of the given two vectors. template <class LeftClass, class RightClass, class Component> LEAN_INLINE vector<Component, 3> cross(const tuple<LeftClass, Component, 3> &left, const tuple<RightClass, Component, 3> &right) { vector<Component, 3> result(uninitialized); result[0] = left[1] * right[2] - left[2] * right[1]; result[1] = left[2] * right[0] - left[0] * right[2]; result[2] = left[0] * right[1] - left[1] * right[0]; return result; } /// Constructs the n-th unit vector. template <size_t Dimension, class Element> LEAN_INLINE vector<Element, Dimension> unit(size_t n) { vector<Element, Dimension> result; result[n] = Element(1); return result; } /// Sets the n-th component to the given value and all other components to zero. template <size_t Dimension, class Element> LEAN_INLINE vector<Element, Dimension> nvec(size_t n, Element value) { vector<Element, Dimension> result; result[n] = value; return result; } /// Generates a perpendicular vector. template <class Class, class Component> inline vector<Component, 3> perpendicular(const tuple<Class, Component, 3> &vector) { return cross( unit<3, float>(abs(vector[0]) > abs(vector[1])) , vector ); } namespace Types { using beMath::nvec; using beMath::unit; } // namespace } // namespace #endif
[ "IRONKAGE@gmail.com" ]
IRONKAGE@gmail.com
c217618210810f42cff9c15ca624a2408e6e4f39
faaed090e065a2082735708df37fdc80b05a9139
/信安综合实验_RC4/RC4/.history/RC4x1_20190719160551.cpp
dc70a467080cf8d94506af77e4385fccae467573
[]
no_license
X-I-N/UESTC_Courseware
11097e208682743c2c4b272d52c6e28905bd69df
3a1bc18e3d20b8b9928f130f942c7c71aedacdab
refs/heads/master
2022-12-11T01:49:13.697519
2020-09-07T12:32:34
2020-09-07T12:32:34
293,510,724
0
0
null
2020-09-07T11:37:14
2020-09-07T11:37:13
null
UTF-8
C++
false
false
3,299
cpp
#include <algorithm> #include <array> #include <cstring> #include <fstream> #include <iostream> #include <string> #include <vector> using namespace std; class RC4 { public: explicit RC4(void){}; void reset(const vector<uint8_t> &key, size_t len); void crypt(const vector<uint8_t> &in, vector<uint8_t> &out, size_t len); ~RC4(void){}; private: array<uint8_t, 256> sbox; uint8_t idx1; uint8_t idx2; }; void RC4::reset(const vector<uint8_t> &key, size_t len) { uint8_t j = 0; for (auto i = 0; i < sbox.size(); i++) sbox[i] = i; idx1 = 0; idx2 = 0; for (auto i = 0; i < sbox.size(); i++) { j += sbox[i] + key[i % len]; swap(sbox[i], sbox[j]); } } void RC4::crypt(const vector<uint8_t> &in, vector<uint8_t> &out, size_t len) { uint8_t j = 0; for (auto i = 0; i < len; i++) { idx1++; idx2 += sbox[idx1]; swap(sbox[idx1], sbox[idx2]); j = sbox[idx1] + sbox[idx2]; out[i] = in[i] ^ sbox[j]; } } stdvector<char> readPlain(const char *filepath) { FILE *file = fopen(filepath, "r"); vector<char> result; if (file != nullptr) { cout << "Reading file..." << endl; char a_char; while (!feof(file)) { fscanf(file, "%c", &a_char); result.emplace_back(a_char); } result.erase(result.end() - 1); } else { cout << "File not exist." << endl; } return result; } std::vector<char> readCiphertext(const char *filepath, int *len) { std::vector<char> cipher = readPlain(filepath); std::vector<char> res; int temp = 0, count = 0; for (int i = 0; i < cipher.size(); i++) { if (cipher[i] != ' ') { temp = temp * 10 + (cipher[i] - 48); } else { auto ch = (unsigned char)temp; count++; temp = 0; res.push_back(ch); } } *len = count; return res; } void writeCiphertext(vector<int> msg, const char *filepath) { ofstream outstream; outstream.open(filepath); for (auto i : msg) outstream << i << " "; outstream.close(); } void writePlaintext(vector<uint8_t> msg, const char *filepath) { ofstream outstream; outstream.open(filepath); for (auto i : msg) outstream << i; outstream.close(); } int main(int argc, char **argv) { if (argc != 4) { cout << "Usage: " << argv[0] << "<options> <filepath> <key>" << endl; return 1; } int msglen; auto option = string(argv[1]); auto filepath = argv[2]; auto keylen = string(argv[3]).length(); std::vector<char> buffer; if (option == "-en") { buffer = readPlain(filepath); msglen = buffer.size(); } else if (option == "-de") { buffer = readCiphertext(filepath, &msglen); cout << endl; } else { cout << "invaliate argument" << endl; return 1; } RC4 rc4; vector<uint8_t> key(keylen, 0), msg(msglen, 0); key.assign(argv[3], argv[3] + keylen); msg.assign(buffer.begin(), buffer.begin() + msglen); rc4.reset(key, keylen); rc4.crypt(msg, msg, msglen); cout << "message: " << endl; for_each(msg.begin(), msg.end(), [](uint8_t i) { cout << i; }); cout << endl; if (option == "-en") { vector<int> msgCode; for (auto i : msg) msgCode.push_back(i); writeCiphertext(msgCode, filepath); } else { vector<uint8_t> msgRes; for (auto i : msg) msgRes.push_back(i); writePlaintext(msgRes, filepath); } return 0; }
[ "653169329@qq.com" ]
653169329@qq.com
d0d3324e2ea6ad936124e5d35f49cda8ee10749f
53f888ec986a066fdc423279d0b0cfaa36ef25e8
/208 implement trie.cpp
dc91f57587518ed0182f48ffaa195ea16e11415e
[]
no_license
Sanchit011/leetcode
1efd40a370c6c69a9e1d54ffef8717f395f77dc4
82fb22fed35a934400d051e9b2e5ee0a8885456e
refs/heads/main
2023-08-13T23:34:48.775217
2021-10-01T13:51:58
2021-10-01T13:51:58
385,250,394
1
0
null
null
null
null
UTF-8
C++
false
false
1,267
cpp
class Trie { public: /** Initialize your data structure here. */ struct Trie* child[26] = {}; bool isEnd = false; Trie() {} /** Inserts a word into the trie. */ void insert(string word) { Trie* node = this; for(char c : word){ int x = c - 'a'; if(!node->child[x]) node->child[x] = new Trie(); node = node->child[x]; } node->isEnd = true; } /** Returns if the word is in the trie. */ bool search(string word) { Trie* node = this; for(char c : word){ int x = c - 'a'; if(!node->child[x]) return false; node = node->child[x]; } return node->isEnd; } /** Returns if there is any word in the trie that starts with the given prefix. */ bool startsWith(string prefix) { Trie* node = this; for(char c : prefix){ int x = c - 'a'; if(!node->child[x]) return false; node = node->child[x]; } return true; } }; /** * Your Trie object will be instantiated and called as such: * Trie* obj = new Trie(); * obj->insert(word); * bool param_2 = obj->search(word); * bool param_3 = obj->startsWith(prefix); */
[ "sanchit4242@gmail.com" ]
sanchit4242@gmail.com
40cf0e50895a4960ac955258ab24cf09e25f5b5f
89297bed526cd8a4718c6cf9ecbc5ddccea6b9cf
/WestWorld2/WestWorld2/MessageDispatcher.cpp
fd680bf58a8b517a5d76d5c20f6719f684a3d762
[]
no_license
wikty/AI-for-Game
bd644e7e49d01fdbb28645b7ac0f4d171e0c4ef9
e34c4c7aa50aa97ff0fe3c4aa71228ccf381ec4d
refs/heads/master
2018-12-12T01:13:56.007853
2018-09-13T03:59:36
2018-09-13T03:59:36
38,520,598
0
0
null
null
null
null
UTF-8
C++
false
false
2,559
cpp
#include"MessageDispatcher.h" #include"CrudeTimer.h" #include"BaseGameEntity.h" #include"EntityManager.h" #include"Locations.h" #include"MessageTypes.h" #include"EntityNames.h" #include<iostream> using std::cout; using std::set; #ifdef TEXTOUTPUT #include<fstream> extern std::ofstream os; #define cout os #endif MessageDispatcher* MessageDispatcher::Instance(){ static MessageDispatcher instance; return &instance; } void MessageDispatcher::Discharge(BaseGameEntity* pReceiver, const Telegram& msg){ if(!pReceiver->HandleMessage(msg)){ // telegram could not be handle cout << "Message not handled"; } } void MessageDispatcher::DispatchMessage(double delay, int sender, int receiver, int msg, void* info){ SetTextColor(BACKGROUND_RED|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); BaseGameEntity* pSender = EntityMgr->GetEntityByID(sender); BaseGameEntity* pReceiver = EntityMgr->GetEntityByID(receiver); if(pReceiver == NULL){ cout << "\nWarning! No Receiver with ID of" << receiver << " found"; return; } Telegram telegram(0, sender, receiver, msg, info); if(delay <= 0.0f){ cout << "\nInstant telegram dispatched at time: " << Clock->GetCurrentTime() << " by " << GetNameOfEntity(pSender->ID()) << " for " << GetNameOfEntity(pReceiver->ID()) << ". Message is: " << MsgToStr(msg); Discharge(pReceiver, telegram); } else{ double CurrentTime = Clock->GetCurrentTime(); telegram.DispatchTime = CurrentTime + delay; PriorityQ.insert(telegram); cout << "\nDelayed telegram from " << GetNameOfEntity(pSender->ID()) << " recorded at time " << Clock->GetCurrentTime() << " for " << GetNameOfEntity(pReceiver->ID()) << ". Message is: " << MsgToStr(msg); } } // this function dispatches any telegrams with a timestamp that has // expired, any dispatched telegrams are removed from the priority queue void MessageDispatcher::DispatchDelayedMessages(){ SetTextColor(BACKGROUND_RED|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); double CurrentTime = Clock->GetCurrentTime(); while(!PriorityQ.empty() && (PriorityQ.begin()->DispatchTime < CurrentTime) && (PriorityQ.begin()->DispatchTime > 0)){ const Telegram& telegram = *PriorityQ.begin(); BaseGameEntity* pReceiver = EntityMgr->GetEntityByID(telegram.Receiver); cout << "\nQueued telegram read for dispatch: Sent to " << GetNameOfEntity(pReceiver->ID()) << ". Message is: " << MsgToStr(telegram.Msg); Discharge(pReceiver, telegram); PriorityQ.erase(PriorityQ.begin()); } }
[ "wiktymouse@gmail.com" ]
wiktymouse@gmail.com
cc48ce0b815f140191e0cad56e3578ee3afe7486
74a5e46255a201621764c4972883be9f5f719ee2
/CSES DP Solutions/EditDistance.cpp
a8a9b2cd9efc94a0e9336ecd299b9db9ab5eb640
[]
no_license
UdoiGogoi-github12345/CSES-DP-SOLUTIONS
f242f3152a98b8a4c2db829f1f530c8c74d43058
350f47fddfa117f1dd65544db2b475d0336bebbd
refs/heads/main
2023-03-22T20:40:42.081597
2021-03-14T15:52:23
2021-03-14T15:52:23
347,680,188
1
0
null
null
null
null
UTF-8
C++
false
false
1,099
cpp
#define ONLINE_JUDGE #include<bits/stdc++.h> #include<iomanip> using namespace std; #define ll long long #define ld long double #define dairymilk6969 ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define all(a) a.begin(),a.end() #define pb push_back const ll INF = 1e18 ; const ll N = 2e5 + 7; const int mod = 1e9 + 7; ll ed(str s1,str s2,ll n,ll m){ ll dp[n+1][m+1]; for(ll i=0;i<=n;i++) dp[i][0]=i; for(ll j=0;j<=m;j++) dp[0][j]=j; for(ll i=1;i<=n;i++){ for(ll j=1;j<=m;j++){ if(s1[i-1]==s2[j-1]) dp[i][j]=dp[i-1][j-1]; else dp[i][j]=1+min({dp[i-1][j],dp[i][j-1],dp[i-1][j-1]}); } } return dp[n][m]; } void solve(){ str a; str b; cin>>a; cin>>b; ll n=a.length(); ll m=b.length(); ll ans=ed(a,b,n,m); cout<<ans<<nl; } int main() { dairymilk6969 #ifndef ONLINE_JUDGE freopen("inputf.in", "r", stdin); freopen("outputf.in", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); ll t=1; //cin>>t; while(t--){ solve(); } }
[ "noreply@github.com" ]
noreply@github.com
3a11245043dac066748e0234f9c6a7dea0f1588f
ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c
/out/release/clang_x86_v8_arm/gen/v8/torque-generated/src/builtins/typed-array-findindex-tq-csa.cc
396a086405d651583f27b4c340e4f0c56b0cc5e3
[ "BSD-3-Clause" ]
permissive
xueqiya/chromium_src
5d20b4d3a2a0251c063a7fb9952195cda6d29e34
d4aa7a8f0e07cfaa448fcad8c12b29242a615103
refs/heads/main
2022-07-30T03:15:14.818330
2021-01-16T16:47:22
2021-01-16T16:47:22
330,115,551
1
0
null
null
null
null
UTF-8
C++
false
false
28,216
cc
#include "src/builtins/builtins-array-gen.h" #include "src/builtins/builtins-bigint-gen.h" #include "src/builtins/builtins-collections-gen.h" #include "src/builtins/builtins-constructor-gen.h" #include "src/builtins/builtins-data-view-gen.h" #include "src/builtins/builtins-iterator-gen.h" #include "src/builtins/builtins-promise-gen.h" #include "src/builtins/builtins-promise.h" #include "src/builtins/builtins-proxy-gen.h" #include "src/builtins/builtins-regexp-gen.h" #include "src/builtins/builtins-string-gen.h" #include "src/builtins/builtins-typed-array-gen.h" #include "src/builtins/builtins-utils-gen.h" #include "src/builtins/builtins.h" #include "src/codegen/code-factory.h" #include "src/heap/factory-inl.h" #include "src/objects/arguments.h" #include "src/objects/bigint.h" #include "src/objects/elements-kind.h" #include "src/objects/free-space.h" #include "src/objects/js-break-iterator.h" #include "src/objects/js-collator.h" #include "src/objects/js-date-time-format.h" #include "src/objects/js-display-names.h" #include "src/objects/js-generator.h" #include "src/objects/js-list-format.h" #include "src/objects/js-locale.h" #include "src/objects/js-number-format.h" #include "src/objects/js-objects.h" #include "src/objects/js-plural-rules.h" #include "src/objects/js-promise.h" #include "src/objects/js-regexp-string-iterator.h" #include "src/objects/js-relative-time-format.h" #include "src/objects/js-segment-iterator.h" #include "src/objects/js-segmenter.h" #include "src/objects/js-weak-refs.h" #include "src/objects/objects.h" #include "src/objects/ordered-hash-table.h" #include "src/objects/property-array.h" #include "src/objects/property-descriptor-object.h" #include "src/objects/source-text-module.h" #include "src/objects/stack-frame-info.h" #include "src/objects/synthetic-module.h" #include "src/objects/template-objects.h" #include "src/torque/runtime-support.h" #include "torque-generated/src/builtins/array-copywithin-tq-csa.h" #include "torque-generated/src/builtins/array-every-tq-csa.h" #include "torque-generated/src/builtins/array-filter-tq-csa.h" #include "torque-generated/src/builtins/array-find-tq-csa.h" #include "torque-generated/src/builtins/array-findindex-tq-csa.h" #include "torque-generated/src/builtins/array-foreach-tq-csa.h" #include "torque-generated/src/builtins/array-from-tq-csa.h" #include "torque-generated/src/builtins/array-isarray-tq-csa.h" #include "torque-generated/src/builtins/array-join-tq-csa.h" #include "torque-generated/src/builtins/array-lastindexof-tq-csa.h" #include "torque-generated/src/builtins/array-map-tq-csa.h" #include "torque-generated/src/builtins/array-of-tq-csa.h" #include "torque-generated/src/builtins/array-reduce-right-tq-csa.h" #include "torque-generated/src/builtins/array-reduce-tq-csa.h" #include "torque-generated/src/builtins/array-reverse-tq-csa.h" #include "torque-generated/src/builtins/array-shift-tq-csa.h" #include "torque-generated/src/builtins/array-slice-tq-csa.h" #include "torque-generated/src/builtins/array-some-tq-csa.h" #include "torque-generated/src/builtins/array-splice-tq-csa.h" #include "torque-generated/src/builtins/array-unshift-tq-csa.h" #include "torque-generated/src/builtins/array-tq-csa.h" #include "torque-generated/src/builtins/base-tq-csa.h" #include "torque-generated/src/builtins/bigint-tq-csa.h" #include "torque-generated/src/builtins/boolean-tq-csa.h" #include "torque-generated/src/builtins/builtins-string-tq-csa.h" #include "torque-generated/src/builtins/collections-tq-csa.h" #include "torque-generated/src/builtins/cast-tq-csa.h" #include "torque-generated/src/builtins/convert-tq-csa.h" #include "torque-generated/src/builtins/console-tq-csa.h" #include "torque-generated/src/builtins/data-view-tq-csa.h" #include "torque-generated/src/builtins/frames-tq-csa.h" #include "torque-generated/src/builtins/frame-arguments-tq-csa.h" #include "torque-generated/src/builtins/growable-fixed-array-tq-csa.h" #include "torque-generated/src/builtins/internal-coverage-tq-csa.h" #include "torque-generated/src/builtins/iterator-tq-csa.h" #include "torque-generated/src/builtins/math-tq-csa.h" #include "torque-generated/src/builtins/number-tq-csa.h" #include "torque-generated/src/builtins/object-fromentries-tq-csa.h" #include "torque-generated/src/builtins/object-tq-csa.h" #include "torque-generated/src/builtins/promise-abstract-operations-tq-csa.h" #include "torque-generated/src/builtins/promise-all-tq-csa.h" #include "torque-generated/src/builtins/promise-all-element-closure-tq-csa.h" #include "torque-generated/src/builtins/promise-constructor-tq-csa.h" #include "torque-generated/src/builtins/promise-finally-tq-csa.h" #include "torque-generated/src/builtins/promise-misc-tq-csa.h" #include "torque-generated/src/builtins/promise-race-tq-csa.h" #include "torque-generated/src/builtins/promise-reaction-job-tq-csa.h" #include "torque-generated/src/builtins/promise-resolve-tq-csa.h" #include "torque-generated/src/builtins/promise-then-tq-csa.h" #include "torque-generated/src/builtins/promise-jobs-tq-csa.h" #include "torque-generated/src/builtins/proxy-constructor-tq-csa.h" #include "torque-generated/src/builtins/proxy-delete-property-tq-csa.h" #include "torque-generated/src/builtins/proxy-get-property-tq-csa.h" #include "torque-generated/src/builtins/proxy-get-prototype-of-tq-csa.h" #include "torque-generated/src/builtins/proxy-has-property-tq-csa.h" #include "torque-generated/src/builtins/proxy-is-extensible-tq-csa.h" #include "torque-generated/src/builtins/proxy-prevent-extensions-tq-csa.h" #include "torque-generated/src/builtins/proxy-revocable-tq-csa.h" #include "torque-generated/src/builtins/proxy-revoke-tq-csa.h" #include "torque-generated/src/builtins/proxy-set-property-tq-csa.h" #include "torque-generated/src/builtins/proxy-set-prototype-of-tq-csa.h" #include "torque-generated/src/builtins/proxy-tq-csa.h" #include "torque-generated/src/builtins/reflect-tq-csa.h" #include "torque-generated/src/builtins/regexp-exec-tq-csa.h" #include "torque-generated/src/builtins/regexp-match-all-tq-csa.h" #include "torque-generated/src/builtins/regexp-match-tq-csa.h" #include "torque-generated/src/builtins/regexp-replace-tq-csa.h" #include "torque-generated/src/builtins/regexp-search-tq-csa.h" #include "torque-generated/src/builtins/regexp-source-tq-csa.h" #include "torque-generated/src/builtins/regexp-split-tq-csa.h" #include "torque-generated/src/builtins/regexp-test-tq-csa.h" #include "torque-generated/src/builtins/regexp-tq-csa.h" #include "torque-generated/src/builtins/string-endswith-tq-csa.h" #include "torque-generated/src/builtins/string-html-tq-csa.h" #include "torque-generated/src/builtins/string-iterator-tq-csa.h" #include "torque-generated/src/builtins/string-pad-tq-csa.h" #include "torque-generated/src/builtins/string-repeat-tq-csa.h" #include "torque-generated/src/builtins/string-replaceall-tq-csa.h" #include "torque-generated/src/builtins/string-slice-tq-csa.h" #include "torque-generated/src/builtins/string-startswith-tq-csa.h" #include "torque-generated/src/builtins/string-substring-tq-csa.h" #include "torque-generated/src/builtins/string-substr-tq-csa.h" #include "torque-generated/src/builtins/symbol-tq-csa.h" #include "torque-generated/src/builtins/torque-internal-tq-csa.h" #include "torque-generated/src/builtins/typed-array-createtypedarray-tq-csa.h" #include "torque-generated/src/builtins/typed-array-every-tq-csa.h" #include "torque-generated/src/builtins/typed-array-filter-tq-csa.h" #include "torque-generated/src/builtins/typed-array-find-tq-csa.h" #include "torque-generated/src/builtins/typed-array-findindex-tq-csa.h" #include "torque-generated/src/builtins/typed-array-foreach-tq-csa.h" #include "torque-generated/src/builtins/typed-array-from-tq-csa.h" #include "torque-generated/src/builtins/typed-array-of-tq-csa.h" #include "torque-generated/src/builtins/typed-array-reduce-tq-csa.h" #include "torque-generated/src/builtins/typed-array-reduceright-tq-csa.h" #include "torque-generated/src/builtins/typed-array-set-tq-csa.h" #include "torque-generated/src/builtins/typed-array-slice-tq-csa.h" #include "torque-generated/src/builtins/typed-array-some-tq-csa.h" #include "torque-generated/src/builtins/typed-array-sort-tq-csa.h" #include "torque-generated/src/builtins/typed-array-subarray-tq-csa.h" #include "torque-generated/src/builtins/typed-array-tq-csa.h" #include "torque-generated/src/ic/handler-configuration-tq-csa.h" #include "torque-generated/src/objects/allocation-site-tq-csa.h" #include "torque-generated/src/objects/api-callbacks-tq-csa.h" #include "torque-generated/src/objects/arguments-tq-csa.h" #include "torque-generated/src/objects/cell-tq-csa.h" #include "torque-generated/src/objects/code-tq-csa.h" #include "torque-generated/src/objects/contexts-tq-csa.h" #include "torque-generated/src/objects/data-handler-tq-csa.h" #include "torque-generated/src/objects/debug-objects-tq-csa.h" #include "torque-generated/src/objects/descriptor-array-tq-csa.h" #include "torque-generated/src/objects/embedder-data-array-tq-csa.h" #include "torque-generated/src/objects/feedback-cell-tq-csa.h" #include "torque-generated/src/objects/feedback-vector-tq-csa.h" #include "torque-generated/src/objects/fixed-array-tq-csa.h" #include "torque-generated/src/objects/foreign-tq-csa.h" #include "torque-generated/src/objects/free-space-tq-csa.h" #include "torque-generated/src/objects/heap-number-tq-csa.h" #include "torque-generated/src/objects/heap-object-tq-csa.h" #include "torque-generated/src/objects/intl-objects-tq-csa.h" #include "torque-generated/src/objects/js-array-buffer-tq-csa.h" #include "torque-generated/src/objects/js-array-tq-csa.h" #include "torque-generated/src/objects/js-collection-iterator-tq-csa.h" #include "torque-generated/src/objects/js-collection-tq-csa.h" #include "torque-generated/src/objects/js-generator-tq-csa.h" #include "torque-generated/src/objects/js-objects-tq-csa.h" #include "torque-generated/src/objects/js-promise-tq-csa.h" #include "torque-generated/src/objects/js-proxy-tq-csa.h" #include "torque-generated/src/objects/js-regexp-string-iterator-tq-csa.h" #include "torque-generated/src/objects/js-regexp-tq-csa.h" #include "torque-generated/src/objects/js-weak-refs-tq-csa.h" #include "torque-generated/src/objects/literal-objects-tq-csa.h" #include "torque-generated/src/objects/map-tq-csa.h" #include "torque-generated/src/objects/microtask-tq-csa.h" #include "torque-generated/src/objects/module-tq-csa.h" #include "torque-generated/src/objects/name-tq-csa.h" #include "torque-generated/src/objects/oddball-tq-csa.h" #include "torque-generated/src/objects/ordered-hash-table-tq-csa.h" #include "torque-generated/src/objects/primitive-heap-object-tq-csa.h" #include "torque-generated/src/objects/promise-tq-csa.h" #include "torque-generated/src/objects/property-array-tq-csa.h" #include "torque-generated/src/objects/property-cell-tq-csa.h" #include "torque-generated/src/objects/property-descriptor-object-tq-csa.h" #include "torque-generated/src/objects/prototype-info-tq-csa.h" #include "torque-generated/src/objects/regexp-match-info-tq-csa.h" #include "torque-generated/src/objects/scope-info-tq-csa.h" #include "torque-generated/src/objects/script-tq-csa.h" #include "torque-generated/src/objects/shared-function-info-tq-csa.h" #include "torque-generated/src/objects/source-text-module-tq-csa.h" #include "torque-generated/src/objects/stack-frame-info-tq-csa.h" #include "torque-generated/src/objects/string-tq-csa.h" #include "torque-generated/src/objects/struct-tq-csa.h" #include "torque-generated/src/objects/synthetic-module-tq-csa.h" #include "torque-generated/src/objects/template-objects-tq-csa.h" #include "torque-generated/src/objects/template-tq-csa.h" #include "torque-generated/src/wasm/wasm-objects-tq-csa.h" #include "torque-generated/test/torque/test-torque-tq-csa.h" #include "torque-generated/third_party/v8/builtins/array-sort-tq-csa.h" namespace v8 { namespace internal { const char* kBuiltinNameFindIndex_0(compiler::CodeAssemblerState* state_) { compiler::CodeAssembler ca_(state_); compiler::CodeAssemblerParameterizedLabel<> block0(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); ca_.Goto(&block0); ca_.Bind(&block0); return "%TypedArray%.prototype.findIndex"; } TNode<Number> FindIndexAllElements_0(compiler::CodeAssemblerState* state_, TNode<Context> p_context, TNode<JSTypedArray> p_array, TNode<JSReceiver> p_callbackfn, TNode<Object> p_thisArg) { compiler::CodeAssembler ca_(state_); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object> block0(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT> block5(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT> block3(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT> block10(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT> block11(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT, Object, Number, Object> block14(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT, Object, Number, Object> block15(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, JSTypedArray, JSTypedArray, BuiltinPtr, UintPtrT, UintPtrT> block4(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, Number> block1(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<Context, JSTypedArray, JSReceiver, Object, Number> block16(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); ca_.Goto(&block0, p_context, p_array, p_callbackfn, p_thisArg); if (block0.is_used()) { TNode<Context> tmp0; TNode<JSTypedArray> tmp1; TNode<JSReceiver> tmp2; TNode<Object> tmp3; ca_.Bind(&block0, &tmp0, &tmp1, &tmp2, &tmp3); TNode<JSTypedArray> tmp4; USE(tmp4); TNode<JSTypedArray> tmp5; USE(tmp5); TNode<BuiltinPtr> tmp6; USE(tmp6); std::tie(tmp4, tmp5, tmp6) = NewAttachedJSTypedArrayWitness_0(state_, TNode<JSTypedArray>{tmp1}).Flatten(); TNode<IntPtrT> tmp7; USE(tmp7); tmp7 = FromConstexpr_intptr_constexpr_int31_0(state_, 24); TNode<UintPtrT>tmp8 = CodeStubAssembler(state_).LoadReference<UintPtrT>(CodeStubAssembler::Reference{tmp5, tmp7}); TNode<UintPtrT> tmp9; USE(tmp9); tmp9 = FromConstexpr_uintptr_constexpr_int31_0(state_, 0); ca_.Goto(&block5, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp8, tmp9); } if (block5.is_used()) { TNode<Context> tmp10; TNode<JSTypedArray> tmp11; TNode<JSReceiver> tmp12; TNode<Object> tmp13; TNode<JSTypedArray> tmp14; TNode<JSTypedArray> tmp15; TNode<BuiltinPtr> tmp16; TNode<UintPtrT> tmp17; TNode<UintPtrT> tmp18; ca_.Bind(&block5, &tmp10, &tmp11, &tmp12, &tmp13, &tmp14, &tmp15, &tmp16, &tmp17, &tmp18); TNode<BoolT> tmp19; USE(tmp19); tmp19 = CodeStubAssembler(state_).UintPtrLessThan(TNode<UintPtrT>{tmp18}, TNode<UintPtrT>{tmp17}); ca_.Branch(tmp19, &block3, &block4, tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17, tmp18); } if (block3.is_used()) { TNode<Context> tmp20; TNode<JSTypedArray> tmp21; TNode<JSReceiver> tmp22; TNode<Object> tmp23; TNode<JSTypedArray> tmp24; TNode<JSTypedArray> tmp25; TNode<BuiltinPtr> tmp26; TNode<UintPtrT> tmp27; TNode<UintPtrT> tmp28; ca_.Bind(&block3, &tmp20, &tmp21, &tmp22, &tmp23, &tmp24, &tmp25, &tmp26, &tmp27, &tmp28); TNode<IntPtrT> tmp29; USE(tmp29); tmp29 = FromConstexpr_intptr_constexpr_int31_0(state_, 12); TNode<JSArrayBuffer>tmp30 = CodeStubAssembler(state_).LoadReference<JSArrayBuffer>(CodeStubAssembler::Reference{tmp24, tmp29}); TNode<BoolT> tmp31; USE(tmp31); tmp31 = CodeStubAssembler(state_).IsDetachedBuffer(TNode<JSArrayBuffer>{tmp30}); ca_.Branch(tmp31, &block10, &block11, tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27, tmp28); } if (block10.is_used()) { TNode<Context> tmp32; TNode<JSTypedArray> tmp33; TNode<JSReceiver> tmp34; TNode<Object> tmp35; TNode<JSTypedArray> tmp36; TNode<JSTypedArray> tmp37; TNode<BuiltinPtr> tmp38; TNode<UintPtrT> tmp39; TNode<UintPtrT> tmp40; ca_.Bind(&block10, &tmp32, &tmp33, &tmp34, &tmp35, &tmp36, &tmp37, &tmp38, &tmp39, &tmp40); ca_.Goto(&block4, tmp32, tmp33, tmp34, tmp35, tmp36, tmp37, tmp38, tmp39, tmp40); } if (block11.is_used()) { TNode<Context> tmp41; TNode<JSTypedArray> tmp42; TNode<JSReceiver> tmp43; TNode<Object> tmp44; TNode<JSTypedArray> tmp45; TNode<JSTypedArray> tmp46; TNode<BuiltinPtr> tmp47; TNode<UintPtrT> tmp48; TNode<UintPtrT> tmp49; ca_.Bind(&block11, &tmp41, &tmp42, &tmp43, &tmp44, &tmp45, &tmp46, &tmp47, &tmp48, &tmp49); TNode<JSTypedArray> tmp50; USE(tmp50); tmp50 = (TNode<JSTypedArray>{tmp45}); TNode<Numeric> tmp51 = TORQUE_CAST(CodeStubAssembler(state_).CallBuiltinPointer(Builtins::CallableFor(ca_.isolate(),ExampleBuiltinForTorqueFunctionPointerType(1)).descriptor(), tmp47, tmp41, tmp50, tmp49)); USE(tmp51); TNode<Number> tmp52; USE(tmp52); tmp52 = Convert_Number_uintptr_0(state_, TNode<UintPtrT>{tmp49}); TNode<Object> tmp53; USE(tmp53); tmp53 = CodeStubAssembler(state_).Call(TNode<Context>{tmp41}, TNode<Object>{tmp43}, TNode<Object>{tmp44}, TNode<Object>{tmp51}, TNode<Object>{tmp52}, TNode<Object>{tmp45}); TNode<BoolT> tmp54; USE(tmp54); tmp54 = ToBoolean_0(state_, TNode<Object>{tmp53}); ca_.Branch(tmp54, &block14, &block15, tmp41, tmp42, tmp43, tmp44, tmp45, tmp50, tmp47, tmp48, tmp49, tmp51, tmp52, tmp53); } if (block14.is_used()) { TNode<Context> tmp55; TNode<JSTypedArray> tmp56; TNode<JSReceiver> tmp57; TNode<Object> tmp58; TNode<JSTypedArray> tmp59; TNode<JSTypedArray> tmp60; TNode<BuiltinPtr> tmp61; TNode<UintPtrT> tmp62; TNode<UintPtrT> tmp63; TNode<Object> tmp64; TNode<Number> tmp65; TNode<Object> tmp66; ca_.Bind(&block14, &tmp55, &tmp56, &tmp57, &tmp58, &tmp59, &tmp60, &tmp61, &tmp62, &tmp63, &tmp64, &tmp65, &tmp66); ca_.Goto(&block1, tmp55, tmp56, tmp57, tmp58, tmp65); } if (block15.is_used()) { TNode<Context> tmp67; TNode<JSTypedArray> tmp68; TNode<JSReceiver> tmp69; TNode<Object> tmp70; TNode<JSTypedArray> tmp71; TNode<JSTypedArray> tmp72; TNode<BuiltinPtr> tmp73; TNode<UintPtrT> tmp74; TNode<UintPtrT> tmp75; TNode<Object> tmp76; TNode<Number> tmp77; TNode<Object> tmp78; ca_.Bind(&block15, &tmp67, &tmp68, &tmp69, &tmp70, &tmp71, &tmp72, &tmp73, &tmp74, &tmp75, &tmp76, &tmp77, &tmp78); TNode<UintPtrT> tmp79; USE(tmp79); tmp79 = FromConstexpr_uintptr_constexpr_int31_0(state_, 1); TNode<UintPtrT> tmp80; USE(tmp80); tmp80 = CodeStubAssembler(state_).UintPtrAdd(TNode<UintPtrT>{tmp75}, TNode<UintPtrT>{tmp79}); ca_.Goto(&block5, tmp67, tmp68, tmp69, tmp70, tmp71, tmp72, tmp73, tmp74, tmp80); } if (block4.is_used()) { TNode<Context> tmp81; TNode<JSTypedArray> tmp82; TNode<JSReceiver> tmp83; TNode<Object> tmp84; TNode<JSTypedArray> tmp85; TNode<JSTypedArray> tmp86; TNode<BuiltinPtr> tmp87; TNode<UintPtrT> tmp88; TNode<UintPtrT> tmp89; ca_.Bind(&block4, &tmp81, &tmp82, &tmp83, &tmp84, &tmp85, &tmp86, &tmp87, &tmp88, &tmp89); TNode<Number> tmp90; USE(tmp90); tmp90 = FromConstexpr_Number_constexpr_int31_0(state_, -1); ca_.Goto(&block1, tmp81, tmp82, tmp83, tmp84, tmp90); } if (block1.is_used()) { TNode<Context> tmp91; TNode<JSTypedArray> tmp92; TNode<JSReceiver> tmp93; TNode<Object> tmp94; TNode<Number> tmp95; ca_.Bind(&block1, &tmp91, &tmp92, &tmp93, &tmp94, &tmp95); ca_.Goto(&block16, tmp91, tmp92, tmp93, tmp94, tmp95); } TNode<Context> tmp96; TNode<JSTypedArray> tmp97; TNode<JSReceiver> tmp98; TNode<Object> tmp99; TNode<Number> tmp100; ca_.Bind(&block16, &tmp96, &tmp97, &tmp98, &tmp99, &tmp100); return TNode<Number>{tmp100}; } TF_BUILTIN(TypedArrayPrototypeFindIndex, CodeStubAssembler) { compiler::CodeAssemblerState* state_ = state(); compiler::CodeAssembler ca_(state()); Node* argc = Parameter(Descriptor::kJSActualArgumentsCount); TNode<IntPtrT> arguments_length(ChangeInt32ToIntPtr(argc)); TNode<RawPtrT> arguments_frame = UncheckedCast<RawPtrT>(LoadFramePointer()); TorqueStructArguments torque_arguments(GetFrameArguments(arguments_frame, arguments_length)); CodeStubArguments arguments(this, torque_arguments); TNode<NativeContext> parameter0 = UncheckedCast<NativeContext>(Parameter(Descriptor::kContext)); USE(parameter0); TNode<Object> parameter1 = arguments.GetReceiver(); USE(parameter1); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object> block0(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object, Object, NativeContext> block8(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object, Object, NativeContext, JSTypedArray> block7(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object, JSTypedArray, JSTypedArray> block10(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object, JSTypedArray, JSTypedArray, JSTypedArray> block9(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object, JSTypedArray, JSTypedArray, Object, NativeContext> block12(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); compiler::CodeAssemblerParameterizedLabel<RawPtrT, RawPtrT, IntPtrT, NativeContext, Object, JSTypedArray, JSTypedArray, Object, NativeContext, JSReceiver> block11(&ca_, compiler::CodeAssemblerLabel::kNonDeferred); ca_.Goto(&block0, torque_arguments.frame, torque_arguments.base, torque_arguments.length, parameter0, parameter1); if (block0.is_used()) { TNode<RawPtrT> tmp0; TNode<RawPtrT> tmp1; TNode<IntPtrT> tmp2; TNode<NativeContext> tmp3; TNode<Object> tmp4; ca_.Bind(&block0, &tmp0, &tmp1, &tmp2, &tmp3, &tmp4); TNode<JSTypedArray> tmp5; USE(tmp5); compiler::CodeAssemblerLabel label0(&ca_); tmp5 = Cast_JSTypedArray_1(state_, TNode<Context>{tmp3}, TNode<Object>{tmp4}, &label0); ca_.Goto(&block7, tmp0, tmp1, tmp2, tmp3, tmp4, tmp4, tmp3, tmp5); if (label0.is_used()) { ca_.Bind(&label0); ca_.Goto(&block8, tmp0, tmp1, tmp2, tmp3, tmp4, tmp4, tmp3); } } if (block8.is_used()) { TNode<RawPtrT> tmp6; TNode<RawPtrT> tmp7; TNode<IntPtrT> tmp8; TNode<NativeContext> tmp9; TNode<Object> tmp10; TNode<Object> tmp11; TNode<NativeContext> tmp12; ca_.Bind(&block8, &tmp6, &tmp7, &tmp8, &tmp9, &tmp10, &tmp11, &tmp12); CodeStubAssembler(state_).ThrowTypeError(TNode<Context>{tmp9}, MessageTemplate::kNotTypedArray, kBuiltinNameFindIndex_0(state_)); } if (block7.is_used()) { TNode<RawPtrT> tmp13; TNode<RawPtrT> tmp14; TNode<IntPtrT> tmp15; TNode<NativeContext> tmp16; TNode<Object> tmp17; TNode<Object> tmp18; TNode<NativeContext> tmp19; TNode<JSTypedArray> tmp20; ca_.Bind(&block7, &tmp13, &tmp14, &tmp15, &tmp16, &tmp17, &tmp18, &tmp19, &tmp20); TNode<JSTypedArray> tmp21; USE(tmp21); compiler::CodeAssemblerLabel label0(&ca_); tmp21 = EnsureAttached_0(state_, TNode<JSTypedArray>{tmp20}, &label0); ca_.Goto(&block9, tmp13, tmp14, tmp15, tmp16, tmp17, tmp20, tmp20, tmp21); if (label0.is_used()) { ca_.Bind(&label0); ca_.Goto(&block10, tmp13, tmp14, tmp15, tmp16, tmp17, tmp20, tmp20); } } if (block10.is_used()) { TNode<RawPtrT> tmp22; TNode<RawPtrT> tmp23; TNode<IntPtrT> tmp24; TNode<NativeContext> tmp25; TNode<Object> tmp26; TNode<JSTypedArray> tmp27; TNode<JSTypedArray> tmp28; ca_.Bind(&block10, &tmp22, &tmp23, &tmp24, &tmp25, &tmp26, &tmp27, &tmp28); CodeStubAssembler(state_).ThrowTypeError(TNode<Context>{tmp25}, MessageTemplate::kDetachedOperation, kBuiltinNameFindIndex_0(state_)); } if (block9.is_used()) { TNode<RawPtrT> tmp29; TNode<RawPtrT> tmp30; TNode<IntPtrT> tmp31; TNode<NativeContext> tmp32; TNode<Object> tmp33; TNode<JSTypedArray> tmp34; TNode<JSTypedArray> tmp35; TNode<JSTypedArray> tmp36; ca_.Bind(&block9, &tmp29, &tmp30, &tmp31, &tmp32, &tmp33, &tmp34, &tmp35, &tmp36); TNode<IntPtrT> tmp37; USE(tmp37); tmp37 = FromConstexpr_intptr_constexpr_int31_0(state_, 0); TNode<Object> tmp38; USE(tmp38); tmp38 = CodeStubAssembler(state_).GetArgumentValue(TorqueStructArguments{TNode<RawPtrT>{tmp29}, TNode<RawPtrT>{tmp30}, TNode<IntPtrT>{tmp31}}, TNode<IntPtrT>{tmp37}); TNode<JSReceiver> tmp39; USE(tmp39); compiler::CodeAssemblerLabel label0(&ca_); tmp39 = Cast_Callable_1(state_, TNode<Context>{tmp32}, TNode<Object>{tmp38}, &label0); ca_.Goto(&block11, tmp29, tmp30, tmp31, tmp32, tmp33, tmp34, tmp36, tmp38, tmp32, tmp39); if (label0.is_used()) { ca_.Bind(&label0); ca_.Goto(&block12, tmp29, tmp30, tmp31, tmp32, tmp33, tmp34, tmp36, tmp38, tmp32); } } if (block12.is_used()) { TNode<RawPtrT> tmp40; TNode<RawPtrT> tmp41; TNode<IntPtrT> tmp42; TNode<NativeContext> tmp43; TNode<Object> tmp44; TNode<JSTypedArray> tmp45; TNode<JSTypedArray> tmp46; TNode<Object> tmp47; TNode<NativeContext> tmp48; ca_.Bind(&block12, &tmp40, &tmp41, &tmp42, &tmp43, &tmp44, &tmp45, &tmp46, &tmp47, &tmp48); TNode<IntPtrT> tmp49; USE(tmp49); tmp49 = FromConstexpr_intptr_constexpr_int31_0(state_, 0); TNode<Object> tmp50; USE(tmp50); tmp50 = CodeStubAssembler(state_).GetArgumentValue(TorqueStructArguments{TNode<RawPtrT>{tmp40}, TNode<RawPtrT>{tmp41}, TNode<IntPtrT>{tmp42}}, TNode<IntPtrT>{tmp49}); CodeStubAssembler(state_).ThrowTypeError(TNode<Context>{tmp43}, MessageTemplate::kCalledNonCallable, TNode<Object>{tmp50}); } if (block11.is_used()) { TNode<RawPtrT> tmp51; TNode<RawPtrT> tmp52; TNode<IntPtrT> tmp53; TNode<NativeContext> tmp54; TNode<Object> tmp55; TNode<JSTypedArray> tmp56; TNode<JSTypedArray> tmp57; TNode<Object> tmp58; TNode<NativeContext> tmp59; TNode<JSReceiver> tmp60; ca_.Bind(&block11, &tmp51, &tmp52, &tmp53, &tmp54, &tmp55, &tmp56, &tmp57, &tmp58, &tmp59, &tmp60); TNode<IntPtrT> tmp61; USE(tmp61); tmp61 = FromConstexpr_intptr_constexpr_int31_0(state_, 1); TNode<Object> tmp62; USE(tmp62); tmp62 = CodeStubAssembler(state_).GetArgumentValue(TorqueStructArguments{TNode<RawPtrT>{tmp51}, TNode<RawPtrT>{tmp52}, TNode<IntPtrT>{tmp53}}, TNode<IntPtrT>{tmp61}); TNode<Number> tmp63; USE(tmp63); tmp63 = FindIndexAllElements_0(state_, TNode<Context>{tmp54}, TNode<JSTypedArray>{tmp57}, TNode<JSReceiver>{tmp60}, TNode<Object>{tmp62}); arguments.PopAndReturn(tmp63); } } } // namespace internal } // namespace v8
[ "xueqi@zjmedia.net" ]
xueqi@zjmedia.net
240231438208fa96c154a3e2a3de51dbb631a8dd
271309d3e89ff224c426e846f8b6f821ed118a16
/ABC/ABC002/B.cpp
0ba4a1c7330da5a6a3f1d6b3389196c7eebc177b
[]
no_license
zeronosu77108/AtCoder
2f4f4dde9401218cdf30d2fc0b1f5c1b14ce8554
14750e4699069c4fd0d621fbc4277121b8d8aed4
refs/heads/master
2022-06-06T12:10:07.238659
2022-05-28T06:28:13
2022-05-28T06:28:13
164,265,214
0
0
null
null
null
null
UTF-8
C++
false
false
638
cpp
#include <iostream> #include <iomanip> #include <vector> #include <utility> #include <map> #include <algorithm> #include <queue> #include <cmath> #include <numeric> using namespace std; struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20);};}aaa; typedef long long int64; int main() { string s; cin >> s; int n = s.size(); for (int i=0; i<n; i++) { if ( s[i] == 'a') continue; if ( s[i] == 'i') continue; if ( s[i] == 'u') continue; if ( s[i] == 'e') continue; if ( s[i] == 'o') continue; cout << s[i]; } cout << endl; }
[ "taiga77108@gmail.com" ]
taiga77108@gmail.com
fc0ca21f98349fdc52b39034991e28ab195ece2a
27e4ba3aa9f4e881cf0393c090d9862ff11908d4
/Source/EEAssembler.cpp
7d9d1df2d079935d86791e47181243a0b655714b
[ "BSD-2-Clause" ]
permissive
unknownbrackets/Play-
237ed5212f66a910ecf4f8d64f32f5f55ad6ecc2
03f18944daadbb1782a52cfd6df18e17c21ce3e0
refs/heads/master
2020-12-26T01:59:22.674848
2015-04-20T05:49:04
2015-04-20T05:49:04
33,449,040
2
0
null
2015-04-05T17:33:16
2015-04-05T17:33:15
C++
UTF-8
C++
false
false
3,100
cpp
#include "EEAssembler.h" CEEAssembler::CEEAssembler(uint32* ptr) : CMIPSAssembler(ptr) { } void CEEAssembler::LQ(unsigned int rt, uint16 offset, unsigned int base) { (*m_ptr) = ((0x1E) << 26) | (base << 21) | (rt << 16) | offset; m_ptr++; } void CEEAssembler::MFHI1(unsigned int rd) { (*m_ptr) = ((0x1C) << 26) | (rd << 11) | (0x10); m_ptr++; } void CEEAssembler::MFLO1(unsigned int rd) { (*m_ptr) = ((0x1C) << 26) | (rd << 11) | (0x12); m_ptr++; } void CEEAssembler::MTHI1(unsigned int rs) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (0x11); m_ptr++; } void CEEAssembler::MTLO1(unsigned int rs) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (0x13); m_ptr++; } void CEEAssembler::PADDW(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x00) << 6) | (0x08); m_ptr++; } void CEEAssembler::PEXCH(unsigned int rd, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rt << 16) | (rd << 11) | ((0x1A) << 6) | (0x29); m_ptr++; } void CEEAssembler::PEXTLB(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x1A) << 6) | (0x08); m_ptr++; } void CEEAssembler::PEXTUB(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x1A) << 6) | (0x28); m_ptr++; } void CEEAssembler::PEXTLH(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x16) << 6) | (0x08); m_ptr++; } void CEEAssembler::PEXTUH(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x16) << 6) | (0x28); m_ptr++; } void CEEAssembler::PEXCW(unsigned int rd, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rt << 16) | (rd << 11) | ((0x1E) << 6) | (0x29); m_ptr++; } void CEEAssembler::PMFLO(unsigned int rd) { (*m_ptr) = ((0x1C) << 26) | (rd << 11) | ((0x09) << 6) | (0x09); m_ptr++; } void CEEAssembler::PMFHI(unsigned int rd) { (*m_ptr) = ((0x1C) << 26) | (rd << 11) | ((0x08) << 6) | (0x09); m_ptr++; } void CEEAssembler::PMFHL_UW(unsigned int rd) { (*m_ptr) = ((0x1C) << 26) | (rd << 11) | ((0x01) << 6) | (0x30); m_ptr++; } void CEEAssembler::PMFHL_LH(unsigned int rd) { (*m_ptr) = ((0x1C) << 26) | (rd << 11) | ((0x03) << 6) | (0x30); m_ptr++; } void CEEAssembler::PMULTH(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x1C) << 6) | (0x09); m_ptr++; } void CEEAssembler::PPACH(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x17) << 6) | (0x08); m_ptr++; } void CEEAssembler::PPACW(unsigned int rd, unsigned int rs, unsigned int rt) { (*m_ptr) = ((0x1C) << 26) | (rs << 21) | (rt << 16) | (rd << 11) | ((0x13) << 6) | (0x08); m_ptr++; } void CEEAssembler::SQ(unsigned int rt, uint16 offset, unsigned int base) { (*m_ptr) = ((0x1F) << 26) | (base << 21) | (rt << 16) | offset; m_ptr++; }
[ "jean-philip.desjardins@polymtl.ca" ]
jean-philip.desjardins@polymtl.ca
64179e66e294c708e29512a758f85b01d2d444ad
8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a
/3rdParty/boost/1.78.0/boost/type_index/runtime_cast/std_shared_ptr_cast.hpp
277a52426001ef1fe8698af690e34c3abc9c27f6
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception-2.2", "LicenseRef-scancode...
permissive
arangodb/arangodb
0980625e76c56a2449d90dcb8d8f2c485e28a83b
43c40535cee37fc7349a21793dc33b1833735af5
refs/heads/devel
2023-08-31T09:34:47.451950
2023-08-31T07:25:02
2023-08-31T07:25:02
2,649,214
13,385
982
Apache-2.0
2023-09-14T17:02:16
2011-10-26T06:42:00
C++
UTF-8
C++
false
false
1,737
hpp
// // Copyright (c) Chris Glover, 2016. // // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP #define BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP /// \file std_shared_ptr_cast.hpp /// \brief Contains the overload of boost::typeindex::runtime_pointer_cast for /// std::shared_ptr types. #include <boost/type_index/runtime_cast/detail/runtime_cast_impl.hpp> #include <boost/type_traits/is_base_and_derived.hpp> #include <memory> #ifdef BOOST_HAS_PRAGMA_ONCE # pragma once #endif namespace boost { namespace typeindex { /// \brief Creates a new instance of std::shared_ptr whose stored pointer is obtained from u's /// stored pointer using a runtime_cast. /// /// The new shared_ptr will share ownership with u, except that it is empty if the runtime_cast /// performed by runtime_pointer_cast returns a null pointer. /// \tparam T The desired target type to return a pointer of. /// \tparam U A complete class type of the source instance pointed to from u. /// \return If there exists a valid conversion from U* to T*, returns a std::shared_ptr<T> /// that points to an address suitably offset from u. /// If no such conversion exists, returns std::shared_ptr<T>(); template<typename T, typename U> std::shared_ptr<T> runtime_pointer_cast(std::shared_ptr<U> const& u) { T* value = detail::runtime_cast_impl<T>(u.get(), boost::is_base_and_derived<T, U>()); if(value) return std::shared_ptr<T>(u, value); return std::shared_ptr<T>(); } }} // namespace boost::typeindex #endif // BOOST_TYPE_INDEX_RUNTIME_CAST_STD_SHARED_PTR_CAST_HPP
[ "noreply@github.com" ]
noreply@github.com
bfd6dbe680496346b86271256b5fc0c7c75c2c79
d5aafc5633c43f08114ab8d7bdbec8b26d376b07
/test_inherence_composition/main.cpp
8f1293bc419125b5d0eba9455c8c905ffb4aeb94
[]
no_license
WangFengtu1996/cpp_test
d6ace2a5e887a4aab5623e680e498ffff6ff5a1a
02a0a6f4ee45e9e03436a55081923694ba1b582d
refs/heads/master
2022-11-23T16:53:26.487092
2020-05-17T10:01:34
2020-05-17T10:01:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
145
cpp
// #include "dog.h" #include <unistd.h> #include "cat.h" int main() { cat* cat1 = new cat(); sleep(5); delete cat1; return 0; }
[ "11484791151@qq.com" ]
11484791151@qq.com
eb5b77ca2150e6ed999c07810ca1213eb23d5c84
698e907c7d17059a759fd26b8fa564ab6b099ba7
/20191106/origin/test.cpp
d1446056e7a4c950a3e21e7c24d25e89b1275f3e
[]
no_license
dong3gold/CSPS-Learning
13960e304ee66abc7fa1d85000957b87ad345412
d11d26678f508e707e59ac4ec61f08c649c004d3
refs/heads/master
2020-06-28T13:13:51.848250
2019-11-12T11:48:02
2019-11-12T11:48:02
200,242,942
0
0
null
null
null
null
UTF-8
C++
false
false
206
cpp
#include <cstdio> #include <algorithm> #include <cctype> #include <cstring> using namespace std; long long int a, sum; int main(){ while(~scanf("%lld", &a)) sum += a; printf("%lld", sum); return 0; }
[ "dong3gold@163.com" ]
dong3gold@163.com
1ce81b1fe616248352fb2d90a947d125a4942318
bf9e00e49aa3679ff37cee4d1a8e6cf96dd70ab2
/service/CsvFormatterUtil.cpp
9647c556742454f4194483ce5bfb071760f813f8
[]
no_license
FilipZobic/cpp-university-assigment-GUI
495db03795524d563f5b146e87901559e74e340a
e56e81218a313590d7fe6b78cbbdcf000bc838d8
refs/heads/master
2023-02-27T12:57:43.202395
2021-01-21T12:21:29
2021-01-21T12:21:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
75
cpp
#include "CsvFormatterUtil.h" const string CsvFormatterUtil::sep = "|*|";
[ "zobicfilip919@gmail.com" ]
zobicfilip919@gmail.com
f336f7cfa2cf67a3b12a7042853dda0bc6c0f94c
a67eba5bac73aeb1dca7245d926bcfca94ae43cf
/Samples/QQDemo/inc/TrayIconWndMgr.h
f305bee3ae56013b86c18f27f69d3144e4bb04ef
[]
no_license
skyformat99/directUI-REDM
f34f151bbfc9b88f6491894044cc5c46084826cb
2703afc1c84add0b17cc20286e06cec87b620793
refs/heads/master
2020-03-07T17:51:25.748522
2018-03-29T08:48:39
2018-03-29T08:48:39
127,622,801
1
0
null
null
null
null
GB18030
C++
false
false
2,137
h
// ---------------------------------------------------------------- // Copyright (c) // All rights reserved. // // File name: TrayIconWndMgr.h // File mark: 针对托盘菜单的一个封装 // File summary: // Author: lzlong // Edition: 1.0 // Create date: 2016-11-11 // ---------------------------------------------------------------- #pragma once #include <shellapi.h> #define WM_SHOWTRAYMENU WM_USER + 1244 /// <summary> /// 简单的托盘实现代码 /// </summary> class CTrayIconWndMgr : public DMCWnd, public DMSingletonT<CTrayIconWndMgr> { public: CTrayIconWndMgr(); ~CTrayIconWndMgr(); /// ------------------------------------------------- /// @brief 安装托盘图标 /// @param[in] lpszToolTip 托盘的提示 /// @param[in] hParentWnd 托盘的父窗口 /// @param[in] hIcon 将要添加/修改/删除的图标句柄 /// @param[in] nID 应用程序定义的任务栏图标的ID /// @return true or false bool InstallTrayIcon(LPCWSTR lpszToolTip, HWND hParentWnd, HICON hIcon, UINT nID); /// ------------------------------------------------- /// @brief 移除托盘图标 bool UnInstallTrayIcon(); /// ------------------------------------------------- /// @brief 设置文本提示,设置、隐藏汽泡提示 bool SetTipText(LPCWSTR lpszTipText); bool SetBalloonDetails(LPCWSTR lpszBalloonText, LPCWSTR lpszBalloonCaption = NULL,UINT nTimeout = 1000, DWORD style = NIIF_INFO, HICON hUserIcon = NULL, bool bNoSound = false); bool HideBalloon(); protected: LRESULT OnTrayIcon(UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT OnTaskbarRestart(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/); public: DECLARE_MESSAGE_MAP() static DWORD StartTimeCheck(LPVOID lp); public: NOTIFYICONDATA m_Nid; UINT m_CbMsg; UINT m_RestartMsg; HWND m_hParentWnd; bool m_bInstall; bool m_bExitBalloon; DWORD m_dwOldTime; };
[ "80718901@qq.com" ]
80718901@qq.com
a42fcebd726e0200dd2ded5f264016658bec3e67
58b696e6b028d88e34e1e8d2b7d0f3d11d48bfa9
/src/average.h
4a35a0ecac601abd000f923815c81b0844c3dcfc
[]
no_license
morrisfranken/creativity
6ded43e99bedd93a39ac2b1769ce8c1dc00fbae8
2bd5a6e46177486c7ebb61b1e12f9be8d592f1e3
refs/heads/master
2021-04-12T08:48:27.615374
2018-05-04T13:18:12
2018-05-04T13:18:12
126,601,654
1
0
null
null
null
null
UTF-8
C++
false
false
216
h
/* * average.h * * Created on: 24 Mar 2018 * Author: morris */ #ifndef AVERAGE_H_ #define AVERAGE_H_ #include <string> namespace average { void run(const std::string &path); } #endif /* AVERAGE_H_ */
[ "morrisfranken@gmail.com" ]
morrisfranken@gmail.com
8fe5a4cb2068e559d112e3e173cf676e29c72c1f
4ac9a9659d0bed177fee3344f81c0c6fcd5423ff
/hw1/test/UtilTest.cpp
25c1e9b36d22b022299375ae3a441e20b8b8b944
[]
no_license
kamaroyl/data-structures-2421
791d4acac54ae5f6ffda5f08f89aafac20a2c4ff
1181c2c193ad11e70a7e54a8d278ce59b803116d
refs/heads/master
2021-06-06T21:54:17.955445
2020-07-14T02:57:26
2020-07-14T02:57:26
146,110,888
0
1
null
null
null
null
UTF-8
C++
false
false
850
cpp
#include <iostream> #include "../src/Util.hpp" bool testArrayCopy() { long src[] = {1,2,3,4}; long dst[4]; shallowCopyArray(src, dst, 0, 3); return src[2] == dst[2]; } bool arraySwap() { long src[] = {1,2,3,4}; swap(&src[0],&src[3]); std::cout << "swapped array:"; printArray(src, 4); return src[0] == 4 && src[3] == 1; } bool testSortArray() { long src[] = {3, 8, 5}; long length = 3; std::cout << "Original Array: "; printArray(src, length); quickSort(src, 0, length - 1); std::cout << "sorted array:"; printArray(src, length); return false; } int main() { std::cout << "true: " << true << std::endl; std::cout << "false: " << false << std::endl; std::cout << "testArrayCopy: " << testArrayCopy() << std::endl; testSortArray(); arraySwap(); return 0; }
[ "kamaroyl@gmail.com" ]
kamaroyl@gmail.com
85e0cf702890f51096d51f767f2a50b408879056
76171660651f1c680d5b5a380c07635de5b2367c
/SH6_58mps/0.390075/rho
3131e2642c206c68c87df04dd5c2e622b67e6d5a
[]
no_license
lisegaAM/SH_Paper1
3cd0cac0d95cc60d296268e65e2dd6fed4cc6127
12ceadba5c58c563ccac236b965b4b917ac47551
refs/heads/master
2021-04-27T19:44:19.527187
2018-02-21T16:16:50
2018-02-21T16:16:50
122,360,661
0
0
null
null
null
null
UTF-8
C++
false
false
132,380
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.390075"; object rho; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -3 0 0 0 0 0]; internalField nonuniform List<scalar> 13800 ( 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5461 50.5461 50.5461 50.5462 50.5462 50.5463 50.5463 50.5464 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5466 50.5466 50.5466 50.5466 50.5467 50.5467 50.5468 50.5469 50.5469 50.547 50.547 50.5471 50.5471 50.5471 50.5471 50.547 50.547 50.547 50.547 50.547 50.547 50.547 50.5471 50.5472 50.5472 50.5473 50.5473 50.5473 50.5473 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5497 50.5441 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5478 50.5478 50.5502 50.5425 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5478 50.5478 50.5501 50.5428 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5478 50.5478 50.5498 50.5452 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5487 50.5441 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5476 50.5471 50.5463 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5476 50.5476 50.5453 50.5525 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5476 50.5479 50.5434 50.5697 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5469 50.5468 50.5468 50.5468 50.5468 50.5468 50.5468 50.5469 50.547 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5471 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5474 50.5475 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5476 50.5475 50.5475 50.5475 50.5475 50.5476 50.5476 50.5477 50.5477 50.5478 50.5478 50.5478 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5479 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5478 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5477 50.5476 50.548 50.5424 50.5787 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5461 50.5461 50.5461 50.5462 50.5462 50.5463 50.5463 50.5464 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5466 50.5466 50.5466 50.5466 50.5467 50.5467 50.5468 50.5469 50.5469 50.547 50.547 50.5471 50.5471 50.5471 50.5471 50.547 50.547 50.547 50.547 50.547 50.547 50.547 50.5471 50.5472 50.5472 50.5473 50.5473 50.5473 50.5473 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5471 50.5476 50.5409 50.5869 50.5999 50.6221 50.6294 50.6305 50.6302 50.6301 50.6297 50.6291 50.6282 50.6272 50.6262 50.625 50.6237 50.6222 50.6203 50.6179 50.6147 50.6105 50.6045 50.5953 50.5968 50.6163 50.624 50.6254 50.6254 50.6254 50.6252 50.6247 50.6239 50.6231 50.6221 50.621 50.6198 50.6184 50.6165 50.6141 50.6108 50.6065 50.6004 50.5912 50.5937 50.6135 50.6223 50.6242 50.6242 50.6242 50.624 50.6234 50.6226 50.6217 50.6207 50.6196 50.6184 50.6169 50.615 50.6126 50.6093 50.6047 50.5982 50.5882 50.5829 50.5937 50.597 50.5966 50.5959 50.5955 50.5949 50.5941 50.593 50.5919 50.5908 50.5895 50.5881 50.5863 50.5841 50.5814 50.5784 50.574 50.5682 50.5602 50.5653 50.5725 50.578 50.5821 50.5849 50.5866 50.5874 50.5876 50.5875 50.5871 50.5863 50.5851 50.5838 50.582 50.5797 50.5768 50.573 50.5686 50.5634 50.5573 50.5336 50.5278 50.5215 50.515 50.5091 50.5043 50.5007 50.4979 50.4955 50.4936 50.4921 50.4911 50.49 50.4893 50.4884 50.4878 50.4875 50.4879 50.4884 50.4908 50.5002 50.489 50.4855 50.4863 50.4872 50.4878 50.4879 50.4883 50.4884 50.4886 50.4885 50.4885 50.4882 50.4881 50.4879 50.4884 50.4891 50.491 50.4944 50.5006 50.4586 50.4267 50.4017 50.3844 50.3726 50.3637 50.3569 50.352 50.3488 50.3468 50.3459 50.346 50.3471 50.3498 50.3543 50.3607 50.3685 50.3805 50.3944 50.413 50.45 50.416 50.3942 50.3812 50.3724 50.3659 50.3608 50.3574 50.3553 50.3547 50.3548 50.3559 50.3579 50.3612 50.3659 50.3725 50.381 50.3913 50.4051 50.4224 50.4391 50.3907 50.3632 50.3465 50.3351 50.3258 50.3182 50.3128 50.3091 50.3065 50.3055 50.3049 50.3063 50.3085 50.3132 50.3198 50.3286 50.3401 50.3554 50.3761 50.5553 50.5325 50.5262 50.5244 50.5238 50.5236 50.5236 50.5235 50.5235 50.5235 50.5235 50.5235 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5237 50.5237 50.5237 50.5236 50.5236 50.5236 50.5237 50.5237 50.5237 50.5238 50.5238 50.5238 50.5238 50.5238 50.5239 50.5239 50.5239 50.524 50.524 50.5241 50.5241 50.5242 50.5242 50.5243 50.5243 50.5244 50.5245 50.5246 50.5247 50.5248 50.5249 50.5249 50.525 50.5251 50.5252 50.5254 50.5255 50.5257 50.5258 50.526 50.5262 50.5264 50.5266 50.5268 50.5271 50.5273 50.5276 50.5279 50.5282 50.5285 50.5288 50.5291 50.5295 50.5299 50.5303 50.5307 50.5312 50.5317 50.5322 50.5327 50.5332 50.5338 50.5344 50.5351 50.5358 50.5365 50.5373 50.538 50.5389 50.5398 50.5408 50.542 50.5432 50.5446 50.5458 50.547 50.5483 50.5495 50.5507 50.5519 50.5529 50.5531 50.5502 50.5362 50.5009 50.4623 50.4273 50.3985 50.3775 50.3646 50.359 50.3588 50.3616 50.3716 50.4044 50.4523 50.494 50.5277 50.5532 50.5714 50.5838 50.5917 50.5965 50.5996 50.6022 50.604 50.6046 50.6055 50.6069 50.6086 50.6106 50.6128 50.6152 50.6177 50.6204 50.6231 50.6259 50.6288 50.6317 50.6347 50.6378 50.6409 50.6441 50.6474 50.6507 50.6541 50.6576 50.6611 50.6647 50.6683 50.672 50.6758 50.6796 50.6835 50.6875 50.6915 50.6956 50.6997 50.7039 50.7082 50.7125 50.7169 50.7214 50.7259 50.7305 50.7351 50.7399 50.7446 50.7495 50.7544 50.7594 50.7645 50.7696 50.7748 50.78 50.7853 50.7907 50.7962 50.8017 50.8073 50.813 50.8188 50.8246 50.8305 50.8364 50.8425 50.8486 50.8547 50.8611 50.8671 50.8739 50.88 50.8869 50.8927 50.8995 50.9009 50.9378 50.5551 50.5337 50.5277 50.526 50.5255 50.5253 50.5252 50.5252 50.5252 50.5252 50.5252 50.5252 50.5253 50.5253 50.5253 50.5253 50.5253 50.5253 50.5253 50.5253 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5254 50.5255 50.5255 50.5256 50.5256 50.5256 50.5256 50.5257 50.5257 50.5257 50.5258 50.5258 50.5259 50.5259 50.526 50.526 50.5261 50.5262 50.5262 50.5263 50.5264 50.5265 50.5266 50.5268 50.5269 50.5269 50.527 50.5272 50.5273 50.5275 50.5276 50.5278 50.528 50.5282 50.5284 50.5287 50.5289 50.5291 50.5294 50.5297 50.53 50.5303 50.5307 50.531 50.5313 50.5317 50.5321 50.5325 50.533 50.5335 50.534 50.5345 50.535 50.5356 50.5362 50.5368 50.5375 50.5382 50.5389 50.5397 50.5406 50.5415 50.5424 50.5434 50.5445 50.5455 50.5466 50.5477 50.5489 50.5501 50.5515 50.5534 50.5563 50.5597 50.563 50.566 50.5684 50.5704 50.5721 50.5736 50.5743 50.5721 50.5654 50.559 50.5542 50.5514 50.5506 50.5514 50.5535 50.5565 50.5626 50.5708 50.5778 50.5836 50.5884 50.5923 50.5954 50.5982 50.6009 50.6035 50.6058 50.6082 50.6106 50.613 50.6155 50.6181 50.6208 50.6235 50.6263 50.6292 50.6322 50.6352 50.6383 50.6414 50.6446 50.6479 50.6512 50.6546 50.6581 50.6616 50.6652 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8192 50.8251 50.831 50.8369 50.8429 50.8491 50.8552 50.8616 50.8676 50.8744 50.8804 50.8874 50.8932 50.9 50.902 50.9327 50.5552 50.5345 50.528 50.526 50.5253 50.5251 50.525 50.525 50.5249 50.5249 50.5249 50.5249 50.5249 50.525 50.525 50.525 50.525 50.525 50.525 50.525 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5251 50.5252 50.5252 50.5253 50.5253 50.5253 50.5253 50.5254 50.5254 50.5254 50.5255 50.5255 50.5256 50.5256 50.5257 50.5257 50.5258 50.5259 50.5259 50.526 50.5261 50.5262 50.5263 50.5265 50.5266 50.5267 50.5268 50.5269 50.527 50.5272 50.5273 50.5275 50.5277 50.5279 50.5281 50.5284 50.5286 50.5289 50.5291 50.5294 50.5297 50.53 50.5304 50.5307 50.531 50.5314 50.5318 50.5323 50.5327 50.5332 50.5337 50.5342 50.5347 50.5353 50.5359 50.5365 50.5372 50.5379 50.5386 50.5394 50.5402 50.541 50.542 50.543 50.544 50.5451 50.5462 50.5473 50.5484 50.5496 50.5509 50.5523 50.5542 50.5574 50.5631 50.5689 50.5741 50.5784 50.5817 50.5841 50.586 50.5877 50.5888 50.5879 50.5832 50.5785 50.575 50.5728 50.572 50.5725 50.574 50.5762 50.5788 50.5823 50.5865 50.5902 50.5937 50.5968 50.5996 50.6024 50.6051 50.6077 50.6102 50.6128 50.6154 50.618 50.6207 50.6235 50.6263 50.6292 50.6322 50.6352 50.6383 50.6414 50.6446 50.6479 50.6512 50.6546 50.6581 50.6616 50.6652 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8192 50.8251 50.831 50.8369 50.843 50.8491 50.8552 50.8616 50.8676 50.8744 50.8804 50.8874 50.8932 50.8999 50.9027 50.9257 50.5376 50.5234 50.5198 50.5196 50.5199 50.5202 50.5203 50.5204 50.5204 50.5204 50.5205 50.5205 50.5205 50.5205 50.5205 50.5205 50.5205 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5206 50.5207 50.5207 50.5207 50.5208 50.5208 50.5208 50.5208 50.5209 50.5209 50.5209 50.521 50.521 50.5211 50.5211 50.5212 50.5212 50.5213 50.5213 50.5214 50.5215 50.5216 50.5217 50.5218 50.5219 50.522 50.5221 50.5222 50.5223 50.5224 50.5226 50.5227 50.5229 50.5231 50.5233 50.5235 50.5237 50.5239 50.5242 50.5244 50.5247 50.525 50.5253 50.5256 50.5259 50.5262 50.5266 50.527 50.5274 50.5278 50.5283 50.5288 50.5293 50.5298 50.5304 50.531 50.5316 50.5323 50.533 50.5337 50.5345 50.5353 50.5363 50.5373 50.5384 50.5395 50.5406 50.5417 50.5428 50.5439 50.545 50.5463 50.5477 50.5498 50.5532 50.557 50.5607 50.5641 50.567 50.5695 50.5715 50.5732 50.5749 50.5763 50.5769 50.576 50.5752 50.5748 50.5749 50.5756 50.5767 50.5782 50.58 50.5821 50.5844 50.587 50.5896 50.5922 50.5948 50.5973 50.5998 50.6023 50.6048 50.6073 50.6098 50.6124 50.615 50.6177 50.6205 50.6233 50.6261 50.629 50.632 50.6351 50.6382 50.6413 50.6446 50.6478 50.6512 50.6546 50.6581 50.6616 50.6652 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8192 50.8251 50.831 50.8369 50.843 50.849 50.8552 50.8616 50.8676 50.8743 50.8805 50.8872 50.8936 50.8997 50.9042 50.9131 50.5429 50.5367 50.5331 50.53 50.528 50.527 50.5266 50.5264 50.5263 50.5263 50.5263 50.5262 50.5262 50.5262 50.5262 50.5262 50.5262 50.5263 50.5263 50.5263 50.5263 50.5263 50.5263 50.5263 50.5263 50.5264 50.5264 50.5264 50.5264 50.5264 50.5264 50.5264 50.5264 50.5265 50.5265 50.5265 50.5266 50.5266 50.5266 50.5267 50.5267 50.5267 50.5268 50.5268 50.5268 50.5269 50.527 50.527 50.5271 50.5272 50.5273 50.5273 50.5274 50.5275 50.5277 50.5278 50.5279 50.528 50.5282 50.5283 50.5285 50.5286 50.5288 50.529 50.5291 50.5294 50.5296 50.5298 50.5301 50.5303 50.5306 50.5309 50.5312 50.5315 50.5319 50.5322 50.5326 50.533 50.5334 50.5339 50.5343 50.5348 50.5353 50.5359 50.5364 50.537 50.5376 50.5382 50.5389 50.5396 50.5403 50.541 50.5418 50.5426 50.5435 50.5444 50.5454 50.5464 50.5474 50.5484 50.5495 50.5507 50.5519 50.5532 50.5546 50.5562 50.5583 50.5607 50.5631 50.5652 50.567 50.5688 50.5705 50.5722 50.5735 50.5746 50.5756 50.5768 50.5781 50.5796 50.5811 50.5829 50.5847 50.5867 50.5887 50.5908 50.593 50.5952 50.5975 50.5998 50.6022 50.6046 50.6071 50.6096 50.6122 50.6149 50.6176 50.6204 50.6232 50.626 50.629 50.632 50.635 50.6381 50.6413 50.6445 50.6478 50.6512 50.6546 50.658 50.6616 50.6652 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8193 50.8251 50.8309 50.8369 50.8429 50.8491 50.8552 50.8614 50.8679 50.8741 50.8808 50.8871 50.8937 50.9004 50.9062 50.9111 50.4953 50.5017 50.5055 50.5083 50.51 50.5109 50.5113 50.5115 50.5116 50.5117 50.5117 50.5117 50.5117 50.5117 50.5117 50.5117 50.5117 50.5117 50.5117 50.5118 50.5118 50.5118 50.5118 50.5118 50.5118 50.5119 50.5119 50.5119 50.5118 50.5119 50.5119 50.5119 50.5119 50.5119 50.512 50.512 50.512 50.5121 50.5121 50.5121 50.5122 50.5122 50.5123 50.5123 50.5124 50.5125 50.5125 50.5126 50.5127 50.5128 50.5129 50.5129 50.513 50.5131 50.5132 50.5134 50.5135 50.5136 50.5138 50.5139 50.5141 50.5143 50.5144 50.5146 50.5148 50.5151 50.5153 50.5156 50.5159 50.5162 50.5166 50.5169 50.5173 50.5177 50.5181 50.5185 50.519 50.5195 50.5201 50.5208 50.5214 50.5221 50.5227 50.5234 50.5242 50.525 50.5259 50.5268 50.5279 50.529 50.5301 50.5312 50.5323 50.5334 50.5344 50.5354 50.5365 50.5376 50.5389 50.5404 50.5427 50.5455 50.5484 50.5512 50.554 50.5567 50.5592 50.5615 50.5637 50.5656 50.5674 50.5691 50.5708 50.5724 50.5736 50.5745 50.5755 50.5766 50.5778 50.5791 50.5807 50.5823 50.5841 50.586 50.588 50.5901 50.5923 50.5945 50.5968 50.5992 50.6016 50.6041 50.6066 50.6092 50.6119 50.6146 50.6173 50.6201 50.623 50.6259 50.6289 50.6319 50.6349 50.6381 50.6413 50.6445 50.6478 50.6511 50.6546 50.658 50.6616 50.6652 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8193 50.8251 50.831 50.8369 50.843 50.849 50.8553 50.8614 50.8679 50.8741 50.8808 50.887 50.8941 50.9004 50.9086 50.913 50.5215 50.5337 50.5354 50.5344 50.5336 50.5332 50.5329 50.5328 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5327 50.5328 50.5328 50.5328 50.5328 50.5328 50.5328 50.5328 50.5328 50.5329 50.5329 50.5329 50.5329 50.533 50.533 50.533 50.533 50.5331 50.5331 50.5331 50.5332 50.5332 50.5333 50.5333 50.5334 50.5335 50.5335 50.5336 50.5336 50.5337 50.5338 50.5339 50.534 50.5341 50.5343 50.5344 50.5345 50.5346 50.5348 50.5349 50.5351 50.5353 50.5355 50.5357 50.5359 50.5362 50.5365 50.5367 50.537 50.5373 50.5376 50.5379 50.5383 50.5387 50.5391 50.5395 50.5399 50.5403 50.5408 50.5413 50.5418 50.5423 50.5429 50.5435 50.5442 50.5448 50.5455 50.5462 50.547 50.5477 50.5485 50.5493 50.5502 50.551 50.5519 50.5527 50.5537 50.5546 50.5557 50.5569 50.558 50.5589 50.5597 50.5605 50.5615 50.5626 50.564 50.5656 50.5675 50.5699 50.5728 50.5753 50.5773 50.5793 50.5811 50.5826 50.5831 50.5835 50.5842 50.5851 50.5862 50.5876 50.5892 50.591 50.5929 50.595 50.5971 50.5994 50.6018 50.6042 50.6067 50.6093 50.6119 50.6146 50.6173 50.6201 50.623 50.6259 50.6288 50.6319 50.6349 50.6381 50.6412 50.6445 50.6478 50.6511 50.6546 50.658 50.6616 50.6651 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8192 50.8251 50.831 50.8369 50.843 50.849 50.8553 50.8614 50.8679 50.8741 50.8808 50.8871 50.8942 50.9009 50.9101 50.9159 50.4763 50.5025 50.5094 50.5116 50.5122 50.5123 50.5123 50.5123 50.5123 50.5123 50.5123 50.5123 50.5123 50.5122 50.5122 50.5122 50.5122 50.5122 50.5122 50.5122 50.5123 50.5123 50.5123 50.5124 50.5124 50.5124 50.5124 50.5125 50.5125 50.5125 50.5125 50.5125 50.5125 50.5125 50.5125 50.5126 50.5126 50.5126 50.5127 50.5127 50.5127 50.5128 50.5128 50.5129 50.5129 50.513 50.5131 50.5132 50.5132 50.5133 50.5134 50.5136 50.5137 50.5139 50.5141 50.5142 50.5144 50.5145 50.5147 50.5148 50.515 50.5152 50.5154 50.5156 50.5158 50.516 50.5162 50.5164 50.5167 50.517 50.5173 50.5176 50.5179 50.5182 50.5186 50.519 50.5195 50.5199 50.5204 50.521 50.5215 50.5222 50.523 50.5238 50.5247 50.5256 50.5266 50.5275 50.5285 50.5294 50.5303 50.5312 50.5322 50.5331 50.534 50.535 50.5359 50.537 50.5381 50.5395 50.5411 50.5438 50.547 50.5501 50.5532 50.5561 50.5589 50.5616 50.564 50.5663 50.5683 50.5701 50.5719 50.5736 50.5752 50.5762 50.577 50.5778 50.5788 50.5799 50.5811 50.5826 50.5842 50.586 50.5879 50.5899 50.592 50.5943 50.5965 50.5989 50.6014 50.6039 50.6064 50.609 50.6117 50.6144 50.6172 50.62 50.6229 50.6258 50.6288 50.6318 50.6349 50.638 50.6412 50.6445 50.6478 50.6511 50.6545 50.658 50.6616 50.6651 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7219 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8192 50.8251 50.831 50.8369 50.843 50.849 50.8553 50.8614 50.8679 50.8741 50.8808 50.8871 50.8942 50.9009 50.9105 50.9145 50.4923 50.5169 50.5224 50.524 50.5243 50.5243 50.5243 50.5242 50.5242 50.5242 50.5242 50.5242 50.5242 50.5242 50.5242 50.5242 50.5242 50.5242 50.5241 50.5241 50.5242 50.5242 50.5242 50.5242 50.5243 50.5243 50.5243 50.5243 50.5243 50.5243 50.5244 50.5244 50.5244 50.5244 50.5245 50.5245 50.5245 50.5245 50.5245 50.5245 50.5246 50.5246 50.5247 50.5247 50.5248 50.5248 50.5249 50.5249 50.525 50.525 50.5251 50.5252 50.5253 50.5254 50.5255 50.5256 50.5257 50.5258 50.5259 50.5261 50.5263 50.5264 50.5266 50.5268 50.5269 50.5271 50.5273 50.5275 50.5277 50.5279 50.5281 50.5284 50.5286 50.5289 50.5292 50.5295 50.5299 50.5303 50.5307 50.5312 50.5316 50.532 50.5325 50.533 50.5336 50.5341 50.5346 50.5352 50.5359 50.5366 50.5374 50.5383 50.5392 50.5401 50.5411 50.542 50.5426 50.5426 50.5427 50.5432 50.544 50.5451 50.5465 50.5482 50.5508 50.5538 50.5565 50.559 50.5611 50.5629 50.5646 50.5663 50.5679 50.5693 50.5705 50.5717 50.573 50.5744 50.5759 50.5775 50.5792 50.581 50.583 50.585 50.5871 50.5892 50.5915 50.5938 50.5962 50.5987 50.6012 50.6037 50.6063 50.6089 50.6116 50.6143 50.6171 50.62 50.6228 50.6258 50.6288 50.6318 50.6349 50.638 50.6412 50.6445 50.6478 50.6511 50.6545 50.658 50.6615 50.6651 50.6688 50.6725 50.6763 50.6801 50.684 50.688 50.692 50.6961 50.7002 50.7044 50.7087 50.713 50.7174 50.7218 50.7264 50.731 50.7356 50.7403 50.7451 50.75 50.7549 50.7599 50.7649 50.7701 50.7752 50.7805 50.7858 50.7912 50.7967 50.8022 50.8078 50.8135 50.8192 50.8251 50.831 50.8369 50.843 50.849 50.8553 50.8614 50.8679 50.8741 50.8808 50.8871 50.8942 50.9009 50.9105 50.9144 50.471 50.5009 50.5075 50.5095 50.5099 50.5099 50.5099 50.5099 50.5099 50.5099 50.5098 50.5098 50.5097 50.5097 50.5097 50.5097 50.5098 50.5098 50.5098 50.5099 50.5099 50.5099 50.51 50.51 50.51 50.5099 50.5099 50.51 50.51 50.51 50.51 50.51 50.5101 50.5101 50.5101 50.5101 50.5102 50.5102 50.5102 50.5103 50.5103 50.5104 50.5105 50.5106 50.5107 50.5107 50.5108 50.5109 50.511 50.511 50.5111 50.5112 50.5113 50.5114 50.5116 50.5118 50.512 50.5123 50.5126 50.5128 50.5131 50.5133 50.5136 50.5139 50.5143 50.5147 50.5151 50.5155 50.5159 50.5163 50.5166 50.517 50.5173 50.5177 50.5183 50.5193 50.5208 50.5225 50.5239 50.5252 50.5263 50.5271 50.5278 50.5284 50.529 50.5292 50.5282 50.5232 50.5148 50.5066 50.4991 50.4927 50.4875 50.4837 50.481 50.4795 50.479 50.4792 50.48 50.4811 50.4825 50.4848 50.4897 50.4973 50.5048 50.512 50.5188 50.5252 50.5311 50.5365 50.5415 50.5462 50.5504 50.5543 50.558 50.5613 50.5645 50.5675 50.5704 50.5731 50.5757 50.5783 50.5808 50.5832 50.5856 50.5881 50.5905 50.593 50.5955 50.598 50.6005 50.6031 50.6057 50.6084 50.6111 50.6138 50.6166 50.6195 50.6223 50.6253 50.6283 50.6313 50.6344 50.6375 50.6407 50.644 50.6473 50.6506 50.6541 50.6575 50.6611 50.6647 50.6683 50.672 50.6758 50.6796 50.6835 50.6875 50.6915 50.6956 50.6997 50.7039 50.7082 50.7125 50.7169 50.7214 50.7259 50.7305 50.7351 50.7399 50.7446 50.7495 50.7544 50.7594 50.7645 50.7696 50.7748 50.78 50.7853 50.7907 50.7962 50.8017 50.8073 50.813 50.8188 50.8246 50.8305 50.8364 50.8425 50.8485 50.8548 50.8609 50.8674 50.8736 50.8804 50.8866 50.8937 50.9005 50.91 50.9163 50.8342 50.7931 50.7704 50.7571 50.7483 50.7416 50.7367 50.7342 50.7323 50.7321 50.7325 50.7344 50.7369 50.7415 50.7471 50.7547 50.7636 50.7751 50.7898 50.8088 50.8433 50.8146 50.7969 50.7868 50.7801 50.7759 50.773 50.7718 50.7717 50.7726 50.7744 50.7772 50.7808 50.7856 50.7917 50.7992 50.8079 50.8185 50.8317 50.8478 50.8497 50.8231 50.8027 50.7885 50.7793 50.773 50.7687 50.7662 50.765 50.765 50.7659 50.7678 50.7708 50.7752 50.781 50.7878 50.7971 50.8078 50.8217 50.8389 50.882 50.8741 50.8725 50.8746 50.8771 50.8791 50.8807 50.8825 50.8842 50.886 50.8876 50.8892 50.8906 50.892 50.8936 50.8956 50.8977 50.9012 50.9062 50.9128 50.9075 50.9044 50.9004 50.8963 50.8927 50.89 50.8886 50.888 50.8878 50.8879 50.8885 50.8894 50.89 50.8911 50.8921 50.8932 50.8946 50.8968 50.899 50.9027 50.9324 50.9407 50.9474 50.9528 50.9571 50.9604 50.9627 50.9643 50.9658 50.9672 50.9682 50.9687 50.9695 50.9698 50.9695 50.9689 50.9673 50.9655 50.9628 50.9597 50.9458 50.957 50.9617 50.9633 50.9644 50.9659 50.9671 50.9681 50.969 50.9698 50.9705 50.9711 50.9717 50.9719 50.9718 50.9712 50.9703 50.9683 50.9653 50.9605 50.9543 50.9735 50.9831 50.9867 50.9885 50.9902 50.9917 50.9928 50.9938 50.9947 50.9955 50.9963 50.997 50.9975 50.9977 50.9973 50.9963 50.9942 50.9907 50.9841 50.9569 50.9759 50.9843 50.9875 50.9891 50.9908 50.9923 50.9935 50.9946 50.9955 50.9965 50.9973 50.998 50.9986 50.9988 50.9985 50.9975 50.9956 50.9924 50.9866 50.9599 50.9805 50.9886 50.9916 50.993 50.9945 50.9958 50.9969 50.9978 50.9987 50.9995 51.0003 51.001 51.0015 51.0017 51.0014 51.0005 50.9987 50.9955 50.9897 50.8911 50.922 50.934 50.9423 50.9496 50.9567 50.9638 50.9712 50.9786 50.9863 50.994 51.0018 51.0097 51.0176 51.0256 51.0337 51.0419 51.0501 51.0585 51.0669 51.0753 51.0838 51.0924 51.101 51.1098 51.1186 51.1274 51.1363 51.1453 51.1544 51.1635 51.1726 51.1818 51.1911 51.2004 51.2097 51.2191 51.2286 51.2382 51.2478 51.2575 51.2672 51.277 51.2869 51.2968 51.3067 51.3167 51.3268 51.3369 51.3471 51.3573 51.3676 51.378 51.3884 51.3988 51.4094 51.42 51.4307 51.4414 51.4523 51.4631 51.4739 51.4849 51.4958 51.5069 51.518 51.5292 51.5405 51.5518 51.5632 51.5745 51.5858 51.5971 51.6085 51.6201 51.6322 51.6446 51.6574 51.6703 51.6832 51.6959 51.7084 51.7206 51.7332 51.7462 51.7591 51.7704 51.7777 51.7821 51.7855 51.7887 51.7926 51.7977 51.8043 51.8119 51.8221 51.8312 51.8431 51.8576 51.902 50.9097 50.9365 50.948 50.9564 50.9638 50.9711 50.9784 50.9858 50.9933 51.001 51.0087 51.0165 51.0244 51.0324 51.0404 51.0485 51.0567 51.065 51.0733 51.0816 51.0901 51.0985 51.1071 51.1158 51.1245 51.1333 51.1422 51.1511 51.16 51.169 51.1781 51.1872 51.1964 51.2057 51.215 51.2244 51.2339 51.2434 51.2529 51.2626 51.2722 51.282 51.2917 51.3016 51.3115 51.3214 51.3314 51.3414 51.3515 51.3616 51.3718 51.3821 51.3924 51.4027 51.4131 51.4236 51.4341 51.4447 51.4553 51.4659 51.4767 51.4874 51.4982 51.5091 51.52 51.5309 51.542 51.553 51.5641 51.5753 51.5865 51.5978 51.6091 51.6205 51.6319 51.6434 51.6548 51.6665 51.6781 51.6898 51.7016 51.7135 51.7253 51.7372 51.7493 51.7613 51.7733 51.7854 51.7976 51.81 51.8218 51.8347 51.8467 51.8602 51.8725 51.886 51.8977 51.9108 51.9193 51.9475 50.8954 50.9235 50.9361 50.9449 50.9524 50.9596 50.9669 50.9742 50.9817 50.9893 50.997 51.0048 51.0127 51.0207 51.0287 51.0368 51.0449 51.0532 51.0615 51.0698 51.0783 51.0868 51.0955 51.1041 51.1128 51.1216 51.1304 51.1393 51.1482 51.1573 51.1664 51.1756 51.1848 51.194 51.2034 51.2128 51.2222 51.2317 51.2413 51.2509 51.2606 51.2702 51.28 51.2898 51.2997 51.3096 51.3196 51.3297 51.3398 51.35 51.3603 51.3706 51.3809 51.3913 51.4018 51.4123 51.4228 51.4334 51.4441 51.4549 51.4656 51.4764 51.4873 51.4982 51.5091 51.5201 51.5311 51.5422 51.5533 51.5645 51.5758 51.5871 51.5985 51.6099 51.6213 51.6329 51.6445 51.6562 51.6679 51.6797 51.6915 51.7035 51.7155 51.7277 51.74 51.7524 51.7648 51.7774 51.79 51.8027 51.8153 51.828 51.8407 51.8537 51.8659 51.8794 51.8915 51.9043 51.9178 51.942 50.9344 50.9515 50.96 50.9665 50.9732 50.9802 50.9875 50.9949 51.0025 51.0102 51.0179 51.0257 51.0337 51.0416 51.0497 51.0578 51.066 51.0743 51.0826 51.091 51.0994 51.1079 51.1165 51.1251 51.1339 51.1427 51.1515 51.1604 51.1694 51.1784 51.1874 51.1966 51.2058 51.215 51.2244 51.2338 51.2432 51.2527 51.2623 51.2719 51.2815 51.2913 51.301 51.3109 51.3207 51.3307 51.3407 51.3507 51.3608 51.371 51.3812 51.3914 51.4017 51.4121 51.4225 51.433 51.4435 51.4541 51.4647 51.4754 51.4861 51.4969 51.5077 51.5186 51.5295 51.5405 51.5515 51.5626 51.5738 51.585 51.5962 51.6075 51.6189 51.6303 51.6417 51.6533 51.6649 51.6765 51.6882 51.6999 51.7117 51.7235 51.7354 51.7475 51.7594 51.7716 51.7835 51.796 51.8079 51.8207 51.8325 51.8456 51.8572 51.8704 51.8823 51.8958 51.9074 51.9207 51.9302 51.9426 50.9106 50.9227 50.9328 50.9421 50.9508 50.9589 50.9666 50.9742 50.9819 50.9896 50.9973 51.0052 51.013 51.021 51.029 51.0371 51.0453 51.0535 51.0619 51.0702 51.0787 51.0872 51.0958 51.1044 51.1131 51.1219 51.1307 51.1397 51.1486 51.1576 51.1667 51.1759 51.1851 51.1944 51.2037 51.2131 51.2226 51.232 51.2416 51.2512 51.2608 51.2705 51.2803 51.2901 51.3 51.3099 51.32 51.33 51.3401 51.3503 51.3605 51.3708 51.3811 51.3915 51.4019 51.4124 51.4229 51.4335 51.4441 51.4548 51.4655 51.4763 51.4871 51.498 51.5089 51.5199 51.531 51.5421 51.5532 51.5645 51.5758 51.5871 51.5985 51.61 51.6215 51.6331 51.6447 51.6564 51.6682 51.6801 51.692 51.704 51.7161 51.7282 51.7404 51.7526 51.765 51.7774 51.79 51.8026 51.8154 51.8281 51.841 51.8537 51.8667 51.879 51.8921 51.9045 51.9175 51.9309 50.9517 50.9535 50.9574 50.9622 50.9678 50.9744 50.9814 50.9887 50.9962 51.0039 51.0117 51.0195 51.0274 51.0354 51.0434 51.0515 51.0597 51.0679 51.0762 51.0846 51.0931 51.1016 51.1102 51.1189 51.1275 51.1363 51.1451 51.154 51.163 51.172 51.1811 51.1903 51.1995 51.2088 51.2181 51.2275 51.2369 51.2464 51.256 51.2656 51.2753 51.285 51.2947 51.3046 51.3144 51.3244 51.3343 51.3444 51.3545 51.3647 51.3749 51.3851 51.3954 51.4058 51.4162 51.4267 51.4372 51.4478 51.4584 51.4691 51.4798 51.4906 51.5014 51.5123 51.5232 51.5342 51.5453 51.5564 51.5675 51.5787 51.5899 51.6012 51.6126 51.624 51.6354 51.6469 51.6585 51.6701 51.6818 51.6935 51.7053 51.7171 51.729 51.741 51.753 51.765 51.7772 51.7892 51.8016 51.8136 51.8264 51.8382 51.8512 51.8631 51.8764 51.8884 51.9017 51.9138 51.9278 51.9396 50.9464 50.9409 50.9452 50.9522 50.9598 50.9674 50.975 50.9827 50.9903 50.998 51.0058 51.0136 51.0214 51.0294 51.0374 51.0455 51.0537 51.062 51.0703 51.0787 51.0871 51.0956 51.1042 51.1129 51.1216 51.1304 51.1392 51.1481 51.1571 51.1661 51.1752 51.1843 51.1935 51.2028 51.2121 51.2215 51.231 51.2405 51.25 51.2596 51.2692 51.2789 51.2887 51.2985 51.3084 51.3184 51.3284 51.3384 51.3485 51.3587 51.3689 51.3792 51.3895 51.3999 51.4103 51.4207 51.4313 51.4418 51.4525 51.4631 51.4739 51.4846 51.4955 51.5063 51.5173 51.5283 51.5393 51.5504 51.5615 51.5727 51.584 51.5953 51.6066 51.618 51.6295 51.641 51.6526 51.6642 51.6759 51.6876 51.6994 51.7112 51.7231 51.7351 51.7472 51.7593 51.7715 51.7837 51.7959 51.8082 51.8208 51.8331 51.846 51.8583 51.8717 51.884 51.8977 51.91 51.9247 51.9384 50.9618 50.9506 50.9519 50.9579 50.9648 50.9721 50.9795 50.9869 50.9945 51.0022 51.01 51.0178 51.0257 51.0336 51.0417 51.0498 51.058 51.0663 51.0746 51.083 51.0914 51.0999 51.1085 51.1171 51.1258 51.1346 51.1435 51.1524 51.1614 51.1704 51.1795 51.1886 51.1978 51.2071 51.2164 51.2258 51.2353 51.2448 51.2543 51.2639 51.2735 51.2832 51.293 51.3028 51.3127 51.3227 51.3327 51.3427 51.3528 51.363 51.3732 51.3835 51.3938 51.4042 51.4146 51.425 51.4356 51.4461 51.4568 51.4674 51.4782 51.4889 51.4998 51.5107 51.5216 51.5326 51.5436 51.5547 51.5658 51.577 51.5883 51.5996 51.6109 51.6224 51.6338 51.6453 51.6569 51.6685 51.6802 51.6919 51.7037 51.7155 51.7274 51.7394 51.7514 51.7635 51.7756 51.7878 51.8001 51.8123 51.8249 51.8369 51.85 51.8619 51.8752 51.8873 51.901 51.9134 51.9285 51.9406 50.9616 50.9498 50.9516 50.9578 50.9648 50.9722 50.9796 50.9871 50.9947 51.0024 51.0101 51.0179 51.0258 51.0338 51.0419 51.05 51.0582 51.0665 51.0748 51.0832 51.0916 51.1001 51.1086 51.1173 51.126 51.1348 51.1437 51.1526 51.1616 51.1706 51.1796 51.1888 51.198 51.2072 51.2166 51.226 51.2354 51.2449 51.2545 51.264 51.2737 51.2834 51.2932 51.303 51.3129 51.3228 51.3329 51.3429 51.353 51.3632 51.3734 51.3836 51.394 51.4043 51.4147 51.4252 51.4357 51.4463 51.4569 51.4676 51.4783 51.4891 51.4999 51.5108 51.5218 51.5327 51.5438 51.5549 51.566 51.5772 51.5884 51.5997 51.6111 51.6225 51.634 51.6455 51.6571 51.6687 51.6803 51.6921 51.7038 51.7157 51.7276 51.7395 51.7516 51.7636 51.7758 51.788 51.8003 51.8125 51.825 51.8373 51.8501 51.8622 51.8755 51.8876 51.9014 51.9137 51.9288 51.9405 50.9615 50.9486 50.9501 50.9562 50.9632 50.9705 50.9779 50.9854 50.9929 51.0006 51.0084 51.0162 51.0241 51.0321 51.0401 51.0483 51.0565 51.0647 51.073 51.0814 51.0898 51.0983 51.1069 51.1155 51.1242 51.133 51.1419 51.1508 51.1598 51.1688 51.1778 51.187 51.1962 51.2055 51.2148 51.2242 51.2336 51.2431 51.2526 51.2622 51.2719 51.2816 51.2913 51.3012 51.3111 51.321 51.331 51.3411 51.3512 51.3613 51.3715 51.3818 51.3921 51.4025 51.4129 51.4234 51.4339 51.4444 51.4551 51.4657 51.4765 51.4873 51.4981 51.509 51.5199 51.5309 51.5419 51.553 51.5641 51.5753 51.5866 51.5979 51.6092 51.6206 51.6321 51.6436 51.6552 51.6668 51.6784 51.6902 51.702 51.7138 51.7257 51.7377 51.7497 51.7618 51.774 51.7862 51.7985 51.8108 51.8232 51.8355 51.8482 51.8607 51.8738 51.8863 51.9001 51.9126 51.9277 51.9414 51.8531 51.8348 51.8245 51.8196 51.8168 51.8155 51.8156 51.8163 51.8182 51.8205 51.8237 51.8272 51.8317 51.8363 51.842 51.848 51.8555 51.864 51.8745 51.8865 51.903 51.8899 51.8815 51.8776 51.8759 51.8753 51.8766 51.8775 51.8803 51.8824 51.8864 51.8894 51.8943 51.8982 51.904 51.9087 51.9157 51.9221 51.9311 51.9395 51.906 51.8934 51.8841 51.8779 51.8747 51.8737 51.8739 51.8752 51.8772 51.8798 51.8829 51.8866 51.891 51.8957 51.9011 51.9072 51.9144 51.9224 51.9317 51.9426 51.9327 51.9307 51.9324 51.9364 51.9402 51.9433 51.9461 51.949 51.9518 51.9546 51.9572 51.9599 51.9625 51.9651 51.9679 51.9707 51.9742 51.9782 51.9826 51.9878 51.9371 51.9386 51.9392 51.9394 51.9396 51.9405 51.9422 51.9444 51.9469 51.9497 51.9522 51.9552 51.958 51.9611 51.964 51.9674 51.9707 51.9744 51.9782 51.9828 51.9547 51.9611 51.9672 51.9726 51.9775 51.9816 51.9852 51.9882 51.991 51.9935 51.9963 51.9987 52.001 52.0032 52.0052 52.007 52.0086 52.0101 52.0111 52.0119 51.9588 51.9669 51.9717 51.9751 51.9782 51.9814 51.9846 51.9877 51.9909 51.994 51.9973 52.0006 52.0038 52.007 52.0102 52.0132 52.0159 52.0181 52.0197 52.0204 51.967 51.9792 51.9868 51.9911 51.9944 51.9977 52.001 52.0043 52.0076 52.011 52.0142 52.0176 52.0206 52.0242 52.0275 52.0306 52.0337 52.0361 52.0382 52.038 51.9684 51.9807 51.9876 51.9918 51.9953 51.9989 52.0023 52.0056 52.0088 52.0118 52.0146 52.0171 52.0194 52.0213 52.0229 52.0242 52.0251 52.0261 52.0251 52.0269 51.9701 51.9834 51.9902 51.9944 51.9979 52.0012 52.0044 52.0073 52.0099 52.012 52.0136 52.0144 52.0138 52.0112 52.0057 51.9965 51.9826 51.9641 51.9453 51.9371 51.9367 51.9661 51.987 52.0072 52.0259 52.0429 52.0594 52.0757 52.0915 52.1067 52.1217 52.1365 52.1512 52.1657 52.1803 52.1947 52.2092 52.2236 52.238 52.2525 52.2669 52.2814 52.2959 52.3104 52.3248 52.3393 52.3538 52.3683 52.3829 52.3976 52.4122 52.4269 52.4415 52.4562 52.4709 52.4857 52.5004 52.5152 52.5299 52.5447 52.5595 52.5743 52.5892 52.604 52.6189 52.6338 52.6488 52.6637 52.6786 52.6936 52.7086 52.7236 52.7386 52.7536 52.7686 52.7836 52.7986 52.8137 52.8288 52.8439 52.859 52.8741 52.8892 52.9043 52.9194 52.9342 52.9489 52.9638 52.9788 52.9942 53.0099 53.0261 53.0422 53.0581 53.0736 53.0887 53.1042 53.1203 53.1365 53.1512 53.1619 53.1688 53.174 53.1787 53.184 53.1904 53.1983 53.2077 53.2184 53.2301 53.2427 53.2563 53.2707 53.2863 53.3031 53.3205 53.339 53.3604 53.3822 53.4031 53.423 53.4424 53.4613 53.4792 53.4964 53.5133 53.5299 53.5461 53.5617 53.577 53.592 53.6067 53.6212 53.6354 53.6495 53.6635 53.6773 53.691 53.7047 53.7182 53.7317 53.745 53.7583 53.7716 53.7848 53.7979 53.811 53.824 53.8369 53.8498 53.8626 53.8754 53.8881 53.9008 53.9134 53.9259 53.9384 53.9508 53.9632 53.9756 53.9878 54.0001 54.0122 54.0243 54.0364 54.0484 54.0604 54.0722 54.0841 54.0958 54.1076 54.1192 54.1308 54.1424 54.1538 54.1652 54.1766 54.1879 54.1991 54.2103 54.2213 54.2324 54.2433 54.2542 54.265 54.2758 54.2864 54.297 54.3076 54.318 54.3284 54.3387 54.349 54.359 54.3692 54.379 54.3892 54.3987 54.4088 54.4181 54.4281 54.4372 54.4471 54.4559 54.4658 54.4743 54.4841 54.4924 54.502 54.5102 54.5197 54.5277 54.537 54.5449 54.5538 54.562 54.5699 54.5789 54.5862 54.5942 51.9764 51.9992 52.0169 52.0336 52.0496 52.0655 52.0809 52.0961 52.111 52.1256 52.1399 52.154 52.168 52.1819 52.1958 52.2098 52.2238 52.2379 52.252 52.2663 52.2806 52.295 52.3095 52.3241 52.3386 52.3532 52.3679 52.3825 52.3972 52.4119 52.4266 52.4414 52.4561 52.4709 52.4856 52.5004 52.5152 52.5299 52.5447 52.5596 52.5744 52.5893 52.6041 52.619 52.6339 52.6488 52.6636 52.6785 52.6934 52.7083 52.7232 52.7381 52.753 52.7679 52.7828 52.7977 52.8126 52.8275 52.8424 52.8573 52.8722 52.887 52.9019 52.9168 52.9316 52.9464 52.9612 52.9761 52.9909 53.0057 53.0204 53.0352 53.05 53.0648 53.0794 53.0941 53.1088 53.1235 53.1381 53.1528 53.1676 53.1822 53.1967 53.2111 53.2255 53.2404 53.2554 53.2702 53.2849 53.2992 53.313 53.3266 53.3402 53.354 53.3683 53.3832 53.3985 53.4141 53.4298 53.4453 53.4607 53.4757 53.4903 53.5046 53.5185 53.5321 53.5455 53.5587 53.5719 53.5852 53.5984 53.6117 53.6251 53.6385 53.6519 53.6653 53.6788 53.6922 53.7056 53.719 53.7324 53.7457 53.7589 53.7721 53.7853 53.7984 53.8114 53.8244 53.8374 53.8502 53.8631 53.8758 53.8885 53.9012 53.9138 53.9264 53.9388 53.9513 53.9637 53.976 53.9883 54.0005 54.0127 54.0248 54.0368 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3184 54.3288 54.3391 54.3494 54.3594 54.3697 54.3794 54.3896 54.3992 54.4092 54.4186 54.4285 54.4376 54.4475 54.4563 54.4662 54.4747 54.4845 54.4928 54.5025 54.5106 54.5201 54.5281 54.5374 54.5452 54.5544 54.5621 54.571 54.5786 54.5872 54.5945 51.9786 52.0026 52.0204 52.036 52.0505 52.0649 52.0793 52.0939 52.1082 52.1222 52.1359 52.1492 52.1624 52.1756 52.1887 52.202 52.2154 52.2291 52.2429 52.2568 52.271 52.2852 52.2995 52.3138 52.3282 52.3427 52.3572 52.3717 52.3863 52.4008 52.4154 52.43 52.4446 52.4593 52.474 52.4887 52.5034 52.5182 52.533 52.5478 52.5626 52.5774 52.5923 52.6071 52.622 52.6369 52.6518 52.6667 52.6817 52.6966 52.7116 52.7265 52.7415 52.7564 52.7714 52.7864 52.8013 52.8163 52.8312 52.8461 52.861 52.8759 52.8908 52.9057 52.9205 52.9354 52.9502 52.9651 52.9799 52.9948 53.0097 53.0246 53.0395 53.0544 53.0692 53.0841 53.099 53.1139 53.1289 53.1439 53.1589 53.1739 53.189 53.2039 53.2189 53.2338 53.2486 53.2632 53.2778 53.2923 53.3067 53.3214 53.3364 53.3517 53.3675 53.3836 53.4 53.4162 53.4321 53.4478 53.4633 53.4786 53.4938 53.5087 53.5232 53.5372 53.5507 53.5638 53.5766 53.5892 53.6018 53.6146 53.6274 53.6403 53.6533 53.6665 53.6796 53.6929 53.7061 53.7194 53.7327 53.7459 53.7591 53.7723 53.7854 53.7985 53.8115 53.8245 53.8374 53.8503 53.8631 53.8759 53.8886 53.9012 53.9138 53.9264 53.9389 53.9513 53.9637 53.976 53.9883 54.0005 54.0127 54.0248 54.0368 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3184 54.3288 54.3391 54.3494 54.3594 54.3697 54.3794 54.3896 54.3992 54.4092 54.4186 54.4285 54.4376 54.4475 54.4563 54.4662 54.4747 54.4845 54.4928 54.5025 54.5106 54.5201 54.5281 54.5374 54.5452 54.5544 54.5621 54.571 54.5786 54.5872 54.5946 52.0048 52.0238 52.0388 52.0527 52.0664 52.0802 52.0942 52.1085 52.1232 52.1382 52.1533 52.1684 52.1832 52.1977 52.2117 52.2254 52.2389 52.2522 52.2656 52.279 52.2927 52.3065 52.3204 52.3345 52.3488 52.3631 52.3775 52.392 52.4065 52.4211 52.4358 52.4505 52.4652 52.48 52.4948 52.5096 52.5244 52.5392 52.554 52.5689 52.5838 52.5986 52.6135 52.6284 52.6433 52.6582 52.6731 52.688 52.7029 52.7179 52.7328 52.7477 52.7626 52.7776 52.7925 52.8074 52.8223 52.8372 52.8522 52.8671 52.882 52.8969 52.9118 52.9267 52.9416 52.9564 52.9713 52.9862 53.001 53.0158 53.0307 53.0455 53.0603 53.0751 53.0899 53.1046 53.1194 53.1341 53.1488 53.1635 53.1781 53.1928 53.2075 53.2221 53.2366 53.2511 53.2657 53.2803 53.2948 53.3092 53.3235 53.3378 53.3521 53.3665 53.3808 53.3951 53.4094 53.4233 53.4367 53.4501 53.4638 53.4777 53.4918 53.5064 53.5218 53.5376 53.5531 53.5678 53.5815 53.5943 53.6065 53.6186 53.6307 53.643 53.6554 53.6681 53.681 53.6939 53.707 53.7201 53.7332 53.7463 53.7595 53.7726 53.7856 53.7987 53.8117 53.8246 53.8375 53.8504 53.8632 53.8759 53.8886 53.9012 53.9138 53.9264 53.9389 53.9513 53.9637 53.976 53.9883 54.0005 54.0127 54.0248 54.0369 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3184 54.3288 54.3391 54.3494 54.3594 54.3697 54.3795 54.3896 54.3992 54.4092 54.4186 54.4285 54.4376 54.4475 54.4563 54.4662 54.4747 54.4845 54.4928 54.5025 54.5106 54.5201 54.5281 54.5374 54.5452 54.5544 54.5621 54.571 54.5787 54.587 54.5947 51.9939 52.0098 52.0247 52.0393 52.0536 52.0676 52.0813 52.0949 52.1084 52.1216 52.1348 52.1478 52.1609 52.1741 52.1875 52.201 52.2148 52.2287 52.2428 52.2569 52.2711 52.2855 52.2999 52.3143 52.3287 52.3432 52.3577 52.3722 52.3868 52.4013 52.4159 52.4305 52.4452 52.4598 52.4745 52.4892 52.504 52.5187 52.5335 52.5483 52.5631 52.5779 52.5927 52.6076 52.6224 52.6373 52.6522 52.667 52.6819 52.6968 52.7117 52.7267 52.7416 52.7565 52.7714 52.7863 52.8013 52.8162 52.8311 52.846 52.861 52.8759 52.8908 52.9057 52.9206 52.9355 52.9504 52.9653 52.9802 52.9951 53.01 53.025 53.0399 53.0549 53.0698 53.0847 53.0996 53.1144 53.1293 53.1442 53.1591 53.1741 53.1891 53.2041 53.2191 53.2341 53.2488 53.2636 53.2782 53.2926 53.3072 53.3219 53.337 53.3524 53.3682 53.3844 53.4006 53.4165 53.4322 53.4477 53.4631 53.4782 53.4931 53.5076 53.5217 53.5355 53.5488 53.5619 53.5748 53.5877 53.6006 53.6136 53.6267 53.6399 53.6532 53.6665 53.6798 53.6931 53.7064 53.7197 53.733 53.7462 53.7594 53.7725 53.7856 53.7987 53.8117 53.8246 53.8375 53.8504 53.8632 53.8759 53.8886 53.9013 53.9138 53.9264 53.9389 53.9513 53.9637 53.976 53.9883 54.0005 54.0127 54.0248 54.0369 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3184 54.3289 54.3391 54.3494 54.3594 54.3697 54.3795 54.3896 54.3992 54.4092 54.4186 54.4285 54.4376 54.4475 54.4563 54.4662 54.4747 54.4845 54.4928 54.5025 54.5106 54.5201 54.5281 54.5374 54.5452 54.5544 54.5621 54.571 54.5786 54.5873 54.5947 52.0125 52.0239 52.0371 52.0507 52.0647 52.0788 52.0929 52.1067 52.1203 52.1337 52.1469 52.1601 52.1733 52.1866 52.2001 52.2139 52.2279 52.2421 52.2563 52.2707 52.2851 52.2996 52.314 52.3285 52.343 52.3575 52.372 52.3866 52.4012 52.4158 52.4304 52.445 52.4597 52.4744 52.4891 52.5038 52.5185 52.5333 52.5481 52.5629 52.5777 52.5925 52.6074 52.6222 52.6371 52.6519 52.6668 52.6817 52.6966 52.7115 52.7264 52.7413 52.7562 52.7711 52.7861 52.801 52.8159 52.8308 52.8458 52.8607 52.8756 52.8905 52.9054 52.9202 52.9351 52.95 52.9648 52.9797 52.9945 53.0094 53.0242 53.0389 53.0537 53.0685 53.0833 53.098 53.1127 53.1275 53.1421 53.1568 53.1715 53.1861 53.2007 53.2153 53.2298 53.2443 53.2589 53.2734 53.2878 53.3023 53.3167 53.3313 53.3457 53.3599 53.374 53.3881 53.4025 53.4171 53.4319 53.447 53.4622 53.4775 53.4926 53.5075 53.5218 53.5357 53.5491 53.5622 53.5752 53.5881 53.6011 53.6142 53.6273 53.6406 53.6539 53.6672 53.6806 53.6939 53.7072 53.7204 53.7337 53.7468 53.7599 53.773 53.7861 53.799 53.812 53.8249 53.8377 53.8506 53.8633 53.876 53.8887 53.9013 53.9139 53.9264 53.9389 53.9513 53.9637 53.976 53.9883 54.0005 54.0127 54.0248 54.0369 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3185 54.3288 54.3391 54.3494 54.3595 54.3696 54.3795 54.3895 54.3992 54.4092 54.4187 54.4283 54.4379 54.4472 54.4568 54.4657 54.4752 54.4841 54.4932 54.5022 54.5108 54.52 54.5282 54.5372 54.5456 54.5539 54.5625 54.5706 54.5789 54.587 54.5951 52.0183 52.0266 52.04 52.0541 52.0685 52.0826 52.0955 52.1073 52.1183 52.1293 52.1406 52.1525 52.165 52.1782 52.192 52.2062 52.2207 52.2354 52.2501 52.2648 52.2794 52.294 52.3085 52.323 52.3375 52.3519 52.3664 52.3809 52.3954 52.4099 52.4245 52.4391 52.4537 52.4684 52.4831 52.4978 52.5125 52.5273 52.542 52.5568 52.5716 52.5864 52.6013 52.6161 52.631 52.6458 52.6607 52.6756 52.6905 52.7054 52.7203 52.7352 52.7501 52.765 52.7799 52.7949 52.8098 52.8247 52.8396 52.8545 52.8694 52.8843 52.8992 52.9141 52.929 52.9438 52.9587 52.9736 52.9884 53.0032 53.0181 53.0329 53.0477 53.0625 53.0772 53.092 53.1067 53.1215 53.1362 53.1509 53.1656 53.1803 53.1949 53.2096 53.2243 53.239 53.2538 53.2686 53.2833 53.298 53.3125 53.3268 53.341 53.3553 53.3705 53.3862 53.4026 53.4195 53.4363 53.4527 53.4692 53.4857 53.5018 53.5168 53.5303 53.5426 53.554 53.565 53.576 53.5873 53.599 53.6112 53.6241 53.6374 53.6511 53.6649 53.6789 53.6927 53.7065 53.7201 53.7336 53.7469 53.7601 53.7732 53.7862 53.7992 53.8121 53.825 53.8379 53.8506 53.8634 53.8761 53.8888 53.9014 53.9139 53.9265 53.9389 53.9513 53.9637 53.976 53.9883 54.0005 54.0127 54.0248 54.0369 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3184 54.3288 54.3391 54.3493 54.3595 54.3695 54.3797 54.3893 54.3995 54.4089 54.4189 54.4282 54.4379 54.4472 54.4568 54.4656 54.4754 54.4838 54.4935 54.5018 54.5113 54.5194 54.5288 54.5367 54.5459 54.5537 54.5627 54.5703 54.5792 54.587 54.5953 52.0338 52.0391 52.0516 52.0659 52.0799 52.0925 52.1035 52.113 52.1218 52.1304 52.1396 52.1501 52.1621 52.1755 52.19 52.2052 52.2209 52.2367 52.2524 52.2679 52.2831 52.298 52.3128 52.3275 52.342 52.3565 52.371 52.3855 52.3999 52.4144 52.429 52.4436 52.4582 52.4728 52.4875 52.5022 52.5169 52.5317 52.5464 52.5612 52.576 52.5908 52.6056 52.6205 52.6353 52.6502 52.6651 52.68 52.6948 52.7097 52.7247 52.7396 52.7545 52.7694 52.7843 52.7993 52.8142 52.8291 52.844 52.8589 52.8738 52.8887 52.9036 52.9185 52.9334 52.9483 52.9631 52.978 52.9928 53.0076 53.0224 53.0373 53.0521 53.0669 53.0816 53.0964 53.1111 53.1258 53.1405 53.1552 53.1699 53.1845 53.1991 53.2137 53.2283 53.2429 53.2575 53.2721 53.2867 53.3015 53.3161 53.3305 53.3446 53.3586 53.3728 53.3879 53.4042 53.4214 53.4392 53.4588 53.4781 53.4962 53.5135 53.5304 53.5469 53.5623 53.5742 53.5808 53.5864 53.5923 53.5994 53.6081 53.6187 53.6309 53.6445 53.659 53.6742 53.6894 53.7044 53.719 53.7332 53.7469 53.7604 53.7736 53.7866 53.7996 53.8125 53.8253 53.8381 53.8509 53.8636 53.8762 53.8889 53.9015 53.914 53.9265 53.939 53.9514 53.9637 53.9761 53.9883 54.0005 54.0127 54.0248 54.0369 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3185 54.3288 54.3391 54.3493 54.3596 54.3695 54.3797 54.3893 54.3995 54.4088 54.419 54.4281 54.4381 54.447 54.457 54.4655 54.4754 54.4838 54.4935 54.5018 54.5113 54.5194 54.5288 54.5367 54.5459 54.5537 54.5627 54.5703 54.5793 54.5865 54.5955 52.0187 52.0212 52.0309 52.0419 52.0527 52.0618 52.0694 52.077 52.0861 52.0976 52.1115 52.1274 52.1444 52.1634 52.1838 52.2024 52.22 52.237 52.2539 52.27 52.2849 52.2995 52.3139 52.3283 52.3427 52.357 52.3714 52.3858 52.4002 52.4147 52.4292 52.4438 52.4584 52.473 52.4877 52.5024 52.5171 52.5319 52.5466 52.5614 52.5762 52.591 52.6058 52.6206 52.6355 52.6504 52.6652 52.6801 52.695 52.7099 52.7248 52.7397 52.7546 52.7696 52.7845 52.7994 52.8143 52.8292 52.8442 52.8591 52.874 52.8889 52.9038 52.9187 52.9335 52.9484 52.9633 52.9781 52.993 53.0078 53.0226 53.0374 53.0522 53.067 53.0818 53.0965 53.1113 53.126 53.1407 53.1554 53.17 53.1847 53.1993 53.2139 53.2285 53.2431 53.2578 53.2725 53.2871 53.3018 53.3164 53.3307 53.3448 53.359 53.3736 53.3888 53.4047 53.4211 53.4377 53.4545 53.4713 53.488 53.5044 53.52 53.5332 53.5406 53.5454 53.5501 53.5559 53.5638 53.5744 53.588 53.6037 53.6204 53.6386 53.6569 53.6743 53.6909 53.707 53.7223 53.7356 53.7485 53.7614 53.7742 53.787 53.7999 53.8126 53.8254 53.8382 53.8509 53.8636 53.8763 53.8889 53.9015 53.914 53.9265 53.939 53.9514 53.9637 53.9761 53.9883 54.0005 54.0127 54.0248 54.0369 54.0489 54.0608 54.0727 54.0845 54.0963 54.108 54.1197 54.1313 54.1428 54.1543 54.1657 54.177 54.1883 54.1995 54.2107 54.2218 54.2328 54.2438 54.2546 54.2655 54.2762 54.2869 54.2975 54.308 54.3185 54.3288 54.3392 54.3493 54.3596 54.3695 54.3797 54.3893 54.3995 54.4088 54.419 54.4281 54.4381 54.447 54.457 54.4655 54.4754 54.4838 54.4935 54.5018 54.5113 54.5194 54.5288 54.5367 54.5459 54.5537 54.5627 54.5703 54.5793 54.5863 54.5953 51.9135 51.8857 51.8735 51.8634 51.8572 51.86 51.8721 51.8895 51.9167 51.9686 52.0273 52.0794 52.1236 52.1593 52.1873 52.2095 52.2282 52.2454 52.2617 52.2753 52.2876 52.3004 52.3137 52.3274 52.3413 52.3554 52.3696 52.3839 52.3983 52.4128 52.4273 52.4419 52.4565 52.4712 52.4859 52.5006 52.5153 52.53 52.5448 52.5595 52.5743 52.5891 52.604 52.6188 52.6336 52.6485 52.6634 52.6783 52.6931 52.708 52.7229 52.7379 52.7528 52.7677 52.7826 52.7975 52.8125 52.8274 52.8423 52.8572 52.8721 52.887 52.9019 52.9168 52.9316 52.9465 52.9614 52.9762 52.991 53.0059 53.0207 53.0355 53.0503 53.0651 53.0799 53.0946 53.1094 53.1241 53.1388 53.1535 53.1682 53.1829 53.1975 53.2121 53.2267 53.2413 53.2561 53.2709 53.2857 53.3005 53.3151 53.3294 53.3438 53.3586 53.374 53.39 53.4055 53.419 53.4263 53.4135 53.381 53.3479 53.319 53.2977 53.2859 53.2845 53.2926 53.3074 53.3261 53.3589 53.4253 53.4957 53.5542 53.6005 53.6358 53.6623 53.6832 53.7007 53.7167 53.7304 53.7408 53.7516 53.7631 53.775 53.7873 53.7998 53.8124 53.8251 53.8378 53.8505 53.8632 53.8758 53.8884 53.901 53.9136 53.9261 53.9385 53.9509 53.9633 53.9756 53.9879 54.0001 54.0122 54.0244 54.0364 54.0484 54.0604 54.0722 54.0841 54.0959 54.1076 54.1192 54.1308 54.1424 54.1538 54.1652 54.1766 54.1879 54.1991 54.2103 54.2213 54.2324 54.2433 54.2542 54.265 54.2758 54.2864 54.297 54.3075 54.318 54.3284 54.3387 54.3489 54.3591 54.369 54.3792 54.3889 54.3991 54.4084 54.4185 54.4276 54.4377 54.4465 54.4565 54.4651 54.475 54.4834 54.4931 54.5013 54.5109 54.519 54.5283 54.5363 54.5455 54.5533 54.5623 54.5699 54.5789 54.5857 54.5951 54.5993 54.6016 54.6037 54.6057 54.6077 54.6093 54.6107 54.612 54.6133 54.6149 54.6165 54.6183 54.62 54.6218 54.6235 54.6252 54.6269 54.6286 54.6303 54.6321 54.5995 54.6018 54.6037 54.6056 54.6075 54.6093 54.611 54.6125 54.614 54.6156 54.6172 54.6189 54.6206 54.6224 54.6241 54.6259 54.6276 54.6293 54.631 54.6329 54.5994 54.6017 54.6037 54.6056 54.6075 54.6093 54.611 54.6127 54.6142 54.616 54.6174 54.6193 54.6209 54.6227 54.6243 54.6262 54.6278 54.6296 54.6312 54.6331 54.5995 54.6017 54.6037 54.6056 54.6074 54.6093 54.611 54.6129 54.6146 54.6164 54.618 54.6198 54.6213 54.6231 54.6245 54.6261 54.6273 54.6289 54.6302 54.632 54.5999 54.6021 54.6041 54.6061 54.6079 54.6098 54.6116 54.6134 54.6153 54.6171 54.619 54.6209 54.6227 54.6246 54.6265 54.6283 54.6302 54.6319 54.6337 54.6354 54.5997 54.6013 54.603 54.6048 54.6066 54.6084 54.6102 54.612 54.6138 54.6156 54.6173 54.619 54.6206 54.6223 54.6238 54.6253 54.6267 54.6281 54.6295 54.631 54.6004 54.6021 54.6039 54.6057 54.6075 54.6093 54.6111 54.613 54.6147 54.6167 54.6185 54.6205 54.6224 54.6242 54.6262 54.628 54.6299 54.6318 54.6337 54.6355 54.5994 54.6006 54.6018 54.6033 54.605 54.6068 54.6086 54.6104 54.6123 54.6142 54.6162 54.6182 54.6202 54.6221 54.6241 54.6259 54.6278 54.6297 54.6315 54.6333 54.5995 54.6007 54.6022 54.6039 54.6056 54.6075 54.6094 54.6114 54.6135 54.6156 54.6177 54.6198 54.6219 54.624 54.6261 54.6282 54.6302 54.6321 54.634 54.6358 54.599 54.6001 54.6016 54.6033 54.6052 54.6071 54.6092 54.6112 54.6132 54.6152 54.6173 54.6192 54.6213 54.6232 54.6252 54.6271 54.6291 54.6309 54.6329 54.6347 54.6361 54.6444 54.6538 54.6634 54.6728 54.6818 54.6905 54.6992 54.7081 54.7169 54.7256 54.734 54.7423 54.7504 54.7585 54.7666 54.7746 54.7824 54.7902 54.7978 54.8054 54.8129 54.8202 54.8275 54.8347 54.8419 54.8489 54.8558 54.8627 54.8695 54.8762 54.8828 54.8894 54.8958 54.9022 54.9084 54.9146 54.9207 54.9266 54.9326 54.9384 54.9441 54.9498 54.9554 54.9609 54.9663 54.9715 54.9768 54.982 54.9871 54.992 54.9968 55.0015 55.0063 55.0111 55.016 55.0204 55.0245 55.0286 55.0336 55.0394 55.0452 55.0499 55.0514 55.0404 54.9984 54.9475 54.9043 54.8728 54.8546 54.8494 54.8523 54.86 54.8884 54.9513 55.0061 55.0455 55.071 55.0864 55.0957 55.1013 55.1041 55.104 55.1027 55.1025 55.1027 55.1032 55.1038 55.1045 55.1052 55.1058 55.1064 55.1069 55.1075 55.108 55.1084 55.1088 55.1092 55.1095 55.1099 55.1102 55.1104 55.1107 55.1109 55.1112 55.1114 55.1116 55.1118 55.1119 55.1121 55.1123 55.1125 55.1126 55.1128 55.113 55.1132 55.1133 55.1135 55.1137 55.1138 55.114 55.1141 55.1143 55.1144 55.1146 55.1147 55.1148 55.1149 55.115 55.1151 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1151 55.115 55.1149 55.1148 55.1146 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.112 55.1117 55.1114 55.1111 55.1108 55.1105 55.1102 55.1098 55.1095 55.1092 55.1089 55.1086 55.1083 55.108 55.1077 55.1075 55.1072 55.1069 55.1067 55.1065 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1051 55.105 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1042 55.1041 55.104 55.1039 55.1039 55.1038 55.1038 55.1038 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1038 55.1038 55.1038 55.1039 55.104 55.104 55.1041 55.1042 55.1043 55.1044 55.1045 55.1046 55.1048 55.1049 55.1051 55.1053 55.1055 55.1056 55.1059 55.1061 55.1063 55.1065 55.1068 55.1071 55.1073 55.1076 55.1079 55.1082 55.1086 55.1089 55.1092 55.1096 55.1099 55.1103 55.1106 55.111 55.1114 55.1118 55.1122 55.1125 55.1129 55.1133 55.1137 55.114 55.1144 55.1148 55.1151 55.1155 55.1158 55.1161 55.1165 55.1168 55.1171 55.1173 55.1176 55.1178 55.1181 55.1183 55.1185 55.1186 55.1188 55.1189 55.119 55.1191 55.1192 55.1193 55.1193 55.1193 55.1193 55.1192 55.1192 55.1191 55.119 55.1189 55.1187 55.1186 55.1184 55.1182 55.1179 55.1177 55.1174 55.1171 55.1168 55.1165 55.1161 55.1158 55.1154 55.115 55.1146 55.1142 55.1138 55.1134 55.113 55.1125 55.1121 55.1117 55.1112 55.1108 55.1104 55.1099 55.1095 55.1091 55.1087 55.1083 55.1079 55.1075 55.1072 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1051 55.1049 55.1048 55.1047 55.1046 55.1046 55.1045 55.1045 55.1046 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1055 55.1058 55.106 55.1063 55.1066 55.1069 55.1072 55.1076 55.1079 55.1083 55.1087 55.109 55.1094 55.1098 55.1102 55.1106 55.1109 55.1113 55.1117 55.112 55.1124 55.1127 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1147 55.1149 55.115 55.1151 55.1152 55.1153 55.1153 55.1153 55.1153 55.1152 55.1152 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1127 55.1124 55.1121 55.1118 55.1116 55.1113 55.111 55.1107 55.1105 55.1102 55.1099 55.1097 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1075 55.1073 55.1072 55.107 55.1069 55.1068 55.1067 55.1065 55.1064 55.1063 55.1062 55.1062 55.1061 55.106 55.1059 55.1059 55.1058 55.1058 55.1057 55.1057 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1054 55.1054 55.1054 55.1054 55.1054 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1057 55.1058 55.1058 55.1059 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1084 55.1086 55.1089 55.1092 55.1095 55.1098 55.1101 55.1105 55.1108 55.1112 55.1115 55.1119 55.1123 55.1127 55.1131 55.1135 55.114 55.1144 55.1148 55.1153 55.1157 55.1162 55.1166 55.117 55.1175 55.1179 55.1183 55.1187 55.1191 55.1195 55.1199 55.1203 55.1206 55.121 55.1213 55.1216 55.1218 55.1221 55.1223 55.1225 55.1227 55.1229 55.123 55.1231 55.1232 55.1232 55.1233 55.1233 55.1233 55.1232 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1217 55.1215 55.1212 55.121 55.1207 55.1205 55.1202 55.12 55.1197 55.1194 55.1192 55.1189 55.1186 55.1184 55.1181 55.1179 55.1177 55.1174 55.1172 55.117 55.1168 55.1166 55.1164 55.1162 55.116 55.1159 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1145 55.1145 55.1144 55.1143 55.1143 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 55.1138 55.1137 55.1138 55.1137 55.1137 55.1137 55.1137 55.1136 54.6372 54.6456 54.6549 54.6646 54.6741 54.6833 54.6921 54.7008 54.7095 54.7184 54.7271 54.7356 54.7439 54.7521 54.7602 54.7683 54.7762 54.7841 54.7919 54.7996 54.8072 54.8146 54.822 54.8293 54.8365 54.8437 54.8507 54.8576 54.8645 54.8713 54.878 54.8846 54.8912 54.8976 54.904 54.9103 54.9164 54.9225 54.9285 54.9344 54.9402 54.946 54.9516 54.9572 54.9627 54.9681 54.9734 54.9787 54.9838 54.9888 54.9938 54.9987 55.0034 55.008 55.0128 55.0176 55.0221 55.0262 55.0301 55.034 55.0384 55.0432 55.0482 55.0536 55.0596 55.0661 55.0725 55.078 55.0815 55.0801 55.0731 55.0659 55.0601 55.0573 55.059 55.0626 55.0679 55.0755 55.0827 55.0891 55.0944 55.0981 55.1001 55.1009 55.1017 55.1025 55.1033 55.1041 55.1048 55.1055 55.1062 55.1068 55.1073 55.1079 55.1083 55.1088 55.1092 55.1096 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.11 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6376 54.6459 54.6551 54.6646 54.674 54.6831 54.6918 54.7005 54.7093 54.7181 54.7268 54.7353 54.7436 54.7518 54.7599 54.768 54.776 54.7839 54.7916 54.7993 54.8069 54.8143 54.8217 54.829 54.8362 54.8434 54.8504 54.8573 54.8642 54.871 54.8777 54.8843 54.8909 54.8973 54.9037 54.91 54.9161 54.9222 54.9282 54.9341 54.9399 54.9457 54.9513 54.9569 54.9624 54.9678 54.9731 54.9784 54.9835 54.9885 54.9935 54.9984 55.0031 55.0077 55.0123 55.017 55.0218 55.0262 55.03 55.0333 55.0366 55.0418 55.0478 55.0547 55.0629 55.0711 55.0787 55.0859 55.0922 55.0972 55.0997 55.0961 55.0891 55.0837 55.08 55.0784 55.0791 55.0817 55.0851 55.0891 55.0926 55.0956 55.0979 55.0996 55.101 55.1021 55.1031 55.104 55.1047 55.1055 55.1061 55.1067 55.1073 55.1078 55.1083 55.1088 55.1092 55.1096 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.1101 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6369 54.6455 54.6538 54.6626 54.6716 54.6806 54.6893 54.6978 54.7062 54.7145 54.7229 54.7313 54.7395 54.7477 54.7557 54.7637 54.7716 54.7795 54.7872 54.7948 54.8024 54.8098 54.8172 54.8245 54.8317 54.8388 54.8458 54.8528 54.8597 54.8665 54.8732 54.8798 54.8863 54.8928 54.8991 54.9054 54.9116 54.9177 54.9237 54.9295 54.9354 54.9411 54.9468 54.9524 54.9578 54.9633 54.9686 54.9739 54.979 54.9841 54.989 54.9939 54.9987 55.0036 55.0084 55.0133 55.0179 55.022 55.0258 55.0297 55.0343 55.0398 55.046 55.0522 55.0584 55.0647 55.0709 55.0765 55.0808 55.083 55.0833 55.0831 55.0828 55.0828 55.0833 55.0844 55.0861 55.0882 55.0904 55.0926 55.0946 55.0964 55.098 55.0994 55.1006 55.1017 55.1028 55.1037 55.1045 55.1053 55.106 55.1066 55.1072 55.1078 55.1083 55.1087 55.1092 55.1096 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.1101 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6405 54.6496 54.6585 54.6671 54.6757 54.6846 54.6938 54.7029 54.7118 54.7204 54.7288 54.7372 54.7454 54.7537 54.7618 54.7698 54.7777 54.7856 54.7933 54.801 54.8085 54.816 54.8234 54.8308 54.838 54.8451 54.8521 54.8591 54.866 54.8728 54.8795 54.8861 54.8926 54.899 54.9054 54.9117 54.9179 54.9239 54.93 54.9359 54.9417 54.9474 54.953 54.9586 54.9641 54.9695 54.9748 54.9799 54.9851 54.9902 54.9952 54.9999 55.0046 55.0093 55.0139 55.0183 55.0226 55.027 55.0313 55.0353 55.039 55.0425 55.046 55.0498 55.054 55.0586 55.0635 55.0681 55.0723 55.0758 55.0785 55.0807 55.0824 55.084 55.0856 55.0872 55.0888 55.0904 55.092 55.0936 55.0952 55.0966 55.098 55.0993 55.1005 55.1016 55.1026 55.1035 55.1044 55.1052 55.1059 55.1066 55.1072 55.1078 55.1083 55.1087 55.1092 55.1095 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.1101 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6365 54.6448 54.6526 54.6601 54.6677 54.6754 54.6832 54.6911 54.699 54.7069 54.7149 54.7229 54.7309 54.7389 54.7469 54.7549 54.7628 54.7706 54.7783 54.7859 54.7935 54.8009 54.8083 54.8156 54.8228 54.8299 54.837 54.8439 54.8508 54.8576 54.8643 54.8709 54.8775 54.884 54.8903 54.8966 54.9028 54.9089 54.9149 54.9209 54.9267 54.9326 54.9383 54.9441 54.9498 54.9554 54.9609 54.9662 54.9716 54.9769 54.9822 54.9876 54.9928 54.9979 55.003 55.0076 55.012 55.0163 55.0208 55.0257 55.0312 55.0371 55.0431 55.049 55.0546 55.0598 55.0647 55.0691 55.0729 55.076 55.0786 55.0806 55.0821 55.0835 55.0848 55.0862 55.0878 55.0894 55.091 55.0927 55.0943 55.0958 55.0973 55.0986 55.0999 55.1011 55.1022 55.1032 55.1042 55.105 55.1058 55.1065 55.1071 55.1077 55.1082 55.1087 55.1091 55.1095 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.1101 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6425 54.6527 54.6624 54.6718 54.681 54.6901 54.6991 54.7081 54.7169 54.7256 54.7343 54.7428 54.7512 54.7596 54.7678 54.776 54.784 54.7919 54.7997 54.8075 54.8151 54.8227 54.8301 54.8375 54.8448 54.8519 54.859 54.866 54.8729 54.8797 54.8864 54.893 54.8995 54.906 54.9123 54.9186 54.9248 54.9309 54.9369 54.9428 54.9486 54.9544 54.9601 54.9657 54.9712 54.9766 54.982 54.9872 54.9922 54.9974 55.0024 55.0072 55.0119 55.0165 55.0212 55.0258 55.0302 55.0343 55.0384 55.0423 55.046 55.0502 55.0543 55.0575 55.0602 55.0628 55.0652 55.0677 55.0714 55.076 55.0815 55.0863 55.0897 55.0913 55.0915 55.0916 55.0918 55.0922 55.093 55.0939 55.0951 55.0963 55.0976 55.0988 55.1001 55.1012 55.1023 55.1033 55.1042 55.105 55.1058 55.1065 55.1071 55.1077 55.1082 55.1087 55.1091 55.1095 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.1101 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6407 54.6491 54.657 54.6645 54.6718 54.6791 54.6863 54.6936 54.7009 54.7083 54.7158 54.7235 54.7312 54.739 54.7468 54.7547 54.7625 54.7703 54.778 54.7857 54.7932 54.8007 54.8081 54.8154 54.8226 54.8298 54.8369 54.8439 54.8508 54.8576 54.8644 54.8711 54.8777 54.8842 54.8906 54.8969 54.9031 54.9091 54.9151 54.921 54.9268 54.9325 54.9383 54.944 54.9496 54.9551 54.9605 54.9659 54.9713 54.9767 54.9821 54.9874 54.9928 54.9979 55.0028 55.0076 55.012 55.0163 55.0209 55.0258 55.0314 55.0374 55.0435 55.0494 55.055 55.0603 55.0653 55.07 55.0743 55.078 55.0808 55.0829 55.0844 55.0855 55.0864 55.0874 55.0885 55.0898 55.0912 55.0926 55.0941 55.0956 55.097 55.0984 55.0997 55.1009 55.1021 55.1031 55.1041 55.1049 55.1057 55.1064 55.1071 55.1077 55.1082 55.1087 55.1091 55.1095 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.1101 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.6432 54.6521 54.6605 54.6687 54.6768 54.6851 54.6934 54.7017 54.71 54.7183 54.7266 54.7349 54.743 54.7511 54.7591 54.7671 54.7749 54.7828 54.7905 54.7982 54.8058 54.8133 54.8207 54.828 54.8352 54.8424 54.8494 54.8563 54.8632 54.87 54.8767 54.8833 54.8897 54.8961 54.9024 54.9087 54.9148 54.9208 54.9268 54.9328 54.9386 54.9442 54.9499 54.9554 54.9608 54.9662 54.9715 54.9766 54.9815 54.9867 54.9919 54.9967 55.0012 55.0055 55.0101 55.0151 55.0201 55.0247 55.0285 55.0316 55.0347 55.0382 55.0424 55.047 55.0521 55.0571 55.0618 55.0659 55.0695 55.0724 55.0749 55.077 55.0789 55.0807 55.0825 55.0844 55.0862 55.0881 55.0899 55.0917 55.0935 55.0951 55.0967 55.0982 55.0995 55.1008 55.102 55.103 55.104 55.1049 55.1057 55.1064 55.1071 55.1077 55.1082 55.1087 55.1091 55.1095 55.1099 55.1102 55.1105 55.1108 55.1111 55.1113 55.1115 55.1117 55.1119 55.1121 55.1123 55.1125 55.1127 55.1128 55.113 55.1132 55.1134 55.1135 55.1137 55.1139 55.114 55.1142 55.1144 55.1145 55.1147 55.1148 55.1149 55.1151 55.1152 55.1153 55.1154 55.1155 55.1155 55.1156 55.1156 55.1156 55.1156 55.1156 55.1155 55.1155 55.1154 55.1153 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.114 55.1138 55.1135 55.1133 55.113 55.1127 55.1124 55.1121 55.1118 55.1115 55.1111 55.1108 55.1105 55.1102 55.1099 55.1096 55.1092 55.1089 55.1087 55.1084 55.1081 55.1078 55.1075 55.1073 55.107 55.1068 55.1066 55.1064 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1052 55.105 55.1049 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1043 55.1042 55.1042 55.1041 55.1041 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.104 55.1041 55.1041 55.1042 55.1042 55.1043 55.1044 55.1044 55.1045 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1054 55.1056 55.1058 55.106 55.1062 55.1064 55.1066 55.1069 55.1071 55.1074 55.1076 55.1079 55.1082 55.1085 55.1089 55.1092 55.1095 55.1099 55.1102 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1128 55.1132 55.1136 55.114 55.1143 55.1147 55.1151 55.1154 55.1158 55.1161 55.1164 55.1168 55.1171 55.1174 55.1176 55.1179 55.1181 55.1184 55.1186 55.1188 55.1189 55.1191 55.1192 55.1193 55.1194 55.1195 55.1196 55.1196 55.1196 55.1196 55.1195 55.1195 55.1194 55.1193 55.1192 55.119 55.1188 55.1187 55.1184 55.1182 55.118 55.1177 55.1174 55.1171 55.1168 55.1164 55.1161 55.1157 55.1153 55.1149 55.1145 55.1141 55.1137 55.1133 55.1128 55.1124 55.1119 55.1115 55.1111 55.1106 55.1102 55.1098 55.1094 55.109 55.1086 55.1082 55.1078 55.1075 55.1071 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1052 55.105 55.1049 55.1049 55.1048 55.1048 55.1048 55.1048 55.1049 55.105 55.1051 55.1052 55.1054 55.1056 55.1058 55.106 55.1063 55.1066 55.1068 55.1072 55.1075 55.1078 55.1082 55.1085 55.1089 55.1093 55.1097 55.11 55.1104 55.1108 55.1112 55.1116 55.1119 55.1123 55.1126 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1148 55.115 55.1151 55.1153 55.1154 55.1154 55.1155 55.1155 55.1155 55.1155 55.1155 55.1154 55.1153 55.1152 55.1151 55.1149 55.1147 55.1146 55.1144 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.1121 55.1118 55.1115 55.1112 55.111 55.1107 55.1104 55.1101 55.1099 55.1096 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1076 55.1074 55.1073 55.1071 55.107 55.1069 55.1067 55.1066 55.1065 55.1064 55.1064 55.1063 55.1062 55.1061 55.1061 55.106 55.106 55.1059 55.1059 55.1058 55.1058 55.1058 55.1057 55.1057 55.1057 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1056 55.1056 55.1056 55.1057 55.1057 55.1057 55.1058 55.1058 55.1059 55.106 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1066 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1083 55.1086 55.1088 55.1091 55.1094 55.1097 55.11 55.1103 55.1106 55.111 55.1113 55.1117 55.1121 55.1125 55.1129 55.1133 55.1137 55.1141 55.1146 55.115 55.1154 55.1159 55.1163 55.1168 55.1172 55.1176 55.1181 55.1185 55.1189 55.1193 55.1197 55.1201 55.1204 55.1208 55.1211 55.1214 55.1217 55.122 55.1223 55.1225 55.1227 55.1229 55.123 55.1232 55.1233 55.1233 55.1234 55.1234 55.1234 55.1234 55.1234 55.1233 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1216 55.1214 55.1211 55.1209 55.1206 55.1204 55.1201 55.1198 55.1196 55.1193 55.119 55.1188 55.1185 55.1183 55.118 55.1178 55.1176 55.1173 55.1171 55.1169 55.1167 55.1165 55.1163 55.1162 55.116 55.1158 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1146 55.1145 55.1144 55.1144 55.1143 55.1143 55.1142 55.1142 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 54.642 54.649 54.6552 54.661 54.667 54.6735 54.6805 54.6877 54.6953 54.7032 54.7112 54.7193 54.7275 54.7356 54.7436 54.7516 54.7596 54.7674 54.7751 54.7828 54.7903 54.7978 54.8051 54.8125 54.8198 54.827 54.8341 54.8412 54.8481 54.855 54.8618 54.8685 54.8752 54.8818 54.8884 54.895 54.9014 54.9076 54.9136 54.9196 54.9257 54.9321 54.9386 54.9451 54.9513 54.957 54.9629 54.9693 54.9758 54.9817 54.9844 54.9821 54.9758 54.9699 54.9647 54.9611 54.9593 54.959 54.9599 54.962 54.9659 54.9708 54.977 54.9841 54.9923 55.003 55.0152 55.0258 55.0357 55.0444 55.0517 55.058 55.0638 55.0693 55.0742 55.0784 55.0818 55.0848 55.0875 55.09 55.0922 55.0941 55.0959 55.0975 55.099 55.1003 55.1015 55.1026 55.1036 55.1045 55.1053 55.106 55.1067 55.1073 55.1078 55.1083 55.1087 55.1091 55.1095 55.1098 55.1101 55.1104 55.1107 55.1109 55.1112 55.1114 55.1116 55.1118 55.1119 55.1121 55.1123 55.1125 55.1126 55.1128 55.113 55.1132 55.1133 55.1135 55.1137 55.1138 55.114 55.1141 55.1143 55.1144 55.1146 55.1147 55.1148 55.1149 55.115 55.1151 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1151 55.115 55.1149 55.1148 55.1146 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.112 55.1117 55.1114 55.1111 55.1108 55.1105 55.1102 55.1098 55.1095 55.1092 55.1089 55.1086 55.1083 55.108 55.1077 55.1075 55.1072 55.1069 55.1067 55.1065 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1051 55.105 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1042 55.1041 55.104 55.1039 55.1039 55.1038 55.1038 55.1038 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1038 55.1038 55.1038 55.1039 55.104 55.104 55.1041 55.1042 55.1043 55.1044 55.1045 55.1046 55.1048 55.1049 55.1051 55.1053 55.1055 55.1056 55.1059 55.1061 55.1063 55.1065 55.1068 55.1071 55.1073 55.1076 55.1079 55.1082 55.1086 55.1089 55.1092 55.1096 55.1099 55.1103 55.1106 55.111 55.1114 55.1118 55.1122 55.1125 55.1129 55.1133 55.1137 55.114 55.1144 55.1148 55.1151 55.1155 55.1158 55.1161 55.1165 55.1168 55.1171 55.1173 55.1176 55.1178 55.1181 55.1183 55.1185 55.1186 55.1188 55.1189 55.119 55.1191 55.1192 55.1193 55.1193 55.1193 55.1193 55.1192 55.1192 55.1191 55.119 55.1189 55.1187 55.1186 55.1184 55.1182 55.1179 55.1177 55.1174 55.1171 55.1168 55.1165 55.1161 55.1158 55.1154 55.115 55.1146 55.1142 55.1138 55.1134 55.113 55.1125 55.1121 55.1117 55.1112 55.1108 55.1104 55.1099 55.1095 55.1091 55.1087 55.1083 55.1079 55.1075 55.1072 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1051 55.1049 55.1048 55.1047 55.1046 55.1046 55.1045 55.1045 55.1046 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1055 55.1058 55.106 55.1063 55.1066 55.1069 55.1072 55.1076 55.1079 55.1083 55.1087 55.109 55.1094 55.1098 55.1102 55.1106 55.1109 55.1113 55.1117 55.112 55.1124 55.1127 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1147 55.1149 55.115 55.1151 55.1152 55.1153 55.1153 55.1153 55.1153 55.1152 55.1152 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1127 55.1124 55.1121 55.1118 55.1116 55.1113 55.111 55.1107 55.1105 55.1102 55.1099 55.1097 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1075 55.1073 55.1072 55.107 55.1069 55.1068 55.1067 55.1065 55.1064 55.1063 55.1062 55.1062 55.1061 55.106 55.1059 55.1059 55.1058 55.1058 55.1057 55.1057 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1054 55.1054 55.1054 55.1054 55.1054 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1057 55.1058 55.1058 55.1059 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1084 55.1086 55.1089 55.1092 55.1095 55.1098 55.1101 55.1105 55.1108 55.1112 55.1115 55.1119 55.1123 55.1127 55.1131 55.1135 55.114 55.1144 55.1148 55.1153 55.1157 55.1162 55.1166 55.117 55.1175 55.1179 55.1183 55.1187 55.1191 55.1195 55.1199 55.1203 55.1206 55.121 55.1213 55.1216 55.1218 55.1221 55.1223 55.1225 55.1227 55.1229 55.123 55.1231 55.1232 55.1232 55.1233 55.1233 55.1233 55.1232 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1217 55.1215 55.1212 55.121 55.1207 55.1205 55.1202 55.12 55.1197 55.1194 55.1192 55.1189 55.1186 55.1184 55.1181 55.1179 55.1177 55.1174 55.1172 55.117 55.1168 55.1166 55.1164 55.1162 55.116 55.1159 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1145 55.1145 55.1144 55.1143 55.1143 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 55.1138 55.1137 55.1138 55.1137 55.1137 55.1137 55.1137 55.1136 ) ; boundaryField { inlet { type calculated; value nonuniform List<scalar> 10(50.5461 50.5469 50.5469 50.5469 50.5468 50.5468 50.5469 50.5469 50.5469 50.5461); } outlet { type calculated; value nonuniform List<scalar> 10(55.1136 55.1137 55.1137 55.1137 55.1137 55.1137 55.1137 55.1137 55.1137 55.1136); } sides { type empty; } walls { type calculated; value nonuniform List<scalar> 2760 ( 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5461 50.5461 50.5461 50.5462 50.5462 50.5463 50.5463 50.5464 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5466 50.5466 50.5466 50.5466 50.5467 50.5467 50.5468 50.5469 50.5469 50.547 50.547 50.5471 50.5471 50.5471 50.5471 50.547 50.547 50.547 50.547 50.547 50.547 50.547 50.5471 50.5472 50.5472 50.5473 50.5473 50.5473 50.5473 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5473 50.5474 50.5497 50.5441 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5461 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5462 50.5461 50.5461 50.5461 50.5462 50.5462 50.5463 50.5463 50.5464 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5465 50.5466 50.5466 50.5466 50.5466 50.5467 50.5467 50.5468 50.5469 50.5469 50.547 50.547 50.5471 50.5471 50.5471 50.5471 50.547 50.547 50.547 50.547 50.547 50.547 50.547 50.5471 50.5472 50.5472 50.5473 50.5473 50.5473 50.5473 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5474 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5473 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5472 50.5471 50.5476 50.5409 50.5869 50.5999 50.6221 50.6294 50.6305 50.6302 50.6301 50.6297 50.6291 50.6282 50.6272 50.6262 50.625 50.6237 50.6222 50.6203 50.6179 50.6147 50.6105 50.6045 50.5953 50.4391 50.3907 50.3632 50.3465 50.3351 50.3258 50.3182 50.3128 50.3091 50.3065 50.3055 50.3049 50.3063 50.3085 50.3132 50.3198 50.3286 50.3401 50.3554 50.3761 50.5553 50.5325 50.5262 50.5244 50.5238 50.5236 50.5236 50.5235 50.5235 50.5235 50.5235 50.5235 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5236 50.5237 50.5237 50.5237 50.5236 50.5236 50.5236 50.5237 50.5237 50.5237 50.5238 50.5238 50.5238 50.5238 50.5238 50.5239 50.5239 50.5239 50.524 50.524 50.5241 50.5241 50.5242 50.5242 50.5243 50.5243 50.5244 50.5245 50.5246 50.5247 50.5248 50.5249 50.5249 50.525 50.5251 50.5252 50.5254 50.5255 50.5257 50.5258 50.526 50.5262 50.5264 50.5266 50.5268 50.5271 50.5273 50.5276 50.5279 50.5282 50.5285 50.5288 50.5291 50.5295 50.5299 50.5303 50.5307 50.5312 50.5317 50.5322 50.5327 50.5332 50.5338 50.5344 50.5351 50.5358 50.5365 50.5373 50.538 50.5389 50.5398 50.5408 50.542 50.5432 50.5446 50.5458 50.547 50.5483 50.5495 50.5507 50.5519 50.5529 50.5531 50.5502 50.5362 50.5009 50.4623 50.4273 50.3985 50.3775 50.3646 50.359 50.3588 50.3616 50.3716 50.4044 50.4523 50.494 50.5277 50.5532 50.5714 50.5838 50.5917 50.5965 50.5996 50.6022 50.604 50.6046 50.6055 50.6069 50.6086 50.6106 50.6128 50.6152 50.6177 50.6204 50.6231 50.6259 50.6288 50.6317 50.6347 50.6378 50.6409 50.6441 50.6474 50.6507 50.6541 50.6576 50.6611 50.6647 50.6683 50.672 50.6758 50.6796 50.6835 50.6875 50.6915 50.6956 50.6997 50.7039 50.7082 50.7125 50.7169 50.7214 50.7259 50.7305 50.7351 50.7399 50.7446 50.7495 50.7544 50.7594 50.7645 50.7696 50.7748 50.78 50.7853 50.7907 50.7962 50.8017 50.8073 50.813 50.8188 50.8246 50.8305 50.8364 50.8425 50.8486 50.8547 50.8611 50.8671 50.8739 50.88 50.8869 50.8927 50.8995 50.9009 50.9378 50.471 50.5009 50.5075 50.5095 50.5099 50.5099 50.5099 50.5099 50.5099 50.5099 50.5098 50.5098 50.5097 50.5097 50.5097 50.5097 50.5098 50.5098 50.5098 50.5099 50.5099 50.5099 50.51 50.51 50.51 50.5099 50.5099 50.51 50.51 50.51 50.51 50.51 50.5101 50.5101 50.5101 50.5101 50.5102 50.5102 50.5102 50.5103 50.5103 50.5104 50.5105 50.5106 50.5107 50.5107 50.5108 50.5109 50.511 50.511 50.5111 50.5112 50.5113 50.5114 50.5116 50.5118 50.512 50.5123 50.5126 50.5128 50.5131 50.5133 50.5136 50.5139 50.5143 50.5147 50.5151 50.5155 50.5159 50.5163 50.5166 50.517 50.5173 50.5177 50.5183 50.5193 50.5208 50.5225 50.5239 50.5252 50.5263 50.5271 50.5278 50.5284 50.529 50.5292 50.5282 50.5232 50.5148 50.5066 50.4991 50.4927 50.4875 50.4837 50.481 50.4795 50.479 50.4792 50.48 50.4811 50.4825 50.4848 50.4897 50.4973 50.5048 50.512 50.5188 50.5252 50.5311 50.5365 50.5415 50.5462 50.5504 50.5543 50.558 50.5613 50.5645 50.5675 50.5704 50.5731 50.5757 50.5783 50.5808 50.5832 50.5856 50.5881 50.5905 50.593 50.5955 50.598 50.6005 50.6031 50.6057 50.6084 50.6111 50.6138 50.6166 50.6195 50.6223 50.6253 50.6283 50.6313 50.6344 50.6375 50.6407 50.644 50.6473 50.6506 50.6541 50.6575 50.6611 50.6647 50.6683 50.672 50.6758 50.6796 50.6835 50.6875 50.6915 50.6956 50.6997 50.7039 50.7082 50.7125 50.7169 50.7214 50.7259 50.7305 50.7351 50.7399 50.7446 50.7495 50.7544 50.7594 50.7645 50.7696 50.7748 50.78 50.7853 50.7907 50.7962 50.8017 50.8073 50.813 50.8188 50.8246 50.8305 50.8364 50.8425 50.8485 50.8548 50.8609 50.8674 50.8736 50.8804 50.8866 50.8937 50.9005 50.91 50.9163 50.8342 50.7931 50.7704 50.7571 50.7483 50.7416 50.7367 50.7342 50.7323 50.7321 50.7325 50.7344 50.7369 50.7415 50.7471 50.7547 50.7636 50.7751 50.7898 50.8088 50.9599 50.9805 50.9886 50.9916 50.993 50.9945 50.9958 50.9969 50.9978 50.9987 50.9995 51.0003 51.001 51.0015 51.0017 51.0014 51.0005 50.9987 50.9955 50.9897 50.8911 50.922 50.934 50.9423 50.9496 50.9567 50.9638 50.9712 50.9786 50.9863 50.994 51.0018 51.0097 51.0176 51.0256 51.0337 51.0419 51.0501 51.0585 51.0669 51.0753 51.0838 51.0924 51.101 51.1098 51.1186 51.1274 51.1363 51.1453 51.1544 51.1635 51.1726 51.1818 51.1911 51.2004 51.2097 51.2191 51.2286 51.2382 51.2478 51.2575 51.2672 51.277 51.2869 51.2968 51.3067 51.3167 51.3268 51.3369 51.3471 51.3573 51.3676 51.378 51.3884 51.3988 51.4094 51.42 51.4307 51.4414 51.4523 51.4631 51.4739 51.4849 51.4958 51.5069 51.518 51.5292 51.5405 51.5518 51.5632 51.5745 51.5858 51.5971 51.6085 51.6201 51.6322 51.6446 51.6574 51.6703 51.6832 51.6959 51.7084 51.7206 51.7332 51.7462 51.7591 51.7704 51.7777 51.7821 51.7855 51.7887 51.7926 51.7977 51.8043 51.8119 51.8221 51.8312 51.8431 51.8576 51.902 50.9615 50.9486 50.9501 50.9562 50.9632 50.9705 50.9779 50.9854 50.9929 51.0006 51.0084 51.0162 51.0241 51.0321 51.0401 51.0483 51.0565 51.0647 51.073 51.0814 51.0898 51.0983 51.1069 51.1155 51.1242 51.133 51.1419 51.1508 51.1598 51.1688 51.1778 51.187 51.1962 51.2055 51.2148 51.2242 51.2336 51.2431 51.2526 51.2622 51.2719 51.2816 51.2913 51.3012 51.3111 51.321 51.331 51.3411 51.3512 51.3613 51.3715 51.3818 51.3921 51.4025 51.4129 51.4234 51.4339 51.4444 51.4551 51.4657 51.4765 51.4873 51.4981 51.509 51.5199 51.5309 51.5419 51.553 51.5641 51.5753 51.5866 51.5979 51.6092 51.6206 51.6321 51.6436 51.6552 51.6668 51.6784 51.6902 51.702 51.7138 51.7257 51.7377 51.7497 51.7618 51.774 51.7862 51.7985 51.8108 51.8232 51.8355 51.8482 51.8607 51.8738 51.8863 51.9001 51.9126 51.9277 51.9414 51.8531 51.8348 51.8245 51.8196 51.8168 51.8155 51.8156 51.8163 51.8182 51.8205 51.8237 51.8272 51.8317 51.8363 51.842 51.848 51.8555 51.864 51.8745 51.8865 51.9701 51.9834 51.9902 51.9944 51.9979 52.0012 52.0044 52.0073 52.0099 52.012 52.0136 52.0144 52.0138 52.0112 52.0057 51.9965 51.9826 51.9641 51.9453 51.9371 51.9367 51.9661 51.987 52.0072 52.0259 52.0429 52.0594 52.0757 52.0915 52.1067 52.1217 52.1365 52.1512 52.1657 52.1803 52.1947 52.2092 52.2236 52.238 52.2525 52.2669 52.2814 52.2959 52.3104 52.3248 52.3393 52.3538 52.3683 52.3829 52.3976 52.4122 52.4269 52.4415 52.4562 52.4709 52.4857 52.5004 52.5152 52.5299 52.5447 52.5595 52.5743 52.5892 52.604 52.6189 52.6338 52.6488 52.6637 52.6786 52.6936 52.7086 52.7236 52.7386 52.7536 52.7686 52.7836 52.7986 52.8137 52.8288 52.8439 52.859 52.8741 52.8892 52.9043 52.9194 52.9342 52.9489 52.9638 52.9788 52.9942 53.0099 53.0261 53.0422 53.0581 53.0736 53.0887 53.1042 53.1203 53.1365 53.1512 53.1619 53.1688 53.174 53.1787 53.184 53.1904 53.1983 53.2077 53.2184 53.2301 53.2427 53.2563 53.2707 53.2863 53.3031 53.3205 53.339 53.3604 53.3822 53.4031 53.423 53.4424 53.4613 53.4792 53.4964 53.5133 53.5299 53.5461 53.5617 53.577 53.592 53.6067 53.6212 53.6354 53.6495 53.6635 53.6773 53.691 53.7047 53.7182 53.7317 53.745 53.7583 53.7716 53.7848 53.7979 53.811 53.824 53.8369 53.8498 53.8626 53.8754 53.8881 53.9008 53.9134 53.9259 53.9384 53.9508 53.9632 53.9756 53.9878 54.0001 54.0122 54.0243 54.0364 54.0484 54.0604 54.0722 54.0841 54.0958 54.1076 54.1192 54.1308 54.1424 54.1538 54.1652 54.1766 54.1879 54.1991 54.2103 54.2213 54.2324 54.2433 54.2542 54.265 54.2758 54.2864 54.297 54.3076 54.318 54.3284 54.3387 54.349 54.359 54.3692 54.379 54.3892 54.3987 54.4088 54.4181 54.4281 54.4372 54.4471 54.4559 54.4658 54.4743 54.4841 54.4924 54.502 54.5102 54.5197 54.5277 54.537 54.5449 54.5538 54.562 54.5699 54.5789 54.5862 54.5942 51.9135 51.8857 51.8735 51.8634 51.8572 51.86 51.8721 51.8895 51.9167 51.9686 52.0273 52.0794 52.1236 52.1593 52.1873 52.2095 52.2282 52.2454 52.2617 52.2753 52.2876 52.3004 52.3137 52.3274 52.3413 52.3554 52.3696 52.3839 52.3983 52.4128 52.4273 52.4419 52.4565 52.4712 52.4859 52.5006 52.5153 52.53 52.5448 52.5595 52.5743 52.5891 52.604 52.6188 52.6336 52.6485 52.6634 52.6783 52.6931 52.708 52.7229 52.7379 52.7528 52.7677 52.7826 52.7975 52.8125 52.8274 52.8423 52.8572 52.8721 52.887 52.9019 52.9168 52.9316 52.9465 52.9614 52.9762 52.991 53.0059 53.0207 53.0355 53.0503 53.0651 53.0799 53.0946 53.1094 53.1241 53.1388 53.1535 53.1682 53.1829 53.1975 53.2121 53.2267 53.2413 53.2561 53.2709 53.2857 53.3005 53.3151 53.3294 53.3438 53.3586 53.374 53.39 53.4055 53.419 53.4263 53.4135 53.381 53.3479 53.319 53.2977 53.2859 53.2845 53.2926 53.3074 53.3261 53.3589 53.4253 53.4957 53.5542 53.6005 53.6358 53.6623 53.6832 53.7007 53.7167 53.7304 53.7408 53.7516 53.7631 53.775 53.7873 53.7998 53.8124 53.8251 53.8378 53.8505 53.8632 53.8758 53.8884 53.901 53.9136 53.9261 53.9385 53.9509 53.9633 53.9756 53.9879 54.0001 54.0122 54.0244 54.0364 54.0484 54.0604 54.0722 54.0841 54.0959 54.1076 54.1192 54.1308 54.1424 54.1538 54.1652 54.1766 54.1879 54.1991 54.2103 54.2213 54.2324 54.2433 54.2542 54.265 54.2758 54.2864 54.297 54.3075 54.318 54.3284 54.3387 54.3489 54.3591 54.369 54.3792 54.3889 54.3991 54.4084 54.4185 54.4276 54.4377 54.4465 54.4565 54.4651 54.475 54.4834 54.4931 54.5013 54.5109 54.519 54.5283 54.5363 54.5455 54.5533 54.5623 54.5699 54.5789 54.5857 54.5951 54.5993 54.6016 54.6037 54.6057 54.6077 54.6093 54.6107 54.612 54.6133 54.6149 54.6165 54.6183 54.62 54.6218 54.6235 54.6252 54.6269 54.6286 54.6303 54.6321 54.599 54.6001 54.6016 54.6033 54.6052 54.6071 54.6092 54.6112 54.6132 54.6152 54.6173 54.6192 54.6213 54.6232 54.6252 54.6271 54.6291 54.6309 54.6329 54.6347 54.6361 54.6444 54.6538 54.6634 54.6728 54.6818 54.6905 54.6992 54.7081 54.7169 54.7256 54.734 54.7423 54.7504 54.7585 54.7666 54.7746 54.7824 54.7902 54.7978 54.8054 54.8129 54.8202 54.8275 54.8347 54.8419 54.8489 54.8558 54.8627 54.8695 54.8762 54.8828 54.8894 54.8958 54.9022 54.9084 54.9146 54.9207 54.9266 54.9326 54.9384 54.9441 54.9498 54.9554 54.9609 54.9663 54.9715 54.9768 54.982 54.9871 54.992 54.9968 55.0015 55.0063 55.0111 55.016 55.0204 55.0245 55.0286 55.0336 55.0394 55.0452 55.0499 55.0514 55.0404 54.9984 54.9475 54.9043 54.8728 54.8546 54.8494 54.8523 54.86 54.8884 54.9513 55.0061 55.0455 55.071 55.0864 55.0957 55.1013 55.1041 55.104 55.1027 55.1025 55.1027 55.1032 55.1038 55.1045 55.1052 55.1058 55.1064 55.1069 55.1075 55.108 55.1084 55.1088 55.1092 55.1095 55.1099 55.1102 55.1104 55.1107 55.1109 55.1112 55.1114 55.1116 55.1118 55.1119 55.1121 55.1123 55.1125 55.1126 55.1128 55.113 55.1132 55.1133 55.1135 55.1137 55.1138 55.114 55.1141 55.1143 55.1144 55.1146 55.1147 55.1148 55.1149 55.115 55.1151 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1151 55.115 55.1149 55.1148 55.1146 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.112 55.1117 55.1114 55.1111 55.1108 55.1105 55.1102 55.1098 55.1095 55.1092 55.1089 55.1086 55.1083 55.108 55.1077 55.1075 55.1072 55.1069 55.1067 55.1065 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1051 55.105 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1042 55.1041 55.104 55.1039 55.1039 55.1038 55.1038 55.1038 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1038 55.1038 55.1038 55.1039 55.104 55.104 55.1041 55.1042 55.1043 55.1044 55.1045 55.1046 55.1048 55.1049 55.1051 55.1053 55.1055 55.1056 55.1059 55.1061 55.1063 55.1065 55.1068 55.1071 55.1073 55.1076 55.1079 55.1082 55.1086 55.1089 55.1092 55.1096 55.1099 55.1103 55.1106 55.111 55.1114 55.1118 55.1122 55.1125 55.1129 55.1133 55.1137 55.114 55.1144 55.1148 55.1151 55.1155 55.1158 55.1161 55.1165 55.1168 55.1171 55.1173 55.1176 55.1178 55.1181 55.1183 55.1185 55.1186 55.1188 55.1189 55.119 55.1191 55.1192 55.1193 55.1193 55.1193 55.1193 55.1192 55.1192 55.1191 55.119 55.1189 55.1187 55.1186 55.1184 55.1182 55.1179 55.1177 55.1174 55.1171 55.1168 55.1165 55.1161 55.1158 55.1154 55.115 55.1146 55.1142 55.1138 55.1134 55.113 55.1125 55.1121 55.1117 55.1112 55.1108 55.1104 55.1099 55.1095 55.1091 55.1087 55.1083 55.1079 55.1075 55.1072 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1051 55.1049 55.1048 55.1047 55.1046 55.1046 55.1045 55.1045 55.1046 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1055 55.1058 55.106 55.1063 55.1066 55.1069 55.1072 55.1076 55.1079 55.1083 55.1087 55.109 55.1094 55.1098 55.1102 55.1106 55.1109 55.1113 55.1117 55.112 55.1124 55.1127 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1147 55.1149 55.115 55.1151 55.1152 55.1153 55.1153 55.1153 55.1153 55.1152 55.1152 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1127 55.1124 55.1121 55.1118 55.1116 55.1113 55.111 55.1107 55.1105 55.1102 55.1099 55.1097 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1075 55.1073 55.1072 55.107 55.1069 55.1068 55.1067 55.1065 55.1064 55.1063 55.1062 55.1062 55.1061 55.106 55.1059 55.1059 55.1058 55.1058 55.1057 55.1057 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1054 55.1054 55.1054 55.1054 55.1054 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1057 55.1058 55.1058 55.1059 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1084 55.1086 55.1089 55.1092 55.1095 55.1098 55.1101 55.1105 55.1108 55.1112 55.1115 55.1119 55.1123 55.1127 55.1131 55.1135 55.114 55.1144 55.1148 55.1153 55.1157 55.1162 55.1166 55.117 55.1175 55.1179 55.1183 55.1187 55.1191 55.1195 55.1199 55.1203 55.1206 55.121 55.1213 55.1216 55.1218 55.1221 55.1223 55.1225 55.1227 55.1229 55.123 55.1231 55.1232 55.1232 55.1233 55.1233 55.1233 55.1232 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1217 55.1215 55.1212 55.121 55.1207 55.1205 55.1202 55.12 55.1197 55.1194 55.1192 55.1189 55.1186 55.1184 55.1181 55.1179 55.1177 55.1174 55.1172 55.117 55.1168 55.1166 55.1164 55.1162 55.116 55.1159 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1145 55.1145 55.1144 55.1143 55.1143 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 55.1138 55.1137 55.1138 55.1137 55.1137 55.1137 55.1137 55.1136 54.642 54.649 54.6552 54.661 54.667 54.6735 54.6805 54.6877 54.6953 54.7032 54.7112 54.7193 54.7275 54.7356 54.7436 54.7516 54.7596 54.7674 54.7751 54.7828 54.7903 54.7978 54.8051 54.8125 54.8198 54.827 54.8341 54.8412 54.8481 54.855 54.8618 54.8685 54.8752 54.8818 54.8884 54.895 54.9014 54.9076 54.9136 54.9196 54.9257 54.9321 54.9386 54.9451 54.9513 54.957 54.9629 54.9693 54.9758 54.9817 54.9844 54.9821 54.9758 54.9699 54.9647 54.9611 54.9593 54.959 54.9599 54.962 54.9659 54.9708 54.977 54.9841 54.9923 55.003 55.0152 55.0258 55.0357 55.0444 55.0517 55.058 55.0638 55.0693 55.0742 55.0784 55.0818 55.0848 55.0875 55.09 55.0922 55.0941 55.0959 55.0975 55.099 55.1003 55.1015 55.1026 55.1036 55.1045 55.1053 55.106 55.1067 55.1073 55.1078 55.1083 55.1087 55.1091 55.1095 55.1098 55.1101 55.1104 55.1107 55.1109 55.1112 55.1114 55.1116 55.1118 55.1119 55.1121 55.1123 55.1125 55.1126 55.1128 55.113 55.1132 55.1133 55.1135 55.1137 55.1138 55.114 55.1141 55.1143 55.1144 55.1146 55.1147 55.1148 55.1149 55.115 55.1151 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1152 55.1151 55.115 55.1149 55.1148 55.1146 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1126 55.1123 55.112 55.1117 55.1114 55.1111 55.1108 55.1105 55.1102 55.1098 55.1095 55.1092 55.1089 55.1086 55.1083 55.108 55.1077 55.1075 55.1072 55.1069 55.1067 55.1065 55.1062 55.106 55.1058 55.1056 55.1055 55.1053 55.1051 55.105 55.1048 55.1047 55.1046 55.1045 55.1044 55.1043 55.1042 55.1041 55.104 55.1039 55.1039 55.1038 55.1038 55.1038 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1037 55.1038 55.1038 55.1038 55.1039 55.104 55.104 55.1041 55.1042 55.1043 55.1044 55.1045 55.1046 55.1048 55.1049 55.1051 55.1053 55.1055 55.1056 55.1059 55.1061 55.1063 55.1065 55.1068 55.1071 55.1073 55.1076 55.1079 55.1082 55.1086 55.1089 55.1092 55.1096 55.1099 55.1103 55.1106 55.111 55.1114 55.1118 55.1122 55.1125 55.1129 55.1133 55.1137 55.114 55.1144 55.1148 55.1151 55.1155 55.1158 55.1161 55.1165 55.1168 55.1171 55.1173 55.1176 55.1178 55.1181 55.1183 55.1185 55.1186 55.1188 55.1189 55.119 55.1191 55.1192 55.1193 55.1193 55.1193 55.1193 55.1192 55.1192 55.1191 55.119 55.1189 55.1187 55.1186 55.1184 55.1182 55.1179 55.1177 55.1174 55.1171 55.1168 55.1165 55.1161 55.1158 55.1154 55.115 55.1146 55.1142 55.1138 55.1134 55.113 55.1125 55.1121 55.1117 55.1112 55.1108 55.1104 55.1099 55.1095 55.1091 55.1087 55.1083 55.1079 55.1075 55.1072 55.1068 55.1065 55.1062 55.106 55.1057 55.1055 55.1053 55.1051 55.1049 55.1048 55.1047 55.1046 55.1046 55.1045 55.1045 55.1046 55.1046 55.1047 55.1048 55.105 55.1051 55.1053 55.1055 55.1058 55.106 55.1063 55.1066 55.1069 55.1072 55.1076 55.1079 55.1083 55.1087 55.109 55.1094 55.1098 55.1102 55.1106 55.1109 55.1113 55.1117 55.112 55.1124 55.1127 55.113 55.1133 55.1136 55.1139 55.1141 55.1144 55.1146 55.1147 55.1149 55.115 55.1151 55.1152 55.1153 55.1153 55.1153 55.1153 55.1152 55.1152 55.1151 55.115 55.1148 55.1147 55.1145 55.1143 55.1141 55.1139 55.1137 55.1134 55.1132 55.1129 55.1127 55.1124 55.1121 55.1118 55.1116 55.1113 55.111 55.1107 55.1105 55.1102 55.1099 55.1097 55.1094 55.1092 55.1089 55.1087 55.1085 55.1083 55.1081 55.1079 55.1077 55.1075 55.1073 55.1072 55.107 55.1069 55.1068 55.1067 55.1065 55.1064 55.1063 55.1062 55.1062 55.1061 55.106 55.1059 55.1059 55.1058 55.1058 55.1057 55.1057 55.1056 55.1056 55.1055 55.1055 55.1055 55.1055 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1054 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1053 55.1054 55.1054 55.1054 55.1054 55.1054 55.1055 55.1055 55.1055 55.1056 55.1056 55.1056 55.1057 55.1058 55.1058 55.1059 55.106 55.1061 55.1062 55.1063 55.1064 55.1065 55.1067 55.1068 55.107 55.1071 55.1073 55.1075 55.1077 55.1079 55.1081 55.1084 55.1086 55.1089 55.1092 55.1095 55.1098 55.1101 55.1105 55.1108 55.1112 55.1115 55.1119 55.1123 55.1127 55.1131 55.1135 55.114 55.1144 55.1148 55.1153 55.1157 55.1162 55.1166 55.117 55.1175 55.1179 55.1183 55.1187 55.1191 55.1195 55.1199 55.1203 55.1206 55.121 55.1213 55.1216 55.1218 55.1221 55.1223 55.1225 55.1227 55.1229 55.123 55.1231 55.1232 55.1232 55.1233 55.1233 55.1233 55.1232 55.1232 55.1231 55.123 55.1228 55.1227 55.1225 55.1223 55.1221 55.1219 55.1217 55.1215 55.1212 55.121 55.1207 55.1205 55.1202 55.12 55.1197 55.1194 55.1192 55.1189 55.1186 55.1184 55.1181 55.1179 55.1177 55.1174 55.1172 55.117 55.1168 55.1166 55.1164 55.1162 55.116 55.1159 55.1157 55.1156 55.1154 55.1153 55.1152 55.1151 55.115 55.1149 55.1148 55.1147 55.1146 55.1145 55.1145 55.1144 55.1143 55.1143 55.1142 55.1142 55.1141 55.1141 55.114 55.114 55.114 55.114 55.1139 55.1139 55.1138 55.1139 55.1138 55.1138 55.1138 55.1138 55.1137 55.1138 55.1137 55.1137 55.1137 55.1137 55.1136 ) ; } } // ************************************************************************* //
[ "alexmayes@gmail.com" ]
alexmayes@gmail.com
f124d9c55694e3f8d89c4bfc3e928ca19f899a77
08f8cfd6dfe9bfd844cf95168a1b9d81fc5efebc
/74_C.cpp
84571a13c7877cfcf64e1b50e7f99719315aab1e
[]
no_license
kjy1010111/ITSA_basic
6e55d9f13767d9c8102e4e40c024a42656eb3ab8
f54a1fde8aff36a110da00c01d4e315ecf47b262
refs/heads/master
2020-12-05T10:46:59.137465
2020-01-06T11:33:44
2020-01-06T11:33:44
232,085,472
0
0
null
null
null
null
UTF-8
C++
false
false
898
cpp
//https://e-tutor.itsa.org.tw/e-Tutor/mod/programming/view.php?id=50115 #include<bits/stdc++.h> using namespace std; int main(){ int TestCase , DataLen , pre , MaxLen , len , data; cin >> TestCase; for(int i = 0;i < TestCase;i++){ MaxLen = 0; cin >> DataLen; for(int j = 0;j < DataLen;j++){ cin >> data; if(j == 0){ pre = data; len = 1; } else{ if(data == pre){ len++; } else{ if(len > MaxLen){ MaxLen = len; } pre = data; len = 1; } } } if(len > MaxLen){ MaxLen = len; } cout << MaxLen << endl; } }
[ "noreply@github.com" ]
noreply@github.com
b12de6fe783175cd4835c2ae6a78afe6dbdc35dc
6ed471f36e5188f77dc61cca24daa41496a6d4a0
/SDK/EngramEntry_StoneGate_parameters.h
8b2707c0273a3189b7b5d762969cd439a09fec90
[]
no_license
zH4x-SDK/zARKSotF-SDK
77bfaf9b4b9b6a41951ee18db88f826dd720c367
714730f4bb79c07d065181caf360d168761223f6
refs/heads/main
2023-07-16T22:33:15.140456
2021-08-27T13:40:06
2021-08-27T13:40:06
400,521,086
0
0
null
null
null
null
UTF-8
C++
false
false
686
h
#pragma once #include "../SDK.h" // Name: ARKSotF, Version: 178.8.0 #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- // Parameters //--------------------------------------------------------------------------- // Function EngramEntry_StoneGate.EngramEntry_StoneGate_C.ExecuteUbergraph_EngramEntry_StoneGate struct UEngramEntry_StoneGate_C_ExecuteUbergraph_EngramEntry_StoneGate_Params { int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "zp2kshield@gmail.com" ]
zp2kshield@gmail.com
9b4cce673746ec29466a94878172aa557124550d
87aba51b1f708b47d78b5c4180baf731d752e26d
/Replication/DataFileSystem/PRODUCT_SOURCE_CODE/itk/Modules/Core/Common/include/itkFastMutexLock.h
1ff4d76657e5dbd0e5ae304349c095a06af774dc
[]
no_license
jstavr/Architecture-Relation-Evaluator
12c225941e9a4942e83eb6d78f778c3cf5275363
c63c056ee6737a3d90fac628f2bc50b85c6bd0dc
refs/heads/master
2020-12-31T05:10:08.774893
2016-05-14T16:09:40
2016-05-14T16:09:40
58,766,508
0
0
null
null
null
null
UTF-8
C++
false
false
3,606
h
/*========================================================================= * * Copyright Insight Software Consortium * * 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.txt * * 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. * *=========================================================================*/ /*========================================================================= * * Portions of this file are subject to the VTK Toolkit Version 3 copyright. * * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen * * For complete copyright, license and disclaimer of warranty information * please refer to the NOTICE file at the top of the ITK source tree. * *=========================================================================*/ #ifndef __itkFastMutexLock_h #define __itkFastMutexLock_h #include "itkObject.h" #include "itkSimpleFastMutexLock.h" #include "itkObjectFactory.h" namespace itk { /** \class FastMutexLock * \brief Critical section locking class. * * FastMutexLock allows the locking of variables which are accessed * through different threads. This header file also defines * SimpleFastMutexLock which is not a subclass of Object. * The API is identical to that of MutexLock, and the behavior is * identical as well, except on Windows 9x/NT platforms. The only difference * on these platforms is that MutexLock is more flexible, in that * it works across processes as well as across threads, but also costs * more, in that it evokes a 600-cycle x86 ring transition. The * FastMutexLock provides a higher-performance equivalent (on * Windows) but won't work across processes. Since it is unclear how, * in itk, an object at the itk level can be shared across processes * in the first place, one should use FastMutexLock unless one has * a very good reason to use MutexLock. If higher-performance equivalents * for non-Windows platforms (Irix, SunOS, etc) are discovered, they * should replace the implementations in this class * * \ingroup OSSystemObjects * \ingroup ITKCommon */ class ITKCommon_EXPORT FastMutexLock:public Object { public: /** Standard class typedefs. */ typedef FastMutexLock Self; typedef Object Superclass; typedef SmartPointer< Self > Pointer; typedef SmartPointer< const Self > ConstPointer; /** Method for creation. */ itkNewMacro(Self); /** Run-time type information. */ itkTypeMacro(FastMutexLock, Object); /** Lock the itkFastMutexLock. */ void Lock(); /** Unlock the FastMutexLock. */ void Unlock(); protected: FastMutexLock() {} ~FastMutexLock() {} SimpleFastMutexLock m_SimpleFastMutexLock; void PrintSelf(std::ostream & os, Indent indent) const; private: FastMutexLock(const Self &); //purposely not implemented void operator=(const Self &); //purposely not implemented }; inline void FastMutexLock::Lock(void) { m_SimpleFastMutexLock.Lock(); } inline void FastMutexLock::Unlock(void) { m_SimpleFastMutexLock.Unlock(); } } //end itk namespace #endif
[ "jstavr2@gmail.com" ]
jstavr2@gmail.com
ffff66b47850ee6b8a7dcd8616fafabfdb705670
bfe4fd0102795f9600ffb10c6d768a2534b49c94
/Sudo Placement GFG/Array/5_RotateAnArray/main.cpp
af16db4a152ee2507769366d1c79072860121015
[]
no_license
aryabhatta22/CompetitiveCoding
b4a9e03fe53af2d5049b3d6ab64d89c5a0b2002f
decfb0f8b4d866e3a095f4bce333f4c3dc58940f
refs/heads/master
2021-07-13T18:03:53.456484
2020-08-22T13:08:46
2020-08-22T13:08:46
199,398,576
0
0
null
null
null
null
UTF-8
C++
false
false
1,053
cpp
/************************** Description : https://practice.geeksforgeeks.org/problems/reversal-algorithm/0/?track=sp-arrays-and-searching&batchId=152 Date : 14 Aug, 2019 **************************/ #include<iostream> #include<math.h> using namespace std; //reverse function void revArr(long int arr[], int initialIndex, int finalIndex) { int count{0}; int size=finalIndex-initialIndex+1; while(count<(floor(size/2))) { swap(arr[initialIndex+count], arr[finalIndex-count]); count++; } } int main(){ int test{0}; int size{0}, d{0}; long int *arr; cin>>test; while(test--) { cin>>size; arr=new long int[size]; for(int i=0;i<size;i++) cin>>arr[i]; cin>>d; revArr(arr,0,d-1); revArr(arr,d,size-1); revArr(arr,0,size-1); for(int i=0;i<size;i++) cout<<arr[i]<<" "; cout<<"\n"; } cout<<endl; return 0; }
[ "tarun.hive@hotmail.com" ]
tarun.hive@hotmail.com
e2fc30317339e8b6a6b3afdf35c07eed26f1f708
4cc7648c9848ba32c2620f509bebce25a5ff1a4c
/lef_def_parser/DEF_Writer.cpp
965d0d109d674f1773afd9120776cfd0e518475c
[]
no_license
e33624303/ispd_dr
ac503d6d083801b838f44172919effd49e74d25f
0b6977217df9bdcf619ebd14f0a4d19ce6d5275a
refs/heads/master
2023-02-13T13:46:40.101865
2021-01-15T20:19:53
2021-01-15T20:19:53
280,623,011
1
0
null
null
null
null
UTF-8
C++
false
false
49,921
cpp
#include <fstream> #include "DEF_Writer.h" // Global variables char defaultOut[128]; FILE* fout; int userData; Parser::Design write_design; #define CHECK_STATUS(status) \ if (status) { \ defwPrintError(status); \ return(status); \ } void dataError() { fprintf(fout, "ERROR: returned user data is not correct!\n"); } void checkType(defwCallbackType_e c) { if (c >= 0 && c <= defwDesignEndCbkType) { // OK } else { fprintf(fout, "ERROR: callback type is out of bounds!\n"); } } int versionCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwVersion(5, 6); CHECK_STATUS(status); return 0;*/ } int dividerCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwDividerChar("/"); CHECK_STATUS(status); return 0;*/ } int busbitCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwBusBitChars("[]"); CHECK_STATUS(status); return 0;*/ } int designCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwDesignName("muk"); CHECK_STATUS(status);*/ return 0; } int technologyCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwTechnology("muk"); CHECK_STATUS(status); return 0;*/ } int arrayCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwArray("core_array"); CHECK_STATUS(status); return 0;*/ } int floorplanCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwFloorplan("DEFAULT"); CHECK_STATUS(status); return 0;*/ } int unitsCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwUnits(100); CHECK_STATUS(status); status = defwNewLine(); CHECK_STATUS(status); return 0;*/ } // history int historyCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwHistory("Corrected STEP for ROW_9 and added ROW_10 of SITE CORE1 (def)"); CHECK_STATUS(status); status = defwHistory("Removed NONDEFAULTRULE from the net XX100 (def)"); CHECK_STATUS(status); status = defwHistory("Changed some cell orientations (def)"); CHECK_STATUS(status); status = defwNewLine(); CHECK_STATUS(status); return 0;*/ } // PROPERTYDEFINITIONS int propdefCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwStartPropDef(); CHECK_STATUS(status); defwAddComment("defwPropDef is broken into 3 routines, defwStringPropDef"); defwAddComment("defwIntPropDef, and defwRealPropDef"); status = defwStringPropDef("REGION", "scum", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("REGION", "center", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("REGION", "area", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("GROUP", "ggrp", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("GROUP", "site", 0, 25, NULL); CHECK_STATUS(status); status = defwRealPropDef("GROUP", "maxarea", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("COMPONENT", "cc", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("COMPONENT", "index", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("COMPONENT", "size", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("NET", "alt", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("NET", "lastName", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("NET", "length", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("SPECIALNET", "contype", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("SPECIALNET", "ind", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("SPECIALNET", "maxlength", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("DESIGN", "title", 0, 0, "Buffer"); CHECK_STATUS(status); status = defwIntPropDef("DESIGN", "priority", 0, 0, 14); CHECK_STATUS(status); status = defwRealPropDef("DESIGN", "howbig", 0, 0, 15.16); CHECK_STATUS(status); status = defwRealPropDef("ROW", "minlength", 1.0, 100.0, NULL); CHECK_STATUS(status); status = defwStringPropDef("ROW", "firstName", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("ROW", "idx", 0, 0, NULL); CHECK_STATUS(status); status = defwIntPropDef("COMPONENTPIN", "dpIgnoreTerm", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("COMPONENTPIN", "dpBit", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("COMPONENTPIN", "realProperty", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("NET", "IGNOREOPTIMIZATION", 0, 0, NULL); CHECK_STATUS(status); status = defwStringPropDef("SPECIALNET", "IGNOREOPTIMIZATION", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("NET", "FREQUENCY", 0, 0, NULL); CHECK_STATUS(status); status = defwRealPropDef("SPECIALNET", "FREQUENCY", 0, 0, NULL); CHECK_STATUS(status); status = defwEndPropDef(); CHECK_STATUS(status); return 0;*/ } // DIEAREA int dieareaCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwDieArea(-190000, -120000, 190000, 70000); CHECK_STATUS(status); status = defwNewLine(); CHECK_STATUS(status); return 0;*/ } // ROW int rowCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwRow("ROW_9", "CORE", -177320, -111250, 5, 911, 1, 360, 0); CHECK_STATUS(status); status = defwRealProperty("minlength", 50.5); CHECK_STATUS(status); status = defwStringProperty("firstName", "Only"); CHECK_STATUS(status); status = defwIntProperty("idx", 1); CHECK_STATUS(status); status = defwRow("ROW_10", "CORE1", -19000, -11000, 6, 1, 100, 0, 600); CHECK_STATUS(status); return 0;*/ } // TRACKS int trackCB(defwCallbackType_e c, defiUserData ud) { /*int status; const char** layers; checkType(c); //if ((int)ud != userData) dataError(); layers = (const char**)malloc(sizeof(char*) * 1); layers[0] = strdup("M1"); status = defwTracks("X", 3000, 40, 120, 1, layers); CHECK_STATUS(status); free((char*)layers[0]); layers[0] = strdup("M2"); status = defwTracks("Y", 5000, 10, 20, 1, layers); CHECK_STATUS(status); free((char*)layers[0]); free((char*)layers); status = defwNewLine(); CHECK_STATUS(status); return 0;*/ } // GCELLGRID int gcellgridCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwGcellGrid("X", 0, 100, 600); CHECK_STATUS(status); status = defwGcellGrid("Y", 10, 120, 400); CHECK_STATUS(status); status = defwNewLine(); CHECK_STATUS(status); return 0;*/ } // VIAS int viaCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwStartVias(2); CHECK_STATUS(status); status = defwViaName("VIA_ARRAY"); CHECK_STATUS(status); status = defwViaRect("M1", -40, -40, 40, 40); CHECK_STATUS(status); status = defwViaRect("V1", -40, -40, 40, 40); CHECK_STATUS(status); status = defwViaRect("M2", -50, -50, 50, 50); CHECK_STATUS(status); status = defwOneViaEnd(); CHECK_STATUS(status); status = defwViaName("VIA_ARRAY1"); CHECK_STATUS(status); status = defwViaRect("M1", -40, -40, 40, 40); CHECK_STATUS(status); status = defwViaRect("V1", -40, -40, 40, 40); CHECK_STATUS(status); status = defwViaRect("M2", -50, -50, 50, 50); CHECK_STATUS(status); status = defwOneViaEnd(); status = defwEndVias(); CHECK_STATUS(status); return 0;*/ } // REGIONS int regionCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwStartRegions(2); CHECK_STATUS(status); status = defwRegionName("region1"); CHECK_STATUS(status); status = defwRegionPoints(-500, -500, 300, 100); CHECK_STATUS(status); status = defwRegionPoints(500, 500, 1000, 1000); CHECK_STATUS(status); status = defwStringProperty("scum", "on top"); CHECK_STATUS(status); status = defwIntProperty("center", 250); CHECK_STATUS(status); status = defwIntProperty("area", 730000); CHECK_STATUS(status); status = defwRegionName("region2"); CHECK_STATUS(status); status = defwRegionPoints(4000, 0, 5000, 1000); CHECK_STATUS(status); status = defwStringProperty("scum", "on bottom"); CHECK_STATUS(status); status = defwEndRegions(); CHECK_STATUS(status); return 0;*/ } // COMPONENTS int componentCB(defwCallbackType_e c, defiUserData ud) { /*int status; const char** foreigns; int *foreignX, *foreignY, *foreignOrient; checkType(c); //if ((int)ud != userData) dataError(); foreigns = (const char**)malloc(sizeof(char*) * 1); foreignX = (int*)malloc(sizeof(int) * 1); foreignY = (int*)malloc(sizeof(int) * 1); foreignOrient = (int*)malloc(sizeof(int) * 1); status = defwStartComponents(11); CHECK_STATUS(status); status = defwComponent("Z38A01", "DFF3", 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, "PLACED", 18592, 5400, 6, 0, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("Z38A03", "DFF3", 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, "PLACED", 16576, 45600, 6, 0, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("Z38A05", "DFF3", 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, "PLACED", 51520, 9600, 6, 0, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("|i0", "INV_B", 0, NULL, "INV", NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, 0, -1, 0, "region1", 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("|i1", "INV_B", 0, NULL, "INV", NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, "UNPLACED", 1000, 1000, 0, 0, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("cell1", "CHM6A", 0, NULL, NULL, "generator", NULL, "USER", 0, NULL, NULL, NULL, NULL, "FIXED", 0, 10, 0, 100, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("cell2", "CHM6A", 0, NULL, NULL, NULL, NULL, "NETLIST", 0, NULL, NULL, NULL, NULL, "COVER", 120, 10, 4, 2, NULL, 0, 0, 0, 0); CHECK_STATUS(status); foreigns[0] = strdup("gds2name"); foreignX[0] = -500; foreignY[0] = -500; foreignOrient[0] = 3; status = defwComponent("cell3", "CHM6A", 0, NULL, NULL, NULL, NULL, "TIMING", 1, foreigns, foreignX, foreignY, foreignOrient, "PLACED", 240, 10, 0, 0, "region1", 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("cell4", "CHM3A", 0, NULL, "CHM6A", NULL, NULL, "DIST", 0, NULL, NULL, NULL, NULL, "PLACED", 360, 10, 1, 0, "region2", 0, 0, 0, 0); CHECK_STATUS(status); status = defwStringProperty("cc", "This is the copy list"); CHECK_STATUS(status); status = defwIntProperty("index", 9); CHECK_STATUS(status); status = defwRealProperty("size", 7.8); CHECK_STATUS(status); status = defwComponent("scancell1", "CHK3A", 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, "PLACED", 500, 10, 7, 0, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwComponent("scancell2", "CHK3A", 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, "PLACED", 700, 10, 6, 0, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwEndComponents(); CHECK_STATUS(status); free((char*)foreigns[0]); free((char*)foreigns); free((char*)foreignX); free((char*)foreignY); free((char*)foreignOrient); return 0;*/ } // PINS int pinCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwStartPins(6); CHECK_STATUS(status); status = defwPin("scanpin", "SCAN", 0, "INPUT", NULL, NULL, 0, 0, -1, NULL, 0, 0, 0, 0); CHECK_STATUS(status); status = defwPin("pin1", "net1", 1, NULL, "POWER", NULL, 0, 0, -1, "M1", -5000, -100, -4950, -90); CHECK_STATUS(status); status = defwPin("pin2", "net2", 0, "INPUT", "SIGNAL", NULL, 0, 0, -1, "M1", -5000, 0, -4950, 10); CHECK_STATUS(status); status = defwPin("INBUS[1]", "|INBUS[1]", 0, "INPUT", "SIGNAL", "FIXED", 45, -2160, 0, "M2", 0, 0, 30, 135); CHECK_STATUS(status); status = defwPin("INBUS<0>", "|INBUS<0>", 0, "INPUT", "SIGNAL", "PLACED", -45, 2160, 1, "M2", 0, 0, 30, 134); CHECK_STATUS(status); status = defwPin("OUTBUS<1>", "|OUTBUS<1>", 0, "OUTPUT", "SIGNAL", "COVER", 2160, 645, 2, "M1", 0, 0, 30, 135); CHECK_STATUS(status); status = defwEndPins(); CHECK_STATUS(status); return 0;*/ } // PINPROPERTIES int pinpropCB(defwCallbackType_e c, defiUserData ud) { /*int status; checkType(c); //if ((int)ud != userData) dataError(); status = defwStartPinProperties(2); CHECK_STATUS(status); status = defwPinProperty("cell1", "PB1"); CHECK_STATUS(status); status = defwStringProperty("dpBit", "1"); CHECK_STATUS(status); status = defwRealProperty("realProperty", 3.4); CHECK_STATUS(status); status = defwPinProperty("cell2", "vdd"); CHECK_STATUS(status); status = defwIntProperty("dpIgnoreTerm", 2); CHECK_STATUS(status); status = defwEndPinProperties(); CHECK_STATUS(status); return 0;*/ } // SPECIALNETS int snetCB(defwCallbackType_e c, defiUserData ud) { /*int status; const char **coorX, **coorY; checkType(c); //if ((int)ud != userData) dataError(); status = defwStartSpecialNets(2); CHECK_STATUS(status); status = defwSpecialNet("net1"); CHECK_STATUS(status); status = defwSpecialNetConnection("cell1", "VDD", 0); CHECK_STATUS(status); status = defwSpecialNetConnection("cell2", "VDD", 0); CHECK_STATUS(status); status = defwSpecialNetConnection("cell3", "VDD", 0); CHECK_STATUS(status); status = defwSpecialNetConnection("cell4", "VDD", 0); CHECK_STATUS(status); status = defwSpecialNetWidth("M1", 200); CHECK_STATUS(status); status = defwSpecialNetWidth("M2", 300); CHECK_STATUS(status); status = defwSpecialNetVoltage(3.2); CHECK_STATUS(status); status = defwSpecialNetSpacing("M1", 200, 190, 210); CHECK_STATUS(status); status = defwSpecialNetSource("TIMING"); CHECK_STATUS(status); status = defwSpecialNetOriginal("VDD"); CHECK_STATUS(status); status = defwSpecialNetUse("POWER"); CHECK_STATUS(status); status = defwSpecialNetWeight(30); CHECK_STATUS(status); status = defwStringProperty("contype", "star"); CHECK_STATUS(status); status = defwIntProperty("ind", 1); CHECK_STATUS(status); status = defwRealProperty("maxlength", 12.13); CHECK_STATUS(status); status = defwSpecialNetEndOneNet(); CHECK_STATUS(status); status = defwSpecialNet("VSS"); CHECK_STATUS(status); status = defwSpecialNetConnection("cell1", "GND", 0); CHECK_STATUS(status); status = defwSpecialNetConnection("cell2", "GND", 0); CHECK_STATUS(status); status = defwSpecialNetConnection("cell3", "GND", 0); CHECK_STATUS(status); status = defwSpecialNetConnection("cell4", "GND", 0); CHECK_STATUS(status); status = defwSpecialNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwSpecialNetPathLayer("M1"); CHECK_STATUS(status); status = defwSpecialNetPathWidth(250); CHECK_STATUS(status); status = defwSpecialNetPathShape("IOWIRE"); CHECK_STATUS(status); coorX = (const char**)malloc(sizeof(char*) * 3); coorY = (const char**)malloc(sizeof(char*) * 3); coorX[0] = strdup("5"); coorY[0] = strdup("15"); coorX[1] = strdup("125"); coorY[1] = strdup("*"); coorX[2] = strdup("245"); coorY[2] = strdup("*"); //status = defwSpecialNetPathPoint(3, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetPathEnd(); free((char*)coorX[0]); free((char*)coorY[0]); free((char*)coorX[1]); free((char*)coorY[1]); CHECK_STATUS(status); status = defwSpecialNetShieldStart("my_net"); CHECK_STATUS(status); status = defwSpecialNetShieldLayer("M2"); CHECK_STATUS(status); status = defwSpecialNetShieldWidth(90); CHECK_STATUS(status); coorX[0] = strdup("14100"); coorY[0] = strdup("342440"); coorX[1] = strdup("13920"); coorY[1] = strdup("*"); //status = defwSpecialNetShieldPoint(2, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetShieldVia("M2_TURN"); CHECK_STATUS(status); free((char*)coorX[0]); free((char*)coorY[0]); coorX[0] = strdup("*"); coorY[0] = strdup("263200"); //status = defwSpecialNetShieldPoint(1, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetShieldVia("M1_M2"); CHECK_STATUS(status); free((char*)coorX[0]); free((char*)coorY[0]); coorX[0] = strdup("2400"); coorY[0] = strdup("*"); //status = defwSpecialNetShieldPoint(1, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetShieldEnd(); CHECK_STATUS(status); status = defwSpecialNetShieldStart("my_net1"); CHECK_STATUS(status); status = defwSpecialNetShieldLayer("M2"); CHECK_STATUS(status); status = defwSpecialNetShieldWidth(90); CHECK_STATUS(status); free((char*)coorX[0]); free((char*)coorY[0]); free((char*)coorX[1]); free((char*)coorY[1]); coorX[0] = strdup("14100"); coorY[0] = strdup("342440"); coorX[1] = strdup("13920"); coorY[1] = strdup("*"); //status = defwSpecialNetShieldPoint(2, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetShieldVia("M2_TURN"); CHECK_STATUS(status); free((char*)coorX[0]); free((char*)coorY[0]); coorX[0] = strdup("*"); coorY[0] = strdup("263200"); //status = defwSpecialNetShieldPoint(1, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetShieldVia("M1_M2"); CHECK_STATUS(status); free((char*)coorX[0]); free((char*)coorY[0]); coorX[0] = strdup("2400"); coorY[0] = strdup("*"); //status = defwSpecialNetShieldPoint(1, coorX, coorY); CHECK_STATUS(status); status = defwSpecialNetShieldEnd(); CHECK_STATUS(status); status = defwSpecialNetPattern("STEINER"); CHECK_STATUS(status); status = defwSpecialNetEstCap(100); CHECK_STATUS(status); status = defwSpecialNetEndOneNet(); CHECK_STATUS(status); free((char*)coorX[0]); free((char*)coorY[0]); free((char*)coorX[1]); free((char*)coorY[1]); free((char*)coorX[2]); free((char*)coorY[2]); free((char*)coorX); free((char*)coorY); status = defwEndSpecialNets(); CHECK_STATUS(status); return 0;*/ } // NETS /*int netCB(defwCallbackType_e c, defiUserData ud) { int status; const char **coorX, **coorY; const char **coorValue; checkType(c); ////if ((int)ud != userData) dataError(); status = defwStartNets(11); CHECK_STATUS(status); status = defwNet("net1"); CHECK_STATUS(status); status = defwNetConnection("Z38A01", "Q", 0); CHECK_STATUS(status); status = defwNetConnection("Z38A03", "Q", 0); CHECK_STATUS(status); status = defwNetConnection("Z38A05", "Q", 0); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("net2"); CHECK_STATUS(status); status = defwNetConnection("cell1", "PB1", 0); CHECK_STATUS(status); status = defwNetConnection("cell2", "PB1", 0); CHECK_STATUS(status); status = defwNetConnection("cell3", "PB1", 0); CHECK_STATUS(status); status = defwNetEstCap(200); CHECK_STATUS(status); status = defwNetWeight(2); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("net3"); CHECK_STATUS(status); status = defwNetConnection("cell4", "PA3", 0); CHECK_STATUS(status); status = defwNetConnection("cell2", "P10", 0); CHECK_STATUS(status); status = defwNetXtalk(30); CHECK_STATUS(status); status = defwNetOriginal("extra_crispy"); CHECK_STATUS(status); status = defwNetSource("USER"); CHECK_STATUS(status); status = defwNetUse("SIGNAL"); CHECK_STATUS(status); status = defwIntProperty("alt", 37); CHECK_STATUS(status); status = defwStringProperty("lastName", "Unknown"); CHECK_STATUS(status); status = defwRealProperty("length", 10.11); CHECK_STATUS(status); status = defwNetPattern("BALANCED"); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); coorX = (const char**)malloc(sizeof(char*) * 5); coorY = (const char**)malloc(sizeof(char*) * 5); coorValue = (const char**)malloc(sizeof(char*) * 5); status = defwNet("my_net"); CHECK_STATUS(status); status = defwNetConnection("I1", "A", 0); CHECK_STATUS(status); status = defwNetConnection("BUF", "Z", 0); CHECK_STATUS(status); status = defwNetNondefaultRule("RULE1"); CHECK_STATUS(status); status = defwNetShieldnet("VSS"); CHECK_STATUS(status); status = defwNetShieldnet("VDD"); CHECK_STATUS(status); status = defwNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwNetPathLayer("M2", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("14000"); coorY[0] = strdup("341440"); coorValue[0] = NULL; coorX[1] = strdup("9600"); coorY[1] = strdup("*"); coorValue[1] = NULL; coorX[2] = strdup("*"); coorY[2] = strdup("282400"); coorValue[2] = NULL; //status = defwNetPathPoint(3, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("nd1VIA12"); CHECK_STATUS(status); coorX[0] = strdup("2400"); coorY[0] = strdup("*"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathStart("NEW"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 1, NULL); CHECK_STATUS(status); coorX[0] = strdup("2400"); coorY[0] = strdup("282400"); coorValue[0] = NULL; coorX[1] = strdup("240"); coorY[1] = strdup("*"); coorValue[1] = NULL; //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathEnd(); CHECK_STATUS(status); status = defwNetNoshieldStart("M2"); CHECK_STATUS(status); coorX[0] = strdup("14100"); coorY[0] = strdup("341440"); coorX[1] = strdup("14000"); coorY[1] = strdup("*"); status = defwNetNoshieldPoint(2, coorX, coorY); CHECK_STATUS(status); status = defwNetNoshieldEnd(); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("|INBUS[1]"); CHECK_STATUS(status); status = defwNetConnection("|i1", "A", 0); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("|INBUS<0>"); CHECK_STATUS(status); status = defwNetConnection("|i0", "A", 0); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("|OUTBUS<1>"); CHECK_STATUS(status); status = defwNetConnection("|i0", "Z", 0); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("MUSTJOIN"); CHECK_STATUS(status); status = defwNetConnection("cell4", "PA1", 0); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("XX100"); CHECK_STATUS(status); status = defwNetConnection("Z38A05", "G", 0); CHECK_STATUS(status); status = defwNetConnection("Z38A03", "G", 0); CHECK_STATUS(status); status = defwNetConnection("Z38A01", "G", 0); CHECK_STATUS(status); status = defwNetVpin("V_SUB3_XX100", NULL, -333, -333, 333, 333, "PLACED", 189560, 27300, 0); CHECK_STATUS(status); status = defwNetVpin("V_SUB2_XX100", NULL, -333, -333, 333, 333, "PLACED", 169400, 64500, 0); CHECK_STATUS(status); status = defwNetVpin("V_SUB1_XX100", NULL, -333, -333, 333, 333, "PLACED", 55160, 31500, 0); CHECK_STATUS(status); status = defwNetSubnetStart("SUB1_XX100"); CHECK_STATUS(status); status = defwNetSubnetPin("Z38A05", "G"); CHECK_STATUS(status); status = defwNetSubnetPin("VPIN", "V_SUB1_XX100"); CHECK_STATUS(status); status = defwNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 0, "RULE1"); CHECK_STATUS(status); coorX[0] = strdup("54040"); coorY[0] = strdup("30300"); coorValue[0] = strdup("0"); coorX[1] = strdup("*"); coorY[1] = strdup("30900"); coorValue[1] = NULL; //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathVia("nd1VIA12"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("*"); coorValue[0] = strdup("0"); coorX[1] = strdup("56280"); coorY[1] = strdup("*"); coorValue[1] = NULL; //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("31500"); coorValue[0] = NULL; coorX[1] = strdup("55160"); coorY[1] = strdup("*"); coorValue[1] = NULL; //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathEnd(); CHECK_STATUS(status); status = defwNetSubnetEnd(); CHECK_STATUS(status); status = defwNetSubnetStart("SUB2_XX100"); CHECK_STATUS(status); status = defwNetSubnetPin("Z38A03", "G"); CHECK_STATUS(status); status = defwNetSubnetPin("VPIN", "V_SUB2_XX100"); CHECK_STATUS(status); status = defwNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("168280"); coorY[0] = strdup("63300"); coorValue[0] = strdup("7"); coorX[1] = strdup("*"); coorY[1] = strdup("64500"); coorValue[1] = NULL; //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathVia("M1_M2"); CHECK_STATUS(status); coorX[0] = strdup("169400"); coorY[0] = strdup("*"); coorValue[0] = strdup("8"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); status = defwNetPathVia("M2_M3"); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); status = defwNetPathEnd(); CHECK_STATUS(status); status = defwNetSubnetEnd(); CHECK_STATUS(status); status = defwNetSubnetStart("SUB3_XX100"); CHECK_STATUS(status); status = defwNetSubnetPin("Z38A01", "G"); CHECK_STATUS(status); status = defwNetSubnetPin("VPIN", "V_SUB3_XX100"); CHECK_STATUS(status); status = defwNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("188400"); coorY[0] = strdup("26100"); coorValue[0] = strdup("0"); coorX[1] = strdup("*"); coorY[1] = strdup("27300"); coorValue[1] = strdup("0"); //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorValue[1]); status = defwNetPathVia("M1_M2"); CHECK_STATUS(status); coorX[0] = strdup("189560"); coorY[0] = strdup("*"); coorValue[0] = strdup("0"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); status = defwNetPathVia("M1_M2"); CHECK_STATUS(status); status = defwNetPathEnd(); CHECK_STATUS(status); status = defwNetSubnetEnd(); CHECK_STATUS(status); status = defwNetSubnetStart("SUB0_XX100"); CHECK_STATUS(status); status = defwNetSubnetPin("VPIN", "V_SUB1_XX100"); CHECK_STATUS(status); status = defwNetSubnetPin("VPIN", "V_SUB2_XX100"); CHECK_STATUS(status); status = defwNetSubnetPin("VPIN", "V_SUB3_XX100"); CHECK_STATUS(status); status = defwNetNondefaultRule("RULE1"); CHECK_STATUS(status); status = defwNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwNetPathLayer("M3", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("269400"); coorY[0] = strdup("64500"); coorValue[0] = strdup("0"); coorX[1] = strdup("*"); coorY[1] = strdup("54900"); coorValue[1] = NULL; coorX[2] = strdup("170520"); coorY[2] = strdup("*"); coorValue[2] = NULL; coorX[3] = strdup("*"); coorY[3] = strdup("37500"); coorValue[3] = NULL; coorX[4] = strdup("*"); coorY[4] = strdup("30300"); coorValue[4] = NULL; //status = defwNetPathPoint(5, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorX[2]); //free((char*)coorY[2]); //free((char*)coorX[3]); //free((char*)coorY[3]); //free((char*)coorX[4]); //free((char*)coorY[4]); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); coorX[0] = strdup("171080"); coorY[0] = strdup("*"); coorValue[0] = NULL; coorX[1] = strdup("17440"); coorY[1] = strdup("0"); coorValue[1] = strdup("0"); //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorValue[1]); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("*"); coorValue[0] = NULL; coorX[1] = strdup("*"); coorY[1] = strdup("26700"); coorValue[1] = strdup("8"); //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorValue[1]); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); coorX[0] = strdup("177800"); coorY[0] = strdup("*"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[1]); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("*"); coorValue[0] = strdup("8"); coorX[1] = strdup("*"); coorY[1] = strdup("30300"); coorValue[1] = strdup("8"); //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorValue[1]); status = defwNetPathVia("nd1VIA23"); CHECK_STATUS(status); coorX[0] = strdup("189560"); coorY[0] = strdup("*"); coorValue[0] = strdup("8"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[1]); status = defwNetPathVia("nd1VIA12"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("27300"); coorValue[0] = strdup("0"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); status = defwNetPathStart("NEW"); CHECK_STATUS(status); status = defwNetPathLayer("M3", 1, NULL); CHECK_STATUS(status); coorX[0] = strdup("55160"); coorY[0] = strdup("31500"); coorValue[0] = strdup("8"); coorX[1] = strdup("*"); coorY[1] = strdup("34500"); coorValue[1] = strdup("0"); //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorValue[1]); status = defwNetPathVia("M2_M3"); CHECK_STATUS(status); coorX[0] = strdup("149800"); coorY[0] = strdup("*"); coorValue[0] = strdup("8"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); status = defwNetPathVia("M2_M3"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("35700"); coorValue[0] = NULL; coorX[1] = strdup("*"); coorY[1] = strdup("37500"); coorValue[1] = NULL; //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); status = defwNetPathVia("M2_M3"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("*"); coorValue[0] = strdup("8");; coorX[1] = strdup("170520"); coorY[1] = strdup("*"); coorValue[1] = strdup("0"); //status = defwNetPathPoint(2, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); //free((char*)coorValue[0]); //free((char*)coorX[1]); //free((char*)coorY[1]); //free((char*)coorValue[1]); status = defwNetPathVia("M2_M3"); CHECK_STATUS(status); status = defwNetPathEnd(); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("SCAN"); CHECK_STATUS(status); status = defwNetConnection("scancell1", "P10", 1); CHECK_STATUS(status); status = defwNetConnection("scancell2", "PA0", 1); CHECK_STATUS(status); status = defwNetSource("TEST"); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); status = defwNet("testBug"); CHECK_STATUS(status); status = defwNetConnection("Z38A05", "G", 0); CHECK_STATUS(status); status = defwNetConnection("Z38A03", "G", 0); CHECK_STATUS(status); status = defwNetConnection("Z38A01", "G", 0); CHECK_STATUS(status); status = defwNetPathStart("ROUTED"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("1288210"); coorY[0] = strdup("580930"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH1W1W1"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("582820"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH2W1W1"); CHECK_STATUS(status); status = defwNetPathStart("NEW"); CHECK_STATUS(status); status = defwNetPathLayer("M3", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("1141350"); coorY[0] = strdup("582820"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH2W1W1"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("580930"); //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH1W1W1"); CHECK_STATUS(status); status = defwNetPathStart("NEW"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("1278410"); coorY[0] = strdup("275170"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathStart("NEW"); CHECK_STATUS(status); status = defwNetPathLayer("M1", 0, NULL); CHECK_STATUS(status); coorX[0] = strdup("1141210"); coorY[0] = strdup("271250"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH1W1W1"); CHECK_STATUS(status); coorX[0] = strdup("*"); coorY[0] = strdup("271460"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH2W1W1"); CHECK_STATUS(status); coorX[0] = strdup("1142820"); coorY[0] = strdup("*"); coorValue[0] = NULL; //status = defwNetPathPoint(1, coorX, coorY, coorValue); CHECK_STATUS(status); //free((char*)coorX[0]); //free((char*)coorY[0]); status = defwNetPathVia("GETH3W1W1"); CHECK_STATUS(status); status = defwNetPathEnd(); CHECK_STATUS(status); status = defwNetEndOneNet(); CHECK_STATUS(status); //free((char*)coorX); //free((char*)coorY); //free((char*)coorValue); status = defwEndNets(); CHECK_STATUS(status); return 0; }*/ int netCB(defwCallbackType_e c, defiUserData ud) { int status; vector <Parser::ISPD_Routing_Net> Net_result; Net_result.assign(write_design.ispd_routing_net.begin(), write_design.ispd_routing_net.end()); /*checkType(c); status = defwStartNets(Net_result.size()); for (int i = 0; i < Net_result.size(); i++){ //Net name status = defwNet(Net_result[i].Original_Data.Net_name.c_str()); //CHECK_STATUS(status); // Component + Pin for (int pin = 0; pin < Net_result[i].Original_Data.CPN_list.size(); pin++){ status = defwNetConnection(Net_result[i].Original_Data.CPN_list[pin].Component_Name.c_str(), Net_result[i].Original_Data.CPN_list[pin].Pin_Name.c_str(), 0); CHECK_STATUS(status); } // Routed path //status = defwNetPathStart("ROUTED"); //CHECK_STATUS(status); for (int path = 0; path < Net_result[i].WireList.size(); path++){ if (path != 0){ status = defwNetPathStart("NEW"); //CHECK_STATUS(status); } if (path == 0){ status = defwNetPathStart("ROUTED"); } if (Net_result[i].WireList[path].path_type == 0){ double *coorX; double *coorY; coorX = new double[2]; coorY = new double[2]; string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Layer); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].Src_Pin.first; coorY[0] = Net_result[i].WireList[path].Src_Pin.second; //status = defwNetPathPoint(1, coorX, coorY); //CHECK_STATUS(status); coorX[1] = Net_result[i].WireList[path].Tar_Pin.first; coorY[1] = Net_result[i].WireList[path].Tar_Pin.second; status = defwNetPathPoint(2, coorX, coorY); //CHECK_STATUS(status); } else if (Net_result[i].WireList[path].path_type == 1){ double *coorX; double *coorY; coorX = new double[2]; coorY = new double[2]; string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Layer); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].Src_Pin.first; coorY[0] = Net_result[i].WireList[path].Src_Pin.second; //status = defwNetPathPoint(1, coorX, coorY); //CHECK_STATUS(status); coorX[1] = Net_result[i].WireList[path].Tar_Pin.first; coorY[1] = Net_result[i].WireList[path].Tar_Pin.second; status = defwNetPathPoint(2, coorX, coorY); //CHECK_STATUS(status); status = defwNetPathVia(Net_result[i].WireList[path].ViaName.c_str()); //CHECK_STATUS(status); } else if (Net_result[i].WireList[path].path_type == 2){ double *coorX; double *coorY; coorX = new double[1]; coorY = new double[1]; string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Layer); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].Src_Pin.first; coorY[0] = Net_result[i].WireList[path].Src_Pin.second; status = defwNetPathPoint(1, coorX, coorY); //CHECK_STATUS(status); status = defwNetPathVia(Net_result[i].WireList[path].ViaName.c_str()); //CHECK_STATUS(status); } //status = defwNetPathEnd(); //CHECK_STATUS(status); } status = defwNetPathEnd(); //CHECK_STATUS(status); status = defwNetEndOneNet(); //CHECK_STATUS(status); }*/ //status = defwEndNets(); //CHECK_STATUS(status); checkType(c); ////if ((int)ud != userData) dataError(); status = defwStartNets(Net_result.size()); for (int i = 0; i < Net_result.size(); i++){ //Net name status = defwNet(Net_result[i].Original_Data.Net_name.c_str()); //CHECK_STATUS(status); // Component + Pin for (int pin = 0; pin < Net_result[i].Original_Data.CPN_list.size(); pin++){ status = defwNetConnection(Net_result[i].Original_Data.CPN_list[pin].Component_Name.c_str(), Net_result[i].Original_Data.CPN_list[pin].Pin_Name.c_str(), 0); //CHECK_STATUS(status); } // Routed path //status = defwNetPathStart("ROUTED"); //CHECK_STATUS(status); for (int path = 0; path < Net_result[i].WireList.size(); path++){ if (Net_result[i].WireList[path].path_type == -1) continue; if (path != 0){ status = defwNetPathStart("NEW"); //CHECK_STATUS(status); } if (path == 0){ status = defwNetPathStart("ROUTED"); } //printf("path : %d , type %d\n", path, Net_result[i].WireList[path].path_type); if (Net_result[i].WireList[path].path_type == 0){ double *coorX; double *coorY; coorX = new double[2]; coorY = new double[2]; if(Net_result[i].WireList[path].Layer > 100){ printf("Net_result[%d].WireList[%d].Layer : %d\n",i,path,Net_result[i].WireList[path].Layer); exit(1); } string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Layer + 1); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].Src_Pin.first; coorY[0] = Net_result[i].WireList[path].Src_Pin.second; //status = defwNetPathPoint(1, coorX, coorY); //CHECK_STATUS(status); coorX[1] = Net_result[i].WireList[path].Tar_Pin.first; coorY[1] = Net_result[i].WireList[path].Tar_Pin.second; status = defwNetPathPoint(2, coorX, coorY); //CHECK_STATUS(status); } else if (Net_result[i].WireList[path].path_type == 1){ double *coorX; double *coorY; coorX = new double[2]; coorY = new double[2]; if(Net_result[i].WireList[path].Layer > 100){ printf("Net_result[%d].WireList[%d].Layer : %d\n",i,path,Net_result[i].WireList[path].Layer); exit(1); } string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Layer + 1); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].Src_Pin.first; coorY[0] = Net_result[i].WireList[path].Src_Pin.second; //status = defwNetPathPoint(1, coorX, coorY); //CHECK_STATUS(status); coorX[1] = Net_result[i].WireList[path].Tar_Pin.first; coorY[1] = Net_result[i].WireList[path].Tar_Pin.second; status = defwNetPathPoint(2, coorX, coorY); //CHECK_STATUS(status); status = defwNetPathVia(Net_result[i].WireList[path].ViaName.c_str()); //CHECK_STATUS(status); } else if (Net_result[i].WireList[path].path_type == 2){ double *coorX; double *coorY; coorX = new double[1]; coorY = new double[1]; if(Net_result[i].WireList[path].Layer > 100){ printf("Net_result[%d].WireList[%d].Layer : %d\n",i,path,Net_result[i].WireList[path].Layer); exit(1); } string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Layer + 1); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].Src_Pin.first; coorY[0] = Net_result[i].WireList[path].Src_Pin.second; status = defwNetPathPoint(1, coorX, coorY); //CHECK_STATUS(status); status = defwNetPathVia(Net_result[i].WireList[path].ViaName.c_str()); //CHECK_STATUS(status); } else if (Net_result[i].WireList[path].path_type == 3){ double *coorX; double *coorY; coorX = new double[1]; coorY = new double[1]; if(Net_result[i].WireList[path].Layer > 100){ printf("Net_result[%d].WireList[%d].Layer : %d\n",i,path,Net_result[i].WireList[path].Layer); exit(1); } string Layer_src = "Metal" + std::to_string(Net_result[i].WireList[path].Patch.Layer + 1); status = defwNetPathLayer(Layer_src.c_str(), 0, NULL); //CHECK_STATUS(status); coorX[0] = Net_result[i].WireList[path].PatchLocate.first; coorY[0] = Net_result[i].WireList[path].PatchLocate.second; status = defwNetPathPoint(1, coorX, coorY); /*status = defwNet(Net_result[i].WireList[path].Patch.LB.first, Net_result[i].WireList[path].Patch.LB.second, Net_result[i].WireList[path].Patch.RT.first, Net_result[i].WireList[path].Patch.RT.second);*/ fprintf(fout, " RECT ( %d %d %d %d )", Net_result[i].WireList[path].Patch.LB.first, Net_result[i].WireList[path].Patch.LB.second, Net_result[i].WireList[path].Patch.RT.first, Net_result[i].WireList[path].Patch.RT.second); } //status = defwNetPathEnd(); //CHECK_STATUS(status); } status = defwNetPathEnd(); //CHECK_STATUS(status); status = defwNetEndOneNet(); //CHECK_STATUS(status); } //CHECK_STATUS(status); status = defwEndNets(); //CHECK_STATUS(status); } // GROUPS int groupCB(defwCallbackType_e c, defiUserData ud) { int status; const char **groupExpr; /*checkType(c); ////if ((int)ud != userData) dataError(); groupExpr = (const char**)malloc(sizeof(char*) * 2); status = defwStartGroups(2); CHECK_STATUS(status); groupExpr[0] = strdup("cell2"); groupExpr[1] = strdup("cell3"); status = defwGroup("group1", 2, groupExpr); CHECK_STATUS(status); free((char*)groupExpr[0]); free((char*)groupExpr[1]); status = defwGroupRegion(0, 0, 0, 0, "region1"); CHECK_STATUS(status); status = defwStringProperty("ggrp", "xx"); CHECK_STATUS(status); status = defwIntProperty("side", 2); CHECK_STATUS(status); status = defwRealProperty("maxarea", 5.6); CHECK_STATUS(status); groupExpr[0] = strdup("cell1"); status = defwGroup("group2", 1, groupExpr); CHECK_STATUS(status); free((char*)groupExpr[0]); status = defwGroupRegion(0, 10, 1000, 1010, NULL); CHECK_STATUS(status); status = defwStringProperty("ggrp", "after the fall"); CHECK_STATUS(status); status = defwGroupSoft("MAXHALFPERIMETER", 4000, "MAXX", 10000, NULL, NULL); CHECK_STATUS(status); status = defwEndGroups(); CHECK_STATUS(status); free((char*)groupExpr); status = defwNewLine(); CHECK_STATUS(status);*/ return 0; } // BEGINEXT int extensionCB(defwCallbackType_e c, defiUserData ud) { int status; /*checkType(c); ////if ((int)ud != userData) dataError(); status = defwStartBeginext("tag"); CHECK_STATUS(status); status = defwBeginextCreator("CADENCE"); CHECK_STATUS(status); status = defwBeginextDate(); CHECK_STATUS(status); status = defwBeginextSyntax("OTTER", "furry"); CHECK_STATUS(status); status = defwStringProperty("arrg", "later"); CHECK_STATUS(status); status = defwBeginextSyntax("SEAL", "cousin to WALRUS"); CHECK_STATUS(status); status = defwEndBeginext(); CHECK_STATUS(status);*/ return 0; } static int designendCB(defwCallbackType_e c, defiUserData ud) { int status; checkType(c); ////if ((int)ud != userData) dataError(); status = defwEnd(); CHECK_STATUS(status); return 0; } int Def_write(int argc, char** argv,Parser::Design &design,string FileName) { char* outfile; int status; // return code, if none 0 means error int res; // assign the default /*strcpy(defaultOut, "def.in"); outfile = defaultOut; fout = stdout;*/ //userData = 0x01020304; double* axis; double* num1; double* num2; double* num3; //fout = fopen(defaultOut,"wb"); /*argc--; argv++;*/ /*while (argc--) { if (strcmp(*argv, "-o") == 0) { // output filename argv++; argc--; outfile = *argv; if ((fout = fopen(outfile, "w")) == 0) { fprintf(stderr, "ERROR: could not open output file\n"); return 2; } } else if (strncmp(*argv, "-h", 2) == 0) { // compare with -h[elp] fprintf(stderr, "Usage: defwrite [-o <filename>] [-help]\n"); return 1; } else { fprintf(stderr, "ERROR: Illegal command line option: '%s'\n", *argv); return 2; } argv++; }*/ int def_file_index = -1; for (int argc_index = 1; argc_index < argc; argc_index++) { if (strcmp(argv[argc_index], "-lef") == 0) { } else if (strcmp(argv[argc_index], "-def") == 0) { def_file_index = argc_index + 1; } else if (strcmp(argv[argc_index], "-guide") == 0) { } else if (strcmp(argv[argc_index], "-threads") == 0) { } else if (strcmp(argv[argc_index], "-output") == 0) { } argc_index++; } FILE* fp = fopen(FileName.c_str(), "wb"); write_design = design; //FILE *def_file = fopen(argv[2],"rb"); ifstream def_file; def_file.open(argv[def_file_index]); string text; while (!def_file.eof()){ getline(def_file, text); if (text.find("VERSION") != std::string::npos) { fprintf(fp, "VERSION 5.8 ;\n"); } else if (text.find("NETS") != std::string::npos){ break; } else{ fprintf(fp, "%s\n", text.c_str()); } } fclose(fp); fout = fopen(FileName.c_str(), "a+"); // initalize status = defwInitCbk(fout); CHECK_STATUS(status); // set the callback functions /*defwSetArrayCbk(arrayCB); defwSetBusBitCbk(busbitCB); defwSetDividerCbk(dividerCB); defwSetComponentCbk(componentCB); defwSetDesignCbk(designCB); defwSetDesignEndCbk((defwVoidCbkFnType)designendCB); defwSetDieAreaCbk(dieareaCB); defwSetExtCbk(extensionCB); defwSetFloorPlanCbk(floorplanCB); defwSetGcellGridCbk(gcellgridCB); defwSetGroupCbk(groupCB); defwSetHistoryCbk(historyCB); defwSetNetCbk(netCB); defwSetPinCbk(pinCB); defwSetPinPropCbk(pinpropCB); defwSetPropDefCbk(propdefCB); defwSetRegionCbk(regionCB); defwSetRowCbk(rowCB); defwSetSNetCbk(snetCB); defwSetTechnologyCbk(technologyCB); defwSetTrackCbk(trackCB); defwSetUnitsCbk(unitsCB); defwSetViaCbk(viaCB);*/ defwSetDesignCbk(designCB); defwSetDesignEndCbk((defwVoidCbkFnType)designendCB); defwSetNetCbk(netCB); res = defwWrite(fout, outfile, (void*)userData); fclose(fout); return 0; }
[ "ching-hsi-chen@chenjingxide-MacBook-Pro.local" ]
ching-hsi-chen@chenjingxide-MacBook-Pro.local
32d1edfa534a6b3733dba985ec208efc01530001
efc83da9e85f1bf1da56384a6617e523805ce9c8
/src/lib/Krypto.ninja-lang.h
11e16721a5e7b5e6354dd5700b1552375d6702c3
[ "ISC", "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
xmnthx/Krypto-trading-bot
561562e43863a3ceafca5525e4753f434b7982d6
95bdbcae7efaddb85eac789be0244c26582eb1ec
refs/heads/master
2020-04-23T08:28:26.919357
2019-02-15T03:17:01
2019-02-15T03:17:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,644
h
#ifndef K_LANG_H_ #define K_LANG_H_ //! \file //! \brief Available language interface. #include <cstdlib> #include <iostream> #include <sstream> #include <string> #include <vector> #include <unordered_map> #include <map> #include <ctime> #include <cmath> #include <mutex> #include <thread> #include <future> #include <chrono> #include <random> #include <locale> #include <csignal> #include <variant> #include <algorithm> #include <functional> #include <getopt.h> #ifdef _WIN32 #define strsignal to_string #else #include <execinfo.h> #include <sys/resource.h> #endif using namespace std; #include <json.h> #include <sqlite3.h> #include <uWS/uWS.h> #include <curl/curl.h> #include <openssl/bio.h> #include <openssl/evp.h> #include <openssl/sha.h> #include <openssl/hmac.h> #include <openssl/buffer.h> #include <ncurses/ncurses.h> #include <quickfix/NullStore.h> #include <quickfix/Application.h> #include <quickfix/SessionSettings.h> #include <quickfix/SSLSocketInitiator.h> #include <quickfix/fix42/NewOrderSingle.h> #include <quickfix/fix42/OrderCancelRequest.h> #ifndef M_PI_2 #define M_PI_2 1.5707963267948965579989817342720925807952880859375 #endif using Price = double; using Amount = double; using RandId = string; using CoinId = string; using Clock = long long int; //! \def //! \brief Number of ticks in milliseconds since Thu Jan 1 00:00:00 1970. #define Tstamp chrono::duration_cast<chrono::milliseconds>( \ chrono::system_clock::now().time_since_epoch() \ ).count() //! \def //! \brief Redundant placeholder to enforce private references. #define private_ref private //! \def //! \brief A number used as impossible or unset value, when 0 is not appropiate. //! \since Having seen Bourbon brutality after the fall of Valencia, //! Barcelona decided to resist. The 14-month Siege of Barcelona //! began on July 7th 1713 and 25,000 Franco-Castilian troops //! surrounded the city defended by 5,000 civilians. //! After some Catalan successes, Bourbon reinforcements arrived //! and the attackers now numbered 40,000. //! After a heroic defence, Barcelona finally fell, //! on September 11th 1714. //! Catalonia then ceased to exist as an independent state. //! The triumphant forces systematically dismantled all Catalan //! institutions, established a new territory for the whole Spain, //! suppressed Catalan universities, banned the Catalan language, //! and repressed with violence any kind of dissidence. //! \link wikipedia.org/wiki/National_Day_of_Catalonia #define ANY_NUM 1714 #endif
[ "ctubio@users.noreply.github.com" ]
ctubio@users.noreply.github.com
3762d485932295994365c7d614ace2e713b3097c
a6c8d127c8499b87aeff538e196d6e88205bd474
/source/Plugins/RenderSystemScript/src/CmdCreateBuffer.cpp
1e90c538b0f4bd49c0dba50c2f0311732418bde1
[]
no_license
DavidSunny86/nextar
752a1e158ea551f04f753137adccb2d732ef0a9e
effab6ba67d4810f03443658085025cbb19b400b
refs/heads/master
2020-12-30T16:28:43.561303
2017-04-23T17:14:04
2017-04-23T17:14:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,385
cpp
/* * CmdCreateBuffer.cpp * * Created on: 17-Feb-2016 * Author: obhi */ #include <CmdCreateBuffer.h> #include <RenderScriptContext.h> namespace RenderSystemScript { void CmdCreateBuffer::ParseDimension(const String& value, uint16& d, float& f) { float r = 0.0f; if (value.compare(0, 7, "view-x-") != 0) { d = (uint16)Convert::ToULong(value); f = 0.0f; } else { d = 0; f = Convert::ToFloat(&value.c_str()[7]); } } bool CmdCreateBuffer::BeginExecute(CommandContext* pContext, const ASTCommand* command) const { RenderScriptContext* c = static_cast<RenderScriptContext*>(pContext); auto it = command->GetParameters().Iterate(c->_resolver); c->_numTargets = 0; c->_bufferDim.combined = 0; c->_bufferDepth = 1; c->_bufferDimFactor = Vec2::type(1, 1); String temp; if (it.HasNext(temp)) c->_bufferName = temp; if (it.HasNext(temp)) ParseDimension(temp, c->_bufferDim.dx, c->_bufferDimFactor.x); if (it.HasNext(temp)) ParseDimension(temp, c->_bufferDim.dy, c->_bufferDimFactor.y); float depthFactor; if (it.HasNext(temp)) ParseDimension(temp, c->_bufferDepth, depthFactor); return true; } RenderTargetPtr CmdCreateBuffer::CreateTarget(RenderScriptContext* c, const Target& t, uint32 index) { RenderTargetPtr ret; String name = c->_bufferName; if (t.isDepthTarget) { name += ".depth"; } else { name += ".color-"; name += Convert::ToString(index); } StringID nameId = StringUtils::GetStringID(name); if (t.asTexture) { RenderTexture::CreateParams params; params.depth = c->_bufferDepth; params.width = c->_bufferDim.dx; params.height = c->_bufferDim.dy; params.type = TextureBase::TextureType::TEXTURE_2D; params.format = t.format; ret = c->_rsys.CreateRenderTexture(nameId, params, c->_bufferDimFactor.x, c->_bufferDimFactor.y); } else { RenderBuffer::CreateParams params; params.format = t.format; params.dimensions = c->_bufferDim; // @todo Set samples params.samples = 0; ret = c->_rsys.CreateRenderBuffer(nameId, params, c->_bufferDimFactor.x, c->_bufferDimFactor.y); } return ret; } void CmdCreateBuffer::EndExecute(CommandContext* pContext, const ASTCommand* command) const { RenderScriptContext* c = static_cast<RenderScriptContext*>(pContext); if (c->_bufferName == StringUtils::Null) { Warn("Unnamed buffer!"); c->_bufferName = "buffer-"; c->_bufferName += Convert::ToString(c->_rsys.GetRenderTargetCount()); } StringID bufferNameId = StringUtils::GetStringID(c->_bufferName); if (c->_numTargets == 1) { RenderTargetPtr r = CreateTarget(c, c->_targets[0], 0); c->_rsys.RegisterTarget(bufferNameId, r); } else { MultiRenderTarget::CreateParams params; params.dimensions = c->_bufferDim; params.numColorTargets = 0; params.useDepth = false; for(uint32 i = 0; i < c->_numTargets; ++i) { auto& t = c->_targets[i]; if(t.isDepthTarget) { params.useDepth = true; params.depth.format = t.format; params.depth.useAsTexture = t.asTexture; params.depth.useTarget = CreateTarget(c, t, 0); } else { auto& t2 = params.targets[params.numColorTargets++]; t2.format = t.format; t2.useAsTexture = t.asTexture; t2.useTarget = CreateTarget(c, t, params.numColorTargets-1); } } c->_rsys.CreateMultiRenderTarget(bufferNameId, params, c->_bufferDimFactor.x, c->_bufferDimFactor.y); } } } /* namespace RenderSystemScript */
[ "obi.de.online@gmail.com" ]
obi.de.online@gmail.com
1eeaa6d7794285a4437d7d852ffbf676f661abd1
5f4fe4304458b112daeb5931e793aa4b345436d4
/leason2/leason2/leason2.cpp
1f2080e7fe1a47c85984f374b7547f940696ea03
[]
no_license
Hoang-37/Pro
4aa581adf6599764ce7fc823da3b6211d86c1a25
237a9826fee25e04aabae90d04c032a62b47c697
refs/heads/main
2023-08-31T10:25:24.149393
2021-09-15T01:26:14
2021-09-15T01:26:14
394,313,306
0
0
null
null
null
null
UTF-8
C++
false
false
408
cpp
#include<iostream> using namespace std; int factorial(int n) { if (n == 0 || n == 1) return 1; return n * factorial(n - 1); } int main() { int n; cout << "Enter a positive integer: "; cin >> n; while (n < 0) { cout << "\n Fail ! Please enter again: "; cin >> n; } cout << "\n" << "Factorial: " << n << "! = " << factorial(n) << "\n"; return 0; }
[ "hoang.nd186303@sis.hust.edu.vn" ]
hoang.nd186303@sis.hust.edu.vn
0a8f7397ad755b8c5f6c1d75a0f04ddaaeaf5857
f4688017a0927dbdbe61bf4982dd55122e540eb0
/examples/webserver_ehternet_shield_example_02/webserver_ehternet_shield_example_02.ino
8936470a95b4b9aabfe27ff712bb87ba97d7c61e
[]
no_license
cnc4less/virtuino
b95d6feda171e841f8bdae36e58a4c64f9119839
3eba3328675abcc6887462d25b64a228d89eef94
refs/heads/master
2023-04-21T22:16:35.229423
2019-08-17T19:06:03
2019-08-17T19:06:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,983
ino
/* Virtuino Ethernet Shield web server example No2 * Example name = "Read digital or analog inputs - Write to analog outputs" * Created by Ilias Lamprou * Updated May 18 2019 * Before running this code config the settings below as the instructions on the right * * * Download latest Virtuino android app from the link: https://play.google.com/store/apps/details?id=com.virtuino_automations.virtuino&hl=el * Getting starting link: * Video tutorial link: * Contact address for questions or comments: iliaslampr@gmail.com */ /*========= Virtuino General methods * * void vDigitalMemoryWrite(int digitalMemoryIndex, int value) write a value to a Virtuino digital memory (digitalMemoryIndex=0..31, value range = 0 or 1) * int vDigitalMemoryRead(int digitalMemoryIndex) read the value of a Virtuino digital memory (digitalMemoryIndex=0..31, returned value range = 0 or 1) * void vMemoryWrite(int memoryIndex, float value); write a value to Virtuino memory (memoryIndex=0..31, value range as float value) * float vMemoryRead(int memoryIndex); read a value of Virtuino memory (memoryIndex=0..31, returned a float value * run(); neccesary command to communicate with Virtuino android app (on start of void loop) * int getPinValue(int pin); read the value of a Pin. Usefull to read the value of a PWM pin * void vDelay(long milliseconds); Pauses the program (without block communication) for the amount of time (in miliseconds) specified as parameter * void clearTextBuffer(); Clear the text received text buffer * int textAvailable(); Check if there is text in the received buffer * String getText(byte ID); Read the text from Virtuino app * void sendText(byte ID, String text); Send text to Virtuino app */ #include "VirtuinoEthernet_WebServer.h" // Necessary virtuino library for ethernet shield byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; // Set the ethernet shield mac address. IPAddress ip(192, 168, 1, 150); // Set the ethernet shield ip address. Check your gateway ip address first EthernetServer VirtuinoServer(8000); // default port=8000 VirtuinoEthernet_WebServer virtuino(&VirtuinoServer); //================================================================== setup //================================================================== //================================================================== void setup(){ virtuino.DEBUG=true; // set this value TRUE to enable the serial monitor status Serial.begin(9600); // Enable this line only if DEBUG=true Ethernet.begin(mac, ip); VirtuinoServer.begin(); virtuino.password="1234"; // Set a password to your web server for more protection // avoid special characters like ! $ = @ # % & * on your password. Use only numbers or text characters Serial.println("Server Ready"); Serial.println(Ethernet.localIP()); //------ enter your setup code below // Make the following connections to your arduino board to test this example pinMode(5,INPUT); // Connect a switch or button to pin 5 as digtial input pinMode(6,OUTPUT); // Connect a LED to pin 12 as digital output pinMode(9,OUTPUT); // Connect a LED to pin 10 as analog output. // Connect a potentiometer to analog pin A0 // Don't use pins 10,11,12,13 in your code. They used by Ethernet Shield } //================================================================== loop //================================================================== //================================================================== void loop(){ virtuino.run(); // necessary command to communicate with Virtuino android app //------ enter your loop code below here //------ avoid to use delay() function in your code. Use the command virtuino.vDelay() instead of delay() // your code ..... //----- end of your code }
[ "noreply@github.com" ]
noreply@github.com
7d725fc7f1aa33a5e8c5f34a2bba2620c3fd44ce
09b62b21d4450cf737a62da16d2d6006dbcba86a
/yl_32/sourcecode/gameworld/onlinegamemodule/item2/klibofbpt.h
1985863fabdaa6b24e23a12b440b6f2762c0e61c
[]
no_license
hw233/clua_yol
fa16cf913092286f9ea3d11db1e911568f569363
bbc2e55290c185f6cfff72af9e1b9a96f9e6f074
refs/heads/master
2020-03-19T06:24:23.486101
2016-02-23T10:04:58
2016-02-23T10:04:58
null
0
0
null
null
null
null
GB18030
C++
false
false
3,905
h
#ifndef __KLIBOFBPT_H__ #define __KLIBOFBPT_H__ #include "kbasproptbl.h" class KItem; //--------------------------------------------------------------------------- // 该数据结构用于输出角色装备中对套装的持有情况(穿在身上的) typedef std::map<INT, INT> KITEM_SUITE_COUNT_MAP; // Key是套装ID, Value是持有的套装件数 //--------------------------------------------------------------------------- // 该数据结构用来记录套装的完整信息 struct KSUITE_INFO { KSUITE_INFO() : pInfo(NULL), nCount(0) {} CONST KBASICPROP_SUITEINFO* pInfo; INT nCount; std::vector<KITEM_INDEX> aryPart[emEQUIPPOS_NUM]; }; //--------------------------------------------------------------------------- // KLibOfBPT class KLibOfBPT { public: typedef std::map<INT, KSUITE_INFO> KSuiteInfoMap; // Suite Info Map 下标是Suite ID typedef std::vector<KMAGIC_INDEX> KMagicIndexVec; // 魔法属性索引表 public: BOOL Init(INT nVersion); CONST KMagicIndexVec* GetRandMAT(BOOL bDarkness, INT nEquipType) CONST; CONST KBASICPROP_BASEDATA* GetBasicProp(CONST KITEM_INDEX &sIndex) CONST; CONST KSUITE_INFO* GetGoldSuiteInfo(INT nSuiteId) CONST; CONST KSUITE_INFO* GetGreenSuiteInfo(INT nSuiteId) CONST; CONST KBASICPROP_MAGICACTIVERULE* GetActiveRuleInfo(INT nRuleId) CONST; private: BOOL InitRandMAT(INT nVersion); VOID InitExternSetting(INT nVersion); // 初始化外部扩充的道具配置 VOID InitSuiteInfo(INT nVersion); // 整理套装数据:统计包含的套装装备,以及总件数 template<typename KBPT_Equip, typename KBASICPROP_SUITE, typename KBPT_Info> VOID InitSuiteInfoT(KSuiteInfoMap &mapSuiteInfo, KBPT_Equip &cBPTEquip, KBPT_Info &cBPTInfo); CONST KBASICPROP_BASEDATA* GetBasicPropStrictly(CONST KITEM_INDEX &sIndex) CONST; public: KBPT_GE_Sword m_cGE_Sword; KBPT_GE_Spear m_cGE_Spear; KBPT_GE_Necklace m_cGE_Necklace; // 项链 KBPT_GE_Ring m_cGE_Ring; // 戒指 KBPT_GE_Pendant m_cGE_Pendant; // 玉佩 KBPT_GE_Head m_cGE_Head; KBPT_GE_Armor m_cGE_Armor; // 衣服 KBPT_GE_Belt m_cGE_Belt; // 腰带 KBPT_GE_Cloak m_cGE_Cloak; // 披风 KBPT_GE_Foot m_cGE_Foot; // 鞋子 KBPT_GE_Suit m_cGE_Suit; // 套装(外装) KBPT_GE_Bottom m_cGE_Bottom; // 脚底(外装) KBPT_GE_Back m_cGE_Back; // 背(外装) // 非装备道具 KBPT_Medicine m_cMedicine; // 药品 KBPT_Script_Item m_cScript; // 触发脚本的物品 KBPT_Upgrade_Material m_cUpgradeMaterial; // 升级材料 KBPT_Box m_cBox; KBPT_Stone m_cStone; // 宝石 KBPT_Ride m_cRide; // 坐骑卡片 KBPT_Pet_Equip m_cPetEquip; // 宠物装备 KBPT_Pet_Item m_cPetItem; // 宠物相关道具 //KBPT_Skill_Item m_cSkill; // 触发技能的物品 KBPT_Task_Quest m_cQuest; // 任务物品 //KBPT_Extend_Bag m_cExtBag; // 扩展包裹 //KBPT_Stuff_Item m_cStuff; // 生活技能材料 //KBPT_Plan_Item m_cPlan; // 生活技能配方 // 相关配置 KBPT_MagicAttrib m_cMagicAttrib; // 随机魔法属性 KBPT_GoldInfo m_cGoldInfo; // 黄金套装信息 KBPT_GreenInfo m_cGreenInfo; // 绿色套装信息 KBPT_EquipEffect m_cEquipEffect; // 装备特效信息 KBPT_MagicActiveRule m_cMagicActiveRule; // 魔法属性激活规则 protected: KSuiteInfoMap m_mapSIGold; // 黄金套装初始信息 KSuiteInfoMap m_mapSIGreen; // 绿色套装初始信息 KMagicIndexVec m_RandMAT[emMATF_COUNT_BRIGHTDARK][emMATF_COUNT_EQUIPTYPE]; }; // ------------------------------------------------------------------------- #endif /* __KLIBOFBPT_H__ */
[ "root@localhost.localdomain" ]
root@localhost.localdomain
c468843c7bcacb835b6d2bf988a741360cfae3c4
efd43a5e5e4b2f0827140b8f3dc836983b2e0016
/Hackerrank/RepeatedString.cpp
5d41b3db6a93c7831d2532297bc85fa0073b9add
[]
no_license
praveenagrawal/practiceCodes
c5641c01f41046797e2be917969599a8eb98458b
62b3455d011bfe6681f00c43fc2977794612cd04
refs/heads/master
2020-12-24T07:18:27.424580
2019-08-18T13:00:17
2019-08-18T13:00:17
58,453,613
0
0
null
null
null
null
UTF-8
C++
false
false
757
cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #include <sstream> #include <iostream> #include <algorithm> using namespace std; int main(){ string s; cin >> s; long n; cin >> n; long long countA=0, c2=0; for(int i=0;i<s.length();i++) { if(s[i]=='a') countA++; } int temp = n % s.length(); for(int i=0;i<temp;i++) { if(s[i]=='a') c2++; } countA = (n/s.length())*countA + c2; cout<<countA<<endl; return 0; }
[ "praveen.agrawal0@gmail.com" ]
praveen.agrawal0@gmail.com
f6d19e662323987ccae1a0f753953534a2e40991
1d3f3f6e0e6fed8cfd6b2b6a08575e96fd03235a
/include/json/details/util.hpp
3cd006ec95d5b9da9979ad8628cfddef708ea1a8
[ "BSD-3-Clause" ]
permissive
gbalduzz/cpp-json-parser
06133127a04a4432be637560faf37e16ad1bed92
b938d1816e027724f554c6adb2abc1ca638fdcc3
refs/heads/master
2022-12-27T00:52:56.733373
2020-09-30T14:11:55
2020-09-30T14:11:55
298,251,014
0
0
null
null
null
null
UTF-8
C++
false
false
452
hpp
#pragma once #include <istream> #include <string> namespace json::details { std::string readQuotedString(std::istream& inp); void skipUntil(std::istream& inp, char target); void trimUntil(std::istream& inp, char target); void trimSpaces(std::istream& inp); std::string_view trimSpaces(std::string_view s); std::string findLine(std::istream& inp); std::string findLine(std::istream& inp, const std::streampos& pos); } // namespace json::details
[ "gbalduzz@itp.phys.ethz.ch" ]
gbalduzz@itp.phys.ethz.ch
7afe2e67ebc4f2eca26b323612319f0b41b2317f
0d94bcc96acfcbc7b80f5cf2da4bc17af2632c51
/code/src/RawFileSource.cpp
3dcf0251519c07862fb36525c6f4b4d34e42c4da
[ "MIT" ]
permissive
benishor/yo6ssw-trx
5d508081862c7a1f62205f404a707a913397c20e
8279b97ff751828428fdbb5e538f2ed8adbf9acf
refs/heads/master
2021-01-19T23:25:07.462144
2017-09-03T10:09:07
2017-09-03T10:09:07
101,265,785
0
0
null
null
null
null
UTF-8
C++
false
false
634
cpp
// // Created by benny on 8/29/17. // #include "RawFileSource.h" using namespace std; RawFileSource::RawFileSource(string filename) { file = ifstream(filename, ios::binary); if (!file) throw "Could not open file " + filename + " for reading"; } RawFileSource::~RawFileSource() { file.close(); } complex<double> RawFileSource::tick() { short i, q; file.read((char*) &i, sizeof(short)); file.read((char*) &q, sizeof(short)); // convert from [-32767,32767] signed integers to [-1.0, 1.0] doubles double realI = i / 32767.0; double realQ = q / 32767.0; return complex<double>(realI, realQ); }
[ "benishor@gmail.com" ]
benishor@gmail.com
8064a7ef8646e9dbc2b5e4c499ab3105f3854a30
2ccd53fd5f5a93e997d86746d49757f04bf6d9d7
/Main/LargeFont.ino
f042ad238241252302ea2a4eac1ca7983fa4b61f
[]
no_license
dcohenb/bomb-squad
292d6c10c4951ba3c5e6edfaf5957196cba84f70
61de31bab5f4fe13b1617902e678c70b2321b6f2
refs/heads/master
2020-07-29T08:24:35.964953
2019-09-23T12:44:38
2019-09-23T12:44:38
209,729,540
1
0
null
null
null
null
UTF-8
C++
false
false
779
ino
byte LT[8] = { B00111, B01111, B11111, B11111, B11111, B11111, B11111, B11111 }; byte UB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B00000, B00000 }; byte RT[8] = { B11100, B11110, B11111, B11111, B11111, B11111, B11111, B11111 }; byte LL[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B01111, B00111 }; byte LB[8] = { B00000, B00000, B00000, B00000, B00000, B11111, B11111, B11111 }; byte LR[8] = { B11111, B11111, B11111, B11111, B11111, B11111, B11110, B11100 }; byte UMB[8] = { B11111, B11111, B11111, B00000, B00000, B00000, B11111, B11111 }; byte LMB[8] = { B11111, B00000, B00000, B00000, B00000, B11111, B11111, B11111 };
[ "oryan@monday.com" ]
oryan@monday.com
e9fbfe0859f71c05c465f1b12f4bb0df9369d327
36183993b144b873d4d53e7b0f0dfebedcb77730
/GameDevelopment/Game Programming Gems 5/Section5-Graphics/5.08-VolumetricPostProcessing-Filion/Common/d3dsettings.cpp
4bf8ef2a0369d479acdc89d9aef903c9760ba392
[]
no_license
alecnunn/bookresources
b95bf62dda3eb9b0ba0fb4e56025c5c7b6d605c0
4562f6430af5afffde790c42d0f3a33176d8003b
refs/heads/master
2020-04-12T22:28:54.275703
2018-12-22T09:00:31
2018-12-22T09:00:31
162,790,540
20
14
null
null
null
null
UTF-8
C++
false
false
38,569
cpp
//----------------------------------------------------------------------------- // File: D3DSettings.cpp // // Desc: Settings class and change-settings dialog class for the Direct3D // samples framework library. // // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #include "dxstdafx.h" CD3DSettingsDialog* s_pSettingsDialog = NULL; //----------------------------------------------------------------------------- // Name: D3DDevTypeToString // Desc: Returns the string for the given D3DDEVTYPE. //----------------------------------------------------------------------------- TCHAR* D3DDevTypeToString(D3DDEVTYPE devType) { switch (devType) { case D3DDEVTYPE_HAL: return TEXT("D3DDEVTYPE_HAL"); case D3DDEVTYPE_SW: return TEXT("D3DDEVTYPE_SW"); case D3DDEVTYPE_REF: return TEXT("D3DDEVTYPE_REF"); default: return TEXT("Unknown devType"); } } //----------------------------------------------------------------------------- // Name: MultisampleTypeToString // Desc: Returns the string for the given D3DMULTISAMPLE_TYPE. //----------------------------------------------------------------------------- TCHAR* MultisampleTypeToString(D3DMULTISAMPLE_TYPE MultiSampleType) { switch (MultiSampleType) { case D3DMULTISAMPLE_NONE: return TEXT("D3DMULTISAMPLE_NONE"); case D3DMULTISAMPLE_NONMASKABLE: return TEXT("D3DMULTISAMPLE_NONMASKABLE"); case D3DMULTISAMPLE_2_SAMPLES: return TEXT("D3DMULTISAMPLE_2_SAMPLES"); case D3DMULTISAMPLE_3_SAMPLES: return TEXT("D3DMULTISAMPLE_3_SAMPLES"); case D3DMULTISAMPLE_4_SAMPLES: return TEXT("D3DMULTISAMPLE_4_SAMPLES"); case D3DMULTISAMPLE_5_SAMPLES: return TEXT("D3DMULTISAMPLE_5_SAMPLES"); case D3DMULTISAMPLE_6_SAMPLES: return TEXT("D3DMULTISAMPLE_6_SAMPLES"); case D3DMULTISAMPLE_7_SAMPLES: return TEXT("D3DMULTISAMPLE_7_SAMPLES"); case D3DMULTISAMPLE_8_SAMPLES: return TEXT("D3DMULTISAMPLE_8_SAMPLES"); case D3DMULTISAMPLE_9_SAMPLES: return TEXT("D3DMULTISAMPLE_9_SAMPLES"); case D3DMULTISAMPLE_10_SAMPLES: return TEXT("D3DMULTISAMPLE_10_SAMPLES"); case D3DMULTISAMPLE_11_SAMPLES: return TEXT("D3DMULTISAMPLE_11_SAMPLES"); case D3DMULTISAMPLE_12_SAMPLES: return TEXT("D3DMULTISAMPLE_12_SAMPLES"); case D3DMULTISAMPLE_13_SAMPLES: return TEXT("D3DMULTISAMPLE_13_SAMPLES"); case D3DMULTISAMPLE_14_SAMPLES: return TEXT("D3DMULTISAMPLE_14_SAMPLES"); case D3DMULTISAMPLE_15_SAMPLES: return TEXT("D3DMULTISAMPLE_15_SAMPLES"); case D3DMULTISAMPLE_16_SAMPLES: return TEXT("D3DMULTISAMPLE_16_SAMPLES"); default: return TEXT("Unknown Multisample Type"); } } //----------------------------------------------------------------------------- // Name: VertexProcessingTypeToString // Desc: Returns the string for the given VertexProcessingType. //----------------------------------------------------------------------------- TCHAR* VertexProcessingTypeToString(VertexProcessingType vpt) { switch (vpt) { case SOFTWARE_VP: return TEXT("SOFTWARE_VP"); case MIXED_VP: return TEXT("MIXED_VP"); case HARDWARE_VP: return TEXT("HARDWARE_VP"); case PURE_HARDWARE_VP: return TEXT("PURE_HARDWARE_VP"); default: return TEXT("Unknown VertexProcessingType"); } } //----------------------------------------------------------------------------- // Name: PresentIntervalToString // Desc: Returns the string for the given present interval. //----------------------------------------------------------------------------- TCHAR* PresentIntervalToString( UINT pi ) { switch( pi ) { case D3DPRESENT_INTERVAL_IMMEDIATE: return TEXT("D3DPRESENT_INTERVAL_IMMEDIATE"); case D3DPRESENT_INTERVAL_DEFAULT: return TEXT("D3DPRESENT_INTERVAL_DEFAULT"); case D3DPRESENT_INTERVAL_ONE: return TEXT("D3DPRESENT_INTERVAL_ONE"); case D3DPRESENT_INTERVAL_TWO: return TEXT("D3DPRESENT_INTERVAL_TWO"); case D3DPRESENT_INTERVAL_THREE: return TEXT("D3DPRESENT_INTERVAL_THREE"); case D3DPRESENT_INTERVAL_FOUR: return TEXT("D3DPRESENT_INTERVAL_FOUR"); default: return TEXT("Unknown PresentInterval"); } } //----------------------------------------------------------------------------- // Name: DialogProcHelper // Desc: //----------------------------------------------------------------------------- INT_PTR CALLBACK DialogProcHelper( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) { return s_pSettingsDialog->DialogProc( hDlg, msg, wParam, lParam ); } //----------------------------------------------------------------------------- // Name: CD3DSettingsDialog constructor // Desc: //----------------------------------------------------------------------------- CD3DSettingsDialog::CD3DSettingsDialog( CD3DEnumeration* pEnumeration, CD3DSettings* pSettings) { s_pSettingsDialog = this; m_pEnumeration = pEnumeration; m_d3dSettings = *pSettings; } //----------------------------------------------------------------------------- // Name: ComboBoxAdd // Desc: Adds an entry to the combo box. //----------------------------------------------------------------------------- void CD3DSettingsDialog::ComboBoxAdd( int id, void* pData, LPCTSTR pstrDesc ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); DWORD dwItem = ComboBox_AddString( hwndCtrl, pstrDesc ); ComboBox_SetItemData( hwndCtrl, dwItem, pData ); } //----------------------------------------------------------------------------- // Name: ComboBoxSelect // Desc: Selects an entry in the combo box. //----------------------------------------------------------------------------- void CD3DSettingsDialog::ComboBoxSelect( int id, void* pData ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); UINT count = ComboBoxCount( id ); for( UINT iItem = 0; iItem < count; iItem++ ) { if( (void*)ComboBox_GetItemData( hwndCtrl, iItem ) == pData ) { ComboBox_SetCurSel( hwndCtrl, iItem ); PostMessage( m_hDlg, WM_COMMAND, MAKEWPARAM( id, CBN_SELCHANGE ), (LPARAM)hwndCtrl ); return; } } } //----------------------------------------------------------------------------- // Name: ComboBoxSelectIndex // Desc: Selects an entry in the combo box. //----------------------------------------------------------------------------- void CD3DSettingsDialog::ComboBoxSelectIndex( int id, int index ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); ComboBox_SetCurSel( hwndCtrl, index ); PostMessage( m_hDlg, WM_COMMAND, MAKEWPARAM( id, CBN_SELCHANGE ), (LPARAM)hwndCtrl ); } //----------------------------------------------------------------------------- // Name: ComboBoxSelected // Desc: Returns the data for the selected entry in the combo box. //----------------------------------------------------------------------------- void* CD3DSettingsDialog::ComboBoxSelected( int id ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); int index = ComboBox_GetCurSel( hwndCtrl ); if( index < 0 ) return NULL; return (void*)ComboBox_GetItemData( hwndCtrl, index ); } //----------------------------------------------------------------------------- // Name: ComboBoxSomethingSelected // Desc: Returns whether any entry in the combo box is selected. This is // more useful than ComboBoxSelected() when you need to distinguish // between having no item selected vs. having an item selected whose // itemData is NULL. //----------------------------------------------------------------------------- bool CD3DSettingsDialog::ComboBoxSomethingSelected( int id ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); int index = ComboBox_GetCurSel( hwndCtrl ); return ( index >= 0 ); } //----------------------------------------------------------------------------- // Name: ComboBoxCount // Desc: Returns the number of entries in the combo box. //----------------------------------------------------------------------------- UINT CD3DSettingsDialog::ComboBoxCount( int id ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); return ComboBox_GetCount( hwndCtrl ); } //----------------------------------------------------------------------------- // Name: ComboBoxClear // Desc: Clears the entries in the combo box. //----------------------------------------------------------------------------- void CD3DSettingsDialog::ComboBoxClear( int id ) { HWND hwndCtrl = GetDlgItem( m_hDlg, id ); ComboBox_ResetContent( hwndCtrl ); } //----------------------------------------------------------------------------- // Name: ComboBoxContainsText // Desc: Returns whether the combo box contains the given text. //----------------------------------------------------------------------------- bool CD3DSettingsDialog::ComboBoxContainsText( int id, LPCTSTR pstrText ) { TCHAR strItem[200]; HWND hwndCtrl = GetDlgItem( m_hDlg, id ); UINT count = ComboBoxCount( id ); for( UINT iItem = 0; iItem < count; iItem++ ) { if( ComboBox_GetLBTextLen( hwndCtrl, iItem ) >= 200 ) continue; // shouldn't happen, but don't overwrite buffer if it does ComboBox_GetLBText( hwndCtrl, iItem, strItem ); if( lstrcmp( strItem, pstrText ) == 0 ) return true; } return false; } //----------------------------------------------------------------------------- // Name: ShowDialog // Desc: Show the D3D settings dialog. //----------------------------------------------------------------------------- INT_PTR CD3DSettingsDialog::ShowDialog( HWND hwndParent ) { return DialogBox( NULL, MAKEINTRESOURCE( IDD_SELECTDEVICE ), hwndParent, DialogProcHelper ); } //----------------------------------------------------------------------------- // Name: DialogProc // Desc: Handle window messages in the dialog. //----------------------------------------------------------------------------- INT_PTR CD3DSettingsDialog::DialogProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) { UNREFERENCED_PARAMETER( lParam ); switch( msg ) { case WM_INITDIALOG: { m_hDlg = hDlg; // Fill adapter combo box. Updating the selected adapter will trigger // updates of the rest of the dialog. for( UINT iai = 0; iai < m_pEnumeration->m_pAdapterInfoList->Count(); iai++ ) { D3DAdapterInfo* pAdapterInfo; pAdapterInfo = (D3DAdapterInfo*)m_pEnumeration->m_pAdapterInfoList->GetPtr(iai); TCHAR strDescription[512]; DXUtil_ConvertAnsiStringToGenericCch( strDescription, pAdapterInfo->AdapterIdentifier.Description, 512 ); ComboBoxAdd( IDC_ADAPTER_COMBO, pAdapterInfo, strDescription ); if( pAdapterInfo->AdapterOrdinal == m_d3dSettings.AdapterOrdinal() ) ComboBoxSelect( IDC_ADAPTER_COMBO, pAdapterInfo ); } if( !ComboBoxSomethingSelected( IDC_ADAPTER_COMBO ) && ComboBoxCount( IDC_ADAPTER_COMBO ) > 0 ) { ComboBoxSelectIndex( IDC_ADAPTER_COMBO, 0 ); } } return TRUE; case WM_COMMAND: switch( LOWORD(wParam) ) { case IDOK: EndDialog( hDlg, IDOK ); break; case IDCANCEL: EndDialog( hDlg, IDCANCEL ); break; case IDC_ADAPTER_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) AdapterChanged(); break; case IDC_DEVICE_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) DeviceChanged(); break; case IDC_ADAPTERFORMAT_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) AdapterFormatChanged(); break; case IDC_RESOLUTION_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) ResolutionChanged(); break; case IDC_REFRESHRATE_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) RefreshRateChanged(); break; case IDC_BACKBUFFERFORMAT_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) BackBufferFormatChanged(); break; case IDC_DEPTHSTENCILBUFFERFORMAT_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) DepthStencilBufferFormatChanged(); break; case IDC_MULTISAMPLE_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) MultisampleTypeChanged(); break; case IDC_MULTISAMPLE_QUALITY_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) MultisampleQualityChanged(); break; case IDC_VERTEXPROCESSING_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) VertexProcessingChanged(); break; case IDC_PRESENTINTERVAL_COMBO: if( CBN_SELCHANGE == HIWORD(wParam) ) PresentIntervalChanged(); break; case IDC_DEVICECLIP_CHECK: if( BN_CLICKED == HIWORD(wParam) ) DeviceClipChanged(); break; case IDC_WINDOW: case IDC_FULLSCREEN: WindowedFullscreenChanged(); break; } return TRUE; default: return FALSE; } } //----------------------------------------------------------------------------- // Name: AdapterChanged // Desc: Respond to a change of selected adapter. //----------------------------------------------------------------------------- void CD3DSettingsDialog::AdapterChanged( void ) { D3DAdapterInfo* pAdapterInfo = (D3DAdapterInfo*)ComboBoxSelected( IDC_ADAPTER_COMBO ); if( pAdapterInfo == NULL ) return; if( m_d3dSettings.IsWindowed ) { m_d3dSettings.pWindowed_AdapterInfo = pAdapterInfo; // Set the windowed display mode format to what the // adapter is currently in. IDirect3D9* pD3D = m_pEnumeration->GetD3D(); if( pD3D ) { D3DDISPLAYMODE Mode; if( SUCCEEDED( pD3D->GetAdapterDisplayMode( pAdapterInfo->AdapterOrdinal, &Mode ) ) ) m_d3dSettings.Windowed_DisplayMode.Format = Mode.Format; SAFE_RELEASE( pD3D ); } } else m_d3dSettings.pFullscreen_AdapterInfo = pAdapterInfo; // Update device combo box ComboBoxClear( IDC_DEVICE_COMBO ); for( UINT idi = 0; idi < pAdapterInfo->pDeviceInfoList->Count(); idi++ ) { D3DDeviceInfo* pDeviceInfo = (D3DDeviceInfo*)pAdapterInfo->pDeviceInfoList->GetPtr(idi); ComboBoxAdd( IDC_DEVICE_COMBO, pDeviceInfo, D3DDevTypeToString( pDeviceInfo->DevType ) ); if( pDeviceInfo->DevType == m_d3dSettings.DevType() ) ComboBoxSelect( IDC_DEVICE_COMBO, pDeviceInfo ); } if( !ComboBoxSomethingSelected( IDC_DEVICE_COMBO ) && ComboBoxCount( IDC_DEVICE_COMBO ) > 0 ) { ComboBoxSelectIndex( IDC_DEVICE_COMBO, 0 ); } } //----------------------------------------------------------------------------- // Name: DeviceChanged // Desc: Respond to a change of selected device by resetting the // fullscreen/windowed radio buttons. Updating these buttons will // trigger updates of the rest of the dialog. //----------------------------------------------------------------------------- void CD3DSettingsDialog::DeviceChanged( void ) { D3DDeviceInfo* pDeviceInfo = (D3DDeviceInfo*)ComboBoxSelected( IDC_DEVICE_COMBO ); if( pDeviceInfo == NULL ) return; if( m_d3dSettings.IsWindowed ) m_d3dSettings.pWindowed_DeviceInfo = pDeviceInfo; else m_d3dSettings.pFullscreen_DeviceInfo = pDeviceInfo; // Update fullscreen/windowed radio buttons bool HasWindowedDeviceCombo = false; bool HasFullscreenDeviceCombo = false; for( UINT idc = 0; idc < pDeviceInfo->pDeviceComboList->Count(); idc++ ) { D3DDeviceCombo* pDeviceCombo = (D3DDeviceCombo*)pDeviceInfo->pDeviceComboList->GetPtr(idc); if( pDeviceCombo->IsWindowed ) HasWindowedDeviceCombo = true; else HasFullscreenDeviceCombo = true; } EnableWindow( GetDlgItem( m_hDlg, IDC_WINDOW ), HasWindowedDeviceCombo ); EnableWindow( GetDlgItem( m_hDlg, IDC_FULLSCREEN ), HasFullscreenDeviceCombo ); if (m_d3dSettings.IsWindowed && HasWindowedDeviceCombo) { CheckRadioButton( m_hDlg, IDC_WINDOW, IDC_FULLSCREEN, IDC_WINDOW ); } else { CheckRadioButton( m_hDlg, IDC_WINDOW, IDC_FULLSCREEN, IDC_FULLSCREEN ); } WindowedFullscreenChanged(); } //----------------------------------------------------------------------------- // Name: WindowedFullscreenChanged // Desc: Respond to a change of windowed/fullscreen state by rebuilding the // adapter format list, resolution list, and refresh rate list. // Updating the selected adapter format will trigger updates of the // rest of the dialog. //----------------------------------------------------------------------------- void CD3DSettingsDialog::WindowedFullscreenChanged( void ) { D3DAdapterInfo* pAdapterInfo = (D3DAdapterInfo*)ComboBoxSelected( IDC_ADAPTER_COMBO ); D3DDeviceInfo* pDeviceInfo = (D3DDeviceInfo*)ComboBoxSelected( IDC_DEVICE_COMBO ); if( pAdapterInfo == NULL || pDeviceInfo == NULL ) return; if( IsDlgButtonChecked( m_hDlg, IDC_WINDOW ) ) { m_d3dSettings.IsWindowed = true; m_d3dSettings.pWindowed_AdapterInfo = pAdapterInfo; m_d3dSettings.pWindowed_DeviceInfo = pDeviceInfo; // Update device clip check box EnableWindow( GetDlgItem( m_hDlg, IDC_DEVICECLIP_CHECK ), true ); if( m_d3dSettings.DeviceClip() ) SendMessage( GetDlgItem( m_hDlg, IDC_DEVICECLIP_CHECK ), BM_SETCHECK, BST_CHECKED, 0 ); else SendMessage( GetDlgItem( m_hDlg, IDC_DEVICECLIP_CHECK ), BM_SETCHECK, BST_UNCHECKED, 0 ); // Update adapter format combo box ComboBoxClear( IDC_ADAPTERFORMAT_COMBO ); ComboBoxAdd( IDC_ADAPTERFORMAT_COMBO, (void*)m_d3dSettings.Windowed_DisplayMode.Format, D3DUtil_D3DFormatToString( m_d3dSettings.Windowed_DisplayMode.Format ) ); ComboBoxSelectIndex( IDC_ADAPTERFORMAT_COMBO, 0 ); EnableWindow( GetDlgItem( m_hDlg, IDC_ADAPTERFORMAT_COMBO ), false ); // Update resolution combo box DWORD dwResolutionData; TCHAR strResolution[50]; dwResolutionData = MAKELONG( m_d3dSettings.Windowed_DisplayMode.Width, m_d3dSettings.Windowed_DisplayMode.Height ); _sntprintf( strResolution, 50, TEXT("%d by %d"), m_d3dSettings.Windowed_DisplayMode.Width, m_d3dSettings.Windowed_DisplayMode.Height ); strResolution[49] = 0; ComboBoxClear( IDC_RESOLUTION_COMBO ); ComboBoxAdd( IDC_RESOLUTION_COMBO, ULongToPtr(dwResolutionData), strResolution ); ComboBoxSelectIndex( IDC_RESOLUTION_COMBO, 0 ); EnableWindow( GetDlgItem( m_hDlg, IDC_RESOLUTION_COMBO ), false ); // Update refresh rate combo box TCHAR strRefreshRate[50]; if( m_d3dSettings.Windowed_DisplayMode.RefreshRate == 0 ) lstrcpy( strRefreshRate, TEXT("Default Rate") ); else _sntprintf( strRefreshRate, 50, TEXT("%d Hz"), m_d3dSettings.Windowed_DisplayMode.RefreshRate ); strRefreshRate[49] = 0; ComboBoxClear( IDC_REFRESHRATE_COMBO ); ComboBoxAdd( IDC_REFRESHRATE_COMBO, ULongToPtr(m_d3dSettings.Windowed_DisplayMode.RefreshRate), strRefreshRate ); ComboBoxSelectIndex( IDC_REFRESHRATE_COMBO, 0 ); EnableWindow( GetDlgItem( m_hDlg, IDC_REFRESHRATE_COMBO ), false ); } else { m_d3dSettings.IsWindowed = false; m_d3dSettings.pFullscreen_AdapterInfo = pAdapterInfo; m_d3dSettings.pFullscreen_DeviceInfo = pDeviceInfo; // Update device clip check box EnableWindow( GetDlgItem( m_hDlg, IDC_DEVICECLIP_CHECK ), false ); // Update adapter format combo box ComboBoxClear( IDC_ADAPTERFORMAT_COMBO ); for( UINT idc = 0; idc < pDeviceInfo->pDeviceComboList->Count(); idc++ ) { D3DDeviceCombo* pDeviceCombo = (D3DDeviceCombo*)pDeviceInfo->pDeviceComboList->GetPtr(idc); if( pDeviceCombo->IsWindowed ) continue; D3DFORMAT adapterFormat = pDeviceCombo->AdapterFormat; if( !ComboBoxContainsText( IDC_ADAPTERFORMAT_COMBO, D3DUtil_D3DFormatToString( adapterFormat ) ) ) { ComboBoxAdd( IDC_ADAPTERFORMAT_COMBO, (void*)adapterFormat, D3DUtil_D3DFormatToString( adapterFormat ) ); if( adapterFormat == m_d3dSettings.Fullscreen_DisplayMode.Format ) { ComboBoxSelect( IDC_ADAPTERFORMAT_COMBO, (void*)adapterFormat ); } } } if( !ComboBoxSomethingSelected( IDC_ADAPTERFORMAT_COMBO ) && ComboBoxCount( IDC_ADAPTERFORMAT_COMBO ) > 0 ) { ComboBoxSelectIndex( IDC_ADAPTERFORMAT_COMBO, 0 ); } EnableWindow( GetDlgItem( m_hDlg, IDC_ADAPTERFORMAT_COMBO), true ); // Update resolution combo box EnableWindow( GetDlgItem( m_hDlg, IDC_RESOLUTION_COMBO), true ); // Update refresh rate combo box EnableWindow( GetDlgItem( m_hDlg, IDC_REFRESHRATE_COMBO), true ); } } //----------------------------------------------------------------------------- // Name: AdapterFormatChanged // Desc: Respond to a change of selected adapter format by rebuilding the // resolution list and back buffer format list. Updating the selected // resolution and back buffer format will trigger updates of the rest // of the dialog. //----------------------------------------------------------------------------- void CD3DSettingsDialog::AdapterFormatChanged( void ) { if( !IsDlgButtonChecked( m_hDlg, IDC_WINDOW ) ) { D3DAdapterInfo* pAdapterInfo = (D3DAdapterInfo*)ComboBoxSelected( IDC_ADAPTER_COMBO ); D3DFORMAT adapterFormat = (D3DFORMAT)PtrToUlong( ComboBoxSelected( IDC_ADAPTERFORMAT_COMBO ) ); m_d3dSettings.Fullscreen_DisplayMode.Format = adapterFormat; ComboBoxClear( IDC_RESOLUTION_COMBO ); for( UINT idm = 0; idm < pAdapterInfo->pDisplayModeList->Count(); idm++ ) { D3DDISPLAYMODE displayMode = *(D3DDISPLAYMODE*)pAdapterInfo->pDisplayModeList->GetPtr(idm); if (displayMode.Format == adapterFormat) { DWORD dwResolutionData; TCHAR strResolution[50]; dwResolutionData = MAKELONG( displayMode.Width, displayMode.Height ); _sntprintf( strResolution, 50, TEXT("%d by %d"), displayMode.Width, displayMode.Height ); strResolution[49] = 0; if (!ComboBoxContainsText( IDC_RESOLUTION_COMBO, strResolution ) ) { ComboBoxAdd( IDC_RESOLUTION_COMBO, ULongToPtr( dwResolutionData ), strResolution ); if (m_d3dSettings.Fullscreen_DisplayMode.Width == displayMode.Width && m_d3dSettings.Fullscreen_DisplayMode.Height == displayMode.Height) { ComboBoxSelect( IDC_RESOLUTION_COMBO, ULongToPtr( dwResolutionData ) ); } } } } if (!ComboBoxSomethingSelected( IDC_RESOLUTION_COMBO ) && ComboBoxCount( IDC_RESOLUTION_COMBO ) > 0) { ComboBoxSelectIndex( IDC_RESOLUTION_COMBO, 0 ); } } // Update backbuffer format combo box D3DDeviceInfo* pDeviceInfo = (D3DDeviceInfo*)ComboBoxSelected( IDC_DEVICE_COMBO ); if( pDeviceInfo == NULL ) return; bool bHasWindowedBackbuffer = false; ComboBoxClear( IDC_BACKBUFFERFORMAT_COMBO ); for( UINT idc = 0; idc < pDeviceInfo->pDeviceComboList->Count(); idc++ ) { D3DDeviceCombo* pDeviceCombo = (D3DDeviceCombo*)pDeviceInfo->pDeviceComboList->GetPtr(idc); if (pDeviceCombo->IsWindowed == m_d3dSettings.IsWindowed && pDeviceCombo->AdapterFormat == m_d3dSettings.DisplayMode().Format) { if (!ComboBoxContainsText( IDC_BACKBUFFERFORMAT_COMBO, D3DUtil_D3DFormatToString( pDeviceCombo->BackBufferFormat ) ) ) { ComboBoxAdd( IDC_BACKBUFFERFORMAT_COMBO, (void*)pDeviceCombo->BackBufferFormat, D3DUtil_D3DFormatToString( pDeviceCombo->BackBufferFormat ) ); if (pDeviceCombo->BackBufferFormat == m_d3dSettings.BackBufferFormat() ) ComboBoxSelect( IDC_BACKBUFFERFORMAT_COMBO, (void*)pDeviceCombo->BackBufferFormat ); } } // Count the number of backbuffer format supported for windowed mode if( true == pDeviceCombo->IsWindowed && pDeviceCombo->AdapterFormat == m_d3dSettings.Windowed_DisplayMode.Format ) { bHasWindowedBackbuffer = true; } } // If no backbuffer format is allowed and this is windowed, then the adapter // cannot handle 3D in the format the desktop is currently in. Force // fullscreen in this case. if( !bHasWindowedBackbuffer ) { EnableWindow( GetDlgItem( m_hDlg, IDC_WINDOW ), FALSE ); if( m_d3dSettings.IsWindowed ) { CheckRadioButton( m_hDlg, IDC_WINDOW, IDC_FULLSCREEN, IDC_FULLSCREEN ); WindowedFullscreenChanged(); } } if (!ComboBoxSomethingSelected( IDC_BACKBUFFERFORMAT_COMBO ) && ComboBoxCount( IDC_BACKBUFFERFORMAT_COMBO ) > 0) { ComboBoxSelectIndex( IDC_BACKBUFFERFORMAT_COMBO, 0 ); } } //----------------------------------------------------------------------------- // Name: ResolutionChanged // Desc: Respond to a change of selected resolution by rebuilding the // refresh rate list. //----------------------------------------------------------------------------- void CD3DSettingsDialog::ResolutionChanged( void ) { if (m_d3dSettings.IsWindowed) return; D3DAdapterInfo* pAdapterInfo = (D3DAdapterInfo*)ComboBoxSelected( IDC_ADAPTER_COMBO ); if( pAdapterInfo == NULL ) return; // Update settingsNew with new resolution DWORD dwResolutionData = PtrToUlong( ComboBoxSelected( IDC_RESOLUTION_COMBO ) ); UINT width = LOWORD( dwResolutionData ); UINT height = HIWORD( dwResolutionData ); m_d3dSettings.Fullscreen_DisplayMode.Width = width; m_d3dSettings.Fullscreen_DisplayMode.Height = height; // Update refresh rate list based on new resolution D3DFORMAT adapterFormat = (D3DFORMAT)PtrToUlong( ComboBoxSelected( IDC_ADAPTERFORMAT_COMBO ) ); ComboBoxClear( IDC_REFRESHRATE_COMBO ); for( UINT idm = 0; idm < pAdapterInfo->pDisplayModeList->Count(); idm++ ) { D3DDISPLAYMODE displayMode = *(D3DDISPLAYMODE*)pAdapterInfo->pDisplayModeList->GetPtr(idm); if (displayMode.Format == adapterFormat && displayMode.Width == width && displayMode.Height == height) { TCHAR strRefreshRate[50]; if( displayMode.RefreshRate == 0 ) lstrcpy( strRefreshRate, TEXT("Default Rate") ); else _sntprintf( strRefreshRate, 50, TEXT("%d Hz"), displayMode.RefreshRate ); strRefreshRate[49] = 0; if( !ComboBoxContainsText( IDC_REFRESHRATE_COMBO, strRefreshRate ) ) { ComboBoxAdd( IDC_REFRESHRATE_COMBO, UlongToPtr( displayMode.RefreshRate ), strRefreshRate ); if (m_d3dSettings.Fullscreen_DisplayMode.RefreshRate == displayMode.RefreshRate) ComboBoxSelect( IDC_REFRESHRATE_COMBO, UlongToPtr( displayMode.RefreshRate ) ); } } } if (!ComboBoxSomethingSelected( IDC_REFRESHRATE_COMBO ) && ComboBoxCount( IDC_REFRESHRATE_COMBO ) > 0) { ComboBoxSelectIndex( IDC_REFRESHRATE_COMBO, 0 ); } } //----------------------------------------------------------------------------- // Name: RefreshRateChanged // Desc: Respond to a change of selected refresh rate. //----------------------------------------------------------------------------- void CD3DSettingsDialog::RefreshRateChanged( void ) { if( m_d3dSettings.IsWindowed ) return; // Update settingsNew with new refresh rate UINT refreshRate = PtrToUlong( ComboBoxSelected( IDC_REFRESHRATE_COMBO ) ); m_d3dSettings.Fullscreen_DisplayMode.RefreshRate = refreshRate; } //----------------------------------------------------------------------------- // Name: BackBufferFormatChanged // Desc: Respond to a change of selected back buffer format by rebuilding // the depth/stencil format list, multisample type list, and vertex // processing type list. //----------------------------------------------------------------------------- void CD3DSettingsDialog::BackBufferFormatChanged( void ) { D3DDeviceInfo* pDeviceInfo = (D3DDeviceInfo*)ComboBoxSelected( IDC_DEVICE_COMBO ); D3DFORMAT adapterFormat = (D3DFORMAT)PtrToUlong( ComboBoxSelected( IDC_ADAPTERFORMAT_COMBO ) ); D3DFORMAT backBufferFormat = (D3DFORMAT)PtrToUlong( ComboBoxSelected( IDC_BACKBUFFERFORMAT_COMBO ) ); if( pDeviceInfo == NULL ) return; for( UINT idc = 0; idc < pDeviceInfo->pDeviceComboList->Count(); idc++ ) { D3DDeviceCombo* pDeviceCombo = (D3DDeviceCombo*)pDeviceInfo->pDeviceComboList->GetPtr(idc); if (pDeviceCombo->IsWindowed == m_d3dSettings.IsWindowed && pDeviceCombo->AdapterFormat == adapterFormat && pDeviceCombo->BackBufferFormat == backBufferFormat) { if( m_d3dSettings.IsWindowed ) m_d3dSettings.pWindowed_DeviceCombo = pDeviceCombo; else m_d3dSettings.pFullscreen_DeviceCombo = pDeviceCombo; ComboBoxClear( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO ); if( m_pEnumeration->AppUsesDepthBuffer ) { for( UINT ifmt = 0; ifmt < pDeviceCombo->pDepthStencilFormatList->Count(); ifmt++ ) { D3DFORMAT fmt = *(D3DFORMAT*)pDeviceCombo->pDepthStencilFormatList->GetPtr(ifmt); ComboBoxAdd( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO, (void*)fmt, D3DUtil_D3DFormatToString(fmt) ); if( fmt == m_d3dSettings.DepthStencilBufferFormat() ) ComboBoxSelect( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO, (void*)fmt ); } if (!ComboBoxSomethingSelected( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO ) && ComboBoxCount( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO ) > 0) { ComboBoxSelectIndex( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO, 0 ); } } else { EnableWindow( GetDlgItem( m_hDlg, IDC_DEPTHSTENCILBUFFERFORMAT_COMBO ), false ); ComboBoxAdd( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO, NULL, TEXT("(not used)") ); ComboBoxSelectIndex( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO, 0 ); } ComboBoxClear( IDC_VERTEXPROCESSING_COMBO ); for( UINT ivpt = 0; ivpt < pDeviceCombo->pVertexProcessingTypeList->Count(); ivpt++ ) { VertexProcessingType vpt = *(VertexProcessingType*)pDeviceCombo->pVertexProcessingTypeList->GetPtr(ivpt); ComboBoxAdd( IDC_VERTEXPROCESSING_COMBO, (void*)vpt, VertexProcessingTypeToString(vpt) ); if( vpt == m_d3dSettings.GetVertexProcessingType() ) ComboBoxSelect( IDC_VERTEXPROCESSING_COMBO, (void*)vpt ); } if (!ComboBoxSomethingSelected( IDC_VERTEXPROCESSING_COMBO ) && ComboBoxCount( IDC_VERTEXPROCESSING_COMBO ) > 0) { ComboBoxSelectIndex( IDC_VERTEXPROCESSING_COMBO, 0 ); } ComboBoxClear( IDC_PRESENTINTERVAL_COMBO ); for( UINT ipi = 0; ipi < pDeviceCombo->pPresentIntervalList->Count(); ipi++ ) { UINT pi = *(UINT*)pDeviceCombo->pPresentIntervalList->GetPtr(ipi); ComboBoxAdd( IDC_PRESENTINTERVAL_COMBO, UlongToPtr( pi ), PresentIntervalToString(pi) ); if( pi == m_d3dSettings.PresentInterval() ) ComboBoxSelect( IDC_PRESENTINTERVAL_COMBO, UlongToPtr( pi ) ); } if (!ComboBoxSomethingSelected( IDC_PRESENTINTERVAL_COMBO ) && ComboBoxCount( IDC_PRESENTINTERVAL_COMBO ) > 0) { ComboBoxSelectIndex( IDC_PRESENTINTERVAL_COMBO, 0 ); } break; } } } //----------------------------------------------------------------------------- // Name: DepthStencilBufferFormatChanged // Desc: Respond to a change of selected depth/stencil buffer format. //----------------------------------------------------------------------------- void CD3DSettingsDialog::DepthStencilBufferFormatChanged( void ) { D3DFORMAT fmt = (D3DFORMAT)PtrToUlong( ComboBoxSelected( IDC_DEPTHSTENCILBUFFERFORMAT_COMBO ) ); if( m_pEnumeration->AppUsesDepthBuffer ) m_d3dSettings.SetDepthStencilBufferFormat( fmt ); // Build multisample list D3DDeviceCombo* pDeviceCombo = m_d3dSettings.PDeviceCombo(); ComboBoxClear( IDC_MULTISAMPLE_COMBO ); for( UINT ims = 0; ims < pDeviceCombo->pMultiSampleTypeList->Count(); ims++ ) { D3DMULTISAMPLE_TYPE msType = *(D3DMULTISAMPLE_TYPE*)pDeviceCombo->pMultiSampleTypeList->GetPtr(ims); // check for DS/MS conflicts BOOL bConflictFound = FALSE; for( UINT iConf = 0; iConf < pDeviceCombo->pDSMSConflictList->Count(); iConf++ ) { D3DDSMSConflict* pDSMSConf = (D3DDSMSConflict*)pDeviceCombo->pDSMSConflictList->GetPtr(iConf); if( pDSMSConf->DSFormat == fmt && pDSMSConf->MSType == msType ) { bConflictFound = TRUE; break; } } if( !bConflictFound ) { ComboBoxAdd( IDC_MULTISAMPLE_COMBO, (void*)msType, MultisampleTypeToString(msType) ); if( msType == m_d3dSettings.MultisampleType() ) ComboBoxSelect( IDC_MULTISAMPLE_COMBO, (void*)msType ); } } if (!ComboBoxSomethingSelected( IDC_MULTISAMPLE_COMBO ) && ComboBoxCount( IDC_MULTISAMPLE_COMBO ) > 0) { ComboBoxSelectIndex( IDC_MULTISAMPLE_COMBO, 0 ); } } //----------------------------------------------------------------------------- // Name: MultisampleTypeChanged // Desc: Respond to a change of selected multisample type. //----------------------------------------------------------------------------- void CD3DSettingsDialog::MultisampleTypeChanged( void ) { D3DMULTISAMPLE_TYPE mst = (D3DMULTISAMPLE_TYPE)PtrToUlong( ComboBoxSelected( IDC_MULTISAMPLE_COMBO ) ); m_d3dSettings.SetMultisampleType( mst ); // Set up max quality for this mst D3DDeviceCombo* pDeviceCombo = m_d3dSettings.PDeviceCombo(); DWORD maxQuality = 0; for( UINT ims = 0; ims < pDeviceCombo->pMultiSampleTypeList->Count(); ims++ ) { D3DMULTISAMPLE_TYPE msType = *(D3DMULTISAMPLE_TYPE*)pDeviceCombo->pMultiSampleTypeList->GetPtr(ims); if( msType == mst ) { maxQuality = *(DWORD*)pDeviceCombo->pMultiSampleQualityList->GetPtr(ims); break; } } ComboBoxClear( IDC_MULTISAMPLE_QUALITY_COMBO ); for( UINT msq = 0; msq < maxQuality; msq++ ) { TCHAR str[100]; wsprintf( str, TEXT("%d"), msq ); ComboBoxAdd( IDC_MULTISAMPLE_QUALITY_COMBO, UlongToPtr( msq ), str ); if( msq == m_d3dSettings.MultisampleQuality() ) ComboBoxSelect( IDC_MULTISAMPLE_QUALITY_COMBO, UlongToPtr( msq ) ); } if (!ComboBoxSomethingSelected( IDC_MULTISAMPLE_QUALITY_COMBO ) && ComboBoxCount( IDC_MULTISAMPLE_QUALITY_COMBO ) > 0) { ComboBoxSelectIndex( IDC_MULTISAMPLE_QUALITY_COMBO, 0 ); } } //----------------------------------------------------------------------------- // Name: MultisampleQualityChanged // Desc: Respond to a change of selected multisample quality. //----------------------------------------------------------------------------- void CD3DSettingsDialog::MultisampleQualityChanged( void ) { DWORD msq = (DWORD)PtrToUlong( ComboBoxSelected( IDC_MULTISAMPLE_QUALITY_COMBO ) ); m_d3dSettings.SetMultisampleQuality( msq ); } //----------------------------------------------------------------------------- // Name: VertexProcessingChanged // Desc: Respond to a change of selected vertex processing type. //----------------------------------------------------------------------------- void CD3DSettingsDialog::VertexProcessingChanged( void ) { VertexProcessingType vpt = (VertexProcessingType)PtrToUlong( ComboBoxSelected( IDC_VERTEXPROCESSING_COMBO ) ); m_d3dSettings.SetVertexProcessingType( vpt ); } //----------------------------------------------------------------------------- // Name: PresentIntervalChanged // Desc: Respond to a change of selected present interval. //----------------------------------------------------------------------------- void CD3DSettingsDialog::PresentIntervalChanged( void ) { UINT pi = PtrToUlong( ComboBoxSelected( IDC_PRESENTINTERVAL_COMBO ) ); m_d3dSettings.SetPresentInterval( pi ); } //----------------------------------------------------------------------------- // Name: DeviceClipChanged // Desc: Respond to a change of selected present interval. //----------------------------------------------------------------------------- void CD3DSettingsDialog::DeviceClipChanged( void ) { HWND hWndCheckBox = GetDlgItem( m_hDlg, IDC_DEVICECLIP_CHECK ); if( hWndCheckBox ) { bool bChecked = SendMessage( hWndCheckBox, BM_GETCHECK, 0, 0 ) == BST_CHECKED; m_d3dSettings.SetDeviceClip( bChecked ); } }
[ "alec.nunn@gmail.com" ]
alec.nunn@gmail.com
bd896e75c72c70eaa83cf4c3d237605984f6f97e
c3404e201bd8d5db6156be7f49ace66d43b626a6
/HGU_PS/P2_backup.cpp
fb2da90b5675e7859761d54611e8f413848d7885
[]
no_license
Heeseok-Jeong/Cpp_Problem_Solving
7daf1968cd027b39a7937788be69aab2295d714e
853fd03d8290cecf59cd16c4623ef12285f08730
refs/heads/master
2023-02-03T02:52:42.902004
2020-12-23T07:30:55
2020-12-23T07:30:55
292,009,385
0
0
null
null
null
null
UTF-8
C++
false
false
1,028
cpp
#include <iostream> #include <map> using namespace std; long long max(long long a, long long b) { if(a > b) return a; else return b; } int main() { int n, k, i, g = 0; long long x, result, temp = 0; map<long long, int> m; map<long long, int>::iterator it1, it2; scanf("%d %d", &n, &k); for(i = 0; i < n; i++) { scanf("%d %lld", &g, &x); m[x] = g; } // for (it1 = m.begin(); it1 != m.end(); it1++) // cout << "key : " << it1->first << " value : " << it1->second << endl; i = 0; for(it1 = m.begin(); it1 != m.end(); it1++) { // cout << "a : " << result << ", b : " << temp << endl; result = max(result, temp); if(i == n-1) { result = max(result, it1->second); } else { temp = 0; for(it2 = it1; it2 != m.end(); it2++) { if(it2->first <= it1->first+2*k) { temp += it2->second; } else { break; } } } i++; // cout << "temp : " << temp << endl; } printf("%lld\n", result); return 0; }
[ "dldydldy@naver.com" ]
dldydldy@naver.com
65b0404065398e13d73d22f038758e104728aee0
bb0c2f6e725f13a33a6d2eefd0c388e8d82b1dfb
/Concepts/memory_management/Smart_Pointers/pointer_conversions.cpp
5cb8943c6a53548a4595b218a83455855547e8be
[]
no_license
srijithumakanth/Cpp_ND
51108f2e40e08055b5ef9dc4078001a14f628bae
01e200c7e05c7e29b7beac3443afcf60954695ef
refs/heads/master
2020-08-15T21:34:45.804973
2020-07-16T03:32:38
2020-07-16T03:32:38
215,411,231
0
0
null
null
null
null
UTF-8
C++
false
false
738
cpp
#include <iostream> #include <memory> int main() { // construct a unique pointer std::unique_ptr<int> uniquePtr(new int); // (1) shared pointer from unique pointer std::shared_ptr<int> sharedPtr1 = std::move(uniquePtr); // (2) shared pointer from weak pointer std::weak_ptr<int> weakPtr(sharedPtr1); std::shared_ptr<int> sharedPtr2 = weakPtr.lock(); // (3) raw pointer from shared (or unique) pointer int *rawPtr = sharedPtr2.get(); /* This will create a run-time error as delete is trying to free a memory on the heap that is managed by shared_pointer and is already been deallocated as soon as the shared pointer goes out of scope.*/ delete rawPtr; return 0; }
[ "sumakanthil@innovative-logistics.com" ]
sumakanthil@innovative-logistics.com
d275b17f3cdea8a50ef8ac8cb0af9cf99c69acbb
1b623fb9ac9cdce59add38ffe412596c6f935089
/PixelCalibrations/src/common/PixelFEDBaselineCalibration.cc
70e15a89c1a6ae04e2ba44d9c3470d152d630108
[]
no_license
odysei/POSOverlay
d7748a099a215dadd5e57df98c52818d8c06fdd7
d5fb3d953626bf6cc61dcae43f37a74e4758f841
refs/heads/master
2021-01-22T06:23:30.968259
2015-10-29T19:37:28
2015-10-29T19:37:28
38,055,720
0
1
null
2015-11-09T20:44:00
2015-06-25T14:54:09
C++
UTF-8
C++
false
false
26,433
cc
// $Id: PixelFEDBaselineCalibration.cc,v 1.48 2012/10/01 22:07:36 mdunser Exp $: PixelBaselineCalibration.cc,v 1.1 // Modify to accomadte bpix channes with very low TBM UB. d.k. 23/02/15 #include "PixelCalibrations/include/PixelFEDBaselineCalibration.h" #include "PixelUtilities/PixelFEDDataTools/include/Moments.h" #include "PixelUtilities/PixelFEDDataTools/include/PixelFEDDataTypes.h" #include "PixelUtilities/PixelFEDDataTools/include/PixelDecodedFEDRawData.h" #include "CalibFormats/SiPixelObjects/interface/PixelCalibConfiguration.h" #include "PixelUtilities/PixelRootUtilities/include/PixelRootDirectoryMaker.h" #include <toolbox/convertstring.h> #include "iomanip" #include "TFile.h" #include "TDirectory.h" #include "TH2F.h" #include "TCanvas.h" #include "TLine.h" #include "TStyle.h" #include "TColor.h" using namespace pos; const unsigned int numberOfFEDs=40; const unsigned int channelsPerFED=36; const unsigned int opticalReceiversPerFED=3; const unsigned int blackTolerance=15; PixelFEDBaselineCalibration::PixelFEDBaselineCalibration(const PixelFEDSupervisorConfiguration & tempConfiguration, SOAPCommander* mySOAPCmdr) : PixelFEDCalibrationBase(tempConfiguration,*mySOAPCmdr) { std::cout << "Greetings from the PixelFEDBaselineCalibration copy constructor." << std::endl; } xoap::MessageReference PixelFEDBaselineCalibration::execute(xoap::MessageReference msg) { const bool debug = false; std::vector <bool> B_OpticalReceiver_Used(numberOfFEDs*opticalReceiversPerFED,false); std::vector <Moments> B_Channel(numberOfFEDs*channelsPerFED), UB_Channel(numberOfFEDs*channelsPerFED); std::vector <double> B_Min(numberOfFEDs*opticalReceiversPerFED,1024.0), B_Max(numberOfFEDs*opticalReceiversPerFED,0.0); std::vector <unsigned int> ChannelOffsetDAC(numberOfFEDs*channelsPerFED); std::vector <unsigned int> InputOffsetDAC(numberOfFEDs*opticalReceiversPerFED); std::vector <unsigned int> targetBlack (40, 512); std::vector <bool> twoVpp (40, false); std::string replyString="FEDBaselineCalibrationWithPixelsDone"; ++iteration_; std::cout<<"iteration "<<iteration_<<std::endl; int channelOffsetSlope=2; double const opticalReceiverSlope1Vpp = 200.0; double opticalReceiverSlope=0.0; for (unsigned int ifed=0; ifed<fedsAndChannels_.size(); ++ifed) { unsigned int fednumber=fedsAndChannels_[ifed].first; unsigned long vmeBaseAddress=theFEDConfiguration_->VMEBaseAddressFromFEDNumber(fednumber); targetBlack[fednumber]= (FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nbaseln & 0xfff); // taking baseline of channel 1 for the whole FED now //if(debug) cout<<" 1 "<<ifed<<endl; assert((FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nbaseln & 0xfff)== (FEDInterface_[vmeBaseAddress]->getPixelFEDCard().NCbaseln & 0xfff)); assert((FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nbaseln & 0xfff)== (FEDInterface_[vmeBaseAddress]->getPixelFEDCard().SCbaseln & 0xfff)); assert((FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nbaseln & 0xfff)== (FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Sbaseln & 0xfff)); //if(debug) cout<<" 2 "<<ifed<<endl; twoVpp[fednumber]= (FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nadcg & 0x1); // taking peak-to-peak of channel 1 for the whole FED now //if(debug) cout<<" 3 "<<ifed<<endl; assert((FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nadcg==0&& FEDInterface_[vmeBaseAddress]->getPixelFEDCard().NCadcg==0&& FEDInterface_[vmeBaseAddress]->getPixelFEDCard().SCadcg==0&& FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Sadcg==0) || (FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Nadcg==0x3f&& FEDInterface_[vmeBaseAddress]->getPixelFEDCard().NCadcg==0xf&& FEDInterface_[vmeBaseAddress]->getPixelFEDCard().SCadcg==0xf&& FEDInterface_[vmeBaseAddress]->getPixelFEDCard().Sadcg==0xf) ); //if(debug) cout<<" 4 "<<ifed<<endl; opticalReceiverSlope=opticalReceiverSlope1Vpp; if (twoVpp[fednumber]) { opticalReceiverSlope=opticalReceiverSlope1Vpp; channelOffsetSlope=1; } //if(debug) cout<<" 5 "<<ifed<<endl; for (unsigned int ichannel=0; ichannel<fedsAndChannels_[ifed].second.size(); ++ichannel) { //if(debug) cout<<" 9 "<<fednumber<<endl; dirMakerFED_->cdDirectory(fedsAndChannels_[ifed].first,fedsAndChannels_[ifed].second[ichannel]); uint32_t buffer[pos::fifo1TranspDepth]; unsigned int channel=fedsAndChannels_[ifed].second[ichannel]; //if(debug) cout<<" 10 "<<channel<<" "<<fednumber<<endl; int status = FEDInterface_[vmeBaseAddress]->drain_transBuffer(channel, buffer); //if(debug) cout<<" 11 "<<channel<<" "<<fednumber<<endl; PixelDecodedFEDRawData decodedRawData(buffer, 100., 100., 150., 0., 100., 0., 150.); //if(debug) cout<<" 12 "<<channel<<" "<<fednumber<<endl; std::string tbmSignalFilename=outputDir()+"/FIFO1Signal_"+itoa(iteration_)+"_"+itoa(fednumber)+"_"+itoa(channel)+".gif"; std::string tbmSignalFilenameShort="FIFO1Signal_"+itoa(iteration_)+"_"+itoa(fednumber)+"_"+itoa(channel)+".gif"; std::string tbmSignalFilenameshort="FIFO1Signal_"+itoa(iteration_)+"_"+itoa(fednumber)+"_"+itoa(channel); decodedRawData.drawToFile(tbmSignalFilename,tbmSignalFilenameshort,150); //if(debug) cout<<" 13 "<<channel<<" "<<fednumber<<endl; std::stringstream *tbmSignal=new std::stringstream("~"); if (status<0){ diagService_->reportError("Could not drain FIFO 1 in transparent mode!!",DIAGERROR); std::cout<<"[PixelFEDBaselineCalibration::execute] Could not drain FIFO 1 in transparent mode!"<<std::endl; } int baselinecorrection=FEDInterface_[vmeBaseAddress]->get_BaselineCorr(channel); if (baselinecorrection!=0) { std::cout<<"[PixelFEDBaselineCalibration::execute] Baseline Adjust for Channel "<<channel<<" is non-zero: "<<baselinecorrection<<std::endl; assert(baselinecorrection==0); } unsigned int i=TransparentDataStart(buffer,fednumber,channel); unsigned int opto=opticalReceiversPerFED*fednumber+((channel-1)*opticalReceiversPerFED)/channelsPerFED; unsigned int channelindex=channelsPerFED*fednumber+channel-1; for (unsigned int j=1;j<i;++j) { unsigned int ADC=((buffer[j] & 0xffc00000) >> 22); B_Channel.at(channelindex).push_back(ADC); //if (debug) { // Reducing printout to console //std::cout<<"[PixelFEDBaselineCalibration::execute] Channel= "<<channel<<", slot="<<j<<", ADC="<<ADC<<std::endl; //} } if (debug) { // Reducing printout to console cout<<"[PixelFEDBaselineCalibration::execute] UB="<<((buffer[i] & 0xffc00000) >> 22)<<endl; cout<<"[PixelFEDBaselineCalibration::execute] UB="<<((buffer[i+1] & 0xffc00000) >> 22)<<endl; cout<<"[PixelFEDBaselineCalibration::execute] UB="<<((buffer[i+2] & 0xffc00000) >> 22)<<endl; } UB_Channel.at(channelindex).push_back(((buffer[i] & 0xffc00000) >> 22)); UB_Channel.at(channelindex).push_back(((buffer[i+1] & 0xffc00000) >> 22)); UB_Channel.at(channelindex).push_back(((buffer[i+2] & 0xffc00000) >> 22)); double B_Channel_mean=B_Channel.at(channelindex).mean(); B_OpticalReceiver_Used.at(opto)=true; if (B_Channel_mean>B_Max.at(opto)) B_Max.at(opto)=B_Channel_mean; if (B_Channel_mean<B_Min.at(opto)) B_Min.at(opto)=B_Channel_mean; *tbmSignal<<"<img src=\""<<tbmSignalFilename.substr(outputDir().size())<<"\"></img>"; summary_long_[fednumber][channel].push_back(tbmSignal); //if(debug) cout<<" 14 "<<channel<<" "<<fednumber<<endl; }//channel //if(debug) cout<<" 15 "<<fednumber<<endl; }//feds //if(debug) cout<<" 2 "<<endl; outputFile_->cd(); TStyle* plainStyle = new TStyle("Plain", "a plain style"); plainStyle->SetOptStat(1111); // Suppress statistics box. plainStyle->cd(); std::string SummaryPlotName = "Baseline_iteration"+itoa(iteration_); TCanvas* canvas_summaryplot =new TCanvas((SummaryPlotName+"_Canvas").c_str(),(SummaryPlotName+"_Canvas").c_str(),800,600); TH2F* histo_BaselineVsFED = new TH2F(SummaryPlotName.c_str(),SummaryPlotName.c_str(),40,0.5,40.5,2048,0,1023); for (unsigned int ifed=0; ifed<fedsAndChannels_.size(); ++ifed) { unsigned int fednumber=fedsAndChannels_[ifed].first; unsigned long vmeBaseAddress=theFEDConfiguration_->VMEBaseAddressFromFEDNumber(fednumber); PixelFEDCard fedCard=FEDInterface_[vmeBaseAddress]->getPixelFEDCard(); double baseline=0.0; double targetBaseline=targetBlack[fednumber]; std::string FEDName="Baseline_iteration_"+itoa(iteration_)+"_FED"+itoa(fednumber); std::string FEDName1="Baseline_iteration_"+itoa(iteration_)+"_FED"+itoa(fednumber)+"_Zoom"; std::string fedName = "FED"+itoa(fednumber); dirMakerFED_->cdDirectory(fedName); TCanvas* canvas=new TCanvas((FEDName+"_Canvas").c_str(),FEDName.c_str(),800,1600); canvas->Divide(1, 2); TH2F* histo_BaselineVsChannel = new TH2F(FEDName.c_str(),FEDName.c_str(),36,0.5,36.5,2048,0,1023); TH2F* histo_BaselineVsChannelZoom = new TH2F(FEDName1.c_str(),FEDName1.c_str(),36,0.5,36.5,100,targetBaseline-25,targetBaseline+25); // Iteration over Optical Receivers for (unsigned int opticalReceiver=0;opticalReceiver<3;++opticalReceiver) { unsigned int receiverIndex=opticalReceiversPerFED*fednumber+opticalReceiver; if (B_OpticalReceiver_Used.at(receiverIndex)) { int oldInputOffsetValue=fedCard.opt_inadj[opticalReceiver]; int newInputOffsetValue=oldInputOffsetValue; double opticalReceiverMean=(B_Min.at(receiverIndex)+B_Max.at(receiverIndex))/2.0; bool shiftUp=false, shiftDown=false; int channelWhichDrivesTheChange = 0; std::vector <unsigned int> channelsInThisFED=fedsAndChannels_[ifed].second; for (unsigned int ichannel=0;ichannel<channelsInThisFED.size();++ichannel) { if ((unsigned int)((channelsInThisFED[ichannel]-1)/12)==opticalReceiver) { if (fedCard.offs_dac[channelsInThisFED[ichannel]-1]==0) {shiftDown=true; channelWhichDrivesTheChange=ichannel;} else if (fedCard.offs_dac[channelsInThisFED[ichannel]-1]==255) {shiftUp=true; channelWhichDrivesTheChange=ichannel;} } } if (shiftUp && shiftDown) { diagService_->reportError("[PixelFEDBaselineCalibration::execute] Cannot correct this situation using Optical Input Offsets and Channel Offsets! Please use your AOH gain settings!",DIAGWARN); std::cout<<"Cannot correct this situation using Optical Input Offsets and Channel Offsets! Please use your AOH gain settings!"<<std::endl; } else if (shiftUp) { if (oldInputOffsetValue<15){ //diagService_->reportError("Shifting up Input Offset!",DIAGINFO); newInputOffsetValue=oldInputOffsetValue+1; std::cout<<"Shifting up Input Offset for fed "<<fednumber<<" optical receiver "<<opticalReceiver <<" channel "<<channelWhichDrivesTheChange<<" new value "<< newInputOffsetValue <<std::endl; } else { diagService_->reportError("Input Offset Value too high. Please use your AOH gain settings!",DIAGWARN); std::cout<<"Input Offset Value too high. Please use your AOH gain settings!"<<std::endl; } } else if (shiftDown) { if (oldInputOffsetValue>0) { //diagService_->reportError("Shifting down Input Offset!",DIAGINFO); // std::cout<<"Shifting down Input Offset!"<<std::endl; newInputOffsetValue=oldInputOffsetValue-1; std::cout<<"Shifting down Input Offset for fed "<<fednumber<<" optical receiver "<<opticalReceiver <<" channel "<<channelWhichDrivesTheChange<<" new value "<< newInputOffsetValue <<std::endl; } else { diagService_->reportError("Input Offset Value too low. Please use your AOH gain settings!",DIAGWARN); // std::cout<<"Input Offset Value too low. Please use your AOH gain settings!"<<std::endl; } } else { newInputOffsetValue=int(oldInputOffsetValue-(targetBlack[fednumber]-opticalReceiverMean)/opticalReceiverSlope+0.5); } InputOffsetDAC.at(receiverIndex)=newInputOffsetValue; if (debug) { std::cout<<"FED number="<<fednumber<<", optical receiver="<<opticalReceiver<<" B (mean of max, min)="<<opticalReceiverMean<<" old inputoffset="<<oldInputOffsetValue<<" new inputoffset="<<newInputOffsetValue<<std::endl; } } } // optical receivers // Iteration over FED Channels for (unsigned int ichannel=0; ichannel<fedsAndChannels_[ifed].second.size(); ++ichannel) { unsigned int channel=fedsAndChannels_[ifed].second[ichannel]; assert(channel>0 && channel<37); int oldInputOffsetValue=fedCard.opt_inadj[(channel-1)/12]; int newInputOffsetValue=InputOffsetDAC.at(opticalReceiversPerFED*fednumber+(channel-1)/12); int oldChannelOffsetDACValue=fedCard.offs_dac[channel-1]; int newChannelOffsetDACValue=oldChannelOffsetDACValue - int ((targetBlack[fednumber]-B_Channel.at(fednumber*channelsPerFED+channel-1).mean())+(newInputOffsetValue - oldInputOffsetValue)*opticalReceiverSlope+0.5)/channelOffsetSlope; if (newChannelOffsetDACValue<0) newChannelOffsetDACValue=0; if (newChannelOffsetDACValue>255) newChannelOffsetDACValue=255; ChannelOffsetDAC.at(fednumber*channelsPerFED+channel-1)=newChannelOffsetDACValue; if (debug) { std::cout<<"FED number="<<fednumber<<", channel="<<channel<<" B=" << B_Channel.at(fednumber*channelsPerFED+channel-1).mean()<<" old channeloffset= "<<oldChannelOffsetDACValue<<" new channeloffset= "<<newChannelOffsetDACValue<<std::endl; } //============================== Changes by Irakli ============================== *(summary_long_[fednumber][channel].back())<<"<br>Old Channel Offset DAC = "<<oldChannelOffsetDACValue<<"<br/>"<<std::endl; // *(summary_long_[fednumber][channel].back())<<"Old Channel Offset DAC = "<<oldChannelOffsetDACValue<<"<br/>"<<std::endl; *(summary_long_[fednumber][channel].back())<<"New Channel Offset DAC = "<<newChannelOffsetDACValue<<"<br/>"<<std::endl; *(summary_long_[fednumber][channel].back())<<"New Black mean = "<<B_Channel.at(fednumber*channelsPerFED+channel-1).mean()<<"<br/>"<<std::endl; //std::cout<<"The target black was "<<targetBlack[fednumber]<<endl; //if (fabs(B_Channel.at(fednumber*channelsPerFED+channel-1).mean()-targetBlack[fednumber])>10) { if (fabs(B_Channel.at(fednumber*channelsPerFED+channel-1).mean()-targetBlack[fednumber])>blackTolerance ) { replyString="FEDBaselineCalibrationWithPixelsIterating"; summary_short_[fednumber][channel].push_back(0); *(summary_long_[fednumber][channel].back())<<"UB Std.dev. = "<<UB_Channel.at(fednumber*channelsPerFED+channel-1).stddev()<<"<br>"<<endl; *(summary_long_[fednumber][channel].back())<<"B Std.dev. = "<<B_Channel.at(fednumber*channelsPerFED+channel-1).stddev()<<"<br>"<<endl; std::cout<<"FED/channel = "<<fednumber<<"/"<<channel <<" Black mean is not within "<<blackTolerance<<" of " <<targetBlack[fednumber]<<" " <<B_Channel.at(fednumber*channelsPerFED+channel-1).mean() <<std::endl; } else { summary_short_[fednumber][channel].push_back(1); *(summary_long_[fednumber][channel].back())<<"UB Std.dev. = "<<UB_Channel.at(fednumber*channelsPerFED+channel-1).stddev()<<"<br>"<<endl; *(summary_long_[fednumber][channel].back())<<"B Std.dev. = "<<B_Channel.at(fednumber*channelsPerFED+channel-1).stddev()<<"<br>"<<endl; } baseline = B_Channel.at(fednumber*channelsPerFED+channel-1).mean(); histo_BaselineVsChannel->Fill(channel,baseline); histo_BaselineVsChannelZoom->Fill(channel,baseline); histo_BaselineVsFED->Fill(fednumber,baseline); } // channel canvas->cd(1); histo_BaselineVsChannel->Draw("colz"); canvas->cd(2); TLine* targetUp = new TLine(0.5,targetBaseline-blackTolerance,36.5,targetBaseline-blackTolerance); TLine* targetLow = new TLine(0.5,targetBaseline+blackTolerance,36.5,targetBaseline+blackTolerance); targetUp->SetLineColor(kMagenta); targetUp->SetLineStyle(kDashed); targetLow->SetLineColor(kMagenta); targetLow->SetLineStyle(kDashed); histo_BaselineVsChannelZoom->Draw("colz"); targetUp->Draw("same"); targetLow->Draw("same"); canvas->Write(); delete histo_BaselineVsChannel; delete histo_BaselineVsChannelZoom; } outputFile_->cd(); canvas_summaryplot->cd(); histo_BaselineVsFED->Draw("colz"); canvas_summaryplot->Write(); delete histo_BaselineVsFED; // Update the FED Cards for (unsigned int ifed=0; ifed<fedsAndChannels_.size(); ++ifed) { unsigned int fednumber=fedsAndChannels_[ifed].first; unsigned long vmeBaseAddress=theFEDConfiguration_->VMEBaseAddressFromFEDNumber(fednumber); PixelFEDCard fedCard=FEDInterface_[vmeBaseAddress]->getPixelFEDCard(); for (unsigned int opticalReceiver=0;opticalReceiver<3;++opticalReceiver) { unsigned int receiverIndex=opticalReceiversPerFED*fednumber+opticalReceiver; if (B_OpticalReceiver_Used[receiverIndex]) { fedCard.opt_inadj[opticalReceiver]=InputOffsetDAC.at(receiverIndex); } } // Write the Channel Offset DACs, Black High, Black Low and UB thresholds into the PixelFEDCard for (unsigned int ichannel=0; ichannel<fedsAndChannels_[ifed].second.size(); ++ichannel) { unsigned int channel=fedsAndChannels_[ifed].second[ichannel]; fedCard.offs_dac[channel-1]=ChannelOffsetDAC.at(fednumber*channelsPerFED+channel-1); int recommendedBlackHi=int(B_Channel.at(fednumber*channelsPerFED+channel-1).mean()+3*B_Channel.at(fednumber*channelsPerFED+channel-1).stddev()+50); int recommendedBlackLo=int(B_Channel.at(fednumber*channelsPerFED+channel-1).mean()-3*B_Channel.at(fednumber*channelsPerFED+channel-1).stddev()-50); int recommendedUblack=int(UB_Channel.at(fednumber*channelsPerFED+channel-1).mean()+3*UB_Channel.at(fednumber*channelsPerFED+channel-1).stddev()+50); if (recommendedBlackLo>0 && recommendedBlackHi>0 && recommendedUblack>=0 && recommendedBlackLo>recommendedUblack) { // modified to take care of the bpix very low TBM ub // Use the middle point between UB and B as the cut float ub = UB_Channel.at(fednumber*channelsPerFED+channel-1).mean(); // nomal case when ub=150 int lowBCut = int( (B_Channel.at(fednumber*channelsPerFED+channel-1).mean() + ub )/2. ); if(ub<74.) { // for special channels with very low ub std::cout<<" FED ID = "<<fednumber<<", Channel = "<<channel <<" Low UB "<< ub <<" make the cut asymmetric "<<lowBCut; lowBCut = int( (B_Channel.at(fednumber*channelsPerFED+channel-1).mean())*0.45 + ub*0.55 ); std::cout<<" -> "<<lowBCut<<std::endl; } //fedCard.BlackHi[channel-1] = recommendedBlackHi; //fedCard.BlackLo[channel-1] = recommendedBlackLo; //fedCard.Ublack[channel-1] = recommendedUblack; fedCard.BlackHi[channel-1] = 1000; fedCard.BlackLo[channel-1] = lowBCut; fedCard.Ublack[channel-1] = lowBCut-1; } else { std::cout<<"PixelFEDSupervisor::FEDBaselineCalibrationWithPixels reports: "<<std::endl; std::cout<<" FED ID = "<<fednumber<<", Channel = "<<channel<<std::endl; std::cout<<" Recommended Black Hi = "<<recommendedBlackHi<<std::endl; std::cout<<" Recommended Black Lo = "<<recommendedBlackLo<<std::endl; std::cout<<" Recommended UB threshold = "<<recommendedUblack<<std::endl; std::cout<<" ... were found to be nonsensical and hence not written into the params_fed.dat"<<std::endl; } } FEDInterface_[vmeBaseAddress]->setupFromDB(fedCard); VMEPtr_[vmeBaseAddress]->write("LRES",0x80000000); //FEDInterface_[vmeBaseAddress]->BaselineCorr_off(); } xoap::MessageReference reply=MakeSOAPMessageReference(replyString); return reply; } void PixelFEDBaselineCalibration::initializeFED(){ setFEDModeAndControlRegister(0x0,0x30019); setBlackUBTrans(); } xoap::MessageReference PixelFEDBaselineCalibration::beginCalibration(xoap::MessageReference msg) { std::cout<<"[PixelFEDBaselineCalibration::beginCalibration] Entered."<<std::endl; iteration_=0; const PixelCalibConfiguration* tempCalibObject=dynamic_cast<PixelCalibConfiguration*>(theCalibObject_); assert(tempCalibObject!=0); fedsAndChannels_ = tempCalibObject->fedCardsAndChannels(crate_, theNameTranslation_, theFEDConfiguration_, theDetectorConfiguration_); std::cout << "Output filename:"<<(outputDir()+"/"+"FEDBaselineWithPixels_"+itoa(crate_)+".root").c_str()<<std::endl; outputFile_ = new TFile((outputDir()+"/"+"FEDBaselineWithPixels_"+itoa(crate_)+".root").c_str(),"UPDATE",("FEDBaselineWithPixels_"+itoa(crate_)+".root").c_str()); dirMakerFED_ = new PixelRootDirectoryMaker(fedsAndChannels_, outputFile_); outputFile_->cd(); xoap::MessageReference reply = MakeSOAPMessageReference("BeginCalibrationDone"); return reply; } xoap::MessageReference PixelFEDBaselineCalibration::endCalibration(xoap::MessageReference msg) { std::cout << "[PixelFEDBaselineCalibration::endCalibration()] Entered." << std::endl; if(outputFile_){ outputFile_->Write(); outputFile_->Close(); } for (unsigned int ifed=0; ifed<fedsAndChannels_.size(); ++ifed) { unsigned int fednumber=fedsAndChannels_[ifed].first; unsigned long vmeBaseAddress=theFEDConfiguration_->VMEBaseAddressFromFEDNumber(fednumber); PixelFEDCard fedCard=FEDInterface_[vmeBaseAddress]->getPixelFEDCard(); fedCard.restoreBaselinAndChannelMasks(); fedCard.restoreControlAndModeRegister(); fedCard.writeASCII(outputDir()); } //=================================================================================================== //================================== Changes by IRAKLI ============================================== //=================================================================================================== // Generate formatted HTML file ofstream summaryFile((outputDir()+"/FEDBaselineCalibration_"+itoa(crate_)+".html").c_str()); summaryFile <<"<html>"<<std::endl; summaryFile <<"<head>"<<std::endl; summaryFile <<" <script language=\"JavaScript\">"<<std::endl; summaryFile <<" function toggle(fed,num) {"<<std::endl; summaryFile <<" var i = 0;"<<std::endl; summaryFile <<" var elem = document.getElementById(\"fed_\"+fed+\"_iteration_\"+i);"<<std::endl; summaryFile <<" while (elem) {"<<std::endl; summaryFile <<" if (i==num) elem.style.display = (elem.style.display==\"none\")?(\"\"):(\"none\");"<<std::endl; summaryFile <<" i++;"<<std::endl; summaryFile <<" elem = document.getElementById(\"fed_\"+fed+\"_iteration_\"+i);"<<std::endl; summaryFile <<" }}"<<std::endl; summaryFile <<" </script>"<<std::endl; summaryFile <<"</head>"<<std::endl; summaryFile <<"<body>"<<std::endl; //=============================================================== std::map <unsigned int, std::map<unsigned int, std::vector<unsigned int> > >::iterator i_summary_short_=summary_short_.begin(); for (;i_summary_short_!=summary_short_.end();++i_summary_short_) { unsigned int fednumber=i_summary_short_->first; std::map<unsigned int, std::vector<unsigned int> > summary_FED_short=i_summary_short_->second; //=============================================================== summaryFile<<"<h2>Pixel FED Board # "<<fednumber<<" </h2>"<<std::endl; summaryFile<<"<table border=0>"<<std::endl; summaryFile<<" <tr>"<<std::endl;; summaryFile<<" <td width=100 valign=top>"<<std::endl;; summaryFile<<" <table border=0>"<<std::endl; std::map<unsigned int, std::vector<unsigned int> >::iterator i_summary_FED_short=summary_FED_short.begin(); //=============================================================== std::vector<unsigned int> summary_channel_short=i_summary_FED_short->second; unsigned int iter_num =summary_channel_short.size(); for (unsigned int iteration=0; iteration<iter_num; ++iteration) { summaryFile<<"<tr><td width=100><a href=\"javascript:toggle(\'"<<fednumber<<"\',\'"<<iteration<<"\')\">Iteration "<<iteration<<"</a></td></tr>"<<std::endl; } //=============================================================== summaryFile<<" </table>"<<std::endl; summaryFile<<" </td>"<<std::endl; for (unsigned int xiter=0; xiter<iter_num; ++xiter) { summaryFile<<"<td id=\"fed_"<<fednumber<<"_iteration_"<<xiter<<"\" style=\"display:none\">"<<std::endl; summaryFile<<"<div style=\"overflow-y:auto; height:600\">"<<std::endl; summaryFile<<"<table border=1>"<<std::endl; for (i_summary_FED_short=summary_FED_short.begin();i_summary_FED_short!=summary_FED_short.end();++i_summary_FED_short) { unsigned int channel=i_summary_FED_short->first; std::vector<unsigned int> summary_channel_short=i_summary_FED_short->second; summaryFile<<"<tr><td align=\"center\">Channel "<<channel<<std::endl; if (summary_short_[fednumber][channel].at(xiter) == 0) {summaryFile<<"FAILURE"<<std::endl;} summaryFile<<"</td><td>"<<(summary_long_[fednumber][channel][xiter]->str())<<"</td></tr>"<<std::endl; }//channel summaryFile<<"</table>"<<std::endl; summaryFile<<"</div>"<<std::endl; summaryFile<<"</td>"<<std::endl; }//iteration summaryFile<<" </td></tr>"<<std::endl; summaryFile<<"</table>"<<std::endl; }//FED summaryFile<<"</body>"<<std::endl; summaryFile<<"</html>"<<std::endl; summaryFile.close(); summary_short_.clear(); summary_long_.clear(); iteration_=0; xoap::MessageReference reply = MakeSOAPMessageReference("EndCalibrationDone"); return reply; }
[ "cmspixelpilot@yahoo.com" ]
cmspixelpilot@yahoo.com
64520005a1cd80b6caaae4402b67d0cb30246a4a
a606c34fcfef5957b412ca545974760ead5951f0
/B-Trees/btree.cpp
74d6c416295cdc51ff282051fae4fa043251fb8f
[]
no_license
shiks25/ADS-Lab
6f47144bda6074cc84141890245f4841dfa9793d
095e29343ebeb6a6d6e6d412466902c72adeba08
refs/heads/master
2023-02-07T18:55:47.450949
2020-12-29T16:05:01
2020-12-29T16:05:01
297,917,259
0
0
null
null
null
null
UTF-8
C++
false
false
3,154
cpp
#include<bits/stdc++.h> using namespace std; class BTreeNode { int *key; int d; BTreeNode **child; int n; bool leaf; public: BTreeNode(int _d, bool _leaf); void insertNonFull(int k); void splitChild(int i, BTreeNode *y); void traverse(); friend class BTree; }; class BTree { BTreeNode *root; int d; public: BTree(int _d) { root = NULL; d = _d; } void traverse() { if (root != NULL) root->traverse(); } void insert(int k); }; BTreeNode::BTreeNode(int dx, bool leafx) { d = dx; leaf = leafx; key = new int[2*d-1]; child = new BTreeNode *[2*d]; n = 0; } void BTreeNode::traverse() { int i; for(i=0; i<n; i++) { if(leaf == false) child[i]->traverse(); cout<<key[i]<<" "; } if(leaf == false) child[i]->traverse(); } void BTree::insert(int k) { if (root == NULL) { root = new BTreeNode(d, true); root->key[0] = k; root->n = 1; } else { if (root->n == 2*d-1) { BTreeNode *s = new BTreeNode(d, false); s->child[0] = root; s->splitChild(0, root); int i = 0; if (s->key[0] < k) i++; s->child[i]->insertNonFull(k); root = s; } else root->insertNonFull(k); } } void BTreeNode::insertNonFull(int k) { int i = n-1; if (leaf == true) { while (i >= 0 && key[i] > k) { key[i+1] = key[i]; i--; } key[i+1] = k; n++; } else { while (i >= 0 && key[i] > k) i--; if (child[i+1]->n == 2*d-1) { splitChild(i+1, child[i+1]); if (key[i+1] < k) i++; } child[i+1]->insertNonFull(k); } } void BTreeNode::splitChild(int i, BTreeNode *y) { BTreeNode *z = new BTreeNode(y->d, y->leaf); z->n = d - 1; for (int j = 0; j < d-1; j++) z->key[j] = y->key[j+d]; if (y->leaf == false) { for (int j = 0; j < d; j++) z->child[j] = y->child[j+d]; } y->n = d - 1; for (int j = n; j >= i+1; j--) child[j+1] = child[j]; child[i+1] = z; for (int j = n-1; j >= i; j--) key[j+1] = key[j]; key[i] = y->key[d-1]; n++; } int main() { int m,n,ch=0; int x; cout<<"Enter the order: "; cin>>m; BTree t(m); cout<<"Enter the number of elements: "; cin>>n; cout<<"Enter the elements:"<<endl; for(int i=0;i<n;i++){ cin>>x; t.insert(x); } cout << "Traversal of the constucted tree is "<<endl; t.traverse(); while(ch!=-1){ cout<<"\nEnter 1 to insert,-1 to exit: "; cin>>ch; if(ch==1){ cout<<"Enter the element to be inserted: "; cin>>x; t.insert(x); cout << "Traversal of the tree after insertion is "<<endl; t.traverse(); } } return 0; }
[ "noreply@github.com" ]
noreply@github.com
f6e792b45f4024fa03c4aed0c905087b64e17f60
9f5296315771696fc561e0c6d9a2e15daf2ab52e
/Practice_problems/PRB01.cpp
70bdb0a1fcb0fc8326d0d63312822429011e0490
[]
no_license
nehakale1403/Codechef
97719e62fc580c430a51f6e7297e235e162c5455
41a32568d3c60a9c24ff735a130aff726765c3b3
refs/heads/master
2023-03-21T00:39:55.358371
2021-03-21T17:36:33
2021-03-21T17:36:33
326,575,359
1
1
null
2021-02-28T13:38:21
2021-01-04T05:06:24
C++
UTF-8
C++
false
false
431
cpp
#include <iostream> #include <cmath> using namespace std; int main() { int t; cin>>t; while(t--){ int number, flag=0; cin>>number; if(number == 0 || number == 1){ cout<<"no"<<endl; } else{ for(int j = 2; j<=sqrt(number);j++){ if(number % j == 0){ flag=1; break; } } if (flag == 1) cout<<"no"<<endl; else cout<<"yes"<<endl; } } return 0; }
[ "nkale8013@gmail.com" ]
nkale8013@gmail.com
feafde0ebf05d357509941bfbc31fad5e8b1dbee
d2249116413e870d8bf6cd133ae135bc52021208
/Ultimate Toolbox/samples/gui/HistCmbo/HistoryComboDemoDlg.cpp
c9f5357302c5d32bb56120e110d62104ed95a83c
[]
no_license
Unknow-man/mfc-4
ecbdd79cc1836767ab4b4ca72734bc4fe9f5a0b5
b58abf9eb4c6d90ef01b9f1203b174471293dfba
refs/heads/master
2023-02-17T18:22:09.276673
2021-01-20T07:46:14
2021-01-20T07:46:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,023
cpp
// HistoryComboDemoDlg.cpp : implementation file // #include "stdafx.h" #include "utsampleabout.h" #include "HistoryComboDemo.h" #include "HistoryComboDemoDlg.h" #include <afxpriv.h> // for WM_KICKIDLE #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // CHistoryComboDemoDlg dialog CHistoryComboDemoDlg::CHistoryComboDemoDlg(CWnd* pParent /*=NULL*/) : CDialog(CHistoryComboDemoDlg::IDD, pParent), m_wndHistoryCombo(/* COXHistoryCombo::TBPHorizontalRightCenter, FALSE, MAKEINTRESOURCE(IDR_HISTORY_COMBO_TEST) */) { //{{AFX_DATA_INIT(CHistoryComboDemoDlg) m_nType = -1; m_bSmallGap = FALSE; m_bButton1 = FALSE; m_bButton2 = FALSE; m_bButton3 = FALSE; m_bButton4 = FALSE; m_bButton5 = FALSE; m_bButton6 = FALSE; m_nMaxCount = 0; //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CHistoryComboDemoDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CHistoryComboDemoDlg) DDX_Control(pDX, IDC_MAX_COUNT_SPIN, m_wndMaxCountSpin); DDX_Control(pDX, IDC_HISTORY_COMBO, m_wndHistoryCombo); DDX_Radio(pDX, IDC_SIMPLE, m_nType); DDX_Check(pDX, IDC_USE_GAP, m_bSmallGap); DDX_Check(pDX, IDC_BUTTON_1, m_bButton1); DDX_Check(pDX, IDC_BUTTON_2, m_bButton2); DDX_Check(pDX, IDC_BUTTON_3, m_bButton3); DDX_Check(pDX, IDC_BUTTON_4, m_bButton4); DDX_Check(pDX, IDC_BUTTON_5, m_bButton5); DDX_Check(pDX, IDC_BUTTON_6, m_bButton6); DDX_Text(pDX, IDC_MAX_COUNT, m_nMaxCount); DDV_MinMaxInt(pDX, m_nMaxCount, -1, 100); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CHistoryComboDemoDlg, CDialog) //{{AFX_MSG_MAP(CHistoryComboDemoDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_MOVE_TOOLBAR, OnMoveToolbar) ON_BN_CLICKED(IDC_DROP_LIST, OnStyleChange) ON_BN_CLICKED(IDC_SAVE, OnSave) ON_BN_CLICKED(IDC_SHOW, OnShow) ON_BN_CLICKED(IDC_RESTORE, OnRestore) ON_BN_CLICKED(IDC_DROPDOWN, OnStyleChange) ON_BN_CLICKED(IDC_SIMPLE, OnStyleChange) ON_EN_CHANGE(IDC_MAX_COUNT, OnChangeMaxCount) ON_COMMAND(ID_HISTORY_TEST, OnExtra) ON_UPDATE_COMMAND_UI(ID_HISTORY_TEST, OnUpdateExtra) //}}AFX_MSG_MAP ON_MESSAGE(WM_KICKIDLE, OnKickIdle) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CHistoryComboDemoDlg message handlers BOOL CHistoryComboDemoDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // Reflect the current type of combo DWORD nComboStyle = m_wndHistoryCombo.GetStyle(); if ((nComboStyle & CBS_SIMPLE) == CBS_SIMPLE) m_nType = 0; else if ((nComboStyle & CBS_DROPDOWN) == CBS_DROPDOWN) m_nType = 1; else if ((nComboStyle & CBS_DROPDOWNLIST) == CBS_DROPDOWNLIST) m_nType = 2; else { m_nType = -1; TRACE0("CHistoryComboDemoDlg::OnInitDialog : History combo has unknown style\n"); } // Initialize the visibility m_bButton1 = m_wndHistoryCombo.IsButtonShown(0); m_bButton2 = m_wndHistoryCombo.IsButtonShown(1); m_bButton3 = m_wndHistoryCombo.IsButtonShown(2); m_bButton4 = m_wndHistoryCombo.IsButtonShown(3); m_bButton5 = m_wndHistoryCombo.IsButtonShown(4); m_bButton6 = m_wndHistoryCombo.IsButtonShown(5); // Initialize the max list count m_nMaxCount = m_wndHistoryCombo.GetMaxHistoryCount(); m_wndMaxCountSpin.SetRange(-1, 100); // Use auto persistence m_wndHistoryCombo.SetAutoPersistent(_T("History 1")); UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control } void CHistoryComboDemoDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == IDM_ABOUTBOX) { CUTSampleAboutDlg dlgAbout(IDR_MAINRFAME,ID_DESCRIPTION_FILE); dlgAbout.DoModal(); } else { CDialog::OnSysCommand(nID, lParam); } } // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void CHistoryComboDemoDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } } // The system calls this to obtain the cursor to display while the user drags // the minimized window. HCURSOR CHistoryComboDemoDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; } void CHistoryComboDemoDlg::OnMoveToolbar() { if (!UpdateData(TRUE)) return; COXHistoryCombo::EToolbarPosition eToolbarPosition = m_wndHistoryCombo.GetToolbarPosition(); eToolbarPosition = (COXHistoryCombo::EToolbarPosition)((int)eToolbarPosition + 1); if (COXHistoryCombo::TBP_LAST < eToolbarPosition) eToolbarPosition = COXHistoryCombo::TBP_FIRST; m_wndHistoryCombo.PositionToolbar(eToolbarPosition, m_bSmallGap); } void CHistoryComboDemoDlg::OnStyleChange() { if (!UpdateData(TRUE)) return; DWORD nMask = CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST; DWORD nNewComboStyle = 0; switch(m_nType) { case 0: nNewComboStyle = CBS_SIMPLE; break; case 1: nNewComboStyle = CBS_DROPDOWN; break; case 2: nNewComboStyle = CBS_DROPDOWNLIST; break; default: TRACE1("CHistoryComboDemoDlg::OnStyleChange : Unexpected case in switch : Unknown style\n", m_nType); ASSERT(FALSE); break; } DWORD nFullOldComboStyle = m_wndHistoryCombo.GetStyle(); DWORD nOldComboStyle = m_wndHistoryCombo.GetStyle() & nMask; if (nOldComboStyle != nNewComboStyle) { // The type changed, but changing the window style is not sufficient, // we have to recreate the window // Get the state of the old window CRect windowRect; m_wndHistoryCombo.GetWindowRect(windowRect); ScreenToClient(windowRect); if ( nOldComboStyle != CBS_SIMPLE ) // ... Use a height of 2.8 times the height of the edit (or static) control windowRect.bottom = windowRect.top + (windowRect.Height() * 14) / 4; // Destroy old window and create new one m_wndHistoryCombo.DestroyWindow(); m_wndHistoryCombo.Create((nFullOldComboStyle & ~nMask) | nNewComboStyle | WS_VSCROLL, windowRect, this, IDC_HISTORY_COMBO); // Restore the old state m_wndHistoryCombo.SetFont(GetFont()); // ... The contents is already restored during OnCreate // because we use SetAutoPersistent } } LRESULT CHistoryComboDemoDlg::OnKickIdle(WPARAM wParam, LPARAM lParam) { UNUSED(wParam); UNREFERENCED_PARAMETER(lParam); ASSERT_VALID(this); ASSERT(wParam == MSGF_DIALOGBOX); BOOL bContinueIdle = TRUE; // Pass on to the history combo m_wndHistoryCombo.OnIdle(); return bContinueIdle; } void CHistoryComboDemoDlg::OnSave() { m_wndHistoryCombo.SaveContents(_T("History 1")); } void CHistoryComboDemoDlg::OnShow() { if (!UpdateData(TRUE)) return; m_wndHistoryCombo.ShowButton(0, m_bButton1); m_wndHistoryCombo.ShowButton(1, m_bButton2); m_wndHistoryCombo.ShowButton(2, m_bButton3); m_wndHistoryCombo.ShowButton(3, m_bButton4); m_wndHistoryCombo.ShowButton(4, m_bButton5); m_wndHistoryCombo.ShowButton(5, m_bButton6); m_wndHistoryCombo.RefreshToolbar(); } void CHistoryComboDemoDlg::OnRestore() { m_wndHistoryCombo.RestoreContents(_T("History 1")); } void CHistoryComboDemoDlg::OnChangeMaxCount() { if (m_wndHistoryCombo.m_hWnd != NULL) { if (!UpdateData(TRUE)) return; m_wndHistoryCombo.SetMaxHistoryCount(m_nMaxCount); } } void CHistoryComboDemoDlg::OnExtra() { m_wndHistoryCombo.ResetContent(); } void CHistoryComboDemoDlg::OnUpdateExtra(CCmdUI* pCmdUI) { pCmdUI->Enable(0 < m_wndHistoryCombo.GetCount()); }
[ "chenchao0632@163.com" ]
chenchao0632@163.com
3ad01e4c51eaad94996ffa16e25e8b64bc14d361
e24e674ababf1763f9ba43f810c6b5828ebcf68f
/Tree/C++/leafnodesum.cpp
0fb0343e66ca8b701abda6c16230c9f8f90114f4
[]
no_license
ACES-DYPCOE/Data-Structure
8f833b86876e233e8a1e46e067c1808c164fc6b8
292b3c1f3dec3b7e5ae3f5143146201892e3ed4d
refs/heads/master
2023-07-22T16:08:11.710042
2021-09-07T10:44:42
2021-09-07T10:44:42
299,687,733
22
44
null
2021-09-07T10:44:42
2020-09-29T17:19:32
C++
UTF-8
C++
false
false
2,145
cpp
// { Driver Code Starts //Author- SAJAL AGRAWAL //sajal.agrawal1997@gmail.com #include <stdio.h> #include <stdlib.h> #include<string.h> struct Node { int data; struct Node *left; struct Node *right; Node(int x){ data = x; left = NULL; right = NULL; } }; Node *insert(Node *r,int num); int sumOfLeafNodes(Node *r); void preOrderDisplay(Node *r); void inOrderDisplay(Node *r); void postOrderDisplay(Node *r); int search(Node *r, int num); int main(void) { int t,n,data; scanf("%d",&t); while(t--){ Node *root=NULL; scanf("%d",&n); //printf("n=%d\n",n); while(n--){ scanf("%d",&data); //printf("data=%d\n",data); root=insert(root,data); } //inOrderDisplay(root); printf("%d\n",sumOfLeafNodes(root)); } return 0; } Node *insert(Node *r,int num){ if(r==NULL){ r = new Node(num); }else{ if(num<r->data){ r->left=insert(r->left,num); }else{ r->right=insert(r->right,num); } } return r; } void preOrderDisplay(Node *r){ if(r!=NULL){ printf("%d ",r->data); preOrderDisplay(r->left); preOrderDisplay(r->right); } } void inOrderDisplay(Node *r){ if(r!=NULL){ inOrderDisplay(r->left); printf("%d ",r->data); inOrderDisplay(r->right); } } void postOrderDisplay(Node *r){ if(r!=NULL){ postOrderDisplay(r->left); postOrderDisplay(r->right); printf("%d ",r->data); } } int search(Node *r,int num){ if(r==NULL)return 0; else if(r->data==num)return 0; else if(r->data > num) search(r->left,num); else search(r->right,num); }// } Driver Code Ends /* The structure of Node struct Node{ int data; Node *left,*right; }; */ /*You are required to complete below method */ int sumOfLeafNodes(Node *r ){ /*Your code here */ if(!r) return 0; else{ if(!r->left && !r->right) {return r->data;} else{ return (sumOfLeafNodes(r->left)+sumOfLeafNodes(r->right)); } } }
[ "prajakta916mane1@gmail.com" ]
prajakta916mane1@gmail.com
7d730e4685b786c409c992e60a5dd688f9b978d9
22a0099eccbe2ef91d5e148aee6d4219469a4dd3
/12_Mesh/src/Common/Pixel.cpp
43733a04f5038f467c71ba8266c91d8dbc397d5f
[]
no_license
aalekhm/PixSoR
184809df751c3274d1d3e1bf3608df90386ee1aa
a86930758205919433cab65bb3558732994f2068
refs/heads/master
2022-11-29T14:17:54.783486
2020-08-11T16:50:37
2020-08-11T16:50:37
286,780,927
4
0
null
null
null
null
UTF-8
C++
false
false
703
cpp
#include "Common/Pixel.h" Pixel::Pixel() { m_iRed = 0; m_iGreen = 0; m_iBlue = 0; m_iAlpha = 255; } Pixel::Pixel(uint8_t iRed, uint8_t iGreen, uint8_t iBlue, uint8_t iAlpha) { m_iRed = iRed; m_iGreen = iGreen; m_iBlue = iBlue; m_iAlpha = iAlpha; } Pixel::Pixel(uint32_t iPixel) { m_iPixel = iPixel; } uint32_t Pixel::getPixel() { return m_iPixel; } bool Pixel::operator==(const Pixel& p) const { return (m_iPixel == p.m_iPixel); } bool Pixel::operator!=(const Pixel& p) const { return (m_iPixel != p.m_iPixel); } void Pixel::operator=(Vector4f vColour) { m_iRed = (uint32_t)vColour.x; m_iGreen = (uint32_t)vColour.y; m_iBlue = (uint32_t)vColour.z; m_iAlpha = (uint32_t)vColour.w; }
[ "aalekhm@gmail.com" ]
aalekhm@gmail.com
4ebffa019b9f06e7d9983febcb747ab64f75fde4
c76dc04ab30acb663990aeff842436f2d4d1fcb5
/media/base/null_video_sink.cc
214c499c14b364da61c334fddbbed6c96f15429c
[ "BSD-3-Clause" ]
permissive
tongxingwy/chromium-1
1352c851a18a26645d69741ed6fc540fabcc862e
9e3ebd26fa69a2e2fdf5d5f53300bbf1e2f72b8c
refs/heads/master
2021-01-21T03:09:12.806702
2015-04-30T17:32:56
2015-04-30T17:33:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,088
cc
// Copyright 2015 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 "media/base/null_video_sink.h" #include "base/bind.h" #include "base/callback_helpers.h" #include "base/location.h" #include "base/single_thread_task_runner.h" namespace media { NullVideoSink::NullVideoSink( bool clockless, base::TimeDelta interval, const NewFrameCB& new_frame_cb, const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) : clockless_(clockless), interval_(interval), new_frame_cb_(new_frame_cb), task_runner_(task_runner), started_(false), callback_(nullptr), tick_clock_(&default_tick_clock_) { } NullVideoSink::~NullVideoSink() { DCHECK(!started_); } void NullVideoSink::Start(RenderCallback* callback) { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(!started_); callback_ = callback; started_ = true; last_now_ = current_render_time_ = tick_clock_->NowTicks(); cancelable_worker_.Reset( base::Bind(&NullVideoSink::CallRender, base::Unretained(this))); task_runner_->PostTask(FROM_HERE, cancelable_worker_.callback()); } void NullVideoSink::Stop() { DCHECK(task_runner_->BelongsToCurrentThread()); cancelable_worker_.Cancel(); started_ = false; if (!stop_cb_.is_null()) base::ResetAndReturn(&stop_cb_).Run(); } void NullVideoSink::CallRender() { DCHECK(task_runner_->BelongsToCurrentThread()); DCHECK(started_); const base::TimeTicks end_of_interval = current_render_time_ + interval_; if (current_render_time_ > pause_end_time_) { scoped_refptr<VideoFrame> new_frame = callback_->Render(current_render_time_, end_of_interval); const bool is_new_frame = new_frame != last_frame_; last_frame_ = new_frame; if (is_new_frame) new_frame_cb_.Run(new_frame); } current_render_time_ += interval_; if (clockless_) { task_runner_->PostTask(FROM_HERE, cancelable_worker_.callback()); return; } // Recompute now to compensate for the cost of Render(). const base::TimeTicks now = tick_clock_->NowTicks(); base::TimeDelta delay = current_render_time_ - now; // If we're behind, find the next nearest on time interval. if (delay < base::TimeDelta()) delay += interval_ * (-delay / interval_ + 1); current_render_time_ = now + delay; // The tick clock is frozen in this case, so clamp delay to the interval time. // We still want the interval passed to Render() to grow, but we also don't // want the delay used here to increase slowly over time. if (last_now_ == now && delay > interval_) delay = interval_; last_now_ = now; task_runner_->PostDelayedTask(FROM_HERE, cancelable_worker_.callback(), delay); } void NullVideoSink::PaintFrameUsingOldRenderingPath( const scoped_refptr<VideoFrame>& frame) { new_frame_cb_.Run(frame); } void NullVideoSink::PauseRenderCallbacks(base::TimeTicks pause_until) { pause_end_time_ = pause_until; } } // namespace media
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
8aed6f8cd012a7092d3d71ab2919d714a16c8cc1
c42aa20328948971e0f28fc29d3547b6f3bab693
/mode/structs.cpp
e6402f3176161b19451cf1d8a9e3e8f4c337e421
[]
no_license
JarrettBillingsley/DecompilingSonic1
9d3cca3b68c0af48675a41b2a95d6d18301980f9
3238a55ac642cf8f8b0e26b61727c295290173af
refs/heads/master
2020-03-29T09:57:05.815554
2015-11-11T22:49:14
2015-11-11T22:49:14
42,833,717
6
3
null
2020-02-14T17:26:34
2015-09-20T23:29:45
C++
UTF-8
C++
false
false
204
cpp
struct LevSel_Ptr { int zone; int act; }; struct SS_Animation { ubyte id; ubyte _unused; ubyte timer; ubyte frame; uint* tile; }; struct SSTileInfo { ubyte* map; ushort frame; ushort vram; };
[ "jarrett.billingsley@gmail.com" ]
jarrett.billingsley@gmail.com