text
stringlengths
8
6.88M
#include "com_wind_ndk_opengles_n_NativeGLRenderer.h" #include "GLLooper.h" #include <android/native_window.h> #include <android/native_window_jni.h> #include "android/bitmap.h" #include "global.h" #ifdef __cplusplus extern "C" { #endif ANativeWindow* window=0; JNIEXPORT void JNICALL Java_com_wind_ndk_opengles_n_Nat...
#pragma once class Student{ };
// Nama : Naufal Dean Anugrah // NIM : 13518123 // Tanggal : 23 Januari 2020 // Topik : Pengenalan class #include <iostream> #include "Polinom.hpp" using namespace std; // ctor, cctor, dtor, op= // untuk konstruktor, inisialisasi seluruh nilai koefisien dengan 0. Polinom::Polinom() : Polinom(0) {} // ct...
#include <bits/stdc++.h> using namespace std; int main() { long long a,i,sum; while(scanf("%lld",&a)!=EOF){ if(a==0) break; sum=0; for(i=1;i<=a;i++){ sum=sum+(i*i); } cout<<sum<<endl; } return 0; }
#ifndef TIME_H #define TIME_H #include "commun.h" class time { static double _time_prev; static double _time_fps_prev; static uint _fps; static float _dt; public: static double get_time(); static float get_delta_time(); static void update(); }; #endif //!TIME_H
/* * 机器人可回退 */ const int maxn = 101; class Solution { public: int mark[maxn][maxn]; int movingCount(int k, int rows, int cols) { if(rows <= 0 || cols <= 0 || k<=0){ return 0; } //构建数组 vector<vector<int> > mat; for(int i=0; i<rows; ++i){ vecto...
// Created on: 2002-04-17 // Created by: Alexander Kartomin (akm) // Copyright (c) 2002-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 ver...
//http://codeforces.com/problemset/problem/762/A #include <iostream> #include <map> #include <algorithm> #include <vector> using namespace std; int best = 1; map<string, vector<string>> tree; map<string, string> parent; void convertLower(string& str) { transform(str.begin(), str.end(), str.begin(), ::tolower); } v...
#ifndef MJR_GEN_STACK #include <iostream> #include <string> using namespace std; template <class T> class GenStack{ public: // Constructors GenStack(); GenStack(int maxSize); // Destructor ~GenStack(); // Add to stack void push(T item); // Remove top of stack T pop(); // View...
#include<iostream> #include<cmath> using namespace std; double Radius(double x, double y); double Theta (double x, double y); class Cartesian; class Polar; class Polar { public: double a; double t; Polar(float newa, float newt) { a = newa; t = newt; } ...
#include<bits/stdc++.h> using namespace std; typedef struct Node{ int x,y; }node; int L,n,m; int useif[105]; int link[105]; node pl[105]; node pi[105]; node line[105][2]; int biao[105][105]; void input(){ scanf("%d%d",&n,&m); scanf("%d%d",&pl[0].x,&pl[0].y); int j=0; for(int i=1;...
/* $License: Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved. See included License.txt for License information. $ */ /** * @defgroup Results_Holder results_holder * @brief Motion Library - Results Holder * Holds the data for MPL * * @{ * @fi...
// // parser.cpp // mini-sql // // Created by Дмитрий Маслюков on 17.02.2020. // Copyright © 2020 Дмитрий Маслюков. All rights reserved. // #include "parser.h" #define jsondb 1 #include <cstdarg> Parser::astnode * create_node_va(Parser::asttype type, int children, va_list va){ Parser::astnode * node = new Par...
#include "Divide.h" Divide::Divide() { value1 = 0; value2 = 0; } Divide::Divide(Base* input1, Base* input2) { value1 = input1; value2 = input2; } double Divide::evaluate() { return (value1->evaluate() / value2->evaluate()); }
#include "cxxtest/TestSuite.h" #include "tinyxml/tinyxml.h" #include "neural_network/cpu/NeuralNetworkCpu.h" #include "neural_network/NeuralNetworkConfiguration.h" #include "utility/TextAccess.h" class NeuralNetworkCpuTestSuite : public CxxTest::TestSuite { public: void test_neural_network_can_be_loaded_from_text_a...
#ifndef manifold_h #define manifold_h #include <tr1/memory> #include <vector> #include <tr1/array> #include <Eigen/Core> #include <string> #include "Intersection.h" #include "PointTransport.h" using Eigen::Matrix3d; using Eigen::Vector3d; //TODO: It might be possible to make it a template, given the address of a cons...
#ifndef TREEFACE_STRING_CAST_H #define TREEFACE_STRING_CAST_H #include "treeface/base/Common.h" #include "treeface/base/Enums.h" #include "treeface/gl/Enums.h" #define GLEW_STATIC #include <GL/glew.h> #include <treecore/String.h> #include <treecore/StringCast.h> #include <FreeImage.h> namespace treecore { template<...
#include "diode.h" #include <QPainter> #include <QDebug> Diode::Diode(QWidget *parent) : QWidget(parent) { //qDebug() << "Création de la diode!" ; m_isClicked = false; power = true; } void Diode::paintEvent(QPaintEvent *event) { QPainter p(this); p.setPen(Qt::black); p.s...
#include <cstdlib> #include <string> #include "env.hpp" double getEnvDouble(std::string const& envName, double const& defaultValue){ // Returns environment variable as double. // (from https://stackoverflow.com/questions/5866134/how-to-read-linux-environment-variables-in-c) const char* val = std::getenv(envNam...
#ifndef AWS_NODES_NULLCONSTANT_H #define AWS_NODES_NULLCONSTANT_H /* * aws/nodes/nullconstant.h * AwesomeScript Null Constant * Author: Dominykas Djacenka * Email: Chaosteil@gmail.com */ #include "expression.h" namespace AwS{ namespace Nodes{ class NullConstant : public Expression{ public: NullConstan...
#include "threads.h" Threads::Threads(int n) : stop_(false), max_threads_(n) { pthread_mutex_init(&mtx_, NULL); pthread_cond_init(&cond_, NULL); // mtx_ = PTHREAD_MUTEX_INITIALIZER; // cond_ = PTHREAD_COND_INITIALIZER; tid_ = new pthread_t[n]; for (int i = 0; i < n; ++i) { pthread_c...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 2000-2008 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #include "core/pch.h" #ifdef OPERABO...
#include "../include/cmpro/deep_process.h" DeepProcess::DeepProcess() :config(),converter(),seqconverter(),model_process(){ std::cout << "starting." << std::endl; rfleft = 0; rftop = 0; area_width = config.WIN_WIDTH; area_height = config.WIN_HEIGHT; detector = dlib::get_frontal_face_detector();...
/* Written by Anshul Verma, 19/78065 */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Correct Usage: ./main <filename>\n"); return -1; } struct stat dt; printf("\nFile Info\n"); ...
/*==================================================================== Copyright(c) 2018 Adam Rankin 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 limitati...
#ifndef COLORGROUP_H #define COLORGROUP_H #define INF 999999999 #include <vector> #include "segment.h" #include "distribution.h" #include <cstdio> #include <iostream> #include <algorithm> class ColorGroup { private: std::vector<std::pair<char, Numeric> > properties; std::vector<Segment*> mainSegments; Col...
// // TODO: // - unarmed posture // - relaxed posture // - turning in place too much, rely more on look angles? #include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" #include "AI_Manager.h" #include "AI_Util.h" #include "AI_Tactical.h" const idEventDef AI_ForcePosture ( "forcePosture", "d"...
#include "stdafx.h" #include "QsoTime.h" #include "Qso.h" QsoTime::QsoTime(Qso* qso) : QsoItem(qso), m_minutes(0) { } QsoTime::~QsoTime() { } bool QsoTime::ProcessToken(const string& token, Qso* qso) { QsoItem::ProcessToken(token, qso); // the time is a string "hhmm" // parse the stri...
// // Created by Yujing Shen on 28/05/2017. // #ifndef TENSORGRAPH_TENSORGRAPH_H #define TENSORGRAPH_TENSORGRAPH_H #include <vector> #include <map> #include <set> #include <string> #include <ctime> #include <cstdlib> #include <utility> #include <fstream> #include <type_traits> #include <cmath> #include <iostream> ...
#define _USE_MATH_DEFINES #include <opencv2/highgui.hpp> #include <opencv2/imgcodecs.hpp> #include <algorithm> #include <chrono> #include <iomanip> #include <iostream> #include <string> #include <vector> #include "color.hpp" #include "histo.hpp" #include "intensity.hpp" using namespace std; using namespace cv; voi...
#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 show(x) {for(auto i: x){cout << i << " ";} cout<<endl;} #define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;} typedef long l...
#pragma once #include <iberbar/Lua/LuaBase.h> namespace iberbar { class __iberbarLuaApi__ CLuaTable { public: CLuaTable( lua_State* L, int idx ); //~CLuaTable(); public: bool IsTable(); lua_Integer GetInteger_KeyStr( const char* key ); lua_Number GetNumber_KeyStr( const char* key ); const char* GetS...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- // // Copyright (C) 2006 Opera Software AS. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. // // Adam Minchinton, Huib Kleinhout // #ifndef __DESKTOP_SPEEDDIAL_H__ ...
/** * @file Card.cpp * @author Jan Zarsky (xzarsk03@stud.fit.vutbr.cz) * Andrei Paplauski (xpapla00@stud.fit.vutbr.cz) * @brief Implementation of class Card */ #include "Card.hpp" #include <iostream> namespace solitaire { /** Construct card @param cs Card suit @param value Value...
#ifndef RECTANGLE_HPP #define RECTANGLE_HPP class Rectangle { private: int width; int height; public: Rectangle(); Rectangle(int w,int h); void set_width(int w); void set_height(int h); int area(); int perimeter(); int get_w(){ return width; ...
// // Edge.cpp // TEST // // Created by ruby on 2017. 10. 13.. // Copyright © 2017년 ruby. All rights reserved. // #include "Edge.hpp" void Edge::add_mousse(string mousse){ for (int i = 0; i < 3; i++) { if (this->mousse[i] == "") { this->mousse[i] = mousse; break; } ...
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; ll dp[6101][6101][2]; int main() { ll t; cin>>t; while(t--){ string a; cin>>a; memset(dp,1,sizeof(dp)); ll n = a.length(); ll left=-1,right=-1; ll max = 1; for(ll gap=1;gap<=n...
// // ButtonWithSprite.h // Zengine // // Created by zhusu on 15/1/27. // // #ifndef __Zengine__ButtonWithSprite__ #define __Zengine__ButtonWithSprite__ #include "cocos2d.h" USING_NS_CC; class ButtonWithSprite : public CCSprite { public: static ButtonWithSprite* create(int id, const char* name,float scal...
/*************************************************************************** * Copyright (C) 2009 by Dario Freddi * * drf@chakra-project.org * * * * This pr...
//------------------------------------------------------------------------------ // create ref colorplanes with yuv and pseudorgb // 2016-06-25 11:04:03 parik //------------------------------------------------------------------------------ #include <iostream> #include <string> #include <fstream> #include <cstdlib> #i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef VEGAD3D10WINDOW_H #define VEGAD3D10WINDOW_H #ifdef VE...
#include <cstdlib> #include <cmath> #include "trm/subs.h" #include "trm/constants.h" #include "trm/binary.h" /** * kepler_omega computes the Keplerian angular velocity a distance \b r * from a point mass of mass \b m. * \param m mass of object (solar masses) * \param r distance from object (solar radii) * \return...
//car.h class Car { private: int _speed, _direction; public: Car(); Car(int speed, int direction); ~Car(); };
#pragma once #if !defined ( __Tile_H__ ) #define __Tile_H__ #include "Common.h" #include "DxTexture.h" class Tile { public: enum TileState { occupied, blocked, empty, trapped, occupiedTrap, }; public: Tile (); ~Tile (); bool init (); int x () { return myXPos; } i...
#include <stdio.h> #include <stdlib.h> main () { /*Esta com erro de lógica */ float nota1, nota2, media; printf ("Informe a primeira nota: "); scanf ("%f",&nota1); printf ("Informe a segunda nota: "); scanf ("%f",&nota2); media = (nota1 + nota2)/2; printf ("Média igual a: %f\n",media); if (media >=...
#include "Button.h" #include <UIFactory.h> using namespace uth; using namespace pmath; Button::Button(const ButtonCallback& callback) :Component("clickButton") ,m_Type(ButtonType::Click) { } Button::Button(ButtonType type, const ButtonCallback& callback) : Component("generalButton") , m_Type(type) , m_callb...
#ifndef DESIGNPATTERN_OBSERVER_OBSERVER_H #define DESIGNPATTERN_OBSERVER_OBSERVER_H #include "iobserver.h" #include <iostream> namespace DesignPatter { class Observer : public IObserver { public: virtual bool Update(const std::string& data) { std::cout << "Update: " << data << std::endl; return true; } }; ...
//Lecture 9 supplementary program #include <iostream> #include <string> #include <cmath> using namespace std; int main() { //example 1 /* short unsigned int i = 0; // short only uses 2 bytes instead of 4, unsigned means the value cannot be negative. cout << i-- << endl; // outputs 0 since it is still a post de...
/************************************************************************* > File Name: mytime3.h > Author: JY.ZH > Mail: xw2016@mail.ustc.edu.cn > Created Time: 2018年07月19日 星期四 20时48分19秒 ************************************************************************/ #ifndef MYTIME3_H_ #define MYTIME3_H_ #...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup" -*- * * 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 INPUTMANAGER_MODULE_H #define INPUTMANAGER_MOD...
#ifndef RENDERAREA_H #define RENDERAREA_H #include <QWidget> #include <QColor> // default code on creation of the project class RenderArea : public QWidget { Q_OBJECT public: // all our shapes from our gui enum ShapeType {Ark, Polygon, Cross, Name, Ellipse, Square, Rectangle}; // default code on crea...
#ifndef AFX_VIEWING_H_ #define AFX_VIEWING_H_ #include <stdio.h> class View { class Vec3 // structure for eye, vat, vup { public: double ptr[3]; void set(double *v) { for (size_t i = 0; i<3; i++) ptr[i] = v[i]; } double* add(double* v, double mul) { double result[3]; fo...
// // Created by OLD MAN on 2020/1/7. // //小蒜给了你一个整数,要求从个位开始分离出它的每一位数字。 // //输入格式\ //输入一个整数,整数在 1 到 10^8 之间。 // //输出格式\ //从个位开始按照从低位到高位的顺序依次输出每一位数字。数字之间以一个空格分开。 #include <iostream> using namespace std; int main(){ long a; cin>>a; while (a > 0){ cout<<a % 10<<" "; a = a / 10; } }
#pragma once #include<iostream> using namespace std; class MacAddress { private: char address[17]; public: MacAddress(); MacAddress(const char*); const char* getAddress()const; bool operator<(const MacAddress&) const; bool operator==(const MacAddress&) const; bool operator>(const MacAddress&) const; ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2009 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #ifdef SVG_SUPPORT #include "modules/s...
#ifndef AWS_NODES_FUNCTIONCALL_H #define AWS_NODES_FUNCTIONCALL_H /* * aws/nodes/functioncall.h * AwesomeScript Function Call Expression * Author: Dominykas Djacenka * Email: Chaosteil@gmail.com */ #include <list> #include <string> #include "expression.h" namespace AwS{ namespace Nodes{ class FunctionCall :...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n, m, c; cin >> n >> m >> c; vector<int> b; vector<int> a[21]; for(int i = 0; i < m; i++) { int tmp; cin >> tmp; b.push_back(tmp); } for(int i = 0; i < n; i++)...
#ifndef RESULTWIDGET_HPP #define RESULTWIDGET_HPP #include <QWidget> #include <boost/weak_ptr.hpp> class Profile; class Simulation; class QwtPlot; class QwtPlotCurve; class ResultWidget : public QWidget { Q_OBJECT public: typedef boost::shared_ptr<QwtPlotCurve> plotcurve_sp; explicit ResultWidget(QWid...
#include "stdafx.h" #include "ContestConfigTests.h" #include "StringUtils.h" #include "ContestConfig.h" ContestConfigTests::ContestConfigTests() : TestBase("ContestConfigTests") { } ContestConfigTests::~ContestConfigTests() { } bool ContestConfigTests::Setup() { if (SetupComplete()) return SetupStatus();...
#ifndef _BIT_H_ #define _BIT_H_ #include <cstdint> typedef uint8_t byte_t; //************************************************************ class BitRef{ byte_t *byte; uint8_t bit_index; public: BitRef(byte_t *_byte, byte_t _bit_index) : byte(_byte), bit_index(_bit_index) {} BitRef& operator=(bool value){ ...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...
#include<iostream> using namespace std; class gadi{ public: gadi(char* n,int ns,float rt): rate(rt) { int k=(ns<=15)?ns:15; for(int j=0;j!=k;j++) name[j]=n[j]; name[k]='\0'; } gadi(const gadi& a) { for(int i=0;i!=15;i++) name[i]=a.name[i]; ...
#include <bits/stdc++.h> using namespace std; int main(){ int n; double m; cin >> n >> m; n %= 12; double ans = abs(n*30 - m*5.5); cout << min(ans, 360.0-ans) << endl; return 0; }
#ifndef DATAMODEL_H #define DATAMODEL_H #include <QMainWindow> class QSqlTableModel; namespace Ui { class DataModel; } class DataModel : public QMainWindow { Q_OBJECT public: explicit DataModel(QWidget *parent = 0); ~DataModel(); private slots: void on_submitButton_clicked(); ...
#ifndef _Configure_H #define _Configure_H #include <time.h> #include "Util.h" #include "GameConfig.h" #define MAX_ALLOC_NUM 8 class Configure : public GameConfig { public: static Configure* getInstance() { static Configure * configure = NULL; if (configure == NULL) configure = new Configure(); return co...
#pragma once namespace aeEngineSDK { class AE_GRAPHICS_EXPORT aeVertexBuffer : public aeBuffer { protected: aeVertexBuffer(); friend class aeGraphicsAPI; friend class aeRenderer; public: aeVertexBuffer(const aeVertexBuffer& B); virtual ~aeVertexBuffer(); }; }
#include "ns3/core-module.h" #include "ns3/point-to-point-module.h" #include "ns3/mobility-module.h" #include "ns3/applications-module.h" #include "ns3/wifi-module.h" #include "ns3/network-module.h" #include "ns3/csma-module.h" #include "ns3/internet-module.h" #include "ns3/bridge-helper.h" #include "ns3/stats-module.h...
#ifndef SHOC_XOODYAK_H #define SHOC_XOODYAK_H #include "shoc/util.h" namespace shoc { struct Xoodyak { using word = uint32_t; static constexpr size_t SIZE = 32; void init(); void feed(const void *in, size_t len); void stop(byte *out, size_t len = SIZE); void operator()(const void *in, size...
// Copyright (c) 2020 The Orbit Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ORBIT_LINUX_TRACING_PERF_EVENT_PROCESSOR_H_ #define ORBIT_LINUX_TRACING_PERF_EVENT_PROCESSOR_H_ #include <ctime> #include <memory> #include <que...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "GridContainer.h" #include "GameGridBase.generated.h" UCLASS() class NEWTD_API AGameGridBase : public AActor { GENERATED_BODY() protected: UPROPERTY(Blue...
#include <cassert> #include <iostream> #include <vector> using namespace std; int countPairs(vector<int>& nums, vector<int>& aux, int l, int mid, int r) { for (int i = l; i <= r; ++i) { aux[i] = nums[i]; } int result = 0; int i = l; int j = mid + 1; for (int k = l; k <= r; ++k) { ...
#ifndef __LTabelView__LyfTableView__ #define __LTabelView__LyfTableView__ #include "publicDef/PublicDef.h" #include "LyfIndicator.h" #include "LyfIndexPath.h" #include "LyfTableViewCell.h" typedef enum { TableViewEditNone = 0, TableViewEdit }TableViewEditState; class LyfTableView; class LyfTableViewCell; c...
#include "qfont.h" namespace qEngine { qFont::qFont(void) { } bool qFont::loadResource(string strName) { string strINIFile = strName.substr(0, (strName.length() - 4)); strINIFile += ".ini"; if(m_sFontInfo.s_CMFontWidth.loadValuesFromFile(strINIFile)) { m_sFontInfo.s_strFilename = strName; retur...
#pragma once #include <QWidget> namespace Ui { class PassedTestsForm; } class PassedTest; class PassedTestsModel; class PassedTestsForm : public QWidget { Q_OBJECT public: explicit PassedTestsForm(QWidget *parent = nullptr); ~PassedTestsForm(); PassedTestsModel *getModel() const; void setModel...
// Created on: 2001-07-25 // Created by: Julia DOROVSKIKH // Copyright (c) 2001-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...
#include "Barrel.hpp" #include <iostream> Barrel::Barrel(float headRadius, float bellyRadius, float height, Color color, Material material) : Object(Transform(), color, material) { this->headRadius = headRadius; this->bellyRadius = bellyRadius; this->height = height; barrelTextureName = 0; wood...
#include <pybind11/pybind11.h> #include <pybind11/operators.h> #include <pybind11/eigen.h> #include <pybind11/stl.h> #include "manif/SE3.h" #include "bindings_optional.h" #include "bindings_lie_group_base.h" #include "bindings_tangent_base.h" namespace py = pybind11; void wrap_SE3(py::module &m) { using SE3d = ma...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2008 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ /** \file * * \brief Implement the global object for the memtools m...
/* _ _ | |__ | |__ __ _ __ _ _ _ __ _ | '_ \| '_ \ / _` |/ _` | | | |/ _` | | |_) | | | | (_| | (_| | |_| | (_| | |_.__/|_| |_|\__,_|\__, |\__, |\__,_| |___/ |___/ */ #include<bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-lo...
// // Created by drunkgranny on 08.04.16. // #include <iostream> using namespace std; int pointer() { int updates = 6; int *p_updates; p_updates = &updates; cout << "Values: updates = " << updates << endl; cout << "Values: *p_updates = " << *p_updates << endl; cout << endl; cout << "Ad...
#include "msg_0x0d_playerpositionandlook_tw.h" namespace MC { namespace Protocol { namespace Msg { PlayerPositionAndLook::PlayerPositionAndLook() { _pf_packetId = static_cast<int8_t>(0x0D); _pf_initialized = false; } PlayerPositionAndLook::PlayerPositionAndLook(double _x, double _y, double _stance, double _z, floa...
#include "trigonometry.h" // import file to test #include <vector> // used for test input #include "ut.hpp" // import functionality and namespaces from single header file using namespace boost::ut; // provides `expect`, `""_test`, etc using namespace boost::ut::bdd; // provides `given`, `when`, `then` #include <c...
#pragma once #ifdef VK_USE_PLATFORM_ANDROID_KHR #include <android/log.h> #include <kompute_vk_ndk_wrapper.hpp> // VK_NO_PROTOTYPES required before vulkan import but after wrapper.hpp #undef VK_NO_PROTOTYPES static const char* KOMPUTE_LOG_TAG = "KomputeLog"; #endif #include <vulkan/vulkan.hpp> // Typedefs...
string nextP(vector<int> &v, string s, int k, vector<int> fact) { if (v.empty()) return s; //or iteratively while !v.empty() int n = v.size(); int idx = k / fact[n - 1]; s.append(to_string(v[idx])); k -= idx * fact[n - 1]; v.erase(v.begin() + idx); return nextP(v, s, k, fact); } string Solution...
#include<stdio.h> #include<conio.h> void Adder(char*, char*); void main(){ char arr1[50]; char arr2[50]; gets_s(arr1); gets_s(arr2); Adder(arr1, arr2); _getch(); } void Adder(char *a, char *b){ int i = 0; int j = 0; int k = 0; char added[50]; while (a[k] != '\0') { added[k] = ((int)a[i]-48) +((int)b[i]...
#include "Constants.h" #include "llvm/ADT/StringRef.h" #include "Constant.h" #include "llvm/ADT/ArrayRef.h" #include "LLVMContext.h" #include "Type.h" #include "Constant.h" #include "DerivedTypes.h" #include "Value.h" #include "Use.h" #include "Function.h" #include "BasicBlock.h" #include "Instruction.h" #include <mscl...
// From _Learning OpenCV, 2e_ #include <iostream> #include <cstdlib> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; int main(int argc, char *argv[] ) { if( argc < 2 ) { return EXIT_FAILURE; } Mat img = imread(argv[1],-1); if( img.empty() ) { return EXIT_FAILURE...
#include <iostream> #include "MyClass.h" using namespace std; int main() { cout << "Hello World!" << endl; MyClass * first = new MyClass(); cout<< first->KolStr() <<endl; first->PrintStr(); first->debug(); return 0; }
// // Created by ryan on 7/29/17. // #include "gtest/gtest.h" #include "gmock/gmock.h" #include "s3loader.cpp" class MockVTAllocator : public VTAllocator { public: MockVTAllocator() { } //MOCK_METHOD1(alloc, void*(size_t size)); void *alloc(size_t size) { return std::malloc(size); } }; c...
#include <stdio.h> // basic I/O #include <stdlib.h> #include <sys/types.h> // standard system types #include <netinet/in.h> // Internet address structures #include <sys/socket.h> // socket API #include <arpa/inet.h> #include <netdb.h> // host to IP resolution #include <string.h> #include <unistd.h> #include <ctype.h> #...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" #include "WidgetNoteGradeBase.generated.h" UENUM(BlueprintType) enum class EGrade : uint8 { COOL, FINE, SAFE, BAD, MISS }; /** * */ UCLASS() class DIVAR_API UWi...
#include <iostream> #include <vector> #include <queue> using namespace std; /* → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → */ #define int long long int #define ld long double #define F first #define S second #define P pair<int,int> #define pb push_b...
// Copyright (c) 2021 ETH Zurich // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <pika/config.hpp> #include <pika/modules/execution.hpp> #include <pika/testing.hp...
class Category_646 { duplicate = 625; }; class Category_611 { duplicate = 625; };
// // Grenade.hpp for grenade in /home/deneub_s/cpp_indie_studio/include // // Made by Stanislas Deneubourg // Login <deneub_s@epitech.net> // // Started on Thu Jun 1 07:50:34 2017 Stanislas Deneubourg // Last update Thu Jun 1 08:06:35 2017 Stanislas Deneubourg // #ifndef GRENADE_HPP #define GRENADE_HPP #inclu...
// modulus.js // return remainder of two numbers function modulus(a, b) { return a % b; };
#include <bits/stdc++.h> #define WIN 3 #define DRAW 1 #define LOSE 0 using namespace std; int a[100][100]; int m, n; void input(){ cin >> m >> n; for (int i = 0; i < m; ++i) for (int j = 0; j < n; ++j) cin >> a[i][j]; } int main(){ int highestScore = -1; int champion; freopen("BODA.inp", "r", st...
/* * Copyright (c) 2016, The Regents of the University of California (Regents). * 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 a...
/** * @file test_icethread.cpp * * @author Fan Kai(fk), Peking University * */ #include <IceUtil/Mutex.h> #include <IceUtil/RecMutex.h> #include <IceUtil/Thread.h> #include <IceUtil/Exception.h> #include <iostream> using namespace std; class MT : public IceUtil::Thread { public: void run() { cout ...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #pragma once #include "GameFramework/GameMode.h" #include "CarolloGameMode.generated.h" UCLASS(minimalapi) class ACarolloGameMode : public AGameMode { GENERATED_BODY() public: ACarolloGameMode(); };