text stringlengths 8 6.88M |
|---|
#include "patron.h"
#include <string>
Patron::Patron(std::string name, std::string number)
: _name{name}, _number{number}
{ }
Patron::Patron()
: Patron("", "")
{ }
std::string Patron::to_string() {
std::string result = _name + " (" + _number + ")";
return result;
}
|
#ifndef ISPHPARTICLES_H
#define ISPHPARTICLES_H
//--------------------------------------------------------------------------------------------------------------
// OpenGL includes
#include <GL/glew.h>
#include <QOpenGLBuffer>
// CUDA includes
#include <cuda_runtime.h>
#include <cuda.h>
#include <cuda_gl_interop.h>
... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n, m, k;
int yearCount = 0;
//n : ๋
์ฌ์ด์ฆ
//m : ๋๋ฌด ๊ฐ์
//k : ๋
์
int bitaminMatrix[101][101] = {0, };
int currentBitamin[101][101] = {0, };
class Tree{
public:
int i;
int j;
int age;
bool operator< (Tree &t) const {
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 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_HARDCORE_LOGGING_OPREADABLELOGFORMATTER_H
#define MODU... |
/* -*- Mode: c++; tab-width: 4; 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.
*
* Espen Sand
*/
#ifndef _QUIX_COMMANDLINEARGUMENTHANDLER_H_
#define _QUIX_COMMANDLINE... |
#include "Vna.h"
#include "RsibBus.h"
#include "VisaBus.h"
using namespace RsaToolbox;
#include <QDebug>
#include <QString>
#include <QtTest>
#include <QSignalSpy>
class test_VnaCwSweep : public QObject
{
Q_OBJECT
public:
test_VnaCwSweep();
private:
Vna vna;
VnaCwSweep sweep;
Log log;
int... |
#include "core/pch.h"
#ifdef ADAPTIVE_ZOOM_SUPPORT
#include "modules/display/azfixpoint.h"
#ifdef _DEBUG
AZLevel AZ_INTTOFIX(int v)
{
OP_ASSERT((unsigned int)op_abs(v) < (1 << (8*sizeof(AZLevel) - AZ_FIX_DECBITS)));
return ((AZLevel)((v)<<(AZ_FIX_DECBITS)));
}
#endif // _DEBUG
// taken from vegafixpoint.cpp
AZLe... |
#ifndef __iberbar_input_h__
#define __iberbar_input_h__
#include <dinput.h>
namespace iberbar
{
enum MouseInput
{
Button1,
};
}
#endif |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2011 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Marius Blomli, Michal Zajaczkowski
*/
#ifndef _UPDATEA... |
/**
* @file test_np_add_subtract_multiply_divide_i4.cc
* @author Gerbrand De Laender
* @date 20/04/2021
* @version 1.0
*
* @brief E091103, Master thesis
*
* @section DESCRIPTION
*
* Test bench for 'np_add_subtract_multiply_divide_i4_hw.cc'.
*
*/
#include <iostream>
#include <stdlib.h>
#inc... |
#include "KF_cholesky_update.h"
#include "linalg.h"
#include <immintrin.h>
/*****************************************************************************
* OPTIMIZATION STATUS
* Done: Base implementation, unit test
* ToDo: Start optimizing
***************************************************************************... |
#include<iostream>
#include<vector>
#define FOR(i,n) for(i=0;i<n;i++)
#define left(p) 2*p
#define right(p) 2*p+1
#define MAX(a,b,c) ((a>b)?((a>c)?a:c):((b>c)?b:c))
using namespace std;
typedef vector<int> vi;
vi A,st;
void build(int p,int L,int R)
{
if(L==R)st[p]=L;
else
{
build(left(p),L,(L+R)/2);
... |
#include "EdlException.h"
using namespace plugins::interfaces;
EdlException::EdlException(const EdlException::EdlError errorType)
: errorType_(errorType)
{
}
EdlException::EdlException(const EdlException::EdlError errorType, std::string detailInfo)
: errorType_(errorType),
detailedInfo_(detailInfo)
{
}... |
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
// parameters are commented
// string read_month_name(string); // month name
// int print_month(string, string, int, int); // first day, last day, no of days, month name
// void print_heading(int); // year
// int get_start... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-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 HTMLOGDOCREP_H
#define HTMLOGDOCREP_H
#include "modules... |
// Created on: 1995-01-27
// Created by: Jacques GOUSSARD
// 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 G... |
//
// Pixel.hpp
// w08_h01_noise
//
// Created by Kris Li on 11/2/16.
//
//
#pragma once
#include "ofMain.h"
class Pixel {
public:
Pixel();
void init(ofPoint _pos);
void update(vector<ofPoint> *lights);
void draw(int _size);
ofPoint pos;
int size;
int r, g, b;
float d... |
#pragma once
#include <map>
#include <list>
#include <string>
#include "tinyxml\tinyxml.h"
class Logger;
#define INF INT_MAX
using namespace std;
class FileHandler
{
public:
FileHandler();
~FileHandler();
bool createMatrixFromDoc( const char* InputFileName,
map<int, map<int, int>*>* pMatrix,
i... |
/*
* License:
* License does not expire.
* Can be distributed in infinitely projects
* Can be distributed and / or packaged as a code or binary product (sublicensed)
* Commercial use allowed under the following conditions :
* - Crediting the Author
* Can modify source-code
*/
/*
* File: Fbo.cp... |
// author: ycp | https://ycpedef.github.io
// #pragma GCC diagnostic error "-std=c++11"
// #pragma GCC optimize(2)
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define debugs(x) cerr << #x << " = " << (x) << " "
#define debug(x) cerr << #x << " = " << (x) << endl
#define debugf(...) fpr... |
#pragma once
#include <cmath>
#include <cstdint>
class ColorCorrection8bit
{
private:
static const int MAX_VALUE = 255;
double m_lowThr = 0.0;
double m_highThr = 1.0;
double m_gamma = 0.5;
double m_hue = 0.0;
double m_saturation = 0.0;
double m_minLuma = 0;
double m_maxGamma = 1;
double m_minGamma = 1;
dou... |
#if !defined(__MOTIONER_H__)
#define __MOTIONER_H__
#include "Debug.h"
#include "Singleton.h"
#include <assert.h>
#include <list>
#include <set>
#include <map>
//! Button ID for gmote
enum GmoteButtonID
{
GB_UP, GB_DOWN , GB_LEFT, GB_RIGHT, GB_SELECT, GB_EXTRA, GB_END
};
struct ss_info {
int ss_id, old_ss_... |
#include<iostream>
using namespace std;
void PrintArr(int a[], int n)
{
int i = 0;
for (; i < n; i++)
{
cout << a[i];
if (i < n - 1)
cout << ' ';
}
cout << endl;
}
int insert(int a[], int n, int num)
{
int i = 0;
if (num < a[0])
{
int j = n;
for (; j >= 0; j--)
{
a[j + 1] = a[j];
}
a[0] =... |
#ifndef __GAME_SOUND_H__
#define __GAME_SOUND_H__
/*
===============================================================================
Generic sound emitter.
===============================================================================
*/
class idSound : public idEntity {
public:
CLASS_PROTOTYPE( idSound );
... |
#include "CDecompressThread.h"
#include "CMisc.h"
#include <afxwin.h>
#include <QFileInfo>
#include <QDebug>
#include "QDir"
#include "CClientLog.h"
#include "CSoftManager.h"
CDecompressThread::CDecompressThread(QObject *parent)
: QThread(parent)
{
connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
}
CDe... |
#include "all.h"
// ---- rank ----
static const int SRankFrmCntList[FLOOR_NUM] =
{
60 * 7, // 1
60 * 24, // 2
60 * 27, // 3
60 * 25, // 4
60 * 48, // 5
60 * 48, // 6
60 * 58, // 7
60 * 65, // 8
60 * 25, // 9
};
static int GetSRankFrmCnt(int floorIndex)
{
errorCase(!m_isRange(floorIndex, 0, FLOOR_NUM - 1))... |
#pragma once
#include "Matrix.h"
#include <vector>
class NeuroNet
{
public:
explicit NeuroNet();
explicit NeuroNet(int input_nodes, int hidden_layers, int output_nodes, double training_rate);
std::vector<double> query(std::vector<double>& input_values);
void train(std::vector<double>& input_values, std::vector... |
#include "multivariate_gauss.h" // import file to test
#include <cmath>
#include "ut.hpp"
using namespace boost::ut;
using namespace boost::ut::bdd;
int main() {
//! This seed was set in the multivariate_gauss() function implemented in the yglee code,
//! in order to be able to take the respective inputs an... |
class UAZ_SPG9_INS;
class UAZ_SPG9_INS_DZ: UAZ_SPG9_INS
{
scope = 2;
displayName = "$STR_VEH_NAME_UAZ_SPG_INS";
vehicleClass = "DayZ Epoch Vehicles";
crew = "";
typicalCargo[] = {};
class TransportMagazines {};
class TransportWeapons {};
class Turrets;
class MainTurret;
supplyRadius = 1.3;
class HitPoints;
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2011 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#include "core/pch.h"
#include "adjunct/quick/controller/... |
#include<vector>
using std::vector;
#include<unordered_map>
using std::unordered_map;
unordered_map<int, int> hash;
#include<string>
using std::string;
#include<stack>
using std::stack;
#include<algorithm>
#include<iostream>
class Solution {
public:
int minDistance(string word1, string word2) {
if (word2 == "")retur... |
#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 10e17 // 4ๅใใฆใ(4ๅ่ถณใใฆใ)long longใๆบขใใชใ
#define rep(i,n) f... |
#include <iostream>
#include "challenge1.hh"
int main()
{
std::cout << "Hey buoy, wait!!!" << std::endl;
cchh();
return 0;
} |
#include "Leaf.h"
#include<iostream>
Leaf::Leaf() {
}
Leaf::~Leaf() {
}
void Leaf::Operation() {
std::cout << "Leaf operation......." << std::endl;
}
|
#include "ZooScene.h"
#include "LostScene.h"
#include "LoadingScene.h"
#include "SimpleAudioEngine.h"
using namespace CocosDenshion;
USING_NS_CC;
Scene* ZooScene::createScene()
{
auto scene = Scene::create();
auto layer = ZooScene::create();
scene->addChild(layer);
return scene;
}
bool ZooScene::in... |
/*
* Copyright (c) 2016, GNSS Sensor Ltd.
*
* 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 ... |
#include <Lights/Light.h>
CLight::CLight(int type)
{
_buffer.setType(type);
}
void CLight::setColor(const glm::vec3 &color)
{
_buffer.setColor(color);
}
void CLight::setAmbientIntensity(float intensity)
{
_buffer.setAmbientIntensity(intensity);
}
void CLight::setDiffuseIntensity(float intensity)
{
_... |
#include "collision.h"
#include "gamecore.h"
#include "jiki.h"
#include "enemy.h"
#include "boss.h"
#include "shot.h"
extern Jiki jiki;
extern Shot shot[SHOT_MAX];
extern EnemyShot enemyShot[ENEMY_SHOT_MAX];
extern EnemyShot2 enemyShot2[ENEMY_IONRING_MAX];
extern BossShot bossShot[4];
extern Barrier barrie... |
#pragma once
#include"common.h"
class ThreadCache
{
public:
void* Allocate(size_t size);
void Deallocate(void* ptr, size_t size);
//ไปไธญๅฟ็ผๅญ่ทๅๆ้ๅฏน่ฑก
void* FetchFromCentralCache(size_t index, size_t size);
//้พ่กจไธญๅฏน่ฑกๅคชๅค๏ผๅผๅงๅๆถๅ
ๅญ
void ListTooLong(FreeList* freelist,size_t size);
private:
FreeList _freelis... |
// Copyright (c) 2019, tlblanc <tlblanc1490 at gmail dot com>
#include "buffered_writer.hpp"
#include "io/copy.hpp"
static inline Status flush_buffer(
Sink *sink,
Buffer *buffer) {
size_t fbytes;
return copy(buffer, sink, &fbytes);
}
Status BufferedWriter::write(
const uint8_t *source,
const siz... |
#pragma once
namespace sbg {
template<typename T>
struct Accumulator {
virtual void operator+=(T value) = 0;
virtual T value() const = 0;
virtual void clear() = 0;
virtual bool empty() const = 0;
virtual int count() const = 0;
};
}
|
#include "meanplotwidget.h"
MeanPlotWidget::MeanPlotWidget(QWidget *parent) {
sampler = new Sampler();
setLayout(new QGridLayout);
plot = new MeanPlot();
hpSpinBox = new QSpinBox();
lpSpinBox = new QSpinBox();
hpSpinBox->setRange(0, 100);
lpSpinBox->setRange(0, 100);
hpSpinBox->setValue(30);
lpSpinBox->setVal... |
#include <ctime>
#include <iostream>
using namespace std;
int main()
{
// initialize
int y=2016, m=2, d=29;
tm date = {};
date.tm_year = y-1900;
date.tm_mon = m-1;
date.tm_mday = d;
// modify
date.tm_mday += 1;
mktime(&date);
// show result
char* nextMonth... |
#include "Coin.h"
#include "../CSC8503Common//StateTransition.h"
#include "../CSC8503Common/StateMachine.h"
#include "../CSC8503Common//State.h"
//#include "../GameTech/TutorialGame.h"
using namespace NCL;
using namespace CSC8503;
Coin::Coin(float* s, bool die, string n ) {
//game = g;
score = s;
name = n;
canDie... |
#pragma once
#include <algorithm>
#include <iostream>
#include <list>
#include <stdexcept>
#include <vector>
struct Vertex {
double x, y;
unsigned n;
Vertex(double x = 0, double y = 0, unsigned n = 0) : x(x), y(y), n(n) {};
bool operator == (const Vertex& other) const { return x == other.x && y == othe... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2005 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef ContentBlockDialog_H
#define ContentBlockDialog_H
#ifdef... |
#include <iostream>
#include <time.h>
#include "PerformanceAnalyzer.hpp"
using namespace std;
PerformanceAnalyzer::PerformanceAnalyzer()
: totalGenTime(0), timerStarted(0), totalGenBoard(0)
{
// Empty
}
void PerformanceAnalyzer::startBoardGenTimer()
{
// Start a local timer.
this->timerStarted = ge... |
#include "ArrayDictionary.h"
#include "gtest/gtest.h"
#define PRINT
TEST(dict, array_dict_basic) {
ArrayDictionary<int, int> hashTable;
ASSERT_TRUE(hashTable.isEmpty());
ASSERT_TRUE(hashTable.add(1, 2));
ASSERT_EQ(hashTable.size(), 1);
ASSERT_FALSE(hashTable.isEmpty());
ASSERT_TRUE(hashTabl... |
#include "Equipment.hpp"
#include "LogicAssets.hpp"
#include <cassert>
namespace rlrpg
{
EquipmentDesc::EquipmentDesc(
id_t id,
std::string name,
EquipmentType type,
level_t level,
AttributesRange const& attributes):
m_id(id),
m_name(std::move(name)),
m_type(type),
m_level(level),
m_attributes(att... |
/**
* Simple sketch to test how little power we can use when
* ATTiny goes to sleep.
* Most of the extra saving seems to be due to turning off ADC
**/
#include <avr/power.h>
#include <avr/sleep.h>
#ifdef __AVR_ATtiny85__
#define SWITCH_PIN 0
#define LED_PIN 1
#else
#define SWITCH_PIN 2 // (interrupt 0)
#define LE... |
/*
Traffic_Signals_2
This program operates six LEDs (two red, two yellow and two green) in a sequence simulating
traffic lights at an intersection. The main loop of the program goes through one cycle of
the control with Signal 1 starting as green with Signal 2 starting as red - Signal 1 stays green
for 5 sec... |
/*
Petar 'PetarV' Velickovic
Data Structure: Priority Queue (Binary Heap)
*/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <complex>
#define... |
/*
Name: largest number
Copyright:
Author: Xiao Dong, Xiao
Date: 2019/8/21 13:27:13
Description: leetcode 179
*/
#include <bits/stdc++.h>
using namespace std;
//class Solution {
//public:
// string largestNumber(vector<int>& nums) {
// vector<string> strs(nums.size());
// auto it = nums.begin();
//... |
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int cont1, cont2, I, J;
for (cont1 = 0 ; cont1 < 5 ; cont1++){
I = 1 + (2*cont1);
J = 7 + (2*cont1);
for (cont2 = 0 ; cont2<3 ; cont2++){
printf("I= %d J= %d\n", I, J-cont2);
}
}
return 0;
}
|
//
// Boat.cpp
// GAME2
//
// Created by ruby on 2017. 11. 11..
// Copyright ยฉ 2017๋
ruby. All rights reserved.
//
#include "Boat.hpp"
void Boat::move() {
hasShot = false;
char input;
cout << "์ผ์ชฝ(a), ์ค๋ฅธ์ชฝ(d), ์ด๋ขฐ๋ฐ์ฌ(w), ํด๋๊ธฐ๊ธฐ(s) : ";
cin >> input;
switch (input) { // ๋ฐฉํฅ์ ๋ฐ๋ผ user์ ์ด๋ ์ํด
cas... |
#pragma once
#include "Brick.h"
#include "PowerUp.h"
#include "Ball.h"
#include "CollisionDetection.h"
#include <vector>
#include <ctime>
/*
Brick manager class is used to manage the bricks, the powerups and realize
the communication between components.
*/
class BrickManager {
public:
BrickManager(int p... |
#include<bits/stdc++.h>
using namespace std;
struct ope{
int t,x,y,x2,y2,k;
};
ope o[20000];
int t[1025][1025],ans[20000],m,n,tot=0;
void readit(){
scanf("%d",&n);
while (1){
scanf("%d",&o[++m].t);
if (o[m].t==1) scanf("%d%d%d",&o[m].x,&o[m].y,&o[m].k);
else if (o[m].t==2) scanf("%d%d%d%d",&o[m].x,... |
#ifndef RESOURCE_MANAGER_H
#define RESOURCE_MANAGER_H
class ILazyLoadable;
#include <vector>
class ResourceManager
{
public:
static void lazyLoad(bool force = false);
static bool allReady();
static void addToInitializationList(ILazyLoadable* resource);
static void reset();
private:
static std::vector<ILazyLoada... |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* rotateRight(ListNode* head, int k) {
if(!head)
return NULL;
deque<ListNode *> que;
whi... |
#pragma once
#include "utils/ptts.hpp"
#include "proto/config_spine.pb.h"
using namespace std;
namespace pc = proto::config;
namespace pd = proto::data;
namespace nora {
namespace config {
using spine_limit_ptts = ptts<pc::spine_limit>;
spine_limit_ptts& spine_limit_ptts_inst... |
#include "Entity.h"
Entity::Entity(int x, int y, char display, std::string type)
{
this->x = x;
this->y = y;
this->display = display;
this->type = type;
}
void Entity::setX(int x)
{
this->x = x;
}
void Entity::setY(int y)
{
this->y = y;
}
int Entity::getX()
{
return this->x;
}
int Entity::getY()
{
return t... |
#include <iostream>
#include <cstring>
#include <cstdio>
#define MAX 30000
using namespace std;
char a[30005],b[30005];
int x[MAX], y[MAX], z[5000000];
int main() {
int l1,l2,k;
int i,j;
while(~scanf("%s %s",a,b)) {
memset(z, 0, sizeof z);
l1 = strlen(a);
l2 = strlen(b);
for(j = 0, i = l1 - 1; i >... |
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40319)
#error "Mixed versions compilation."
#endif
/**
* Google's Firebase Token Management class, Signer.h version 1.3.14
*
* This library supports Espressif ESP8266, ESP32 and Raspberry Pi Pico
*
* Created July 16, 2023
*
* Th... |
#include "../../gl_framework.h"
using namespace glmock;
extern "C" {
#undef glGetProgramInfoLog
void CALL_CONV glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog) {
}
PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog = &glGetProgramInfoLog;
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software ASA 2006 - 2008
*
* Web server implementation
*/
#include "core/pch.h"
#ifdef WEBSERVER_RENDEZVOUS_SUPPORT
/* FIXME: rewrite this code */
#include "modules/webserver/src/rendezvous/webserver_rendezvous... |
#include "MyText.h"
namespace myText
{
void drawText(TextureAtlas* fontTextureAtlas, const std::string& text, float xpos, float ypos, float zPos)
{
for(unsigned int i = 0; i < text.length() ; i++)
{
glPushMatrix();
RectangleMesh* mesh = fontTextureAtlas->mesh(text.substr(i,1));
glTranslatef(mesh->width(... |
// Created on: 1995-07-24
// Created by: Modelistation
// 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 GNU ... |
/*******************************************************************************
* Uses LMIC1.51
*
* Change DevAddr to a unique address for your node
* See http://thethingsnetwork.org/wiki/AddressSpace
*
* Do not forget to define the radio type correctly in config.h, default is:
* #define CFG_sx1272_radio 1
... |
#pragma once
/**
* Bรกsicos
*/
#include <iostream> // cout, cin e etc...
#include <math.h> //
#include <string> // string
#include <sstream> // ta sendo usada para conversรฃo de tipos primitivos (por meio de stream)
#include <stdlib.h> //abs
/**
* Nรฃo usados
*/
//#include <cstdlib> // malloc free // comp... |
#ifndef WIDGETRECOGNITIONAREA_HH_
#define WIDGETRECOGNITIONAREA_HH_
#include <pgradiobutton.h>
#include "WidgetScrollBar.hh"
#include "RecognizerStatus.hh"
#include "AudioInputController.hh"
#include "WidgetRecognitionText.hh"
#include "WidgetWave.hh"
#include "WidgetSpectrogram.hh"
#include "WidgetTimeAxis.hh"
/** ... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <folly/Optional.h>
#include <folly/SocketAddress.h>
#include <quic/codec/QuicConnectionId.h>
#include <qui... |
#ifndef ALG_NAIVE_FLIP
#define ALG_NAIVE_FLIP
#include "helper.hpp"
namespace matmul {
namespace naive_flip {
namespace _impl {
void multiply(int const **A, int const **B, unsigned const m, unsigned const n, unsigned const p, int **dest){
for (unsigned i = 0u; i < m; i++){
... |
#include "Shotgun.hpp"
#include "../ResourceLoader.hpp"
#include "../Player.hpp"
#include "../SoundEngine.hpp"
#include <vector>
Shotgun::Shotgun(Player *owner)
: Weapon(owner, ResourceLoader::GetTexture("Images/Weapons/shotgun.png"), sf::Vector2u(500, 160), "Shotgun", 1.15f)
{
Animation<sf::Vector2i> anim(8, false... |
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: r_defs.h,v 1.18 1998/04/27 02:12:59 killough Exp $
//
// Copyright (C) 1999 by
// id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
// Copyright(C) 2015-2020 F... |
#include "CUrlParsingException.h"
|
#include "stdafx.h"
#include "Question.h"
#include "QuestionStateForTesting.h"
#include "QuestionForTest.h"
using namespace qp;
using namespace std;
struct QuestionStateTestsFixture
{
QuestionStateTestsFixture()
:question(make_shared<CQuestionForTest>("Question", 10))
{
}
CQuestionPtr question;... |
#include "qxfile.h"
namespace qEngine
{
qXFile::qXFile(void)
{
m_sMeshInfo.lpD3DXMesh = NULL;
m_sMeshInfo.pD3DMaterialArray = NULL;
m_sMeshInfo.pstrTextureArray = NULL;
}
bool qXFile::loadResource(string strName)
{
LPD3DXBUFFER lpD3DXBuffer = NULL;
if(FAILED(D3DXLoadMeshFromX((LPSTR)strName.c_str(), D3... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
// Copyright (C) 2002, Morten Stenshorne
// Used in the Opera web browser with permission.
#include "core/pch.h"
#include "audioplayer.h"
#include "audiostream.h"
#include <stdio.h>
#include <stdlib.h>
#include <st... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
/* compile with g++ main.cpp -lpthread -o example.out */
#define NTHREADS 4
#define M NTHREADS
#define N 10000000
#define MBEXTRA (1 << 20)
pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
double A[M][N];
void* do_work(void* arg) {
l... |
#include "ApplySeatProc.h"
#include "Logger.h"
#include "HallManager.h"
#include "Room.h"
#include "ErrorMsg.h"
#include "BaseClientHandler.h"
#include "ProcessManager.h"
#include "GameCmd.h"
REGISTER_PROCESS(CLIENT_MSG_APPLY_SEAT, ApplySeatProc)
/*
int uid;
int tid;
int seatid;
*/
/*
short ret;
std::string... |
#include <iostream>
#include <cstring>
#include <fstream>
#include <stdlib.h>
using namespace std;
/* G
* A program that reads and writes itself :)
* zM - 11/07/2015
* E
*/
int main(int argc, char** argv)
{
if ( argc > 1 && argv[1][0] == '-') {
cout << "Usage: " << argv[0] << " [-h|--help|$new_data]\... |
#include "./lib/tinyxml.h"
#include "../common/common.h"
#include "../common/mypacket.h"
// #include "../Server/server.h"
#include <iostream>
#include <cstdlib>
#include <map>
#include <sys/time.h>
struct ClientInfo{
int cfd;
string name;
bool wake ;
sockaddr_in sockaddr;
ClientInfo(string _n... |
#include "cryptobox/core/Storage.hpp"
#include <boost/filesystem.hpp>
#include "sodium.h"
namespace fs = boost::filesystem;
namespace cryptobox { namespace io {
template<typename Stream>
struct FileGuard {
FileGuard(std::string const& pathName)
: f{pathName}
{}
~FileGuard() { f.close(); }
... |
#ifndef __NETWORKMANAGER_H__
#define __NETWORKMANAGER_H__
#include "server/mumuserver.h"
#include <QString>
class NetworkManager
{
public:
/*This function return a pointer to a mumuserver instance*/
NetworkInterface * getInstance( int port, QObject * parent)
{
return MumuServer::getInstance(port, parent);
}
};... |
//
// AcidUtils.h
// SRXvert
//
// Created by Dennis Lapchenko on 15/05/2016.
//
//
#ifndef ACIDUTILS_H
#define ACIDUTILS_H
//#include "AcidHeader.h"
/*
Had this as a simply static header first,
but due to these methods being called for every grain
it was very inefficient. Therefore moved to an inline class
... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
// read number of integers
int N;
cin >> N;
// create empty vector of integers
vector<int> v;
// read elements
for (int i = 0; i < N; i++) {
int... |
/*--------------------------------------------------------------------
Bellevue Class: PROG 111
Term/Date: Fall 11/21/2013
Instructor: Robert Main
Project #: 8
File Name: Stats.cpp
Programmer: Kathryn Brusewitz
--------------------------------------------------------------------... |
#pragma once
#include "Engine/AppFrameWork.h"
#include "TextureManager.h"
#include "ResourceManager.h"
#include "pass.h"
#include "PBRPipeline.h"
#include "EngineUtil.h"
#include "Image.h"
#include "RenderSystem.h"
#include "Config.h"
#include "AppFrameWork2.h"
#include "ForwardPipeline.h"
#include "VRPipeline.h"
#incl... |
// Created on: 1995-04-13
// Created by: Robert COUBLANC
// 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 GN... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.... |
#ifndef __CTRL_OBJEDITOR_H
#define __CTRL_OBJEDITOR_H
#include "CtrlWindowBase.h"
//#include "ModelObjEditor.h"
//#include "IViewBrowser.h"
namespace wh {
//-----------------------------------------------------------------------------
class IViewObjEditor : public IViewWindow
{
public:
IViewObjEditor(wxWindow* paren... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser.
** It may not be distributed under any circumstances.
*/
#ifndef CURSOR_H
#define CURSOR_H
#include "modules/search_engin... |
#include <iostream>
#define int long long
const int N = 1e5;
using namespace std;
int t[4 * N + 1], col[4 * N + 1];
bool marked[4 * N + 1];
void pull(int v, int tl, int tr)
{
int tm = (tl + tr) >> 1;
t[v] = t[2 * v] * (1 - marked[2 * v]) + col[2 * v] * (tm - tl + 1) + t[2 * v + 1] * (1 - marked[2 * v + 1]) +... |
#include "FenClient.h"
FenClient::FenClient()
{
setupUi(this);
socket = new QTcpSocket(this);
connect(socket, SIGNAL(readyRead()), this, SLOT(donneesRecues()));
connect(socket, SIGNAL(connected()), this, SLOT(connecte()));
connect(socket, SIGNAL(disconnected()), this, SLOT(deconnecte()));
con... |
#include <iostream>
using namespace std;
int main() {
int num;
cout <<"่ซ่ผธๅ
ฅไธๅๆธๅญ: ";
cin >>num;
if (num%3==0) {
cout <<"ๆฏ3็ๅๆธ";
}
else {
cout <<"ไธๆฏ3็ๅๆธ";
}
}
|
// Copyright (c) 2018 Mozart Alexander Louis. All rights reserved.
// Includes
#include "ivory_lluma.hxx"
Ivory::Ivory(BaseGameScene* scene, SwipeGesture* gesture, const string& id, const string& tmx_layer)
: BaseLluma(*scene, *gesture, Ivory::generateStats(id), tmx_layer) {}
Ivory::~Ivory() = default;
ValueMap... |
#include <iostream>
using namespace std;
int Swap(int a, int b)
{
int d = 0;
if (a < b)
{
d = a;
a = b;
b = d;
}
return 0;
}
int Evk(int a, int b)
{
int d = (a % b);
if (d == 0)
return b;
return Evk(b, d);
}
int main()
{
int a = 1;
int b = 0;
while (a != 0)
{
cin >> a;
... |
#pragma once
#include <array>
#include "../graphics/Primitive.h"
class PhysicsDebugDraw : public btIDebugDraw {
struct SConstantBuffer {
CMatrix mView;
CMatrix mProj;
};
void InitConstantBuffer();
int m_debugMode = btIDebugDraw::DBG_NoDebug;
int m_numLine = 0;
ID3D11Buffer* m_cb = nullptr;
Primitive m_primi... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2011 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
/**
* @file ExternalSSLStubs.cpp
*
* Implementation stubs of Extern... |
#include "passwordConfirmationForm.h"
passwordConfirmationForm::passwordConfirmationForm(QWidget *parent) : QDialog(parent)
{
if(passSettings.value("bin_pass").toString() == "" ||
!passSettings.contains("bin_pass"))
{
qApp->exit();
return;
}
isCorrect = false;
this->setWindow... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.