text stringlengths 8 6.88M |
|---|
/*****************************************************************************************************************
* File Name : mergesort.h
* File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\tutorials\nptel\DSAndAlgo\lecture22\mergesort.h
* Created on : Jan 15, 2014 :: 2:01:45 AM
* Author ... |
#include "Cannon.h"
#include "Bullet.h"
#include "GameLayer.h"
USING_NS_CC;
Cannon* Cannon::createWithCannonType(int cannonType, GameLayer *pGameLayer, cocos2d::SpriteBatchNode *pBatchNode){
Cannon* pCannon = new Cannon(cannonType,pGameLayer);
if(pCannon && pCannon->initWithCannonType(pBatchNode))
... |
#include "_pch.h"
#include "BaseOkCancelDialog.h"
using namespace wh;
using namespace wh::view;
//---------------------------------------------------------------------------
void DlgBaseOkCancel::Create()
{
wxSizer* szrMain= new wxBoxSizer( wxVERTICAL );
m_sdbSizer = new wxStdDialogButtonSizer();
m_btnOK = new... |
/**
* Given a string S, find the longest palindromic substring in S.
* You may assume that the maximum length of S is 1000, and there
* exists one unique longest palindromic substring.
*/
// O(n^2) solution
class Solution {
public:
string longestPalindrome(string s) {
const int N = s.size();
... |
/* BEGIN LICENSE */
/*****************************************************************************
* SKCore : the SK core library
* Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr>
* $Id: log.cpp,v 1.1.2.5 2005/02/17 15:29:20 krys Exp $
*
* Authors: Colin Delacroix <colin @at@ zoy .dot. org>
*
*... |
/* -*- Mode: c++; tab-width: 4; 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.
*
* @author Arjan van Leeuwen (arjanl)
*/
#ifndef UNIX_OPSKINELEMENT_H
#define UNIX_OPS... |
/*
* BasicObs.cpp
*
* Created on: Aug 20, 2014
* Author: ushnish
*
Copyright (c) 2014 Ushnish Ray
All rights reserved.
*/
#include "dmc.h"
namespace measures {
template <class T>
void BasicObs<T>::measure() {
Q.x += this->state.dQ.x;
Q.y += this->state.dQ.y;
Q.z += this->state.dQ.z;
ltime = this->... |
class TrieNode{
public:
int path;
int end;
TrieNode *child[26];
TrieNode(){
path = 0;
end = 0;
for(int i=0; i<26; ++i){
child[i] = NULL;
}
}
};
class TrieTree{
public:
TrieNode *root;
TrieTree(){
root = new TrieNode();
}
void inser... |
#include "product.h"
QString Product::getId() const
{
return id;
}
void Product::setId(const QString &value)
{
id = value;
}
QString Product::getNameProduct() const
{
return nameProduct;
}
void Product::setNameProduct(const QString &value)
{
nameProduct = value;
}
double Product::getPriceProduct() ... |
/*
문제 링크: https://www.acmicpc.net/problem/3190
문제 이름: 뱀
문제 풀이: 시뮬레이션
문제 풀이 참고 블로그 : https://na982.tistory.com/84?category=145346
*/
#define APPLE 1
#include <iostream>
using namespace std;
int N, K, L; // 보드 게임 크기
int nMap[101][101];
int head_y, head_x, tail_index;
int snake_y[10101], snake_x[10101];
char ... |
#include <ros/ros.h>
#include <geometry_msgs/PoseStamped.h>
#include "/home/ubuntu/catkin_ws/src/A_simple_subpuber/include/A_simple_subpuber/mavlink/v1.0/autoquad/mavlink.h"
#include "A_simple_subpuber/Mavlink.h"
#include "SerialRDM.h"
#define RADIUS_EARTH_METER (6378.137*1000.0)
int j=0;
SerialRDM serial;
void Radia... |
#ifndef _FMT_ITOA_HPP_
#define _FMT_ITOA_HPP_
#include <fmt/flag.hpp>
namespace fmt {
uint32_t itoa(int64_t n, uint32_t width, uint32_t flags, char *b);
uint32_t itoa(uint64_t n, uint32_t width, uint32_t flags, char *b);
uint32_t itoa(int32_t n, uint32_t width, uint32_t flags, char *b);
uint32_t itoa(uint32_t n, uin... |
#pragma once
#include "../../UI/Dependencies/IncludeImGui.h"
#include "../../Graphics/Color/Color.h"
#include <string>
namespace ae
{
namespace priv
{
namespace ui
{
inline bool ColorToEditor( const std::string& _Name, Color& _Color )
{
float ColorRaw[4] = { _Color.R(), _Color.G(), _Color.B(), _Color... |
//HelloWorld.cpp
#include <iostream>
using namespace std;
int main() {
char ch;
cout << "Hello World!" << endl;
cin >> ch;
return 0;
}
|
/*
This file is part of SMonitor.
Copyright 2015~2016 by: rayx email rayx.cn@gmail.com
SMonitor 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 ver... |
#pragma once
#include "ClistCtrlEx.h"
#include "afxcmn.h"
// MyRelTabDlg 对话框
class MyRelTabDlg : public CDialogEx
{
DECLARE_DYNAMIC(MyRelTabDlg)
public:
MyRelTabDlg(CWnd* pParent = NULL); // 标准构造函数
virtual ~MyRelTabDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_RELTAB_DIALOG };
#en... |
#include <fstream>
#include <iostream>
#include <boost/variant/static_visitor.hpp>
#include "http/parse_request.hpp"
using namespace std;
int main(int argc, char **argv)
{
if(argc < 2)
{
cerr << "Not enough arguments; call as" << endl;
cerr << "\t" << argv[0] << ' ' << "<file-to-parse>" << endl;
return 1;
... |
#pragma once
#include "entity/entity.h"
namespace jsentity
{
JSObject* createEntityObject(entity::Entity* entity);
void destroyEntityObject(entity::Entity* entity);
JSBool RegisterCreateFunction(script::ScriptEngine* engine, char* name, JSNative create);
}; |
// Author: Kirill Gavrilov
// Copyright (c) 2016-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 So... |
#pragma once
#include <iberbar/Base/Lua/LuaCModule.h>
#include <iberbar/Base/Lua/LuaTypes.h>
namespace iberbar
{
class CLuaCModuleClass
: public CLuaCModuleAbstract
{
public:
struct Reg
{
const char* clsname;
lua_CFunction fn_constructor;
lua_CFunction fn_gc;
lua_CFunction fn_tostring;
const... |
#ifndef __TC_HTTP_ASYNC_H_
#define __TC_HTTP_ASYNC_H_
#include "util/tc_thread_pool.h"
#include "util/tc_http.h"
#include "util/tc_autoptr.h"
#include "util/tc_socket.h"
#include "util/tc_timeout_queue.h"
namespace taf
{
/////////////////////////////////////////////////
// ˵��: http�첽������
// httpͬ������ʹ��TC... |
template<class T>inline T gcd(T a,T b){
if(!a)return 1;if(!b)return a;
if(a<0) a=-a; for(T t;b;t=a%b,a=b,b=t);
return a;
} |
#include <iostream>
#include <string.h>
bool clearCin() { //Перевод cin в рабочее состояние и очистка буфера
if (std::cin.fail()) {
std::cin.clear();
std::cin.ignore(32767, '\n');
std::cout << "Oops, something went wrong. Please, try again.\n";
return false;
}
std::cin.ignore(32767, '\n');
return true;... |
//hashmap
class NumArray {
public:
NumArray(vector<int> &nums) {
int sum = 0;
for(int i = 0; i < nums.size(); ++i){
sum += nums[i];
sums[i] = sum;
}
sums[-1] = 0;
}
int sumRange(int i, int j) {
return sums[j] - sums[i-1];
}
unordered_m... |
/*
File: Vec.cc
Function: Implements Vec.h
Author(s): Andrew Willmott
Copyright: Copyright (c) 1995-1996, Andrew Willmott
Notes:
*/
#include "Vec.h"
#ifndef __SVL__
#include "Array.h" // for the >> operator...
#endif
#include <iomanip>
#include <string.h>
#include <stdarg.h>
// --- Vec Construct... |
#ifndef MINISERVER_HTTP_CONNECTION_H
#define MINISERVER_HTTP_CONNECTION_H
#include <map>
#include "connection.h"
#include "http_message.h"
#include "common_type.h"
namespace miniserver {
class HttpConnection : public Connection {
public:
// copy contorl constructor for prototype.
HttpConnection(int dummy); ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2011-2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef MODULES_OTL_REDBLACKTREEITERATOR_H
#define MODULES_OTL_RE... |
// attitude for spinning satelite
#ifndef NONLINEAR_H
#define NONLINEAR_H
#include "Eigen/Core"
#include "Eigen/Geometry"
#include <cstdio>
#include <string>
class NonLinear {
public:
NonLinear(Eigen::Vector3d &I, double SD_Q, double SD_R, int SEED) {
Ix_ = I[0];
Iy_ = I[1];
Iz_ = I[2];
SD_Q_ = SD_Q... |
#ifndef __UTILS_H__
#define __UTILS_H__
#include "CmnHdr.h"
#include <set>
#include <ctime>
#include <random>
#include <tcpmib.h>
#include <IPHlpApi.h>
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Iphlpapi.lib")
#pragma comment(lib, "Ws2_32.lib")
class Utils
{
public:
static bool WritePortToMapping... |
// Generated from D:/4IF/PLD-COMP/Compilateur01\fichierAntlr.g4 by ANTLR 4.7
#pragma once
#include "antlr4-runtime.h"
#include "fichierAntlrParser.h"
/**
* This class defines an abstract visitor for a parse tree
* produced by fichierAntlrParser.
*/
class fichierAntlrVisitor : public antlr4::tree::AbstractPar... |
#pragma once
#include "windows.h"
class Thread abstract
{
public:
Thread(void);
~Thread(void);
void Stop();
void Start();
private:
static DWORD WINAPI MainThread(LPVOID pParam);
int startMainThread();
int endMainThread();
HANDLE mainThread;
volatile bool bMainThread;
protected:
virtual int ThreadFunction() =... |
#include "GnMeshPCH.h"
#include "GnDataStream.h"
GnDataStream::GnDataStream(const GnDataStream::eFormat format, guint32 uiCount) : mFormat(format),
mLocked(false), mUnshaped(true), mNumStream(0), mUsageIndex(0), mpLocalBuffer(NULL), mVertexCount(uiCount)
{
}
GnDataStream::~GnDataStream()
{
// This assertion detects... |
#include <iostream>
#include <Windows.h>
using namespace std;
int cmmmc(int a, int b) {
if (a < b) {
int aux = a;
a = b;
b = aux;
}
int rez = a;
while (rez % b != 0) {
rez += a;
}
return rez;
}
void circuite(int n, int& c1, int& c2, int& c3) {
int l1 = 4 * (n - 1);
int l2 = 4 * (n - 3);
int l3 = ... |
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_numerical_analysis_lab_02.h"
class Numerical_analysis_lab_02 : public QMainWindow
{
Q_OBJECT
public:
Numerical_analysis_lab_02(QWidget *parent = Q_NULLPTR);
private slots:
void plot_test_task();
void plot_main_task();
private:
Ui::Numeric... |
/*
MonitorTab.h
Header file for class MonitorTab
@author: Martin Terneborg
*/
#ifndef MONITORTAB_H
#define MONITORTAB_H
#include <Windows.h>
#include "Monitor.h"
/* Class responsible for handling all the controls of the monitor tabs.
*/
class MonitorTab {
private:
enum m_CONTROL_ID {
ENA... |
#pragma once
#include "Cell.h"
class ShipCell : public Cell
{
public:
ShipCell() : Cell('b') { this->isStricken = false; }
virtual ~ShipCell() {}
ShipCell(size_t Row, size_t Column) : Cell(Row, Column, 'b') { this->isStricken = false; }
ShipCell(const ShipCell& other) : Cell(other) { this->isStricken = other.getIs... |
#include <iostream>
using namespace std;
int primes[10001];
bool isPrime(int num, int numprimes) {
for(int i = 0; i < numprimes; i++) {
if (num % primes[i] == 0) {
return false;
}
}
/*
for (int i = 2; i < num; i++) {
if (num % i == 0) {
return false;
}
}
*/
return true;
}
int main() {
int numpri... |
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2018 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistribution... |
/*
* File: MunecoDeNieve.h
* Author: raul
*
* Created on 21 de enero de 2014, 20:46
*/
#ifndef MUNECODENIEVE_H
#define MUNECODENIEVE_H
#include "Disco.h"
#include "ObjetoCompuesto.h"
#include "freeglut.h"
class MunecoDeNieve : public ObjetoCompuesto {
public:
MunecoDeNieve();
MunecoDeNieve(GLdouble ... |
/*
* Copyright 2016 Freeman Zhang <zhanggyb@gmail.com>
*
* 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 applic... |
#pragma once
#include <vector>
#include "Vec2.h"
namespace Move
{
class PredictionFilter
{
int bufferSize;
std::vector<Vec2> buffer;
int position;
bool initialized;
float currentTime;
/// slope of the prediction function
float m;
/// intercept of the prediction function
float ... |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* buildTree(vector<int>& inorder, vector<int>& postorder) {
return buildTree(in... |
//===-- mess/db-client.hh - DBClient class definition -----------*- C++ -*-===//
//
// ODB Library
// Author: Steven Lariau
//
//===----------------------------------------------------------------------===//
///
/// \file
/// The main class to communicate with a a debugguer
///
//===------------------------------------... |
#ifndef _CheckProcess_H_
#define _CheckProcess_H_
#include "BaseProcess.h"
class CheckProcess :public BaseProcess
{
public:
CheckProcess();
virtual ~CheckProcess();
virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt) ;
virtual int doResponse(CDLSocketHandler* clientH... |
//#include "stdafx.h"
#include <iostream>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include"mat.h"
#include <stdio.h>
#include<stdlib.h>
#include<cmath>
#include "mclmcr.h"
#include"matrix.h"
#include <cuComplex.h>
//#include <opencv2/core/core.hpp>
//#include<opencv2/highgui/highgui.hpp>
//#in... |
#ifndef _XStringEx_h_
#define _XStringEx_h_
#include <string.h>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <unordered_map>
#include <stdint.h>
#include <string>
#include <vector>
#include <list>
#include <... |
/** @file
*****************************************************************************
* @author This file is part of libsnark, developed by SCIPR Lab
* and contributors (see AUTHORS).
* @copyright MIT license (see LICENSE file)
********************************************************************... |
#ifndef __mir_mobile__GameSocket__
#define __mir_mobile__GameSocket__
#include <iostream>
#include "figure/Monomer.h"
class GameSocket {
public:
static void attack(Monomer* one, Monomer* two, int skillNumber);
static void attackGroup(Monomer* one, vector<Monomer*> two, int skillNumber);
... |
#include "airport.h"
vector<taxiway*> mainPath;
taxiway *rwCommon;
vector<taxiway*> toGate;
vector<taxiway*> fromGate;
//
simQueue sq;
void configure_taxiways_and_runways(){
int mainPathID = 0;
// landing runway and right taxiway
mainPath.push_back(new taxiway(RW1X1,RW1Y1,RW1X... |
#include "stdafx.h"
#include "renderer.h"
#include "hgesprite.h"
#include "hgeFont.h"
#include "sprite.h"
FontRenderMessage::FontRenderMessage()
:myText("")
,myPosition( Vector2f(0.f,0.f) )
,myAlignment( -1 )
{}
FontRenderMessage::FontRenderMessage( std::string aText, Vector2f aPosition, int anAlignment )
:myText( aT... |
// Copyright 2018 Benjamin Bader
//
// 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 agree... |
#include <iostream>
#include <SFML/Graphics.hpp>
#include "lib/mnist.h"
#include "lib/NeuralNetwork.h"
void to_arma(const cv::Mat &src, NeuralNetwork::TrainningSample *dst)
{
for (size_t i = 0; i < src.rows; i++)
{
for (size_t j = 0; j < src.cols; j++)
{
dst->input[i * src.cols + j... |
// Created on: 1993-01-11
// Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
// Copyright (c) 1993-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... |
#include <stdio.h>
#include <string.h>
#include "NvRenderDebug.h"
#include "NvPhysXFramework.h"
#include "PhysicsDOMDef.h"
#define USE_DEBUG 0
#define TEST_IMPORT_XML 0
#define TEST_PHYSICS_DOM 0
#define TEST_SOME_OF_EVERYTHING 0
#define BOX_SIZE 1
class SimpleHelloWorld : public NV_PHYSX_FRAMEWORK::PhysXFramework::... |
#include"conio.h"
#include"stdio.h"
void main(void){
int A[5];
clrscr();
for(int i=0; i<=4; i++){
printf("Enter values: ");
scanf("%d",&A[i]);
}
printf("\n\n");
/* for(int j=0; j<=4; j++)
printf("%d\n",A[j]);
*/
for(int k=0; k<=4; k++){
if(A[k]==0)
printf("Zero\n");
... |
#include "dtw.h"
#include "DTWRecognizer.h"
#include "GestureFile.h"
#include <functional>
#include "OgreVector3.h"
#include "Debug.h"
using namespace std;
float ogreVectorLength(Ogre::Vector3 v)
{
return v.squaredLength();
}
void DTWRecognizer::registerRecognition(Recognition *recog)
{
mRecognitionArray.... |
#include "GamePCH.h"
#include "GSelectStageScene.h"
#include "GSelectStageBGLayer.h"
#include "GSelectStageUILayer.h"
#include "GnIListPageCtrl.h"
#include "GMainGameEnvironment.h"
GSelectStageScene::GSelectStageScene() : mInputEvent( this, &GSelectStageScene::InputEvent )
{
}
GSelectStageScene::~GSelectSt... |
#include "ConstantLengthPatternsOnTextHashMatcher.h"
DefaultConstantLengthPatternsOnTextHashMatcher::DefaultConstantLengthPatternsOnTextHashMatcher(uint32_t patternLength)
: patternLength(patternLength), hf(patternLength, 32) {
}
DefaultConstantLengthPatternsOnTextHashMatcher::~DefaultConstantLengthPatternsO... |
#include <iostream>
#include <iomanip>
using namespace std;
int n, m, c, i, j;
const unsigned int nmax = 10;
const unsigned int mmax = 10;
int a[nmax][mmax];
int at[nmax][mmax];
int main() {
cout<<"Input matrix n and m (<10)\n";
cin >> n;
cin >> m;
for (int i = 0; i < n; i++) {
for (int j... |
/*
* Copyright [2017] <Bonn-Rhein-Sieg University>
*
* Author: Torsten Jandt
*
*/
#pragma once
#include <mir_planner_executor/actions/unstage/base_unstage_action.h>
#include <actionlib/client/simple_action_client.h>
#include <mir_yb_action_msgs/UnStageObjectAction.h>
class UnstageAction : public Ba... |
/****************************************************************************
** Meta object code from reading C++ file 'coupleediteur.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
*******************************************************... |
#include "egl.h"
int video_call_egl_eglSwapInterval(uint32_t cParms, VBOXHGCMSVCPARM paParms[])
{
printf("Function called: eglSwapInterval\n");
fflush(stdout);
ABORT("Aborted function called: eglSwapInterval");
HOST_WRITE_QUEUE();
}
int video_call_egl_eglReleaseTexImage(uint32_t cParms, VBOXHGCMSVCPARM paParms[])... |
#pragma once
#include <complex>
#include <execution>
#include <filesystem>
#include <fstream>
namespace ugsdr {
enum class FileType {
Iq_8_plus_8 = 0
};
template <typename UnderlyingType>
class SignalParametersBase {
private:
std::filesystem::path signal_file_path;
FileType file_type = FileType::Iq_8_plus... |
#include <cstdio>
#include <algorithm>
#include <iostream>
const int N = 30000333;
int n, m, k, a, b, c, A[N], B[N], C[N];
int main() {
freopen("minima.in", "r", stdin);
freopen("minima.out", "w", stdout);
scanf("%d%d%d", &n, &m, &k);
scanf("%d%d%d", &a, &b, &c);
for (int i = 0; i < k; ++i) {
scanf("%d", &A[... |
#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 "huobi_futures/linear_swap/ws/WebSocketOp.hpp"
#include "huobi_futures/linear_swap/ws/response/market/SubKLineResponse.hpp"
typedef huobi_futures::linear_swap::ws::response_market::SubKLineResponse SubKLineResponse;
#include "huobi_futures/linear_swap/ws/response/market/ReqKLineResponse.hpp"
typedef huobi_f... |
/* XMRig
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* C... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
#ifndef QUEST_H
#define QUEST_H
#include <QDialog>
#include <QFile>
#include <QtWidgets>
#include <QMessageBox>
#include <QVector>
#include "finalwindow.h"
#define maxQuestion 3
namespace Ui {
class Quest;
}
class Quest : public QDialog
{
Q_OBJECT
public:
explicit Quest(QWidget *parent = 0, QString dat... |
#pragma once
#include "persona.h"
#include <string>
using std::string;
class Forense: public Persona{
string fechai, horario;
public:
//Forense(string, string);
Forense(string, string, string, int, int, string, string, string);
Forense(const Forense&);
virtual string toString()const;
string getFechai()const;
s... |
void blocked_reorder_naive(
float* src,
float* dst,
uint32_t* src_block_starts,
uint32_t* dst_block_starts,
uint32_t* block_sizes,
uint32_t num_blocks);
void blocked_reorder_memcpy(
float* src,
float* dst,
uint32_t* src_block_starts,
uint32_t* dst_block_starts,
uint32_t* b... |
#ifndef SQLTEST_H
#define SQLTEST_H
#include <QSqlDriver>
#include <QSqlDatabase>
class MySqlTest : public QObject
{
Q_OBJECT
public:
MySqlTest();
~MySqlTest() {}
bool get_user(QString username);
private:
QSqlDatabase * db;
};
#endif // SQLTEST_H
|
#pragma once
#include "System/engine.h"
#include "System/mainengine.h"
#include "System/parallel_for.h"
#include "System/material.h"
#include "System/vector-all.h"
#include "System/time.h"
#include "System/Shape/nsphere.h"
#include "System/Shape/polytope.h"
#include "System/Shape/shapeinfo.h"
#include "System/type_id.... |
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#define MAXLINE 1024
#define NONE ... |
#ifndef __DIRECTED_EDGE_H
#define __DIRECTED_EDGE_H
#include <vector>
using namespace std;
class DirectedEdge
{
private:
int v; // 边的起点
int w; // 边的终点
double weight; // 边的权重
public:
DirectedEdge(int v, int w,double weight)
{
this->v= v;
this->w = w;
this->weight = weight;
... |
#include "BasicShader.h"
BasicShader::BasicShader()
{
addVertexShaderFromFile("basicVertex.glsl");
addFragmentShaderFromFile("basicFragment.glsl");
setAttributeLocation("position", 0);
setAttributeLocation("texCoord", 1);
compileShader();
addUniform("sampler");
addUniform("model");
addUniform("view");
addU... |
#include <iberbar/RHI/StateBlock.h>
iberbar::RHI::CStateBlock::CStateBlock()
: IResource( UResourceType::StateBlock )
{
}
|
/*
* Copyright (C) 2011 Thomas Kemmer <tkemmer@computer.org>
*
* http://code.google.com/p/stlencoders/
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, inclu... |
#include "stdafx.h"
#include "../GameData.h"
#include "DungeonData.h"
void DungeonData::SetGameData(PyFile files, PyFile eneFile, int monsterAI[6], MonsterID monids[6], int DunNumber) {
m_files = files;
m_enemyFiles = eneFile;
for (int i = 0; i < 6; i++) {
m_monai[i] = monsterAI[i];
m_ids[i] = monids[i];
}
m_... |
#include <iostream>
#include <vector>
using namespace std;
int findKthMulti(size_t k){
vector<int> v(1, 1);
size_t threeIndex = 0;
size_t fiveIndex = 0;
size_t sevenIndex = 0;
while(v.size() < k){
int threeNext = v[threeIndex] * 3;
int fiveNext = v[fiveIndex] * 5;
int sevenN... |
//====================================================================================
// @Title: CARTESIAN
//------------------------------------------------------------------------------------
// @Location: /prolix/common/include/cCartesian.h
// @Author: Kevin Chen
// @Rights: Copyright(c) 2011 Vi... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2012 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"
#if defined(VEGA_USE_ASM) && defined(ARCHITECTU... |
#include <string>
/********************************************************************
Constants
********************************************************************/
const int START_ASM_TABLE = 0x87CC;
const int START_INIT_TABLE = 0x837D;
const int START_1656_TABLE = 0x3F46C;
const int START_1662_TABLE = 0x3F535;... |
#include "cactus.h"
#include "timerlist.h"
#include "dino.h"
#include "game.h"
#include "gameover.h"
#include <QTimer>
#include <QObject>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include <QGraphicsItem>
#include <QList>
extern Game *game;
Cactus::Cactus(double moveSpeed, QString path, int yPos, int ... |
#ifndef _DX11_SHADER_H_
#define _DX11_SHADER_H_
#include "d3d11.h"
#include "Shader.h"
#include "DX11InputLayout.h"
namespace HW{
class DX11InputLayout;
class DX11Shader : public Shader{
public:
DX11Shader(ShaderType type);
DX11Shader(ShaderType type, const String& name);
virtual ~DX11Shader();
virtual boo... |
#pragma once
#include "buffer.hpp"
namespace leaves { namespace pipeline
{
template <>
struct buffer_traits<index_buffer>
{
static constexpr object_type type() noexcept
{
return object_type::index_buffer;
}
};
class index_buffer : public buffer<index_buffer>
{
public:
using base_type = buffer<ind... |
#pragma GCC optimize("Ofast")
#include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <iterator>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
void abhisheknaiidu()... |
#ifndef SCENE_H
#define SCENE_H
#include "cpvs.h"
#include "BoundingVolumes.h"
struct Material {
vec3 diffuseColor;
int shininess;
Material() : diffuseColor(0), shininess(0) { }
inline bool operator==(const Material& rhs) const {
return (diffuseColor == rhs.diffuseColor) && (shininess == rhs.shininess);
}
... |
#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H
#include <vector>
#include <SFML\System\Vector2.hpp>
enum keyword;
namespace sf
{
class Time;
class Shape;
}
class GameObject
{
public:
GameObject(keyword aType, sf::Vector2f position, sf::Vector2f size, float scale);
~GameObject();
void update(sf::Time& time);
void ... |
/* XMRig
* Copyright (c) 2000-2002 Alan Cox <alan@redhat.com>
* Copyright (c) 2005-2020 Jean Delvare <jdelvare@suse.de>
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free softwa... |
#pragma once
namespace oglml
{
class PostProcessor;
}
namespace breakout
{
class APostEffectState;
class LinearAllocator;
class PostEffectsFabric
{
using EnumStateName = int;
public:
static APostEffectState* GeneratePostEffect(LinearAllocator*, EnumStateName, oglml::PostProcessor*);
};
} |
#pragma once
#include <wx/wx.h>
class CMainFrame;
class MyApp : public wxApp
{
public:
MyApp();
virtual ~MyApp();
virtual bool OnInit();
private:
CMainFrame * m_frame;
};
|
#include <iostream>
#include <vector>
#include <sstream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#define PORT 8080
using namespace std;
void welcomeMessage();
void postScreen();
void viewScreen();
// void clearC... |
#include <iostream>
#include <bitset>
#include "huffman_tree.h"
using namespace std;
int main() {
// ifstream ifs;
// ifs.open("textinput");
// string source;
// source.assign((istreambuf_iterator<char>(ifs.rdbuf())), istreambuf_iterator<char>());
HuffmanTree h("abacaba");
writeBinary(encodeTree(h), "tree");
... |
#include<stdio.h> //printf
#include<string.h> //memset
#include<stdlib.h> //exit(0);
#include<arpa/inet.h>
#include<sys/socket.h>
#include <unistd.h>
#include <iostream>
#include <vector>
#include<cmath>
#include <algorithm>
#include <unistd.h>
using namespace std;
#define PORT 32000 //The port on which to listen ... |
// Copyright (c) 2018 Mozart Alexander Louis. All rights reserved.
// Class
#include "action_utils.hxx"
Action* ActionUtils::fadeIn(const float delay, const float duration) {
ValueMap props;
props.emplace(__DELAY__, delay);
props.emplace(__DURATION__, duration);
return fadeInInternal(props);
}
Action* Action... |
//算法:DP/排序/贪心
//先跑一遍01背包
//以题目得分为权值,剩余时间为容量.
//跑完后,
//循环找到能够使 分数到达k 所花费的最小时间
//再将刷题时间升序排列,
//找到在 剩剩余时间 内能完成的个数即可
#include<cstdio>
#include<algorithm>
using namespace std;
int n,m,k,r1;
int r2,ans;
int t1[15],t2[15],s[15];
int f[150];
int main()
{
scanf("%d%d%d%d",&n,&m,&k,&r1);
for(int i=1;i<=n;i... |
// -------------------------------------------------------------------------------
//
// DXライブラリアーカイバ
//
// Creator : 山田 巧
// Creation Date : 2003/09/11
// Version : 1.02
//
// -------------------------------------------------------------------------------
// 多重インクルード防止用定義
#ifndef __DXARCHIVE_VER6
#define __DX... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2005-2010 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser.
** It may not be distributed under any circumstances.
**
** Peter Krefting
*/
#include "core/pch.h"
#include "modules/pref... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
*
* Copyright (C) 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/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.