text stringlengths 8 6.88M |
|---|
/*
* Copyright 2017 Roman Katuntsev <sbkarr@stappler.org>
*
* 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 ap... |
#pragma once
#include "Entity.h"
class Plane :
public Entity
{
public:
sf::String getClass(){
return "Plane";
}
Plane(sf::String F, int X, int Y, int Width, int Height) {
setDamage(5);
setLife(true);
setX(X); setY(Y); // координаты появления спрайта
setW(Width); setH(Height); // ширина и высо... |
#include "asio/tcp_client_handler.hpp"
tcp_client_handler::tcp_client_handler(boost::asio::io_service & io_service, std::unique_ptr<deviceDescription> description)
{
device_ = std::unique_ptr<tcp_client>(new tcp_client(io_service, std::move(description)));
}
void tcp_client_handler::kickstart(const boost::syste... |
/*************************************************************
Author : qmeng
MailTo : qmeng1128@163.com
QQ : 1163306125
Blog : http://blog.csdn.net/Mq_Go/
Create : 2018-03-17 09:55:59
Version: 1.0
**************************************************************/
#include <cstdio>
#include <vector>
#include <iostr... |
#include<iostream>
#include<vector>
//typedef vector<int> vi;
using namespace std;
vector<int> coins = {1,3,4};
int coinchange(int sum)
{
if(sum<0)
return 1e9;
else if (sum == 0)
return 0;
else
{
int minimumCoins = 1e9;
for(auto c: coins)
minimum... |
#include<stdio.h>
#include<malloc.h>
struct node{
int data;
struct node *next;
};
int push(struct node **,int);
int removeDup(struct node *);
int print(struct node *);
int push(struct node **head_ref,int new_data){
struct node *temp=(struct node *)malloc(sizeof(struct node ));
temp->data=new_data;
temp->n... |
#include <cstdlib>
#include <fmt/format.h>
#include "ast.h"
#include "ast_format.h"
#include "parser.h"
#include "tokenizer.h"
#include "util.h"
#include "test.h"
#if defined(__unix__)
#define PATH_SEPARATOR "/"
#else
#error "Path separator not defined for this target"
#endif
using namespace wcc;
const char tests... |
/*
* SPDX-FileCopyrightText: (C) 2020-2022 Daniel Nicoletti <dantti12@gmail.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "action.h"
#include "application.h"
#include "config.h"
#include "context.h"
#include "cuteleeview_p.h"
#include "cutelystcutelee.h"
#include "response.h"
#include <cutelee/metatype.h... |
#include<iostream>
#define s 5
void merges(int arr[], int l, int m, int r)
{
int i, j, k;
int n1 = m - l + 1;
int n2 = r - m;
int L[n1], R[n2];
for (i = 0; i < n1; i++)
L[i] = arr[l + i];
for (j = 0; j < n2; j++)
R[j] = arr[m + 1+ j];
i = 0;
j = 0;
k = l;
while (... |
#pragma once
#include "stdafx.h"
#include <stdlib.h>
#include "Book.h"
#define MAX_LEN 20
#define amount_of_books 20 //поменять
class BookList
{
public:
BookList();//не используется
BookList(FILE * SourceFile);//конструктор от текстовго файла
void PrintAllInfo();
//void CleanList();
void ListByAuthor... |
#ifndef OBJOBJECT_H
#define OBJOBJECT_H
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#include <OpenGL/glext.h>
#include <OpenGL/gl.h> // Remove this line in future projects
#else
#include <GL/glew.h>
#endif
#include <GLFW/glfw3.h>
#include <glm/mat4x4.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <v... |
#include <xtl.h>
#include "xLCD.h"
#include "..\\main.h"
char X3LcdAnimIndex=0;
//*************************************************************************************************************
static void outb(unsigned short port, unsigned char data)
{
__asm
{
nop
mov dx, port
nop
mov al, data
nop
... |
#include <iostream>
#include <unistd.h>
#include <string.h>
#include "Socket.h"
using namespace socketops;
Socket::Socket(int sockfd) :
sockfd_(sockfd)
{
}
int socketops::createNonBlockfd(sa_family_t family)
{
int sockfd = socket(family, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, IPPROTO_TCP);
if(sockf... |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int finish,start,n,f,h;
vector<int> prime,mark;//prime-звідки,mark=чи вже проходили
vector<vector<int>> edges;
int main()
{
cin>>n>>start>>finish;
prime.resize(n);
mark.resize(n);
edges.resize(n);
start--;
finish--;
for(int i=0;i<n-1;i++){
... |
#include "driver.h"
#include "sim_lib.h"
#include <stdint.h>
void bias_add(int *a, int *b, int *out, int out_dim, int in_dim) {
DriverHandle dev = DriverAlloc();
DriverReset(dev, 1);
for (int64_t i = 0; i < out_dim; ++i) {
for (int64_t j = 0; j < in_dim; ++j) {
int64_t k = i * in_dim + j;
DriverW... |
#include "mainwindow.h"
#include "adddlg.h"
#include "aboutdlg.h"
#include "savedlg.h"
#include "ui_mainwindow.h"
//bool isOpen = false;
bool isModified = false;
bool isNew = true;
QString lastFilename = "";
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
... |
#include "matchit/core.h"
#include "matchit/patterns.h"
#include "matchit/expression.h"
using namespace matchit;
double relu(double value)
{
return match(value)(
// pattern(meet([](auto &&v) { return v >= 0; })) = [&] { return value; },
pattern(_ >= 0) = [&] { return value; },
pattern(_) = ... |
/*
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... |
/*
Author: Nayeemul Islam Swad
Idea:
- We'll use divide and conquer method.
- For the merge process, we intially set `max_diff` = d[mid + 1] - d[mid].
Then as we're moving our left/right pointers L/R, we compare
diff(d[L], d[L + 1]) with diff(d[R], d[R - 1]) and whichever one is
smaller, we go that ... |
#pragma once
#include "WorldObject.h"
/*! \brief
* Draws the rounded edges when we generate a turn
*/
class Curve : public WorldObject
{
private:
void DrawObject();
int turn; /*!< The rotation of the crossing: 1 -> right, 2 -> left, 3 -> both */
public:
Curve(int TURN);
~Curve();
};
|
#include <iostream>
using namespace std;
int main()
{
int t;
cin >> t;
while (t > 0)
{
int a, b;
cin >> a >> b;
int arr[a];
int res = 0;
for (int i = 0; i < a; i++)
{
cin >> arr[i];
res += arr[i] / b;
}
cout << res <... |
#include "protoc2rcfcomm.h"
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/command_line_interface.h>
#include <boost/algorithm/string.hpp>
#include <unistd.h>
#include <iostream>
#include <stdio.h>
#include <fstream>
using namespace std;
namespace google {
namespace protobu... |
/*
* 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 FLUXCRYPTO_BYTECIPHER_H
#define FLUXCRYPTO_BYTECIPHER_H
#include <stdint.h>
#include <flux/Object>
namespace flux {
namespace crypto {
class ByteCipher: p... |
#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
long long n;
while(~scanf("%lld",&n))
cout << n/2+1 << endl;
return 0;
}
|
#pragma once
class GenjiboState
{
public:
GenjiboState();
~GenjiboState();
};
|
#include<bits/stdc++.h>
using namespace std;
const int N=10000010;
int prime[N],cnt;
bool vis[N];
int m,n,tmp;
void getprime(int n)
{
vis[1]=true;
for(int i=2;i<=n;i++)
{
if(!vis[i])
{
prime[++cnt]=i;
}
for(int j=1;j<=cnt;j++)
{
int v=i*prim... |
#include <iostream>
using namespace std;
void main()
{
double N, r, area;
cin >> N;
r = N / 2 / 3.14;
area = r*r*3.14;
cout << fixed;
cout.precision(0);
cout << area;
}
|
#pragma once
/* Common */
#pragma region Common
#include <vector>
#include <cassert>
#include <stdexcept>
#include <chrono>
#include <string>
#pragma endregion
/* Core */
#pragma region Core
#include <windows.h>
#include <wrl.h> //for ComPtr smart pointers for DXGI and D3D12 "objects
#include "Debuger.h"
#pragma endr... |
#include "MCEnergySmearing.h"
#include "base/Detector_t.h"
#include "tree/TCluster.h"
#include "TRandom.h"
using namespace std;
using namespace ant;
using namespace ant::calibration;
MCEnergySmearing::MCEnergySmearing(Detector_t::Type_t det, double scale, double smear):
ReconstructHook::Clusters (), detector(det... |
#include <bits/stdc++.h>
#include <cassert>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok?"Yes":"No");
#define chmax(x,y) x = max(x,y)
#define chmin(x,y) x = min(x,y)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using ii = pair<int, int>;
using vvi = v... |
#pragma once
#ifdef DLLEXPORT
#define EMAIL_DLL __declspec(dllexport)
#else
#define EMAIL_DLL __declspec(dllimport)
#endif
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <iomanip>
#include <experimental/filesystem>
#include "Data.h"
namespace fs = std::experimental::filesystem;
u... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int a[40];
a[0] = 1;
for(int i=1; i<40; i++) a[i] = a[i-1]*2;
long long int t;
cin>>t;
int j;
for(int i=0; i<40; i++)
{
long long int v = 3*(a[i+1]-1);
if(v>=t)
{
j = i;
break;
}
}
long long int ans = 3*a[j+1]-t-2;
cout<<ans... |
class Solution {
public:
bool buddyStrings(string A, string B) {
if(A.size()!=B.size())
return false;
int count_diff=0;
int loc_1=-1;
int loc_2=-1;
int mem[26]={0};
for (int i=0;i<A.size();i++)
{
mem[A[i]-97]++;
if ... |
//===-- MICmnStreamStdinLinux.cpp --------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------------... |
#pragma once
//MouseMovingToRight.h
#ifndef _MOUSEMOVINGTORIGHT_H
#define _MOUSEMOVINGTORIGHT_H
#include "MouseAction.h"
using namespace std;
class Form;
class MouseMovingToRight : public MouseAction {
public:
MouseMovingToRight(Form *form = 0);
MouseMovingToRight(const MouseMovingToRight& source);
~MouseMovingTo... |
/*
* SPDX-FileCopyrightText: 2020 Rolf Eike Beer <eike@sf-mail.de>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <osm_api.h>
#include <osm_api_p.h>
#include <settings.h>
#include <osm2go_annotations.h>
#include "osm2go_i18n.h"
#define COLOR_ERR "red"
#define COLOR_OK "darkgreen"
void
osm_upload_... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "Windows.Devices.Usb.1.h"
#include "Windows.Foundation.1.h"
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Foundation {
#ifndef WINRT_GENERIC_ef60385f_be78_584b_aaef_7829ada... |
#include <bits/stdc++.h>
using namespace std;
vector<int> d(int);
int main()
{
int n;
cin>>n;
vector<int> dp[1000];
dp[1].push_back(1);
dp[2].push_back(2);
dp[2].push_back(1);
for(int i=3; i<1000; i++)
{
vector<int> ret;
ret.push_back(i);
ret.push_back(1);
for(int j=i/2; j>1; j--)
{
if(i%j==0)
... |
//µÝ¹éËã·¨
#include<stdio.h>
long long int fun (long long int a,long long int b,long long int c);
int main(void)
{
long long int a,b,c;
scanf("%lld%lld%lld",&a,&b,&c);
printf("%lld\n",fun(a,b,c));
return 0;
}
long long int fun(long long int a,long long int b,long long int c)
{
... |
#include<stdio.h>
#include<stdlib.h>
#define MAXDEPTH 10
struct BinaryTree{
int node;
BinaryTree *left;
BinaryTree *right;
};
BinaryTree * buildTree(){
BinaryTree *tr;
int value;
scanf("%d",&value);
if(value == -1)
return NULL;
tr = (BinaryTree *)malloc(sizeof(BinaryTree));
tr->node = value;
tr->left... |
#include "header.h"
//extern char **environ;
/******Global variables******/
int fd1[2], fd2[2];
int main()
{
string ip_comm;
pid_t pid;
int status;
unordered_map<string, string> alias_map;
//////////////////////////////////////////////////////////////////////
/* Trie variables */
trieNode **root = NULL;
char ... |
#include <iostream>
bool isEven(int number) {
return (number % 2) == 0;
} |
// -*- C++ -*-
//
// Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory,
// Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC
//
// This file is part of FreePOOMA.
//
// FreePOOMA is free software; you can redistribute it and/or modify it
// under the terms of the Expat license.
//
// This progr... |
#ifndef _LED_PLUGIN_H_
#define _LED_PLUGIN_H_
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
//Designeer plugin class.
class LEDPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
Q_PLUG... |
#pragma once
#include <vector>
#include <math.h>
using namespace std;
struct Point2D
{
float x;
float y;
};
typedef vector<Point2D> PT2DVEC;
class ConvexHull2D
{
public:
ConvexHull2D(void);
ConvexHull2D(PT2DVEC pts);
~ConvexHull2D(void);
void BuildConvexHull(PT2DVEC pts);
bool IfInConvexHull(f... |
#ifndef __GAME_SCENE_H__
#define __GAME_SCENE_H__
#include "cocos2d.h"
#include "Box2D/Box2D.h"
#define DIS_PIPE 900
USING_NS_CC;
class GameWorld : public Layer
{
public:
virtual bool init();
CREATE_FUNC(GameWorld);
static Scene* createScene();
virtual void update(float delta);
void setPhyWo... |
#include <fstream>
#include <map>
#include <string>
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
using namespace std;
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
std::stringstream ss(s);
std::string item;
w... |
/* NO WARRANTY
*
* BECAUSE THE PROGRAM IS IN THE PUBLIC DOMAIN, THERE IS NO
* WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
* LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE AUTHORS
* AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
* WARRANTY OF ANY KIND, EITHER E... |
#include "Universe.h"
Universe::Universe() {
setStudentData();
}
void Universe::setStudentData() {
in.open("midtest.txt");
if(in.is_open()) {
for(int i = 0; i < 10; i++) {
Student *st = new Student();
in >> st->id;
in >> st->name;
in >> st->school;
... |
#include<iostream.h>
#include<conio.h>
class bank
{
public:
int ba,acc_no;
char name[20],type[20];
void get()
{
cout<<"\n enter the name:";
cin>>name;
cout<<"\n enter the accno;";
cin>>acc_no;
cout<<"\n enter the balance amount:";
cin>>ba;
cout<<"\n enter the type of acc:";
cin>>type;
}... |
//---------------------------------------------------------------------------
//#include "stdafx.h"
#pragma hdrstop
#include <math.h>
#include <fcntl.h>
#include <io.h>
#include <sys\stat.h>
#include <share.h>
#include "..\..\util\WorkStr.h"
#include "HandsGroup.h"
//-------------------------------------------------... |
#include <boost/program_options.hpp>
#include <iostream>
using namespace boost::program_options;
using namespace std;
#include "metis.hpp"
int main(int argc, char *argv[])
{
MetisContext c;
string input_file;
options_description desc("Allowed options");
desc.add_options()
("help,h", "print usage mess... |
class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
int n = nums.size();
vector<int> left(n);
vector<int> right(n);
left[0] = 1;
right[n-1] = 1;
for(int i = 1; i < n; i++)
{
left[i] = left[i-1]*nums[i-1];
}
f... |
#include <iostream>
#include "Log.h"
int main()
{
namespace clog = common::log;
clog::Error( clog::ERROR_CRITICAL, 1, "error1" );
clog::Error( clog::ERROR_CRITICAL, 2, "error2 %d %d", 10, 100 );
clog::Log( clog::LOG_F_N_O, clog::LOG_PACKET, 1, "log1" );
clog::Log( clog::LOG_F_N_O, clog::LOG_PACKET, 2, "log2",... |
#ifndef MODIFIERS_MODIFIERBASE_H
#define MODIFIERS_MODIFIERBASE_H
#include <boost/shared_ptr.hpp>
#include "Value.h"
namespace modifiers{
class ModifierBase{
public:
Value get();
protected:
virtual Value calculate()=0;
private:
unsigned long long int m_lastFrame;
... |
#include <sstream>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <argparser/test/mock/argparser.h>
#include <compressor/test/mock/compressor.h>
#include <compressor/cli.h>
class CLITests : public ::testing::Test {
protected:
void SetUp() override
{
argparser_ = std::make_unique<MockIAr... |
#include <iostream>
int main(){
float a,b;
char kt; // kt:ky tu
float kq;
std::cout << "Nhap gia tri 2 a va b : ";
std::cin >> a >> b;
std::cout << "\n Chuong trinh thuc hien 4 phep toan so hoc";
std::cout << "\n 1.Go dau + de thuc hien phep cong";
std::cout << "\n 2.Go dau - de thuc... |
#include <iostream>
#include <stack>
#include <stdint.h>
#include <vector>
// Register operations:
// PRIMITIVES:
// push i32
// push should check if the next stack index is greater than the
// stack size; if it is, the stack should first be extended by 10 items.
// Then set the next stack index to th... |
#pragma once
#include "cbullet.h"
class cEnemyBullet :
public cBullet
{
public:
virtual void Init();
public:
cEnemyBullet(void);
~cEnemyBullet(void);
};
|
#include <gtest/gtest.h>
#include "Common.h"
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
#ifndef _WIN32
::testing::GTEST_FLAG(catch_exceptions) = false;
::testing::GTEST_FLAG(throw_on_failure) = true;
#endif
int exitCode = RUN_ALL_TESTS();
// on windows don't close t... |
#include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int val;
Node *next;
Node *random;
Node(int _val)
{
val = _val;
next = NULL;
random = NULL;
}
};
Node *copyRandomList(Node *head)
{
if (head == NULL)
return head;
unordered_map<Node *, N... |
#pragma once
#include <QString>
#include <functional>
/// отвечает за подключение к бд, инициализирует глобальный QSQL контекст
class DbConnector
{
public:
DbConnector();
// проверить, является ли пользователь админом
bool checkAdmin(const QString& name,const QString& password);
/// Попытка входа в систему
... |
#ifndef QTL_NET_HTTP_HEADER_H_
#define QTL_NET_HTTP_HEADER_H_
#include <map>
#include <string>
#include <vector>
#include <boost/asio/streambuf.hpp>
namespace qtl {
namespace net {
namespace http {
struct Header {
typedef std::string string;
std::map< string, std::vector<string> > fields;
void Add(const string& ... |
/*
* File: main.cpp
* Author: Vidya
*
* Created on March 30, 2013, 12:40 AM
*/
#include <cstdlib>
#include <iostream>
#include "Rover.h"
#include "Grid.h"
using namespace std;
/*
*
*/
int main(int argc, char** argv) {
char command[100];
Rover rover;
int dimension;
Location final_pos;
... |
// $Id: DLOAD.h,v 1.2 2013/02/12 18:56:13 david Exp $
#ifndef __PF2ASM_NODE_loadstore_DLOAD_H__
#define __PF2ASM_NODE_loadstore_DLOAD_H__
#include <cdk/nodes/Node.h>
#include "semantics/SemanticProcessor.h"
namespace pf2asm {
namespace node {
namespace loadstore {
class DLOAD: public cdk::node::Node {
... |
/*
Copyright (C) 2011 Tal Pupko TalP@tauex.tau.ac.il.
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 version 3 of the License, or
(at your option) any later version.
This program is... |
/*
--------------------------
Console.cpp
Ilya Bobkov KZ 2017 (c)
--------------------------*/
#include "Console.h"
void Console::Render(void) {
}
|
#pragma once
#include <SFML/Graphics.hpp>
#include <string>
class Button
{
private:
short unsigned buttonState;
sf::RectangleShape shape;
sf::Text text;
sf::Font font;
sf::Color idleColor, hoverColor, activeColor;
public:
Button(float x, float y, float width, float height,
... |
/*********************************************************************
Matt Marchant 2014 - 2016
http://trederia.blogspot.com
xygine - Zlib license.
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 from the use of this soft... |
#include <iostream>
using namespace std;
int Wire(int rate[], int n)
{
int * array = new int[n + 1];
array[0] = 0;
for (int i = 1; i <= n; i++)
{
int maxi = -99999;
for (int j = 0; j < i; j++)
{
maxi = max(maxi, array[i - j - 1]+ rate[j]);
}
array[i] = maxi;
}
return array[n];
}
int main()
{
... |
#pragma once
namespace табуляция {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for MyForm
/// </summary>
public ref clas... |
#include<iostream>
#include<math.h>
using namespace std;
void nonzero_element(int a[10][10],int n)
{
int c=0,i,j;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if (a[i][j]!=0)
c++;
}
}
cout<<"Number of non-zero elements : "<<c<<endl;
}
void minor_diagon... |
/**
* Copyright (C) 2017 Alibaba Group Holding Limited. All Rights Reserved.
*
*
* 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
*
* ... |
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2010 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
... |
// This file has been generated by Py++.
#ifndef ImageCodec_hpp__pyplusplus_wrapper
#define ImageCodec_hpp__pyplusplus_wrapper
void register_ImageCodec_class();
#endif//ImageCodec_hpp__pyplusplus_wrapper
|
// Copyright 2020 JD.com, Inc. Galileo Authors. All Rights Reserved.
//
// 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 requ... |
#ifndef _MATERIALSINGLETON_H_
#define _MATERIALSINGLETON_H_
#include "MaterialAPI.h"
#include <QList>
#include "DataProperty/DataBase.h"
#include <QHash>
class QDomDocument;
class QDomElement;
class QFile;
namespace GUI
{
class MainWindow;
}
namespace Material
{
class Material;
class MATERIALAPI MaterialSingle... |
#ifndef MPIFARM_H
#define MPIFARM_H
#include <boost/mpi.hpp>
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <fstream>
// include headers that implement a archive in simple text format
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boos... |
#include <fstream>
#include <cmath>
#include <boost/test/unit_test.hpp>
#include <epecur/geometry.hpp>
#include <epecur/StdHits.hpp>
#define L(a) (sizeof(a) / sizeof(a[0]))
BOOST_AUTO_TEST_SUITE(StdHits_test)
BOOST_AUTO_TEST_CASE(check_basic_prop_and_drift)
{
std::ifstream f(PROJECT_SOURCE_DIR "/contrib/geom_apr1... |
/*
time O(nklog(k)) and space O(1)
Node* merge(Node* a,Node* b)
{
if(a==NULL)
{
return b;
}
if(b==NULL)
{
return a;
}
Node* result = NULL;
if(a->data <= b->data)
{
result = a;
result->next = merge(a->next,b);
}
else
{
result = b;
... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "UI_CrossHair.generated.h"
class UImage;
UCLASS()
class THIRDPERSONSHOOTER_API UUI_CrossHair : public UUserWidget
{
GENERATED_BODY()
private:
UPROPERTY(C... |
#ifndef XOROSHIRO_
#define XOROSHIRO_
#include "prng.h"
typedef long long unsigned int randtype;
class xorshiro
{
private:
prng rnd;
int a;
int b;
int c;
randtype s[2];
public:
xorshiro();
~xorshiro();
randtype rotl(const randtype, int k);
randtype xorshiro128p();
do... |
#include "Viiva.h"
#include "tilastot.h"
const float Viiva::MAX_KIIHTYVYYS = 10; //pitäisi olla 1.5
ofColor ViivanApufunktiot::asetaHSLnMukaan(float lh, float ls, float ll) {
float bh = lh;
if (ll <= 0.5)
ls *= ll;
else
ls *= 1 - ll;
float bb = ll + ls;
float bs = (2 * ls) / (ll +... |
// avvinci - summers 18
// #include"prettyprint.hpp"
#include<bits/stdc++.h>
using namespace std;
typedef pair<long long,long long > P;
#define mod 1000000007
#define pb emplace_back
#define fs first
#define sc second
#define ll long long
#define fr(it,st,en) for(it=st;it<en;it++)
#define all(container) contai... |
#pragma once
#pragma once
#ifndef prob2_h
#define prob2_h
#include <iostream>
#include <string >
//using namespace std;
int i, total = 0, two = 2;
int a[3] = { 0XBEEF, 0XFADE, 0XCABE };
std::string b[3] = { "BEEF", "FADE", "CABE" };
void outputEven()
{
std::cout << b[i] << " is a valid ID for the family " << std::en... |
#include<bits/stdc++.h>
using namespace std;
int rep[1005];
void init(int n)
{
for(int i = 1; i <= n; i++)
rep[i] = i;
}
int find(int x)
{
return rep[x] = (rep[x] == x ? x : find(rep[x]));
}
void unio(int x, int y)
{
rep[find(x)] = rep[find(y)];
}
main()
{
int n,m;
cin >> n >> m;
init(n);
vector<vector<int> >v... |
#include <iostream>
#include <string>
#include "fx.hpp"
using namespace std;
int main(){
printer *Printer = new printer;
Printer->back = NULL;
Printer->front = NULL;
stack *hubStack = NULL;
stack *javiStack = NULL;
stack *johnStack = NULL;
string command;
//... |
// include header files
#include <iostream>
// using namespace declaration
using namespace std;
int main()
{
// variables
const double PI = 3.14159265359f;
double radius = 0.0f;
// output a message to the console
cout << "\t\t\t\t\tCircumference\\Radius" << endl;
cout << "\t\t\t\t\t====================" << end... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MovingPlatform.h"
AMovingPlatform::AMovingPlatform()
{
PrimaryActorTick.bCanEverTick = true;
SetMobility(EComponentMobility::Movable);
}
void AMovingPlatform::AddActiveTrigger()
{
ActiveTriggers++;
}
void AMovingPlatform::... |
/********************************************************************************
** Form generated from reading UI file 'ctkVTKScalarsToColorsWidget.ui'
**
** Created by: Qt User Interface Compiler version 5.8.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
***********************... |
#include<iostream>
using namespace std;
struct BinaryTreeNode {
int value;
BinaryTreeNode* left;
BinaryTreeNode* right;
BinaryTreeNode(int x) { value = x; left = NULL; right = NULL; }
};
bool func(BinaryTreeNode* root1, BinaryTreeNode* root2) //判断是否是子结构
{
if (root2 == nullptr) //root2为空 无论root1是否为空 2都是1 的子结构... |
#pragma once
namespace Util
{
template <class T>
class CSingleton
{
static T& getInstance()
{
static T s_instance;
return s_instance;
}
};
}
|
/**
* Author : BurningTiles
* Created : 2020-08-07 13:54:41
**/
#include <bits/stdc++.h>
using namespace std;
bool find(int n, int a[], int x){
bool flag=false;
int remsum, start, end;
for(int i=0; i<n; ++i){
remsum = x-a[i];
start = i+1;
end = n-1;
while(start < end){
if(a[start]+a[end] > remsum)
... |
///////////////////////////////////////////////////////////////////////////////
// Name: src/univ/glx11.cpp
// Purpose: code common to all X11-based wxGLCanvas implementations
// Author: Vadim Zeitlin
// Created: 2007-04-15
// RCS-ID: $Id: glx11.cpp 54022 2008-06-08 00:12:12Z VZ $
// Copyright:... |
{
gROOT->ProcessLine(".L ../external/class_lib.so");
gROOT->ProcessLine(".x ./macros/class_asymmetry_sl.C");
}
|
#ifndef VEHICULECONTROLLER_H
#define VEHICULECONTROLLER_H
#include <QGeoCoordinate>
#include <QObject>
#include <QGeoCircle>
class VehiculeController:public QObject
{
Q_OBJECT
Q_PROPERTY(QGeoCoordinate center READ center NOTIFY centerChanged)
Q_PROPERTY(qreal radius READ radius WRITE setRadius NO... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Foundation::Metadata {
struct IApiInformationStatics;
}
namespace Windows::Foundation::Metadata {
struct IApiInformationStatics;
str... |
// Copyright ⓒ 2020 Valentyn Bondarenko. All rights reserved.
#pragma once
#include <IRender.hpp>
#include <..\DiligentTools\TextureLoader\interface\TextureUtilities.h>
#include <..\DiligentCore\Graphics\GraphicsTools\interface\MapHelper.hpp>
#include <..\DiligentCore\Graphics\GraphicsTools\interface\Graphi... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <map>
#include <sstream>
#include <cmath>
#include <unordered_set> // 需要c++ 11才能支持
#include <unordered_map> // 需要c++ 11才能支持
using namespace std;
/*
struct TreeNode {
int val;
struct TreeNo... |
//
// Copyright Jason Rice 2016
// 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_FWD_ENTITY_MEMBERS_HPP
#define NBDL_FWD_ENTITY_MEMBERS_HPP
#include <nbdl/macros/NBDL_ENTITY.hpp>
#include <boost/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.