text stringlengths 8 6.88M |
|---|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#ifndef ACCESSIBLE_SCROLLBAR_PART_H
#define ACCESSIBLE_SCROLLBAR_... |
#pragma once
#include <DXLib.h>
enum ResourceData { //画像データ
GAME_OVER_IMAGE,
HIKARI_IMAGE,
GAME_CLEAR_TEXT,
AKA_IMAGE,
CURSOR_IMAGE,
GAME_OVER_TEXT,
PUSH_BUTTON_TEXT,
YAMIOTO_TEXT,
RESOURCE_DATA_MAX
};
//==画像データを管理するクラス
class ImageManager {
int _resourceHandle[ RESOURCE_DATA_MAX ]; //画像データのハンドル
public:
/... |
/* -*- 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.
*/
// Test bodies for CharConverter tests. These are referenced bot... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; 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.
*
* George Refseth, rfz@opera.com
*/
#ifndef WINDOWS_MAIL_IMPO... |
#include "b.h"
using namespace std;
int main()
{
b();
return 0;
} |
/**
* Copyright (C) Omar Thor, Aurora Hernandez - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*
* Written by
* Omar Thor <omar@thorigin.com>, 2018
* Aurora Hernandez <aurora@aurorahernandez.com>, 2018
*/
#ifndef DMTK_DATA_I... |
#include <string>
#include <iostream>
#include <cmath>
#include "Battle.hpp"
using namespace std;
Battle::Battle(Player Player, Engimon EngimonPlayer, Engimon EngimonWild) : player(Player), engimonWild(EngimonWild), engimonPlayer(EngimonPlayer)
{
this->levelEngimonPlayer = EngimonPlayer.getLevel();
this->level... |
/******************************************************************************
* This file is part of the Geometric harmonization project *
* *
* (C) 2014 Azamat Shakhimardanov *... |
// Created on: 1992-08-18
// Created by: Modelistation
// 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 ... |
#include "stdafx.h"
#include "Texture.h"
Jaraffe::Texture::Texture()
{
}
Jaraffe::Texture::~Texture()
{
}
ID3D11ShaderResourceView* Jaraffe::Texture::GetTexture()
{
if (m_pTexture == nullptr)
{
}
return m_pTexture;
}
void Jaraffe::Texture::SetTexture(ID3D11ShaderResourceView* p_pTexture)
{
m_pTexture = p_p... |
#define HookD3DDevice 0
#define WaitForDebugger 0
#include "RenderHook.h"
#include "ShaderIOHook.h"
#include "FormHook.h"
#include "CameraMode.h"
#include "SleepingMode.h"
#include "WeatherMode.h"
#include "FlyCam.h"
#include "PluginVersion.h"
#include "MemoryManagement.h"
#ifdef _DEBUG
#if HookD3DDevice
#include "D3D... |
#include "activiteajout.h"
#include "actmanager.h"
ActiviteAjout::ActiviteAjout(QWidget *fenetre):QDialog(fenetre){
setWindowTitle("Ajout Activité");
setFixedSize(600,300);
h1Layout=new QHBoxLayout;
ltitre=new QLabel("Titre",this);
titre=new QLineEdit(this);
h1Layout->addWidget(ltitre);
h1... |
/** Copyright (c) 2018 Mozart Alexander Louis. All rights reserved. */
#ifndef __GLOBALS_HXX__
#define __GLOBALS_HXX__
/**
* Includes
*/
#include <typeinfo>
#include <utility>
#include "cocos2d.h"
#include "constants.hxx"
#include "enums.hxx"
#include "macros.hxx"
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
#inclu... |
#ifndef _CreatePrivateProc_H_
#define _CreatePrivateProc_H_
#include "IProcess.h"
#include "ProcessFactory.h"
class CreatePrivateProc :public IProcess
{
public:
CreatePrivateProc();
virtual ~CreatePrivateProc();
virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt) ;
v... |
#include "complex.h"
#include <iostream>
using namespace std;
float Complex::getRe() const {
return re;
}
float Complex::getIm() const {
return im;
}
//конструктор по умолчанию
Complex::Complex() {
re = 1;
im = 2;
}
//конструктор преобразования
Complex::Complex(float r, float i)
{
re = r;
im = i;
}
//сложен... |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int *p, *q;
int x;
p = new int;
q = new int(20);
x = *q;
*p = 30;
*q = *p;
cout << *p << endl;
cout << *q << endl;
cout << x << endl;
delete p;
delete q;
}
|
#include <iostream>
using namespace std;
int countContinuedOne(int input){
int pos = 1;
unsigned int ansCount = 0;
int prevCount = 0;
int curCount = 0;
while(pos != 0){
if(input & pos){
curCount++;
}else{
int tmpCount = prevCount + curCount + 1;
i... |
#pragma once
#include <dynamic_reconfigure/server.h>
#include <ros/ros.h>
#include <std_msgs/Header.h>
#include <tf2_ros/transform_broadcaster.h>
#include <tf2_ros/transform_listener.h>
#include <nav_msgs/Path.h>
#include <Eigen/Dense>
#include "anicar_lateral_control_ros_tool/LateralControllerParameters.h"
namespa... |
// Created on: 2001-04-24
// Created by: Christian CAILLET
// 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.... |
#include <iostream>
#include <fstream>
#include "pin.H"
#include "pinplay.H"
#include "sim_api.h"
#define WARMUP 100e6
/* PinPlay requirements */
PINPLAY_ENGINE pinplay_engine;
KNOB<BOOL> KnobPinPlayLogger(KNOB_MODE_WRITEONCE,
"pintool", "log", "0",
"Activate the pinplay... |
// Author: WangZhan -> wangzhan.1985@gmail.com
#pragma once
#include "BasicTypes.h"
#include "MessagePump.h"
#include "WaitableEvent.h"
class MessagePumpDefault : public MessagePump
{
public:
MessagePumpDefault();
~MessagePumpDefault();
virtual void Run(Delegate *pDelegate);
virtual void ... |
/*******************************************************************************
* filename: C_HighComplexityPatternInitialiser.hpp
* description:
* author: Moritz Beber
* contact: m (dot) beber (at) jacobs (dash) university (dot) de
* created: 2011-01-18
* copyright: Jacobs University Bremen. A... |
////////////////////////////////////////////////////////////////////////////////
#include "Mesh.h"
#include <cellogram/State.h>
#include <cellogram/delaunay.h>
#include <cellogram/load_points.h>
#include <cellogram/convex_hull.h>
#include <cellogram/delaunay.h>
#include <cellogram/tri2hex.h>
#include <cellogram/voronoi... |
#include <iostream>
#include <cmath>
using namespace std;
typedef unsigned int uint;
int main() {
const uint N = 1000000;
double maxRatio = 0;
int maxRatioNum;
bool sieve[N + 1] = {false, false};
double *invPhi = new double[N + 1];
// find all the primes less then N using
// the seive of... |
class ksvk;
class KSVK_DZE:ksvk {
type = 1;
};
|
#ifndef BULLETPROXY_H
#define BULLETPROXY_H
#include "core/pbutil.h"
#include "core/glmcfg.h"
class btDefaultCollisionConfiguration;
class btCollisionShape;
class btCollisionDispatcher;
class btBroadphaseInterface;
class btSequentialImpulseConstraintSolver;
class btDiscreteDynamicsWorld;
class btConvexInternalShape;
... |
//
// Copyright (C) 2001-2010 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifndef _RD_SUBSTRUC... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "library.h"
int main(int argc, char **argv) {
const char* filename = argv[1];
long n = (long)atoi(argv[2]);
long block_sz = (long)atoi(argv[3]);
int written_sz = 0;
char buf[block_sz];
long sz;
FILE *fp = fopen(filename, "... |
#pragma once
//======================================================================
#include <upl/common.hpp>
#include <upl/errors.hpp>
#include <upl/lexer.hpp>
#include <upl/ast.hpp>
//======================================================================
namespace UPL {
//======================================... |
/*====================================================================
Copyright(c) 2018 Adam Rankin
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 without limitati... |
#pragma once
#include "Question.h"
class CQuestionForTest : public qp::CQuestion
{
public:
LOKI_DEFINE_CONST_VISITABLE()
CQuestionForTest(std::string const& description, double score = 0.0)
:CQuestion(description, score)
{}
}; |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef OPML_H
#define OPML_H
class OpFile;
// *************************... |
#ifndef DECK_HPP
#define DECK_HPP
#include "Card.hpp"
#include <iostream> // std::cout
#include <string> // std::string
#include <vector> // vector
class Deck {
protected :
// CHAMPS ======================================================= //
std::vector<Card> cards;
public :
// CONSTRUCTEURS ====... |
#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
void GiaiPTB2(int a, int b,int c);
int main()
{
freopen("choinon12.inp","r",stdin);
freopen("choinon12.out","w",stdout);
int a,b,c;
scanf("%d %d %d",&a,&b,&c);... |
#ifndef __GAME_LIGHT_H__
#define __GAME_LIGHT_H__
/*
===============================================================================
Generic light.
===============================================================================
*/
extern const idEventDef EV_Light_GetLightParm;
extern const idEventDef EV_Light_Set... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "mtrand.h"
#include "cache.h"
#define NUM_SETS 1024
extern MTRand* randgen;
////////////////////////////////////////////////////////////////////
// ------------- DO NOT MODIFY THIS FILE -----------
////////////////////////////////////////////////... |
#pragma once
#ifndef __MyTimer_H__
#define __MyTimer_H__
#include <windows.h>
#include <iomanip>
#include <iostream>
class miniTimer
{
private:
int _freq;
LARGE_INTEGER _begin;
LARGE_INTEGER _end;
public:
double costTime; // 花费的时间(精确到微秒)
public:
miniTimer()
{
LARGE_INTEGER... |
#include "Rectangulo.h"
Rectangulo::Rectangulo(Coordenada a, Coordenada b, Coordenada c, Coordenada d)
{
setCoordenadas(a, b, c, d);
}
void Rectangulo::setCoordenadas(Coordenada a, Coordenada b, Coordenada c, Coordenada d)
{
setC1(a);
setC2(b);
setC3(c);
setC4(d);
esRectangulo();
}
Coordenada... |
#ifndef MAPSYSTEM_H
#define MAPSYSTEM_H
#include <string>
#include <array>
#include <random>
#include <vector>
#include "../Constants.h"
#include "../components/Door.h"
#include "../components/Region.h"
#include "../components/Room.h"
#include "../components/Tile.h"
namespace ld
{
static constexpr int NUM_CHUNKS = 5... |
#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f;
const int maxn =550;
int n, m, s, d;
/**
* w[i]表示i城市拥有的救援队数量
* sum[i]表示走到i城市可以召集到的救援队总数
* total[i]表示走到i城市的路线数量
*/
int w[maxn], sum[maxn], total[maxn];
/**
* dis[i]表示从源点到i点的最短距离
* path[i]表示到i点的前驱节点
*/
int dis[maxn], vis[maxn], path[ma... |
// PR_Project.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <time.h>
#include <vector>
#include "PrimeFinder.h"
#include "Sieve.h"
#include "SieveParDividers.h"
#include "SieveParRange.h"
#include "SieveParRange2.h"
#include "SieveParEverything.h... |
/*********************************************************\
* 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 <iostream>
#include<stdio.h>
#include<string.h>
#include <vector>
#include <string>
#include <cctype>
#include<math.h>
using namespace std;
int dfsn[10000]; //forward DFS number
int btn[10000]; //back track number
int mark[10000];
int vis[10000];
int revbtn[10000];
int krishan[100... |
// Created on: 1999-06-30
// Created by: Denis PASCAL
// Copyright (c) 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... |
#include "mumble_channelcounter.h"
#include "mumble_data.h"
#include "mumble_notify.h"
#include "test_main.h"
#include <unity.h>
#include "test_dummy.h"
class ListenBox : public EventListener
{
public:
int msgCount = 0;
int msgCountTHRES;
int msgCountUNDER;
virtual void notify(int msg) {
m... |
//
// Created by OLD MAN on 2020/2/26.
//
//输入一行字符,统计出其中数字字符的个数。
//
//输入格式\
//一行字符串,总长度不超过 255。
//
//输出格式\
//输出为 1 行,输出字符串里面数字字符的个数
#include <iostream>
using namespace std;
int main(){
char c;
int i = 0, count = 0;
while ((c=cin.get())!='\n'){
// cin.unget(); //重新放回到輸入流中
// cin>>a;
... |
/* ------------------------------------------------------------------
* Copyright (C) 1998-2009 PacketVideo
*
* 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.o... |
/* -*- 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 SPEEDDIAL_GLOBAL_CONFIG_DIALOG_H
#define SPEEDDIAL_GLO... |
#ifndef ENDGAME_H
#define ENDGAME_H
#include "Scene.h"
#include "xil_types.h"
class Endgame : public Scene
{
public:
Endgame(uint32_t axi_base_addr, Scene *menu, uint8_t id);
void Init(uint8_t info) override;
void HandleInput(uint8_t key) override;
void Update(float dt) override;
private:
uint32_... |
#ifndef bsTree_
#define bsTree_
#include "dictionary.h"
using namespace std;
template <class K, class E>
class bsTree : public dictionary<K, E>{
public:
virtual void ascend() = 0;
//output in ascending order of key
} |
// 0927_8.cpp : 定义控制台应用程序的入口点。
//三角形
//给定三条边,请你判断一下能不能组成一个三角形。
//输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C <1000;
//对于每个测试实例,如果三条边长A, B, C能组成三角形的话,输出YES,否则NO。
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n;
cin >> n;
while (n--)
{
double s[3];
cin >> s[0] >> s[1] >> s[2];... |
/******************************************************************************
* *
* Copyright 2018 Jan Henrik Weinstock *
* *
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Manuela Hutter
*/
#ifndef WIDGET_STATE_MODIFIER_H
#def... |
#include "FtpSnowFiles.h"
void FtpSnowFiles::LoginToFtp()
{
//CInternetSession sess("My FTP Session");//"65.19.143.3","likev@xufanglu.cn","271828han",21,1
ftpConnect = mySession.GetFtpConnection("172.18.152.5","dsbwdown","dsbw2004");//登录
if(!ftpConnect) return;
isLogin = true;
//AfxMessageBox("... |
/*
Copyright (c) 2014 Mircea Daniel Ispas
This file is part of "Push Game Engine" released under zlib license
For conditions of distribution and use, see copyright notice in Push.hpp
*/
#pragma once
#include "Core/Noncopyable.hpp"
#include <string>
#include <functional>
namespace Tests
{
class Test : public Pus... |
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without f... |
/**************************************************************************************
* File Name : LevelSelect.cpp
* Project Name : Keyboard Warriors
* Primary Author : Wonju Cho
* Secondary Author :
* Copyright Information :
* "All content 2019 DigiPen (USA) Corporation, all rights reser... |
#ifndef TEST_DEFINITION
# error Expected TEST_DEFINITION
#endif
#ifndef LANG_CXX
# error Expected LANG_CXX
#endif
#ifdef UNPEXTED_DEFINITION
# error Unexpected UNPEXTED_DEFINITION
#endif
int main(void)
{
return 0;
}
|
//
// GLUtils.cpp
// OpenGLES03
//
// Created by waqu on 2017/8/21.
// Copyright © 2017年 com.waqu. All rights reserved.
//
#include "GLUtils.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long getFileContent(char *buffer, long len, const char *filePath)
{
FILE *file = fopen(filePath, "rb");
... |
#include <iostream>
#include <string>
#include<fstream>
#include <vector>
#include "Analyzer.h"
#include "TROOT.h"
#include "TChain.h"
#include "TFile.h"
#include "TApplication.h"
#include "cConstants.h"
using namespace std;
int main()
{
Analyzer* object1=new Analyzer();
//object1->Fill_Histogram("/home/public/... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 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 BROWSER_UPGRADE_H
#define BROWSER_UPGRADE_H
#include "adjunc... |
/*
* MPIBasicRunner<T>.cpp
*
* Created on: Aug 24, 2014
* Author: ushnish
*
Copyright (c) 2014 Ushnish Ray
All rights reserved.
*/
#include "dmc.h"
namespace runners {
template <class T>
void MPIBasicRunner<T>::initialize()
{
}
template <class T>
void MPIBasicRunner<T>::masterRun()
{
for(int m=0;m<th... |
// OpenCVApplication.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "common.h"
using namespace std;
void test()
{
char fname[MAX_PATH];
while (openFileDlg(fname))
{
Mat src,src1,dst1,cat,cat1,cont, dst, gauss;
src = imread(fname, CV_LOAD_IMAGE_COLOR);
resizeImg(sr... |
#include<iostream>
using namespace std;
class claci{
double x,y;
public:
void get()
{
cout<<"enter first no"<<"\n";
cin>>x;
cout<<"enter 2nd no"<<"\n";
cin>>y;
}
void add()
{
cout<<"addition"<<x+y<<"\n";
}
void sub()
{
cout<<"substraction"<<x-y<<"\n";
}
void multi()
{
cout<<"mutli"<<x*y<... |
#include "objectfactory.hpp"
#include <stdexcept>
#include <sstream>
//#include "accessory.hpp"
#include "camshaft.hpp"
#include "charger.hpp"
#include "clutch.hpp"
#include "cooler.hpp"
#include "cylinderhead.hpp"
#include "differential.hpp"
#include "engine.hpp"
#include "exhaustmanifold.hpp"
#include "exhaustpipe.... |
#pragma once
double expression();
void clean_up_mess();
double statement();
struct Token
{
char kind;
double value;
string name;
Token(char ch)
: kind{ ch }, value{ 0 }
{ }
Token(char ch, double val)
: kind{ ch }, value{ val }
{ }
Token(char ch, string n)
: k... |
#include "DmxReceiver.h"
#include "tim.h"
#include "usart.h"
#define DMX_MIN_BREAK_TIME_US 80
#define DMX_MAX_BREAK_TIME_US 1000
#define DMX_CONNECTED_TIMEOUT_MS 1000
uint8_t DmxReceiver::buffer[DMX_FRAME_SIZE] = {0};
DmxFrameCallback DmxReceiver::callback = nullptr;
uint32_t DmxReceiver::lastReceivedTime = 0;
void... |
// C/C++
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#include <boost/bind.hpp>
#include <boost/thread/mutex.hpp>
// Signal handling
#include <signal.h>
// SemanticLocalization
#include "semantic_localization/map/semantic_map.h"
#include "semantic_localization/pf/pf.h"
#include "semantic_lo... |
#pragma once
#include <QObject>
#include <QVariantMap>
#include <QQmlEngine>
class Model : public QObject{
Q_OBJECT
Q_PROPERTY(QObject* parent READ parent CONSTANT)
Q_PROPERTY(QVariantMap exports MEMBER exports)
Q_PROPERTY(QString modelName READ getModelName CONSTANT)
Q_PROPERTY(bool isModel REA... |
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <pthread.h>
#include <unistd.h>
#include <vector>
#include <ctime>
#define ATOI(params, i) params = atoi(argv[i])
#define LOCK(mutex) pthread_mutex_lock(&mutex)
#define UNLOCK(mutex) pthread_mutex_unlock(&mutex)
using namespace std;
int n, C, T, N;
in... |
#include "IDirectWriteCairoTextRenderer.h"
#include <cairo/cairo.h>
#include "ICairoTessellationSink.h"
#include "DebugUtility.h"
//#define DEBUG_PRINT_GLYPH_INFO
const GUID IDirectWriteCairoTextRenderer::IID_IDirectWriteCairoTextRenderer =
{ 0xf5b028d5, 0x86fd, 0x4332, { 0xad, 0x5e, 0xe8, 0x6c, 0xf1, 0x1c, 0xec, 0xd... |
#include <bits/stdc++.h>
#include <string>
using namespace std;
typedef long long ll;
int like_cnt[31] = {0};
int main(){
int n;
cin >> n;
double ans = 0;
for(int i = 0; i < n; i++)
{
string tmp1;
string tmp2;
cin >> tmp1 >> tmp2;
if (tmp2 == "JPY"){
... |
#include "Ball.h"
#include <iostream>
/*
Create a ball object with default values.
*/
Ball::Ball(std::string name, unsigned int radius, float x, float y,
glm::vec3 color) : Circle(name, color, glm::mat3(1), true)
{
this->radius = radius;
this->position = glm::vec2(x, y);
this->sticked = true;
thi... |
//////////////////////////////////////////////////////////////////////
///Copyright (C) 2011-2012 Benjamin Quach
//
//This file is part of the "Lost Horizons" video game demo
//
//"Lost Horizons" is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published ... |
#include "gtest/gtest.h"
#include "minifem.h"
// Helper
template<typename DerivedA, typename DerivedB>
bool allclose2(const Eigen::DenseBase<DerivedA>& a,
const Eigen::DenseBase<DerivedB>& b,
const typename DerivedA::RealScalar& rtol
= Eigen::NumTraits<typename DerivedA::RealScalar>::dummy_precision(),
... |
#pragma once
#include "afxwin.h"
// SimulationDlg dialog
class SimulationDlg : public CDialogEx
{
DECLARE_DYNAMIC(SimulationDlg)
private:
CStatic m_objPathText;
CStatic m_simDataPath;
public:
SimulationDlg(CWnd* pParent = NULL); // standard constructor
virtual ~SimulationDlg();
// Dialog Data
enum { IDD = ... |
/** Underscore
@file /.../Source/Kabuki_SDK-Impl/_App/IContent.h
@author Cale McCollough
@copyright Copyright 2016 Cale McCollough ©
@license http://www.apache.org/licenses/LICENSE-2.0
*/
#include <string>
namespace _App
{
/** */
class IContent
{
public:
int Catagory () = 0... |
#include <tr1/array>
#include <tr1/memory>
#include <iostream>
#include "Hyperbolic2d.h"
#include "Hyperbolic.h"
#include "Assert.h"
#include <Eigen/Core>
using Eigen::Matrix3d;
using Eigen::Vector3d;
Hyperbolic::Point::Point(double x, double y, double z, Hyperbolic* space) {
coordinates[0] = x;
coordinates[1] = y;... |
#include <iostream>
#include <utility>
#include <map>
#include <set>
#include <vector>
#include <cstdio>
#include <unordered_set>
using namespace std;
typedef pair<int, int> PII;
typedef map<int, int> MII;
using PII = pair<int, int>;
using MII = map<int, int>;
struct Student {
string name;
int chines;
i... |
#pragma once
#include "../Misc/FixedMemoryPool.h"
//套接字上下文结构
class SocketContext : public CMempool_cls
{
public:
SocketContext::SocketContext(void)
{
m_ClientSocket = INVALID_SOCKET;
memset(&m_ClientAddr, 0, sizeof(m_ClientAddr));
m_bIsOnline = FALSE;
m_pUserParam = NULL;
}
SocketContext::~SocketContext... |
#ifndef STATE_H
#define STATE_H
class State
{
public:
vector<vector<int> > table;
int step, blackI, blackJ;
double distance;
State(vector<vector<int> > t, int bi, int bj, int s, double d)
{
table = t, blackI = bi, blackJ = bj, step = s, distance = d;
}
State(vector<vector<int> > t, int bi, int bj... |
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QVariant>
#include <QDebug>
#include <QSqlError>
#include <QSqlQuery>
#include <QString>
#include <iostream>
#include "db.h"
#include <vector>
using namespace std;
vector<vector<float>> Db::things;
vector<vector<vector<float>>> Db::construct;
vector<in... |
#include "xr_multicast.h"
#include "xr_log.h"
#include "xr_net_util.h"
namespace xr
{
mcast_t *g_mcast;
int mcast_t::create(const char *ip, uint16_t port,
const char *in_if, const char *out_if)
{
this->ip = ip;
this->port = port;
this->in_if = in_if;
this->out_if = out_if;
this->fd = ::socket(AF_INET, SOCK_... |
#include "Event.h"
#ifndef EVENT_CPP
#define EVENT_CPP
Event::Event(UID _sender, event_t _type)
{
sender = sender;
receiver = (UID)0;
type = _type;
args[0] = Variant();
args[1] = Variant();
args[2] = Variant();
args[3] = Variant();
}
Event::Event()
{
sender = (UID)0;
receiver = (UID)0;
type = NOT_EVENT;
arg... |
//
// main.cpp
// Apuntadores
//
// Created by Daniel on 22/09/14.
// Copyright (c) 2014 Gotomo. All rights reserved.
//
#include <iostream>
#include "Moto.h"
#define C 4
#define F 5
int main(int argc, const char * argv[])
{
int numero = 100;
int * intpntr = №
std::cout<<"Numero = "... |
#include <iostream>
#include <string>
using namespace std;
string a, b;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> a >> b;
int aSize = a.size();
int diff = b.size() - aSize;
int ans = 987654321;
for (int i = 0; i <= diff; i++){
int tpAns = 0;
for (i... |
#ifndef tmptools__typelist__algorithms__index_of__hpp
#define tmptools__typelist__algorithms__index_of__hpp
#include "../macros/TypeList_N.h"
#include "../typelist.hpp"
namespace tmp {
template <typename Typelist, typename T>
struct index_of;
template <typename T>
struct index_of<empty, T> {
static const std::ptr... |
#ifndef ALGORITHM_RGB_TO_HEX_HPP
#define ALGORITHM_RGB_TO_HEX_HPP
#include <string>
#include <sstream>
namespace Algorithm
{
std::string rgbToHex(uint8_t r, uint8_t g, uint8_t b)
{
std::stringstream ss;
ss << '#';
ss << std::hex << (r << 16 | g << 8 | b);
return ss.str();
... |
#include "rsdgMission.h"
#include <unistd.h>
#include <signal.h>
#include <iostream>
#include <string>
#include "string.h"
#include "stdlib.h"
#include <curl/curl.h>
#include <ctime>
#include <vector>
#include <sstream>
vector<string> localSolve();
void rsdgUnit::set(int u){
unit = u;
}
int rsdgUnit::get(){
... |
#include "ResultSet.hh"
namespace SQLiteWrapper {
using namespace std;
ResultSet::ResultSet(const vector<Row>& _rows)
: rows(_rows) {}
void ResultSet::rollback() noexcept { --idx; }
const bool ResultSet::canFetch() const noexcept { return idx < rows.size(); }
const Row& ResultSet::fetch() { return rows.at(idx... |
#include <vector>
#include <iostream>
#include <stdint.h>
#include <functional>
#ifndef __UTIL_H__
#define __UTIL_H__
using std::vector;
using std::cout;
using std::endl;
using std::ostream;
using std::function;
typedef vector<double> Layer;
typedef Layer Data;
#define SHOW(x) do { cout << (#x) << ": " << x << endl;... |
#include <iostream>
using namespace std;
int jump(int A[], int n) {
if(A == NULL)
return 0;
if(n == 1)
return 0;
int idx = 0;
int step = 0;
int max = 0;
while(max < n -1)
{
max = idx + A[idx];
step++;
if(max >= n-1)
return step;
int temp = 0;
for(int i = idx + 1... |
#ifndef M2_GLUE_H
#define M2_GLUE_H
#if defined(M2_SUPPORT)
// ----------------------------------------------------
#include "adjunct/m2/src/engine/listeners.h"
#include "adjunct/m2/src/glue/factory.h"
#include "modules/inputmanager/inputmanager.h"
#include "modules/layout/bidi/characterdata.h"
#ifndef HAVE_REAL_UNI... |
#include "PID.h"
#include <random>
#include <math.h>
#include <iostream>
using namespace std;
#define Twiddle 1
/*
* TODO: Complete the PID class.
*/
PID::PID() {}
PID::~PID() {}
void PID::Init(double Kp, double Ki, double Kd) {
this->Kp = Kp;
this->Ki = Ki;
this->Kd = Kd;
p_error = 0;
i_error = 0;
d_erro... |
/*
* @lc app=leetcode.cn id=312 lang=cpp
*
* [312] 戳气球
*/
// @lc code=start
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
int maxCoins(vector<int>& nums) {
int n = nums.size();
vector<int> point(n+2, 1);
for(int i=0;i<n;++i){
... |
#include <utility>
#include <ionir/passes/pass.h>
namespace ionir {
ErrorMarker::ErrorMarker(std::string message) :
Construct(ConstructKind::ErrorMarker),
message(std::move(message)) {
//
}
void ErrorMarker::accept(Pass &visitor) {
visitor.visitErrorMarker(this->dynamicCast... |
#include <iostream>
#include<limits>
using namespace std;
/*
Mảng phân số
Nhập/Xuất n phân số
Rút gọn mọi phân số
Đếm số lượng phân số âm/dương trong mảng
Tìm phân số dương đầu tiên trong mảng
Tìm phân số nhỏ nhất/lớn nhất trong mảng
Sắp xếp mảng tăng dần/giảm dần
*/
struct phanso
{
int Tu;
int Mau;
};
typedef ... |
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <fstream>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
struct Logger {
std::function<void()> func;
std::string name;
Logger(std::function<void()> const& func, std::string const& name)
... |
#ifndef CAFFE_SPECIAL_TIMER_HPP_
#define CAFFE_SPECIAL_TIMER_HPP_
#include <vector>
#include <string>
#include <map>
#include "caffe/blob.hpp"
#include "caffe/layer.hpp"
#include "caffe/proto/caffe.pb.h"
#include "caffe/util/im2col.hpp"
#include "caffe/util/device_alternate.hpp"
#include "caffe/util/rng.hpp"
namespa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.