text
stringlengths
8
6.88M
/****************************************************************************** * * * Copyright 2018 Jan Henrik Weinstock * * * ...
#include <FreeImage.h> #include <cstdio> #include <cstdlib> #include "treeface/misc/StringCast.h" using namespace std; using namespace treecore; using namespace treeface; int main(int argc, char** argv) { if (argc != 2) { printf("usage: ./freeimage_format image_file\n"); exit(1); } ...
#include "library.h" using namespace std; int mk_runs(char *in_filename, char *out_filename, long run_length, Schema *schema) { // Streams for reading in data and writing sorted runs ifstream in_file(in_filename); ofstream out_file(out_filename); // Error if unable to open streams if (!in_file.is_open()) { ...
/* A child runs up a staircase with 'n' steps and can hop either 1 step, 2 steps or 3 steps at a time. Implement a method to count and return all possible ways in which the child can run-up to the stairs. Input format : The first and the only line of input contains an integer value, 'n', denoting the total number of s...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
//#include "Snake.h" ///**********************************************JudgeRank***************************************/ //void JudgeRank(Snake snake) //{ // Rank *head,*p,*q,*rank; // FILE *fp; // long temp; // head = p; // p->next = q; // rank->score = snake.length - 3; // fopen_s(&fp, "Rank.dat", "ab+"); /...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) 1995-2006 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef _SMTP_H_ #define _SMTP_H_ #include "adjunct/m2/src/bac...
#include <Arduino_FreeRTOS.h> // define two tasks for Blink1 & Blink2 void TaskBlink1( void *pvParameters ); void TaskBlink2( void *pvParameters ); // the setup function runs once when you press reset or power the board void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600);...
#include <Arduino.h> #include <Wire.h> #include "SpeedSensor.h" //#define DEBUG_ARDUINO_SPEED_SENS char c[5]; float rotSpeedLeft; float rotSpeedRight; unsigned long lastInterrupt; /** * Union which stores the Bytes of the Float * Is for sending floats using I2C. */ union floatToBytes { char buffer[4]; ...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include "hal/Pio.hpp" using namespace hal; Pio::Pio(port_t port) : Periph(CORE_PERIPH_PIO, port){} int Pio::get_attr(pio_attr_t & attr){ return ioctl(I_PIO_GETATTR, &attr); } int Pio::set_attr(const pio_attr_t & attr){ return ioctl(I_PIO_SETATTR, &attr);...
// // Created by 송지원 on 2020/05/20. // #include <cstdio> using namespace std; int main() { int id_1, id_2; scanf("%d-%d", &id_1, &id_2); printf("%06d%07d", id_1, id_2); return 0; }
class Ural_INS; class Ural_INS_DZE: Ural_INS { scope = 2; crew = ""; displayName = "$STR_VEH_NAME_URAL_INS"; typicalCargo[] = {}; class TransportMagazines {}; class TransportWeapons {}; vehicleClass = "DayZ Epoch Vehicles"; supplyRadius = 2.6; class Upgrades { ItemTruckORP[] = {"Ural_INS_DZE1",{"ItemToolbox...
#include <iostream> #include <cmath> #include <vector> using namespace std; int matrix[100][100]; int n, l; int ret; bool checkLine(vector<int> line) { bool slideOn[100] = { false, }; int before = line[0]; for (int i = 1; i < line.size(); i++) { /* 진행하다 before과 차이나면 ...
#include <iostream> #include <vector> using namespace std; int Parent(int i){ return (i-1)>>1; // left bit shift : i<<1 ~~ i/2 } int Right(int i){ return (i<<1)+2; // right bit shift : i>>1 ~~ i*2 // return (2*(i) + 2); } int Left(int i){ return (i<<1)+1; // return (2*(i)+1); } void swap(int ...
#pragma once #include "GameObject.hpp" #include "CollisionData.hpp" #include <memory> namespace game { //前方宣言 class CollisionCircle; struct BulletInfo { Vec2 pos; Vec2 addPos; double speed; CollisionID id; }; class Bullet :public GameObject { //あたり判定オブジェクト std::unique_ptr<CollisionCircle>m_collisi...
#ifndef CAVEPOLIGONIZER_H #define CAVEPOLIGONIZER_H #include "OgreFramework.h" #include "CaveRegion.h" #include "MarchingCubes.h" #include "CubeFaceUtils.h" class CavePoligonizer { private: MarchingCubes mMarchingCubesAlgorithm; public: CavePoligonizer() : mMarchingCubesAlgorithm(MarchingCubes()) { } Og...
// $Id$ // // Copyright (C) 2001-2014 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 <cst...
#include "treeface/graphics/guts/LineStroker.h" #include "treeface/graphics/guts/Utils.h" #include "treeface/math/Constants.h" #include "treeface/math/Mat2.h" using namespace treecore; namespace treeface { void LineStroker::cap_begin( const Vec2f& skeleton, const Vec2f& direction ) { treecore_assert( !stroke_d...
#pragma once #ifndef __STF_TIMER__ #define __STF_TIMER__ #include <map> #if defined(__LINUX__) #include <pthread.h> #include <sys/time.h> #elif defined(__WINDOWS__) #include <windows.h> #include <mutex> #include <time.h> #endif struct TTimerProcess { #if defined(__LINUX__) virtual void OnTimer(int n...
#pragma once #include <QObject> class CNetClt; class CMessageEventMediator; class CHomePageWidget; class CNetClass : public QObject { Q_OBJECT public: CNetClass(QObject *parent = 0); virtual ~CNetClass(void); static CNetClass* Instance(); CNetClt *m_pNetClt; CMessageEventMediator *m_pMessageEve...
class Solution { public: int calculateMinimumHP(vector<vector<int>>& dungeon) { int n = dungeon.size(); if(!n) return 0; int m = dungeon[0].size(); vector< vector<int> > DP(2, vector<int>(m, 0)); // cur row, prev row int cur = 1, prev = 0; DP[prev][m-1] = 1; for(int...
// $Id$ // // (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net // Distributed under the BSD License // (See accompanying file LICENSE.txt or copy at // http://www.opensource.org/licenses/bsd-license.php) // #include <liblas/liblas.hpp> #include <tut/tut.hpp> #include <bitset> #include <stdexcept> #include <vector...
#pragma once #ifndef __MAXHEAP_H__ #define __MAXHEAP_H__ #include <iostream> //最大堆 //起始索引下标为0 template <class T> class MaxHeap { public: MaxHeap(); MaxHeap(int capacity); ~MaxHeap(); int GetIndex(T data); int Remove(T data); int Insert(T data); void Print(); private: T* mHeap;//数据 int mCapacity;//总容量 i...
#include "../Objects.h" Primitive::Primitive(gfx::Canvas* canvasToSet, int thicknessToSet, Color borderColorToSet) { _canvas = canvasToSet; _thickness = thicknessToSet; _borderColor = borderColorToSet; _momentum = Point(); } void Primitive::move(float dt, float x, float y, unsigned long lon...
#include "stdafx.h" #include <fstream> #include <streambuf> #include "tinfl.c" #include "ziparchive.h" using namespace doo::zip; // the expected signatures for different parts of a ZIP file #define ZipArchive_ENTRY_LOCAL_HEADER_SIGNATURE 0x04034b50 #define ZipArchive_CENTRAL_DIRECTORY_RECORD_SIGNATURE 0x02014b50 ...
ll mul(ll a, ll b, ll m) { return (a*b-ll(a*(long double)b/m+0.5)*m+m)%m; } ll expo(ll a, ll b, ll m) { if (!b) return 1; ll ans = expo(mul(a, a, m), b/2, m); return b%2 ? mul(a, ans, m) : ans; } bool prime(ll n) { if (n < 2) return 0; if (n <= 3) return 1; if (n % 2 == 0) return 0; l...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2003 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/img/image.h" #include ...
#include "GetPlayInfo.h" #include "GameCmd.h" #include "Room.h" #include "Logger.h" #include "ProcessManager.h" GetPlayInfo::GetPlayInfo() { this->name = "GetPlayInfo"; } GetPlayInfo::~GetPlayInfo() { } int GetPlayInfo::doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt ) { short cmd ...
#include<bits/stdc++.h> using namespace std; #define maxn 100005 struct edge { int ind; int u; int v; int cost; int ans; }; bool comp(const edge& e1,const edge& e2) { return e1.cost<e2.cost; } bool comp1(const edge& e1,const edge& e2) { return e1.ind<e2.ind; } struct ...
#include <iostream> #include "number.hpp" Number::Number(int num) { std::cout << "Number constructor works!" << std::endl; this->number = num; } std::string toString(int num) { return to_string(num); }
#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; const int inf = 1e8 + 7; int a[100],f[100][100]; int main() { int d,n; w...
#include<iostream> #include<vector> #include<algorithm> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(NULL) {} }; void Init_ListNode(ListNode* head, vector<int> vec) { if (vec.size() == 0) { head = NULL; return; } ListNode* p; p = head; p->val = vec[0]; for...
#include <iostream> #include<random> #include <random> #include <iterator> #include <vector> #include<algorithm> #include <ctime> using namespace std; //Cpp Standard: C++14,之后的版本random_shuffle被取消了 int main() { srand(time(nullptr)); // 以当前时间为随机生成器的种子 //default_random_engine rd; vector<int> A = {1, 2, 3, 4, ...
#pragma once class PvPModeSelect; class SuperMonsterSelect; class PMMonster; class AISelect; class MonsterSelect; class GameCursor; class AIMSelect :public GameObject { public: ~AIMSelect(); bool Start() override; void Update() override; void init(PMMonster* pmm,int ai,int mon) { m_pmm = pmm; m_ainum = ai; ...
/* * Copyright 2017, Victor van der Veen * * 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 a...
#include <iostream> #include <vector> #include <string> namespace my { template<typename T> class link { protected: link * suc; }; template<typename T> class list { public: void sort() {} }; class glob {}; void f(list<glob> &lb, list<std::string> &ls) { ls.sort(); // list<string>::sort is instanti...
// // Created by Jason Fujii on 10/13/20. // #include "mapVector.h" #include <iostream> using namespace std; #include <vector> #include <map> #include <fstream> #include "Entry.h" mapVector::mapVector() { std::map<string, vector<Entry>> map; } void mapVector::add(Entry &e) { string key = e.getWord(); //i...
#include "precompiled.h" #include "path.h" #include "vfs.h" #include "zippath.h" #include "diskpath.h" namespace vfs { }; vfs::Path::Path(const char* path) : path(strDup(path)) { } vfs::Path::~Path() { delete [] path; } vfs::Path* vfs::Path::createPath(const char* path) { char searchpath[MAX_PATH]; char canonpat...
// cars.cpp - implementation of simple types of cars // ============ TODO2: Complete this file to make it look natural =============== #include "../GrTown_PCH.H" #include "../DrawUtils.H" #include "Utilities/Texture.H" #include "../DrawingState.H" #include "Cars.H" //////////////////////////////////////////////////...
#include <iostream> #include <cctype> #include <map> #include <string> int main(int argc, char const *argv[]) { std::size_t n{0}; std::map<std::string, std::size_t> commits; std::string tmp_str{}; std::cin >> n; for (std::size_t i = 0; i < n; ++i) { std::cin >> tmp_str; ++commit...
#pragma once #include<vector> #include<set> #include<cmath> #include<cstdlib> #include"Solution.hpp" #include"Neighbourhood_generator.hpp" #include"Graph.hpp" #include"Validator.hpp" #include <gcroot.h> #include <memory> #include <string> #include <fstream> namespace MarsColonisation { ref class MainForm; } struct S...
#include "GameOverProc.h" #include "HallHandler.h" #include "Logger.h" #include "Options.h" #include "GameServerConnect.h" #include "PlayerManager.h" #include "RobotRedis.h" #include <string> using namespace std; GameOverProc::GameOverProc() { this->name = "GameOverProc"; } GameOverProc::~GameOverProc() { } int G...
// Created on: 2010-05-11 // Created by: Kirill GAVRILOV // Copyright (c) 2010-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 ...
#ifndef NODEMODEL_H #define NODEMODEL_H #include <QObject> class Node; class NodeModel : public QObject { Q_OBJECT private: public: NodeModel(); virtual ~NodeModel(); virtual void setNode(Node* node) {Q_UNUSED(node);} virtual void updateNode() {} signals: public slots: }; #endif // NODEMODEL...
#pragma once #include "CoreMinimal.h" namespace ECommand { enum Type { Command_None, Command_SpawnItem }; }
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define inf 1073741823 using namespace std; using namespace __gnu_pbds; struct ope{ char t; int k; }; ope o[500000]; int ans[200000],n,m,num=0,tot=0; void readit(){ scanf("%d%d",&n,&m); for (int i=1;i<=...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #include<ctime> using namespace std; int main() { srand(time(NULL)); printf("%d\n",rand()%11)...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2002 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/forms/pi_forms_listeners...
#include <iostream> using namespace std; #include<math.h> #include<string.h> int main() {int c,k,i,f; char a[40],b[40],d[40]; cin>>a>>k; d=strrev(a); f=strlen(d); for(i=k;i>0;i--) { cout<<a[i]; } return 0; }
/* * Copyright (C) 2008 by The Regents of the University of California * Redistribution of this file is permitted under the terms of the GNU * Public License (GPL). * * @author Junghoo "John" Cho <cho AT cs.ucla.edu> * @date 3/24/2008 */ #include "BTreeIndex.h" #include "BTreeNode.h" #include <stdio.h> #includ...
#include <iostream> #include <cstdio> #include <algorithm> #include <string.h> using namespace std; const int maxn = 1005; int main() { int n, ans = 0; int m; char a[maxn][maxn]; cin >> n; for(int i = 0; i < n; i++) { cin >> a[i]; } for(int i = 0; i < n - 1; i++) for(int j = i +1; j < n; j++) { ...
// Copyright (c) 2019, tlblanc <tlblanc1490 at gmail dot com> #ifndef IO_COPY_H_ #define IO_COPY_H_ #include <stddef.h> #include "status/status.hpp" #include "reader.hpp" #include "sink.hpp" #include "source.hpp" #include "writer.hpp" #include "flusher_writer.hpp" /// copy copies content from a Source/Reader to a ...
#include <iostream> #include <algorithm> using namespace std; bool cmp1(int a, int b){ return a >= b; } int main(){ int n, max, min, t; int a[4]; cin >> n; while(1){ for(int i = 0; i < 4; i++) a[i] = 0; for(int i = 0; i < 4; i++){ a[i] = n % 10; n = n / 10; } sort(a, a + 4, cmp1); max = a[0] * ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2008 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Arjan van Leeuwen (arjanl) */ #ifndef SLEEP_MANAGER_H ...
#include <iostream> #include <algorithm> #include <string> int main (){ std::string x; std::string y; std::cin >> x; std::cin >> y; std::reverse(x.begin(), x.end()); std::reverse(y.begin(), y.end()); int x_rev = std::stoi(x); int y_rev = std::stoi(y); ...
#include <stdio.h> #include <iostream> using namespace std; int main() { int a, b, result; // setting int variables a = 5; // setting a value to 'a' variable b = 2; // setting a value to 'b' variable a = a + 1; // updating the value of 'a' with addition line result = a - b; // setting a value to 'result' varia...
#ifndef __SPI_H__ #define __SPI_H__ #include "windows.h" //#include <vector> #include <string> //---- from pythonutil.hから流用 #include "python.h" namespace PythonUtil { bool PyStringToString( const PyObject * pystr, std::string * str ); bool PyStringToWideString( const PyObject * pystr, std::wstring ...
#include "options.h" #include "simulator.h" #include <cstdlib> using namespace std; int main() { Options options; Simulator simulator; simulator.start(); return 0; }
//程序中用到的功能函数定义 #include "usefun.h" #include <iomanip> #include <fstream> #include <string> #include <sstream> std::string & filetostr(std::string file,std::string & str) { std::ifstream fin(file.c_str()); if(!fin.is_open()) { return str; } str=""; std::string temp; while(std::getline(fin,tem...
// Find triplets with sum ;less than given no #include <iostream> using namespace std; int main() { int n,x,i,j,k,c=0; cout<<"Enter n and x "; cin>>n>>x; int a[n]; cout<<"Enter Array "; for(i=0;i<n;i++) cin>>a[i]; for(i=0;i<n-2;i++) { for(j=i+1;j<n-1;j++) ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ /** * @file OpGadgetClass.h * * (todo: short description) * ...
#pragma once #include"BinaryTree.h" void bubble_sort1(int a[],int n); void bubble_sort2(int a[],int n); void quick_sort(int a[], int l, int r); void quick_sort_norecursion(int a[], int l, int r); int fibonacci(int n); int fibonacci_norecursion(int n); int fibonacci_no2(int n); bool merger_sort( int a[], int n )...
#include <cmath> #include <string> #include "trm/subs.h" #include "trm/binary.h" /** * Implements Nauenberg's 1972 analytic approx to degenerate M-R * relation. Given m in solar units comes back with r in solar units. * Not good for low masses, \sa Binary::mr_wd_eggleton(double) for * an alternative. * \param m...
#include <iostream> #include "SplashScreen.h" #include "Game.h" /// <summary> /// @author Peter Lowe /// @version 1.0 /// @date May2016 /// /// </summary> SplashScreen::SplashScreen() { } SplashScreen::~SplashScreen() { }
#pragma once /* * Lanq(Lan Quick) * Solodov A. N. (hotSAN) * 2016 * LqTime... - Typical time functions. (C++ version) */ #include "LqDef.hpp" #include "LqTime.h" LQ_EXTERN_CPP_BEGIN LQ_IMPORTEXPORT LqString LQ_CALL LqTimeDiffSecToStlStr(LqTimeSec t1, LqTimeSec t2); LQ_IMPORTEXPORT LqString LQ_CALL LqTimeDiffMill...
// // nehe29.cpp // NeheGL // // Created by Andong Li on 10/8/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #include "nehe29.h" const char* NEHE29::TITLE = "NEHE29"; GLfloat NEHE29::sleepTime = 0.0f; int NEHE29::frameCounter = 0; int NEHE29::currentTime = 0; int NEHE29::lastTime = 0; char NEHE29::...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Cihat Imamoglu (cihati) */ #include "core/pch.h" #in...
#include "gtest/gtest.h" #include <string> #include <sstream> #include <boost/numeric/ublas/io.hpp> #include "wali/QueueWorklist.hpp" #include "wali/wpds/WPDS.hpp" #include "wali/wfa/WFA.hpp" #include "wali/witness/Witness.hpp" #include "wali/witness/WitnessWrapper.hpp" #include "wali/domains/matrix/Matrix.hpp" #inc...
/* leetcode 15 * * * */ class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> ans; if (nums.empty()) { return ans; } if (nums.size() < 3) { return ans; } sort(nums.begin(), nums.end()); for(i...
#ifndef finleyCore_h #define finleyCore_h class finleyCore{ public:{ finleyCore(); void parseIntFromByte(); } private:{ } }; #endif
#ifndef LATENCYANALYZER_H #define LATENCYANALYZER_H #include "../JuceLibraryCode/JuceHeader.h" class LatencyAnalyzer : public Component, public ButtonListener, public SliderListener, public AudioIODeviceCallback, public Timer { private: TextButton *toggleButton; TextButton *measureLatencyBtn; TextBut...
/* 200830 LG codepro - [19년도_3차] 계산기 my solution 1/10 (통과율) 약 2시간 30분 걸림... sample tc 외에 모두 fail... */ #include <iostream> #include <math.h> using namespace std; int N;//테스트 케이스 수 int B;//진법 char S[110];//첫 번째 정수 char D[110];//두 번째 정수 char res[110][110]; int idxarr[2][4] = {0,}; int minusCnt=...
// ------ Includes ----- #ifndef LINUX #include <windows.h> #endif #include "Game.h" /* ====================================== Init ====================================== */ Game::Game(Board *pBoard, Pieces *pPieces, IO *pIO, int pScreenHeight) { mScreenHeight = pScreenHeight; // Get the pointer to the...
#pragma once #include "UserGateway.h" #include <sstream> #define UsernameIndex 1 #define PassIndex 2 #define PosXIndex 3 #define PosYIndex 4 #define PosZIndex 5 #define IdIndex 6 int64_t UserGateway::generateNextId() { char * sql = "SELECT Id FROM users;"; sqlite3_stmt* stat = connection.createPrepa...
#ifndef OFF_MODEL_H #define OFF_MODEL_H #include <OpenMesh/Core/IO/MeshIO.hh> #include <iostream> #include "types_definitions.h" #include "external/libigl/include/igl/readOFF.h" #include "external/libigl/include/igl/per_vertex_normals.h" namespace mcurv { class OFFModel { public: /** * Prep...
/************************************************************************/ /* 用O(n)的算法,实现对一组无序的字母进行从小到大排序(区分大小写),相同的字母,小写在大写前 */ /************************************************************************/ #include <vector> #include <string> using namespace std; //因为元素的变化范围已知,而且要求时间复杂度为n,所以采用桶排序。 string Sort(const...
#include <iostream> #include <queue> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> path[n]; for (int i = 0; i < m; ++i) { int u, v; cin >> u >> v; --u, --v; path[u].push_back(v); path[v].push_back(u); } priori...
// // Created by glyphack on 7/12/19. // #ifndef CRAWLLALA_PORTAL_H #define CRAWLLALA_PORTAL_H #include <SFML/Graphics.hpp> class Portal { public: sf::RectangleShape part1; sf::RectangleShape part2; private: sf::Vector2f location; sf::RectangleShape food; }; #endif //CRAWLLALA_PORTAL_H
// Copyright 2011 Yandex #ifndef LTR_SCORERS_LINEAR_SCORER_H_ #define LTR_SCORERS_LINEAR_SCORER_H_ #include <string> #include <vector> #include "ltr/scorers/scorer.h" using std::string; using std::vector; namespace ltr { class LinearScorer : public Scorer { public: typedef ltr::utility::shared_ptr<LinearScorer>...
// SetWethDialog.cpp : 实现文件 // #include "stdafx.h" #include "MessAtoB.h" #include "SetWethDialog.h" // CSetWethDialog 对话框 IMPLEMENT_DYNAMIC(CSetWethDialog, CDialog) CSetWethDialog::CSetWethDialog(CWnd* pParent /*=NULL*/) : CDialog(CSetWethDialog::IDD, pParent) , weather12(_T("")) , weather24(_T("...
#include <modules/ModuleDefinition.h> #include <iostream> #include <cstdint> #include <unordered_map> #include <module.h> DEFINE_MODULE("Module3", module_interface, "602E7992-C7A2-11E5-98A1-F78BDB915C80"); extern "C" void run_tests() { run_mpl_tests(); } static std::unordered_map<std::string,void*> services { {"6...
// // Created by gaoxiang on 19-5-2. // #include "myslam/feature.h" namespace myslam { }
// $Id$ // // Copyright (C) 2003-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 <Gr...
#include<iostream> using namespace std; char detect(char character){ if((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z')) { cout<<character<<" is an alphabet"; } else { cout<<character<<" is not an alphabet"; } } int main(){ char character; cin>>character; de...
#include "QuickSort.hh" #include "stdlib.h" static int num_jets = 0; static int niter = 0; void print(Jet* jets[M_JET]) { for (int i = 0; i < num_jets; i++) { if (jets[i] != 0) printf(" %i |",jets[i]->ecal_et); } printf("\n"); } void swap(Jet* jets[M_JET],int i,int j) { if (i == j) return; Jet* t...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <pthread.h> #include <semaphore.h> /* compile with g++ main.cpp -lpthread -o example.out */ #define M 4 #define N 255 #define MBEXTRA (1 << 20) sem_t semaphore; double A[M][N]; void* do_work(void* arg) { long tid; tid = (long)arg; /* lock sema...
#include<iostream> #include<fstream> #include<time.h> #include<cstdlib> using namespace std; #include"BPlusTreeApi.h" BPlusTreeApi :: BPlusTreeApi(string name,int mode) { Bfile = fopen(name.c_str() ,"rb+" ); //打开B+树文件 if(mode == _CREATE && Bfile == NULL) //创建 { Bfile = fopen(name.c_str() ,"wb+" ); ROO...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Arjan van Leeuwen */ #ifndef QUICK_BROWSER_VIEW_H #def...
#include<cstdio> #include<cmath> #include<iostream> using namespace std; int main() { int x, y, r, T; scanf("%d", &T); while(T--){ while(scanf("%d %d %d", &x, &y, &r)==3){ double cir_radius = sqrt((x*x)+(y*y)); printf("%.2lf %.2lf\n", r-cir_radius, r+cir_radius); } ...
#include "grogsettings.h" #include "ui_grogsettings.h" #include "gromacstoolsdefinition.h" #include <QLabel> #include <QLineEdit> #include <QCloseEvent> GrogSettings::GrogSettings(QWidget *parent) : QDialog(parent), ui(new Ui::GrogSettings), _toolsDefinition(GromacsToolsDefinition::GetInstance()), _too...
#include <iostream> int main() { auto func = [](auto const& i) -> int { return i; }; std::cout << func(1) << std::endl; }
#include "../headers/Blockchain.h" Blockchain::Blockchain () { _chain.emplace_back(Block({})); _difficulty = 1; } void Blockchain::addBlock (Block newBlock) { newBlock.previousHash = _GetLastBlock().GetHash(); newBlock.MineBlock(_difficulty); _chain.push_back(newBlock); } Block Blockchain::_GetLa...
#include "core/pch.h" #include "modules/libfreetype/include/freetype/config/opera_ftmodules.h" #if defined(USE_FREETYPE) && defined(FT_INTERNAL_FREETYPE) && defined(FT_USE_PCF_FONTS) extern "C" { #include "pcf.c" } #endif // USE_FREETYPE && FT_INTERNAL_FREETYPE && FT_USE_PCF_FONTS
#pragma warning (disable:4996) #include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <set> #include <ctime> #include <cmath> #include <string> #include <cctype> #include <cs...
// httpserver.c // AUTHOR: Julia Sales // ID: jesales // DESCRIPTION: A simple http server // RESOURCES: piazza, stack overflow, class, man pages, and logic from asgn0 // as well as referenced medium.com <- helped with setting up the socket // it was also similar/same code from section. #include <stdio.h> #include <st...
#include<bits/stdc++.h> using namespace std; main() { int s, n; while(cin>>s>>n) { int i, a, b, dragon[100000], str[100000], j, temp1, temp2, l=0; for(i=1; i<=n; i++) { cin>>a>>b; dragon[i]=a, str[i]=b; } for(i=1; i<=n; i++) { ...
#include "laser.h" #include <stdio.h> Laser::Laser(GLfloat x,GLfloat y,GLfloat z,GLfloat dx,GLfloat dy,GLfloat dz,GLfloat m_yaw,GLfloat m_pitch,GLenum number) { //printf("NEW LASER!!!(%f,%f,%f,%f,%f,%f)\n",x,y,z,dx,dy,dz); this->x = x; this->y = y; this->z = z; this->dx = dx; this->dy = dy; ...
#include "ShrubberyCreationForm.hpp" #include <fstream> ShrubberyCreationForm::ShrubberyCreationForm(std::string const &target) : Form("ShrubberyCreationForm", 145, 137, target) { std::cout << "[ShrubberyCreationForm](std::string const&)" " Ctor called" << std::endl; return ; } ShrubberyCreationForm::~Shrubbery...
#ifndef MAC_SVGFONT_H #define MAC_SVGFONT_H #ifdef SVG_SUPPORT #include "modules/svg/src/SVGFont.h" #include "modules/svg/src/SVGTransform.h" #include "platforms/mac/pi/MacOpFont.h" class MacOpSVGFont : public SVGSystemFont { public: MacOpSVGFont(OpFont* font); virtual ~MacOpSVGFont(); #ifdef SVG_DEBUG_SHOW_FONTN...
/* * main.cpp * * Created on: May 10, 2016 * Author: g33z */ #include <iostream> using namespace std; #include <stdio.h> #include <stdlib.h> #include "Point.h" int main(){ /* double ax,ay,az, bx,by,bz, cx,cy,cz; cout << "Punkt a.x:" << endl; cin >> ax; cout << "Punkt a.y:" << endl; cin >> ay; c...