text
stringlengths
8
6.88M
#include<iostream> #include<ctype.h> #include<stdlib.h> #include<stdio.h> using namespace std; int main(int argc, char**argv) { int num_pages=atoi(argv[1]); int pages[num_pages]; for ( int i =0; i<num_pages;++i) { pages[i]=-1; //intialize dummy } char read[10]; int Pagenum; int track=0;...
#include <iostream> #include <sstream> #include <vector> #include <list> #include <queue> #include <algorithm> #include <iomanip> #include <map> #include <unordered_map> #include <unordered_set> #include <string> #include <set> #include <stack> #include <cstdio> #include <cstring> #include <climits> #include <cstdlib> ...
//===-- mess/request.hh - Request struct definition -------------*- C++ -*-===// // // ODB Library // Author: Steven Lariau // //===----------------------------------------------------------------------===// /// /// \file /// Request struct represent request needed for DB clients /// //===------------------------------...
#include"Matrix.h" void Input_Matrix(int matrix[][10], int n) //Ham Nhap 1 Ma tran Vuong co kich thuc n { cout << "Enter the elements of the matrix :\n"; for (int i = 0; i < n; i++) { cout << "Row " << i + 1 << endl; for (int j = 0; j < n; j++) { cin >> matrix[i][j]; } } } void Output_Matrix(int matrix...
/** * FlannKNNClassifier.hpp * @author koide * 15/11/16 **/ #ifndef KKL_FLANN_KNN_CLASSIFIER_HPP #define KKL_FLANN_KNN_CLASSIFIER_HPP #include <deque> #include <vector> #include <memory> #include <Eigen/Dense> #include <flann/flann.hpp> namespace kkl { namespace ml { /*************************************** * ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright 2002-2012 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/prefs/...
#ifndef HEAD_H #define HEAD_H #include <stack> #include <vector> #include <typeinfo> #include <map> #include <llvm/IR/Module.h> #include <llvm/IR/Function.h> #include <llvm/IR/Type.h> #include <llvm/IR/DerivedTypes.h> #include <llvm/IR/LLVMContext.h> #include <llvm/IR/LegacyPassManager.h> #include <llvm/IR/Instruction...
#include <Tanker/ContactStore.hpp> #include <Tanker/Crypto/Format/Format.hpp> #include <Tanker/DataStore/ADatabase.hpp> #include <Tanker/Device.hpp> #include <Tanker/Errors/AssertionError.hpp> #include <Tanker/Errors/Errc.hpp> #include <Tanker/Errors/Exception.hpp> #include <Tanker/Format/Format.hpp> #include <Tanker/...
#include "mainwindow.h" #include "ui_mainwindow.h" #include"stagedialog.h" #include"gamemap.h" #include"mapdata.h" #include<QKeyEvent> mainWindow::mainWindow(QWidget *parent) : QWidget(parent) , ui(new Ui::mainWindow) , m(new gameMap(this)) , s(new stageDialog(this)) , data(new mapData) { ui->s...
// Fill out your copyright notice in the Description page of Project Settings. #include "GunSMG.h" #include "Kismet/GameplayStatics.h" #include "Kismet/KismetSystemLibrary.h" #include "GameFramework/Character.h" #include "UObject/ConstructorHelpers.h" #include "Components/SkeletalMeshComponent.h" #include "Projectile...
#include<iostream> #include<string> int main () { std::string str = "Barev Karen"; std::cout<<str<<"\n"; int size = str.size(); char temp; char* p1 = &str[0]; char* p2 = &str[size-1]; for(int i = 0; i < size/2 ; ++i){ temp = *p1; *p1 = *p2; *p2 = temp; *--p2; *++p1; } st...
// Copyright 2019 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...
#ifndef UTILS_H #define UTILS_H #include <opencv2/core.hpp> #include <vector> #include "stats.h" using namespace std; using namespace cv; void drawBoundingBox(Mat image, vector<Point2f> bb); void drawStatistics(Mat image, const Stats& stats); void printStatistics(string name, Stats stats); vector<Point2f> Points(vec...
/*****************************************************************************************[Main.cc] Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson Copyright (c) 2007-2011, Niklas Sorensson Copyright 2019 Richard Sanger, Wand Network Research Group Permission is hereby granted, free of charge, to any person obta...
#include<iostream> #include<string> #include<iomanip> #include "office.h" #include "candidate.h" using namespace std; //------------------------------------------------------------------------------ // Constructor //-------------------------------------------------------------------------...
//==================================================================================== // @Title: AILMENTS //------------------------------------------------------------------------------------ // @Location: /game/rpg/include/cAilmentsDef.cpp // @Author: Kevin Chen // @Rights: Copyright(c) 2011 Visi...
//************************************************************************************************************* // // サウンド処理 [sound.h] // Author:IKUTO SEKINE // //************************************************************************************************************* #ifndef _SOUND_H_ #define _SOUND_H_ /...
#include "tools.h" #include <iostream> using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /** * TODO: Calculate the RMSE he...
// // Created by Lee on 2019-04-19. // #include "PhotoThumbnail.h" #include <QLabel> #include <QDebug> #include "ImagePool.h" #include "ThumbnailMaker.h" #include "ImageDownloader.h" #include "RootUnit.h" PhotoThumbnail::PhotoThumbnail(QWidget *parent, PhotoGroup * group) : QWidget(p...
#include "Arduino.h" #include "morsecode.h" MorseCode::MorseCode(int pin, int delaytime) { pinMode(pin, OUTPUT); _pin = pin; _delaytime = delaytime; } void MorseCode::dot() { digitalWrite(_pin, HIGH); delay(_delaytime); digitalWrite(_pin, LOW); delay(_delaytime); } v...
// Created on: 1993-11-03 // Created by: Christian CAILLET // 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 it under // the terms of the ...
#include "PMS.h" #include "SoftwareSerial.h" #include "DHT.h" SoftwareSerial Serial1(2, 3); PMS pms(Serial1); PMS::DATA data; DHT dht; void setup() { Serial.begin(9600); Serial1.begin(9600); dht.setup(7); } void loop() { if (pms.read(data)) { Serial.print("PM 10.0 (ug/m3): "); Serial.println(data....
$NetBSD$ Support NetBSD. --- scribus/scclocale.cpp.orig 2019-07-30 22:35:07.000000000 +0000 +++ scribus/scclocale.cpp @@ -27,7 +27,7 @@ ScCLocale::ScCLocale() #if defined(Q_OS_WIN) cLocale = _create_locale(LC_ALL, "C"); #else - #if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_...
/** * * This method splits a given string. * * */ #include <iostream> #include <string> #include <sstream> #include <vector> using namespace std; vector<string> split(const string&, char); int main(void) { int a; void *onHeap = malloc(128); std::cout << "Stack address is " << &a << std::endl; std::cou...
// // Texture.h // OpenGLProjects // // Created by Dayuan Chen on 3/2/20. // Copyright © 2020 N33MO. All rights reserved. // #pragma once #define GLEW_STATIC #include <GL/glew.h> #include <vector> class TextureLoading { public: static GLuint LoadTexture( std::string path ) { GLuint textureID; ...
////////////////////////////////////////////////////////////////////// // BWndBase.h: CBWndBase 类的定义 // 包含常规窗口功能,作为 CBForm、CBControl 类的基类 // // 支持: // 需要 BWindows 模块的支持 ////////////////////////////////////////////////////////////////////// #pragma once #include "BWindows.h" // 定义常量(这些常量头文件没有) #define WS_EX_LAYER...
#include "player/Player.h" #include "MediaRecorder.h" #include "com_bql_MSG_Native.h" #include "JNI_load.h" extern JNIMediaRecorder g_jBQLMediaRecorder; CLASS_LOG_IMPLEMENT(CMediaRecorder, "CMediaRecorder"); //////////////////////////////////////////////////////////////////////////////// int CMediaRecorder::SetVideoSt...
/* Author: Jonatious Joseph Jawahar PSID: 1416103 Method: Priority given to write locks before read locks */ #include <cstdlib> #include <errno.h> #include <iostream> #include <stdlib.h> #include <string.h> #include <signal.h> #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <s...
#pragma once #include <iostream> #include <string> #include <vector> #include <map> using namespace std; class TNode { public: TNode(); TNode(const TNode& other) { suffLink = other.suffLink; exitLink = other.exitLink; } map<uint32_t, TNode*> child; TNode* suffLink; TNode* exitL...
#include "Dna.h" size_t Dna::m_id = 0; Dna::Dna(const std::string& name, const std::string& status, const Dnasequence& dnasequence):m_Dna(new Dnasequence(dnasequence)),m_name(name),m_status(status),m_countName(1) { ++m_id; } Dna::~Dna() { delete m_Dna; } size_t Dna::setCountName() { return m_count...
#ifndef __PRACTICALSOCKET_INCLUDED__ #define __PRACTICALSOCKET_INCLUDED__ #include <string> // For string #include <exception> // For exception class using namespace std; /** * Base class representing basic communication endpoint */ class Socket { public: ~Socket(); string getLocalAddress(...
class DoorAccess { idd = 61144; movingenable = 0; onLoad = "keypadCancel = true;"; onUnload = "if(keypadCancel) then {DZE_Lock_Door = ''; [] spawn keyPadReset;};"; class Controls { class ZupaBackground_1 { type = 0; colorText[] = {0.8784,0.8471,0.651,1}; text = ""; fixedWidth = 0; style = 0...
#pragma once #include "resource-scheduler.h" // workload models #include "workload-models/constant.h" #include "workload-models/random-uniform.h" namespace sim::custom { using namespace sim::core; class GreedyServerScheduler : public IServerScheduler { public: explicit GreedyServerScheduler(UUID server_handle...
// WCTF_searchme_exploit_POC.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" // WCTF 2018 "searchme" task exploit // // Author: Mateusz "j00ru" Jurczyk // Date: 6 July 2018 // Tested on: Windows 10 1803 (10.0.17134.165) // // See also: https://j00ru.vexillium.org/2018/07/exploiting-a-windows-10-pagedpool-off-by-o...
#include"conio.h" #include"stdio.h" void main(void){ clrscr(); int a,b,c,d,e,f; a=10>5; b=10<5; c=10>=5; d=10<=5; e=10!=5; f=10==5; printf("%d\n",a); printf("%d\n",b); printf("%d\n",c); printf("%d\n",d); printf("%d\n",e); printf("%d\n",f); getch(); }
#include "dijkstrasSearch.h" bool CompareFloat(float a, float b) { return fabs(a - b) < .001; } std::vector<Pathfinding::Node*> GenerateNodeMap(const int mapWidth, const int mapHeight, const float windowWidth, const float windowHeight) { //generate list std::vector<Pathfinding::Node*> map; map.reserve...
#include "mainwidget.h" #include <QDebug> #include <limits> #include <QLabel> #include <QTextBrowser> #include <QPushButton> #include <QLayout> #include <QDateTime> #include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QMutexLocker> #include <thread> #include "qglobal.h" #defi...
#include "cLogicMonoPoly.h" #include "cPlayer.h" #include "cDice.h" #include "cCardStorageChance.h" #include "cCardStorageCommunity.h" #include "cCardDistrict.h" #include "cFreeParking.h" #include "cGotoJailDistrict.h" #include "cJailDistrict.h" #include "cStartDistrict.h" #include "cTaxDistrict.h" #include "cAssetD...
#include <iostream> #include <cctype> #include <set> #include <string> #include <algorithm> #include <iterator> int main(int argc, char const *argv[]) { std::size_t n{0}; std::set<std::string> dictionary, filter; std::string tmp_str{}; std::cin >> n; for (std::size_t i = 0; i < n; ++i) { ...
/* * 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 <quic/QuicConstants.h> #include <quic/codec/QuicPacketBuilder.h> #include <quic/codec/Types.h> #include <q...
#include "E.h" #include <jni.h> #include <stdio.h> JNIEXPORT void JNICALL Java_E_printName(JNIEnv*, jobject) { printf("E\n"); }
#include <iostream> #include <vector> #include <list> using namespace std; class Digraph { private: int V; int E; vector<list<int> *> *adj; public: Digraph(int v) { this->V = v; this->E = 0; adj = new vector<list<int>*>; for(int v = 0;v < V;v++) { ...
#ifndef _SPRITE_AI_STATE_H_ #define _SPRITE_AI_STATE_H_ class SpriteState; class SpriteAIState { public: SpriteAIState(); ~SpriteAIState(); virtual void moving(SpriteAIState*); virtual void nothing(SpriteAIState*); virtual void attacking(SpriteAIState*); virtual void running(SpriteAIState*); protecte...
/* * Program: SIFT.cpp * Usage: Implement SIFT class methods */ #include "SIFT.h" SIFT::SIFT(CImg<float> src){ this->srcImg = src; } // SIFT process steps // Using up smapling and linear interpolation CImg<float> SIFT::makeDoubleSizeLinear(CImg<float> input){ int doubleWidth = input.width() * 2, doubleHeight = input...
/********************************************************* * Copyright (C) 2017 Daniel Enriquez (camus_mm@hotmail.com) * All Rights Reserved * * You may use, distribute and modify this code under the * following terms: * ** Do not claim that you wrote this software * ** A mention would be appreciated but not needed * ...
#include <VlppWorkflowCompiler.h> #include "../W05_Lib/W05_Lib.h" using namespace vl::stream; using namespace vl::parsing; using namespace vl::filesystem; using namespace vl::reflection::description; using namespace vl::workflow::runtime; int wmain(int argc, const wchar_t* argv[]) { // start reflection LoadPredefin...
#include <iostream> #include <vector> void stack_brick(std::vector<std::vector<int>> &map, int x, int y, int type, int idx) { int pos = -1; for(int i = (type == 3) ? x + 2 : x + 1; i < 6; i++) { if(map[i][y] > 0) { break; } if(type == 2 && (map[i][y + 1] > 0)) ...
#include "Scene/Component/PlanarMesh.h" #define _USE_MATH_DEFINES #include <math.h> using namespace Rocket; Vector4f PlanarMesh::s_QuadVertexPositions[4] = { Vector4f(-0.5f, -0.5f, 0.0f, 1.0f), Vector4f( 0.5f, -0.5f, 0.0f, 1.0f), Vector4f( 0.5f, 0.5f, 0.0f, 1.0f), Vector4f(-0.5f, 0.5f, 0.0f, 1.0f) ...
#include "BasicEnemy.h" #include "PowerUp.h" #include "Player.h" std::vector < std::shared_ptr <BasicEnemy> > BasicEnemy::enemy; bool BasicEnemy::renderHitbox = false; sf::SoundBuffer BasicEnemy::enemyHitSoundBuffer; BasicEnemy::BasicEnemy(int id) { hp = 3; speed = 0.2; shootSpeed = 1; shootDelay = 1000; randSho...
#ifndef REMOVER_H #define REMOVER_H #include <QDialog> namespace Ui { class remover; } class remover : public QDialog { Q_OBJECT public: explicit remover(QWidget *parent = nullptr); ~remover(); private: Ui::remover *ui; }; #endif // REMOVER_H
#include <iostream> #include <string> #include <vector> #include <cstring> #include "../rapidxml/rapidxml.hpp" #include "../rapidxml/rapidxml_utils.hpp" #include "../rapidxml/rapidxml_print.hpp" #include "utils.h" #include "Room.h" //#include "../rapidxml/rapidxml_iterators.hpp" using namespace std; using namespace ra...
#ifndef GAMEMAP_H #define GAMEMAP_H #include <QWidget> class gameMap : public QWidget { Q_OBJECT public: explicit gameMap(QWidget *parent = nullptr); void left(); void right(); void up(); void down(); signals: }; #endif // GAMEMAP_H
// #ifndef socket_h #define socket_h #include <exception> #include <string> class socket { public: socket(); void connect(std::string host, std::string port); // int socketfd(); void close(); void bind(std::string, std::string = "localhost"); void send(std::string) const; std::string receive() const; s...
#include <iostream> using std::istream; #include <string> using std::getline; #include "InputBuffer.h" void InputBuffer::read(istream& string_stream) { getline(string_stream, this->buffer); } const string& InputBuffer::getBuffer() const { return this->buffer; }
#include<stdio.h> #include<windows.h> #include<conio.h> #include<time.h> char cursor(int x, int y) { HANDLE hStd = GetStdHandle(STD_OUTPUT_HANDLE); char buf[2]; COORD c = { x,y }; DWORD num_read; if (!ReadConsoleOutputCharacter(hStd, (LPTSTR)buf, 1, c, (LPDWORD)&num_read)) return '\0'; else return buf[0]; }...
#pragma once #include "MovableObject.h" class Spawner { public: virtual ~Spawner() {}; virtual Enemy* spawnObject(sf::Vector2f pos) = 0; virtual Enemy* spawnObject(float x, float y) = 0; }; template <class T> class SpawnerFor : public Spawner { public: virtual Enemy* spawnObject(sf::Vector2f pos) { return new ...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define showmap(is, js, x) {rep(i, is){rep(j, js){cout << x[i][j] << " ";}cout << endl;}} #define show(x) {for(auto i: x){cout << i << " ";} cout...
#define WINVER 0x0500 #define WM_HOTKEY 0x0312 #define WM_GETHOTKEY 0x0033 #define WM_SETHOTKEY 0x0032 #define SCROLLUP 120 #define SCROLLDOWN -120 #define _CRT_SECURE_NO_WARNINGS #include <Windows.h> #include <Winuser.h> #define WINWORD_H_ #...
#include<bits/stdc++.h> using namespace std; int main(int argc, char *argv[]){ execv("test.exe", argv); freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); string s; cin>>s; cout<<s; cout<<endl; freopen("CON","r",stdin); freopen("CON","w",stdout); cin>>s; ...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; double f[110][110][110]; bool fin(int i,int j,int k) { int a = (i > 0)?1:0; int b = (j > 0)?1:0; ...
/* Name: ×Ö·û´®¹éÒ»»¯ Copyright: Author: Hill Bamboo Date: 2019/8/21 16:52:21 Description: */ #include <bits/stdc++.h> using namespace std; int arr[26]; int main() { string str; cin >> str; for (int i = 0; i < str.size(); ++i) { arr[str[i] - 'a']++; } for (int i = 0; i < 26; ++i) if(arr[i] > 0) { printf...
/* 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...
#include <SDL/SDL.h> #include <SDL_image.h> #include <SDL/SDL_ttf.h> #include "jeu.h" void jouer(SDL_Surface *ecran, char mode) { int nbCoups = 0; SDL_Surface *infini; SDL_Rect positionInfini; Etat etatInitial ; Etat etatFinal; //genereEtatInitial(&etatInitial, &etatFinal);...
#include <iostream> #include "StatusDna.h" std::vector<std::string> StatusDna::m_statuslist(0); StatusDna::StatusDna(const std::string& status):m_status(status) { m_statuslist.push_back(status); } void StatusDna::setStatus(const std::string& status, size_t id) { m_status = status; m_statuslist[id-1] =...
/* * Software License Agreement (BSD License) * * Copyright (c) 2011, Southwest Research Institute * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source co...
#pragma once #ifdef CPPSQLAPI_EXPORTS #define CPPSQLAPI_API __declspec(dllexport) #else #define CPPSQLAPI_API __declspec(dllimport) #endif #include <curl/curl.h> #include <nlohmann/json.hpp> #include <string> #include <vector> #include <algorithm> class CPPSQLAPI_API cpp_sql_api { static CURL* curl_handle; std::st...
//============================================================================ // Name : AVL_tree.cpp // Author : Aditya // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #in...
#ifndef TEST_SUIT1 #define TEST_SUIT1 #include "../main/callbackwrapper.h" #include <QDebug> #include <QWidget> #include <condition_variable> #include <mutex> #include <QLabel> #include <QMutex> extern "C" { extern void IM_SetMode(int mode); } class QTextBrowser; class QLabel; class MainWidge...
#ifndef __ARRAYLIST_H #define __ARRAYLIST_H #include <cstdlib> #include <iostream> /* This is the generic List class */ template <class T> class ArrayList { T *array; int size; public: int capacity; // Constructor ArrayList() { size = 0; capacity = 4; array = new T[capacit...
#include <bits/stdc++.h> using namespace std; //Only solution class for the problem //All codes are written by krishna // 150. Evaluate Reverse Polish Notation // Medium // 978 // 466 // Add to List // Share // Evaluate the value of an arithmetic expression in Reverse Polish Notation. // Valid op...
// Copyright (c) 2013 Nick Porcino, All rights reserved. // License is MIT: http://opensource.org/licenses/MIT #pragma once #ifdef __cplusplus #define EXTERNC extern "C" #else #define EXTERNC #endif #include "defines.h" #include "export.h" #include <string> #include <vector> //namespace Json { c...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2012 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 ** */ #ifndef SSLSESS_H #define SSLSESS_H ...
#include "pch.h" Room::Room() { } Room::~Room() { } BOOL Room::Begin(DWORD Index) { CThreadSync Sync; m_RootUser = NULL; m_Index = -1; m_IsGameStarted = FALSE; m_IsRoomStarted = FALSE; IsEmpty = TRUE; m_IsFull = FALSE; m_CurrentUserCount = 0; ZeroMemory(m_Title, sizeof(WCHAR) * 32); ZeroMemory(m_RoomUse...
#include<iostream> #include<stack> #include<queue> #include<unistd.h> using namespace std; template<class T> struct BinTreeNode { BinTreeNode<T>* _pLeft; BinTreeNode<T>* _pRight; T _data; BinTreeNode(const T& data) :_data(data) ,_pLeft(NULL) ,_pRight(NULL){} }; template<class T> class BinTree { ...
/* -*- 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. */ #ifndef AUTO_WINDOW_RELOAD_CONTROLLER_H #define AUTO_WINDOW_RELOA...
#include "brickstest.hpp" #include <bricks/core/value.h> using namespace Bricks; TEST(BricksCoreValueTest, Basic) { Value value(0); EXPECT_EQ(0, value.GetPointerValue()); EXPECT_EQ(0, value.GetByteValue()); EXPECT_EQ(0, value.GetInt16Value()); EXPECT_EQ(0, value.GetInt32Value()); EXPECT_EQ(0.0f, value.GetFloat...
#include<stdio.h> int a,b,c; main() { scanf("%d %d",&a,&b); c=a*24+b; printf("%d",c); }
#include<stdio.h> #include<stdlib.h> typedef struct nodo //definir un tipo de dato que es una estructura llamada nodo { int dato;//lo que voy a usar en la pila struct nodo *sig;//apuntador de tipo nodo }tipoNodo;//lo rebautizo como tipoNodo typedef tipoNodo *apNdo; typedef tipoNodo *pila; void Push(pila *p,...
#include <iostream> #define MAC 100 using namespace std; /* Bài 334/90/SBT Thầy NTTMK:Viết hàm đếm số lượng số dương trong ma trận các số thực. Bài 335/90/SBT Thầy NTTMK:Đếm số lượng số nguyên tố trong ma trận các số nguyên. Bài 336/90/SBT Thầy NTTMK:Đếm tần số xuất hiện của một giá trị x trong ma trận các số thực...
/* Blink the LED in R/G/B */ #include "tdm_pwmio.h" #include "tdm_lights.h" /* * declare PWM and LED */ tdm::PwmIO _pwm; tdm::Led _led; /* * prep some colours for the blink */ #define NUM_COLORS 3 tdm::rgb_color_t _colors[NUM_COLORS] = {tdm::_COLOR_RED, tdm::_COLOR_GREEN, tdm::_COLOR_BLUE}; int _index=0; /* ...
// // Created by zhanggyb on 16-9-19. // #include "test.hpp" #include <skland/core/color.hpp> #include <skland/graphic/paint.hpp> #include <skland/graphic/canvas.hpp> using namespace skland; Test::Test() : testing::Test() { } Test::~Test() { } TEST_F(Test, constructor_1) { ASSERT_TRUE(true); }
// 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 "shader.h" #include <fstream> #include <streambuf> #include <sstream> #include <assert.h> #include <glm/gtc/type_ptr.hpp> #include "renderer.h" library<shader> shader_library(512u); shader::shader(std::string path) { std::ifstream t(path); assert(t.is_open()); std::string buffer((std::istr...
// // Created on 21/01/19. // #pragma once #include <armadillo> namespace Algorithms { class SoftImpute { public: static void doSoftImpute(arma::mat &X, uint64_t max_rank); }; } // namespace Algorithms
== マーケティング(販売チャネル作成) 販売チャンネルは技術書典のサークルページです。目次を決めたときと同様、びば・KANEの二人が中心となり、サークルページと宣伝文の作成を公開イベントで行いました。夜のイベントにも関わらず計18名の方にご参加いただき、様子を見ていただきました。 サークルページを作るときには、BOOTHの中でも書きっぷりのうまい人をまねて作るようにしました。 「りあクト!」の大岡さん「わかばちゃんシリーズ」の湊川さん、お二人のページを参考に作っています。 情報は簡潔に、そしてどんなサークルかが一目でわかる文章を。 //image[chap-making-marketing/circlepage]["サークル...
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
// Created by: Peter KURNEV // 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 Lesser General Public License version 2.1 as published // by the Free S...
// Created on: 1997-03-05 // Created by: Robert COUBLANC // Copyright (c) 1997-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...
#pragma once #include "pch.h" #include "Exceptions.h" using namespace std; struct TickMsg { TickMsg(TickMsg&& src) = default; ~TickMsg() = default; string symbol; double price {}; double quantity {}; time_t timestamp {}; // TODO Rename or override with << const string& ToString() const { throw runtime_e...
// Copyright (c) 2019 The NavCoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef DAOPAGE_H #define DAOPAGE_H #include "communityfundcreateproposaldialog.h" #include "communityfundcreatepaymentrequestdia...
// // main.cpp // 3.奖学金 // // Created by 赵志诚 on 2020/12/21. // Copyright © 2020年 赵志诚. All rights reserved. // #include<iostream> #include<algorithm> using namespace std; struct node { int yuwen,shuxue,yingyu; int num,sum; }student[100]; int cmp(node x,node y) { if(x.sum!=y.sum) return x.sum>y.sum; ...
/* Copyright (c) 2015-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt */ #include "TestProgressObserver.hpp" #include "Test.hpp" #include <iostream> #include <sstream> using namespace std; namespace Ishiko { namespace { void Wri...
#pragma once #include <iostream> #include <string> #include <iomanip> using namespace std;
// // Created by OLD MAN on 2020/2/20. // //如果今天是星期三,后天就是星期五;如果今天是星期六,后天就是星期一。我们用数字1到7对应星期一到星期日。给定某一天,请你输出那天的“后天”是星期几。 // //输入格式 // 输入第一行给出一个正整数 D(1≤D≤7),代表星期里的某一天。 // //输出格式 // 在一行中输出 D 天的后天是星期几。 #include <iostream> using namespace std; int main(){ int d; cin>>d; switch (d){ case 1: ...
#include "Canny_edge_detector.h" Edge_detector::Edge_detector(CImg<unsigned char>& image, float sigma_, float tlow_, float thigh_){ srcImg = image; height = image.height(); width = image.width(); sigma = sigma_; tlow = tlow_ * MAG_SCALE + 0.5f; thigh = thigh_ * MAG_SCALE + 0.5f; } Edge_detector::~Edge_detector(...
#include <string> #include <iostream> #include <vector> #include <cctype> using namespace std; bool isMul(int n){ if(n%3==0){ return true; } return false; } void find(int ar[],int n){ // int n = sizeof(ar)/sizeof(ar[0]); // int ar[A.size()+1]; // for(int i =0;i<A.size();i++){ // ar[i]...
#include<iostream> using namespace std; int main() { int num; do { int b,fac=1; cout<<"Enter positive number\n"; cout<<">"; cin>>num; for(b = num; b >= 1; b--) { fac = fac*b; } cout<<fac<<endl; } while(num != 0); return 0; }
#include <string> #include <iostream> #include <iomanip> #include <cmath> #include <fstream> #include <exception> #include <random> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/program_options.hpp> #include <sstream> #include <unistd.h> #include "simpleLogger.h" #include "Med...
#ifndef myConfig_h__ #define myConfig_h__ #include "config.h" #include "Singleton.h" class CxMyConfig :public XsConfig,public Singleton<CxMyConfig> { public: CxMyConfig(); public: static int proxy_type; static bool enable_ssl; }; extern CxMyConfig theConfig; #endif // myConfig_h__
#pragma once #include "IInteractable.h" #include "IEvent.h" /* Bed is the interactable that will bring the day to an end when the player interacts with it. */ typedef IEvent<void()> DayOverEvent; #define DAY_OVER(callbackFunction) std::function<void()>(std::bind(callbackFunction, this)) class Bed : public IIntera...