text stringlengths 8 6.88M |
|---|
//---------------------------------------------------------------------------
#ifndef hookfuncH
#define hookfuncH
#include <windows.h>
#include <winsock.h>
#include <string>
#include "injlib.h"
#ifdef VCVERSION
#include "comm_stl.h"
#else
#include "CommFunc.h"
#endif
#include "alist.h"
using namespace std;
class CHook... |
#include<conio.h>
#include<iostream.h>
#include<string.h>
void main () {
int leng, comp;
char *name="SALMAN";
char *name2="shaikh";
char *name3="2K10/CSE/73";
char *n,*up,*lowr, *cat, *dup_str, set;
char *ptr, c = 'r', check;
char *string="This is a String";
char symbol = 'x';
... |
/* -*- 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.
*/
#include "core/pch.h"
#ifdef M2_SUPPORT
#include "adjunct/m2/src... |
// TabTesterDlg.h: 헤더 파일
//
#pragma once
#include "CFirstDlg.h"
#include "CSecondDlg.h"
// CTabTesterDlg 대화 상자
class CTabTesterDlg : public CDialogEx
{
// 생성입니다.
public:
CTabTesterDlg(CWnd* pParent = nullptr); // 표준 생성자입니다.
// 대화 상자 데이터입니다.
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_TABTESTER_DIALOG };
#endif
pro... |
// Copyright (c) 2020 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 ... |
#ifndef HcalTestBeam_HcalTB04Analysis_H
#define HcalTestBeam_HcalTB04Analysis_H
// -*- C++ -*-
//
// Package: HcalTestBeam
// Class : HcalTB04Analysis
//
/**\class HcalTB04Analysis HcalTB04Analysis.h SimG4CMS/HcalTestBeam/interface/HcalTB04Analysis.h
Description: Analysis of 2004 Hcal Test beam simulation
... |
#ifndef MSGBUS_INTERFACE_H
#define MSGBUS_INTERFACE_H
#include "NetMsgBusFuture.hpp"
#include <stdint.h>
#include <string>
#include <string.h>
#include <boost/shared_array.hpp>
#include <boost/weak_ptr.hpp>
#include <vector>
#include <map>
namespace NetMsgBus
{
struct MsgBusParam
{
MsgBusParam()
... |
#include "phrase4.hpp"
#include <iostream>
#include <cstddef> // std::size_t
#include <string> // std::string
Alphabet::Alphabet()
{
alphabet={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','k','r','s','t','v','w','x','y','z'};
}
Alphabet::Alphabet(std::vector<char> &v)
{
alph... |
#pragma once
#include <string>
#include "Parser.h"
class Executor
{
private:
Executor() {}
Executor(const Executor&);
Executor& operator = ( Executor&);
std::vector<ICommand*> commands;
std::vector<int> executeOrder;
std::string buffer = "";
public:
static Executor& GetInstance() {
static Executor instance... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
typedef long long L... |
#pragma once
#include <initializer_list>
namespace oakvr
{
namespace math
{
class Matrix;
class Vector3
{
public:
// constructors
Vector3() {};
Vector3( float x, float y, float z );
Vector3(const std::initializer_list<float> &coords);
Vector3( const class Vector4 &vec );
Vector3( const... |
#include "f3lib/assets/world/Landscape.h"
#include "f3lib/utils/BinaryFileReader.h"
#include <sstream>
#include <iomanip>
using namespace f3;
constexpr float HGT_NOWALK = 1000.0f;
constexpr float HGT_NOFLY = 2000.0f;
constexpr float HGT_NOMOVE = 3000.0f;
constexpr float HGT_DIE = 4000.0f;
Landscape::Land... |
#include "bmp.h"
#include <iostream>
#include <cassert>
#include <fstream>
#include <cstring>
using namespace std;
//*** Auxilliary functions ***********************************
int negativeToZero(int x){
return x < 0 ? 0 : x;
}
namespace JiMP2 {
//************************************************************
v... |
#include "rat.h"
#include <iostream>
using namespace std;
int CRat::m_count = 0;
CRat::CRat() : m_id(0) {
m_id = m_count;
m_count++;
}
CRat::~CRat() {
cout << "ネズミ:" << m_id << "消去" << endl;
m_count--;
}
void CRat::showNum() {
cout << "現在のネズミの数は、" << m_count << "匹です。" << endl;
}
void CRat::squ... |
#include <sys/time.h>
#include <iostream>
using namespace std;
int timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
{
/* Perform the carry for the later subtraction by updating y. */
if (x->tv_usec < y->tv_usec) {
int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
... |
#ifndef _GUARD_TIMER_H
#define _GUARD_TIMER_H
#include <chrono>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include "dbg.h"
#include "util.h"
#ifdef NTIMER
#define TIMER_CREATE(name)
#define TIMER_CREATE_WITH_PRECISION(name, precision)
#define TIMER_ST... |
/* -*- 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
**
*/
#ifndef __FL_BUFFER_H__
#define __FL_BU... |
#ifndef SMTSOLVER_H
#define SMTSOLVER_H
#include <utility>
#include <vector>
#include <map>
#include "SatCnf.h"
#include "SmtCnf.h"
struct SmtSatKernel {
std::map<std::pair<int, int>, int> to;
std::vector<std::pair<int, int>> from;
};
// generate a Sat formula and var i of the sat formula is the literal in th... |
/****************************************************************
* TianGong RenderLab *
* Copyright (c) Gaiyitp9. All rights reserved. *
* This code is licensed under the MIT License (MIT). *
*****************************************************************/
#include "Graphics/D3D11Details.hpp"
#inclu... |
#ifndef TP_PPROJECT_COMMANDHANDLER_H
#define TP_PPROJECT_COMMANDHANDLER_H
#include <iostream>
#include <functional>
#include <boost/property_tree/ini_parser.hpp>
#include "src/server/lib/CompanyServer/MainServerLogic/MainLogic/MainLogic.h"
#include "src/server/lib/Connection/BaseConnection.h"
#include "src/server/lib/... |
#include <GL/glut.h>
#include <stdlib.h>
#include <math.h>
static int slices = 25;
static int stacks = 17;
/* GLUT callback Handlers */
static void resize(int width, int height)
{
const float ar = (float) width / (float) height;
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIde... |
#include "_pch.h"
#include "ModelDetail.h"
using namespace wh;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
ModelObjDetail::ModelO... |
#pragma once
#include <vector>
#include <utility>
#include <iostream>
#include <variant>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
#include <libswscale/swscale.h>
}
#include "ffmpeg-common.hpp"
constexpr size_t BUFFER_SIZE = 8194;
struct Upload : p... |
//
// PostEffect.cpp
// Odin.MacOSX
//
// Created by Daniel on 24/10/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#include "PostEffect.h"
namespace odin
{
namespace render
{
PostEffect::PostEffect() :
m_fsQuad()
{
}
PostEffect::~PostEf... |
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int d=__gcd(a,b);
int e=a*b/d;
d=__gcd(e,c);
int ans=e*c/d;
cout<<ans;
return 0;
}
|
#include <opencv2\imgproc.hpp>
#include "Paints.h"
#include <opencv2\imgcodecs.hpp>
void alphaBlend( cv::Mat& foreground, cv::Mat& background, cv::Mat& outImage )
{
// 计算像素数量
int numberOfPixels = foreground.rows * foreground.cols;
float sb;
float db;
// Get floating point pointers to the data matrices
byte*... |
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
typedef long long LL;
typedef unsigned long long ULL;
#define PI 3.141592653589... |
// Copyright Low Entry. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "ELowEntryFileManagerYesNo.h"
#include "LowEntryFileManagerLibrary.generated.h"
class ULowEntryFileManagerDirectory;
class ULowEntryFileManagerFile;
UCLASS()
class LOWENTRYF... |
/**
* Created by K. Suwatchai (Mobizt)
*
* Email: k_suwatchai@hotmail.com
*
* Github: https://github.com/mobizt/Firebase-ESP8266
*
* Copyright (c) 2023 mobizt
*
*/
// This example shows how error retry and queues work.
#include <Arduino.h>
#if defined(ESP32)
#include <WiFi.h>
#include <Fireba... |
#include "TrantorThreadPool.h"
#include <assert.h>
#include <iostream>
using namespace std;
//static long cnt1 = 0;
//static long cnt2 = 0;
namespace trantor
{
TrantorFixedThreadPool::TrantorFixedThreadPool(const int thread_num):pool_alive_(true), wait_empty_(false)
{
assert(thread_num > 0);
for(int i = 0; i < th... |
#include<bits/stdc++.h>
using namespace std;
class node{
public:
int data;
node* left;
node* right;
node(int d){
this->data = d;
this->left = NULL;
this->right = NULL;
}
};
node* buildTree(node* root){
cout<<"Enter the data: ";
int data;
cin>>da... |
#include "UicOnly.hpp"
int main(int argc, char* argv[])
{
UicOnly uicOnly;
return 0;
}
|
/*
* @lc app=leetcode.cn id=70 lang=cpp
*
* [70] 爬楼梯
*/
// @lc code=start
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
int climbStairs(int n) {
vector<int> dp(n,0);
if(n==1)return 1;
if(n==2)return 2;
dp[0]=1;
dp[1]=2;
for(int... |
// Copyright (c) 2016 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
namespace pika::detail {
template <typename T>
struct type_identi... |
#ifndef __MUMUFRIEND_H__
#define __MUMUFIREND_H__
#include <QObject>
#include <QSqlQuery>
#include "networkmanager.h"
/**
* MumuFriend - A class that is friend of everyone
* This class is a glue between the system.
*/
class MumuFriend : public QObject
{
Q_OBJECT
public slots:
Q_INVOKABLE bool insertNewProcess(... |
../1099/D.cpp |
//
// RenderTexture.cpp
// Odin.MacOSX
//
// Created by Daniel on 24/10/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#include "RenderTexture.h"
namespace odin
{
namespace render
{
RenderTexture::RenderTexture() :
m_fbo(0),
m_colorAttachment(0),
m_depthAttachment(0... |
#ifndef __ALGO_TOP_H__
#define __ALGO_TOP_H__
#include <stdint.h>
#include <ap_axi_sdata.h>
#include <ap_int.h>
#include <hls_stream.h>
#include "algo_top_parameters.h"
template<int D, int U>
struct ap_axiu <D, U, 0, 0>{
ap_uint<D> data;
ap_uint<U> user;
ap_uint<1> last;
};
namespace algo {
... |
#include "image.h"
#include "assertion.h"
#include <stdexcept>
#include <sdl2/SDL.h>
#include <sdl2/SDL_image.h>
ColorNorm RGBA(ColorRGBA rgba) {
return glm::vec4(rgba) / 255.0f;
}
ColorRGBA ColorAlpha(ColorChannel alpha) {
return ColorRGBA{ 255, 255, 255, alpha };
}
void Image::Load(glm::uvec2 Size, ColorRGBA D... |
#include "TrantorSemaphore.h"
namespace trantor
{
void TrantorSemaphore::wait()
{
std::unique_lock<std::mutex> lock(mtx_);
cv_.wait(lock, [=]() {return avaliable_res_num_ > 0; });
avaliable_res_num_--;
}
void TrantorSemaphore::post()
{
{
std::unique_lock<std::mutex> lock(mtx_);
if (avaliable_res_num... |
#include "ColdSim.h"
#include "Struct.h"
#include "get_trace_tool.h"
#include "log.h"
class RUN
{
private:
get_trace_tool *gtt;
struct IoRecord *ior;
MemStruct *ms;
char logdir[200];
public:
RUN(const char *logd)
{
LogClear();
ms = new MemStruct();
strcpy(logdir,logd)... |
// Copyright (c) 2012-2017 The Cryptonote developers
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "RPCTestNode.h"
#include <future>
#include <vector>
#in... |
#include <imageprocessing/ImageExtractor.h>
#include <sopnet/slices/SliceExtractor.h>
#include "GroundTruthSegmentExtractor.h"
#include "GroundTruthExtractor.h"
logger::LogChannel groundtruthextractorlog("groundtruthextractorlog", "[GroundTruthExtractor] ");
GroundTruthExtractor::GroundTruthExtractor(int firstSection... |
// Copyright 2011 Yandex
#include <gtest/gtest.h>
#include <vector>
#include <string>
#include "ltr/crossvalidation/validation_result.h"
#include "ltr/scorers/fake_scorer.h"
using ltr::cv::ValidationResult;
using ltr::FakeScorer;
using std::vector;
using std::string;
TEST(CrossvalidationTest, ValidationResultTes... |
#include <iostream>
using namespace std;
template <typename T1, typename T2>
T1 addition(T1 num1, T2 num2)
{
return num1 + num2;
}
int main ()
{
cout<<"Addition of Integer Numbers : "<<addition(10,20)<<endl;
cout<<"Addition of Float Numbers : "<<addition(10.5,15)<<endl;
cout<<"Addition of Characters : "<<addition... |
//
// server.h
// mini-sql
//
// Created by Дмитрий Маслюков on 21.02.2020.
// Copyright © 2020 Дмитрий Маслюков. All rights reserved.
//
#ifndef server_h
#define server_h
#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501 /* Windows XP. */
#endif
#include <winsock2.h>
#include <Ws2tcpip.h>
#else
/* ... |
/*
* Copyright (c) 2015-2021 Morwenn
* SPDX-License-Identifier: MIT
*/
#ifndef CPPSORT_ADAPTERS_SMALL_ARRAY_ADAPTER_H_
#define CPPSORT_ADAPTERS_SMALL_ARRAY_ADAPTER_H_
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <array>... |
#include <SFML/Graphics.hpp>
#include <math.h>
#include <iostream>
#include "terrain_generator.h"
int main()
{
unsigned int seed = 104, width = 256, height = 256;
auto terrain = TerrainGenerator(seed, width, height);
auto t = 10;
sf::Texture texture;
// if (!image->saveToFile("result.png"))
// return ... |
#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
int main()
{
freopen("mamxanh8.inp","r",stdin);
freopen("mamxanh8.out","w",stdout);
int a;
scanf("%d %d",&a);
printf("Binh phuong cua %d la: %d\n",a,a*a);
... |
GLuint CreateAtmosphericScatteringLUT(double radius)
{
const int dim = 256;
float lut[dim][dim][4];
float planet_radius = radius / 1000.0;
float atmosphere_radius = 1.025f * planet_radius;
float atmosphere_height = atmosphere_radius - planet_radius;
float scale_height = (atmosphere_height) * 0... |
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2012-2013.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
// gdcm
#include <gdcmUIDGenerator.h>
// fwTools
#include <fwTools/dateAn... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
const int maxn = 11... |
#include "embedding.h"
#include "mask.h"
Embedding :: Embedding(ostream& os)
: output_stream(os)
{
}
Full_Embedding :: Full_Embedding(const Data& d, const uint p, const uint num_m, ostream& os)
: Embedding(os), data(d), pmax(p), high_moments(num_m)
{
Mask mask(data.Inputs());
// mask.Set_Mask("00000... |
// Created on : Sat May 02 12:41:15 2020
// Created by: Irina KRYLOVA
// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0
// Copyright (c) Open CASCADE 2020
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it un... |
#ifndef __QFB_NETWORK_H__
#define __QFB_NETWORK_H__
#include <QObject>
#include <QVariant>
#include <QSettings>
#include <QJsonArray>
#include <QJsonObject>
#include <QByteArray>
#include <QNetworkReply>
#include "network_manager.h"
/**
* The responsability of this class is to make all network related duties.
* It... |
#include <iostream>
#include<algorithm>
#include<clocale>
using namespace std;
int main()
{
setlocale(LC_ALL, "Ukrainian");//додаємо українську мову
int N, M; //ініціалзуємо к-ксть членів множин A i B
cout << "Введiть кiлькiсть елементiв множини А: "; //Вводимо змінну
cin >> N; //N
cout << "Вв... |
#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... |
#include <sys/time.h>
#include <time.h>
#include <string>
#include <iostream>
#include <sys/epoll.h>
void usleep(uint64_t usec) {
struct timeval tv;
tv.tv_sec = usec / 1000000;
tv.tv_usec = usec % 1000000;
int epfd = epoll_create(1);
epoll_wait(epfd, NULL, 1, &tv);
// select(0, nullptr, nullptr, nullptr, ... |
/*
* File: Tower.cpp
* Author: mohammedheader
*
* Created on November 23, 2014, 6:01 PM
*/
#include "HelloWorldScene.h"
#include "Tower.h"
USING_NS_CC;
Tower* Tower::create(HelloWorld* game, cocos2d::Vec2 location) {
Tower *tower = new (std::nothrow) Tower();
if (tower && tower->init(game,location))
... |
#include "field.h"
class test
{
int qqq;
};
Field::Field(QString mas[WIDTH][HEIGHT], int width, int height)
{
for(int i=0; i<width; i++)
for(int j=0; j<height; j++)
field[i][j].type=mas[i][j];
width_in_cells=width;
height_in_cells=height;
}
void Field::draw(float width, float height... |
#define OurCode 0
#if OurCode
#include <iostream>
#include <vector>
using namespace std;
struct vec2{
int x, y;
};
void displayPathtoPrincess(int n, char grid[3*3]){
vec2 pIndex; pIndex.x = pIndex.y = -1;
vec2 bIndex; bIndex.x = bIndex.y = 1;
for (int i = 0; i < 3; i++){
for (int j = 0; j < 3; j++){
if (g... |
#include <bits/stdc++.h>
using namespace std;
char maze[51][51];
int main(){
int h, w;
cin >> h >> w;
for(int i=0; i<h; i++){
for(int j=0; j<w; j++) cin >> maze[i][j];
}
bool ans = true;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
for(int i=0; i<h; i++){... |
#include <iostream>
using namespace std;
int main()
{
float nota_ve;
float nota_vc;
float p_vf;
while(1)
{
cout << "insira sua media de ve:\n";
cin >> nota_ve;
if(nota_ve <= 10)
{
cout << "Insira sua media de vc:\n";
cin >> nota_vc;
if(nota_vc <= 10)
{
p_vf = (5... |
#include "aluno.h"
Aluno::Aluno()
{
}
void Aluno::setNome(QString a)
{
nome=a;
}
void Aluno::setMatricula(QString b)
{
matricula=b;
}
void Aluno::setCurso()
{
QString temp;
temp[0]=matricula[5];
temp[1]=matricula[6];
curso=temp.toInt();
}
QString Aluno::getNome()
... |
/* -*- 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.
*/
#include <core/pch.h>
#ifdef DOM_EXTENSIONS_TAB_API_SUPPORT
#incl... |
///////////////////////////////////////////////////////////////////////////////
//
// The contents of this file are subject to the Mozilla Public License
// Version 1.1 (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.mozilla.... |
#include <stdio.h>
int main() {
int ht;
float vh, pd, sb, td, sl;
printf("Digite a quantidade de horas trabalhadas: ");
scanf("%d", &ht);
printf("Digite o valor por hora trabalhada: ");
scanf("%f", &vh);
printf("Digite o percentual de desconto: ");
scanf("%f", &pd);
sb = ht * vh;
td = (pd / 100) * sb;
s... |
#include "bricks/core/timespan.h"
#if BRICKS_ENV_MINGW
#include <pthread.h>
#endif
#include <time.h>
#include <string.h>
#define BRICKS_TIMESPAN_CONVERSION_DAYS (864000000000LL)
#define BRICKS_TIMESPAN_CONVERSION_HOURS (36000000000LL)
#define BRICKS_TIMESPAN_CONVERSION_MINUTES (600000000LL)
#define BRICKS_TIMESPAN_C... |
#include <iostream>
#include <pthread.h>
using namespace std;
class Area
{
public:
int _len;
static Area *_instance;
static pthread_mutex_t _myLock;
public:
Area();
static Area *getInstance();
};
Area* Area::_instance = NULL;
pthread_mutex_t Area::_myLock;
Area::Area()
{
pthread_mutex_init(&_... |
#include "Ground.h"
#include "Window.h"
#include "InputManager.h"
//材質の色
static GLfloat ambColor[4] = { 0.6f, 0.6f, 0.6f, 1.0f };
static GLfloat diffColor[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
static GLfloat specColor[4] = { 0.2f, 0.2f, 0.2f, 1.0f };
static GLfloat shiness = 30.0f;
Ground::Ground(GLfloat width, GLfloat he... |
#include<stdio.h>
#include<string.h>
main()
{
char str[20]="asdfghj";
int n;
n=strlen(str);
printf("%d\n",n);
}
|
/*******************************************************************************
* filename: M_Singleton.hpp
* description: Macros that generate skeleton singleton pattern classes
* author: Moritz Beber
* created: 2010-06-08
* copyright: Jacobs University Bremen. All rights reserved.
***************... |
/****************************************************************
* TianGong RenderLab *
* Copyright (c) Gaiyitp9. All rights reserved. *
* This code is licensed under the MIT License (MIT). *
*****************************************************************/
#pragma once
#if defined(_DEBUG) && defined... |
/*
* Author: Zachary Eisenhauer
* Date: 12/2/2016
* Assignment: Program 3
*
* In Main.cpp
* Functions to read in graph.txt, commands.txt and print a created graph of them in list form and matrix form
*
* In Main.h
* The function prototypes in this file, the class definition for a node, and the libaries used
*/
// I... |
#include "EquisolidModel.h"
Cvl::EquisolidModel::EquisolidModel(double focalLengthX, double focalLengthY, double principalPointX, double principalPointY) :
ProjectionModel(focalLengthX, focalLengthY, principalPointX, principalPointY)
{
}
Cvl::ProjectionModel::Uptr Cvl::EquisolidModel::clone() const
{
return Project... |
/* -*- 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.
*/
#include "core/pch.h"
#include "adjunct/quick_toolkit/widgets/... |
/*
* spinreflector.h
* deflektor-ds
*
* Created by Hugh Cole-Baker on 18/12/2008.
* A block that rotates, and only lets the beam through if it's aligned correctly.
* Otherwise the beam is reflected.
*/
#ifndef deflektor_spinreflector_h
#define deflektor_spinreflector_h
#include "spinblocker.h"
class Spin... |
#pragma once
#define _USE_MATH_DEFINES
#include <cmath>
#define M_PI 3.14159265358979323846
namespace LAB3
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System... |
#pragma once
// refer to http://en.wikipedia.org/wiki/Strict_weak_ordering#Properties
template<typename InputIterator, typename Predicate>
bool has_irreflexivity(InputIterator first, InputIterator last, Predicate pred)
{
for(; first != last; ++first)
{
if(pred(*first, *first)) return false;
}
return true... |
#pragma once
#include <core/data/Array.h>
#include <core/Size.h>
#include <core/sequence/count.h>
#include <qt/QtCore/Qt>
#include <qt/QtWidgets/QFrame>
#include <qt/QtWidgets/QLayout>
namespace launcher {
namespace qt {
template<typename A, typename... Args>
A * make_layout(Args const&... args) {
auto layout = ... |
#include "DetectMemoryLeak.h"
#include "Inventory.h"
#include "WeaponInfo\WeaponInfo.h"
#include "WeaponManager.h"
Inventory::Inventory() : m_iWeaponIndex(0)
{
}
Inventory::~Inventory()
{
}
void Inventory::addWeaponToInventory(CWeaponInfo* _newObject)
{
if (_newObject == NULL)
return;
weaponList.push_back(_new... |
//--------------------------------------------------------------------
//
// Laboratory 11, In-lab Exercise 1 database.cs
//
// (Shell) Indexed accounts database program
//
//--------------------------------------------------------------------
// Builds a binary search tree index for the account ... |
// Copyright 2009-2016 Sandia Corporation. Under the terms
// of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2016, Sandia Corporation
// All rights reserved.
//
// This file is part of the SST software package. For license
... |
#pragma once
#include "CppCommons.hh"
#include <string>
#include <vector>
namespace SQLiteWrapper {
enum class DBType {
integer, real, const_char
};
struct Column {
inline const int toInt() const { return std::stoi(value); }
inline const float toFloat() const { return std::stof(value); }
inline const boo... |
// RTSPClientDlg.cpp: 实现文件
//
#include "stdafx.h"
#include "RTSPClient.h"
#include "RTSPClientDlg.h"
#include "afxdialogex.h"
#include <string>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
CAboutDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
en... |
// CmnDlgView.cpp : CCmnDlgView 类的实现
//
#include "stdafx.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "CmnDlg.h"
#endif
#include "CmnDlgDoc.h"
#include "CmnDlgView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CCmnDlgView
IMPLEMENT_DYNCREATE(CCmnDlg... |
/**
* @author: Karthick < karthikn2099@gmail.com >
* @github: https://github.com/karthikn2098
* @date: 08/01/2018
*/
#include <bits/stdc++.h>
using namespace std;
int sumOfDigits(int N) {
if( N == 0 ) {
return 0;
}
return ( sumOfDigits(N/10) + N%10 );
}
int main(void) {
int N;
cou... |
#include <jni.h>
#include <core/Defs.hpp>
#include <core/String.hpp>
#include <core/Vector2.hpp>
#include <core/Vector3.hpp>
#include "gdn/gast_node.h"
#include "gast_manager.h"
#include "utils.h"
// Current class and package names assumed for the Java side.
#undef JNI_PACKAGE_NAME
#define JNI_PACKAGE_NAME org_godoten... |
#include<bits/stdc++.h>
using namespace std;
const int siz=10005;
const int INF=0x3f3f3f3f;
struct node{
int to,val;
};
vector<node> G[siz];
int n,d[siz],vis[siz];
void dij(int s){
int i,k,u,v;
memset(d,INF,sizeof(d));
memset(vis,0,sizeof(vis));
d[s]=0;
while(1){
k=-1;
for(i=1;i... |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
#include<iostream>
#include<climits>
//Cumulative Sum Approach
using namespace std;
int main(){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
int currsum[n+1];
currsum[0] = 0;
for(int i=1;i<=n;i++){
currsum[i] = currsum[i-1] + a[i-1];
}
int maxSum = IN... |
// Question 31 => Smallest subarray with sum greater than a given value
#include<iostream>
#include<climits>
using namespace std;
int main(){
int arr[] = {1,4,45,6,0,19};
int n = sizeof(arr) / sizeof(arr[0]);
int x;
cout<<"Please enter any number (Value of x): ";
cin>>x;
int minValue = INT_M... |
// Created by Oleksiy Grechnyev 2017
#pragma once
#include <string>
// ctor = Constructor, dtor = Destructor
// A Demo Class with ctor, dtor, copy/move ctor, copy/move assignment
// with a single std::string field name
// Note: after moving a std::string the original object has empty string,
// Which is show by the ... |
#ifndef MESH_H
#define MESH_H
#include <GL/glew.h>
class Mesh
{
public:
Mesh();
~Mesh();
void CreateMesh(GLfloat *vertices, unsigned int *indices, unsigned int numOfVertices, unsigned int numOfIndices);
void RenderMesh();
void ClearMesh();
void CreateMeshNew(GLfloat *vertices, unsigned int nu... |
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2010.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#ifndef _FWDATATOOLS_OBJECT_GENERATOR_HPP_
#define _FWDATATOOLS_OBJECT_GEN... |
//В приют привозят собак разных пород.
//В словаре shelter по названию хранится количество особей каждого вида на текущий момент.
//Приют может принять определённое количество собак каждой породы. Оно указано в словаре max_amount.
//Напишите функцию, которая будет на основании вектора с именами поступивших собак обнов... |
#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;
int main() {
int alph[26], n, ans = 0, class1, class2;
string s;
memset(alph, 0, 26 * sizeof(int));
cin >> n;
while(n--) {
cin >> s;
alph[s[0] - 97]++;
}
for(int i = 0; i < 26; i++) {
class1 = ceil(alph[i] / 2.0);
class2 = alph... |
#pragma once
#include "CoreMinimal.h"
#include "Enum/SubQuestType.h"
#include "QuestSubInfo.generated.h"
USTRUCT(BlueprintType)
struct ARPG_API FQuestSubInfo
{
GENERATED_USTRUCT_BODY()
public:
// 퀘스트 서브 타입 : Npc 대화 / 몬스터 사냥 / 아이템 획득
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "기본")
ESubQuestType SubQ... |
// Created on: 1996-03-26
// Created by: Christian CAILLET
// Copyright (c) 1996-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 ... |
#ifndef STATISTICA_H
#define STATISTICA_H
#include<iostream>
class Statistica
{
private:
Statistica(){}
Statistica(Statistica const&);
void operator=(Statistica const&);
static Statistica* instance;
public:
~Statistica(){}
int get_nr_pisici();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.