text stringlengths 8 6.88M |
|---|
#include <cmath>
#include "../border.h"
/****************************/
/* definizione del contorno */
/****************************/
class Helicoid: public Border {
/* t va da 0 a 4 */
double R;
double r;
double h;
double N;
public:
Helicoid(): R(1.0), r(0.1), h(1.0), N(5.5) {}
vector3 border_f... |
#pragma once
#include "SM_Cube.h"
#include "SM_Ray.h"
#include "SM_Vector.h"
#include "SM_Quaternion.h"
#include "SM_Matrix.h"
#include "SM_Plane.h"
namespace sm
{
bool ray_ray_intersect(const Ray& ray0, const Ray& ray1, vec3* cross);
bool line_line_intersect(const vec3& p1, const vec3& p2,
con... |
/*
* Copyright (c) 2016-2020 Morwenn
* SPDX-License-Identifier: MIT
*/
#include <array>
#include <string>
#include <catch2/catch.hpp>
#include <cpp-sort/comparators/natural_less.h>
#include <cpp-sort/sorters/heap_sorter.h>
TEST_CASE( "string natural sort with natural_less" )
{
std::array<std::string, 7> array =... |
//==================================================================================================
// Name : Configuration.h
// Author : Ken Cheng
// Copyright : This work is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this... |
// Fri Apr 29 12:03:02 EDT 2016
// Evan S Weinberg 2016
// This is a set of testing routines that make sure the inverters (CG, BiCGStab, GMRES)
// always work! Need to update with imaginary value tests.
// Need to put in a test for power iterations. Prob requires returning eigenvector.
#include <iostream>
#inc... |
#pragma once
#include <boost/predef.h>
namespace yama {
#if BOOST_COMP_GNUC
inline void debug_break_function() { asm("int $3"); }
#define BK_DEBUG_BREAK ::yama::debug_break_function
#elif BOOST_COMP_MSVC
#define BK_DEBUG_BREAK ::__debugbreak
#endif
#define BK_ABORT_TODO []() -> void { BK_DEBUG_BREAK(); ::abort(); }... |
#include "PlayerState.h"
PlayerState::PlayerState(PlayerData *playerData)
{
this->mPlayerData = playerData;
}
PlayerState::PlayerState()
{
}
PlayerState::~PlayerState()
{
}
void PlayerState::Update(float dt)
{
}
void PlayerState::HandleKeyboard(std::map<int, bool> keys)
{
}
float PlayerState::GetAcceX()
{
... |
class CZ_75_P_07_DUTY;
class CZ75P_DZ: CZ_75_P_07_DUTY {
displayName = $STR_DZ_WPN_CZ75P_NAME;
descriptionShort = $STR_DZ_WPN_CZ75_DESC;
magazines[] = {"18Rnd_9x19_Phantom"};
};
class CZ_75_D_COMPACT;
class CZ75D_DZ: CZ_75_D_COMPACT {
displayName = $STR_DZ_WPN_CZ75D_NAME;
descriptionShort = $STR_DZ_WPN_CZ75_DESC;... |
#include<iostream>
#include<algorithm>
#include<vector>
#include<deque>
using namespace std;
class MyStack {
public:
/** Initialize your data structure here. */
MyStack() {
//基本思想:队列,用队列实现栈
//当队列push新进来一个元素val,则将队列里原来的所有元素依次出队列重新依次入队列,这样就使得新元素val位于队头了而且原来元素顺序不变
//入栈时间复杂度O(N)出栈时间复杂度O(1)
}
/** Push element ... |
/*
Copyright (C) 2011 John Adcock
Copyright (C) 2011 Narunder S Claire
This file is part of XLW, a free-software/open-source C++ wrapper of the
Excel C API - http://xlw.sourceforge.net/
XLW is free software: you can redistribute it and/or modify it under the
terms of the XLW license. You should have received... |
#pragma once
#ifndef YEAR_H
#define YEAR_H
#include <string>
#include <vector>
#include "month.hpp"
class Year {
private:
std::vector<Month>months;
std::string date;
public:
void setDate(std::string date) { this->date = date; }
std::string getDate() { return date; }
std::string toString();
Mon... |
// https://oj.leetcode.com/problems/divide-two-integers/
// Be careful about overflow when using abs()
class Solution {
public:
int divide(int dividend, int divisor) {
if (divisor == 0) {
return INT_MAX;
}
long long dvd = dividend;
long long dvs = divisor;
... |
#include <iostream>
#include "myException.h"
using namespace std;
/*
class Base {
protected:
int bNumber;
public:
Base() :bNumber(0) {}
Base(int number) :bNumber(number) {}
virtual void show() { cout << "부모함수" << endl; }
};
class Child1 : public Base {
private:
double dData;
public:
Child1(int n, double d) : dDat... |
#include "Clock.h"
Clock::Clock(const string &f)
{
inicio = clock();
funcao = f;
}
Clock::~Clock()
{
clock_t total = clock() - inicio;
cout << "Tempo para a funcao " << funcao << ": (segundos) " << double(total) / CLOCKS_PER_SEC << endl;
}
|
#include "mode/dbA1_test.hpp"
int main() {
dbA1_test::obj().where("id",">","0")->show();
return 0;
} |
#include "select_target.h"
/**
* Select Target Person
*/
SelectTarget::SelectTarget() :
it_(nh_)
{
image_sub_ = it_.subscribe("/ps3_eye/image_raw", 1, &SelectTarget::ImageCallback, this);
target_sub_ = nh_.subscribe("/SelectTargetPerFoRo", 1, &SelectTarget::SelectTargetCallback, this);
target_shirt_pub_ = nh_.a... |
// Created on: 2017-04-21
// Created by: Alexander Bobkov
// Copyright (c) 2017 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 p... |
/* -*- 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.
*
* @author Manuela Hutter (manuelah)
*/
#include "core/pch.h"
#i... |
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include<conio.h>
#include <ctime>
using namespace std;
int STRCMP(char B[],char C[],int n)
{
int I;
for ( I=0;B[I]==C[I] &&
I<n;I++);
return B[I]-C[I];
}
int main()
{
srand((unsigned) time(0));
char A[500]... |
#pragma once
#include "utils/log.hpp"
#define SCENE_TLOG __TLOG << setw(20) << "[SCENE] "
#define SCENE_DLOG __DLOG << setw(20) << "[SCENE] "
#define SCENE_ILOG __ILOG << setw(20) << "[SCENE] "
#define SCENE_ELOG __ELOG << setw(20) << "[SCENE] "
|
#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main(){
int n;
cin >> n;
for(int i=0; i<n; i++){
cin >> a[i];
}
bool flag = true;
int ans = 0;
while(flag){
int m = 1e9;
for(int i=0; i<n; i++){
if(a[i] > 0) m = min(m, a[i]... |
#pragma once
#include <iterator>
#include <cstdint>
//////////////////////////////////////////////////////////////////////////////
/// \file ColorBackInserter.hpp
/// \brief Contains the definition for a class that deals with a color iterator
///
/// \addtogroup Level
/// @{
//////////////////////////////////////////... |
#include "std_lib_facilities.h"
int main()
{
cout<< "Please enter an integer value followed by a unit (cm, m, in, ft)\n";
double number;
double largest = numeric_limits<double>::lowest();
double smallest = numeric_limits<double>::max();
string unit;
double sum = 0;
int number_of_values = 0;
vector<do... |
//
// Created by Alan de Freitas on 05/04/2018.
//
#ifndef EVOLUTIONARY_COMPUTATION_KNAPSACK_H
#define EVOLUTIONARY_COMPUTATION_KNAPSACK_H
#include <iostream>
#include <vector>
#include <chrono>
#include <random>
#include <algorithm>
#include "knapsackP.h"
class knapsack {
public:
knapsack(knapsack_p &p);
v... |
//
// Created by Brady Bodily on 2/3/17.
//
#ifndef ANALYSTCOMPARER_HISTORY_HPP
#define ANALYSTCOMPARER_HISTORY_HPP
#include <fstream>
#include <vector>
#include "PurchaseSale.hpp"
class History {
private:
int m_numDays;
std::vector<PurchaseSale*> m_history;
int m_seedMoney;
public:
History(int day... |
/*
Petar 'PetarV' Velickovic
Algorithm: Edmonds-Karp Algorithm
*/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <complex>
#define MAX_N 500
... |
/*
* LED_Matrix.ino
*
* Created: 6/12/2015 11:12:24 AM
* Author: Tobias Nuss
*/
#define LOG_OUT 1 // use the log output function
#define FFT_N 256 // set to 256 point fft
#include <FFT.h> // include the library
#include <avr/interrupt.h>
#include <avr/io.h>
#include <stdint.h>
#include <math.h>
#include "Ada... |
#include<Keypad.h>
#include<String.h>
#include<Stdlib.h>
const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {9,8,7,6};
byte colPins[COLS] = {5,4,3,2};
Keypad keypad = Keypad(makeKeymap(keys),... |
#pragma once
#include "Interface/ISubPass.h"
#include "Render/FrameStructure.h"
namespace Rocket
{
Interface IDrawSubPass : inheritance ISubPass
{
public:
virtual void Draw(Frame& frame) = 0;
};
} |
#include "highgui.h"
#include "cv.h"
#include "cvaux.h"
#include <ctype.h>
#include <stdlib.h>
#include <iostream>
using namespace cv;
using namespace std;
void hog_svm()
{
cvNamedWindow("PeopleDetection",CV_WINDOW_NORMAL);
CvCapture *capture = cvCreateFileCapture("E:\\毕业设计\\代码\\测试视频\\test.avi");
//CvCapture *ca... |
#define CLIENT_DESCRIPTION "InformationOverlay"
#include <Ogre.h>
#include <OIS/OIS.h>
using namespace Ogre;
using namespace std;
//게임매니저헤더, 게임스테이트헤더
#include "GameManager.h"
#include "PlayState.h"
#include "StartState.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#en... |
#include "Player.h"
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include "vec2.h"
#include "util.h"
#include "Laser.h"
#include "draw.h"
//Initializer for the playermotion struct
playermotion::playermotion() : left(false), right(false), up(false), down(false), xrecent(0), yrecent(0) { }
//Player constructor
Play... |
// Copyright (c) 2019, tlblanc <tlblanc1490 at gmail dot com>
#include "test/test.hpp"
#include "stream_buffer.hpp"
#include "scanner.hpp"
static Scanner scanner_from_content(
char *content,
size_t len) {
auto buffer = std::make_unique<StreamBuffer>(
reinterpret_cast<uint8_t*>(content), len, do_nothi... |
#pragma once
#ifndef VANZATOR_H
#define VANZATOR_H
#include "animal.h"
#include "client.h"
#include <unordered_map>
#include <queue>
class Vanzator
{
public:
Vanzator();
virtual ~Vanzator();
protected:
void Inventariere(animal* an,Client* cl);
private:
};
#endif // VA... |
const int potPin = A0;//potentiometer
const int but1 = 3, but2 = 4, but3 = 5; //button
const int led1 = 11, led2 = 10, led3 = 9; //led
int potValue = 0;
void setup() {
// put your setup code here, to run once:
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(but1, INPUT);
pinMod... |
int Solution::solve(vector<int> &A, int B) {
int n = A.size();
int sum = 0, cnt = 0;
int i = 0, j = 0;
while (j < n) {
sum += A[j];
while (sum >= B)
sum -= A[i], i++;
cnt += j - i + 1;
j++;
}
return cnt;
}
// or
// int Solution::solve(vector<int> &A, int B) {
// int n = A.size();
// int sum ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2009 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser.
** It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#ifdef DATABASE_STORAGE_SUPPORT
#include... |
#include <string>
#include <vector>
#include "Playlist.h"
using namespace std;
class PlaylistLibrary{
public:
PlaylistLibrary();
~PlaylistLibrary();
void addPlaylist(Playlist *playlist);
Playlist * getPlaylist(int user_id);
void removePlaylist(Playlist *playli... |
#include "stepPlayer.h"
PLAY::PLAY(){
_player = PLAYER1;
}
VOID PLAY::Init(){
_player = PLAYER1;
}
INT PLAY::GetPlayer( ){
return _player;
}
VOID PLAY::ChangePlayer( ){
_player = ( _player == PLAYER1 )? PLAYER2 : PLAYER1;
} |
#ifndef RESOURCEMANAGER_H
#define RESOURCEMANAGER_H
#include <GL/glew.h>
#include <map>
#include <string>
#include <fstream>
#include "texture.h"
#include "shader.h"
#include "debug.h"
class ResourceManager{
public:
//lists of shaders and textures
static std::map < std::string, Shader> _shaders;
static std::map ... |
#ifndef STDOPT_OPTION_H
#define STDOPT_OPTION_H
/**
* Copyright 2008 Matthew Graham
* 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
*
... |
#include "il2cpp-config.h"
#include "class-internals.h"
#include "codegen/il2cpp-codegen.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#ifndef ... |
// 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 GNU Lesser General Public License version 2.1 as published
... |
#ifndef __CTRL_BROWSERRO_H
#define __CTRL_BROWSERRO_H
#include "CtrlBrowser.h"
namespace wh {
//---------------------------------------------------------------------------
class CtrlTableObjBrowser_RO final : public CtrlWindowBase<IViewTableBrowser, ModelBrowser>
{
sig::scoped_connection connModel_BeforeRefreshCls;
... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2002 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 XSLT_SUPPORT
#include "modules/xslt/src/xs... |
#pragma once
#include "../../Toolbox/Toolbox.h"
#include "VectorToolbox.h"
#include <string>
#include <iostream>
namespace ae
{
class Vector3;
/// \ingroup math
/// <summary>
/// Represent a position in 2D space. Floating point precision.
/// </summary>
/// <seealso cref="Vector3" />
class AERO_CORE_EXPO... |
#include "Neuron.h"
/**@brief The class Network to emulate a group of active
* neurons connected to form a network
*
* This can run a simulation for a certain number of neurons and a
* certain interval of time.
*/
#ifndef NETWORK_H
#define NETWORK_H
class Network
{
private:
///-------------Attributes------... |
#ifndef _IMAGE_HPP_
#define _IMAGE_HPP_
#include <cstdint>
#include <cstdio>
#include "stb_image.h"
#include "stb_image_write.h"
enum ImageType {
PNG, JPG, BMP, TGA
};
struct Color {
int r, g, b;
};
class Image {
private:
size_t size = 0;
int width, height, channels;
public:
uint8_t* data = NULL;
Image(cons... |
#include "bluedialog.h"
BlueDialog::BlueDialog(QWidget *parent)
: ColorDialog(parent)
{
}
QColor BlueDialog::getColor()
{
return Qt::blue;
}
|
// Copyright (c) 2021 Hartmut Kaiser
//
// 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)
#include <pika/execution.hpp>
#include <pika/init.hpp>
#include <pika/testing.hpp>
//... |
/*
* 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 <folly/container/heap_vector_types.h>
#include <folly/small_vector.h>
namespace quic {
#if !FOLLY_MOBILE... |
#include <bits/stdc++.h>
using namespace std;
int main(){
int x;
vector<int> odd;
vector<int> even;
freopen("DAYCL.inp", "r", stdin);
freopen("DAYCL.out", "w", stdout);
cin >> x;
while(x/10 != 0){
int a = x%10;
if (a%2 == 0)
even.push_back(a);
else
odd.push_back(a);
x /= 10;... |
#include "JumpFlooding.h"
#include <API/Code/Graphics/Shader/ShaderParameter/ShaderParameterInt.h>
#include <API/Code/Graphics/Shader/ShaderParameter/ShaderParameterFloat.h>
#include <API/Code/Graphics/Shader/ShaderParameter/ShaderParameterTexture.h>
#include <API/Code/Maths/Functions/MathsFunctions.h>
#include <API/C... |
//model.hpp
//Abstract base class for models.
//Created by Lewis Hosie
//21-11-11
//In case you're wondering why this has subclasses and why rendering happens here,
//it's because different model formats may well have different internals. Some may have
//indices, some not; some may not have tangents and others might r... |
//
// RWLock_Android.cpp
//
// $Id: //poco/1.4/Foundation/src/RWLock_Android.cpp#1 $
//
// Library: Foundation
// Package: Threading
// Module: RWLock
//
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "_/RWLock_Androi... |
/*!
* \file Scene.h
* \brief Define the scene
* \author Pierre-Jean Besnard & Louis Billaut
* \version 1.0
*/
#include "Shape.h"
/*! \class Scene
* \brief Allows to create a scene, add object to it and calculate intersection with them
*/
class Scene {
public:
/*!
* \brief Constructor
* Constructor of the s... |
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE MyTest
#include <boost/test/unit_test.hpp>
#include "wignerSymbols.h"
#include <complex>
#include <cmath>
#include <cfloat>
#include <map>
#include <ctime>
#include <iostream>
#include "Log.hpp"
#include "Powerspectrum_Fisher.hpp"
#include "Model.hpp"
#include "Ana... |
#ifndef F3LIB_TYPES_VECTOR3_H_
#define F3LIB_TYPES_VECTOR3_H_
namespace f3
{
namespace types
{
struct Vector3
{
float x;
float y;
float z;
explicit Vector3();
explicit Vector3(float x, float y, float z);
Vector3 operator+(const Vector3& rhs);
Vector3 operator*(float rhs) const... |
/** @file
* @brief
* База для оперирования данными по выборам в России.
* @details
* Эта база данных была создана для эффективного оперирования табличными
* числами, полученными с официального сайта центризбиркома.
*
* @author Головко Александр
*/
//######################## - LIBRARIES - #####... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "openvino/runtime/remote_context.hpp"
#include "ie_remote_blob.hpp"
#include "ie_remote_context.hpp"
#define REMOTE_CONTEXT_STATEMENT(...) \
if (_impl == nullptr) ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2008 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#include "core/pch.h"
#ifdef _ENABLE_AU... |
#ifndef ASYNCEMULATIONDECODER_H
#define ASYNCEMULATIONDECODER_H
#include "image.h"
#include "modules/util/simset.h"
class AsyncEmulationDecoder : public ImageDecoder, public Link
{
public:
AsyncEmulationDecoder();
~AsyncEmulationDecoder();
OP_STATUS DecodeData(BYTE* data, INT32 numBytes, BOOL more, int& resendBy... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
#inc... |
#include "IdleDecision.h"
void IdleDecision::makeDecision(Agent* agent, float deltaTime)
{
vector2 agentSpeed = agent->GetVelocity(); //get speed
//start to slow the agent down
float slowAmount = 1.001f;
if (agentSpeed.x != 0)
{
agentSpeed.x /= slowAmount;
}
if (agentSpeed.y != 0)
{
agentSpeed.y /= slowAm... |
#include "EditFormulationForm.h"
#include "ui_EditFormulationForm.h"
EditFormulationForm::EditFormulationForm(const QString &formulation, QWidget *parent) :
QWidget(parent),
ui(new Ui::EditFormulationForm)
{
ui->setupUi(this);
ui->formualation->setText(formulation);
ui->formualation->setFocus();
... |
//
// This file contains the C++ code from Program 10.3 of
// "Data Structures and Algorithms
// with Object-Oriented Design Patterns in C++"
// by Bruno R. Preiss.
//
// Copyright (c) 1998 by Bruno R. Preiss, P.Eng. All rights reserved.
//
// http://www.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs... |
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=//
// Подсчет количества цифр в целом числе без цикла
// Counting the number of digits in a whole number without a loop
// V 1.0
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=//
#include <iostream>
#include <cmat... |
#include <bits/stdc++.h>
using namespace std;
#ifdef ILIKEGENTOO
void E(){}template<class A,class...B>void E(A $,B..._){cerr<<' '<<$;E(_...);}
# define E($...) E(#$,'=',$,'\n')
#else
# define E($...)
#endif
#define Sz(x) (int((x).size()))
#define All(x) begin(x),end(x)
typedef double flt;
typedef long long int64;
type... |
#include <iostream>
using namespace std;
int fMax(int [],int);
int main()
{
int a[30],n;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
cout<<fMax(a,n);
return 0;
}
int fMax(int arr[],int size){
int middle,tmp1,tmp2;
if(size==1)return arr[0];
else if(size==2)return (arr[1]>arr[0... |
#include "NV_PoliMan.h"
#include "RadialFunctions.h"
#define M_PI 3.1415926535897932
NV_PoliMan::NV_PoliMan()
{
}
NV_PoliMan::~NV_PoliMan()
{
}
fe::ComplexMoments NV_PoliMan::Decompose(cv::Mat blob)
{
fe::ComplexMoments decomposition;
size_t basis_mat_count = 0;
for (size_t i = 0; i < this->... |
#pragma once
#include <ionir/passes/pass.h>
namespace ionir {
struct ConstructValidationPass : Pass {
IONSHARED_PASS_ID;
explicit ConstructValidationPass(
ionshared::Ptr<ionshared::PassContext> context
);
void visit(ionshared::Ptr<Construct> node) override;
};
}
|
#include <algorithm>
#include <fstream>
#include <iostream>
#include <vector>
#include "Comparator.h"
using namespace std;
int main() {
ofstream out("Number.out");
if (out.fail())
return 0;
ifstream in("Number.txt");
if (in.fail()) {
out << "File Number.txt can not be found." << end... |
/* -*- 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 _JS_OPERA_
#define _JS_OPERA_
#include "modules/ecma... |
#pragma once
#include <memory>
namespace breakout
{
class GameWindow;
class GameEngine
{
public:
GameEngine();
~GameEngine();
void Init();
void Start();
private:
std::shared_ptr<GameWindow> m_window;
float m_msPerFrame = 16.f;
};
} |
#pragma once
#include "utils.h"
#include "data.h"
namespace communication
{
NTSTATUS hooked_device_control(PDEVICE_OBJECT pDevice, PIRP Irp);
NTSTATUS restore_original_device_control(PDRIVER_DISPATCH original_dispatch_param);
NTSTATUS is_ctl_valid(ULONG ctl_code);
}
|
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
#include "UniversalTorque.h"
#include "Object.h"
#include "Define.h"
#include <iostream>
UniversalTorque::UniversalTorque(Object* obj) : Force::Force(Vector(0, 0, 0))
{
this->object = obj;
}
UniversalTorque::UniversalTorque(const UniversalTorque& uniTorque) : Force::Force(dynamic_cast<const Force&>(uniTorque))
{
th... |
// hello world
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char* argv[]) {
string _name;
cout << "What's your name? ";
cin >> _name;
cout << "Hello " << _name << "!" << endl;
return 0;
}
|
#include "myQtObjects.hpp"
MySpinBox::MySpinBox(QWidget* parent)
: QSpinBox(parent)
{
setFocusPolicy(Qt::StrongFocus);
}
void MySpinBox::wheelEvent(QWheelEvent *event)
{
if (!hasFocus()) {
event->ignore();
} else {
QSpinBox::wheelEvent(event);
}
}
MyDoubleSpinBox::MyDoubleSpinBox(QWidget* parent)
: QDoubleSpi... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int c, a, b, t, d, pos1, pos2;
double t1, t2;
cin>>c>>a>>b>>t>>d;
c*=100; d*=100; d = c-d; t*=60;
pos1 = (d+(a*t))%c;
pos2 = (d+(b*t))%c;
if(pos1==0 && pos2==0)
printf("Ana\n");
else if(pos1==0 && pos2)
printf("An... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2009 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifdef SCOPE_URL_PLAYER
#ifndef WINDOW_COMMANDER_URL_PLAYER_LIST... |
#include <iostream>
#define max 100
#include<stdlib.h>
#include<conio.h>
using namespace std;
void arrgiam(int a[],int n);
void arrTang(int a[],int n);
void input(int a[],int n)
{
for(int i=0; i<n; i++)
{
cout<<"\n Nhap Vi Tri a["<<i<<"] :\t";
cin>>a[i];
}
}
void Export(int a[],int n)
{
... |
// Frame Manager Functions
//
// Copyright (C) 2008
// Center for Perceptual Systems
// University of Texas at Austin
//
// jsp Fri Jul 18 17:18:40 CDT 2008
#ifndef FRAME_MANAGER_H
#define FRAME_MANAGER_H
#include "camera_manager.h"
#include "connection_manager.h"
#include <QImage>
#include <QObject>
#include <QTimer... |
#include "level.h"
#include "bitmaps.h"
#include "levels.h"
void Level::init(uint8_t level) {
for (uint8_t row = 0; row < 8; row++) {
rock[row] = levelsData[level].rock[row];
soil[row] = levelsData[level].soil[row];
food[row] = levelsData[level].food[row];
poop[row] = levelsData[level].poop[row];
... |
// Copyright (c) 2014-2015 Agustin Berge
//
// 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>
#include <pika/datastructures/member_pack... |
#pragma once
#include <NetworkModel/NetworkModel/IOCP/IOCP.hpp>
class IOCP : public NETWORKMODEL::IOCP::CIOCP {
public:
explicit IOCP();
virtual ~IOCP() override;
protected:
virtual void Destroy() override;
private:
NETWORKMODEL::DETAIL::PACKETPROCESSORLIST m_ProcessorList;
}; |
/*
* NetCommander.cpp
*
* Created on: 2 Mar 2011
* Author: two
*/
#include "NetCommander.h"
NetCommander::NetCommander(int port) {
// TODO Auto-generated constructor stub
m_nPort = port;
}
int NetCommander::bindSocket(){
/*
* Will bind to port and return and errors! muha ha ha ha ha.
*/
m_ServA... |
#include <iostream>
#include <string>
#include <time.h>
#include "Graph.h"
using namespace std;
int main() {
int option;
Graph graph;
cout << "Travelling Salesman Problem - MENU";
srand(time(NULL));
do {
cout << endl;
cout << "==== MENU GLOWNE ===" << endl;
cout << "1. Bru... |
//----------------------------------------------------------------
// VehicleMonster.h
//
// Copyright 2002-2004 Raven Software
//----------------------------------------------------------------
#ifndef __GAME_VEHICLEMONSTER_H__
#define __GAME_VEHICLEMONSTER_H__
#ifndef __GAME_VEHICLE_H__
#include "Vehicle.h"
#endif
... |
// Copyright (c) 2019 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special ... |
#include "rightzpiece.h"
namespace
{
std::vector<TetrisCoordinate> buildCoordinates(
const TetrisCoordinate& centerCoordinate, int orientation)
{
switch (orientation)
{
case 0:
return { centerCoordinate, centerCoordinate.plusColumns(1),
centerCoordinate.plusRows(1), center... |
namespace myipr {
struct node {
int const node_id;
category_code const category;
virtual void accept(Visitor&) const = 0;
protected:
node(category_code);
};
struct expr : node {
virtual Type const& type() const = 0;
protected:
expr(category_code c) : node{c} {}
};
struct stmt : expr {
... |
/*
* This is a C++ class: CbaseBall
* ÃèÊöÇòµÄ»ù±ŸÌØÐÔ
*
*/
#include <iostream>
#include "CsampleSpace.hpp"
#include <assert.h>
using namespace std;
int main()
{
cout << "This is Main process for Oridinary ball Deamo!" <<endl;
/*
Cgame game(COLOR_BALL);
if(!game.create_ball())
cout<<"erro"<<end... |
// Robert Fus
// CSCI 6626 - Object-Orientated Principles & Practices
// Program 3: Board
// File: Board.hpp
// 9/21/2019
#ifndef P2_SQUARE_BOARD_HPP
#define P2_SQUARE_BOARD_HPP
#include "tools.hpp"
#include "Square.hpp"
#include "StreamErrors.hpp"
#include "GameErrors.hpp"
#include "Cluster.hpp"
#include "CanView.hp... |
/*
Unity Capture
Copyright (c) 2018 Bernhard Schelling
Based on UnityCam
https://github.com/mrayy/UnityCam
Copyright (c) 2016 MHD Yamen Saraiji
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising fro... |
// Siva Sankar Kannan - 267605 - siva.kannan@student.tut.fi
#ifndef USERCOMMANDS_H
#define USERCOMMANDS_H
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include "fileread.h"
using namespace std;
// Functions with no arguments.
/*--------------------------------------------------------------... |
/* -*- 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.
*/
#ifndef VEGA_MDF_FONT_H
#define VEGA_... |
#pragma once
#include "libpytorch.h"
th::Tensor thfdcoefs;
// calculate the fractdif coeficients to be used next
// $$ \omega_{k} = -\omega_{k-1}\frac{d-k+1}{k} $$
// output is allocated inside to a pytorch tensor
// on current device
void setfracdiffcoefs(float d, int size) {
th::NoGradGuard guard; // same as wit... |
#include "GnMeshPCH.h"
#include "GnMeshEBM.h"
#include "GnMeshHeader.h"
#include "GnSMTextureAniCtrl.h"
#include "GnSMPostionAniCtrl.h"
#include "GnMeshData.h"
#include "GnMesh.h"
#include "GnScreenMesh.h"
#include "Gn2DMeshObject.h"
#include "Gn2DNode.h"
#include "Gn2DTextureAniCtlr.h"
void GnMeshEBM::StartupEBM()
{... |
#ifndef SPECEX_SPOT__H
#define SPECEX_SPOT__H
#include <vector>
#include <string>
#include <memory>
namespace specex {
class Spot {
public :
double wavelength;
int fiber; // fiber id, for which the psf is smoothly changing with xy (but need to account for jumps)
int fiber_bundle; // id ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.