text stringlengths 8 6.88M |
|---|
#include "data_associate_known.h" // import file to test
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include "ut.hpp"
using namespace boost::ut;
using namespace boost::ut::bdd;
int main() {
"data_associate_known"_test = [] {
given("I have some arguments") = [] {
... |
#include<bits/stdc++.h>
using namespace std;
main()
{
int test,i;
double p1,p2,r,cal;
while(scanf("%d",&test)==1)
{
for(i=1; i<=test; i++)
{
scanf("%lf %lf %lf",&p1,&p2,&r);
cal=sqrt(pow(p1,2)+pow(p2,2));
printf("%0.2lf %0.2lf\n",r-cal,r+cal);
... |
// Alfred Ledgin
// 10/31/2015
// CS 303
// Project 2
#pragma once
#include <iostream>
#include <string>
using namespace std;
class StringToInt
// The purpose of this class is to convert a string of characters representing
// a positive integer to the integer value represented. This will only
// convert str... |
//===========================================================================
//! @file primitive.cpp
//! @brief プリミティブ描画
//===========================================================================
namespace {
std::vector<Matrix> matrixStack_;
Matrix matWorld_ = Matrix::identity();
gpu::Buffer* ... |
#define _CRT_RAND_S
#include <iostream>
#include <Windows.h>
#include <string>
#include <thread>
#include <chrono>
#include <random>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <Wincrypt.h>
#include "Console.h"
#include "Hash.h"
#include "Rand.h"
#include "xxhash.h"
#define NUMBER_OF_THREADS 1
#de... |
#pragma once
#pragma once
#include "../../Graphics/Skybox/Skybox.h"
#include "../../UI/Dependencies/IncludeImGui.h"
namespace ae
{
namespace priv
{
namespace ui
{
inline void SkyboxToEditor( ae::Skybox& _Skybox )
{
ImGui::Text( "Skybox" );
const CubeMap* CurrentCubeMap = _Skybox.GetCubeMap();
... |
#include <iostream>
using namespace std;
//void display(int arr[]){
// int size = sizeof(arr)/sizeof(int);
// for(int i=0; i<7; i++){
// cout << arr[i] << endl;
// }
//}
void testArray(int a);
int main() {
int arr[5] = {1,2,3,4,5};
testArray(arr[0]);
return 0;
}
void testArray(int c){
... |
/* -*- 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.
*
* @file
* @author Owner: Karianne Ekern (karie)
*
*/
#inclu... |
#include<iostream>
using namespace std;
int addtwo(int a, int b){
int sum;
sum = a + b;
return sum;
}
void printsome(int x,int y){
cout << " EXecuted function" << endl;
cout << "inputted value :" << x <<","<<y << endl;
}
int y = 5;
int main(){
int x = 89;
int y = 56;
printsome(89,56);
int tot = addtw... |
#include <iostream>
#include <string>
std::string a1z26Crypt(std::string input);
std::string a1z26Decrypt(std::string input); |
/*
replay
Software Library
Copyright (c) 2010-2019 Marius Elvert
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, copy, mod... |
#ifndef OBJETOS_H
#define OBJETOS_H
class Objeto
{
public:
SDL_Surface* imagem;
SDL_Rect quadro, posicao;
Mix_Chunk* chunk;
bool visivel;
/*void Desenhar()
{
SDL_BlitSurface(this.imagem, &this.quadro, janela, &this.posicao);
};*/
private:
};
Objeto iniciar, iniciar_over, cred... |
#pragma once
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc/types_c.h>
#include <iostream>
using namespace cv;
using namespace std;
float Point_Distance_2(Point2f p1, Point2f p2);
float Point_Distance_3(Point3f p1, Point3f p2);
RotatedRect Rect_Rotate(RotatedRect rect);
//定义结构:包含轮廓总集、选定轮廓的序号;
typedef struc... |
// PCL lib Functions for processing point clouds
#ifndef PROCESSPOINTCLOUDS_H_
#define PROCESSPOINTCLOUDS_H_
#include <pcl/io/pcd_io.h>
#include <pcl/common/common.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/filters/crop_box.h>
#include <pcl/kdtree/kdtree.h>
#include ... |
/*
* Password.h
*
* Created on: 18/06/2015
* Author: root
*/
#ifndef PASSWORD_H_
#define PASSWORD_H_
#include "define.h"
using namespace std;
class Password
{
public:
static string makeStr(string soureStr,string targetStr);
static string getStr(string& str);
};
#endif /* PASSWORD_H_ */
|
/*
Copyright 2022 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, ... |
#include <initializer_list>
#include <algorithm>
class vector1 {
int sz;
double* elem;
public:
vector1(int);
~vector1();
int size();
double get(int) const;
void set(int, double);
}; |
#include "../include/io.h"
#include "../../core/include/error.hpp"
#include <fstream>
namespace li {
/*
Matrix_<LI_U8> imload(const char *fname) {
std::ifstream ifs(fname, std::ifstream::binary);
if (ifs) {
BitMapFileHeader *fh = new BitMapFileHeader;
BitMapInfoHeader ... |
// Created on: 1999-03-10
// Created by: data exchange team
// 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 ... |
#include<string>
#include<iostream>
#include<fstream>
#include<conio.h>
//#include<stdio.h>
using namespace std;
const string filename="dict.txt";
string InDictionary(string& infile,string dic_word)
{
infile>>dic_word;
return (dic_word);
}
int main()
{
ifstream infile(filename,ios::in);
str... |
#ifndef _TPC8407_h
#define _TPC8407_h
#include "Arduino.h"
class TPC8407 {
private:
int fet2, fet4, fet6, fet8;
int vel;
public:
TPC8407(int _fet2, int _fet4, int _fet6, int _fet8, int _vel);
TPC8407(int _fet2, int _fet4, int _fet6, int _fet8);
void forward();
void forward(int pwm);
voi... |
int Solution::solve(vector<vector<int> > &A, int B) {
// int solve(vector<vector<int> > &A, int B) {
int N = A.size();
// vector<int> vertical(N,0);
vector<vector<int> > horizontal(N, vector<int> (N, 0));
int sum = 0;
for (int i = 0; i < N; i++)
{
sum = 0;
for (int j = 0; j < ... |
#pragma once
#include "IP.h"
class TCP : public IP
{
private:
WORD m_Sourceport;
WORD m_Destinationport;
DWORD m_Sequencenumber;
DWORD m_Acknowledgementnumber;
BYTE m_TCPheaderlengthUnused;//4+4
BYTE m_UnusedFlags;//2+6
WORD m_Windowsize;
WORD m_Checksum;
WORD m_Urgentpointer;
public:
TCP(void) { ; }
~TCP(v... |
/*
ID: stevenh6
TASK: milk
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
using namespace std;
ofstream fout ("milk.out");
ifstream fin ("milk.in");
class Farmer {
public:
int units, ppu;
};
bool compare(Farmer first, Farmer second) {
return first.ppu < se... |
#include <iostream>
#define N 10
#define P 1000000
long long permute(int d, long long order, bool used[], int pass);
int fac(int n);
int main()
{
bool used[N] = {0};
std::cout << permute(0, 0, used, P) << "\n";
}
long long permute(int d, long long order, bool used[], int pass)
{
for (int i = 0; i < N; i++) {
i... |
#pragma once
#include <sstream>
#include <asio.hpp>
class StreamBuffer {
public:
class const_iterator {
public:
const_iterator & operator++();
bool operator!=(const const_iterator &) const;
asio::mutable_buffer operator*() const;
};
const_iterator begin() const;
const_iterator end() const;
... |
// distinct elements in the range [l, r]
struct node{
int val;
int l, r;
node(int a=-1, int b=-1, int c=0){
val=c;l=a;r=b;
}
};
node tree[8600010]; // nlog(n) space = 8600010
int idx=0;
int build(int l, int r){
if(l==r)
return idx++;
int mid = (l+r)/2;
tree[idx].l = build... |
// Player.cpp
#include "provided.h"
#include "support.h"
using namespace std;
class HumanPlayerImpl
{
public:
int chooseMove(const Scaffold& s, int N, int color);
};
class BadPlayerImpl
{
public:
int chooseMove(const Scaffold& s, int N, int color);
};
class SmartPlayerImpl
{
public:
int chooseMove... |
#ifndef HUMANA_HPP
# define HUMANA_HPP
# include <string>
# include <iostream>
# include "Weapon.hpp"
class HumanA
{
private:
const std::string name_;
const Weapon &weapon_;
HumanA();
public:
void attack(void) const;
HumanA(const std::string &name, const Weapon &weapon);
~HumanA();
};
#endif |
/*
* TMenuPopupBox.cpp
*
* Created on: May 26, 2017
* Author: Alex
*/
#include "TMenuPopupBox.h"
#include <efl_extension.h>
void popup_close_cb(void *data, Evas_Object *obj, void *event_info);
TMenuPopupBox::TMenuPopupBox(std::vector<const char*> buttonList):TPopupBox() {
Evas_Object *btn;
Evas_Objec... |
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
struct Person {
char marca[40]; //Marca studentului
char model[40]; //Model studentului
char origine[40]; //Originea aleasa
int anu; //anul inmatricularii
float pret;
};
struct Person *Person_insert(struct Person *who,int n)
{
... |
/*
* Copyright (c) 2015-2020 Morwenn
* SPDX-License-Identifier: MIT
*/
#include <algorithm>
#include <forward_list>
#include <functional>
#include <iterator>
#include <list>
#include <vector>
#include <catch2/catch.hpp>
#include <cpp-sort/sorters/merge_sorter.h>
#include <testing-tools/distributions.h>
TEST_CASE( "... |
$NetBSD$
* don't use kqueue on netbsd since it misses EVFILT_USER
--- vio/viosocket.cc.orig 2019-12-09 19:53:17.000000000 +0000
+++ vio/viosocket.cc
@@ -68,6 +68,10 @@
#include "mysql/psi/mysql_socket.h"
+#ifdef __NetBSD__
+#undef HAVE_KQUEUE
+#endif
+
int vio_errno(Vio *vio MY_ATTRIBUTE((unused))) {
/* These ... |
#include <iostream>
using namespace std;
int main() {
int q;
cin >> q;
for (int t = 0; t < q; ++t) {
int a;
cin >> a;
int k;
for (k = 30; k >= 0; --k) {
if ((a >> k) & 1) break;
}
int ans = (1 << (k + 1)) - 1;
if (a != ans) {
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef DOM_DOMRUNTIME_H
#define DOM_DOMRUNTIME_H
#include "modu... |
// 消息处理对象的基类模板,需要关注消息总线的类可以以该模板类为基类,这样就能
// 以简单的函数调用和相同的形式将自己的成员函数注册到消息总线
//
#ifndef MSGBUS_HANDLER_BASE_H
#define MSGBUS_HANDLER_BASE_H
#include "threadpool.h"
#include "msgbus_interface.h"
#include "lock.hpp"
#include <map>
#include <boost/unordered_map.hpp>
#include <string>
#include <boost/bind.hpp>
#include <boos... |
/**
* @file testCommandMap.cxx
* @author Krzysztof Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl)
* @date 23/11/2006
* @brief Just a test program for CommandMap interface
*/
// includes from standard libraries
#include <string>
#include <iostream>
// local includes
#ifndef DUMMYGEN_EXTERN_C_H
#include "DUMMYGEN_extern_C... |
/*********************************************************\
* 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... |
/*
* @lc app=leetcode.cn id=80 lang=cpp
*
* [80] 删除排序数组中的重复项 II
*/
// @lc code=start
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
int removeDuplicates(vector<int>& nums) {
int n = nums.size();
if(n==0)return 0;
int slow= 0;
int fas... |
// Copyright (c) 2013-2015 Thomas Heller
//
// SPDX-License-Identifier: BSL-1.0
// 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)
#pragma once
#include <pika/config.hpp>
#if defined(PIKA_HAVE_MODULE_MPI_BASE)
... |
#include "manager_controller.h"
#include "Registration/RegisterManager.h"
#include "Registration/RegisterSendKeyManager.h"
#include "Auth/LoginManager.h"
#include "Auth/LoginSendKeyManager.h"
#include "iostream"
namespace m2 {
namespace server {
ManagerController::ManagerController(Database *database): db(database... |
/*
* color_grid.cpp
* Purpose: Contain the Spectrum-imitating "color grid". The color grid is one eighth the height and
* width of the screen and holds one color per cell at a time. This is to imitate the
* Spectrum's "attribute clash", which was caused by the console's ability to only display
* ... |
// 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 GNU Lesser General Public License version 2.1 as published
... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long a=0,b=0,len,counta = 0,countb = 0;
int t;
char str[100000];
bool flaga = 0,flagb = 0;
scanf("%d",&t);
for(int j =0;j < t;j++)
{
scanf("%s",str);
len = strlen(str);
a = 0;b =0;counta = 0;countb... |
/*
* File: main.cpp
* Author: Elijah De Vera
* Created on January 5, 2021, 12:36 AM
* Purpose: Restaurant Bill
*/
//System Libraries
#include <iostream> //I/O Library
using namespace std;
//User Libraries
//Global Constants
//Math, Science, Universal, Conversion, High Dimensioned Arrays
//Fu... |
#include <iostream>
#include "../Plain.h"
#include "../River.h"
#include "../testMacros.h"
#include "../Area.h"
#include "../exceptions.h"
#include "../Mountain.h"
#include "../World.h"
using namespace mtm;
std::map<std::string, Clan> makeClanMap(){
std::map<std::string, Clan> clan_map;
clan_map.insert(std::pa... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* 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.
*/
#ifndef SECURITY_UNITE_H
#define SECURITY_UNITE_H
#ifdef WEBSER... |
/**
* Copyright (c) 2023, Timothy Stack
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of condi... |
#ifndef __CocosProject__EnemyTank__
#define __CocosProject__EnemyTank__
#include "cocos2d.h"
#include "ui/cocosGUI.h"
#include <stdio.h>
class EnemyTank : public cocos2d::Node
{
public:
EnemyTank();
~EnemyTank();
virtual bool init() override;
static EnemyTank* create();
void update(float);
void reset();
... |
// DisplayDeviceArmband.h: interface for the DisplayDeviceArmband class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DISPLAYDEVICEARMBAND_H__809A67E4_0DFE_414D_B801_86B8A624097A__INCLUDED_)
#define AFX_DISPLAYDEVICEARMBAND_H__809A67E4_0DFE_414D_B801_86B8A624097A__INC... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "S05_TestingGrounds.h"
#include "ActorPool.h"
// Sets default values for this component's properties
UActorPool::UActorPool()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can... |
#ifndef None_P_HPP
#define None_P_HPP
#include <QObject>
class NonePrivate : public QObject
{
Q_OBJECT
public:
NonePrivate();
~NonePrivate();
};
#endif
|
#include "SquareHelper.h"
void SquareHelper::changeLength(Square& square, double length)
{
square.length = length;
} |
#include <iostream>
#include <string>
using namespace std;
#define MAX_MAP 5
int board[MAX_MAP][MAX_MAP];
int used[MAX_MAP][MAX_MAP]={0,};
int dx[8] = {-1, -1, -1, 1, 1, 1, 0, 0};
int dy[8] = {0, 0, 0, 0, 0, 0, 1, -1};
bool inRange(int y, int x) {
};
bool hasWord(int y,int x, const string& word) {
if ( !inR... |
#include "Settings.h"
ofxXmlSettings Settings::myOfxXmlettings = ofxXmlSettings();
void Settings::save(vector<int> vals) {
if (vals.size() >= 4) {
myOfxXmlettings.clear();
myOfxXmlettings.setValue("settings:width", vals[0]);
myOfxXmlettings.setValue("settings:height", vals[1]);
myOfxXmlettings.setValue("sett... |
#pragma once
#include <list>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <random>
#include <iomanip>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include "string_format.h"
#include "tsc_x86.h"
#include <ass... |
#include <iostream>
using namespace std;
void Arreglo (int arr[], int orden) {
for (int i=0;i<orden;i++) {
cout<<"Num "<<(i+1)<<": ";
cin>>arr[i];
}
cout<<endl;
}
void Mostrar (int arr[], int orden) {
for (int j=0;j<orden;j++) {
cout<<arr[j]<<" ";
}
cout<<endl;
}
void ... |
/* -*- mode: c++; tab-width: 4; c-basic-offset: 4 -*- */
group "layout.text_align";
require init;
language c++;
include "modules/layout/content/content.h";
global
{
HTMLayoutProperties props;
}
test("Text alignment LTR non-overflow")
{
Line line;
line.SetWidth(LayoutCoord(100));
line.AllocateSpace(LayoutCoord... |
#include "utils.hpp"
#include "rank_ptts.hpp"
namespace pc = proto::config;
namespace nora {
namespace config {
rank_reward_ptts& rank_reward_ptts_instance() {
static rank_reward_ptts inst;
return inst;
}
void ra... |
// Created on: 1991-06-24
// Created by: Didier PIFFAULT
// Copyright (c) 1991-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 GN... |
#include <iostream>
#include <string>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <signal.h>
#include <fcntl.h>
#include <algorithm>
using namespace std;
string envVar[50];
string commands... |
/* -*- Mode: c++; tab-width: 4; 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.
*
* Allowed #if-ery: gcc/glibc version.
* Sort order: alphabetic among the simple, ad ho... |
#pragma once
#include <stdexcept>
#include <vector>
namespace replay
{
template <typename T> class rle_vector
{
public:
using backing_container = std::vector<std::pair<T, std::size_t>>;
using backing_iterator = typename backing_container::const_iterator;
using size_type = std::size_t;
using value_ty... |
#include "H/sound.h"
char MasterVolume;
void PlaySound(uint32 nFrequence, char Volume) {
uint32 Div;
uint8 tmp;
if (Volume > 100){
char invert2[99];
for (char i = 100; i>0; i--) invert2[i] = i;
Volume = invert2[Volume];
float Volpercent = Volume / 100;
int volpercent2 = Volpercent*100;
nFrequence... |
//×Ö·û´®Æ¥Å䣺KMPËã·¨
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
char a[1000000 + 10],b[10000 + 10];
int next[10000 + 10];
int main()
{
int... |
#include <string>
#include "AllinProc.h"
#include "HallManager.h"
#include "Logger.h"
#include "Room.h"
#include "Configure.h"
#include "ErrorMsg.h"
#include "GameCmd.h"
#include "ProcessManager.h"
REGISTER_PROCESS(CLIENT_MSG_ALL_IN, AllinProc)
AllinProc::AllinProc()
{
this->name = "AllinProc" ;
}
AllinProc::~Allin... |
#include "Object.hpp"
Object::Object(){
}
Object::~Object(){
}
void Object::update() {
}
|
// Copyright 2019 The WCT(Wisdom City Times) Authors. All rights reserved.
#ifndef CHROME_BROWSER_UI_VIEWS_TABS_BIG_POPUP_THUMBNAIL_H_
#define CHROME_BROWSER_UI_VIEWS_TABS_BIG_POPUP_THUMBNAIL_H_
#include <map>
#include <memory>
#include <vector>
#include "base/macros.h"
#include "chrome/browser/ui/views/tabs/popup_t... |
vector < vector < pii > > g ;
int n, m ;
void dijkstra(int s, vll& d, vi& p){
d.assign(n + 1, Inf) ;
p.assign(n + 1, -1) ;
priority_queue < pair < ll, int >, vector < pair < ll, int > > , greater< pair < ll, int > > > pq ;
d[s] = 0 ;
pq.push(make_pair(0, s)) ;
while(!pq.empty()){
int ... |
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
//Lendo corrente
#define tensao 110
const int sensorIn = A0;
int mVperAmp = 100;
double Vpp = 0;
double Vp = 0;
double Vrms = 0;
double Irms = 0;
double consumo;
//Lendo corrente
//Conexão WiFi
const char* ssid = "T... |
/* -*- 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 CSS_ANIMATIONS_H
#define CSS_ANIMATIONS_H
#ifdef CSS_ANI... |
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <math.h>
#include <string>
#include <sstream>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <numeric>
typedef long long LL;
typedef unsigned lon... |
#include "cpptest.h"
CPPTEST_CONTEXT("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadedWorker.cpp");
CPPTEST_TEST_SUITE_INCLUDED_TO("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadedWorker.cpp");
class TestSuite_executeWorkItem_a2085ac9 : p... |
#pragma once
#include <string>
#include <vector>
#include <stack>
class Calculator {
public:
static int Calculate(const std::string& expression);
private:
struct Token {
enum class TokenType {
kUnknown,
kConstant,
kUnaryMinus,
kAddition,
kMultiply,
kDiv... |
/******************************************************************************
* $Id$
*
* Project: libLAS - http://liblas.org - A BSD library for LAS format data.
* Purpose: index cell implementation for C++ libLAS
* Author: Gary Huber, gary@garyhuberart.com
*
**********************************************... |
#include "game/GameModes.hpp"
HomeMode::HomeMode(){
gButtonSpriteSheetTexture = new LTexture();
background = new LTexture();
//Set sprites
for( int i = 0; i < BUTTON_SPRITE_TOTAL; ++i )
{
gSpriteClips[ i ].x = 0;
gSpriteClips[ i ].y = i * 200;
gSpriteClips[ i ].w = BUTTON_WIDTH;
gSpriteClips[ i ].h = BUTT... |
//
// Created by arnito on 4/06/17.
//
#ifndef BEAT_THE_BEAT_BALLOS1ACTOR_H
#define BEAT_THE_BEAT_BALLOS1ACTOR_H
#include "../Actor.h"
#include "../entities/Quote.h"
class Ballos1Actor : public Actor {
public:
Ballos1Actor(int playerId,Quote &q, Scene &s);
~Ballos1Actor();
void update(const sf::Time& de... |
#include <iostream>
#define mutqagrel_zangvac int array[5];
#define hashvel_zangvaci_mecaguyn_arjeq mutq(array);
#define tpel_zangvaci_mecaguyn_arjeq std::cout<<"Zangvaci mecguyn arjeqn e "<<maximum(array)<<"\n";
//Mutq funkcian mutqagrum e zangvaci elementnery
int mutq (int array[]) {
std::cout<<"Mutqagreq 5 ch... |
#include "DynamicArray.h"
SeqStack* initStack(){
SeqStack* stack = (SeqStack*)malloc(sizeof(SeqStack));
for(int i=0; i<MAX_SIZE; i++){
stack->data[i] = NULL;
}
stack->size = 0;
return stack;
}
void pushStack(SeqStack* stack, void* data){
if(stack == NULL || data == NULL || sta... |
#include <iostream>
using namespace std;
int main() {
int i, j;
int *p1, *p2;
i = 2;
j = 5;
p1 = &i; // la valeur de p1 est l'adresse de i
cout << endl << "Contenu de p1 vaut : " << *p1 << endl; // Le contenu de p1 vaut 2
i = i + 1;
cout << "Contenu de p1 vaut : " << *p1 << endl; // Le contenu de p1 vaut... |
#include "pch.h"
#include "common.h"
#include <random>
using namespace std;
std::random_device dev;
std::mt19937 rng(dev());
uniform_real_distribution<float> rand_gen(-0.5f, 0.5f);
float rand_next() {
return rand_gen(rng);
}
float rand_next01() {
auto a = rand_gen(rng) + 0.5f;
if (a < 0.0f) return 0.0f;
if (a > ... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1000000000
int main()
{
int n, k;
cin >> n >> k;
vector<int> h(n);
vector<int> dp(n, INF);
for(int i = 0; i < n; i++)
{
int tmp;
cin >> tmp;
//h.push_back(tmp); push_backは末尾に追加
h[i]... |
#include<stdio.h>
#include<string>
#include<string.h>
using namespace std;
int main()
{
char s[200];
memset(s,0,sizeof(0));
scanf("%s",s);
int zero_d=0,dd=0;
int l=strlen(s), a , num[109] , b=0;
int e;//记录e的位置;
a=s[0]-'0';//a;
for(int i=2; i<l; i++)
{
if(s[... |
class 10Rnd_127x99_m107
{
weight = 1.5;
};
class 3rnd_Anzio_20x102mm
{
weight = 1.5;
};
class 5Rnd_762x51_M24
{
weight = 0.25;
};
class 5x_22_LR_17_HMR
{
weight = 0.25;
};
class 20Rnd_762x51_DMR
{
weight = 1;
};
class 5Rnd_17HMR
{
weight = 0.25;
};
class 5Rnd_127x108_KSVK
{
weight = 1.5;
};
class 10Rnd_762x54... |
// Created on: 1995-12-01
// Created by: EXPRESS->CDL V0.2 Translator
// Copyright (c) 1995-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 te... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) Opera Software ASA 1995-2011
*/
#include "core/pch.h"
#ifdef ES_PERSISTENT_SUPPORT
#include "modules/ecmascript/structured/es_persistent.h"
#include "modules/ecmascript/ecmascript.h"
enum E... |
//===========================================================================
//! @file model_mqo.cpp
//! @brief MQOモデル
//===========================================================================
//---------------------------------------------------------------------------
//! MQOソート用
//-----------------------------... |
#include <iostream>
#include <cmath>
#include <iomanip>
#include <cstdlib>
#include <vector>
using namespace std;
int N = 1000000;
int N_bins = 1024;
int rng()
{
int a = 1103515245;
int c = 12345;
int m = (int)1024;
static int x = 0;
x = (a*x+c) % m;
return x;
}
vector<unsigned int> histogram(vector<d... |
#include "Player.h"
const int WARRIOR_HP = 200;
const int WARRIOR_MP = 0;
class Warrior : public Player
{
private:
std::string characterClass{ "warrior" };
public:
Warrior(std::string name, Race race) : Player(name, race, WARRIOR, WARRIOR_HP,
WARRIOR_MP)
{
}
std::string attack()
{
return "I will destroy yo... |
/*
* 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 <gmock/gmock.h>
#include <gtest/gtest.h>
#include <condition_variable>
#include <mutex>
#include <fizz/crypto/test/Tes... |
// Copyright 2015 Intelligent Robotics Group, NASA ARC
#include <robust_filter/robust_filter.h>
namespace robust_filter_node {
RobustFilter::RobustFilter(ros::NodeHandle* nh, ros::NodeHandle* private_nh) {
srand (time(NULL));
std::cout<<std::fixed;
std::cout.precision(8);
int width, height;
double tmp_fx,... |
#pragma once
#include "VdmaOut.h"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#define HPD_GPIO_ADDRESS 0x41200000
class Hdmi
{
private:
Hdmi();
static Hdmi *_instance;
VDMA vdmaOut;
PDWORD hdmiHpdGpio;
public:
static Hdmi* GetInstance();
void TurnOnVideoCapture();
voi... |
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <algorithm>
#include <sstream>
#include <set>
#include <cmath>
#include <map>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <bits... |
#pragma once
#include <boost/variant/static_visitor.hpp>
#include <iostream>
#include <string>
class print_visitor : public boost::static_visitor<>
{
protected:
static constexpr unsigned int INDENT_SPACES = 2;
public:
print_visitor()
: _indent( 0 )
{
}
print_visitor( unsigned int indent )
: _inde... |
// Font block 'magistraltt16_latin_1_supplement_1bpp_0xA9_0xA9' definition
//
// Bitmap data
static const esU8 sc_magistraltt16_latin_1_supplement_1bpp_0xA9_0xA9_data[] = {
________,________,
____XXXX,XX______,
__XXX___,_XXX____,
__XX_XXX,X_XXX___,
_XX_XX__,___XX___,
_XX_XX__,___XX___,
_XX_XX__,___XX___,
_XX_... |
#include "rdtsc_benchmark.h"
#include "ut.hpp"
#include <random>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include "particle.h"
#include "fastslam1_utils.h"
#include "configfile.h"
#include "linalg.h"
#include "trigonometry.h"
#include "fastrand.h"
#include "predict_update.h"
u... |
// Copyright (C) 2012 - 2013 Mihai Preda
#include "Pepper.h"
#include "GC.h"
#include "Parser.h"
#include "VM.h"
#include "Array.h"
#include "Map.h"
#include "SymbolTable.h"
#include "String.h"
#include "CFunc.h"
#include "Type.h"
#include "builtin.h"
#include <assert.h>
#include <stdlib.h>
Pepper::Pepper(void *conte... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2008-2010 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
/**
* @file CryptoHash_impl.cpp
*
* This file implements the l... |
#pragma once
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "Ability.hh"
#include "CppCommons.hh"
#include "DBManager.hh"
#include "Hero.hh"
#include "Town.hh"
#include "Unit.hh"
namespace dbmanager_test {
using namespace CCC;
using namespace HotaSim;
static const char* DB_PATH = "resources/HotaSim.... |
#pragma once
#include <QWidget>
#include <memory>
#include <vector>
using std::unique_ptr;
struct impl_drag_widget;
class drag_widget : public QWidget
{
Q_OBJECT
signals:
void button_triggered (const QString&);
public:
static unique_ptr<drag_widget> make (std::vector<QString> labels = {},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.