text stringlengths 8 6.88M |
|---|
#include "Linklist.h"
template<class T>
Linklist<T>::Linklist(){
head = NULL;
tail = NULL;
count = 0;
}
template<class T>
Linklist<T>::~Linklist(){
Node<T> *temp;
temp = head;
while(head != NULL){
head = head->getNext();
delete temp;
temp = head;
}
}
template<class T>
boo... |
#include <iostream>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <string>
#include <queue>
#include <deque>
#include <vector>
#include <regex>
#define MAX 1005
#define INF 987654321
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
//97, 122
// regex reg1("^([a-z]{3... |
//
// Created by Jared on 5/27/2015.
//
#ifndef PIXXY_TOOLS_H
#define PIXXY_TOOLS_H
#include <main.h>
#include <stdio.h>
static int exec(const char* buffer) {
#if OS == OS_NIX
char buff[BUFSIZ];
FILE *fp = popen(buffer, "r");
while ( fgets( buff, BUFSIZ, fp ) != NULL ) {
printf(buff);
}
... |
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok?"Yes":"No");
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> si;
ty... |
#include "mbed.h"
#include "math.h"
#include "../MPU6050/MPU6050.h"
#include "../MPU6050/Kalman.h"
#include "../HMC5883L/HMC5883L.h"
DigitalOut myled(LED1);
Serial pc(USBTX, USBRX);
namespace Peripherals
{
MPU6050 mpu;
HMC5883L comp;
}
int main()
{
/* Debugging Values */
float x, y, z;
float gx, gy, gz;
/*... |
#pragma once
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
#endif
#include <cstdint>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <iterator>
#include <regex> |
#define ASIO_STANDALONE
#include "hermes_detail/NetworkSocket.hh"
#include <iostream>
#include "hermes_detail/NetworkIO.hh"
using asio::ip::tcp;
hermes::NetworkSocket::NetworkSocket(NetworkIO io,
asio::ip::tcp::resolver::iterator endpoint)
: m_io(io), m_socket(m_io.internals-... |
#ifndef Mission_hpp
#define Mission_hpp
#include <string>
#include "Robot.hpp"
class Mission {
public:
virtual void run() = 0;
protected:
Mission(Robot * robot_ptr);
std::string mission_name;
Robot *robot;
};
#endif // Mission_hpp
|
#include "ClockAPI.h"
//#include "TimeUtils.h"
//#include "PathUtils.h"
// -- MAIN LOGIC BEGIN
//RTC_Interface rtcClock_;
//BoardPathMapper pathMapper_;
//HourPosMapper hourPosMapper_;
Gantry gantry_;
HourHand hourHand_;
void setup()
{
initClockPins();
// rtcClock_.init(globTime_);
//Serial.begin(9600... |
/*
* 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 FLUXSTREAM_LOOKAHEADSTREAM_H
#define FLUXSTREAM_LOOKAHEADSTREAM_H
#include <flux/Stream>
namespace flux {
namespace stream {
/** \brief Look-a-head stream... |
/*
* JointTask.h
*
* This class creates a joint controller for a robotic manipulator using dynamic decoupling and an underlying PID compensator.
* It requires a robot model parsed from a urdf file to a Sai2Model object.
*
* Author: Mikael Jorda
*/
#ifndef SAI2_PRIMITIVES_JOINT_TASK_H_
#define SAI... |
#include<cstdio>
#include<algorithm>
#include<iostream>
#include<string.h>
#include<cmath>
using namespace std;
struct nodes
{
long long value;//面额
long long num; //个数
}node[25];
long long res;
bool cmp(struct nodes a,struct nodes b)
{
return a.value>b.value;
}
int main()
{
int n,c;
scanf("%d",&n);... |
#include "content\Singularity.Content.h"
namespace Singularity
{
namespace Content
{
class ContentManager
{
private:
public:
};
}
} |
#include "setup.h"
SETUP::SETUP(std::ifstream *inputCine, const CINEFILEHEADER &cineheader) {
bitreader br(inputCine);
br.seekToByte(cineheader.getOffSetup());
//Look for "ST" mark, marking start of non obsolete setup
int count = 0;
BYTE first, second;
first = br.readBYTE();
second = br.readBYTE();
whi... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "./UI_CrossHair.h"
#include "Components/CanvasPanelSlot.h"
#include "Components/Image.h"
void UUI_CrossHair::NativeTick(const FGeometry& MyGeometry, float InDeltaTime)
{
// Set Color
TopCH->SetBrushTintColor(CrossHairColor);
... |
/*
EMRAH YILDIRIM 111044056
*/
#ifndef SORTED_CONTAINER_H
#define SORTED_CONTAINER_H
#include<iostream>
#include"Container.cpp"
using namespace std;
namespace HW08
{
template<class T>
class SortedContainer : public Container<T>
{
public:
SortedContainer();
virtual ~SortedContainer();
virtual int size() ... |
#ifndef ADMINWINDOW_H
#define ADMINWINDOW_H
#include <QObject>
#include <QWidget>
#include <QtWidgets>
#include <QtSql>
#include <QBoxLayout>
#include <QGroupBox>
class AdminWindow : public QMainWindow
{
Q_OBJECT
public:
AdminWindow(QString admin_id);
private:
QWidget *area;
QLabel *login;
QPush... |
/* printer_test.cpp -*- C++ -*-
Rémi Attab (remi.attab@gmail.com), 23 Apr 2015
FreeBSD-style copyright and disclaimer apply
*/
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#define REFLECT_USE_EXCEPTIONS 1
#include "printer_utils.h"
#include "reflect.h"
#include "utils/json... |
#ifndef GALES_PRINT_TOOLS_HPP
#define GALES_PRINT_TOOLS_HPP
#include <iostream>
#include <iomanip>
#include <vector>
#include <iterator>
#include <sstream>
#include <fstream>
#include <mpi.h>
#include <initializer_list>
namespace GALES{
///------------------------------------------------------------------... |
/*
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... |
#include "stock.h"
#include "coach.h"
#include<iostream>
Coach::Coach(){
Stock(28000);
_art = { // Coach
" ",
" ______________",
" | [] [] [] []|",
" | ",
"='OO--------OO'",
"###############",
};
};
void Coach::add_passengers(int passengers){_passengers=passengers;}
double Coa... |
/*Given a chess board of order N x M and source points (s1, s2) and destination points (d1, d2). The task to find minimum number of moves required by the Knight to go to the destination cell.
Input:
The first line of input contains an integer T denoting the number of testcases. Then T test cases follow. Each test case... |
/*
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... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <ATen/ATen.h>
#include <ATen/core/op_registration/op_registration.h>
#include <fbgemm_gpu/spar... |
//비트와이즈 연산 -> 비트를 기준으로 연산 -> 기계의 근본에 해당하는 연산(가장 빠르다)
// Bitwise or -> |
// Bitwise and -> &
// Shift -> <<, >>
//연산 속도 (빠른순으로) : 더하기 + 빼기 - 곱하기 * 나누기 /
// : 정수연산 실수연산
#include <cstdio>
void exam1(int params) {
int category1 = 1; // 1
int category2 = 1 << 1; // 2
int category3 = 1 << 2; // 4
if... |
#include "../commonunion.h"
#include <iostream>
COMMONUNION(FooUnion,,foo,bar,baz)
struct A {
int i;
constexpr A(int initi) : i(initi) {}
constexpr int foo(int a) const { return i+a; }
constexpr int bar() const { return i*2; }
void baz() const { std::cout << bar() << std::endl; }
};
struct B {
i... |
#include "osp_process.hpp"
// set/get params code for class OspProcess
/**
* @brief Updates parameters
* Called by OspParse.
* @param group The group (beamforming, freping, etc) that has updates
* @param channels 0=left, 1=right, 2=both
* @return string "success" or "FAILED"
*/
std::string OspProcess::set_param... |
#ifndef __COMMON_H__
#define __COMMON_H__
#include <cassert>
#include <iostream>
#include <cudnn.h>
#include <cstring>
#include <cuda_runtime.h>
#define CHECK(status) \
{ \
if (status != 0) \
{ ... |
#ifndef __MSJEXHND_H__
#define __MSJEXHND_H__
#pragma warning(disable : 4786)
#include <stack>
#include <CString>
//using namespace std;
class GlobalExceptionHandler
{
public:
GlobalExceptionHandler( );
~GlobalExceptionHandler( );
static void push(CString functionName);
... |
#include "stdafx.h"
#include "Utilities.h"
void Utilities::readDataFile(string fileName, vector<Point2D> * data) {
ifstream fin(fileName);
while (!fin.eof()) {
Point2D p;
fin >> p.position[0] >> p.position[1];
data->push_back(p);
}
}
void Utilities::getPoints(GLGeometryViewer * viewer, vector<Point2D> * poi... |
#include<iostream>
using namespace std;
int location_of_zero = 6;
void swap_with_zero(int* array, int len, int n){
swap(array[n],array[location_of_zero]);
location_of_zero = n;
}
class Solution {
public:
/**
* 调用方法swap_with_zero来对array进行排序
*/
void sort(int* array, int len) {
for(int i... |
#pragma once
#include "AsmOperand.h"
#include "AsmOperandParser.h"
#include "AsmLexicalParser.h"
using namespace std;
unordered_map<string, OperandParser::OperandGenerator> OperandParser::generators;
void OperandParser::PrepareGeneratorsTable() {
generators["r"] = [](TokenReadStream tokens)->Operand{
return Operan... |
#pragma once
#include "../EngineLayer/IScan.h"
#include <string>
#include <unordered_map>
#include <vector>
#include <limits>
#include <optional>
using namespace EngineLayer;
using namespace EngineLayer::FdrAnalysis;
using namespace EngineLayer::ModificationAnalysis;
using namespace MassSpectrometry;
us... |
#ifndef BSCHEDULER_PPL_PARALLEL_PIPELINE_HH
#define BSCHEDULER_PPL_PARALLEL_PIPELINE_HH
#include "basic_pipeline.hh"
namespace bsc {
template<class T>
class parallel_pipeline: public basic_pipeline<T> {
public:
typedef basic_pipeline<T> base_pipeline;
using typename base_pipeline::kernel_type;
using typena... |
#include "test_util.h"
void TEST_RM_14(const string &tableName, vector<RID> &rids)
{
// Functions Tested
// 1. reorganize page
// 2. delete tuples
// 3. delete table
cout << "****In Test case 14****" << endl;
int numTuples = 2000;
readRIDsFromDisk(rids, numTuples);
RC rc;
rc = rm->re... |
//~ author : Sumit Prajapati
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
// #define int long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb ... |
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#include "proto/recipe_group.h"
#include "proto/sprite.h"
using namespace jactorio;
proto::RecipeGroup* proto::RecipeGroup::SetSprite(Sprite* sprite) {
this->sprite = sprite;
return this;
}
void proto::Recip... |
/*
ID: zrh331
PROG: humble
LANG: C++
*/
#include <iostream>
#include <stdio.h>
#include <map>
#include <set>
#include <string.h>
#include <algorithm>
#include <assert.h>
using namespace std;
#define maxint 2147400000
int n, k, a[110], cnt=-1, r;
set<long long int> f;
int main () {
... |
#include <glut/glut.h>
class Camera {
Vector position;
Vector lookAt;
Vector up;
Vector dir;
public:
Vector get_position() { return position; }
Vector get_lookAt() { return lookAt; }
Vector get_up() { return up; }
Vector get_dir() { return dir; }
void set_position(Vector);
void set_lookAt(Vector... |
/* 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 "system/pr2-system.h"
#include <stdio.h>
#include <boost/preprocessor/iteration/local.hpp>
extern "C" {
#include "pr2MPC.h"
pr2MPC_FLOAT **H, **f, **lb, **ub, **z, *c, *A, *b;
}
const int T = TIMESTEPS;
const double INFTY = 1e10;
namespace cfg {
const double alpha_init = .01; // .01
const double alpha_gai... |
#ifndef LOGIC_HPP
#define LOGIC_HPP
#include <iostream>
#include "user_interface.hpp"
#include "imagem_ppm.hpp"
#include "imagem_pgm.hpp"
#include "imagem.hpp"
class Logic : public UserInterface {
private:
int desejaContinuarInt=1;
int desejaSairInt = 0;
public:
Logic();
~Logic();
void aplicacaoPGM();
void apli... |
#ifndef OPTICALFLOW_SLAM_ALGORITHM_BASE_COMPONENT_CAMERA_CONFIG_H_
#define OPTICALFLOW_SLAM_ALGORITHM_BASE_COMPONENT_CAMERA_CONFIG_H_
#include "algorithm/common_include.h"
namespace OpticalFlow_SLAM_algorithm_opticalflow_slam {
/**
* @brief Camera config params
* @author snowden
* @date 2021-07-16
* @version 1.0... |
#pragma once
#include <string>
class Zombie
{
private:
int health = 100;
int attack = 20;
public:
std::string name;
void takeDamage(int damage);
void fight();
int getHealth();
int getDamage();
bool canHit();
}; |
#include <QApplication>
#include <QMainWindow>
#include <iostream>
#include "mainwindow.h"
int main(int argc, char *argv[]){
QApplication a (argc, argv);
MainWindow gui;
gui.show();
return a.exec();
}
|
#ifndef _JERARQUIA
#define _JERARQUIA
#include "3Dmodel.h"
class Jerarquia : public Modelo{
private:
vector <Modelo> figuras;
int numero_figuras;
double angle_munieca = 0;
double angle_dedos = 0;
double angle_brazo = 0;
double angle_dedosb = 0;
double trans = 0;
double tipo = 0;
doub... |
/*
*****************************************************************************
* ___ _ _ _ _
* / _ \ __ _| |_| |__(_) |_ ___
* | (_) / _` | / / '_ \ | _(_-<
* \___/\__,_|_\_\_.__/_|\__/__/
* Copyright ... |
/*
* main.cpp
*
* Created on: Feb 3, 2017
* Author: kushn_du3a95r
*/
//============================================================================
// Name : sudoku.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//==========... |
#include "NodoBinario.h"
template< class T >
NodoBinario<T>::NodoBinario() {
this->hijoIzq = NULL;
this->hijoDer = NULL;
}
template< class T >
NodoBinario<T>::NodoBinario(T val) {
this->hijoIzq = NULL;
this->hijoDer = NULL;
this->dato = val;
}
template< class T >
NodoBinario<T>::~NodoBinario(... |
#include "Utilities/Definitions.h"
#include "Utilities/CodeTimer.h"
#include "Utilities/SpaceMappedDataPersistenceHandler.h"
#include "Utilities/MappedFileDataPersistenceHandler.h"
#include "MagneticFieldComponents/MagneticFieldFactory.h"
#include <boost/filesystem.hpp>
using storage = Utilities::_storage3D<float>... |
/*
* Copyright (C) 2012 Marcin Kościelnicki <koriakin@0x04.net>
* All Rights Reserved.
*
* 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, including without limitatio... |
//
// c2_anagram: combine part
// bruk: # ./sign < words.txt | sort | ./combine
#include <iostream>
#include <sstream>
using namespace std;
int main()
{
string line;
string prev_sign;
int linenum = 0; // For å ikke printe første blank line
while ( getline(cin, line)) // Les inn en linje med to or... |
#ifndef _HS_SFM_SFM_FILE_IO_TRACKS_LOADER_HPP_
#define _HS_SFM_SFM_FILE_IO_TRACKS_LOADER_HPP_
#include <string>
#include <map>
#include <fstream>
#include "hs_sfm/sfm_utility/match_type.hpp"
namespace hs
{
namespace sfm
{
namespace fileio
{
struct TracksLoader
{
typedef hs::sfm::TrackContainer TrackContainer;
... |
/*
* mallocTest.cpp
*
* Created on: March 20, 2016
* Author: myan
*/
#include <stdlib.h>
#include <string.h>
#include <list>
#include <iostream>
int main(int argc, char** argv)
{
//allocate small blocks
const int nblks = 10;
char* pa[nblks];
for (int i = 0; i < nblks; i++) {
pa[i] = (char*)m... |
#ifndef MODEL_H
#define MODEL_H
#include <cstdlib>
#include <ctime>
#include <string>
#include "state.h"
#include "utils_vector.h"
#include "utils_linked.h"
#include "utils_strandsort.h"
class logic_model
{
public:
logic_model();
void Clear();
void SetArr();
void SetLinked();
void Generate(int cou... |
/*
Name: Mohit Kishorbhai Sheladiya
Student ID: 117979203
Student Email: mksheladiya@myseneca.ca
Date: 25/04/01
*/
// I have done all the coding by myself and only copied the code that my professor provided to complete my workshops and assignments.
#ifndef SDDS_SEARCHNLIST_H_
#define SDDS_SEARCHN... |
/*
SjASMPlus Z80 Cross Compiler - modified - error/warning module
Copyright (c) 2006 Sjoerd Mastijn (original SW)
Copyright (c) 2020 Peter Ped Helcmanovsky (error/warning module)
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any ... |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef set<int> si;
typedef map<string, int> msi;
typedef long long ll;
const ll INF = 1e18L + 1;
doubl... |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++)
#define vi vector<int>
#define vl vector<long>
#define vvi vector<vector<int>>
#define vvl vector<vector<long>>
#define pint pair<int, int>
#define plong pair<long, long>
int main() {
int N, count = 0... |
#include <iostream>
#include <fstream>
#include <cstring>
#include <string>
#include <iomanip>
using namespace std;
struct PERSON
{
char name[20];
float balance;
};
int getN();
void readingFile(int N, PERSON P[]);
void displayArray(int N, PERSON P[]);
void findRichest(int N, PERSON P[]);
void deposit(string custN... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "base.h"
WINRT_WARNING_PUSH
#include "internal/Windows.Foundation.3.h"
#include "internal/Windows.Graphics.Display.3.h"
#include "internal/Windows.Foundation.Collections.3.h"
#include... |
#include "HashFactory.h"
void HashFactory::addInfo(string _info)
{
info.push_back(_info);
return ;
}
void HashFactory::printInfo()
{
int start = 1;
for(auto i : info)
{
cout<<start++<<".Using "<<i<<" to ensure the value of hash."<<endl;
}
}
unsigned long HashFactory::Ch... |
/*
* Copyright:
* Daniel D. Neilson (ddneilson@ieee.org)
* University of Saskatchewan
* All rights reserved
*
* Permission granted to use for use in assignments and
* projects for CMPT 485 & CMPT 829 at the University
* of Saskatchewan.
*/
/*
* Class definition for a Shader
*
* This is the base class of a... |
#ifndef _GOLDBOARD_H_
#define _GOLDBOARD_H_
#include "i2c_device.h"
#include "pcf8574.h"
extern "C"{
#include "pwm.h"
}
#include "uart.h"
class goldboard{
public:
goldboard(struct avr_t* avr);
~goldboard();
void add_i2c_device(i2c_device &device);
int run(int ms);
void set_state(Json &data);
Json get_stat... |
/*
*
*/
#ifndef __PLAYER_H
#define __PLAYER_H
#include "object.h"
#include "terrain.h"
#include "audio.h"
#include "h.h"
class Player: public Object
{
private:
// CAudioSystem *audioSys;
// CAudio *rocketSound;
// void SetAudioSystem(CAudioSystem *aSys) { audioSys = aSys; }
void emit_rocket();
... |
#ifndef __PlayerObject_H__
#define __PlayerObject_H__
const float PLAYER_DEFAULT_FORWARD_SPEED = 20.0f;
const float PLAYER_DEFAULT_BACKWARD_SPEED = -10.0f;
const float PLAYER_DEFAULT_UP_SPEED = 30.0f;
const int PLAYER_DEFAULT_HEALTH = 100;
const unsigned int PLAYER_DEFAULT_NUMBER_PROJECTILES = 20;
const int PLAYER_CO... |
#pragma once
#include <DirectXCollision.h>
#include <vector>
namespace GraphicsEngine
{
class Ray
{
public:
Ray(DirectX::FXMVECTOR origin, DirectX::FXMVECTOR direction);
Ray(const DirectX::XMFLOAT3& origin, const DirectX::XMFLOAT3& direction);
template<typename VertexType, typename IndexType>
bool Inters... |
#include "lib_oc.h"
#include <algorithm>
#include <fstream>
#include <random>
#include <cmath>
#define _USE_MATH_DEFINES
double magnitude_vector(const std::vector<double> vector) {
double res = 0.0;
for(auto v: vector) {
res += pow(v,2);
}
return sqrt(res);
}
double sigmoid(const double x) {
return ... |
#ifndef PIEZA_H
#define PIEZA_H
#include <string>
#include <sstream>
#include <graphics.h>
//Para determinar una pieza se necesitan solo dos numero enteros que sean de 1 a 6, y van a ser guardados en idColor y en idFigura.
//La variable auxColor es la que le da el color a la figura y se define automaticamente segun el... |
// This file has been generated by Py++.
#ifndef ScrolledItemListBase_hpp__pyplusplus_wrapper
#define ScrolledItemListBase_hpp__pyplusplus_wrapper
void register_ScrolledItemListBase_class();
#endif//ScrolledItemListBase_hpp__pyplusplus_wrapper
|
/**
* @file NfcEmuFileDevice.cpp
* @author Lukas Schuller
* @date Thu Oct 24 09:37:08 2013
*
* @brief
*
*/
#include "NfcEmuFileDevice.h"
#include "Util.h"
#include <vector>
#include "Debug.h"
using namespace std;
using namespace boost::asio;
namespace NfcEmu {
FileDevice::FileDevice(boost::as... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Fixed.hpp :+: :+: :+: ... |
//
// Created by Administrator on 2020/7/5.
//
#include <vector>
#include <list>
using namespace std;
enum class myType {
_today,
_tomorrow
};
int main() {
vector<list<int> > hello;
//int x = myType::_today; //98标准是准许的,11标准是不准许的。
//myType y = 1; //98标准是准许的,... |
#pragma once
void mainpart(void);
|
#include<stdio.h>
#include<stdlib.h>
#include<limits.h>
int rodCutting(int [],int);
int max(int ,int);
int main(void){
int arr[]={1, 5, 6, 7, 3, 16, 16};
int size=sizeof(arr)/sizeof(arr[0]);
printf("%d",rodCutting(arr,size));
return 0;
}
int rodCutting(int price[],int n){
int val[n+1];
val[0]=0;
int i,j... |
#ifndef __IPARSOR_H_
#define __IPARSOR_H_
#include "CommonHeader.h"
class CUser;
/*
parsor클래스
패킷 파싱과 처리를 담당하는 클래스는 이 클래스를 상속받는다.
예) 존 클래스
*/
class IParsor
{
public :
IParsor() = default;
virtual ~IParsor() = default;
public:
virtual void ParsingProcess(PACKET* _packet, CUser* _user) = 0;
};
/*
파서클래스를 가... |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
int t;cin>>t;
for(int a=1;a<=t;a++)
{
string x;cin>>x;
int len=x.size();
ll ara[len+2];memset(ara,0,sizeof(ara));
for(ll i=1;i<=8;i++)
{
cin>>x;
for(ll j=1;j<len-1... |
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
for(int k = 1; k <= t; k++){
int n;
cin >> n;
int a[n][n];
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> a[i][j];
}
}
int trace =... |
#include "ClassicSearchEngine.h"
#include "../PrecursorSearchModes/MassDiffAcceptor.h"
#include "../PeptideSpectralMatch.h"
#include "../Ms2ScanWithSpecificMass.h"
#include "../CommonParameters.h"
#include "../MetaMorpheusEngineResults.h"
#include "../ScanWithIndexAndNotchInfo.h"
#include "../GlobalVariables.h"
#inclu... |
/*
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... |
#include "stdafx.h"
#include "WSquare.h"
IMPLEMENT_SERIAL(WSquare, CObject, 1)//实现类WSquare的序列化,指定版本为1
WSquare::WSquare()
{
Type = (ElementType)0;//图元类型
Width = 100;//默认图形宽度为100
}
WSquare::WSquare(int x, int y, int w)
{
Type = (ElementType)0;//图元类型
OrgX = x;
OrgY = y;
Width = w;
}
void WSquare::Draw(CDC* pDC)
{... |
#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;
int gcd(int a,int b)
{
if(b==0)
return a;
else
return gcd(b, a%b);
}
void rotate(int arr[],int n,int k)
{
for(int i=0;i<gcd(n,k);i++)
{
int s=i,ni;
int temp=arr[s];
while(1)
{
/... |
/*************************************************************
* > File Name : P6187.cpp
* > Author : Tony
* > Created Time : 2020/04/24 22:36:14
* > Algorithm : greedy
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
type... |
#pragma once
#include <QThread>
#include <QObject>
class SaveDataThread :public QThread
{
Q_OBJECT
public:
SaveDataThread();
SaveDataThread(QString &toDir, QStringList &headerList, QStringList &dataList, QObject *parent = 0);
~SaveDataThread();
virtual void run();
void setDataString(QString &toDir, QStringList ... |
/*----------------------------------------------------------------
Copyright (c) 2014 Author: Jagadeesh Vasudevamurthy
file: util.h
-----------------------------------------------------------------*/
/*----------------------------------------------------------------
include this file for all the programs
-------------... |
/*
* Mechanism.h
*
* Created on: 26 Apr 2013
* Author: william
*/
#include "pb_consts.h"
#include "pb_process.h"
#ifndef MECHANISM_H_
#define MECHANISM_H_
namespace Popbal {
class Mechanism {
public:
Mechanism();
virtual ~Mechanism();
//! Add a process to the mechanism
void AddProcess(Processes::Pr... |
/**
* 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
*
* ... |
/* ******************************************************************
* *** Este programa simula uma rede de polímeros. ***
* *** ***
* ****** ******
* *** Referencia base: Arquivo-fonte sim.cpp fo... |
#ifndef CSUFFIX_H
#define CSUFFIX_H
#include <QString>
#include <QChar>
#include <QList>
#include <QMap>
class CSuffix
{
protected:
QString m_key;
int m_frequency;
int m_count;
public:
CSuffix(QString ssWord);
CSuffix(CSuffix&);
public:
... |
//
// ViewAxis.hpp
// alfrid
//
// Created by Yi-Wen Lin on 2016/5/29.
//
//
#ifndef ViewAxis_hpp
#define ViewAxis_hpp
#include <stdio.h>
#include "View.hpp"
using namespace alfrid;
namespace alfrid {
class ViewAxis : public View {
public:
ViewAxis();
void render();
private:
... |
// Copyright 2020-2021 Russ 'trdwll' Treadwell <trdwll.com>. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Steam.h"
#include "SteamEnums.h"
#include "SteamStructs.h"
#include "UObject/NoExportTypes.h"
#include "SteamGameServerStats.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOn... |
#include "GUIDrawer.h"
#include "GUI/VisualPreferences.h"
#include "GUI/SimProperties.h"
#include "SceneDrawer.h"
#include <GLFW/glfw3.h>
#include <stdio.h>
namespace solar
{
namespace drawers
{
GUIDrawer::GUIDrawer(const SimData& data) :
objectContextMenu(data)
{
switches.grid.selected = true;
switch... |
#include <iostream>
using namespace std;
int main() {
//logical variables - bool
bool var;
var = 0;
bool var1 = 1;
//целочислени стойности
short var2; //2B - dva baita
//long
int var3; //4B - 4 baita
/*short
* 2B = 16bit
* 2^16 = 65536
* no poneje ima i 0... |
// String.cpp
//
// ICS 46 Winter 2021
// Project #0: Getting to Know the ICS 46 VM
//
// Implement all of your String member functions in this file.
//
// Note that the entire standard library -- both the C Standard
// Library and the C++ Standard Library -- is off-limits for this
// task, as the goal is to exercise y... |
/*
** EPITECH PROJECT, 2019
** Mutex.hpp
** File description:
** ${FILEDESCRIPTION}
*/
#ifndef CCP_PLAZZA_2018_MUTEX_HPP
#define CCP_PLAZZA_2018_MUTEX_HPP
#include <mutex>
class IMutex {
public:
virtual ~IMutex() = default;
virtual void lock() = 0;
virtual void unlock() = 0;
virtual void trylock(... |
/*
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... |
#pragma once
#ifndef CONSOLE_HPP
#define CONSOLE_HPP
#include <QWidget>
#include <QLineEdit>
class Console : public QWidget
{
public:
Console ( QWidget* parent );
};
#endif |
//
// Created by 梁栋 on 2019-05-01.
//
#include <vector>
#include <stack>
#include <queue>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
void flatten(TreeNode* root) {
vector<Tr... |
#include "employeeservice.h"
EmployeeService::EmployeeService()
{
//ctor
}
void EmployeeService::add_employee(const Employee& employee)
{
cout << employee << endl;
}
|
#include <string>
#include <cstdio>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "util.h"
using namespace std;
/* Funciones de cadena ------------------------------------------------------------------------- */
// Borra los espacios en blanco a los c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.