text stringlengths 8 6.88M |
|---|
#include <iostream>
#include <cstring>
using namespace std;
const int maxn = 1005;
int a[maxn][maxn];
int main() {
int n, m, r, c;
cin >> n >> m >> r >> c;
//while(cin >> n >> m >> r >> c) {
int col = 0, row = 0;
int cnt = 1;
memset(a, 0, sizeof a);
int sum = n*m;
a[row][col] = 1;
while(cn... |
#pragma once
#include "FwdDecl.h"
#include "Keng/Core/IGlobalEnvironment.h"
#include <memory>
#include <thread>
#include <unordered_map>
#include <vector>
#include <mutex>
namespace keng::core
{
class GlobalEnvironment : public IGlobalEnvironment
{
public:
GlobalEnvironment();
~GlobalEnvir... |
#ifndef AWS_NODES_BLOCK_H
#define AWS_NODES_BLOCK_H
/*
* aws/nodes/block.h
* AwesomeScript Block
* Author: Dominykas Djacenka
* Email: Chaosteil@gmail.com
*/
#include <list>
#include "statement.h"
namespace AwS{
namespace Nodes{
class Block : public Statement{
public:
Block(std::list<Statement*>* con... |
/*
ID: stevenh6
TASK: concom
LANG: C++
*/
#include <fstream>
#include <string>
#include <vector>
using namespace std;
ofstream fout("concom.out");
ifstream fin("concom.in");
int largest = 0;
int pairs[101][101];
bool previous[101];
int ct[101];
void traverse(int pairsind)
{
if (!previous[pairsind])
{
... |
#include "源.h"
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
vector <string> datas;
//得到data数据文件的总长度,告诉用户输入时不要越界
int get_longest() {
ifstream myfile(".\\data.txt");
bool judge = true;
if (!myfile.is_open())
{
judge = false;
cout << "无法打... |
/* -*- Mode: c++; tab-width: 4; 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"
#include "modules/widgets/OpWidget.h"
#include "modules/widgets... |
/*****************************************************************************
* *
* OpenNI 2.x Alpha *
* Copyright (C) 2012 PrimeSense Ltd. *
* ... |
#pragma once
class BasicObject
{
protected:
int x, y, w, h, FRAMEMAX;
int originalX, originalY, originalW, originalH;
Rect region; //collision region
float frame;
bool exists;
float hp;
float originalHP;
public:
int index;
float deadTim... |
#include "Water.hh"
Water::Water(const Map &map)
: map(map),
sizeX(map.getSizeX()), sizeY(map.getSizeY()),
points{std::vector<WaterPoint>(sizeX * sizeY),
std::vector<WaterPoint>(sizeX * sizeY)},
newBuffer(&points[0]),
oldBuffer(&points[1]),
numPasses(4),
dampening(f... |
// Cheng, Allan
// 996078337
#include <iostream>
using namespace std;
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>
void findIP(string, char*);
bool searchNext(string, string, int);
int main(int argc, char *argv[])
{
string input;
ifstream IPfile;
IPfile.open(argv[... |
Farm[] =
{
//Weapons
{Loot_GROUP, 6, shotgunsingleshot},
{Loot_GROUP, 1, Chainsaws},
{Loot_WEAPON, 1, ItemFishingPole},
//Tools
{Loot_VEHICLE, 5, WeaponHolder_ItemHatchet},
{Loot_GROUP, 4, ToolsBuilding},
//Items
{Loot_MAGAZINE, 1, equip_tent_poles},
{Loot_MAGAZINE, 4, ItemSandbag},
{Loot_MA... |
/*
* terrain_generator.hpp
*
* Created on: 21 Jan 2012
* Author: sash
*/
#ifndef TERRAIN_GENERATOR_HPP_
#define TERRAIN_GENERATOR_HPP_
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <set>
#include <utility>
#include <cmath>
#includ... |
/*
* Copyright (c) 2001, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*... |
// 快速排序.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
using namespace std;
#include<vector>
#include<random>
#include<algorithm>
void bubsort(vector<int>& a, int len) {
for (int i = 0; i < len - 1; i++) {
for (int j = 0; j < len - 1 - i; j++) {
if (a[j] > a[j + 1]) swap(a[j], a[j + 1]);
}
}
}
... |
#include <iostream>
#include <type_traits>
namespace rd
{
namespace ch2
{
/*
* Imagine that we are implementing the std library. A std::iter_swap
* needs to be added to <algorithm>.
*
* see: http://en.cppreference.com/w/cpp/algorithm/iter_swap
*/
/* we start with a naive impleme... |
#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;
int a[50010],p[5001... |
#include <iostream>
#include <string>
bool checkTime(int hour, int minute) {
if(0 <= hour && 12 >= hour && 0 <= minute && 60 >= minute) {
return true;
} else {
return false;
}
}
int main() {
int startHour = 0;
int startMinute = 0;
int endHour = 0;
int endMinute = 0;
int count = 0;
char jam1[5];
char jam... |
/* -*- 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.
*/
#ifndef OPACCESSIBILITYMANAGER_H
#define OPACCESSIBILITYMANAGER_H... |
#include<iostream>
#include<algorithm>
#include<vector>
#include<sstream>
using namespace std;
class Solution {
public:
string reverseWords(string s) {
//基本思想:暴力法
//s的第一个单词前面填补一个空格,使得翻转后第一个单词与第二个单词间存在空格
if (s[0] != ' ')
s.insert(0, 1, ' ');
string res;
int i = s.size() - 1, pos;
//从后往前遍历字符串s
while (i ... |
/*
多项式四则
2016.10.19 by kkcckc
*/
#include "multi.h"
void main()
{
int flag;
double x;
mult *head1,*head2;
//hint();
FILE *fp=NULL;
if ((fp=fopen(IPATH,"r"))<0) {cout<<"无法打开输入文件";exit(0);};
ofstream fpp(OPATH,ios::out);
if (!fpp) exit(0);
streambuf *oldbuf = cout.rdbuf(fpp.rdbuf());
fsc... |
/*
ReadAnalogVoltage
The ESP8266EX(Which IC D1 board used) integrates a generic purpose 10-bit analog ADC. The ADC range is from 0V to 1.0V
And on the board, we use following circuit:
-----A0
|
220K
|--- ADC
100K
|
GND
so,the input voltage(A0) can be 3.2V, and the A0=3.2*ADC
*/
// the setup rout... |
#ifndef DNDSEQUENCE_DUP_H
#define DNDSEQUENCE_DUP_H
#include "Icommand.h"
class Dup:public Icreate
{
public:
/*virtual*/~Dup(){}
std::string run(Iwriter &writer, Ireader& reader, dataDNA& containerDna, const Paramcommand& obj);
private:
bool isValid(const Paramcommand& obj);
s... |
#include <iostream>
#include <string>
int main() {
float num1;
char symbal;
float num2;
std::cin>> num1 >> symbal >> num2;
std::cout <<num1<< std::endl;
if (symbal == '+') {
std::cout<< num1 + num2<<std::endl;
} else if (symbal == '-') {
std::cout << num1 - num2;
} else if (symbal ==... |
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40319)
#error "Mixed versions compilation."
#endif
/**
* Google's Firebase QueryFilter class, QueryFilter.cpp version 1.0.7
*
* This library supports Espressif ESP8266 and ESP32
*
* Created December 19, 2022
*
* This work is a p... |
/*
* ProgrammersFirst.h
*
* Created on: 2021. 9. 8.
* Author: dhjeong
*/
#ifndef PROGRAMMERSFIRST_H_
#define PROGRAMMERSFIRST_H_
#include <iostream>
#include <vector>
#include <map>
#include <utility>
using namespace std;
class Level1 {
public:
Level1();
virtual ~Level1();
void run() {
std::vector<... |
#include <string>
#include <cstdio>
// Table of frequency characters
int Frequency[26];
int hashFunc(char c)
{
return (c-'a');
}
void countFre(string S)
{
for(int i = 0; i < S.length(); ++i)
{
int index = hashFunc(S[i]);
Frequency[index]++;
}
for(int i = 0; i<26;++i)
{
std::cout<< (char)(i+'a')<< ' ' <<... |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include "lexer.h"
//#include "lexer.cc"// may need to be included to run properly on some compilers...
#define MAX_TEXT_LINE_LENGTH 128
using namespace std;
int main (int argc, char* argv[])
{
int t... |
// Created on: 1994-02-24
// Created by: Laurent BOURESCHE
// Copyright (c) 1994-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 ... |
#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... |
/** Copyright (c) 2018 Mozart Alexander Louis. All rights reserved. */
#ifndef __PARTICLE_UTILS_HXX__
#define __PARTICLE_UTILS_HXX__
/**
* Includes
*/
#include "globals.hxx"
#include "ui/CocosGUI.h"
/**
* Namespaces
*/
using namespace ui;
class ParticleUtils {
public:
/**
* Loads a particle system and aut... |
// MainFrm.cpp : CMainFrame 类的实现
//
#include "stdafx.h"
#include "MyCtrlBar.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMainFrame
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
ON_WM_CREATE()
ON_COMMAND(ID_VIEW_SHORT, &CMainFrame::OnViewShort)... |
#include <iostream>
int tanpaRekursif(int x, int y) {
int result = 1;
do
{
result = result * x;
y--;
}
while (y > 0);
return result;
}
int pangkat(int x, int y) {
if(y == 0) {
return 1;
}
return x * pangkat(x, y-1);
}
int main () {
/* find power of ... |
#include<iostream>
using namespace std;
#define MAX 100
#define INFTY 2001
#define WHITE 0
#define GRAY 1
#define BLACK 2
int M[MAX][MAX], d[MAX];
// int p[MAX]; // p[u]はuの親を記録しておく配列だが本文では使う必要ない
void prim(int n){
int color[MAX], u;
// 初期化
for(int i=0; i<n; i++){
color[i] = WHITE;
d[i] = INFTY;
}
d[... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-1999 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 "modules/dom/src/js/screen.h"
... |
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/B.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#pragma once
#include <Fuse.Animations.IResize.h>
#include <Fuse.Binding.h>
#include <Fuse.Controls.Text.h>
#include <Fuse.IActualPlacement.h>
#include <Fuse.INotifyUnroo... |
#include <iostream>
#include "argparse.h"
using namespace std;
static vector<string> getArgs(char *argv[]) {
vector<string> actuals;
char **tmp = argv+1;
bool endOptions = false;
while(*tmp) {
if(strcmp(*tmp, "--") == 0) {
actuals.push_back(string(*tmp));
endOptions ... |
#include <iostream>
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <Eigen/Core>
#include <igl/polar_dec.h>
#include <igl/polar_svd.h>
namespace py = pybind11;
template<typename float_t>
py::array_t<float_t> inv3(py::array_t<float_t, py::array::c_style> & Ts)
{
auto Ts_buf = Ts.request();
... |
#ifndef APPLICATION_INFOMANAGER_H
#define APPLICATION_INFOMANAGER_H
#include "BaseManager.h"
#include <boost/property_tree/ptree.hpp>
#include "src/server/lib/Connection/BaseConnection.h"
class InfoManager: public BaseManager {
public:
~InfoManager() override = default;
boost::property_tree::ptree getMessageA... |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int A,B,SOMA;
scanf ("%d", &A);
scanf("%d", &B);
SOMA = A + B;
printf("SOMA = %d\n", SOMA);
return 0;
}
|
#include "ros/ros.h"
#include "geometry_msgs/PoseArray.h"
#include "visualization_msgs/Marker.h"
#include <bitset>
class marker_class
{
ros::Publisher vis_pub;
public:
marker_class(ros::NodeHandle* n):vis_pub()
{
vis_pub = n->advertise<visualization_msgs::Marker>( "visualization_marker", 10);
}
void visCall... |
#include "Music.h"
sf::Music Music::backgroundMusic;
void Music::playMusic()
{
backgroundMusic.openFromFile("Sounds/backgroundMusic.ogg");
backgroundMusic.play();
backgroundMusic.setLoop(1);
}
|
#ifndef tmptools__coretools__type_if__hpp
#define tmptools__coretools__type_if__hpp
#include "instance_of.hpp"
namespace tmp {
template <bool Condition, typename T1, typename T2>
struct type_if
: instance_of<T1> {};
template <typename T1, typename T2>
struct type_if<false, T1, T2>
: instance_of<T2> {};
} // t... |
/* System includes */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* OpenCL includes */
#include <CL/cl.h>
#include <SFML/>
// #include ” u t i l s . h”
// #include ”bmp−u t i l s . h”
static const int HIST_BINS = 256;
int main(int argc, char **argv)
{
/* Host data */
int *hInputImage = ... |
#include<bits/stdc++.h>
using namespace std;
bool nextPermutation(int array[], int size){
int i = size - 1;
while (i > 0 && array[i - 1] >= array[i])
i--;
// Now i is the head index of the suffix
// Are we at the last permutation already?
if (i <= 0)
return false;
// Let... |
/*
Copyright 2021 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, s... |
#ifndef FILEWORKER_HPP
#define FILEWORKER_HPP
#include <QObject>
class FileWorker : public QObject
{
Q_OBJECT
public:
explicit FileWorker(QObject *parent = 0);
signals:
public slots:
static bool savePictureToGallery(const QString &sourcePath);
};
#endif // FILEWORKER_HPP
|
// Created on: 1995-02-27
// Created by: Christian CAILLET
// 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 terms of the ... |
#pragma once
#include "Entity.h"
#include "../Components/Transform.h"
#include "../Components/Renderer.h"
#include "../Components/BoxCollider.h"
class dfTile :
public Entity
{
public:
dfTile(void);
virtual ~dfTile(void);
virtual void Init();
virtual void Update();
virtual void InterpretProperty(const char* nam... |
#pragma once
class Fade;
class AIEditModeSelect :public GameObject
{
public:
~AIEditModeSelect();
bool Start();
void Update();
private:
enum AIMode
{
enVisual,
enPython,
};
SpriteRender* m_spMode[2];
int m_sel = 0;
Fade* m_fade;
}; |
#pragma once
class Gamma {
public:
// Inits the brightness curve with a traditional gamma curve of N^p.
void initPower(float p = 2.6f);
// Inits the brightness curve with an anti log curve of 2^Np - 1.
void initAntiLog(float p = 6);
inline CRGB apply(const CRGB &c) {
return CRGB(_lut[c.r], _lut[c.g], _... |
// Given a set of distinct integers, S, return all possible subsets.
// Note:
// Elements in a subset must be in non-descending order.
// The solution set must not contain duplicate subsets.
// For example,
// If S = [1,2,3], a solution is:
// [
// [3],
// [1],
// [2],
// [1,2,3],
// [1,3],
// [2,3],
// ... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#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 <deque>
#include <map>
#include <functional>... |
#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;
/* 1-indexed, [(1, 1), (m, n)] */
template<typename T> class BinaryIndexedTree2D {
vector< vector<T> > vec;
const ll m, n;
public:
BinaryIndexedTree2D(ll _m, ll _n) : vec(_m + 1, vect... |
#pragma once
#include <PravLib/type_list.h>
#include <lexer/literal_token.hpp>
#include <lexer/rule_token.hpp>
namespace prv {
namespace lex {
template <class Derived, class TokenSpec>
struct identifier_token : rule_token<Derived, TokenSpec> {
static constexpr const char* name = "<identifier>";
};
... |
#include "ProfessionsService.h"
#include <QJsonArray>
#include "Requester/Requester.h"
// :: Constants ::
const QString GET_PROFESSIONS_API = "users/professions";
// :: Lifecycle ::
ProfessionsService::ProfessionsService(QObject *parent)
: BaseService(parent) { }
// :: Public methods ::
void ProfessionsS... |
#include "rectangle.hpp"
#include "rectangle.cpp"
#include "gtest/gtest.h"
//CONSTRUCTOR TEST SUITE
TEST(ConstructorTest, NoParameterHeight){
Rectangle rect1;
EXPECT_EQ(rect1.get_height(), 0);
}
TEST(ConstructorTest, NoParameterWidth){
Rectangle rect1;
EXPECT_EQ(rect1.get_width(), 0);
}
TEST(Const... |
/**
* 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
*
* Unless required by applicable law or agreed to... |
/*
** EPITECH PROJECT, 2019
** OOP_indie_studio_2018
** File description:
** Bomb
*/
#ifndef BOMB_HPP_
#define BOMB_HPP_
#include <vector>
#include <iostream>
#include "Character.hpp"
class Bomb
{
public:
Bomb(int pos_x, int pos_y);
~Bomb();
void KillSomeone();
std::vector<std::string> ex... |
// Created by: Kirill GAVRILOV
// Copyright (c) 2013-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
// by the Fre... |
#include <stdio.h>
#include <string.h>
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include <stdint.h>
#include <inttypes.h>
#include <math.h>
#include "tusb.h"
extern int32_t sin_table[64];
uint64_t from;
void start() { from = time_us_64(); }
void elapsed()
{
uint64_t now = time_us_64();
printf("Elapsed... |
// Created on: 1994-12-22
// Created by: Remi LEQUETTE
// Copyright (c) 1994-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 ... |
// ___________________________________________________________________________
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
// FILE docwin_mousewheel.h
// CREATED
//
// DESCRIPTION
// ___________________________________________________________________________
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Genius.h"
#include "LightsGrid.h"
#include "Lights.h"
// Sets default values
ALightsGrid::ALightsGrid()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need ... |
#include "LeftMouseButtonEvent.hpp"
int LeftMouseButtonEvent::getButtonDownCode() {
return MOUSEEVENTF_LEFTDOWN;
}
int LeftMouseButtonEvent::getButtonUpCode() {
return MOUSEEVENTF_LEFTUP;
} |
#ifndef _ErrorMsg_
#define _ErrorMsg_
class RedisAccess;
class ErrorMsg
{
public:
static ErrorMsg* getInstance();
const char* getErrMsg(int code);
private:
ErrorMsg();
virtual ~ErrorMsg();
public:
void init(const char* file = "");
void initFromBuf(const char *pErrMsg);
bool initFromRedis(RedisAccess ... |
#include "Variable.h" // Подключение файла, для работы с токенами и переменными.
int fact(int n) // Функция для вычисления факториала числа.
{ //
if (n < 0) // Если число меньше 0
return 0; // то возвращаем 0.
if (n == 0) // Если число равно 0
return 1... |
#ifndef OFXCOMMANDPATTERNTHREADWINH
#define OFXCOMMANDPATTERNTHREADWINH
#include "ofxCommand.h"
#include "ofxCommandProcessor.h"
#include "ofxCommandProcessorThread.h"
#include "ofxCommandProcessorThreadSync.h"
#include <boost/shared_ptr.hpp>
#if defined( __WIN32__ ) || defined( _WIN32 )
#include <windows.h>
#inclu... |
/* -*- 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.
**
*/
#include "core/pch.h"
#ifdef EXTE... |
#ifndef LOGGING_HPP
#define LOGGING_HPP
#include <string>
#include "settings.hpp"
#include <boost/log/trivial.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/sources/global_logger_storage.hpp>
#include <boost/log/attributes/named_scope.hpp>
#include <boost/format.hpp>
namespace sp
{
void se... |
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QScrollArea> //容器
#include <QFileDialog>
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
public s... |
//======================================================================
// Name: Snake.h
// Author: Will Blades
// Function: Class storing the actual snake in the game with its
// relevant member functions. Food items and relative functions
// are also stored in the same class as they make use of the
... |
#include<iostream>
using namespace std;
void function(int arr[],int size)
{
for(int i=0;i<size;i++)
{
cin>>arr[i];
}
for(int i=0; i<size; i++)
{
for(int j=i+1; j<size; j++)
{
if(arr[j] < arr[i])
{
int temp = arr[i];
... |
#include "stdafx.h"
#include "Act_Fire.h"
#include "../MonsterAction.h"
#include "../Monster.h"
#include "../../GameData.h"
Act_Fire::Act_Fire()
{
m_effect = NewGO<CEffect>(0, "eff");
m_ActionId = enFire;
}
bool Act_Fire::Action(Monster * me)
{
if (m_target == nullptr)
return true;
if (m_first)
{
me->anim_e... |
/**
* Copyright (c) 2020, 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... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
/*
* Copyright (c) 2011 Dan Wilcox <danomatika@gmail.com>
*
* BSD Simplified License.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
*
* See https://github.com/danomatika/ofxAppUtils for documentation
*
*/
#include "te... |
#include "LightningTower.h"
#include <glm/gtx/rotate_vector.hpp>
LightningTower::LightningTower(glm::vec3 p) : Tower(LIGHTNINGTOWERCOOLDOWN, LIGHTNINGTOWERRANGE, LIGHTNINGTOWERPRICE, p) {
texture = "LightningTower";
firing = false;
}
LightningTower::~LightningTower()
{
}
void LightningTower::upda... |
//
// Created by Vladimir on 1/20/2020.
//
#ifndef COP_3530__ALGORITHMS__PROTOTYPES_H
#define COP_3530__ALGORITHMS__PROTOTYPES_H
//Prototype Functions (gives the compiler a heads up about the upcoming function):
void navigate_list_forward(node **front);
void navigate_list_backwards(node **rear);
int get_list_size(n... |
class ItemPlasticWaterbottleUnfilled : CA_Magazine
{
scope = 2;
count = 1;
type = 256;
model = "z\addons\dayz_communityassets\models\waterbottle.p3d";
picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottleEmpty.paa";
displayName = $STR_EQUIP_NAME_WBPET_01;
descriptionShort = $STR_EQUIP_DESC_WBPET_01;
... |
#pragma once
#ifndef DAY_H
#define DAY_H
#include <vector>
#include <string>
#include "event.hpp"
class Day {
private:
std::string date;
std::vector<Event> events;
public:
std::string getDate() { return date; }
void setDate(std::string date) { this->date = date; }
void setEvent(std::string name,... |
#include <iostream>
#include "UI/ConsoleManager.h"
#include "Entity/ComplexNumber.h"
#include "Application/KomplexNumberCalculator.h"
int main() {
ConsoleManager consoleManager;
KomplexNumberCalculator calculator;
ComplexNumber* userInput = consoleManager.getUserInput();
char operation = consoleManage... |
// chebyshev.c
// Andrei Alexandru
// Dec 2005
// Implement Chebysev acceleration following hep-lat/0106016
#include "chebyshev.h"
#include "vector_util.h"
namespace qcd {
// Q is expected to be hermitian
void chebyshev_matmult::remap_poly(vector& src, vector& dest)
{
Q(src, tmp2);
Q(tmp2, tmp);
double facto... |
#include "Components.h"
#include "Object.h"
#include "Core.h"
#include "Screen.h"
#include "GUI.h"
std::shared_ptr<Object> Component::GetObject()
{
return object.lock();
}
std::shared_ptr<Core> Component::GetCore()
{
return object.lock()->GetCore();
}
std::shared_ptr<Input> Component::GetInput()
{
return object.... |
#include "PixelShader.h"
PixelShader::PixelShader(std::string_view shaderName)
{
VFMakeShader(shaderName.data(), &pPS);
}
void PixelShader::Bind(VeritasEngine& vin)
{
GetContext(vin)->PSSetShader(pPS.Get());
}
|
#include<iostream>
#include "parent.h"
#include "child.h"
int main(){
Child child;
Parent &cParent = child;
std::cout <<"cParent is a " << cParent.getName() <<std::endl;
return 0;
} |
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.app18_accessor_ButtonEntry_Value.h>
#include <_root.ButtonEntry.h>
#include <Uno.Bool.h>
#include <Uno.Object.h>
#include <Uno.String.h>
#incl... |
#ifndef BASEPARSER_H
#define BASEPARSER_H
#include "BasePlaylist.h"
#include <memory>
namespace hls {
class BaseParser {
public:
virtual ~BaseParser();
virtual std::unique_ptr<BasePlaylist> parse(const QByteArray &data) = 0;
protected:
static QString errorReadFromStream();
static QString errorParsePlaylis... |
#ifndef TIMER_HPP
#define TIMER_HPP
#include "../Common/Configuration.hpp"
#include <chrono>
class Timer final
{
// As of VC2015 std::chrono is using QueryPerformanceCounter internally on Windows
std::chrono::time_point<std::chrono::system_clock> m_start;
std::chrono::time_point<std::chrono::system_clo... |
#ifndef __TC_FILE_MUTEX_H
#define __TC_FILE_MUTEX_H
#include "util/tc_lock.h"
#include <stdio.h>
namespace taf
{
/////////////////////////////////////////////////
// ˵��: �ļ�����
// Author : j@syswin.com
/////////////////////////////////////////////////
/**
* �쳣��
*/
struct TC_FileMutex_Exception : publ... |
#include <iostream.h>
#include <conio.h>
int binsrch(int arr[], int length, int query){
int hval,lval,mval,pos;
hval=length-1;
lval=0;
while(lval<=hval){
mval=(hval+lval)/2;
if (query==arr[mval]){
pos=mval;
return pos;
}
else if (query>mval) lval = mval + 1;
else if (query<mval) hval = mval-1;
}
... |
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
const int MAX = 1000000000;
int rec[100000],prime[100000];
int main()
{int n,t = 0;
n = sqrt(MAX)+1;
for (int i = 2;i <= n; i++)
if (!rec[i])
{for (int j = i+i;j <= n; j+=i)
rec[j] = 1;
prime[++t] = i;
}
while (... |
#include<iostream>
#include<cmath>
#include<string>
#include<sstream>
using namespace std;
string binary(unsigned long long int);
bool is_palindrome(string);
int main() {
int count = 0;
for(unsigned long long int i = 1; i < 1000000; ++i) {
string str;
stringstream stream;
stream <<... |
#pragma once
#include "ResourceManager.h"
#include "EngineUtil.h"
#include "FreeImage.h"
#include <memory>
class Image{
public:
string name;//file name
string filepath;
enum ImageFormat
{
IM_JPEG,
IM_PNG,
IM_TGA,
IM_BMP,
IM_HDR,
IM_TIF,
IM_UNKNOWN
};
enum ImagePixelFormat
{
UNSIGNED_BYTE,
... |
#ifndef LINKEDLIST_H_INCLUDED
#define LINKEDLIST_H_INCLUDED
using namespace std;
struct node
{
int w;
node*next;
};
void wypisz(node *f);
node *buduj(int t[],int n);
#endif // LINKEDLIST_H_INCLUDED
|
#ifndef __INC_MST_HPP
#define __INC_MST_HPP
#include "graph.hpp"
#include "priority_queue.hpp"
#include <limits>
#include <string>
#ifndef _BEGIN_ZHF_LIB
#define _BEGIN_ZHF_LIB namespace zhf_lib{
#endif // !_BEGIN_ZHF_LIB
#ifndef _END_ZHF_LIB
#define _END_ZHF_LIB }
#endif // !_END_ZHF_LIB
_BEGIN_Z... |
/*
* This file is part of OctoMap - An Efficient Probabilistic 3D Mapping
* Framework Based on Octrees
* http://octomap.github.io
*
* Copyright (c) 2009-2014, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved. License for the viewer octovis: GNU GPL v2
* http://www.gnu.org/licenses/old-licen... |
class Mk43_DZ: M60A4_EP1_DZE {
displayName = $STR_DZ_WPN_MK43_NAME;
model = "\RH_mgswp\RH_mk43.p3d";
picture = "\RH_mgswp\inv\mk43.paa";
handAnim[] = {"OFP2_ManSkeleton","\RH_mgswp\Anim\RH_mk43.rtm"};
reloadMagazineSound[] = {"\RH_mgswp\sound\m60e4_reload",0.0562341,1,25};
modes[] = {"manual","close","short","med... |
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int arr[100],top,size;
using namespace std;
struct node
{
int data;
struct node *left;
struct node *right;
};
int height(struct node *p);
void printlevelorder(struct node *p,int h);
struct node *newnode(int a... |
#include "cCardStorageCommunity.h"
cCardStorageCommunity::cCardStorageCommunity()
{
}
cCardStorageCommunity::~cCardStorageCommunity()
{
}
|
#include "../../idlib/precompiled.h"
#pragma hdrstop
#include "../Game_local.h"
#include "../Weapon.h"
#include "../client/ClientEffect.h"
#ifndef __GAME_PROJECTILE_H__
#include "../Projectile.h"
#endif
const int NAPALM_GUN_NUM_CYLINDERS = 5;
class WeaponNapalmGun : public rvWeapon {
public:
CLASS_PROTOTYPE( We... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.