text stringlengths 8 6.88M |
|---|
#pragma once
#include <Component.h>
#include <array>
namespace breakout
{
class TransformComponent : public BaseComponent
{
public:
static EComponentType GetType()
{
return EComponentType::Transform;
};
void operator=(const TransformComponent&);
const std::array<float, 2>& GetPosition() const;
T... |
#pragma once
#ifdef _WIN32_WCE
#error "Windows CE 不支持 COlePropertyPage。"
#endif
// CPropPg1 : 属性页对话框
class CPropPg1 : public CPropertyPage
{
DECLARE_DYNCREATE(CPropPg1)
DECLARE_OLECREATE_EX(CPropPg1)
// 构造函数
public:
CPropPg1();
// 对话框数据
enum { IDD = IDD_PROPPAGE1 };
// 实现
protected:
virtual void DoDataExcha... |
#ifndef rule_horde_h
#define rule_horde_h
namespace exception {
namespace rule {
namespace horde {
int getInitialWave();
class Background : public BackgroundBase
{
typedef BackgroundBase Super;
private:
class LineTexture : public RefCounter
{
private:
fbo_ptr m_fbo;
public:
Li... |
#pragma once
#include "../render/CubeMap.h"
#include "Ocean.h"
#include "Sky.h"
class Scene
{
public:
void init(const Settings& settings);
void update(double time);
void setTransforms(const Transforms& transforms);
void draw();
protected:
Settings settings_;
Ocean ocean_;
Sky sky_;
... |
/**
* @file Socket.h
* @author dtuchscherer <daniel.tuchscherer@hs-heilbronn.de>
* @brief Bare Socket Interface
* @details This is an interface of an "abstract" socket,
* derived classes of the base class Socket will then implement
* their own way to create and open a socket.
... |
#pragma once
#include "Primitive.h"
class Sphere : Primitive
{
public:
Sphere(vec3 const& center, float const& radius) : Primitive(PrimitiveID::Sphere)
{
m_center = center;
m_radius = radius;
}
protected:
vec3 m_center;
float m_radius;
}; |
#include "python_dp_multisolver.hpp"
#include <thread>
std::vector<std::vector<int>> find_optimal_partition__DP_multi(int n,
int T,
std::vector<boost::multiprecision::cpp_dec_float_100> a,
std::vector<boost::multiprecision::cpp_dec_float_100> b) {
auto dp = DPSolver_multi(n, T, a, b);
return dp.g... |
#include "MainScene.h"
|
#include <iostream>
#include <vector>
#include <queue>
#define INF 987654321
using namespace std;
struct Node
{
// 최단거리를 구할 때 이전 노드인덱스를 저장함.
vector<int> post;
int index;
int dist = INF;
// weight, nextPoint, isValid
vector<pair<int, pair<int, char>>> next;
bool operator < (const Node &n) co... |
#include <GL/glew.h>
#include <memory>
#include <rend/rend.h>
#include "Components.h"
class Mesh;
class Material;
//! The MeshRenderer class. The class where meshes are drawn to the screen
/*!
This class is used to render 3D objects to your scene.
MeshRenderer is a child of Component so please use the Object class ... |
#include "VerifyRedis1.h"
#include "Logger.h"
#include "Options.h"
#include "hiredis.h"
#include "Util.h"
#include <vector>
using namespace std;
static VerifyRedis1* instance = NULL;
VerifyRedis1* VerifyRedis1::getInstance()
{
if(instance==NULL)
{
instance = new VerifyRedis1();
}
return instance;
}
VerifyRedis... |
#include <iostream>
#include <string.h>
#include <vector>
using namespace std;
class Person
{
public:
void person_init(int age, char *name)
{
if (age >= 0 && age <= 100)
{
m_age = age;
strcpy(m_name, name);
}
}
void show_person()
{
cout << m... |
#include <PA9.h>
#include "IdGenerator.h"
#define DEBUG //outcomment this line if you don't want error messages
//===GLOBALS===
//---3D sprites---
u16 g_n3DSprites = 0;
u8 g_3DSpriteIds[(MAX_3DSPRITES>>3)] = {0};
//---3D palettes
u16 g_n3DPalettes = 0;
u8 g_3DPaletteIds[(MAX_3DPALETTES>>3)] = {0};
//---sp... |
#pragma once
#ifndef RESOURCEMANAGER_H
#define RESOURCEMANAGER_H
#include <SDL.h>
#include "glew.h"
#include <map>
#include <vector>
#include "errorHandler.h"
#include "SOIL.h" //EXTENSION THAT LOADS IMAGES INTO A GLTEXTURE
struct GLTexture {GLuint id; int width, height; };
class TextureCache {
private:
std::map... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2020 Karbo developers
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://... |
#include "formcotroller.hpp"
#include "ui_formcotroller.h"
FormCotroller::FormCotroller(QWidget *parent) :
QWidget(parent),
ui(new Ui::FormCotroller)
{
ui->setupUi(this);
}
FormCotroller::~FormCotroller()
{
delete ui;
... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 1000000
#define INF 0x3f3f3f3f
#define DEVIATION 0.00000005
typedef long long LL;
int table[MAXN+10];
int main(int argc, char const *argv[])
{
string str;
while( cin >> str && str != "." ){
... |
#include "common/lang/date.h"
namespace common {
bool check_date(const char *date) {
int y = 0, m = 0, d = 0;
auto count = sscanf(date, "%d-%d-%d", &y, &m, &d);
if (count != 3 || y < 1970 || y > 2038 || m < 1 || d < 1 || m > 12) {
return false;
}
bool isRunYear = (y % 4 == 0);
int day[12... |
#include "ros/ros.h"
#include "std_msgs/Int32.h"
#include <sstream>
int main(int argc, char **argv)
{
ros::init(argc, argv, "talker");
ros::NodeHandle n;
ros::Publisher chatter_pub = n.advertise<std_msgs::Int32>("chatter", 1000);
ros::Rate loop_rate(10);
int count = 1;
int count1=0;... |
// Sharna Hossain
// CSC 111
// Lab 12 | students_grades.cpp
#include <iostream>
using namespace std;
int main()
{
const int capacity = 10,
MIN = 0,
MAX = 100;
const double numTotal = 3.0;
for (int student = 1; student <= capacity; student++)
{
double sum = 0,
... |
//
// Copyright(c) 2016-2017 benikabocha.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
#include "Path.h"
#include <algorithm>
namespace saba
{
namespace
{
#if _WIN32
const char PathDelimiter = '\\';
const char* PathDelimiters = "\\/";
#else
const char PathDelimiter = '/';
c... |
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
int x;
char c[10],v[10];
void random_generator()
{
srand(time(NULL));
x=rand()%3 +1;
switch (x)
{
case 1:
{strcpy(v,"Piatra");bre... |
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <errno.h>
#include <sstream>
using namespace std;
class RandomColoringDiv2
{
public:
int getCount(int maxR, int maxG, int maxB, int startR, int startG, int startB, int d1, int d2)
{
int subR,... |
#ifndef __RAY_H__
#define __RAY_H__
#include "vector3.h"
//#include "Shape.h"
#include <string>
#include <fstream>
#include <vector>
class Ray {
private:
Vector3 Origin;
Vector3 Direction;
public:
Ray() : Origin( Vector3(0, 0, 0) ), Direction( Vector3(0, 0, 0) ){};
Ray(Vector3 vOrg, Vector3 vDir);
float t;
... |
#include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
/**
* This class represents an individual value/tile of the puzzle
*/
class tile{
private:
int value;
vector<int> triedValues;
bool tileFilled;
public:
tile (){
value = 0;
tileFilled = false;
}
int getValue();
void setV... |
#include "depth_frame.hpp"
#include "icp_registration.hpp"
#include "depth_pose_graph_optimizer.hpp"
#include "depth_to_point_cloud.hpp"
#include "tum_dataset.hpp"
#include "point_cloud_viewer.hpp"
#include <gflags/gflags.h>
#include <opencv2/opencv.hpp>
#include <Eigen/Dense>
#include <algorithm>
#include <random>
#... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, vet[1010], cont=0, ant=0, menor;
while(scanf("%d", &n) && n)
{
for(int i=0;i<n;i++)
scanf("%d %d", &ant, &vet[i]);
ant = 0;
for(int i=0;i<n;i++)
{
if(vet[i]>=4)
{
... |
/*
* contour_format.cpp
*
* Created on: 3 Jan 2014
* Author: sashman
*
* This has been extracted from contour_format.cpp to reduce the size and make it more readable.
*/
#include "terrain_generator.hpp"
//terrain_generator.cpp
extern int crop_height;
extern int crop_width;
//contour_... |
// Copyright Yandex 2012
#ifndef LTR_CLIENT_UTILITY_TRAIN_LAUNCH_INFO_H_
#define LTR_CLIENT_UTILITY_TRAIN_LAUNCH_INFO_H_
#include <string>
#include "boost/unordered_set.hpp"
using std::string;
/**
* Contains all the information about the train launch,
* including name, data iinformation and learner information.
*... |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void Reverse(vector<int> &items)
{
for (int i = 0; i < items.size() / 2; i++)
{
int temp = items[i];
items[i] = items[items.size() - 1 - i];
items[items.size() - 1 - i] = temp;
}
}
int main()
{
// Tes... |
#include "bool_array.h"
#include <cassert>
bool_array::bool_array(size_t size): int_size(size / INTBITS + 1), size_(size), data_(new int[int_size])
{
}
bool_array::bool_array(const std::string& str) : bool_array(str.size())
{
for (auto i = 0; i < str.size(); ++i)
this->set(i, str[i] == '1');
}
bool bool_array::o... |
/*
* Rectangle.h
*
* Created on: May 31, 2016
* Author: g33z
*/
#ifndef RECTANGLE_H_
#define RECTANGLE_H_
#include <iostream>
class Rectangle
{
protected:
double seiteA;
double seiteB;
public:
Rectangle();
Rectangle(double A, double B);
virtual ~Rectangle();
double umfang() const;
double flaeche() c... |
#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 <map>
typedef long long LL;
typedef unsigned long long ULL;
#define PI 3.141592653589... |
#include "Components.h"
#include "glm/glm.hpp"
#include <rend/rend.h>
#include <vector>
#include <functional>
#include <list>
struct Triangle;
//!The ColliderColumn struct is used in StaticModelCollider to have colloums for efficency
/*!
This struct is for StaticModelCollider to help with
effiency and not check f... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "FFT.h"
Mat Img;
Mat FFT_output;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
//open a picture
void MainWindow::on_acti... |
// Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
====================================================================... |
class Solution {
public:
int longestSubstring(string s, int k) {
int n = s.size();
vector<int> counts(26, 0);
// places of each char
for(int i=0;i<n;i++){
char c = s[i];
counts[c-'a']++;
}
// indices of all chars less than k
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
**
** 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.
**
** Espen Sand
*/
#ifndef X11_DRAGWIDG... |
#include "msg_0xd0_displayscoreboard_stc.h"
namespace MC
{
namespace Protocol
{
namespace Msg
{
DisplayScoreboard::DisplayScoreboard()
{
_pf_packetId = static_cast<int8_t>(0xD0);
_pf_initialized = false;
}
DisplayScoreboard::DisplayScoreboard(int8_t _position, const String16& _scoreName)
: _pf_position(_position)... |
#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
#define N 10000
int findSumOfDivisors(vector<int> &p, int num);
vector<int> findPrimes(int n);
bool isPrime(vector<int> &p, int num);
int main()
{
vector<int> pList = findPrimes(N/2);
int sum = 0;
for (int a = 1; a < N; a++) {
int b =... |
#include<bits/stdc++.h>
#define rep(i,n) for (int i =0; i <(n); i++)
using namespace std;
using ll = long long;
int main(){
int N,D;
cin >> N >> D;
int ans = 0;
rep(i,N){
ll p,q;
cin >> p >> q;
double now = sqrt(p*p + q*q);
if(D >= now)ans++;
}
... |
//in funzione per la prima volta su basetta ramata ore 18.02 giorno 08/06/18. Godi popolo.
//versione definitiva 21/07/18, ore 00.15
#define DEBAGG_MODE 0 //a 1 abilita seriale e comunica dati. altrimenti niente.
//DEFINIZIONE PIN I/O
#define PINSENS A1
#define PINPOT A0
#define PININT 3
#define PINRELE 5
#define PI... |
#include <iostream>
#include <LinkedList.h>
#include <string>
int main(void)
{
using namespace std;
string astr("this is a test -> ");
LinkedList<string> tll;
for(int i = 0 ; i < 10; ++i) {
char tmp[4]={0};
tmp [0] = 'a' +i;
string istr ... |
#include<stdio.h>
int main()
{
int T,t,r,i;
double l,w,x1,x2,x3,x4,y1,y2,y3,y4;
scanf("%d",&T);
for(t=1;t<=T;t++)
{
scanf("%d",&r);
l=5.0*r;
x1= -1* (l*45.0)/100.0;
x4=x1;
x2=(l*55.0)/100.0;
x3=x2;
w=(6*l)/10.0;
y1=(w/2);
y2=y1;... |
/*
* @lc app=leetcode.cn id=152 lang=cpp
*
* [152] 乘积最大子序列
*/
// @lc code=start
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
int maxProduct(vector<int>& nums) {
vector<int> maxF(nums), minF(nums);
for(int i=1;i<nums.size();i++)
... |
//排序算法:冒泡排序、快速排序、归并排序、堆排序、桶排序、插入排序、选择排序、shell排序
//交换函数swap
void swap(int &a, int &b){
int temp = b;
b = a;
a = temp;
}
//冒泡排序
void BublbleSort(vector<int> &nums){
if(nums.empty())
return;
bool flag = true;
for(int i = 0; flag && i < nums.size()-1; ++i){
flag = false;
for(int j = nums.siz... |
/*
* 题目:3. 无重复字符的最长子串
* 链接:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/
* 知识点:双指针
*/
class Solution {
public:
int lengthOfLongestSubstring(string s) {
vector<int> vis(128, -1); // 存储 vis[s[i]] 表示 s[i] 上次出现的位置
int ans = 0, start = 0;
for (int end = 0; e... |
/****************************************
@_@
Cat Got Bored *_*
#_#
*****************************************/
#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);
#d... |
#pragma once
// MainGame대신 돌아갈꺼
class Program
{
private:
class Rect* rect;
class BackGround* bg;
class Camera* mainCamera;
class BaseBackGround* baseBg;
class MiniMap* miniMap;
LPDIRECT3DTEXTURE9 pTex[3];
// 텍스에 대한 정보를 저장할 곳
LPDIRECT3DTEXTURE9 pRenderTexture;
// 텍스에 대한 표면 (색상값 설정)
LPDIRECT3DSURFACE9 pRend... |
#ifndef CTP_FTDC_STRUCT_PRINT_FUNCTION_H_
#define CTP_FTDC_STRUCT_PRINT_FUNCTION_H_
#include <iostream>
#include <sstream>
inline std::ostream& operator << (std::ostream& os, const CThostFtdcDisseminationField& ftdc_struct) {
os << "ftdc_struct(CThostFtdcDisseminationField) ---> SequenceSeries:" << ftdc_struct.Sequ... |
//
// Created by jeremyelkayam on 10/16/20.
//
#pragma once
#include "special_item.hpp"
class Bomb : public SpecialItem {
private:
sf::Sprite fuse_sprite;
public:
Bomb(sf::Texture &body_tex, sf::Texture &fuse_tex, sf::SoundBuffer &fuse_sound, float appear_time);
void draw(sf::RenderWindow &window, ColorGrid... |
#include "Entity.h"
Entity::Entity(void)
{
numComponents = 0;
for(int i = 0; i < numComponents; i++)
{
components[i] = NULL;
}
}
Entity::~Entity(void)
{
}
void Entity::Init()
{
}
void Entity::Update()
{
dfAssert(numComponents < maxComponents);
for(int i = 0; i < numComponents; i++)
{
(*components[i])... |
#include<iostream>
using namespace std;
class student
{private:
int x;
int y;
public:
student()
{ x=1;
}
void input(int y)
{
x=x+y;
cout<<x<<endl;
}
void display()
{ cout<<x<<endl;
}
}; |
// Handout #1: Source code of a C++ Program, which
// converts distance in miles to kilometers.
#include <iostream> //inclusion of support for doing input & output
#include <iterator> // std::ostream_iterator
#include <vector> //inclusion of support for doing input & output
#include <algorithm> //inclusion ... |
// Created on: 2013-05-20
// Created by: Mikhail PONIKAROV
// Copyright (c) 2003-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.... |
Matrix::Matrix(int row, int col){
int temp [row][col];
storage = temp;
this.row = row;
this.col = col;
}
Matrix::~Matrix(){
delete [][]storage;
}
void Matrix::set(int row, int col, int data){
storage[row][col] = data;
}
int Matrix::get(int row, int col){
return storage[row][col];
}
|
// Created on: 2001-09-11
// Created by: Julia DOROVSKIKH
// Copyright (c) 2001-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1... |
#include<stdio.h>
#include<iostream>
using namespace std;
int n;
long long a[100020],l[100020],r[100020],z,mx;
int main()
{
scanf("%d",&n);
for(int i=1;i<n;i++)
scanf("%d",a+i);
for(int i=1;i<=n;i++)
if(a[i-1]>1)
l[i]=l[i-1]+a[i-1]/2*2;
for(int i=n;i>0;i--)
if(a[i]>1)
r[i]=r[i+1]+a[i]/2*2... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* @author Arjan van Leeuwen (arjanl) and Espen Sand
*/
#include "core/pch.h"
#includ... |
// Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
#include <iostream>
#include "utl/time.h"
#include "utl/vector.h"
#include "utl/ring.h"
#include "utl/pool.h"
#include "utl/log.h"
#include "utl/makima.h"
struct X {
X() {
puts("default constructor");
}
X(int y) {
puts("argument constructor");
x = y;
}
~X() {
puts(... |
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
class Solution {
public:
int findPeakElement(vector<int>& nums) {
if (nums.size() == 1)
return 0;
int low = 0, high = nums.size() - 1;
while (low <= high)
{
int mid = (low + high) / 2;
if ((mid == nums.size() - 1 && nums[mid]... |
// Ashley M Sands (gizzmo123456) 2018
#include "AudioUtills.h"
#include "Sound/SoundWave.h"
AudioUtills::AudioUtills()
{
audioClip = nullptr;
}
AudioUtills::~AudioUtills()
{
}
float AudioUtills::GetAmplitudeData(int startSample, int endSample )
{
// Check that there is raw sound data to read from.
if ( !audio... |
//
// Created by 钟奇龙 on 2019-05-16.
//
#include <vector>
#include <iostream>
using namespace std;
int getMaxLength(vector<int> arr,int target){
if(arr.size() == 0 || target <= 0) return 0;
int maxLength = 0;
int left = 0;
int right = 0;
int sum = arr[0];
while(right < arr.size()){
if(su... |
/*
** EPITECH PROJECT, 2021
** htop-ncurses
** File description:
** module
*/
#include "Module.hpp"
Module::Module()
: _prefix("prefix: "), _content("content"), _suffix("suffix"), _colorP(0), _colorC(0), _y(3), _x(3), _display(CONTENT), _set(NULL)
{}
Module::Module(size_t y, size_t x, std::string const &content, si... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <quic/common/test/TestPacketBuilders.h>
#include <quic/state/QuicStateFunctions.h>
namespace quic::test {
AckPacketBui... |
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <cmath>
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
Tre... |
#include "mainwindow.h"
#include "welcomescreen.h"
#include <QApplication>
#include <QtSql> //For SQLite
#include <QtDebug> //DebugMessages
#include <QFileInfo>
#include "basesettings.h"
using namespace std;
//BaseSettings bsw;
void OpenSettings();
int loadDatabase();
int main(int argc, char *a... |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
int res = 0;
int uniquePaths(int m, int n) {
//基本思想:递归回溯法,超时
Recursion(0, 0, m, n);
return res;
}
void Recursion(int row, int col, int m, int n)
{
if (row == n - 1 && col == m - 1)
{
res++;
return;... |
// Created on: 1998-06-03
// Created by: data exchange team
// Copyright (c) 1998-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... |
#include "LHEAna.h"
// CMSSW include
#include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
// ROOT include
#include "TLorentzVector.h"
using namespace edm;
// ------------ method called... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 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 DAPI_JIL_SUPPORT
#include "modules/de... |
#include <iostream>
#include "evaluator/evaluator.h"
extern variabile var[1000];
std::string s="tan(x)/log(x)";
struct Queue infixQ,postQ;
int main() {
//std::cin>>x;
//errorHandle("masini");
putInfixQueue(s,infixQ);
if(userVariables)
{
for(unsigned int i=0;i<lungimeVal;++i)
{
... |
//
// talkmanagertests.hpp
// AutoCaller
//
// Created by Micheal Chen on 2017/7/19.
//
//
#ifndef talkmanagertests_hpp
#define talkmanagertests_hpp
#include "testbase/BaseTest.h"
DEFINE_TEST_SUITE(TalkManagerTests);
class TalkManagerTestBase : public TestCase
{
public:
virtual std::string title() const ove... |
#include <pch.h>
#include "_Audio/AudioStream.h"
#ifdef NANA_ENABLE_AUDIO
#include <_/charset.h>
namespace Audio {
//class AudioStream
bool AudioStream::open(const std::string& file)
{
fs_.open(to_osmbstr(file), std::ios::binary);
if(fs_)
{
wave_spec::MasterRIFFChunk riff;
fs_.read(reinterpret_cast<char*>(&r... |
#include "Debug.h"
#include "Shader.h"
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace gg;
Shader::Shader(const std::string& vertexFilePath, const std::string& fragmentFilePath):
_program(0),
_vertexShader(0),
_fragmentShader(0),
_vertexFilePath(vertexFilePath),
_fragm... |
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "options.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
ToptionsFrm *optionsFrm;
//----------------------------... |
#ifndef SIMGRAPHICS_EXAMPLES_SIMINPUT_H
#define SIMGRAPHICS_EXAMPLES_SIMINPUT_H
#include <d3dx9.h>
#include <DxErr.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include "include/SimSingleton.h"
#include "include/SimPrerequisites.h"
#pragma comment(lib, "dxguid.lib")
#pragma comment(lib, "dinput8.lib")
#d... |
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <afx.h>
#include <windows.h>
#include <ATLComTime.h>
#define _NET "rasdial 天翼 [此处填写天翼号码] "
#define _TEST "echo "
void newcode(CString &con);
char pwd[6];//pwd存储输入的密码
CString path;//存储路径
CString curTime_s;//存储当前时间的字符串类型
COleDateTime cu... |
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
ifstream r("lis.in");
ofstream w("lis.out");
int n;
r >> n;
vector<int> v(n + 3);
vector<int> l(n + 3, INT_MAX);
vector<int> pre(n + 3, -1);
vector<int> ind(n + 3, -1);
for... |
#include<iostream>
#include <cstdio>
#include <cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int MAXN=10000000;
char S[MAXN];
char T[MAXN];
int Slen,Tlen;
int next[MAXN];
int ex[MAXN];
void Getnext(char * s,int len)
{
next[1]=len;
for(int i=1;i<=len;i++)
{
if(s[i+1]!=s[i])
{
... |
#ifndef PHONE_BOOK_CLASS_H
#define PHONE_BOOK_CLASS_H
#include <iostream>
#include <string>
class Phone_book
{
public:
std::string first_name;
std::string last_name;
std::string nickname;
std::string login;
std::string postal_address;
std::string email_address;
std::string phone_number;
std::string ... |
///////////////////////////////////////////////////////////////////////////////
// (C) Barrett Technology Inc. 2009-2010 //
///////////////////////////////////////////////////////////////////////////////
#ifndef BHAND_SERIAL_H
#define BHAND_SERIAL_H
#include "BHandDriver.h"
... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <quic/client/state/ClientStateMachine.h>
#include <quic/common/QuicEventBase.h>
#include <folly/io/Socket... |
/* -*- 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.
** psmaas - Patricia Aas
*/
#include "core/pch.h"
#ifdef HISTORY_SU... |
#define _ALLOW_MSC_VER_MISMATCH
#include <iostream>
#include "counter.h"
using namespace std;
#if 0
class LimitedCounter {
friend ostream& operator<<(ostream &out, const LimitedCounter &lc);
public:
LimitedCounter(int low, int up);
LimitedCounter& operator++();
LimitedCounter operator++(int);
void reset();
boo... |
#pragma once
#include <string>
#include <iostream>
using namespace std;
class ContactNode
{
public:
void InsertAfter(ContactNode*& head, ContactNode*& tail, string number, string name);
string Getname(ContactNode& curr);
void GetPhoneNumber(ContactNode& curr);
void GetNext();
void PrintContactNode... |
#include <algorithm>
#include <functional>
#include <iostream>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
string s;
int q;
struct Solution {
vector<vector<int>> dp;
vector<vector<bool>> ispal;
int n;
void solve() {
n = s.le... |
#include "OptionCall.hpp"
template <typename X>
OptionCall<X>::OptionCall(X T, X S0, X r, X sigma, X E, X q) : Option<X>(T, S0, r, sigma, E, q) {}
template <typename X>
OptionCall<X>::OptionCall(X T, X S0, X r, X sigma, X E) : Option<X>(T, S0, r, sigma, E) {}
template<typename X>
X OptionCall<X>::payoff(const X &s) ... |
#pragma once
/*
It's an interface for sockets used within the project.
It allow to create different socket for different platforms, consequently, the cross-platform is easily implementable.
All sockets within in the project must inherit of this interface.
*/
#include <string>
class ISocket
{
public:
virtual ... |
#pragma once
#include "afxtempl.h"
#include "afxwin.h"
// CModalDlg 对话框
class CModalDlg : public CDialog
{
DECLARE_DYNAMIC(CModalDlg)
public:
CModalDlg(CWnd* pParent = NULL); // 标准构造函数
virtual ~CModalDlg();
// 对话框数据
enum { IDD = IDD_MODAL_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX)... |
object_is_image_type(*_fn, *_flag) {
*_flag = false;
if (*_fn like "*.jpg" || *_fn like "*.jpeg" || *_fn like "*.bmp" ||
*_fn like "*.tif" || *_fn like "*.tiff" || *_fn like "*.rif" ||
*_fn like "*.gif" || *_fn like "*.png" || *_fn like "*.svg" ||
*_fn like "*.xpm") {
*_flag = true;
}
}
dete... |
// Lexer for javap, Jasmin, Android Dalvik Smali.
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "WordList.h"
#include "LexAccessor.h"
#include "Accessor.h"
#include "CharacterSet.h"
#include "LexerModule.h"
using namespace Scinti... |
// Copyright (c) 2020 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 Software Foundation, with special ... |
/**
Copyright (c) 2015 Eric Bruneton
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the follo... |
#include "msg_0x13_entityaction_cts.h"
namespace MC
{
namespace Protocol
{
namespace Msg
{
EntityAction::EntityAction()
{
_pf_packetId = static_cast<int8_t>(0x13);
_pf_initialized = false;
}
EntityAction::EntityAction(int32_t _entityId, int8_t _actionId)
: _pf_entityId(_entityId)
, _pf_actionId(_actionId)
{
_pf... |
#include <iostream>
#include <string>
#include "Customer.h"
using namespace std;
//Initialize the class
Customer::Customer()
{
id = "";
name = "";
address = "";
phone = "";
email = "";
}
//Initialize the class with parameters id and name
Customer::Customer(string c_id, string c... |
// Copyright (c) 2011-2014 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "gtest/gtest.h"
#include "cryptonote_core/cryptonote_format_utils.h"
using namespace cryptonote;
namespace
{
... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <cstdio>
#include <limits>
#include <vector>
... |
#ifndef __AVL_CPP
#define __AVL_CPP
#include "avl.h"
#include <fstream>
template <class T>
AvL<T>::AvL()
{
root = NULL;
}
template <class T>
AvL<T>::~AvL()
{
}
template <class T>
AvLNode<T>* AvL<T>::search(T k)
{
AvLNode<T> *ptr = root;
while (ptr != NULL)
{
if (k > ptr->key)
{
ptr = ptr->right;
}
e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.