text stringlengths 8 6.88M |
|---|
#include "extensions/filters/http/cache/cache_filter_utils.h"
#include "common/common/utility.h"
namespace Envoy {
namespace Extensions {
namespace HttpFilters {
namespace Cache {
Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders>
authorization_handle(Http::CustomHeaders::ge... |
#ifndef __Point__
#define __Point__
#include <iostream>
#include <vector>
class Point
{
public:
Point();
Point(int x, int y);
~Point() = default; /*c++ 11*/
int GetX() const;
int GetY() const;
void PrintCordinates();
private:
int m_x;
int m_y;
};
class Line
{
public:
Line... |
// Created on: 2019-07-05
// Copyright (c) 2019 OPEN CASCADE SAS
// Created by: Oleg AGASHIN
//
// 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 publi... |
#include "Symbol.h"
namespace lispc
{
Symbol::Symbol(const char* symbol) :
symbol(std::string(symbol)) {}
Symbol::Symbol(std::string& symbol) :
symbol(symbol) {}
Symbol::Symbol(const Symbol& other) :
symbol(other.symbol) {}
std::string Symbol::str() const
{
return symbol;
}
Symbol& Symbol::operator=... |
#include <iostream.h>
int main()
{
int i;
int n;
cout<<"Enter the number: ";
cin>>n;
for(i=0;i<n;i++)
{
cout<<((i*i*i)+(2*i))<<" ";
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
//Figure out how to find the sum of two numbers
string addSum(string stra, string strb)
{
//String b is the larger integer
if (stra.length() > strb.length())
swap(stra, strb);
string str = "";
int s1 = stra.length(), s2 = strb.length();
// now reverse bo... |
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
vector<vector<int>> ss;
vector<int> ind;
vector<pair<int, int>> ht;
vector<bool> used;
void dfs(int v, int h) {
used[v] = true;
ind[v] = ht.size();
ht.emplace_back(h, v);
for (auto to : ss[v]) {
if (!used[to]) {
... |
#include "poissonSolverRGB.h"
using namespace std;
string rgbPath = "filters/poissonRGB/shaders/";
PoissonSolverRGB::PoissonSolverRGB()
: _gx(NULL),
_gy(NULL),
_dc(NULL),
_output(NULL),
_avTex(NULL),
_avFbo(NULL),
_residual(NULL),
_divergence(NULL),
_average(NULL),
_tonemap(NULL... |
#include "ParsingUtils.h"
ParsingUtils::ParsingUtils(){
random_device seed;
generator = mt19937(seed());
}
ParsingUtils::~ParsingUtils(){
}
double ParsingUtils::generate(json &json_dist){
// cout << "ParsingUtils::generate - Inicio\n";
string type = json_dist["type"];
double value = 0.0;
if( type.compare("uni... |
#ifdef __IN_ECLIPSE__
//This is a automatic generated file
//Please do not modify this file
//If you touch this file your change will be overwritten during the next build
//This file has been generated on 2018-01-27 23:25:44
#include "Arduino.h"
#include <U8x8lib.h>
#define DEBUG_ESP_WIFI
#define DEBUG_ESP_PORT Serial... |
//
// Model.h
// cg-projects
//
// Created by HUJI Computer Graphics course staff, 2013.
//
#ifndef __ex0__Model__
#define __ex0__Model__
#include <iostream>
#ifdef __APPLE__
#include <OpenGL/OpenGL.h>
#else
#include <GL/gl.h>
#endif
#include <math.h>
#include <vector>
#include <glm/glm.hpp>
#include "OpenMesh/C... |
#ifndef APPLICATION_HPP
#define APPLICATION_HPP
#include <memory>
#include <vector>
#include <algorithm>
#include "Leap.h"
#include "AbstractGestureListener.hpp"
#include "Configuration.hpp"
/*
* Leap Motion application class.
* @author: Grzegorz Mirek
*/
class Application {
private:
std::shared_ptr<Configuration>... |
#include "llvm/Pass.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <map>
#include <it... |
#include<cstdio>
#include<algorithm>
using namespace std;
int a[10001];
int main()
{
int n;
int m,k,w,r;
scanf("%d%d%d%d%d",&n,&m,&k,&w,&r);
int d=(m/k)*w;
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
sort(a+1,a+n+1);
int k1=1;
for(int i=1;i<=r;i++)
{
if(a... |
// 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... |
// Copyright (c) 2017 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 ... |
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <cstdlib>
#include <ctime>
#include "People.h";
#include "Spells.h";
#include "People.h";
#include "Declarations.h";
using namespace std;
int main()
{
srand(time(0));
cout << "Would you like to view list of characters, view l... |
#include <SDL2/SDL.h>
#include <glad/glad.h>
#include <imgui.h>
#include <imgui_impl_sdl.h>
#include "common/app.h"
#include "common/gl-exception.h"
int main(int argc, char *argv[]) {
App app;
glClearColor(1, 0, 1, 1);
// ------------------ Vertex Buffer
unsigned int vbo;
{
float vertice... |
/**
Copyright (c) 2015 Eric Bruneton
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 notice, this
list of conditions and the follo... |
#include "Curve.h"
#include <cmath>
#include <stdexcept>
#include <iostream>
double Curve::discountFactorTo(double t) const{
// if (m_data.empty() || m_data.back().m_time<t)
// throw std::runtime_error ("not enough data");
//Allow extrapolation
if(m_data.empty())
return 1;
double lastTime = 0;
double val = 1;
... |
const int INF=0x3f3f3f3f;
struct mcmf{
int flow,mincost,V;
struct edge{
int to,cap,cost,rev;
edge(){};
edge(int a,int b,int c,int d):to(a),cap(b),cost(c),rev(d){};
};
vector<edge>gra[MAXN];
int dist[MAXN];
int aug[MAXN];
bool in[MAXN];
ii prev[MAXN];
void ini... |
#include "GameWorld.h"
#include "Asteroid.h"
#include "Spaceship.h"
#include "Laser.h"
#include <SDL2/SDL_Image.h>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstdio>
GameWorld::GameWorld(int w, int h, SDL_Renderer *renderer):GameObject(NULL,NULL)
{
width = w;
height = h;
int s = width*height;
... |
//Program to convert specified days into years, weeks and days.
#include<iostream>
using namespace std;
int main()
{
int y, d, w ;
cout<<"Enter the number of days:";
cin>>d;
y=d/365;
w=d/7;
d=d%365;
d=d%7;
cout<<"\n Years: "<<y<<"\nWeeks: "<<w <<"\nDays: "<<d;
return 0;
} |
#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>... |
/*
Given a Singly Linked List of integers, delete all the alternate nodes in the list.
Example:
List: 10 -> 20 -> 30 -> 40 -> 50 -> 60 -> null
Alternate nodes will be: 20, 40, and 60.
Hence after deleting, the list will be:
Output: 10 -> 30 -> 50 -> null
Note :
The head of the list will remain the same. Don't need to... |
#pragma once
/**
Taken from http://www.artima.com/cppsource/safebool3.html
See there for more information.
*/
class safe_bool_base
{
protected:
typedef void (safe_bool_base::*bool_type)() const;
void this_type_does_not_support_comparisons() const {}
safe_bool_base() {}
safe_bool_base(const sa... |
#include <bits/stdc++.h>
using namespace std;
map<string,int> mp;
int main()
{
string month[]={"January",
"February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November",
"December"};
for(int i=0;i<12;i++)
mp[month[i]]=i+1;
... |
#include "player.hpp"
Player::Player() : Agent() {
type = BodyType::PLAYER;
spriteID = SpriteID::PLAYER_RIGHT;
}
Player::Player(b2World& world, float posX, float posY, b2Shape* shape) : Agent(world, BodyType::PLAYER, SpriteID::PLAYER_RIGHT, posX, posY, shape) {
}
void Player::Update(float fElapsedTime) {
Agent::Up... |
#include <iostream>
#include <vector>
#include <sstream>
#include <fstream>
#include <iomanip>
using namespace std;
vector<string> split(const string& s, const char& delim) {
vector<string> elems;
stringstream ss(s);
string item;
while(getline(ss, item, delim))
if(!item.empty())
elems.push_back(item... |
// Copyright Low Entry. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "CoreUObject.h"
#include "ELowEntryFileManagerYesNo.h"
#include "LowEntryFileManagerFile.generated.h"
class ULowEntryFileManagerDirectory;
class ULowEntryFileManagerFile;
UCLASS(BlueprintType)
class LOWENTRYFILEMANAGER_... |
// Created on: 1995-09-05
// 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 ... |
#include "GetAllUserStatus.h"
#include "ProtocolServerId.h"
#include "Room.h"
#include "Logger.h"
#include "ProcessManager.h"
int GetAllUserStatus::doRequest(CDLSocketHandler* client, InputPacket* inputPacket,Context* pt)
{
_NOTUSED(pt);
short cmd = inputPacket->GetCmdType();
short subcmd = inputPacket->GetSubCmd(... |
/* -*- coding: utf-8 -*-
!@time: 2019-10-20 19:01
!@author: superMC @email: 18758266469@163.com
!@fileName: 1.cpp
*/
#include <iostream>
#include <vector>
using namespace std;
int fun() {
int n, m;
while (cin >> n >> m) {
vector<int> eachGroupPeople(n);
int people_num;
for (int i ... |
/****************************************************************************
** Copyright (C) 2017 Olaf Japp
**
** This file is part of FlatSiteBuilder.
**
** FlatSiteBuilder 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 S... |
#if !defined(AFX_AUTOSEARCHPPG_H__D44628CA_9282_11D3_B19B_0000E87780F5__INCLUDED_)
#define AFX_AUTOSEARCHPPG_H__D44628CA_9282_11D3_B19B_0000E87780F5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AutoSearchPpg.h : Declaration of the CAutoSearchPropPage property page class.
/////////////////... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
#define INF 10e10
#define rep(i,n) for(int i=0; i<n; i++)
#define r... |
//
// Activity_hobby.hpp
// projekt_programowanie_obiektowe
//
// Created by Phillip on 11/06/2018.
// Copyright © 2018 Phillip. All rights reserved.
//
#ifndef Activity_hobby_h
#define Activity_hobby_h
#include "Activity.hpp"
class Activity_hobby : public Activity {
public:
void start_new_activity();
};
#en... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Cihat Imamoglu (cihati)
*/
#ifndef QUICK_NUMBER_EDIT_H... |
#pragma once
#include "Object.h"
class Item : public Object
{
public:
int points;
Item();
void Update();
void Draw();
~Item();
};
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* RadScorpion.cpp :+: :+: :+: ... |
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without f... |
//#define SHOW_CONSOLE //使控制台 (字符)窗口 和 ege的(图形)窗口同时出现
/*#include<graphics.h>
#include<stdio.h>
int main()
{
PIMAGE img;
initgraph(640, 480);
//setbkcolor(EGERGB(00, 0X40, 00)); //设置背景颜色
//setcolor(EGERGB(00,0xFF,00)); //设置画图的原色
//setfillcolor(EGERGB(0xFF, 00, 00));//设置填充颜色
//line(300, 20, 300, 200); //画线
/... |
/*
* Copyright 2014 Kevin Funk <kfunk@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* ac... |
../1113/C.cpp |
// FOR TESTING ONLY--DO NOT TURN IN
// Alfred Ledgin
// 10/31/2015
// CS 303
// Project 4
#include <iostream>
#include <string>
#include "StringToInt.h"
using namespace std;
int main()
{
StringToInt converterA("123");
cout << converterA.obtainInt() << endl;
StringToInt converterB;
cout << converterB.... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
//
//
// Copyright (C) 1995-2000 Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
//
#ifndef POPMODULE_H
#define POPMODULE_H
#include "adjunct/m... |
/*
* Created by Peng Qixiang on 2018/8/9.
*/
/*
* 扑克牌顺子
* 判断数组是不是0-13的一个顺子
*
*/
# include <iostream>
# include <vector>
# include <algorithm>
using namespace std;
class Solution {
public:
bool IsContinuous(vector<int> numbers){
if(numbers.empty()) return false;
sort(numbers.begin(), number... |
#include <iostream>
#include <ctime>
void PrintGameIntroduction()
{
std::cout << "\n\nAn evil sorcerer has enslaved your village to work in the nearby\n";
std::cout << "mines where precious and powerful gems are abundant.\n";
std::cout << "You sought out the Sorcerer's tower to save your village.\n";
}
v... |
#ifndef ADDUSER_H
#define ADDUSER_H
#include <QWidget>
#include <QCloseEvent>
#include "connection.h"
namespace Ui {
class adduser;
}
class adduser : public QWidget
{
Q_OBJECT
public:
explicit adduser(QWidget *parent = 0);
~adduser();
void closeEvent(QCloseEvent * event);
privat... |
//
// Created by gurumurt on 4/11/18.
//
#ifndef OPENCLDISPATCHER_LOGICAL_H
#define OPENCLDISPATCHER_LOGICAL_H
#endif //OPENCLDISPATCHER_LOGICAL_H
#include <cstring>
#include "../Environment.h";
#include "../globals.h";
class logical_kernel {
public:
string name = "logical";
string kernel_src;
int glo... |
/*********************************************************************
This file is part of QtUrban.
QtUrban 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, version 3 of the License.
QtUrban is d... |
#ifndef SUM_H
#define SUM_H
#include <QString>
#include "operation.h"
class Sum : public Operation
{
public:
Sum(double term);
~Sum();
double compute(const double input) const;
QString toQString(void) const;
protected:
double term;
};
#endif // SUM_H
|
#include "util.hh"
#include "../spellchecker/tokenizer.hh"
#include "../v0/dictionary.hh"
#include "../v1/dictionary.hh"
#include "../v2/dictionary.hh"
#include "../v3/dictionary.hh"
#include "../v4/dictionary.hh"
#include <benchmark/benchmark.h>
// instrumentation
#include <papipp.h>
#include <valgrind/callgrind.h>... |
#include "camera.h"
Camera::Camera(const glm::vec3& _origin, const glm::vec3& _lower_left) :
origin(_origin), lower_left(_lower_left)
{
int width = abs(2 * lower_left.x);
horizontal = glm::vec3(width, 0, 0);
int height = abs(2 * lower_left.y);
vertical = glm::vec3(0, height, 0);
}
Ray Camera::get_ray(float u, f... |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free... |
#include "mini/StonePapersScissors/stonepapersscissorstile.h"
StonePapersScissorsTile::StonePapersScissorsTile(int index, const char *a, QWidget* parent)
:QPushButton(parent)
{
this->index=index;
this->a = a;
}
StonePapersScissorsTile::StonePapersScissorsTile(const char *a, QWidget* parent)
:QPushButt... |
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
#define N 10
#define M (2*N-1)
class HTNode{ // 树中的节点结构
public:
int weight;
int parent, lchild, rchild;
};
class HTCode{ // 编码的结构
public:
char data;
char code[N];
i... |
//a file for function body
#include "myfile.h"
using namespace std;
void myFunction1(int num, char c) {
for (int i = 0; i < num; i++) {
cout << c;
}
cout << endl;
}
|
#include "PlayerModelInventory.h"
const int PlayerModelInventory::INVENTORY_MORE_COINS = 1;
const int PlayerModelInventory::INVENTORY_MORE_PROTECTION = 5;
const int PlayerModelInventory::INVENTORY_MORE_GEMS = 1;
const int PlayerModelInventory::INVENTORY_MORE_BOOTS = 1;
const int PlayerModelInventory::INVENTORY_MOR... |
//
// Created by Nikita Kruk on 25.07.18.
//
#ifndef SPRAPPROXIMATEBAYESIANCOMPUTATION_THREAD_HPP
#define SPRAPPROXIMATEBAYESIANCOMPUTATION_THREAD_HPP
#include "../Definitions.hpp"
#include <vector>
class Thread
{
public:
Thread(int argc, char **argv);
~Thread();
bool IsRoot();
int GetNumberOfMpichThread... |
#include<stdio.h>
#include<conio.h>
using namespace std;
int kadanes(int arr[],int size)
{
int m1=0,m2=0;
for(int i=0;i<size;i++)
{
m1 = m1+arr[i];
if(m1<0)
m1=0;
if(m1>=m2)
m2=m1;
}
return m2;
}
int main()
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2009 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#ifndef DOM_DOMJILEXCEPTIONS_H
#define DOM_DOMJILEXCEPTIONS_H
#ifde... |
/* ***** 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 ****** */
#ifndef _GDCMIO_DICOMFILEWRITER_HXX_
#define _GDCMIO_DICOMFILEWRITER_HXX_
... |
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
const string AddTwoBinaryStrings(string& str, string& str2)
{
int carry = 0;
string str3;
const string::size_type N = str.size() > str2.size() ? str.size() : str2.size();
reverse(str.begin(), str.end());
reverse(begin(str2), end(str2));
... |
/*
* RotatingService.h
*
* Created on: 30/11/2019
* Author: frank
*/
#ifndef SOURCES_ROTATINGSERVICE_H_
#define SOURCES_ROTATINGSERVICE_H_
#include "MotorDc.h"
class RotatingService {
MotorDc *motorA;
public:
RotatingService(MotorDc *motor);
void motorTurnOn();
void motorTurnOff();
void motorPause()... |
/**
* @file Optimizer.h
* @author Joost Oostdijk (joustava@gmail.com)
* @brief Optimizer using the Twiddle Algorithm based on https://martin-thoma.com/twiddle/
* @version 0.1
* @date 2021-02-09
*
* @copyright Copyright (c) 2021
*
*/
#ifndef _OPTIMIZER_H_
#define _OPTIMIZER_H_
#include <vector>
#include "PI... |
#include "MainWidget.h"
#include <QApplication>
#include <typeinfo>
#include <iostream>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWidget w;
const int i = 42;
auto j = i;
const auto &k = i;
auto *p = &i;
const auto j2 = i, &k2 = i;
float aa = 3.12;
std::co... |
#include "GamePCH.h"
#include "GLoadingScene.h"
GLoadingLayer* GLoadingLayer::CreateLoadingLayer(guint32 uiLoadingBgIndex)
{
float width = GetGameState()->GetGameWidth();
float height = GetGameState()->GetGameHeight();
GLoadingLayer* loadingLayer = new GLoadingLayer();
gchar fileName[GN_MAX_PATH] =... |
#include "Graph.h"
void write(Graph &G, FILE *fp) {
for (int i = 0; i < G.vexs; i++) {
for (int j = 0; j < G.vexs; j++) {
LinkedList tmp = G.data[i].second;
if (LocateElem(tmp, j) != 0) {
int t = 1;
fwrite(&t, sizeof(int), 1, fp);
}
else {
int t = -1;
fwrite(&t, sizeof(int), 1, fp);
}... |
// Ticket_ActiveXCtrl.cpp : CTicket_ActiveXCtrl ActiveX 控件类的实现。
#include "stdafx.h"
#include "Ticket_ActiveX.h"
#include "Ticket_ActiveXCtrl.h"
#include "Ticket_ActiveXPropPage.h"
#include <comutil.h>
#pragma comment(lib, "comsuppw.lib")
BSTR CovertStringToBSTR(char *p){
return _com_util::ConvertStringToBSTR(p);
}
... |
/*
* Ventana.cpp
*
* Created on: 22 Nov 2009
* Author: alejandro
*/
#include "Ventana.h"
#include <math.h>
Ventana::Ventana() {
done = 0;
distancia = 5.0;
heightFactor = 0.01;
heightIncreaseFactor = 1;
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(800, 600, 16, SDL_OPENGL|SDL_RESIZABLE);
if ... |
/************************************************************************/
/* 2、一个字符数组,里面的字符可能是a-z、A-Z、0-9.现在要求对数组进行排序,要求
* 所有小写字符放在最前面,
* 所有大写字符放在中间,
* 所有数字放在最后,而且各部分内部分别有序。*/
/*
*这个排序最好用插入排序,因为字符类型固定,所以大部分是有序的,所以用插入最快
*/
/************************************************************************/
#include <list>
#... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
// Ventanas de la aplicacion
#include "keyframeselection.h"
#include "modelfitting.h"
#include "trackingvideo.h"
#include "results.h"
#include "onlymesh.h"
// Librerias propias
#include "facialmesh.h"
#include "facetracking.h"
// Archivo con mascara C... |
#include "game.h"
#include <iostream>
using std::cout;
using std::cerr;
using std::endl;
using std::to_string;
game::game(int num_players, logger *l) : _gen(), _dist(1,6) {
_log = l;
player *p = NULL;
for (int i=0; i<num_players; i++) {
p = new player(i);
l->debug("player " + std::to_string(p->id()) +... |
/******************************************************************************
* *
* Copyright 2018 Jan Henrik Weinstock *
* *
... |
/*
* This file is part of Lua API++ library (https://github.com/OldFisher/lua-api-pp)
* distributed under MIT License (http://opensource.org/licenses/MIT).
* See license.txt for details.
* (c) 2014 OldFisher
*/
#ifndef LUA_CLOSURE_HPP_INCLUDED
#define LUA_CLOSURE_HPP_INCLUDED
#include "luapp_lazy.hxx"
namespace lua ... |
#ifndef IOSERVICE_H
#define IOSERVICE_H
#include"TuringMachine.h"
class IOService
{
public:
virtual void readMachineInput(TuringMachine&) = 0;
virtual void writeMachineOutput(TuringMachine&) = 0;
};
#endif |
#include <cmath>
#include "../vector3.h"
#include "../border.h"
#include "../surf.h"
class Manu: public Border {
public:
vertex *p[50][2];
int nv;
double step;
double depth;
double l;
double R, r, h;
Manu(): depth(0.5), nv(0), step(0.1), R(1.0), r(0.4), h(0.1) {}
vector3 border_function(double... |
#include "citrusfruit.h"
#include "fruits.h"
using namespace std;
const char * Orange::getName()
{return "Orange Fruit";}
float Orange::getPh()
{return ph * 0.5;}
void PrintTheFruits(CitrusFruit &fruit)
{
cout <<"fruit is a " <<fruit.getName()
<< "and has a pH " <<fruit.getPh() << endl;
}
|
// Cyclic Shift.cpp : 定义控制台应用程序的入口点。
//codeforces 745A Hongcow Learns the Cyclic Shift
//题目意思:有一个人在学习新的单词,给定一个单词的字符串,问由这个字符串向右循环移动能够产生多少个新的单词
//解题思路:用字符数组initStr读入字符串,并用二维数组strVec存储该字符串循环移动后不相同的值,将initStr放入strVec中
// 然后对该字符串循环移动字符串长度减1次,每次移动之后都判断移动后的字符串是否在strVec中,
// 如果已经存在说明是重复字符串,不做处理,否则放入strVec中。... |
#include <iostream>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <vector>
/*
Vectors have:
dynamic memory
automatic shaping
by default passed by value for vector and elements
relational operators can be used
Vectors work like arrays: vector[i] = 10;
Declaring vector: v... |
#include "wali/domains/binrel/ProgramBddContext.hpp"
#include <cstdlib>
#include <ctime>
#include <string>
#include <sstream>
#include <map>
#include <vector>
using namespace std;
using namespace wali;
using namespace wali::domains::binrel;
ProgramBddContext * voc;
void print_bddlevels(string var)
{
int *baseLhs,... |
#pragma once
#include <curl/curl.h>
#include <string>
#include <iberbar/Utility/Platform.h>
namespace iberbar
{
namespace Net
{
class CEasyWebResponse;
struct UEasyWebRequestOptions;
class CEasyWebRequest;
class CEasyWebHeader
{
};
class __iberbarExports__ CEasyWebResponse
{
public:
struct... |
#include "pch.h"
#include "StrID.h"
#include <unordered_map>
namespace Hourglass
{
namespace StrIDUtil
{
static std::unordered_map<StrID, std::string> strIDHashTable;
StrID GetStrID( const char* string )
{
StrID strID = WSID( string );
std::unordered_map<StrID, std::string>::iterator it = strIDHashTable... |
#ifndef COUNTEDPTR_H
#define COUNTEDPTR_H
template<typename T>
class CountedPtr {
private :
T* ptr;
long *count;
public :
explicit CountedPtr(T *p = 0) : ptr(p), count(new long(1)) { }
CountedPtr(const CountedPtr<T>& p) throw()
: ptr(p.ptr), count(p.count) {
++*count;
}
~CountedPtr() throw () {
... |
//
// Created by Jakub on 06.10.2018.
//
#ifndef ESP12E_ACTUATOR_H
#define ESP12E_ACTUATOR_H
#include <Arduino.h>
#include "../webSocketAsync.h"
#include <pthread.h>
namespace Actuator {
static uint32_t speed = 250;
static const uint8_t Pin1 = 1;
static const uint8_t Pin2 = 2;
static unsigned int o... |
#include "texture_manager.h"
TextureManager& TextureManager::getInstance()
{
static TextureManager textureManager;
return textureManager;
}
ImageInfo* TextureManager::load(
State& state,
const VkCommandPool& cmdPool,
const VkQueue& cmdQueue,
const TextureDesc& textureDesc,
bool storage)
{
TextureM... |
#include <iostream>
#include <fstream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
char str[111];
void input() {
scanf("%s", str);
}
void output() {
int len = strlen(str);
for (int i = 0; i < len; i++)
printf("%c ", str[i]);
printf("\n"... |
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main() {
// 构造函数
string str1="abcd";
string str2("abcd");
string str3=(str2,1,3);//str3="bcd"
//操作符 ,+ []
string str1="abcd";
string str2="defg";
string str3=str1;
string str4=str1+str2;
char tempChar = str1[1];
//长度
string str="abcd";
c... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#include "core/pch.h"
#include "module... |
#include "stdafx.h"
#include "MainApp.h"
#include "resource.h"
#include <shellapi.h>
CMainApp::CMainApp(UINT width, UINT height, std::wstring name) :
m_width(width),
m_height(height),
m_useWarpDevice(false),
m_title(name)
{
m_aspectRatio = static_cast<float>(width) / static_cast<float>(height);
}
CMainApp::~... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <sequtils.h>
#include <functional>
#include <iterator>
using namespace std;
template <typename OP1, typename OP2>
class compose_f_gx_t
:public std::unary_function<typename OP1::argument_type,
typename OP2::result_type>
{
private :
OP1 op... |
#include <iostream>
#include "Analyzer.h"
#include <stdlib.h>
#include <string>
#include <string.h>
#include "digit.h"
#include "letter.h"
#define CALC 15
using std::string;
static const char *keyword[] = {
"if", "inline", "int", "long", "register", "restrict", "return", "short",
"signed", "sizeof", "static",... |
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <fstream>
#include <algorithm>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
struct ChatRoom;
struct Person {
std::string name;
std::vector<std::string> chat_log;
ChatRoom *room{nullptr};
... |
#include "../include/DtFecha.h"
#include "../include/DtPuerto.h"
#include <iostream>
using namespace std;
DtPuerto :: DtPuerto(){
}
DtPuerto :: DtPuerto(string id, string nombre, DtFecha fechaCreacion, int cantArribos){
this->id = id;
this->nombre = nombre;
this->fechaCreacion = fechaCreacion;
this->c... |
/**
* @file macs-texture-types.hpp
*
* Contains several texture types. These are used as big vectors to do SIMD
* (or even MIMD) calculations on in render passes.
*/
#ifndef MACS_TEXTURE_TYPES_HPP
#define MACS_TEXTURE_TYPES_HPP
#include "macs-internals.hpp"
#include "macs-root.hpp"
namespace macs
{
class re... |
#pragma once
#include <string>
#include <vector>
#include "red_type.h"
class fargo_gas_disk
{
public:
fargo_gas_disk(std::string& dir, std::string& filename, computing_device_t comp_dev, bool verbose);
~fargo_gas_disk();
void allocate_storage();
void allocate_host_storage(int n_cell);
void alloc... |
#include "DefaultKeyTapListener.hpp"
using namespace Leap;
void DefaultKeyTapListener::onKeyTap(const KeyTapGesture& keyTap) {
std::cout
<< "Key tap event has occured in: ("
<< keyTap.position()[0] << ","
<< keyTap.position()[1] << ","
<< keyTap.position()[2] << ")"
<< std::endl;
}
|
#pragma once
#include <QDialog>
#include "ui_AccountDialog.h"
#include "SQLiteOperator.h"
class AccountDialog : public QDialog
{
Q_OBJECT
public:
AccountDialog(User* user, QWidget* parent = Q_NULLPTR);
~AccountDialog();
private:
Ui::AccountDialog ui;
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.