text
stringlengths
8
6.88M
#pragma once #include <vector> #include "data.hpp" #include "walltype.hpp" #include "collisionmap.hpp" struct LandscapeCollision { int32_t objectId; WallType wallType; glm::ivec2 collisionPoint; glm::vec2 relativeCollisionPoint; }; std::vector<LandscapeCollision> checkLandscapeCollisions(const std::ve...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <gmock/gmock.h> #include <gtest/gtest.h> #include <quic/QuicConstants.h> #include <quic/api/test/MockQuicSocket.h> #inc...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_ButtonEntry_Value_Property.h> #include <_root.ButtonEntry.h> #include <Uno.Bool.h> #include <Uno.UX.IPropertyListener.h> #include <Uno.U...
#include "BaseProcessor.h" #include "BaseController.h" #include "helpers.h" #include "pluginterfaces/vst/ivstparameterchanges.h" #include "pluginterfaces/base/ibstream.h" namespace Steinberg { namespace Vst { namespace residler { //----------------------------------------------------------------------------- BaseProc...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef WEBSERVERSTATEVIEW_H #define WEBSERVERSTATEVIEW_H #ifdef...
// // Created by zhou.lu on 2021/9/1. // #ifndef XPHONEPLAYER_XLOG_H #define XPHONEPLAYER_XLOG_H class XLog { }; #ifdef ANDROID #include <android/log.h> #define XLOGD(...) __android_log_print(ANDROID_LOG_DEBUG,"XPhonePlay", __VA_ARGS__) #define XLOGI(...) __android_log_print(ANDROID_LOG_INFO,"XPhonePlay", __VA_...
// Created on: 1992-09-28 // Created by: Remi GILET // Copyright (c) 1992-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Les...
#ifndef MAIN_HPP_INCLUDED #define MAIN_HPP_INCLUDED #include <SFML/Graphics.hpp> #include <SFML/Window/Event.hpp> #include <iostream> #include <string> #include <cstdlib> #endif // MAIN_HPP_INCLUDED
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> using namespace std; typedef long long ll; #define INF 10e17 // 4倍しても(4回足しても)long longを溢れない #define rep(i,n) f...
//Program Name: Birthday Challenge #include <iostream> #include <string> using std::cin; using std::cout; using std::endl; int main() { string name; cout << "Name: "; cin >> name; int birthyear = 2000; int age= 2018-birthyear; cout << "Hello my name is " << name << "and I am " << age << endl; }
/****************************************************************************************** * Chili DirectX Framework Version 16.07.20 * * Game.h * * Copyright 2016 PlanetChili.net <http://www.planetchili.net> * * * * This file is part of The Chili ...
// Created on: 1993-03-10 // Created by: JCV // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser Gen...
#pragma once #include <Ren/Texture.h> #include "BaseElement.h" namespace Gui { class Image : public BaseElement { protected: Ren::Texture2DRef tex_; Vec2f uvs_[2]; public: Image(const Ren::Texture2DRef &tex, const Vec2f uvs[2], const Vec2f &pos, const Vec2f &size, const...
#ifndef NETWORK_BASIC_H #define NETWORK_BASIC_H #include <QMainWindow> QT_BEGIN_NAMESPACE namespace Ui { class network_basic; } QT_END_NAMESPACE class network_basic : public QMainWindow { Q_OBJECT public: network_basic(QWidget *parent = nullptr); ~network_basic(); private: Ui::net...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including wit...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; // Author: Tatparya Shankar #define MAX 100 class Node { public: int id; int parent; int numChildren; vector<int> children; int numVertices; Node(); void init( int, int ); void addChil...
//#include "../src/GerstnerWaveModel.h" #include <cassert> #include <iostream> int main(){ std::cout << "Coucou" << std::endl;; }
#include "mapwidget.h" MapWidget::MapWidget(QWidget *parent) : QWidget(parent) { } void MapWidget::mousePressEvent(QMouseEvent *e) { const QPoint p = e->pos(); emit EmitCoordinates(p.x(),p.y()); } void MapWidget::paintEvent(QPaintEvent *event) { Q_UNUSED(event) QString filename = "/home/bao/Pictures/...
#include <iberbar/Base/Lua/LuaCModuleClass.h> void iberbar::CLuaCModuleClass::onRegister( lua_State* pLuaState, int tb ) { if ( tb < 0 ) { } else { } PTR_CLuaCppClass pLuaCppCls; pLuaCppCls.attach( new CLuaCppClass() ); const Reg* cls = this->classes; while ( cls->clsname ) { pLuaCppCls->declareStar...
#include<bits/stdc++.h> #define rep(i,n) for (ll i =0; i <(n); i++) using namespace std; using ll = long long; using P = pair<int,int>; int main(){ double A, B; cin >> A >> B; for(int i= 1; i <= 1009; i++){ double x = i * 0.08; double y = i * 0.1; if( (int)x == A && (int)y == B ){ ...
// Created on: 2001-07-09 // Created by: Julia DOROVSKIKH // Copyright (c) 2001-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/NavBar.g.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.IResize.h> #include <Fuse.Binding.h> #include <Fuse.Controls.Panel.h> #include <Fuse.Drawing.ISurfaceDrawable.h> #include <Fus...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef OP_PLUGININSTALLDIALOG_H #define OP_PLUGININSTALL...
#include<iostream> using namespace std; class Person { string name,birthday; public: int id, age; public: Person(){}; Person(string name,string birthday, int age) { this->name=name; this->birthday=birthday; this->age=age; } void viewPerson() { ...
#include "ControllerConnect.h" #include "catch.hpp" #include <vector> static struct sockaddr_in server_addr; #define bufferSize 4096 static HANDLE hMutex; // TODO: 不太确定互斥锁的使用会不会出问题 // 发送消息的各个线程函数只是读取,因此不需要使用互斥锁,而接收消息的线程函数因为需要将新数据写入 // 链表结构,因此需要用一把锁来保持数据区域,而这把锁应该为所有接收消息的线程所共享 unsigned int _stdcall sendRealMessage(void ...
#include "util.h" #include <QByteArray> #include <QDataStream> #include <iostream> QByteArray Util::generateMd5(QByteArray block) { QCryptographicHash* hash; QByteArray result = hash->hash(block,QCryptographicHash::Md5); return result; } void Util::logMessage(QString msg) { std::cout << msg.toStdString() << s...
#ifndef GRAFICAR_H #define GRAFICAR_H #include <map> #include <QPainter> #include <QGraphicsItem> #include <QGraphicsScene> #include "planeta.h" #include <string.h> #include <string> #include <fstream> class Graficar: public QGraphicsItem { public: Graficar(float x, float y, float vx, float vy, float m, float r);...
#ifndef Matrix_h #define Matrix_h #include <iostream> #include <iomanip> #include <vector> using namespace std; template<typename Type> class Matrix //basic data structure that I use in the code { private: int rows; int columns; vector< vector<Type> > myMatrix; public: vo...
#include <string> #include <cmath> #include <fstream> #include <iostream> #include <sstream> #include <list> #include <algorithm> #include <set> #include <map> #include <stack> #include <queue> #include <numeric> #include <bitset> #include <deque> //#include <random> #include <string.h> #include <stdlib.h> #include <ve...
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ /*-----Video-----*/ camWidth=320; camHeight=240; //video cam input //we can now get back a list of devices. vector<ofVideoDevice> devices = vidGrabber.listDevices(); ...
// stdafx.h : 자주 사용하지만 자주 변경되지는 않는 // 표준 시스템 포함 파일 또는 프로젝트 관련 포함 파일이 // 들어 있는 포함 파일입니다. // #pragma once #include "targetver.h" #include <stdio.h> #include <stdlib.h> #include <process.h> #include <winsock2.h> #include <windows.h> #include <map> #include <iostream> #include <assert.h> #include <MSWSock.h> #include <t...
#pragma once #include "replxx.hxx" namespace sim::client { class CLI { public: bool Setup(); /// Returns only if exit was requested void RunLoop(); void SetProcessCallback(std::function<void(const std::string&)> cb) { process_callback = std::move(cb); } private: void BindKeys...
void topView(struct Node *root) { //Your code here if(root == NULL) return; map<int, vector<int>> mp; queue<pair<Node*, int>> q; q.push({root, 0}); while(!q.empty()){ int count = q.size(); for(int i = 0;i<count;i++){ auto temp = q.fro...
/* * Copyright 2019 LogMeIn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
// Created on: 1995-12-01 // Created by: EXPRESS->CDL V0.2 Translator // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the te...
int cnt = 0; void setup() { //통신속도를 9600으로 설정 후 시리얼 통신을 준비한다. Serial.begin(9600); } void loop() { char buf[255]; //buf에 cnt값을 저장한다. sprintf(buf, "%d", cnt); //buf에 있는 (cnt)값을 Serial 통신에 출력한다. Serial.println(buf); //1초에 한번씩 cnt값을 증가시킨다. cnt++; delay(1000); }
#include"Solutions.h" #include<iostream> using namespace std; int main() { Solutions s1; return 0; }
#include <iostream> #include <string> using namespace std; const string fore = "[:", back = "]:"; int main() { string S; cin >> S; string T; int idx = 0; for (int i = 0; i < S.length(); ++i) { if (idx == 2) { T.push_back(S[i]); continue; } if (S[i]...
#pragma once #include "config/utils.hpp" #include "config/common_ptts.hpp" #include <string> using namespace std; namespace nora { template <typename T> string random_name(uint32_t start_name_pool, const T& exclude_names) { string ret; const auto& first = PTTS_GET(na...
#include "Personagem.h" Personagem::Personagem() { C = false; B = false; D = false; E = false; direcao = 1; img = NULL; buffer = NULL; } Personagem::~Personagem() { buffer = NULL; destroy_bitmap(img); // Destrói a imagem; } /* Sets */ void Personagem::seti...
#include <cstdio> int main() { float maxodds[3]; float odds,max = -1e8; int max_index; const char *result_names = "WTL"; for (int i = 0; i < 3; i++) { max_index=0; max=-1e8; for (int j = 0; j < 3; j++) { scanf("%f",&odds); if(odds>max){ ...
#ifndef TRACE_HPP_GUARD #define TRACE_HPP_GUARD #include <iostream> #include <string> class Trace { public: Trace(std::string const& msg, std::ostream& os = std::cout); ~Trace(void ); private: std::string msg_; std::ostream& os_; }; #define TRAC...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
//Phoenix_RK /* https://leetcode.com/problems/fibonacci-number/ The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1 F(N) = F(N - 1) + F(N - 2), for N > 1. Given ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2000-2011 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * Yngve Pettersen */ #include "core/pch.h" #include "modules/pr...
#include <iostream> class illegalParameterValue { private: std::string str; public: illegalParameterValue(std::string thestr) : str(thestr) {} illegalParameterValue(char* thestr) {str = thestr;} void outputMessage() {std::cout << str << std::endl;} }; class illegalIndex { private: std::string str; publi...
#include <bangtal> #include <string> #include <cstdio> #include <ctime> using namespace bangtal; using namespace std; class Door; typedef shared_ptr<Door> DoorPtr; class LockedDoor; typedef shared_ptr<LockedDoor> LockedDoorPtr; class Flowerpot; typedef shared_ptr<Flowerpot> FlowerpotPtr; class Switch; typedef shar...
#include "stdafx.h" #include "Quiz.h" namespace qp { using namespace std; CQuiz::CQuiz(std::string title) :m_title(move(title)) { } CQuiz::~CQuiz(void) { } std::string const& CQuiz::GetTitle()const { return m_title; } const CQuestions & CQuiz::GetQuestions() const { return m_questions; ...
#include <stdio.h> #include<string.h> using namespace std; bool g[510][510]; int mark[510]; int p[510]; int n,k,turn; int ans; bool dfs(int src) { for(int i=1;i<=n;++i) if (g[src][i]&&mark[i]!=turn) { mark[i]=turn; if (p[i]==-1||dfs(p[i])) { p[i]=src; return true; ...
/* #include "linked_list.h" int main() { List lst; //Node 1 Node *node_1 = createNode(12); //Node 2 Node *node_2 = createNode(23); //Node 3 Node *node_3 = createNode(34); //Tao list initList(lst); node_1->pNext = node_2; node_2->pNext = node_3; node_3->pNext = NULL; ...
#include <stdexcept> #include <boost/thread.hpp> #include <boost/asio.hpp> #include <LocalDB.hpp> #include "Client.hpp" #include "ModuleCommunication.hpp" #include "ModuleManager.hpp" #include "WinTools.hpp" namespace pt = boost::property_tree; int main(int argc, char const *argv[]) { boost::asio::io_service ioSer...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/CollapsibleEntry.g.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.IResize.h> #include <Fuse.Binding.h> #include <Fuse.Controls.StackPanel.h> #include <Fuse.Drawing.ISurfaceDrawable.h...
#include <bits/stdc++.h> template <typename T> vector<T> calc_portion_sum(vector<T> vec) { vector<T> res; for (long long i = 0; i < vec.size(); ++i) { long long sum = 0; for (long long j = i; j < vec.size(); ++j) { sum += vec[j]; res.push_back(sum); } } sort(res.begin(), res.end()); r...
/*------------------------------------------------------------------------------*/ /* Developed By: Sri Sagar Abhishek Yeluri */ /* Version : 1.0 */ /* Super Simple File Indexer ...
// 快速排序.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> using namespace std; #include<vector> #include<random> #include<algorithm> void insertsort(vector<int>& a, int len) { int temp,i,j; for ( i = 0; i < len; i++) { temp = a[i]; for ( j = i; j > 0; j--) { if (temp < a[j - 1]) { a[j] = a[j -...
#include "dds_uuid.h" #include "rotate_request_publisher.h" CRotateRequestPublisher::CRotateRequestPublisher() { } CRotateRequestPublisher::~CRotateRequestPublisher() { DDS_String_free(m_pDataInstance->id); } bool CRotateRequestPublisher::Initialize() { CDdsUuid uuid; uuid.GenerateUuid(); m_pDataIns...
concurrent.o: source/concurrent.c concurrent_build_config.h \ include/concurrent/concurrent.h source/concurrent_arch.h
// // MismatchWindow.cpp // // Created by Nissim Hadar on 9 Nov 2017. // Copyright 2013 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "MismatchWindow.h" #include <QtCore/QFileInfo> M...
#include <iostream> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> #include "jacobiMethod.h" using namespace std; int main(int argc, char** argv) { /* Use jacobiMethod to find the lowest three states for the single-electron case. Write values to stdout */ if (argc < 3) { co...
/* * 题目:264. 丑数 II * 链接:https://leetcode-cn.com/problems/ugly-number-ii/ * 知识点:动态规划(三指针)、小根堆 */ class Solution { public: // 时间复杂度:O(nlogn) int nthUglyNumber(int n) { vector<int> nums{2, 3, 5}; priority_queue<long, vector<long>, greater<long>> pq; unordered_set<long> vis; pq.p...
#include "wclientlist.h" WClientList::WClientList(): WEvent(WEvent::tWClientList) { } QDataStream& WClientList::serialize(QDataStream & ds) const { WEvent::serialize(ds) << modified << removed; return ds; } QDataStream& WClientList::deserialize(QDataStream & ds) { WEvent::deserialize(ds) >> modified ...
#include<bits/stdc++.h> #define ll long long int using namespace std; struct tree{ int data; struct tree *lc; struct tree *rc; int flag = 0; //struct tree *p; }; void visit(struct tree *node){ cout<<node->data<<" "; }; //recursive void r_inorder(struct tree *node){ if(node!=NULL){ r_inorder(node->lc); ...
/* * Copyright 2016 Freeman Zhang <zhanggyb@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
#include <iostream> #include <vector> #include <string> #include <fstream> #include <sstream> using namespace std; #include "Tournament.h" int main(int argc, char *argv[]) { srand(time(NULL)); string infile; string logfile; if (argc > 0) { istringstream buf(argv[1]); buf >> infile; } if (argc > 1) { ist...
// $Id$ // // Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <b...
#pragma once class AABBNode { public: AABBNode* parent; AABBNode* left; AABBNode* right; vec3f min; vec3f max; public: AABBNode() { parent = NULL; left = NULL; right = NULL; } AABBNode(AABBNode* parent, vec3f min, vec3f max) { this->parent = parent; this->min = min; this->max = max; left = NUL...
#include <cstdio> #include <iostream> #include <vector> #include <string> #include <stack> #include <unordered_map> #include <unordered_set> #include <queue> #include <algorithm> #define INT_MAX 0x7fffffff #define INT_MIN 0x80000000 using namespace std; int longestValidParentheses(string s){ if(s.length()==0) retur...
/*! \file */ //Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include <draw/Icon.hpp> #include "sgfx.hpp" #include "draw/Icon.hpp" #include "draw/Panel.hpp" using namespace draw; Panel::Panel(){ m_radius = 250; m_pen = Pen(1,1,true); } void Panel::draw_to_scale(const DrawingScaledAttr & attr){ sg_icon_p...
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define si(i) scanf("%lld",&i); #define pi(i) printf("%lld",i); #define rep(i,st,end) for(i=st;i<end;i++) #define MAXN 100005 ll parent[MAXN],rank[MAXN]; // rank is the height of tree void create_set(ll x){ parent[x] = x; r...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; int k,f[15][105][105]; int dfs(int d,int m1,int m2) { if (f[d][m1][m2] != -1) ...
#include <iostream> #include <queue> #include <deque> #include <algorithm> #include <string> #include <vector> #include <stack> #include <set> #include <map> #include <math.h> #include <string.h> #include <bitset> #include <cmath> using namespace std; string compare[2] = {"WBWBWBWB", "BWBWBWBW"};...
#include <iostream> class gong{ private: double millimeter; double centimeter; double decimeter; double meter; public: gong(double n,char a){ if(a=='h')millimeter=n,meter=millimeter/1000; else if(a=='l')centimeter=n,meter=centimeter/100; else if(a=='f')decimeter=n,meter=decimeter/10; else...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; char st[110]; int f[110][110]; int main() { while (gets(st) && st[0] != 'e') ...
#include <iostream> #include "ImageWindow.hpp" using namespace uipf; using namespace std; void ImageWindow::closeEvent(QCloseEvent *event) { // resume a paused chain when an image window gets closed mm_.resumeChain(); } void ImageWindow::keyReleaseEvent(QKeyEvent *) { // resume a paused chain on key press mm_....
// // Entity.hpp // closedFrameworks // // Created by William Meaton on 12/05/2016. // Copyright © 2016 WillMeaton.uk. All rights reserved. // #ifndef Entity_hpp #define Entity_hpp #include <stdio.h> #include "Math.h" #include "Transform.hpp" #endif /* Entity_hpp */ class Entity{ //a list of components ...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Начало занятий по строкам. Примеры C-style с продолжением на String // V 1.0 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include<iostream> #include<string> using namespace std; int main() { ...
#include "Skeleton2D.h" #include "Lattice2DFactory.h" #include<CGAL/Exact_predicates_inexact_constructions_kernel.h> #include<CGAL/Polygon_2.h> #include<CGAL/create_straight_skeleton_2.h> #include<CGAL/create_straight_skeleton_from_polygon_with_holes_2.h> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;...
#ifndef __JMM_STL_RB_TREE #define __JMM_STL_RB_TREE #include <stddef.h> #include "jmm_stl_iterator.h" #include "jmm_stl_alloc.h" #include "jmm_stl_allocator.h" #include "jmm_stl_construct.h" #include "jmm_stl_uninitialized.h" #include "jmm_stl_pair.h" namespace JMM_STL { typedef bool __rb_tree_color_type; const __...
#include <fcntl.h> #include <errno.h> #include "msg.hh" #include "str.hh" #include <unistd.h> namespace msg { void set_non_blocking(int fd) { int result; result = fcntl(fd, F_GETFL, 0); if (result >= 0) result = fcntl(fd, F_SETFL, result | O_NONBLOCK); if (result < 0) { perror("f...
/** * Description: find k such that root^k%mod=x * mod is prime, root is primitive * meet in the middle: O(sqrt(mod)) * Source: Own * Verification: PA 2006 - Professor Laugh's Numbers */ using namespace modOp; struct DiscreteLog { int mod, root, block; vi invy; unordered_map<int,int> u; int query(int x) ...
#pragma once #include "Patch.h" #include "../render/GLWrappers.h" #include "../render/Program.h" #include "../render/ScreenRectangle.h" #include "../render/Transforms.h" #include "../render/CubeMap.h" #include "Settings.h" class Animator; class Ocean { public: void init(const Settings& settings); void upda...
// KickDown.cpp : 定义控制台应用程序的入口点。 //有两个长度分别为n1, n2(n1, n2 <= 100)且每列高度只为h或者2h的长条齿轮。 //需要将它们对扣放入一个高度为3h的容器中,问能够容纳他们的最短容器长度 //读入master和driven两个齿轮各位置上的高度,然后先用driven从master的第i个位置开始试driven能否和master从0开始的位置对应匹配其高度不超过3h,如果一直到任一齿轮结束都能匹配则得到容器的最短长度; //然后再用同样的方法对master用driven去匹配(对应匹配的方向不一样)找到这种情况下的最短容器长度;最后和上面求得的最短容器长度再取最小值即为答案 ...
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> #include <ss...
#include <fstream> #include "pyramid_synthetic_exposure_fusion_opt.h" int main() { ofstream fout("regression_result_pyramid_synthetic_exposure_fusion_opt.txt"); HWStream<hw_uint<32> > in_update_0_read; HWStream<hw_uint<32> > pyramid_synthetic_exposure_fusion_update_0_write; // Loading input data // cmap ...
#include "include/Widget/fluidpropertywidget.h" #include "ui_fluidpropertywidget.h" //----------------------------------------------------------------------------------------------------------- FluidPropertyWidget::FluidPropertyWidget(QWidget *parent, FluidProperty _property) : SphParticlePropertyWidget(parent, _...
#include "log.hpp" #include <stdlib.h> std::string MMLog::red = "\x1b[31m"; std::string MMLog::green = "\x1b[32m"; std::string MMLog:: yellow = "\x1b[33m"; std::string MMLog:: blue = "\x1b[34m"; std::string MMLog:: magenta = "\x1b[35m"; std::string MMLog:: cyan = "\x1b[36m"; std::string MMLog:: bold = "\x1b[1m"; std::...
#include "../src/Emitter.h" #define BOOST_TEST_MODULE basic #include <boost/test/included/unit_test.hpp> class em : public de::Emitter<> { public: void emit_fn() { emit("signal"); } }; BOOST_AUTO_TEST_CASE( on_lambda ) { em e; bool called = false; auto fn = [&called](void) { called = true; }; e.on("signal"...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) Triad National Security, LLC. This file is part of the // Tusas code (LA-CC-17-001) and is subject to the revised BSD license terms // in the LICENSE file found in the top-level directory of this distribution. // ////...
// // // This is: // 1. __stdcall windows dll for generic porpouses // 2. a __cdecl x64 Python module can be imported as `import incbars` // means you need rename from .dll to .pyd // // // Here just the python module code using pybind11 // // // The DLL will only build if DEBUG preprocessor is not set. // pybind11 o...
#pragma once #include <memory> #include "BattleCommDef.h" #include "BattleInfo.h" class BattleBase { public: BattleBase(); virtual ~BattleBase(); public: virtual void ReuseInit(); virtual bool BattleInit(BATTLE_ID_TYPE id, const BattleInfo& bi); virtual bool BattleStart(); virtual bool BattleRun(); virtual bool...
#pragma once #include "Render/DrawBasic/Shader.h" #include "Utils/Hashing.h" namespace Rocket { class OpenGLShader : implements Shader { public: OpenGLShader(const String& name) : m_NameId(AssetHashTable::HashString(name)) {} OpenGLShader(const OpenGLShader& rhs) = default; OpenGLSh...
// FunExt.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <cfloat> int main() { double maxY = DBL_MIN; int maxX; for (int x = 10; x <= 20; x++) { double y = 5 - 3 * x + 2 * (x - 5) * (x - 5) - (x - 10) * (x - 10) * (x - 10)...
// // C++ Interface: mess // // Description: // 很杂乱的一些数据基本结构. // // Author: Jally <jallyx@163.com>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef UDT_H #define UDT_H #include "sys.h" #include "net.h" #include "deplib.h" #include "ipmsg.h" /***************偶是可爱的分割线(枚举变量)****...
/* * MyLedMatrix.h * * Created: 12.06.2015 14:57:01 * Author: Tobias Nuss */ #include <stdint.h> #include "Adafruit_NeoPixel.h" #ifndef __MYLEDMATRIX_H__ #define __MYLEDMATRIX_H__ // RED - GREEN - BLUE #define RED Adafruit_NeoPixel::Color(255, 0, 0) #define GREEN Adafruit_NeoPixel::Color(0, 255, 0) #define BLUE...
#include <cstdint> #include <thread> #include <iostream> #include <sstream> #include "VGJSHeaders.h" #include "tests.h" using namespace vgjs; int main(int argc, char* argv[]) { int num = argc > 1 ? std::stoi(argv[1]) : std::thread::hardware_concurrency(); // Test minimal JobSystem to compare with VGJS //mjs::te...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #include "core/pch.h" #include "modules/documentedit/OpDocumentEd...
/* Multilistas cabeza Cristian Eduardo Rios Guarin - 20141020058 Diego Alejandro Hernandez - 20141020271 Ciencias 1 */ #include <cstdlib> #include <iostream> #include <time.h> #include "Multilista.h" using namespace std; int main(int argc, char *argv[]) { Multilista M; M.insertar("Cristian","IE","Futbol",20)...
#include "ApplyBankerProc.h" #include "Logger.h" #include "HallManager.h" #include "Room.h" #include "ErrorMsg.h" #include "GameCmd.h" #include "BaseClientHandler.h" #include "json/json.h" #include "ProcessManager.h" #include "CoinConf.h" ApplyBankerProc::ApplyBankerProc() { this->name = "ApplyBankerProc"; } ApplyBa...
#include "Object.hpp" Object::Object(Transform transform, Color color, Material material) { this->transform = transform; this->color = color; this->material = material; drawTexture = true; } void Object::draw(bool skipColor) { glPushMatrix(); // Translate object to its current position glT...
#include "No_Assignment_Possible.h"