text stringlengths 8 6.88M |
|---|
#include<graphics.h>
#include<constream.h>
void main(){
int driver=DETECT,mode;
clrscr();
initgraph(&driver,&mode,"\\tc\\bgi");
setcolor(4);
//rectangle(left,top,right,bottom);
line(400,410,300,140);
line(120,390,300,140);
line(400,410,120,390);
line(270,300,300,140);
line(270,300,... |
#pragma once
#include <mpi.h>
#include "Model_MPI.hpp"
#include "boost/multi_array.hpp"
class AnalysisInterface {
public:
virtual ~AnalysisInterface();
// So here, the x1 and x2 can correspont to any 3D parametrization,
// be it k's or f's or z's or whatever.
// The Fisher Method... |
#pragma once
#include "core/rdma_sched.h"
#include "rdmaio.h"
#include <emmintrin.h>
#include <immintrin.h>
#include <x86intrin.h>
#include <xmmintrin.h>
//#include "../../nvm/benchs/two_sided/core.hh"
#include "../../nvm/nvm_region.hh"
using namespace nvm;
extern ::rdmaio::Arc<MemoryRegion> nvm_region;
namespac... |
#ifndef TALENTS_HPP
#define TALENTS_HPP
#include <map>
#include "adventurePoints.hpp"
#include <QTableWidget>
#include <QHeaderView>
#include <QLayout>
#include <QFrame>
class TalentsGUI
{
private:
enum TalentGroupNames {
GESELLSCHAFTSTALENTE = 0,
HANDWERKSTALENTE,
KOERPERTALENTE,
KRIEGSKUNSTTALENTE,
NATU... |
#include <cstdio>
#include <iostream>
using namespace std;
struct RandomListNode{
int label;
RandomListNode *next, *random;
RandomListNode(int x): label(x), next(NULL), random(NULL){}
};
RandomListNode *copyRandomList(RandomListNode *head){
if(head == NULL) return NULL;
RandomListNode *p = head;
while(p ... |
#include "pch.h"
#include "tchar.h"
#include <aced.h>
#include <rxregsvc.h>
void initApp();
void unloadApp();
void helloWorld();
void initApp()
{
acedRegCmds->addCommand(_T("HELLOWORLD_COMMANDS"),
_T("Hello"),
_T("Bonjour"),
ACRX_CMD_TRA... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2006-2007 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"
#ifdef SVG_SUPPORT
#include "modules/s... |
#include <iostream>
#include <algorithm>
using namespace std;
using ll = long long;
int main() {
int n, q;
cin >> n >> q;
ll s[n];
cin >> s[0];
for (int i = 1; i < n; ++i) {
ll a;
cin >> a;
s[i] = s[i - 1] + a;
}
ll sum = 0;
for (int i = 0; i < q; ++i) {
... |
#include<iostream>
#include<stdlib.h>
#include<unistd.h>
#include<fstream>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<string.h>
using namespace std;
#define PORT 8822
#define SERVERADD "127.0.0.1"
void die(char *s)
{
perror(s);
exit(1);
}
int main()
{
int sockfd;
//create socket
if((s... |
/*
MATH578a Spring 2016 Unit2 HW1 - Liana Engie
Purpose: Implementation of Boyer-Moore algorithm for pattern matching.
Input:
P, pattern
T, fasta file containing text string to be matched against
Output:
All starting positions of substrings in T that exactly match P
*/
#include <iostream>
#include <strin... |
#if !defined(LINE)
#define LINE
#include "./Point.h"
template <typename T>
struct Line
{
Point<T> pStart;
Point<T> pEnd;
Line() {}
Line(T x1, T y1, T x2, T y2)
{
this->pStart = Point<T>(x1, y1);
this->pEnd = Point<T>(x2, y2);
}
Line(Point<T> p1, Point<T> p2)
{
th... |
#include <bits/stdc++.h>
using namespace std;
int main()
{ int i=1,flag,j;
for(int k=1;k<=4;k++){
for(int p=0;p<k;p++){
flag = 1;
for (j = 2; j <= i / 2; ++j) {
if (i % j == 0) {
flag = 0;
break;
}
}
if(i==1)
... |
#pragma once
#include <string>
#include <list>
using namespace std;
/***************************
* 观察者基类
****************************/
struct Blog;
struct Observer {
Observer() {}
virtual ~Observer() {}
virtual void attach(Blog*) {}
virtual void remove(Blog*) {}
virtual void update(Blog*) {}
};
/************... |
/* -*- 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.
*/
#include "core/pch.h"
#include "adjunct/quick_toolkit/widgets/Qu... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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.
**
*/
#ifndef DECODERFACTORYGIF_H
#define DECODERFACTORYGIF_H
#incl... |
#include <iostream>
#include <list>
using namespace std;
/*
* Represents a Graph
* Assumption 1: All nodes can be eventually reached by the source node (so it's not a disconnected graph)
* Assumption 2: Directed or undirected graph
* @param: numVertices: Number of vertices (nodes) in the graph
* @param: *adj: A p... |
// Copyright (c) 2021 Thomas Kaldahl
#ifndef FINLIN_HPP
#define FINLIN_HPP
#define CL_TARGET_OPENCL_VERSION 200
#include <CL/cl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
class FinLin {
friend class Vec;
friend class Mat;
friend class Veci;
friend class Mati;
static void s... |
// This project controlls 6 MOSFETS that PWM two RGB light strips.
// - One knob controls decay of all channels
// - Six CV inputs
// - Six CV outputs
//Using an Arduino Micro
//Input and Output Pin Definitions
int pin_input_decay = A0; // 0-5V, if inputting from 12V eurorack, make sure to scale it to 5V 25mA max
int ... |
// Created on: 2006-05-28
// Created by: Alexander GRIGORIEV
// Copyright (c) 2006-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 ... |
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2012-2013.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#ifndef _GDCMIO_DICOMSRWRITERMANAGER_HPP_
#define _GDCMIO_DICOMSRWRITERMAN... |
#ifndef WGF_CONFIGFILE_H
#define WGF_CONFIGFILE_H
#include <map>
#include <string>
namespace WGF
{
/** \brief A configuration file containing infos as key = value
Optionally with comments in C-style. NOT ";"! Values can be strings, integers or floats.
\note use lower-case on keys as those from the config... |
class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
if(nums.size() < 2) return {};
vector<int> res(nums.size());
res[0] = nums[0];
for(int i=1; i<nums.size(); ++i){
res[i] = res[i-1]*nums[i];
}
int temp = 1;
for(int i=nums.s... |
/* Problem: https://www.codechef.com/CDTR1502/problems/MULTIPLY/ */
#include <bits/stdc++.h>
using namespace std;
// A[] represents coefficients of first polynomial
// B[] represents coefficients of second polynomial
// m and n are sizes of A[] and B[] respectively
int *multiply(int A[], int B[], int m, int n)
{
i... |
/*
ID: stevenh6
TASK: fence9
LANG: C++
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using db = double;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = ve... |
//defines e includes
#include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define rep(i, a, n) for(i=int(a);i<int(n);i++)
#define rep2(i, a, n, jump) for(i=int(a);i<int(n);i+=int(jump))
#define st first
#define nd second
#define pb push_back
#define pf push_front
#define p_b... |
/* -*- 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.
*/
#ifndef SYNC_OLD_PASSWORD_MISSING_DIALOG_H
#define SYNC_OLD_PASSW... |
class FindFirstNode {
public:
struct MyFunctor {
bool operator ()(const ListNode& lhs, const ListNode& rhs) const {
return lhs.val < rhs.val;
}
};
ListNode* EntryNodeOfLoop(ListNode* pHead)
{
map<ListNode, int, MyFunctor> mm{};
ListNode* p = pHead;
while (p != nullptr) {
if (mm.count(*p)) {
... |
// 0921_3.cpp : 定义控制台应用程序的入口点。
//多项式求和
//多项式的描述如下:
//1 - 1 / 2 + 1 / 3 - 1 / 4 + 1 / 5 - 1 / 6 + ...
//现在请你求出该多项式的前n项的和。
#include <iostream>
#include<cstdio>
using namespace std;
double function(int x)
{
double sum=0;
for (int i = 1; i <= x; i++)
{
sum = sum + pow(-1, i + 1)*(1.0 / i);
}
return sum;
}
int main... |
#include <iostream>
using namespace std;
int main(){
long long int n,res=1;
cin>>n;
if(n>=6){
cout<<9;
}
else{
while(n>0){
res*=n;
n--;
}
while(res>9){
int temp=0;
while(res){
temp+=res%10;
... |
//Automobile.cpp
#include "Automobile.h"
#include "Park.h"
#include <string>
using namespace std;
Automobile::Automobile(string name, int payment) : name(name), payment(payment) { ; }
void Automobile::enter(Park *park)
{
park->assignAutomobile(this);
}
void Automobile::leave(Park *park)
{
park->passAutomobile(this, p... |
//
// ColaPrioridades.h
// Cola
//
// Created by Daniel on 13/10/14.
// Copyright (c) 2014 Gotomo. All rights reserved.
//
#ifndef __Cola__ColaPrioridades__
#define __Cola__ColaPrioridades__
#include <iostream>
#include "Cola.h"
template <class T>
class ColaPrioridades : protected Cola<T>{
};
#en... |
#pragma once
// The reference implementation for the code is within this documentation: http://www.faqs.org/rfcs/rfc1952.html
// The reference implementation was turned into a recursive function
/**
* To use: create a string id from a string (without quotes) at compile time with SID(string)
* Using StrID GetStrID( c... |
/*
* 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... |
#ifndef SDUZH_OWNLIB_NET_EPOLL_POLLER_H
#define SDUZH_OWNLIB_NET_EPOLL_POLLER_H
#include <unordered_map>
#include <sys/epoll.h>
#include <reactor/net/Poller.h>
namespace reactor {
namespace net {
class EPollPoller: public Poller {
public:
/// see epoll_create(2)
EPollPoller(int size);
~EPollPoller();
void updat... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#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>
#inc... |
/*
This file is part of SMonitor.
Copyright 2015~2016 by: rayx email rayx.cn@gmail.com
SMonitor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ve... |
//
// Created by tudom on 2019-12-31.
//
#pragma once
#include <exception>
#include <string>
#include "../_api.hpp"
namespace info::dynamite {
struct INFO_DYNAMITE_API no_such_function : std::exception {
const char* what[[nodiscard]]() const noexcept override;
no_such_function(std::string) noexcept;
... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#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>... |
/*
Name: ÃÔ;µÄţţ
Copyright:
Author: Hill bamboo
Date: 2019/8/15 14:08:29
Description: ����
�ܽ᣺
����ɶʱ����⣬��ô����
*/
#include <bits/stdc++.h>
using namespace std;
char d[4] = {'N', 'E', 'S', 'W'};
int main() {
int n; scanf("%d", &n);
string mm; cin >> mm;
int a... |
#pragma once
#include "Inputs.h"
#include "Constants.h"
#include "SceneManager.h"
#include "SplashScreen.h"
#include "Menu.h"
#include "Play.h"
#include "Ranking.h"
class GameController
{
private:
Inputs inputs;
SceneManager * actualScene;
public:
bool isRunning;
GameStates gameState;
PlayerRankin... |
#include <iostream>
#include<iomanip>
using namespace std;
int main()
{
double L,cost;
char stype,type;
cin>>L>>type>>stype;
if (stype=='s')
switch(type){
case 90:cost=5.82*L*0.95;break;
case 93:cost=5.96*L*0.95;break;
case 97:cost=6.36*L*0.95;break;
default:cos... |
#ifndef CHUFFED_MDDOPTS_H
#define CHUFFED_MDDOPTS_H
#include <string>
class MDDOpts {
public:
enum ExplAlg { E_MINIMAL, E_GREEDY, E_NAIVE };
enum ExplStrat { E_TEMP, E_KEEP };
enum Decomp { D_PROP, D_DOMAIN, D_TSEITIN };
MDDOpts() : expl_alg(E_GREEDY), expl_strat(E_KEEP), decomp(D_PROP) {}
MDDOpts(const MDDOpt... |
#include <iostream>
//A pointer is just an adress of memory.
//type of the pointer do not matter, it is always an int (memory Adress).
int main() {
void* ptr1 = nullptr; // 0 Is not a valid memory adress = NULL
int var = 8;
int* ptr2 = &var; // we storage the adress of var in ptr2
*ptr2 = 10;
char* buf... |
#include "doublecalendar.h"
#include "ui_doublecalendar.h"
DoubleCalendar::DoubleCalendar(QWidget *parent) :
QDialog(parent),
ui(new Ui::DoubleCalendar)
{
ui->setupUi(this);
}
DoubleCalendar::~DoubleCalendar(){
delete ui;
}
void DoubleCalendar::setDays(QDate init,QDate end){
ui->calendar_init->se... |
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include "tracker.hh"
#include <iomanip>
#include <sstream>
#include <iostream>
#include <cmath>
#include <numeric>
#include <chrono>
#include "thunk/ggutils.hh"
#include "thunk/thunk_reader.hh"
#include "util/optional.hh"
#include "util/e... |
#ifndef LINKED_LIST_H
#define LINKED_LIST_H
#include <cstdlib>
#include "node.h"
#include <iostream>
using namespace std;
/******************************************************
** Class: Linked_List
** Purpose: A class to hold a pointer to the head node
** of a linked list as well as an integer representing
** how ... |
#pragma once
#include "plbase/PluginBase.h"
#include <game_sa\RenderWareTypes.h>
#pragma pack(push, 4)
class PLUGIN_API CScene
{
public:
RpWorld *m_pRpWorld;
RwCamera *m_pRwCamera;
};
#pragma pack(pop)
extern PLUGIN_API CScene &Scene; |
#include<cstring>
#include<cstdio>
#include<iostream>
#include<algorithm>
#define MAXI 1000000001
#define LIMIT1 100000
#define LIMIT2 20
#define LIMIT3 3*LIMIT2
#define getint(n) scanf("%d",&n)
#define putintn(n) printf("%d\n",n)
#define putintc(a) printf("%d,",a);
using namespace std;
struct range
{
int s,e;
}ranges... |
#ifndef TACHE_H
#define TACHE_H
#include <iostream>
#include <QString>
#include "timing.h"
using namespace std;
using namespace TIME;
//Statut = 0 => Tache non programmée, à venir. Date d'échéance non dépassée
//Statut = -1 => Tache non programmée, date d'échéance dépassée
//Statut = 1 => Tache programmée/réalisée
... |
//知识点:单调栈
/*
维护一个单调递减的单调栈
栈中的牛都是没有 仰望对象 的牛
对于一个新加入的牛,
while循环,来弹出栈顶身高小于它的牛
并使 被弹出牛的仰望对象 = 新牛
然后将新牛加入栈中
最后输出即可
*/
#include<cstdio>
#include<stack>
using namespace std;
const int MARX = 1e5+10;
int n,h[MARX],ans[MARX];
stack <int> s;
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
... |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define dbg(x) cout << (#x) << " is " << (x) << endl;
#define dbg2(x, y) cout << (#x) << " is " << (x) << " and " << (#y) << " is " << y << endl;
#define dbgitem(x) ... |
#ifndef GNLAYERMAIN_H
#define GNLAYERMAIN_H
#include "GnLayerBackground.h"
class GnLayerMain : public GnLayer
{
protected:
GnLayerBackground* mpBackground;
public:
GnLayerMain();
virtual ~GnLayerMain(){};
bool CreateBackgroundFromFile(const gchar* fileName);
inline GnLayerBackground* GetBackground() {
return... |
//class RefWinApi
//import WinApi
//#using <mscorlib.dll>
//using namespace System;
using namespace System::Runtime::InteropServices;
namespace RefWinApi
{
//Mesagebox
[DllImport("user32.dll",CharSet=CharSet::Auto)]
int MessageBox(void* hWnd,wchar_t* text,wchar_t* caption,unsigned int type);
//HANDLE OpenProcess(
... |
#include <stdio.h>
#include <ctype.h>
char _I_Buffer[2110],_O_Buffer[2110],*_I_pos = _I_Buffer,*_O_pos = _O_Buffer;
inline int get()
{
register int res = 0, k = 1;
while (!isdigit(*_I_pos))
if (*_I_pos++ == '-')k = 0;
do res = (res << 3) + (res << 1), res += (*_I_pos++) & 15;while (isdigit(*_I_pos));
return k ?... |
// Created on: 1993-08-18
// Created by: Christophe MARION
// 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 ... |
// Created on: 2016-04-07
// Copyright (c) 2016 OPEN CASCADE SAS
// Created by: Oleg AGASHIN
//
// 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 as publi... |
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <set>
using namespace std;
/* → → → → → → → → → → → → → → → → → → → → → → → → → → → →
→ → → → → → → → → → → → → → → → → → → → → → → → → → → → */
#define int long long
#define ld lon... |
#pragma once
#include <iostream>
#include <sstream>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <string.h>
#include <windows.h>
#include <fstream>
#include <iomanip>
#include <ctime>
using namespace std;
#define Enter 13
#define ESC 27
#define Back 8
#define... |
#include "sudoku.h"
#include "depth_first_search.h"
int main(int argc, char ** argv)
{
sudoku* s;
depth_first_search* dfs;
for (int i = 0; i < 10; i++)
{
s = new sudoku();
dfs = new depth_first_search();
dfs->init(s);
delete s;
dfs->execute(true);
delete dfs;
}
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e3+3;
int d[maxn];
typedef long long ll;
int main(){
int n,m;
scanf("%d",&n);
ll sum = 0;
for(int i=1;i<=n;++i){
int a,b;
scanf("%d%d",&m,&a);
for(int i=1;i<m;++i){
scanf("%d",&b);
if(b<0)a+=b;... |
#pragma once
#ifndef TCylinder_H
#define TCylinder_H
#include "mesh.h"
namespace T3D
{
class TCylinder :
public Mesh
{
public:
TCylinder(float radius, float height, int density);
virtual ~TCylinder (void);
};
}
#endif |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2016, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective own... |
#ifndef __VIVADO_SYNTH__
#include <fstream>
using namespace std;
// Debug utility
ofstream* global_debug_handle;
#endif //__VIVADO_SYNTH__
#include "sblr30_4_opt_compute_units.h"
#include "hw_classes.h"
struct img_img_update_0_write0_merged_banks_12_cache {
// RAM Box: {[-4, 1920], [-1, 1080]}
// Capacity: 96... |
// Exceptions.h
#ifndef PARSER_PARSER_EXCEPTIONS_H
#define PARSER_PARSER_EXCEPTIONS_H
#include <stdexcept>
#include <string>
namespace parser
{
/**
* @brief Represents all errors found in parsed document.
*/
class ParseException : public std::logic_error
{
public :
explicit ParseException(... |
#include<iostream>
#include<conio.h>
using namespace std;
class bags
{
private:
int nobags,l,m,s;
float cl,cm,cs;
public:
bags(int n):nobags(n){l=nobags/20,m=(nobags%20)/10,s=(nobags%20)%10;
if(s==0) s=0; if(s<=5) s=1; else s=2;
cl=l*1.8, cm=m*1.0, cs=s*0.6;}
void setnobags(int n)
{
nobags=n;
}
int getnobag... |
#include <CPU.h>
#include <PSException.h>
#include <iostream>
// TODO: clever c++11 pointer stuff
cpu::cpu(memoryInterface *memIn)
{
// this pointer should be handled better - unique ptr perhaps
memory = memIn;
// initialse coprocessors
cop[0] = &SCC;
cop[2] = >E;
/... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
// Copyright (c) 2012-2017 The Cryptonote developers
// 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.
#pragma once
#include "../IntegrationTestLib/BaseFunctionalTests... |
#include "DeleteChat.h"
boost::property_tree::ptree DeleteChat::execute(std::shared_ptr<Controller> controller) {
return controller->deleteChat(commandParams);
}
DeleteChat::DeleteChat(boost::property_tree::ptree ¶ms) : BaseCommand("DeleteChat") {
commandParams = params;
}
|
#ifndef SHADER_H
#define SHADER_H
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "debug.h"
#include <string>
class Shader{
public:
Shader();
virtual ~Shader();
GLuint ID;
GLuint blendID;
// Sets the current shader as active
Shader &use();
// Compiles the shader from ... |
#pragma once
#ifndef Security_Student_H
#define Security_Student_H
#include "student.h"
class SecurityStudent : public Student {
public:
SecurityStudent(string, string, string, string, int, int, int, int, Degree);
Degree GetDegreeProgram();
void Print();
private:
Degree degreeType;
};
#endif |
// Created on: 1992-08-18
// Created by: Arnaud BOUZY
// 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 L... |
/*
* Copyright (C) 2013 Tom Wong. All rights reserved.
*/
#ifndef __GT_DOC_COMMAND_H__
#define __GT_DOC_COMMAND_H__
#include "gtobject.h"
#include <QtWidgets/QUndoCommand>
GT_BEGIN_NAMESPACE
class GtBookmark;
class GtDocModel;
class GtDocNote;
class GtDocRange;
class GT_VIEW_EXPORT GtDocCommand : public QUndoComm... |
/*
* Copyright (c) 2014-2017 Detlef Vollmann, vollmann engineering gmbh
*
* 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)
*/
#include "shape.hh"
#include "extgraph.hh"
namespace exercise
{
Color::Color(doub... |
#pragma once
#include <QWidget>
class MsWordWrapper : public QWidget
{
public:
MsWordWrapper( QWidget* parent = Q_NULLPTR );
void OpenFile( QString filename );
};
|
#include "DX11RenderSystem.h"
#include "DX11IndexBuffer.h"
#include "dx11Utils.h"
namespace HW{
DX11IndexBuffer::DX11IndexBuffer() : m_uBitsPerIndex(0), m_uIndexCount(0){
m_pIndexBuffer = NULL;
}
DX11IndexBuffer::~DX11IndexBuffer(){
ReleaseInternalRes();
}
// Create index Buffer into ID3D11Buffer*
// Curre... |
/**
* @author divyakhetan
* @date 30/12/2018
*/
#include<bits/stdc++.h>
using namespace std;
int main(){
cout << "Enter a number ";
int n;
cin >> n;
for(int i = 1; i <= n; i++){
if((i % 3 == 0) && (i % 5 == 0)) cout << "FizzBuzz ";
else if(i % 3 == 0) cout << "Fizz ";
else if(i % 5 == 0) cout << "Buzz ";... |
/*
* HTTPStreamer.h
*
* Created on: 2 Mar 2011
* Author: two
*
* Currently used to transport data as a application/octetstream in HTTP. Just ignores the header/request being
* received and gives a HTTP/1.0 200 OK status. This class is paritally threaded. But does not listen, pass in a
* socket of a pr... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 100
struct cube{
char color[6];
}A,B;
void clockwise(){
char tmp = B.color[4];
B.color[4] = B.color[2];
B.color[2] = B.color[1];
B.color[1] = B.color[3];
B.color[3] = tmp;
}
void forword(){
... |
#include "Player.h"
#include "PlayerStandingState.h"
#include "PlayerJumpingState.h"
vector<RECT> LoadRECT(PlayerState::StateName state)
{
vector<RECT> listSourceRect;
RECT rect;
switch (state)
{
case PlayerState::JumpString:
rect.left = 10; rect.top = 1870; rect.right = rect.left + 34; rect.bottom = rect.top ... |
// 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... |
#include <iostream>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#define PIC1 "Z:/Sai/Bangumi/paint/back2.jpg"
#define VID1 "D:/Cocoa/2016-1月番/OVA/【minori】EdenOP.mp4"
int First_Test_IMG_IMREAD(const std::string &path) {
cv::Mat img = cv::imread(path);
if (!img.empty()) {
cv:... |
//
// Created by root on 12/29/19.
//
#ifndef CPPSSWIMPL_CPPINVOKEPYTHON_HH
#define CPPSSWIMPL_CPPINVOKEPYTHON_HH
class cppinvokepython {
};
#endif //CPPSSWIMPL_CPPINVOKEPYTHON_HH
|
#pragma once
void Dijkstra(std::vector<std::vector<unsigned>> const &matrix, unsigned const &startNode, std::ofstream &output);
void FindNextEdge(std::vector<unsigned> const &distance, std::vector<bool> &visited, unsigned ¤tNode);
void PrintCurrentState(std::vector<unsigned> const &distance, std::ofstream &outp... |
#include "Langevin.h"
#include "random.h"
#include "predefine.h"
#include "matrix_elements.h"
double const tiny = 1e-10;
double qhat_small_angle_LOpQCD(int pid, double E, double M, double T){
double CR = (pid==21) ? CA : CF;
double mD2 = t_channel_mD2->get_mD2(T);
double Q2cut = std::max(std::min(cut*mD2, ... |
#include <Timer.h>
//#include <mcp_can.h>
//#include <mcp_can_dfs.h>
/*
* TODO:
* CASEY - optimize libraries so THEY AREN'T SO BIG DEAR JESUS THE SIZE OF THOSE
*
*/
#include <Bridge.h>
#include <Wire.h>
#include <YunServer.h>
#include <YunClient.h>
// For IMU
#include <I2Cdev.h>
#include <ADXL345.h>
#include <... |
#include "MySolution1.h"
#include <string>
#include <iostream>
#include <algorithm>
#include <assert.h>
#include <vector>
using namespace std;
int StupidRSQ(vector <int> arr, int begin, int end){
int result = 0;
for (int i = begin; i <= end; i++){
result += arr[i];
}
return result;
}
void StupidNextPermutati... |
/*
* 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>
using namespace std;
struct Componentes
{
float levadura , // KG
malta , // KG
agua , // litros
cebada , // KG
lupulos ; // KG
} ;
struct DatosMes
{
Componentes s1 , // semana 1
s2 ,... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Cezary Kulakowski (ckulakowski)
*/
#ifndef OP... |
#include <cstdio>
int main(){
int t1, t2, n, m, z;
scanf("%d %d %d %d %d", &t1, &t2, &n, &m, &z);
printf("%d\n", z * (t1 * n + t2 * m));
return 0;
} |
// Created on: 1993-01-09
// Created by: CKY / Contract Toubro-Larsen ( SIVA )
// 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
... |
#pragma once
#include <QGraphicsPixmapItem>
class Window;
#include "Connection.h"
#include "WallItem.h"
class Window :public WallItem
{
private:
QImage img;
public:
Window(Connection* c1, Connection* c2);
double calculateRotation();
void deatach() override;
void updatePositions() override;
Connection** getCo... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
long n,q;
cin>>n>>q;
vector<ll> a(n);
for(int i=0;i<n;i++) {
cin>>a[i];
}
while(q--) {
long x,l,r;
cin>>x>>l>>r;
if(x==1) {
a[l-1]=r;
} else {
ll peri=0;
i... |
#include "WinCommon.h"
#include "DXCommon.h"
#include "MyTeapot.h"
MyTeapot::MyTeapot(void)
{
m_vPos = D3DXVECTOR3(-3,1,0);
m_vRot = D3DXVECTOR3(0,0,0);
m_vScale = D3DXVECTOR3(1,1,1);
D3DXMatrixIdentity(&m_mScale);
D3DXMatrixIdentity(&m_mRot);
D3DXMatrixIdentity(&m_mTrans);
}
MyTeapot::~MyTeapot(void)
{
}
v... |
//
// Created by silvman on 3/2/19.
//
#include <string>
#include <unordered_map>
#include <iomanip>
#include "HTTPUtility.h"
std::string eeskorka::utility::URLDecode(const std::string &uri) {
std::string ret;
char rune = 0;
unsigned coded = 0;
size_t len = uri.length();
for (unsigned i = 0; i < ... |
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <vector>
using namespace std;
typedef long long ll;
const int N = 1000111;
vector< pair<int, int> > a[N];
vector< pair<int, int> > b[N];
vector< pair<int, int> > cur;
int main() {
int m, n, w;
int it = 0;
while (true) {
++it;
... |
/* -*- 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.
*/
#include "core/pch.h"
#include "adjunct/quick/sync/view/SyncOldP... |
#include <Wire.h>
#include "Adafruit_Si7021.h"
#include "../RFM95.h"
// Singleton instance of the radio driver
RFM95 radio;
// Create the Si7021 temperature and humid sensor object
Adafruit_Si7021 tempHumidSensor = Adafruit_Si7021();
// Function prototypes
int8_t celciusToFahrenheit(int8_t c);
char data[30];
char b... |
#include <vector>
#include <string>
#include <iostream>
using namespace std;
class StringVector : vector<void*>{
public:
void push_back(string *s){
vector<void*>::push_back(reinterpret_cast<void*>(s));
}
void push_back(void *s){ vector<void*>::push_back(s); }
string* operator[](size_t idx){
return reinterpre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.