text stringlengths 8 6.88M |
|---|
/*
* Copyright (c) 2009-2012 André Tupinambá (andrelrt@gmail.com)
*
* 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 limitation the rights
* to use... |
#include "GroupInfoStruct.h"
#include "GroupMemberInfoStruct.h"
GroupInfoStruct::GroupInfoStruct()
{
} |
class Solution {
public:
int consecutiveNumbersSum(int n) {
int res = 1; // the array of [n]
for (int i = 2; i < sqrt(2 * n); i++) {
if ((n - i * (i - 1) / 2) % i == 0) res++;
}
return res;
}
}; |
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <fstream>
#include "story.h"
using namespace std;
int main(int argc, char ** argv){
string in_story;
string in_cat;
ifstream load_story;
ifstream load_cat;
Story story;
CategoryArr & arr = story.getCategoryArr();
if ... |
#include "piece.h"
#include <iostream>
using namespace std;
Piece::Piece(const int (&board)[25][10], int type, int orientation, pair<int, int> coordinate, bool alive):
board(board),
type(type),
orientation(orientation),
coordinate(coordinate),
alive(alive)
{
};
int Piece::get_ty... |
#include <bson/Value.h>
#include <iostream>
int main(){
BSON::Value doc = BSON::Object{
{"undefined",BSON::Value{}},
{"int32",(BSON::int32)1},
{"int64",(BSON::int64)1},
{"double",3.14},
{"true",true},
{"false",false},
{"string","foobar"},
{"datetime",std::chrono::milliseconds{123}},
{"object",BSON:... |
// learning c++
#include<iostream>
using namespace std;
int main()
{
int ary;
cout<< "welcome to c++ tutorial"<<endl;
cout << "value of ary is" << ary << endl;
return 0;
}
|
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
using namespace std;
set<long long>PrimeSet;
long long GetNextPrime()
{
long long k;
for(k=;;k++)
{
bool Flag=false;
for(int j=0;j<PrimeSet.size();j++)
{
if(k%PrimeSet[j]==0)
{
Flag=true;
break;
}
}
if... |
//
// Copyright Jason Rice 2017
// 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)
//
#ifndef NBDL_SQL_DB_INSERT_HPP
#define NBDL_SQL_DB_INSERT_HPP
#include <nbdl/concept/Entity.hpp>
#include <nbdl/concept/EntityCo... |
#pragma once
#include "Core.h"
template <class T>
class ObjPool final{
public:
ObjPool<T>();
~ObjPool<T>();
const std::vector<std::pair<bool, T*>>& GetObjPool();
T* const& RetrieveInactiveObj();
void CreateObjs(int amt);
private:
std::vector<std::pair<bool, T*>> im_ObjPool;
};
#include "ObjPool.inl" |
/****************************************
*
* INSERT-PROJECT-NAME-HERE - INSERT-GENERIC-NAME-HERE
* Copyright (C) 2019 Victor Tran
*
* This program 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 Foundati... |
/**
* author : Wang Shaotong
* email : wangshaotongsydemon@gmail.com
* date : 2020-04-08
*
* id : hdu 1692
* name : Destroy the Well of Life
* url : http://acm.hdu.edu.cn/showproblem.php?pid=1692
* level : 1
* tag : 枚举
*/
#include <iostream>
using namespace std;
const int MAXN = 100100;
con... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "base.h"
WINRT_WARNING_PUSH
#include "internal/Windows.Foundation.3.h"
#include "internal/Windows.UI.Xaml.Interop.3.h"
#include "internal/Windows.Foundation.Collections.3.h"
#include ... |
#include "SoXipNeheBoxGenerator.h"
#include "SoXipNeheBox.h"
// array for box colors
const float boxCol[5][3]=
{
// Bright: Red, Orange, Yellow, Green, Blue
{1.0f,0.0f,0.0f},{1.0f,0.5f,0.0f},{1.0f,1.0f,0.0f},{0.0f,1.0f,0.0f},{0.0f,1.0f,1.0f}
};
// array for top colors
const float ... |
#include <SPI.h>
#include "RF24.h"
//RF
RF24 radio(10, 9);
byte direccion[][6] = {"0", "1"};
typedef struct {
byte id;
byte typeOfData;
float data;
int8_t foo;
}
inputData;
inputData datos;
void setup() {
Serial.begin(9600);
Serial.println("Iniciado");
setUpRF();
datos.id=2;
datos.typeOfData=5;... |
// @copyright 2017 - 2018 Shaun Ostoic
// Distributed under the MIT License.
// (See accompanying file LICENSE.md or copy at https://opensource.org/licenses/MIT)
#pragma once
#include <distant/agents/process.hpp>
#include <distant/memory/virtual_ptr.hpp>
#include <distant/memory/calling_conventions.hpp>
#include <dis... |
#include "stdafx.h"
#include "LongNumber.h"
namespace
{
const int RADIX = 10;
}
CLongNumber::CLongNumber(const long& number)
{
LongNumber tmp;
long shortNumber = number;
while (shortNumber > 0)
{
tmp.push_back(shortNumber % RADIX);
shortNumber /= RADIX;
}
m_longNumber = tmp;
}
CLongNumber::CLongNumber(con... |
#include <bits/stdc++.h>
using namespace std;
#define MAXSIZE 10000000
long long int segtree[10000000];
long A[MAXSIZE];
void build(int t,int i,int j){
if(i==j){
segtree[t] = A[i];
return;
}
int left = t<<1,right=left|1,mid=(i+j)>>1;
build(left,i,mid);
build(right,mid+1,j);
segtree[t] = segtree[left] + segtre... |
#include "../../includes/graphic/sender.hpp"
#ifdef _WIN32
int graphic::Sender::instance_number = 0;
#endif
graphic::Sender::Sender(int port) : connection{nullptr}, messageHistory{}
{
if (port <= 0)
{
throw std::invalid_argument("The port specified is "
+ std::to_string(port)
... |
//**************************************************************************
//**
//** See jlquake.txt for copyright info.
//**
//** This program 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 ... |
#ifndef PIPELINE_VISUALIZATION_TEST_H
#define PIPELINE_VISUALIZATION_TEST_H
#include <Presenter/PipelinePresenter.h>
#include <Presenter/Elements/Nodes/TurtleNodePresenter.h>
#include <Presenter/Elements/Nodes/HypergraphNodePresenter.h>
#include <Presenter/Elements/Nodes/MeshNodePresenter.h>
#include <Presenter/Elem... |
#ifndef ARVOREB_H
#define ARVOREB_H
#include "../lib/No.h"
#include "../lib/utils.h"
#include <map>
#include <string>
#include <iostream>
class ArvoreB {
private:
int height;
std::map<int, No*> noMap;
public:
ArvoreB();
~ArvoreB();
bool insert(std::string, int);
void print();
int seek(std::string);
void... |
#include <gtest/gtest.h>
// #include <whiskey/Whiskey.hpp>
#include <whiskey/Core/PrintLiterals.hpp>
#include <whiskey/Parsing/EvalLiterals.hpp>
using namespace whiskey;
TEST(Feature_Unicode, PrintLiteralChar) {
std::stringstream ss;
printLiteralChar(ss, 0x7f);
ASSERT_STREQ(ss.str().c_str(), "'\\x7f'");
s... |
#include "zeta.h"
#ifdef HAS_MPI
#include <mpi.h>
int myid;
#endif
void Zeta::print_matrix(const gsl_matrix *m)
{
for (size_t i = 0; i < m->size1; i++) {
for (size_t j = 0; j < m->size2; j++) {
cout << gsl_matrix_get(m, i, j) << " ";
}
cout << endl;
}
}
Zeta::Zeta()
{
_kZ... |
#pragma once
#include "afxcmn.h"
#include "Tap_Proxy.h"
#include "Tap_ARP.h"
#include "Tap_Others.h"
// Option_main 대화 상자입니다.
class Option_main : public CDialogEx
{
DECLARE_DYNAMIC(Option_main)
public:
Option_main(CWnd* pParent = NULL); // 표준 생성자입니다.
virtual ~Option_main();
// 대화 상자 데이터입니다.
#ifdef AFX_DESIGN_... |
/*
* Copyright (c) 1998-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
* "License"). You may not use this file except in compliance with th... |
/**
* @brief Work with shade files
* @file Shader.h
* @author matthewpoletin
*/
#pragma once
#include <iostream>
#include <string>
#include <fstream>
#include <GL/glew.h>
#include "Transform.h"
#include "Camera.h"
class Shader {
public:
/**
* Shader constructor
* @param fileName Shader file names
*/
exp... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define pb push_back
#define rsz resize
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
using pi = pair<int, int>;
#define f first
#define s second
#define mp make_pair
int main()
{
setIO();
vector<pai... |
#include <iostream>
#include <string>
#include "opencv/highgui.h"
#include "opencv/cv.h"
#include <math.h>
#include <opencv2/core/core.hpp>
#include <opencv2/ml/ml.hpp>
#define IMAGE_SIZE 250 // normalized W and H sizes of training data
// Color classifier parameters
#define N 1
#define CH 10
#define CS 10
#define CV... |
#ifndef _INTERFAZ_H
#define _INTERFAZ_H
#include <cgicc/CgiDefs.h>
#include <cgicc/Cgicc.h>
#include <cgicc/HTTPHTMLHeader.h>
#include <cgicc/HTMLClasses.h>
#include "dominio.h"
class cInterfaz {
public:
//Constructor
cInterfaz();
//Obtiene una variable de un formulario
int obtenerVariable(std::string, std:... |
#include "image_processing_form.h"
using namespace System;
using namespace System::Windows::Forms;
[STAThread]
int main(array<String^> ^args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
BasicImageProcessing::ImageProccessingForm image_processing_form;
Applicatio... |
# include <iostream>
# include <vector>
typedef unsigned long long ul;
using namespace std;
ul max(ul a, ul b) { return a > b ? a : b; }
ul min(ul a, ul b) { return a < b ? a : b; }
class Node {
public:
ul maxPrice, minPrice, diff;
Node(ul value = 0) { maxPrice = minPrice = diff = value; }
Node operat... |
// github.com/andy489
// https://www.hackerrank.com/contests/practice-9-sda/challenges/kruskalmstrsub
#include <iostream>
#include <algorithm>
using namespace std;
int p[3030];
pair<int, pair<int, int> > edge[5000000];
int find(int j) { return p[j] == j ? j : p[j] = find(p[j]); }
int main() {
int n, m, a, b, ... |
// Section12.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "Prac7.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
auto vec = func();
readFunc(vec);
printFunc(vec);
getchar();
getchar();
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
//Bottom up DP
std::vector<int> ways;
std::vector<int> coins;
std::vector<bool> filled;
int numberOfWaysBU(int n)
{
ways.at(0) = 1; //Number of ways of making 0 is 1, By not using any coins.
for(auto c : coins){
for(int i = c; i<ways.size(); ++i){
wa... |
//
// ExifShellExt - Exif data shell extension
// Copyright (C) 2008 Michael Fink
//
/// \file ExifReader.hpp Exif data reader for JFIF files
//
#pragma once
// includes
#include "JFIFReader.hpp"
#include <vector>
class ExifReader: public JFIFReader
{
public:
ExifReader(Stream::IStream& streamIn)
:JFIFReader... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctime>
#include <math.h>
#define SIZE 120 //种群规模
#define MAXGEN 50 //最大迭代次数
#define P_CORSS 0.75 //交叉概率
#define P_MUTATION 0.05 //变异概率
#define LIN 3
#define RAN 10 //LIN,RAN是染色体数组的行和列
#define ORAN 8 // ORAN = pow(2.0,LIN) 可供输入的数据组数
... |
std::vector<sf::IntRect> creerVect(int start, int ligne, int longueur, int hauteur, int ecart, int nbSprite){
int i;
std::vector<sf::IntRect> v;
for(i=0; i<nbSprite; ++i){
v.push_back(sf::IntRect(start+i*ecart, ligne, longueur, hauteur));
}
return v;
}
class Animation{
public:
Animation(std::vector<std::... |
/*
* Copyright (C) 2007-2015 Frank Mertens.
*
* Use of this source is governed by a BSD-style license that can be
* found in the LICENSE file.
*
*/
#ifndef FLUXMAKE_JOBSERVER_H
#define FLUXMAKE_JOBSERVER_H
#include <flux/Thread>
#include <flux/Channel>
#include "Job.h"
namespace fluxmake {
class JobServer: pu... |
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a=5;
int b= 2;
while(a>b){
cout<<"Ingrese el valor de a: ";
cin>>a;
}
cout<<endl;
cout<<"Saliste del ciclo!";
... |
#ifndef NodeMessageStruct_h
#define NodeMessageStruct_h
#include <RFM69.h>
#include <NodeStruct.h>
class NodeMessageStruct: public RFM69 {
public:
NodeMessageStruct(uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=false, uint8_t interruptNum=RF69_IRQ_NUM) :
RFM69(slaveSelectP... |
//===--- Existential.h - Existential related Analyses. -------*- C++ //-*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LI... |
// ===============================================
// @file pool.cpp
// @author kmurphy
// @brief Specification of memory pool collection class
// ===============================================
#include <iostream>
#include "Pool.h"
// this file is empty as class implementation was so small that
// i just put i... |
#include <stdio.h>
#include <string.h>
int m,q;
char word[500][11];
double B[500];
double T[500][500];
double M[500][500];
int n;
char test[20][100][11];
int w2i(char *input)
{
for(int i=0;i<m;i++)
if(strcmp(input,word[i]) == 0)
return i;
return -1;
}
char *i2w(int input)
{
return word[input];
}
void func(... |
#include "BangerFall.h"
#include "../../../../../GameDefines/GameDefine.h"
#include "../BangerStand/BangerStand.h"
BangerFall::BangerFall(Banger * e) :BangerState(e)
{
translateY = 25.0f;
e->setVy(0);
}
void BangerFall::onCollision(::SidesCollision side)
{
if (side == SidesCollision::Bottom)
banger->setState(ne... |
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
const int maxn = 35;
int n, d[maxn][maxn];
// #define DEBUG
int main() {
#ifdef DEBUG
freopen("d:\\.in", "r", stdin);
freopen("d:\\.out", "w", stdout);
#endif
while (cin >> n && n) {
for (int u = 1; u <= n; ++u)
... |
// dllmain.cpp : Defines the entry point for the DLL application.
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before includin... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "TurretAimingComponent.h"
#include "BarrelMeshComponent.h"
#include "Projectile.h"
#include "TurretMeshComponent.h"
#include "Kismet/GameplayStatics.h"
// Sets default values for this component's properties
UTurretAimingComponent... |
/*************************************************************************
> File Name: examples/testLongLifeFactory.cpp
> Author: Jason
> Mail: jie-email@jie-trancender.org
> Created Time: 2017年03月27日 星期一 22时23分28秒
************************************************************************/
#include "../stock-facto... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#ifndef _LIBSVM_H
#define _LIBSVM_H
#define LIBSVM_VERSION 321
#include <iostream>
#include <fstream>
#include <cstdio>
#pragma warning(disable:4996)
using namespace std;
extern int libsvm_version;
struct svm_node
{
int index;
double value;
};
struct svm_problem
{
int l;
double *y;
stru... |
#pragma once
#include <iostream>
/// \brief Geodetic position
struct GeodeticPosition
{
double latitude; /// Latitude in degrees.
double longitude; /// Longitude in degrees.
double altitude; /// Altitude in meters.
};
/// \brief Operator for reading data from stream.
std::istream& operator>>(std::istream& is... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#ifndef __KMEANS_HH__
#define __KMEANS_HH__
#include "datatype.hh"
#include <string.h>
namespace KMeans {
void main(DataPoint* const centroids, DataPoint* const data);
static void initCentroids(DataPoint* const centroids, const DataPoint* const data) {
for(int kIdx=0; kIdx!=KSize; ++kIdx) {
centroids[kId... |
#ifndef __SNESAPU_HELPERS_H__
#define __SNESAPU_HELPERS_H__
namespace SnesApu
{
class Helpers
{
public:
static short MultiplyVolume(short value, char volume);
static int Clamp(int value);
};
}
#endif
|
#include <iostream>
#include <stdlib.h>
#include "pila.h"
using namespace std;
/*
"Anthony Chaple did this(0_o)"
"|_|0|_|" << endl;
"|_|_|0|" << endl;
"|0|0|0|" << endl;
"---------------------------------"
"original code(had errors, at least when i compiled it on Qt)"
"in EDD book by... |
//C++ INCLUDES
#include <stdlib.h>
#include <algorithm>
#include <vector>
#include <fstream>
#include <iostream>
#include <math.h>
//ROOT INCLUDES
//#include <TSYSTEM.h>
#include <TSystem.h>
#include <TTree.h>
#include <TLatex.h>
#include <TString.h>
#include <TFile.h>
#include <TH1D.h>
#include <TH1F.h>
#include <T... |
template <class Type>
Type hcr_min(Type a, Type b){
return 0.5 * (a + b - sqrt(1e-4 + (a-b) * (a-b)));
};
template <class Type>
Type hcr_max(Type a, Type b){
return 0.5 * (a + b + sqrt(1e-4 + (a-b) * (a-b)));
};
template <class Type>
Type hcr(Type ssb, vector<Type> hcrConf){
Type Ftarget = hcrConf(0);
Type Fli... |
#include "basicheaders.h"
#include "tree.h"
#include "customvector.h"
namespace lrstruct {
bool Node::stepLoopSwitcher = false;
bool Node::isStepByStepMode = false;
int Node::findDepth(Node* root) {
if(root == nullptr) {
return 0;
}
if(root->_left == nullptr && root->_... |
#include <windows.h>
#include <tchar.h>
#include <cstdio>
#include <vector>
using std::vector;
#define VK_LETTER_A 0x41
#define VK_LETTER_S 0x53
#define VK_LETTER_D 0x44
#define VK_LETTER_F 0x46
// 1P
#define VK_A VK_LETTER_A
#define VK_B VK_LETTER_S
#define VK_C VK_LETTER_D
#define VK_D VK_LETTER_... |
#ifndef __FGSpeedPickUp__H__
#define __FGSpeedPickUp__H__
class AudioCue;
class FGSpeedPickUp :
public LivingObject
{
protected:
AudioCue* m_pPickedUpAudio;
double m_bonusTime;
float m_speedBoost;
public:
FGSpeedPickUp(float boostAmount,double boostTime, const char* cameraName = GAME_DEFAULT_CAME... |
#pragma once
#include<iostream>
#include<fstream>
#include<string>
#include <sstream>
#include<vector>
using namespace std;
#include "PersonalInformation.h"
class ExperienceFormula
{
public:
ExperienceFormula();
ExperienceFormula(string filepath);
~ExperienceFormula();
//private:
vector <int> value;
void Defau... |
// Matrice.cpp : main project file.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int i;//Numara coloanele
int j;//Numara randurile
int n;//Numarul maxim de coloane
int m;//Numarul maxim de randuri
cout<<"Introduceti numarul de coloane(maxim 10):";
cin>>n;
cout<<"Int... |
/**
* \file parser.hpp
* \date Jan 27, 2016
*/
#ifndef PCSH_PARSER_HPP
#define PCSH_PARSER_HPP
#include "pcsh/exportsym.h"
#include "pcsh/arena.hpp"
#include "pcsh/ir.hpp"
#include "pcsh/types.hpp"
#include <iostream>
#include <memory>
#if defined(_MSC_VER)
# pragma warning(disable:4251)
#endif // defined(_MSC_... |
/**********************************************************************
* Program: carLot2.cpp
* Author: Jason Cearley
* Class: CS161
* Date: 11/27/14
* Modified: 11/27/14
* Description: This program consists of a class called Date that
* consists of an int called day, an int called month and
* an in... |
#pragma once
#include <SDL2/SDL.h>
#include "Layer.hpp"
#include "Ball.hpp"
#include "Player.hpp"
#include "Score.hpp"
class GameLayer : public Layer
{
private:
void initBall();
void paintScore();
public:
GameLayer(SDL_Renderer *rend);
void init() override;
void processControls() override;
void update() overri... |
#include "pch.h"
#include <boost/lexical_cast.hpp>
#include "PqColumnDataSource.h"
#include "PqResultSource.h"
#include "PqUtils.h"
PqColumnDataSource::PqColumnDataSource(PqResultSource* result_source_, const DATA_TYPE dt_, const int j) :
DbColumnDataSource(j),
result_source(result_source_),
dt(dt_)
{
}
PqColum... |
#include "VertexBufferAttrib.h"
namespace revel
{
namespace renderer
{
} // ::revel::renderer
} // ::revel
|
class Solution {
public:
bool isMonotonic(vector<int>& A) {
int inc = 1, dec = 1, n = A.size();
for (int i = 1; i < n; ++i) {
inc += (A[i - 1] <= A[i]);
dec += (A[i - 1] >= A[i]);
}
return (inc == n) || (dec == n);
}
}; |
//
// Tower.h
// tower
//
// Created by wangpeng on 15/7/31.
//
//
#ifndef __tower__Tower__
#define __tower__Tower__
#include <stdio.h>
#include "cocos2d.h"
#include "Map1.h"
#include "RoleManager.h"
#include "BulletManager.h"
using namespace cocos2d;
enum TowerType { RED, YELLOW };
class Tower : public cocos2d... |
#include <iostream>
using namespace std;
int main()
{
int number = 74;
char letter = 'y';
float mark = 324.45;
double mark2 = 2342423423.3434;
bool value = true;
unsigned int a = 875; //Only postive values
short int b = 14; // only 2 byte
long int c = 165671; //8 bytes
cout << "... |
//KaiXinAPI_InitialLogin.h
#ifndef __KaiXinAPI_InitialLogin_H__
#define __KaiXinAPI_InitialLogin_H__
#include "KaiXinAPI.h"
typedef struct
{
int ret;
char msg[64];
char uid[32];
char verify[128];
char wapverify[128];
}tResponseInitialLogin;
extern void* KaiXinAPI_InitialLogin_JsonParse(char *text);
cla... |
#pragma once
class face
{
public:
face();
~face();
};
|
//---------------------------------------------------------------------------
#ifndef JsonVclUtilsH
#define JsonVclUtilsH
//---------------------------------------------------------------------------
namespace Jsonutils {
const UnicodeString JsonTrimSpaces(const UnicodeString &sJson);
}
#endif
|
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#ifndef JACTORIO_INCLUDE_GAME_LOGIC_CONVEYOR_CONTROLLER_H
#define JACTORIO_INCLUDE_GAME_LOGIC_CONVEYOR_CONTROLLER_H
#pragma once
namespace jactorio::game
{
class World;
/// Updates belt logic for a logic chunk... |
#include "EurCall.h"
#include "EurPut.h"
#include <iostream>
using namespace std;
int main()
{
double T, K;
int i;
cout << "Enter Time to expiry: " << endl;
cin >> T;
cout << "Enter Strike price: " << endl;
cin >> K;
MarketData Object;
Object.GetMarketData();
cout << "Call (1) or Put (2): " <... |
//
// RoomCardManager.cpp
// demo_ddz
//
// Created by 谢小凡 on 2018/2/16.
//
#include "RoomCardManager.hpp"
#include "RoomData.hpp"
#include "CommonMethodSet.hpp"
#include "SimpleAiActionManager.hpp"
#include "SimpleToastManager.hpp"
#include "audio/include/SimpleAudioEngine.h"
using namespace CocosDenshion;
using n... |
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#define eps 1e-8
#define NMAX 100
using namespace std;
typedef vector<double> vec;
typedef vector<vec> mat;
int col[NMAX];
int r;
mat gauss(mat A, vec b){
/*
GaussianEliminationの特殊な場合として,Ax = b を解く
*/
int n = A.si... |
#include <iostream>
#include<vector>
using namespace std;
bool func(vector<int> v,long long int sum)
{
long long int lsum,rsum;
lsum=0;
rsum=sum;
for(int i=0;i<v.size();i++)
{
lsum+=(i>0)?v[i-1]:0;
rsum-=v[i];
if(lsum==rsum)
return 1;
}
return 0;
}
int main() {
int tc;
cin>>tc;
while(tc--)
{
int n;... |
#ifndef _Scene_h_
#define _Scene_h_
class Scene
{
public:
void __cdecl SetRenderAABB(bool);
};
#endif |
#pragma once
#include <map>
#include <vector>
#include <string>
#include "Common.hpp"
#include "Platform.hpp"
namespace rustling
{
class PlatformMgr
{
protected:
static std::vector<cl_platform_id> platforms;
public:
static std::size_t getNumPlatforms();
static Platform makePlatform(cl_device_type type);
... |
#include "catch.hpp"
#include "base/piecewise_interval.h"
#include "base/interval.h"
#include "base/interval_algo.h"
#include "base/std_ext/math.h"
#include <iostream>
#include <sstream>
using namespace std;
using namespace ant;
TEST_CASE("Interval: Default ctor", "[base]") {
REQUIRE_NOTHROW( interval<int> a(0,10... |
// ****************** CHydroSimulatorDrv.cpp *******************************
// Generated by TwinCAT Target for MATLAB/Simulink (TE1400)
// MATLAB R2019a (win64)
// TwinCAT 3.1.4022
// TwinCAT Target 1.2.1237
// Beckhoff Automation GmbH & Co. KG (www.beckhoff.com)
// ***********************************************... |
#ifndef METROMAP_UI_MAPVIEW_H
#define METROMAP_UI_MAPVIEW_H
#include <QPointF>
#include <QWidget>
template <typename T> class QList;
namespace Ui {
class MapView;
} // Ui
namespace metro {
class CrossOverItem;
class MetroMapMainWindow;
class StationItem;
class RailTrackItem;
class MapView : public QWidget
{
Q... |
#include "Vector3.h"
#include <math.h>
using namespace kyrbos;
//---------------------------------------------
Vector3::Vector3(float x, float y, float z){
this->x = x;
this->y = y;
this->z = z;
}
//---------------------------------------------
Vector3::Vector3() : x(0), y(0), z(0){
}
//------------------------... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "TankTurret.h"
#include "Classes/Engine/World.h"
void UTankTurret::RotateTurret(float RelativeSpeed)
{
RelativeSpeed = FMath::Clamp<float>(RelativeSpeed, -1, 1);
auto ElevationChange = MaxDegreesPerSecond * RelativeSpeed * GetWor... |
#pragma once
#include "slice.h"
namespace data
{
class blank_slice : public slice
{
public:
blank_slice()
{
}
virtual pslice clone() const
{
return pslice ( new blank_slice );
}
virtual pslice clone(const std::vector<unsigned> &other) const
{
return clone();
}
... |
/*
* Copyright (C) 2012-2016 Open Source Robotics Foundation
*
* 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... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#include "LCD.hpp"
#include "Nunchuck.hpp"
#include <Arduino.h>
#define __AVR_ATmega328P__
void print_data_text(Nunchuck::Data data)
{
Serial.print("Z=");
Serial.print(data.zbut);
Serial.print("\tC=");
Serial.print(data.cbut);
Serial.print("\tJoyX=");
Serial.print(data.joyx);
Serial.print("... |
#include "GunnerDie.h"
#include "../../../../../GameDefines/GameDefine.h"
GunnerDie::GunnerDie(Gunner* headGunner) :GunnerState(headGunner)
{
pGunner->setVy(Define::ENEMY_MIN_JUMP_VELOCITY);
timeDie = 0;
translateY = 25.0f;
}
::StateGunner GunnerDie::getState()
{
return StateGunner::Die;
}
void GunnerDie::update... |
#ifndef _ROS_body_tracker_msgs_BodyTracker_h
#define _ROS_body_tracker_msgs_BodyTracker_h
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "ros/msg.h"
#include "geometry_msgs/Point32.h"
namespace body_tracker_msgs
{
class BodyTracker : public ros::Msg
{
public:
typedef int32_t _body... |
#include <bits/stdc++.h>
#define MAX 1000001
#define M 100000000
#define ll long long
#define ld long double
#define ESP 0.0001
using namespace std;
struct node {
struct node* child[26];
int val;
};
node *root;
int addString(string s) {
int l = s.length();
node *temp = root;
for (int i=0;i<l;i++) {
if (temp->... |
#include "Map.h"
Map::Map(sf::RenderWindow * window, std::string path)
{
this->window = window;
std::fstream f;
f.open(path);
std::string a;
while (!f.eof())
{
getline(f, a);
map.push_back(a);
}
f.close();
tex1.loadFromFile("Image\\Wall.png");
tex2.loadFromFile("Image\\Road.png");
tex3.loadFrom... |
#include "image_viewer.hpp"
#include <string>
#include <iostream>
#include <exception>
int main(int argc, char* argv[]){
ImageViewer iv(argv[1]);
iv.enterMainLoop();
return 0;
}
|
#ifndef EasyTcpServer_hpp_
#define EasyTcpServer_hpp_
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include<Windows.h>
#include<WinSock2.h>
//链接windows 动态库
#pragma comment(lib,"ws2_32.lib")
#else
#include<unistd.h>
#include<arpa/inet.h>
#include<string.h>
#def... |
//
// server.cc
// ~~~~~~~~~
//
#include <boost/bind.hpp>
#include <boost/thread/thread.hpp>
#include <string>
#include <iostream>
#include <thread>
#include "logger.h"
#include "server_information.h"
#include "leaderboard.h"
#include "server.h"
#include "static_request_handler.h"
#include "common_request_handler.h"
#... |
#include "utils.h"
unsigned long get_current_time(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return (tv.tv_sec*1000000 + tv.tv_usec);
}
void swapPointerUsePointer(int8_t **p, int8_t **q)
{
int8_t *t = *p;
*p = *q;
*q = t;
}
void swapPointerUseReference(int8_t *&p, int8_t *&q)
{
... |
/* Copyright 2017-2018 All Rights Reserved.
* Gyeonghwan Hong (redcarrottt@gmail.com)
*
* [Contact]
* Gyeonghwan Hong (redcarrottt@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 Lic... |
#include "util.hpp"
using namespace cv;
using namespace std;
void detectAndDraw( Mat img, CascadeClassifier& cascade,
CascadeClassifier& nestedCascade,
double scale, bool tryflip )
{
double t = 0;
std::vector<Rect> faces, faces2;
const static Scalar colors[] =
{
S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.