text stringlengths 8 6.88M |
|---|
#pragma once
#include "definitions.h"
#include <vector>
#include <string>
// Enumeration for the acceptable inputs above
enum class InputArgs {
SIZE,
ROWS,
COLUMNS,
REPETITIONS,
TSTEP,
STREAMS,
PARTITIONS,
TOLERANCE,
UNKNOWN
};
// Keeping the configuration tidy - default values
struct RunConfiguration
{
#if... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* 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 MARKUP_H
#define MARKUP_H
cl... |
#pragma once
#include <iberbar/Base/Unknown.h>
#include <iberbar/Base/UnknownObject.h>
#include <iberbar/Base/Lua/LuaStateRef.h>
#include <iberbar/Base/Result.h>
namespace iberbar
{
typedef void (*PLuaAPIError)( const char*, int, const char* );
extern PLuaAPIError gLuaAPIError;
#define SendLuaAPIError( err ) { ... |
int Fan = 8;
void setup()
{
pinMode(Fan, OUTPUT);
Serial.begin(9600);
}
void loop()
{
digitalWrite(Fan, HIGH);
Serial.print(“Relay ch1 is HIGH”);
delay(3000);
digitalWrite(Fan, LOW);
Serial.print(“Relay ch1 is LOW”);
delay(3000);
}
|
#ifndef TREE_H
#define TREE_H
#include <iostream>
#include <memory>
#include <deque>
template<class type1>
class tree {
template<class type2>
class node {
public:
type2 data;
node * left = nullptr;
node * right = nullptr;
node(type2 data_in) : data(data_in) {}
};
... |
#include <stdio.h>
#define PI 3.141592;
#define PRINT_HELLO printf("Hello\n");
int main(){
PRINT_HELLO
}
|
// KC Text Adventure Framework - (c) Rachel J. Morris, 2012 - 2013. zlib license. Moosader.com
#include <iostream>
#define USE_DEBUG 0
#ifndef _DEBUGLOGGER
#define _DEBUGLOGGER
namespace Debug
{
void Out( std::string text );
void Err( std::string text );
}
#endif
|
#include "Use.h"
#include "Value.h"
#include "User.h"
using namespace LLVM;
Use::Use(llvm::Use *base)
: base(base)
{
}
inline Use ^Use::_wrap(llvm::Use *base)
{
return base ? gcnew Use(base) : nullptr;
}
Use::!Use()
{
}
Use::~Use()
{
this->!Use();
}
void Use::swap(Use ^RHS)
{
base->swap(*RHS->base);
}
Value ^Use:... |
/* -*- 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.
*
* \file
* \author Owner: Patryk Obara (pobara)
*/
#ifndef WEBA... |
#include <cstdio>
#include <cstdlib>
#include <string>
#define HTML_HEADER "<html> \
<head> \
<title>File upload</title> \
</head> \
<body>"
#define HTML_FORM " <form enctype=\"multipar... |
// Created by: Kirill GAVRILOV
// Copyright (c) 2019 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 as published
// by the Free Sof... |
// Copyright (c) 2012-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.... |
#ifndef _UNORDER_H
#define _UNORDER_H
#include"linklist.h"
template<class T>
class unorderlist:public linklist<T>{
public:
bool search(const T& carid);
void insertFirst(const T& carid);
void insertLast(const T& carid);
void deleteItem(const T& carid);
};
//======================================... |
/***************************************************
This is a library for the MLX90614 Temp Sensor
Designed specifically to work with the MLX90614 sensors in the
adafruit shop
----> https://www.adafruit.com/products/1748
----> https://www.adafruit.com/products/1749
These sensors use I2C to communicate, 2... |
// Question => Find the character from the string who's occurence is highest
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s = "dsfhlidfglunghfdjvhfblvhvbghjsfllljakddf";
int freq[26];
for(int i=0; i<26; i++){
freq[i] = 0;
}
for(int i=0... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 100
#define INF 0x3f3f3f3f
#define DEVIATION 0.00000005
typedef long long LL;
LL lcm(LL a, LL b){
return a*b/__gcd(a,b);
}
int main(int argc, char const *argv[])
{
int N,M;
int num[MAXN];
w... |
#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... |
#ifndef PERSONAGEM_H
#define PERSONAGEM_H
#include <stdlib.h>
#include <string>
class Personagem
{
public:
Personagem(int id);
void CriaAleatorio();
void CriaManual();
void Ficha();
int id;
float forca;
float constituicao;
float destreza;
float agilidade;
float carisma;
f... |
/*********************************************************\
* 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 <math.h>
#include <iostream>
#include "triangle.h"
#include <fstream>
int main()
{
triangle a;
a.set_a(5, 5);
a.set_b(6, 1);
a.set_c(8, 1);
vector <triangle>* mas = new vector <triangle>;
mas->push_back(a);
//the input to a file
//ofstream file;
//file.open("File.txt"... |
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_Chess.h"
#include "ChessBoard.h"
#include <map>
#include <qwidget.h>
#include <qbrush.h>
#include <qimage.h>
#include <qmouseeventtransition.h>
class Chess : public QMainWindow
{
Q_OBJECT
public:
Chess(QWidget *parent = Q_NULLPTR);
private:
Ui::ChessClas... |
#include "Components/wifi.h"
#include "Components/http.h"
#include "Components/ws.h"
#include "Components/ota.h"
#include "Components/webSocketAsync.h"
#include <WiFi.h>
#include <EEPROM.h>
#include <nvs_flash.h>
#include <nvs.h>
#include <esp_system.h>
#include <Stepper.h>
bool val = true;
void getTempsAndReport( v... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Project_152.h"
#include "ParentCombatCharacter.h"
#include "PaperFlipbookComponent.h"
#include "Components/TextRenderComponent.h"
#include "Engine.h"
#include "CombatGrid.h"
#include "Project_152Character.h"
#include "Project_152G... |
#pragma once
using namespace std;
class AbsShaderCreator {
public:
void SetNext(shared_ptr<AbsShaderCreator> next);
HRESULT CreateShader(ComPtr<ID3D11Device> d3dDevice, string type, const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage);
void SetPiplineShader(ComPtr<ID3D11DeviceCon... |
#ifndef _INPUT_H_
#define _INPUT_H_
#include <Mouse.h>
#include <Keyboard.h>
#include <memory>
#pragma once
class Input
{
public:
Input();
~Input();
void Initialize(HWND hwnd);
void Update(float elapsedTime);
DirectX::Keyboard* GetKeyboard() const { return m_keyboard.get(); }
DirectX::Mouse* GetMouse() cons... |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
int climbStairs(int n) {
//基本思想:动态规划法,利用已求的信息计算未求的信息
//动态方程dp[i]=dp[i-1]+dp[i-2],因为可以跳1阶或者2阶,所以当前阶跳数等于上阶跳数与上上阶跳数之和
if (n == 1)
return 1;
if (n == 2)
return 2;
vector<int> dp(n, 0);
dp[0] = 1;
dp[1]... |
/** Minified Splitter class from weekly-assignment-03 (a split tool,
* implementing a class Splitter, which has a suitable public
* interface to do splitting related operations)
* @author Daniel "3ICE" Berezvai
* @student_id 262849
* @email daniel.berezvai@student.tut.fi
*/
#include "splitter.hh"
using ... |
#include "../gl_framework.h"
using namespace glmock;
extern "C" {
DLL_EXPORT void CALL_CONV glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
}
}
|
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define show(x) for(auto i: x){cout << i << " ";}
typedef long long ll;
int main()
{
int x[2];
cin >> x[0] >> x[1];
int ans = 0;
rep(i, 2){
if(x[i] == 1){
ans +... |
#define M 7
#include <iostream>
using namespace std;
class Node
{
public:
Node* next;
int data;
};
class HashNode
{
public:
Node* first = NULL;
};
HashNode* createTable(int len)
{
HashNode hashTalbe[len];
return hashTalbe;
}
bool insertHashTable(HashNode* hashTalbe, int dat... |
// Created on: 1997-11-21
// Created by: ZOV
// Copyright (c) 1997-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... |
/* -*- 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.
*/
#include "core/pch.h"
#include "modules/history/history_module.h... |
#include<cstdio>
#include<iostream>
#include<string>
#include<cstring>
#include<queue>
#include<map>
using namespace std;
int n,f,g;
string s[27];
int dx[]={0,-1,-1,-1,0,1,1,1};
int dy[]={1,1,0,-1,-1,-1,0,1};
void dfs(int x,int y){
s[x][y]='0';
for(int k=0;k<8;k++){
f=x+dx[k];
... |
/*
* Convert .pcap file from VLP-16 to .pcd files.
*
* Author: David Butterworth, 2019.
* using code from PCL and Tsukasa Sugiura.
*
*/
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <pcl/io/pcd_io.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.... |
#pragma once
#ifndef _CS_COMMUNICATION_H
#define _CS_COMMUNICATION_H
#include "stdafx.h"
class csCommunication
{
private:
#define BUF_SIZE 1024
#define SERVER_PORT 798
#define DEFAULT_PORT "798"
#define MSG_BUF_SIZE 1024
public:
csCommunication();
~csCommunication();
private:
WORD winsock_ver;
WSADATA wsa_data;
... |
#include <string>
#include <vector>
using namespace std;
class ASTProg;
class ASTStatExpr;
class ASTStatAssignExpr;
class ASTExpr;
class ASTExprBinary;
class ASTExprTernary;
class ASTExprID;
class ASTExprINT;
class ASTvisitor
{
public:
virtual void visit(ASTProg &node) = 0;
virtual void visit(ASTStatExpr &... |
/*
* This node is to manage parking transfer system
* Inputs:
* hardware GPIO status for car entrance
* ROS message from sensors: car_status, lpr information
* ROS message translated from upper software's MQTT commands
* Outputs:
* hardware modbus operation to driver guidance screen
* ROS message... |
#pragma once
namespace misc
{
struct AliasList
{
typedef vector<pair<string, string> > list_t;
list_t list;
void load(const string& filename);
const char* findAlias(const char* key);
};
} |
#include "Bitmap.hpp"
Bitmap::Bitmap(const char* fileName)
{
this->loaded = this->load(fileName);
if (this->loaded)
{
this->extractPixels();
}
}
bool Bitmap::load(const char* imageLocation)
{
std::ifstream file(imageLocation);
if (file)
{
file.seekg(0, std::ios::end);
... |
#include <iostream>
#include <cmath>
using namespace std;
bool isprime(int a){
if(a == 1)
return false;
if(a == 2)
return true;
for(int i = 2; i < sqrt(a) + 1; i++){
if(a%i == 0)
return false;
}
return true;
}
int main(){
int n, m;
cin >> n >> m;//第n个到第m个
int cut = 0;
int num = 0;
int i = 1;
while... |
#include <bits/stdc++.h>
using namespace std;
long long int n,m;
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n >> m;
for(int i =n; i<=m;i++){
cout << i << " ";
}
return 0;
} |
#include <iostream>
#include <vector>
#include <string>
using namespace std;
bool map[1001][1001] = {false};
int dx[4] = {0,0,2,-2};
int dy[4] = {2,-2,0,0};
class NotTwo
{
public:
int width,height;
int sizeX,sizeY;
bool checkPut(int x,int y)
{
int cx,cy;
for (int i=0; i<4; ++i) {
cx = x + dx[i];
cy =... |
#include<iostream>
#include<string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
template <typename T>
void swap(T &a,T &b){
// a=a^b;
// b=a^b;
// a=a^b;
T temp;
temp=a;
a=b;
b=temp;
}
template <typename T>
void swap(T a[],T b[],int size){
T tem... |
/*
Copyright 2021 University of Manchester
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 writing, s... |
/*
* ====================================================================
* CAppuifwEventBindingArray.h
*
* class CAppuifwEventBindingArray & related utilities
*
* Copyright (c) 2005 Nokia Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... |
#include "notice_merger.hpp"
#include "prepare.hpp"
#include "utils/log.hpp"
#include "utils/assert.hpp"
namespace nora {
void notice_merger::start() {
ASSERT(st_);
st_->async_call(
[this] {
ILOG << "merge notices begin";
... |
#ifndef CHARCLASS_H
#define CHARCLASS_H
#include <iostream>
#include <stdlib.h>
#include "LytWString.h"
#include "Link.h"
#include "Tree.h"
#include "SomeDataType.h"
#include "GrammarTree.h"
using namespace std;
class CharClass
{
public:
wchar_t Start;
wchar_t End;
int Type;
int Number;
Ch... |
#include <Arduino.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include "mumble.h"
#include "mumble_data.h"
#include "mumble_channelcounter.h"
#include "config.h"
const char* ssid = WIFI_SSID;
const char* password = WIFI_PASSWD;
const char* host = MUMBLE_SERVER;
const int port = MUMBLE_PORT;
const char * ... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
/* #include <conio.h> */
#include <float.h>
#include <R.h>
#include <Rinternals.h>
#include <Rdefines.h>
#include "mat.h"
#include "mlrc.h"
// #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
... |
#include "Priest.h"
Priest::Priest(const std::string& name, const std::string& type, int health, int damage, int mana) : SpellCaster(type, new PriestState(name, health, damage, mana), new PriestAttack(), new Fireball(static_cast<int>(FIREBALL::PRIEST)), new Healing(static_cast<int>(HEALING::PRIEST))) {
std... |
/******************************************************************************
* $Id$
*
* Project: libLAS - http://liblas.org - A BSD library for LAS format data.
* Purpose: Allocator to allow mapping allocation strategy
* Author: Andrew Bell, andrew.bell.ia@gmail.com
*
******************************... |
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this ... |
#include "specularbTdf.h"
#include <iostream>
Color3f SpecularBTDF::f(const Vector3f &wo, const Vector3f &wi) const
{
return Color3f(0.f);
}
float SpecularBTDF::Pdf(const Vector3f &wo, const Vector3f &wi) const
{
return 0.f;
}
Color3f SpecularBTDF::Sample_f(const Vector3f &wo, Vector3f *wi, const Point2f &sa... |
// PLS : Préparer La Suite
#include <glimac/SDLWindowManager.hpp>
#include <GL/glew.h>
#include <glimac/glm.hpp>
#include <iostream>
struct Vertex2DUV {
glm::vec2 position, texcoords;
Vertex2DUV(float x, float y, float u, float v)
: pos(x,y), texcoords(u,v) {}
};
using namespace glimac;
int main(i... |
//Carl Borillo, Tony Tran, Steven Yacoub
//Class (CECS 282-01 Lab:282-03)
//Project Name: (Prog 2 - Object and Class)
//Due Date: 2/3/2021
//Demo Time: 6:11 PM
#include "Account.h"
#include <iostream>
using namespace std;
int main(){
Account account(100);
account.deposit(50);
account.withdraw(175);
... |
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <pthread.h>
#include "EvHttpSvr.h"
//#include "HttpLogic.h"
#include "CHttpReqDispatch.h"
#include "threadres.h"
#inclu... |
#ifndef UTIL_H
#define UTIL_H
#include <string>
#include <vector>
// TODO(andrei) Separate platform-independent from platform-dependent code.
namespace util {
// Convenience method for converting an ugly (argc, argv) pair into
// a typesafe vector<string>.
std::vector<std::string> argv_to_strvec(int count, char... |
/*
* Rewera-pierwsza.cpp
*
*
*/
#include <iostream>
using namespace std;
bool czy_pierwsza(int n)
{
if(n < 2)
return false;
for(int i=2; i*i <= n; i++)
if(n%i == 0)
return false;
return true;
}
int main(int argc, char **argv)
{
int n;
cout << "Podaj... |
/*
用双端队列的广度优先搜索,保证了搜索完小反转再搜索大反转;
*/
#include<iostream>
#include<queue>
#include<cstdio>
using namespace std;
struct node
{
int x,y,g,s;//坐标,重力状态,反转数
}now,top;
deque<node> q;
char map[1005][1005];
bool vis[1005][1005][5];//标记
int main()
{
int m,n;
cin>>m>>n;
for(int i=0;i<m;i++)
{
scanf("%... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char * argv[])
{
char * romname;
char * spritestxtname;
char thisLine[256];
unsigned char rombank[32768];
int freespace=0;
if (argc!=1 && argc!=3)
{
puts("usage: tool [rom.smc list.txt]");
return 1;
}
if (argc==1)
{
romname=(... |
#include <iostream>
#include <fstream>
#include <string>
#include <dirent.h>
#include <sstream>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
using namespace std;
int file__count(DIR *dp){
struct dirent dirp;
struct dirent *result;
unsigned int file_count=1;
int return_code;
for (return_code = ... |
//program to check whether a string is palindrome
#include<bits/stdc++.h>
using namespace std;
string palindrome(string s,int n)
{
for(int i=0;i<=n/2;i++)
{
if(s[i]!=s[n-1-i])
{
return "No palidrome";
}
return "Palindrome";
}
}
int main(){
string s="";
getline(cin,s);
int n=s.length();
cout<<palindr... |
#include <iberbar/Renderer/GroupCommand.h>
#include <iberbar/Renderer/Renderer.h>
iberbar::Renderer::CRenderGroupCommandManager::CRenderGroupCommandManager()
: m_QueueIdMapping()
, m_UnusedQueueId()
{
}
iberbar::Renderer::CRenderGroupCommandManager::~CRenderGroupCommandManager()
{
}
int iberbar::Renderer::... |
#include "stdio.h"
#include "conio.h"
void main () {
int i=1;
while (i<=10)
printf("%d",i);
i++;
getch();
} |
#include <stdio.h>
#include <string.h>
#include "pico/stdlib.h"
//#include "hardware/adc.h"
//#include "hardware/clocks.h"
#include "hardware/flash.h"
#include "hardware/gpio.h"
#include "hardware/irq.h"
#include "hardware/sync.h"
#include <math.h>
//#include <tusb.h> // if you want to use tud_cdc_connected()
#includ... |
#pragma once
#include "configs.h"
#include "PageDemo.h"
#include "PageSysCfg.h"
#include "PageAioTest.h"
#include "PageDebug.h"
// CToolSheet
class CToolSheet : public CPropertySheet
{
DECLARE_DYNAMIC(CToolSheet)
public:
CToolSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
CToolSheet(LPCTS... |
#include "SFML/Graphics.hpp"
#include "Game.h"
Game g;
int main() {
sf::RenderWindow window({920, 1080, 32}, "Tetris");
{}
sf::RenderWindow window1({920, 1080, 32}, "Tetris");
{}
/**design**/
sf::RectangleShape border;
border.setFillColor(sf::Color::Black);
border.setSize({700, 900});... |
// BEGIN CUT HERE
// PROBLEM STATEMENT
//
// xxxxx...
// ....xxxx
// .x.....x
// .xxxxxxx
//
// Your are given a picture of a snake. Lowercase 'x'
// characters indicate parts of the snake, and '.'
// characters represent
// empty areas. The snake consists of a sequence of
// horizontal ... |
#include <iostream>
int main()
{
int num = 1, den = 1;
for (int d = 11; d < 100; d++) {
if (d%10 == 0) continue;
for (int n = 10; n < d; n++) {
if (n%10 == 0) continue;
double value = double(n)/d;
if (d%10 == n%10 && double(n/10)/(d/10) == value ||
d/10 == n%10 && double(n/10)/(d%10) == value ||
... |
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define FOR(i,n) for(ll i=0;i<n;i++)
#define FOR1(i,n) for(ll i=1;i<n;i++)
#define FORn1(i,n) for(ll i=1;i<=n;i++)
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mod 1000000007;
using namespace std;
int main() {
... |
#include <sstream>
#include "facialExpression.hh"
FacialExpressionTab *FacialExpressionTab::FacialExpressionTab_ = 0;
std::deque<facialExpression> FacialExpressionTab::listFacialExpression_ = std::deque<facialExpression> ();
void FacialExpressionTab::createExpressTab (GtkWidget *p_notebook_)
{
GtkWidget *expres... |
#pragma once
/*
* Lanq(Lan Quick)
* Solodov A. N. (hotSAN)
* 2016
* RemoteTerminal - Create terminal sessions.
*/
#include "LqConn.h"
#include "Lanq.h"
#include "LqWrkBoss.hpp"
#include "LqStrSwitch.h"
#include "LqHttpMdl.h"
#include "LqDfltRef.hpp"
#include "LqHttpPth.hpp"
#include "LqTime.hpp"
#include "LqStr.hp... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2005 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef MODULES_APPLICATIONCACHE_MODULE_H
#define MODULES_APPLICA... |
#include "ThongKe.h"
int main()
{
SetConsoleTitle("QUAN LI THU VIEN - NHOM 53");
resizeConsole(1200,675);
//===DOC FILE
DocDSMaThe();
DocDSDocGia();
DocDSDauSach();
//===THONG KE DG MUON QUA HAN
ThongKeQuaHan(tree);
//===XU LI
bool flag= true;
while(flag)
{
// SetWindow();
int chon;
... |
#ifndef _TRANSITION_H_
#define _TRANSITION_H_
struct SRenderAttributes;
class CTransition
{
public:
virtual ~CTransition(){}
//Rapidez con la que cambia la transición por segundo
virtual void Create( float fSpeed ) = 0;
virtual bool Update() = 0;
virtual void Draw( SRenderAttributes& renderAttribs ) = 0;
virtua... |
#ifndef __MATH_SIMD_H__
#define __MATH_SIMD_H__
/*
===============================================================================
Single Instruction Multiple Data (SIMD)
For optimal use data should be aligned on a 16 byte boundary.
All idSIMDProcessor routines are thread safe.
==================================... |
/* -*- 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.
*/
#include "core/pch.h"
#include "adjunct/quick_toolkit/widgets/OpW... |
class equip_aa_battery
{
weight = 0.01;
};;
class equip_d_battery
{
weight = 0.02;
};
class equip_aa_battery_empty
{
weight = 0.01;
};
class equip_d_battery_empty
{
weight = 0.02;
};
class equip_floppywire
{
weight = 0.01;
};
class equip_satawire
{
weight = 0.01;
};
class equip_scrapelectronics
{
weight = 0.5... |
#include<bits/stdc++.h>
using namespace std;
#define eps 1e-6
struct node{
double j;
double f;
double p;
node(double a=0,double b=0){
j=a;
f=b;
p=b/a;
}
};
bool cmp(const node a,const node b){
if(a.p<b.p)
return true;
else
return false... |
#ifndef PB_GEOMETRY_H
#define PB_GEOMETRY_H
namespace pb
{
class Geometry
{
private:
Geometry(const Geometry& rhs);
Geometry& operator=(const Geometry& rhs);
public:
Geometry() {};
virtual ~Geometry() {};
virtual void Render(const glm::mat4& vp) = 0;
};
class IInstancedGeometry : public Ge... |
#ifndef BULLET_H
#define BULLET_H
#include <vector>
#include "movable.h"
class Bullet : public Movable
{
protected:
Team *_aggressor_team;
bool _is_damage_dealed;
int _power;
public:
virtual void hurtElements();
Bullet(XY pos, XY velo, int bullet_power, Team *aggressor_team, GameManager *game);
... |
#include <iostream>
#include <fstream>
#define HASH_SIZE 97
#define BASE_32_STR "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567="
using namespace std;
bool fileExist(const string& name);
char* hashInit();
short int getHashCode(char carac);
int main(int argc, char** argv)
{
bool *tabool;
char carac, *tab(0);
int length =0;
st... |
//===-- context.cpp - OpenCL Context ----------------------------*- C++ -*-===//
//
// TODO (Zhongliang): Add a license.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief This file contains the implementation of OpenCL context functions
/// and APIs.
///
//===-... |
#include "ConfigManager.h"
#include "URLFetch.h"
#include <stdio.h>
std::string ConfigManager::CONFIG_FILE_DIRECTORY = "Config/";
// Some global constants for easy access to configurations
std::string ConfigManager::CONFIG_GENERAL_FILENAME = "general.ini";
std::string ConfigManager::CONFIG_LEAGUE_FILENAME = "league.in... |
//
// Created by Alejandro Ibarra on 2019-03-07.
//
#ifndef LISTS_COLLECTOR_H
#define LISTS_COLLECTOR_H
#include <iostream>
#include "Node.cpp"
#include <sstream>
#include <string>
using namespace std;
class Collector {
/**
* Fisrt definition of the node and its head
*/
private:
Node *head,*tail;
int lengt... |
#include"print.h"
/*Function for printing the 2 dimension vector*/
int print( vector<vector<double> > &p)
{
for(int i=0; i<(p.size());++i)
{
for(int j=0; j<((p[i]).size());++j)
cout<<p[i][j]<<" ";
cout<<";"<<endl;
}
return 3;
}
/* Function for printing one dimension complex vector*/
int printcomplexvector... |
/** \file
*
* Implementation of QTestStatusChecker
*
* \author Ilaria Segoni
*/
#include "DQMServices/ClientConfig/interface/QTestStatusChecker.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include <iostream>
QTestStatusChecker::QTestStatusChecker() {}
QTestStatusChecker::~QTestStatusChecker() {}... |
#include "Scene.h"
#include "shaders.h"
#include "../__trash.h"
#include "../MyWindow.h"
#include "../App.h"
#include "Camera.h"
#include "../src/IMAGELoad.h"
#include "../algo/perlin.h"
Scene::Scene()
{
/// Shader program
_sp = glCreateProgram();
compileShaderProgramm(&_sp, ".\\terrain.vert", ".\\terrain.fr... |
#ifndef M2G_WRITTER_CONTROLLER
#define M2G_WRITTER_CONTROLLER
#include <bits/stdc++.h>
#include <stdio.h>
#include <stdlib.h>
#include "structures.h"
#include "utils.h"
#include "writer.h"
#include "reader.h"
bool import_file(const char *file_source_name, const char *device_name, const char* path_into_device, bool 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;
const int inf = 1e9 + 7;
int a[10010],s[10010],n;
bool f[10010];
bool dp(int sum)... |
#include "precompiled.h"
#include "game/player.h"
#include "game/bspplayer.h"
#include "game/game.h"
#include "console/console.h"
#include "timer/timer.h"
#include "q3bsp/bleh.h"
#include "q3bsp/bspcollide.h"
#include "q3bsp/bspcache.h"
#define MIN_VELOCITY (0.01f)
#define MIN_MOVE (0.001f)
#define CLAMP_NEG(x) (x < 0... |
#include <vector>
#include <iostream>
#include "AssimpImporter.h"
#include "../Materials/Material.h"
#include "../Shaders/Shader.h"
#include "../Scene/Scene.h"
#include "../ECS/ECS.h"
#include "../ECS/Components/TransformComponent.h"
#include "../ECS/Components/MeshComponent.h"
#include "../ECS/Components/NodeComponent... |
/*
* @lc app=leetcode.cn id=343 lang=cpp
*
* [343] 整数拆分
*/
// @lc code=start
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
int integerBreak(int n) {
vector<int> dp(n+1, 0);
dp[1] = 1;
dp[2] = 1;
for(int i=3;i<=n;i++)
... |
#pragma once
#include "gcpropertyentity.h"
class Gc2DRectPropEntity : public GcPropertyEntity
{
public:
Gc2DRectPropEntity(void);
virtual ~Gc2DRectPropEntity(void);
};
|
#include "ImGuiHelper.h"
#include <stdio.h>
#include "imgui/imgui_impl/imgui_impl_glfw.h"
#include "imgui/imgui_impl/imgui_impl_opengl3.h"
#include "glad/glad.h"
#include "GLFW/glfw3.h"
using namespace studio;
using namespace rttr;
ImGuiView::ImGuiView(GLFWwindow * window)
{
if (!window)
{
glfwSetErrorCallback([]... |
#include "CueBall.h"
CueBall::CueBall()
{
center = Point3(0, TABLETOP + BALL_RADIUS, 0);
center.axis[1] = GetY();
radius = BALL_RADIUS;
colour = color + WHITE;
cueBallAmbient = Point4(0.3, 0.3, 0.3, 1);
cueBallDiffuse = Point4(1, 1, 1, 1);
cueBallDir = Point3(0, -1, 0);
cueBallSpecular = Point4(1,... |
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <forward_list>
#include <memory>
#include <string.h>
#include <string>
#include <unordered_map>
#include <map>
//<map|set> cover <multimap|set> as b-tree
#include <unordered_set>
#include <set>
#include <queue>
#include <stack>
#include <... |
#include <iostream>
int main()
{
std::cin.sync_with_stdio(false);
std::cin.tie(NULL);
int x1, x2, x3, y1, y2, y3;
std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
int ccw = x1 * y2 + x2 * y3 + x3 * y1 - y1 * x2 - y2 * x3 - y3 * x1;
std::cout << (ccw > 0 ? "1\n" : (ccw == 0 ? "0\n" : "-1\n"));
... |
#ifndef __SERVERLOGIC_H__
#define __SERVERLOGIC_H__
#include "Server.h"
#include "Snake.h"
#include "Apple.h"
#include "Map.h"
#include <vector>
#include <unistd.h>
#define APPLES_COUNT 1
class ServerLogic
{
private:
Server server;
std::vector<Snake> snakes;
std::vector<Apple> apples;
void initGame... |
#include <plib.h>
double gammq(double a,double x)
{
double gamser,gammcf,gln;
if (x < 0.0 || a <= 0.0) nrerror("Invalid arguments in routine GAMMQ");
if (x < (a+1.0)) {
gser(&gamser,a,x,&gln);
return 1.0-gamser;
} else {
gcf(&gammcf,a,x,&gln);
return gammcf;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.