text
stringlengths
8
6.88M
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Alexander Remen (alexr) */ #include "core/pch.h" #include "Ins...
#pragma once #include "FwdDecl.h" #include "Keng/Graphics/Resource/IEffect.h" #include "Resource/Shader/Shader.h" #include "Keng/GPU/PipelineInput/IInputLayout.h" #include "Keng/GPU/Shader/IDeviceShader.h" namespace keng::graphics { class Device; class Effect : public core::RefCountImpl<IEffect> ...
#pragma once #include "Keng/GPU/FwdDecl.h" #include "Keng/GraphicsCommon/FragmentFormat.h" #include "EverydayTools/Array/ArrayView.h" namespace keng::graphics::gpu { class ITexture : public core::IRefCountObject { public: virtual FragmentFormat GetFormat() const = 0; virtual void AssignToP...
#include<stdio.h> #include<math.h> int main() { long long n, t, count; scanf("%lld",&t); for(int i = 1; i<=t; i++) { scanf("%lld",&n); count = 0; for (int i = 2; i <= sqrt(n); i++) { if (n%i == 0) { count = 1; break; } } if (count != 1 && n!=1) printf("Prime\n"); else printf("Not ...
#include "vm/processor.hpp" #include <utility> #include <string> #include <type_traits> #include <cstdint> #include <algorithm> #include <iterator> #ifdef _MSC_VER # include <Windows.h> # define sys_debug_break() DebugBreak() #else # ifdef __GNUC__ // TODO: does this always work on gcc? Maybe let cmake find out and g...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #include "core/pch.h" #ifdef XSLT_SUPPORT #include "modules/xslt/src/xs...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include "ui/TabIcon.hpp" #include "draw.hpp" using namespace ui; TabIcon::TabIcon(){} void TabIcon::draw(const draw::DrawingAttr & attr){ drawing_point_t p; drawing_dim_t d; DrawingAttr icon_draw_attr; d = attr.d(); p = attr.p(); Tab::calc_square(p, d...
#include "snake.h" #include<QKeyEvent> #include<QTimer> #include<QObject> #include<QList> #include "food.h" #include<QGraphicsScene> #include<QGraphicsView> #include<QGraphicsItem> #include<QDebug> #include<QPainter> #include<QPushButton> #include<QObject> #include<QApplication> #include "creasnake.h" #include<QLabel> ...
#include <iostream> using namespace std; int main() { cout << "Serendipity Booksellers\nInventory Database\n\n1. Look Up a Book\n2. Add a Book\n3. Edit " << "a Book's Record\n4. Delete a Book\n5. Return to the Main Menu\n\nEnter Your Choice: \n"; }
//git add pushbutton/sypushbutton.cpp //git commit -m "pushbutton" pushbutton/sypushbutton.cpp //git push -u origin master //http://www.cnblogs.com/emouse/archive/2013/07/14/3189319.html //http://www.360doc.com/content/11/1122/10/7899729_166398154.shtml //http://www.cnblogs.com/xj626852095/p/3648119.html //http://blo...
#include "KeyBoardState.h" KeyBoardState::KeyBoardState(void) { for(int i = 0; i < 256; ++i) { keys[i] = false; } } KeyBoardState::~KeyBoardState(void) { } bool KeyBoardState::IsKeyDown(KeyPad::Keys key) { return (keys[key] == true); } bool KeyBoardState::IsKeyUp(KeyPad::Keys key) { return (keys[key] == false...
#include "quadtree.h" quadtree::quadtree(const Eigen::MatrixXd &f1, const Eigen::MatrixXd &f2, const IntervalVec<itv> &range) : m_mat_f1(f1), m_mat_f2(f2), m_min_size(1e-3), count(0) { m_mat_f1x = diff_about_x(m_mat_f1); m_mat_f1y = diff_about_y(m_mat_f1); m_mat_f2x = diff_about_x(m_mat_f2); m_mat_f2y ...
/* ** EPITECH PROJECT, 2021 ** Untitled (Workspace) ** File description: ** RamInfos */ #include <string> #include <iostream> #include <cstdlib> #include <fstream> #include <atomic> #include <chrono> #include <thread> std::atomic<long unsigned int>mem_used; std::atomic<long unsigned int>mem_free; std::atomic<long uns...
#ifndef MSG #define MSG #include <string> class Message{ public: Message(); std::string subject; std::string from; std::string to; std::string body; }; #endif //MSG
#pragma once #include "Events.h" #include "BaseObject.h" class Observer { public: virtual ~Observer() {}; virtual void onNotify(const BaseObject& entity, Event event) = 0; };
#include <iostream> #include <sstream> #include <vector> #include <list> #include <queue> #include <algorithm> #include <iomanip> #include <map> #include <unordered_map> #include <unordered_set> #include <string> #include <set> #include <stack> #include <cstdio> #include <cstring> #include <climits> #include <cstdlib> ...
#define POWITACQ_IMPLEMENTATION #include "powitacq_rgb.h" int main(int argc, char **argv) { using namespace powitacq_rgb; // load a BRDF BRDF brdf("cc_ibiza_sunset_rgb.bsdf"); // evaluate the BRDF { Vector3f wi = normalize(Vector3f(0, 0, 1)); Vector3f wo = normalize(Vector3f(1, 1...
// dp de quantidade de numeros <= r com ate qt digitos diferentes de 0 ll dp(int idx, string& r, bool menor, int qt, vector<vector<vi>>& tab) { if(qt > 3) return 0; if(idx >= r.size()) { return 1; } if(tab[idx][menor][qt] != -1) return tab[idx][menor][qt]; ll res = 0; for(int i ...
#include <Buffers/UniformBuffer.h> #include <cstring> //#define BUFFER_USE_MAPPING CUniformBuffer::CUniformBuffer(GLsizeiptr size, GLuint binding) : _ubo(0) , _binding(binding) , _size(size) { glGenBuffers(1, &_ubo); bind(); glBufferData(GL_UNIFORM_BUFFER, _size, nullptr, GL_DYNAMIC_DRAW); ...
#include<bits/stdc++.h> #include<ext/rope> using namespace std; using namespace __gnu_cxx; struct ope{ int t,x,y,k; }; ope o[30000]; rope<int> *fa[30000]; int a[30000],ans[30000],n,m,tot=0; void readit(){ scanf("%d%d",&n,&m); for (int i=1;i<=m;i++){ int t; scanf("%d",&t); o[i].t=t; if (t==2) ...
/**************************************************************************** ** Meta object code from reading C++ file 'CSystemTrayIcon.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.3.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************...
#include "historydatawindow.h" #include "ui_historydatawindow.h" HistoryDataWindow::HistoryDataWindow(QWidget *parent, DataProcessor *processor) : QWidget(parent),dataPro(processor), ui(new Ui::HistoryDataWindow) { ui->setupUi(this); range=3600; mode=VMODE; // mode=NONMODE; const char pl...
/*========================================================================= University of Pittsburgh Bioengineering 1351/2351 Final project example code Copyright (c) 2011 by Damion Shelton All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of...
#include<iostream> #include<vector> using namespace std; int main() { int i,j,n,m,x,y,count,nw,na,wake[26],years; char a,b,c; while(cin>>n) { vector<vector<int>> v(26); vector<int>stat; stat.assign(26,-1); cin>>m; cin>>a>>b>>c; stat[a-'A']=stat[b-'A']=stat[c-'A']=1; while(m--) { ...
#include <bits/stdc++.h> using namespace std; #define For(x) for(int i = 0; i < x; i++) #define For2(x) for(int j = 0; j < x; j++) #define For3(x) for(int k = 0; k < x; k++) #define Forv(vector) for(auto& i : vector) #define Forv2(vector) for(auto& j : vector) #define show(vector) for(auto& abcd : vector){cout<<abcd<<"...
#pragma once class IBaseInterface { public: virtual ~IBaseInterface() {} }; typedef void *(*CreateInterfaceFn)(const char *pName, int *pReturnCode); typedef void *(*InstantiateInterfaceFn)();
// my O(n) solution class Solution { public: int removeDuplicates(vector<int>& nums) { int cnt = 0, i = 0, pos = 0, n = nums.size(); while(i < n){ ++cnt; nums[pos++] = nums[i]; while(i < n-1 && nums[i+1] == nums[i]) ++i; ++i; } return c...
//************************************************************************************************************* // // ゲームパオブジェクト処理 [GameObject.h] // Author : Sekine Ikuto // //************************************************************************************************************* #ifndef _GAMEOBJECT_H_ #def...
#include <cstdio> //n为食物种数 #include <cstring> //a为幸福值越大越好 #include <iostream> //b为每种食物的卡路里 using namespace std; //m为总卡路里量 int dp[100005]; int hate[105]; int happy[105]; int main() { while(1) { int n, m, a, b; cin >> n; for(int i = 0; i< n; i++) { scanf("%d %d", &happy[i], &hat...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> #include <sstream> typ...
// // Created by zhou.lu on 2021/9/1. // #include "XParameter.h" extern "C" { #include <libavcodec/avcodec.h> };
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright Opera Software ASA 2009 * * @author Daniel Spang */ #ifndef ES_PAGE_H #define ES_PAGE_H class ES_Chunk; class ES_ChunkAllocator; class ES_HeapHandle; class ES_Heap; class ES_PageHeader; #ifdef ES_USE_ALIGNED_SEGMENTS #...
#ifndef SKELETON_H #define SKELETON_H #include "Enemy.h" const int SKELETONHEALTH = 15; const int SKELETONLOOT = 10; const float SKELETONSPEED = 0.25f; const glm::vec3 SKELETONSCALE = glm::vec3(0.1, 0.2, 1); class Skeleton : public Enemy { public: Skeleton(float, stack<Node*>, glm::vec3); }; #endi...
#include <iostream> using namespace std; void cycleSortDistinct(int arr[],int n){ for(int cs=0;cs<n-1;cs++){ int pos=cs; int item=arr[cs]; for(int i=cs+1;i<n;i++){ if(arr[i]<item) pos++; } swap(item,arr[pos]); while(pos!=cs){ pos=cs; for(int i=...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2005 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef XSLT_XMLSOURCECODEOUTPUTHANDLER_H #define XSLT_XMLSOURCECODEOUTPU...
/* This file is part of the Pangolin Project. * http://github.com/stevenlovegrove/Pangolin * * Copyright (c) 2011 Steven Lovegrove * * 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 Softw...
//Lora SENDER #include <Arduino.h> #include <LoRa.h> #define ON_CNFRM 4 #define OFF_CNFRM 5 #define PING_PIN 6 long lastSendTime=0; int interval=50; long lastSendTime1=0; int interval1=50; bool state = false; void check_lora_connection(void); String send_data(String); String receive_data(void); const int buttonPin_NO...
#include <cstring> #include <cstdlib> #include <vector> #include <map> #include <string> #include <cstdio> #include <float.h> #include <string.h> #include <cmath> using namespace std; int num_threads; int trainTimes; float alpha; float reduce; int dimensionC; int dimensionWPE; float marginPositive; float marginNegati...
#pragma once #include <constants.h> #include <Arduino.h> class arm { public: arm(uint8_t *SPI1, uint8_t *SPI2); void homeArm(void); void extendArm(void); void sleepArm(void); void wakeupArm(void); void moveSlider(int position); void moveLift(int position); void moveArm(int positio...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2010 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #include "core/pch.h" #ifdef STDLIB_MODULE_REQUIRED #include "...
#include <bits/stdc++.h> using namespace std; long long int N,M,i; char chairo; int main() { ios_base::sync_with_stdio(0); cin.tie(0); do{ cin >> chairo; if(chairo == 'A') N++; } while(chairo != '.'); cout << N; return 0; }
//===------------------------------------------------------------*- C++ -*-===// // // Created by F8LEFT on 2017/6/28. // Copyright (c) 2017. All rights reserved. //===----------------------------------------------------------------------===// // //===------------------------------...
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> void boundaryfill4(int x,int y,int f_color,int b_color) { if(getpixel(x,y)!= b_color && getpixel(x,y)!=f_color) { putpixel(x,y,f_color); delay(5); boundaryfill4(x+1,y,f_color,b_color); boundaryfill4(x,y+1,f_color,...
// -*- 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. // // Adam Minchinton // #include "core/pch.h" #ifdef SUPPORT_SPEED...
// Created on: 1993-11-03 // Created by: Christian CAILLET // 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 ...
//--------------------------------------------------------- // // Project: dada // Module: geometry // File: Matrix3fUtils.h // Author: Viacheslav Pryshchepa // // Description: Utilities for nine-element square column aligned matrix // //---------------------------------------------------...
#pragma once namespace base64 { // must free out manual!!! int base64Decode(const unsigned char *in, unsigned int inLength, unsigned char **out); // must free out manual!!! int base64Encode(const unsigned char *in, unsigned int inLength, char **out); }
// Copyright (c) 2007-2021 Hartmut Kaiser // Copyright (c) 2017 Shoshana Jakobovits // Copyright (c) 2010-2011 Phillip LeBlanc, Dylan Stark // Copyright (c) 2011 Bryce Lelbach // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file ...
#include <iostream> #include <vector> #include <conio.h> #include <fstream> #include "Facebook.h" using namespace std; // prototype void DisplayMenu(void); int getOption(void); void import(Facebook& BookOfLife); void exportFile(Facebook& BookOfLife); int main() { Facebook BookOfLife; import (BookOfLife); while (t...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2009 Opera Software AS. 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" #ifdef FORMATS_...
// Fri Apr 29 11:54:22 EDT 2016 // Evan S Weinberg // C++ file for BiCGStab inverter. // To do: // 1. Template to support float, double. #include <iostream> #include <cmath> #include <string> #include <sstream> #include <complex> #include "generic_traits.h" #include "generic_vector.h" #include "generic_bicgstab.h"...
// // Created by fab on 25/02/2020. // #include <iostream> #include <imgui/imgui.h> #include "../../headers/components/Transform.hpp" Transform::Transform() { position = glm::vec3(0.f); quat = glm::quat(); modelMatrix = glm::mat4(1.0f); scale = glm::vec3(1.0f); } void Transform::addPosition(glm::vec...
#include "aeScene.h" #include "aeRendererAddOn.h" namespace aeEngineSDK { aeScene::aeScene() { m_pszName = "New Scene"; } aeScene::aeScene(const String & Name) { m_pszName = Name; } aeScene::aeScene(const aeScene & O) { *this = O; } aeScene::~aeScene() { } void aeScene::SetName(const String & Na...
/** * @file Tcp_Test.cpp * @author dtuchscherer <daniel.tuchscherer@hs-heilbronn.de> * @brief short description... * @details long description... * @version 1.0 * @copyright Copyright (c) 2015, dtuchscherer. * All rights reserved. * * Redistributions and use in source and ...
#include <Arduino.h> class FourDigitLCD { public: FourDigitLCD(); void init(); void display(int number); };
#include<iostream> #include<vector> #include<algorithm> #include<map> using namespace std; class Solution { public: vector<int> partitionLabels(string S) { //基本思想:排序+双指针,将问题转化为56合并区间 //通过map获取每个字符的区间范围,然后将这些区间合并即可 vector<int> res; map<char,pair<int,int>> Mapinterval; for(int ...
#pragma once #include "SystemBase.h" class ELevelManager : public SystemBase { DECLARE_SINGLE(ELevelManager) public: virtual void SetSystemOperationSlot() override; };
/* BEGIN LICENSE */ /***************************************************************************** * SKFind : the SK search engine * Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr> * $Id: recordfilter.h,v 1.2.4.4 2005/02/21 14:22:44 krys Exp $ * * Authors: Arnaud de Bossoreille de Ribou <debossoreille @a...
//: C09:Rectangle2.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt // Obserwatory i modyfikatory z przedrostkami "get" i "set" class Rectangle { int width, height; public: Rectangle(in...
#include "socket_server.h" // GameShow* SocketServer::gameShow; struct mg_server* SocketServer::s_server = NULL; queue<string> SocketServer::messages; queue<Document*> SocketServer::incomingMessages; mutex SocketServer::queueMutex; SocketServer::SocketServer() { } SocketServer::~SocketServer() { } D...
#include<iostream> #include<cstdio> #include<cstring> using namespace std; #define ll long long #define getint(n) scanf("%d",&n) ll dp[100][45000]; int main() { int t,n,a[100],sum,sum1; ll one = 1; getint(t); while(t--) { getint(n); sum = 0; for(int i = 0 ; i<n ; i++) { getint(a[i]); sum += a[i]; }...
#ifndef UPENN_CONTROLLER_H #define UPENN_CONTROLLER_H #include <ros/ros.h> #include <Eigen/Dense> #include "quadrotor_sim/math_operations.h" #include "quadrotor_sim/controllers/controller_class.h" class upenn_controller: public control_class{ private: ros::NodeHandle nh_; //Eigen::Matrix3d J; double...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; string st; int cou[30]; int main() { int t,k; scanf("%d",&t); while (t--) { long long ans...
#pragma once #include "GlobalHeader.h" // fa::String #include <stdexcept> // std::logic_error, std::runtime_error #include <string> // std::string #include <gtest/gtest.h> // ::testing::internal::FloatingPoint #include <mylibs/utility.hpp> // pl::Uinteger #include <limits> // std::numeric_limits #include <type_t...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2007 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @file * @author Owner: Adam Minchinton (adamm) * @author C...
#ifndef _SetTableStatusProc_H #define _SetTableStatusProc_H #include "CDLSocketHandler.h" #include "IProcess.h" class SetTableStatusProc :public IProcess { public: SetTableStatusProc(); virtual ~SetTableStatusProc(); virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket, Context* p...
#ifndef MANAGER_H #define MANAGER_H #include <iostream> #include <cstdlib> #include <string> #include <regex> #include "full_menu.h" #include "iterator.h" #include "full_menu.h" #include "category.h" using namespace std; class Manager { public: Manager(); Manager(string name,string number); void PrintOperations(...
/* -*- 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. */ #ifndef CPU_USAGE_TRACKERS_H #define CPU_USAGE_TRACKERS_H #ifde...
#pragma once #include <utility> #include "actor-register.h" #include "actor.h" namespace sim::events { /** * A base class for instances that are not actors, but have access to the Cloud * state and is able to schedule events */ class Observer { public: explicit Observer(std::string whoami) : whoami_(std::mo...
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2008 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** @author Johannes Hoff jhoff@opera.com */ #ifndef MODULES_DOM_DOMSC...
#include<vector> using std::vector; #include<iostream> #include<algorithm> #include<memory> using std::shared_ptr; #include<string> using std::string; #include<stack> using std::stack; #include<queue> using std::priority_queue; #include<unordered_map> using std::unordered_map; /* Implement wildcard pattern matching wit...
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(){ int A, B, K; cin >> A >> B >> K; for(int i = 0; i < K; i++) { int tmp; if (i % 2 == 0){ //A->B A -= A % 2; tmp = A / 2; A -=...
#include "NecromancerAttack.h" NecromancerAttack::NecromancerAttack() { std::cout << " creating NecromancerAttack " << std::endl; } NecromancerAttack::~NecromancerAttack() { std::cout << " deleting NecromancerAttack " << std::endl; } // void NecromancerAttack::heal(Unit& ally, SpellCaster& healer) { // ally.take...
/*10292*/ #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cassert> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <list> #include <queue> #include <set> #include <cstdlib> #include <cmath> using namespace std; typedef vector<int> Vint; int main() { ...
#include<stdlib.h> #include<math.h> #include <iostream> using namespace std; int no_of_distinct_prime_factor(long); int no_of_distinct_prime_factor(long); int is_prime(long); int main() { long c=4,i,tmp,j; int flag; for(i=2;;i++) { flag=1; for(j=0;j<c;j++) if(!(c==no_of_d...
#include<bits/stdc++.h> #include<string.h> using namespace std; void dupli(char string[]){ if (string[0] == '\0') return; if (string[0] == string[1]){ int i = 0; while (string[i] != '\0'){ string[i] = string[i + 1]; i++; } dupli(string); } ...
#ifndef TREEFACE_UNIVERSAL_VALUE_H #define TREEFACE_UNIVERSAL_VALUE_H #include "treeface/gl/Enums.h" #include "treeface/gl/TypeUtils.h" #include "treeface/math/Vec2.h" #include "treeface/math/Vec3.h" #include "treeface/math/Vec4.h" #include "treeface/math/Mat2.h" #include "treeface/math/Mat3.h" #include "treeface/mat...
// // Created by faris on 4/28/2020. // #define DEGTORAD 0.0174532925199432957f #include "mylibrary/Bomb.h" #include "cinder/gl/gl.h" using namespace ci; Bomb::Bomb(b2World* world, const vec2& pos) { // b2Vec2 vertices[3]; // vertices[0].Set(0.0f, 0.0f); // vertices[1].Set(100.0f, 0.0f); // vertices[2].Set(0.0f, 1...
#include<bits/stdc++.h> #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) #define INF ((1LL<<62)-(1LL<<31)) /*オーバーフローしない程度に大きい数*/ #define MOD 1000000007 using namespace std; using ll = long long; using Graph = vector<vector<int>>; using pint = pair<int,int>; const double PI = 3.14159265358979323846; ...
#include <bits/stdc++.h> #define loop(i,s,e) for(int i = s;i<=e;i++) //including end point #define pb(a) push_back(a) #define sqr(x) ((x)*(x)) #define CIN ios_base::sync_with_stdio(0); cin.tie(0); #define ll long long #define ull unsigned long long #define SZ(a) int(a.size()) #define read() freopen("input.txt"...
#include "network_query_list.h" #include <uriparser/Uri.h> #include <vector> #include <string> namespace ioremap { namespace swarm { class network_query_list_private { public: std::vector<std::pair<std::string, std::string> > items; }; network_query_list::network_query_list() : p(new network_query_list_private) {...
#include "stdafx.h" #include "Ara.h" Ara::Ara() { } Ara::~Ara() { }
#include <iostream> void drawM(char** &arr, char simbol, int chap) { for(int i = 0; i < chap; ++i) { arr[i][0] = simbol; } for(int i = 0;i < chap; ++i) { arr[i][chap -1] = simbol; } if(0 != chap % 2) { for(int i = 1;i <= chap / 2; ++i) { arr[i][i] = simbol; } for(int i = 1;i <= chap / 2; ++i) { ar...
#include <iostream> using namespace std; bool isPrime(int x){ int cnt = 0; for(int i = 1; i <= x; ++i){ if(x % i == 0){ cnt++; } } if(cnt == 2) return true; return false; } void run_all_test(){ int tests[] = {1,2,3,4,5,6,7,8,9,10}; int answers[] = {0,1,1,0,1,0,1,...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
#pragma once #include "../System.hpp" #include "Special/gameOver.hpp" namespace States { class MainMenu { public: static int8_t run(void) { int8_t selected = 0; int8_t menu = 0; while (true) { if( keyUp::isJustPressed() ) selected--; if( keyDown::isJustPr...
#include "Player.h" #include <stdio.h> #include <iostream> using namespace std; void Player::_generageDef(int def) { // Player defence does not decrease gradually because he is the main player and the game will become really hard. _defence = def; } Player::Player() { _x = 0; _y = 0; } void Player::init(int leve...
#ifndef AS64_GMP_ORIENT_H_ #define AS64_GMP_ORIENT_H_ // GMPo class // For encoding Cartesian Orientation. // #include <gmp_lib/GMP/GMP.h> #include <gmp_lib/GMP/GMP_nDoF.h> #include <gmp_lib/utils.h> namespace as64_ { namespace gmp_ { class GMPo : public GMP_nDoF { // =================================== // ======...
#ifndef AS64_gmp_MATH_LIB_H #define AS64_gmp_MATH_LIB_H #include <Eigen/Dense> #include <armadillo> namespace as64_ { namespace gmp_ { Eigen::Vector4d quatInv(const Eigen::Vector4d &quat); arma::vec quatInv(const arma::vec &quat); Eigen::Matrix4d quat2mat(const Eigen::Vector4d &quat); Eigen::Vector4d quatProd(con...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef CREATE_REG_KEY_OPERATION_H #define CREATE_REG_KEY_OPERATI...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2008-2010 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef CRYPTO_HASH_IMPL_H #define CRYPTO_HASH_IMPL_H #include "...
// Created by Suraj Parkale BTech Computer Engineer // Student of Vishwakarma Institute of Information Technology, Pune #include<iostream> using namespace std; int main(){ int n; cout<<"Enter the number of elements : "; cin>>n; int a[n],k,j; for(int i=0;i<n;i++){ cin>>a[i]; } cout...
#ifndef image_tga_hpp #define image_tga_hpp #include <fstream> #include "color.hpp" namespace image { class TGA { public: enum Format { GRAYSCALE = 1, RGB = 3, RGBA = 4 }; TGA(); TGA(int w, int h, int bpp); TGA(const TGA& image); TGA& operator=(const TGA& image); ~TGA(); bool read_tga_fi...
$NetBSD$ Support NetBSD. --- scribus/util_debug.cpp.orig 2019-07-30 22:35:07.000000000 +0000 +++ scribus/util_debug.cpp @@ -24,7 +24,7 @@ for which a new license (GPL+exception) #include <QDateTime> #include <QtGlobal> -#if !defined(_WIN32) && !defined(Q_OS_MAC) +#if !defined(_WIN32) && !defined(Q_OS_MAC) && !de...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); ...
#pragma once #include <cutil_inline.h> #include <cutil_math.h> #include "MatrixConversion.h" #include "VoxelUtilHashSDF.h" #include "DepthCameraUtil.h" #include "CUDAScan.h" #include "GlobalAppState.h" #include "TimingLog.h" extern "C" void computeHistogramCUDA(unsigned int* d_data, const VoxelHashData& voxelHashDa...
/* XMRig * Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> * C...
// 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...
#include "sockets.h" // #include <stdio.h> CSocket::CSocket() { // printf("construct socket %08X \n", this); this->socket = -1; this->prevSocket = this->nextSocket = NULL; } CSocket::~CSocket() { // printf("destroy socket %08X \n", this); shutdown(this->socket, SD_BOTH); closesocket(this->socket...
#include <bits/stdc++.h> using namespace std; using ll = long long; struct wavelet_matrix { int n; int blk; int logn; vector<int> z; vector<vector<pair<int, int>>> b; wavelet_matrix(vector<int>& a) { n = a.size(); blk = (n + 32) >> 5; logn = 32 - __builtin_clz(*max_element(a.begin(), a.end()))...