text
stringlengths
8
6.88M
#pragma once #include <QtCore/QList> #include <QtCore/QObject> #include "SIMPLib/Common/PipelineMessage.h" #include "SIMPLib/Common/SIMPLibSetGetMacros.h" #include "SIMPLib/SIMPLib.h" #include "SIMPLib/SIMPLibVersion.h" class RemoveArraysObserver : public QObject { Q_OBJECT SIMPL_INSTANCE_PROPERTY(QList<Pipelin...
#ifndef _DepthStencil_State_H__ #define _DepthStencil_State_H__ class DepthStencilState { public: struct Desc { bool bDepthEnable; bool bDepthWriteEnable; GLenum DepthCompareFunc; bool bStencilEnable; bool bTwoSidedStencilMode; GLenum StencilFunc; ...
#include "../src/cinereader.h" #include "class_handle.hpp" #include <iostream> #include <stdio.h> void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { char cmd[64]; char filename[512]; if (nrhs < 1 || mxGetString(prhs[0], cmd, sizeof(cmd))) mexErrMsgTxt("First input should be a c...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.UI.WebUI.2.h" WINRT_EXPORT namespace winrt { namespace Windows::UI::WebUI { template <typename H> struct impl_ActivatedEventHandler : implements<impl_ActivatedEventHandler<...
// ***************************************************************************** // Module..: Leddar // /// \file LdConnectionInfoUsb.h /// /// \brief Connection information on Usb devices. /// /// \author David Levy /// /// \since January 2017 // // Copyright (c) 2017 LeddarTech Inc. All rights reserved. // **...
void setup() { Serial.begin(115200); } // TM_WDG_KEY_LOADING KO 0x12 0x34 0x01 0x82 0xFF 0x7B void loop() { byte message[] = {0x43, 0x12, 0x10, 0x85, 0xFF}; Serial.write(message, sizeof(message)); Serial.flush(); delay(1000); byte message2[] = {0x12, 0x43, 0x03, 0x85, 0x00, 0xCA, 0xFE, 0x7B}; Serial....
#include <bscheduler/api.hh> #include <bscheduler/base/error_handler.hh> #include "autoreg_app.hh" int main(int argc, char** argv) { using namespace bsc; install_error_handler(); types.register_type<autoreg::Autoreg_model<Real>>(); types.register_type<autoreg::Generator1<Real,autoreg::Uniform_grid>>(); types.regi...
#include "Farmer.h" Farmer::Farmer(Class* c) :Role(c) { } std::string Farmer::render() { return "Farmer " + classSelf->render(); } Farmer::~Farmer() { }
#include <bits/stdc++.h> #define ll long long const ll MOD = 1000000007; const ll INF = 1e18; using namespace std; template<typename T> void print(const T& t) { std::copy(t.cbegin(), t.cend(), std::ostream_iterator<typename T::value_type>(std::cout, " ")); cout << endl; } template<typename T> void print2d(con...
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** 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 ...
#include "mat4.h" namespace bne { namespace math { mat4::mat4() { for (int i = 0; i < 16; i++) elements[i] = 0.0f; } mat4::mat4(float d) { for (int i = 0; i < 16; i++) elements[i] = 0.0f; elements[0 + 0 * 4] = d; elements[1 + 1 * 4] = d; elements[2 + 2 * 4] = d; ...
/*====================================================================* - Copyright (C) 2001 Leptonica. 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 c...
#include <windows.h> #include "freeglut.h" #include <math.h> float odleglosc = 30.0; float katX = 0.00, katY = 0.00; bool l1 = false, l2 = false; #define PI_CONST 3.14159265358979323846 float katynaradiany(float alfa) { return alfa * (PI_CONST / 180); } void rysujSfere(GLfloat x, GLfloat y, GLfloat z, ...
#include "mainwindow.h" #include "ui_mainwindow.h" std::vector<std::string> split(const std::string &s, char delim) { std::stringstream ss(s); std::string item; std::vector<std::string> elems; while (std::getline(ss, item, delim)) { elems.push_back(item); // elems.push_back(std::move...
#include "stdafx.h" #include <windows.h> #include "RResource.h" #include "RMesh.h" #include "BThing.h" #include "BViewport.h" #include "BRenderingBatch.h" #include "RAsset.h" #define generic GENERIC #include "UWorld.h" #undef GENERIC #include "DMosesApp.h" #include "MosesMainCLI.h" #include "UXMLPars...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Components/StaticMeshComponent.h" #include "TankBarrel.generated.h" /** Is used to set maximum driving force, and to apply forces to the tank. */ UCLASS(meta = (BlueprintSpawnableComponent...
#include <Afx.h> #include <math.h> #include <stdio.h> #include <time.h> #include <string.h> #include <stdlib.h> #include "../include/proto.h" #include <windows.h> #define FFT_NOISE 0 /* Refine this noise floor later GRG */ /* GRG 10/12/01 Modified dsp_simplepp and pulsep...
#include <iostream> #include <string> int main(int argc, char * argv[]) { std::string s1; s1 = std::string(argv[0]) + std::string(argv[1]) + std::string(argv[2]); for (int i = 0; i < argc; i++) s1 += std::string(argv[i]) + " "; std::cout << s1 << std::endl; return 0; }
/*UserAsyncTest.cpp UserAsync copyright Vixac Ltd. All Rights Reserved */ #include "UserAsync.h" #include <gtest/gtest.h> #include "LocalNodeStore.h" namespace VI = vixac; namespace IA = vixac::ina; namespace IN = VI::inout; TEST(UserAsync, aTest) { IA::LocalNodeStore store; IA::UserAsync user(&store...
#ifndef MYGAME_H #define MYGAME_H #include "Game.h" #include "Renderer.h" #include "Importer.h" #include "DirectInput.h" #include "Timer.h" #include "Camera.h" #include "Mesh.h" #include "Node.h" #include "Scene01.h" #include "Scene03.h" #include "SkeletalAnimation01.h" namespace TestingGame { class MyGame : public ...
#include <iostream> #include <string.h> #include <vector> #include <string> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <thread> #include "DummyReducerClient.h" using namespace std; void DummyReducerClient::connect_to_reducer(string reducer_ip...
#include "image_viewer.hpp" ImageViewer::ImageViewer(const std::string& path){ dir_scanner.reset(new DirScanner(path)); update(); wm.reset(new WindowManager(cur_im.cols, cur_im.rows)); update(); std::cerr << "[ INFO] Moving to " << dir_scanner->getCurrentDir() << std::endl; } ImageViewer::~Imag...
#include <bits/stdc++.h> #define rep(i, x, y) for(int i = x; i <= y; i ++) #define rrep(i, x, y) for(int i = x; i >= y; i --) #define rep0(i, x) for(int i = 0; i < x; i ++) #define ll unsigned long long using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (...
/** * \breief Register timeseries objects and theri functuonality to Python * * Four timeseries objects are handled */ #include <jflib/datetime/date.hpp> #include <jflib/python/timeseries/timeseries_wrap.hpp> #include <jflib/python/ublas.hpp> #include <jflib/python/helpers.hpp> #include <jflib/pytho...
#include <iostream> #include <SFML/Graphics.hpp> #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ class HUD : public sf::Text{//HeadUp Display public : //float xPos; //float yPos; //float speed; //int direction; sf::Font font; HUD(std::string text); //void clou...
/************************************************************************* > File Name : IdAndDate.cpp > Author : YangShuai > Created Time: 2016年07月29日 星期五 19时30分23秒 > Description : ************************************************************************/ #include"Itsdata.h" #include"data_handle.h" ...
#include "Ritual.h" class DarkRitual: public Ritual { //concrete card public: DarkRitual(Player *o); };
// // Created by 王润基 on 2017/4/15. // #include "LightProjection.h" LightProjection::LightProjection(shared_ptr<World> world, shared_ptr<Camera> camera) : Renderer(world, camera) {} Color LightProjection::renderRay(Ray const &ray) const { auto result = world->tryGetFirstIntersectionPoint(ray); if(!result.succ...
/** * Copyright (C) 2017 Alibaba Group Holding Limited. All Rights Reserved. * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
#include <iostream> #include <fstream> #include <string> #include <vector> int main(void) { // Declare file variables std::string filename; std::ifstream inFile; // File open loop while (!inFile.is_open()) { std::cout << "Enter your file name: "; std::getline(std::cin, filename); inFile.open(filename); ...
//#define _DEBUG #include "chu_init.h" #include "gpio_cores.h" // instantiate switch, led GpoCore led(get_slot_addr(BRIDGE_BASE, S2_LED)); GpiCore sw(get_slot_addr(BRIDGE_BASE, S3_SW)); // function prototypes uint16_t ledInit(GpoCore *led_p, GpiCore *sw_p); // reset LED to rightmost position (SW0) uint32_t ledSpeed...
#pragma once #include "GL/glew.h" #include "../math/math.h" namespace core { namespace graphics { class Shader { private: unsigned int m_ShaderID; const char *m_VertexPath; const char *m_FragmentPath; public: Shader(const char *vertexPath, const char *fragmentPath); ~Shader(); void bin...
// Задание: посчитать число всех гирек заданного бинарного коромысла. #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <iostream> #define N 501 // Бинарное коромысло typedef struct BinCor { unsigned int length1; unsigned int length2; unsigned int weight1; unsigned int weigh...
#ifndef KINEMATICS_H #define KINEMATICS_H #include "MMath.h" #include <string> using namespace MMath; namespace Kinematics { static const unsigned int HEAD_JOINTS = 2; static const unsigned int ARM_JOINTS = 4; static const unsigned int TIME_STEP_GLOBAL = 40; static const unsigned int LEG_JOINTS = 6; static cons...
/******************************************************************************* * Cristian Alexandrescu * * 2163013577ba2bc237f22b3f4d006856 * * 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ...
#include <iostream> #include <stdlib.h> #include <string> class Object { public: int health; void setHealth(int x) { health = x; } void printHealth() { std::cout<<"Object's Health Level: " << health << std::endl; } };
#include <bits/stdc++.h> using namespace std; int main(){ int J, A; char *jerseysSizes = new char[1000001]; //cada posicao eh o tamanho do uniforme int satisfied=0; //declarando array 2d int **solicitedSizes = new int*[1000001]; //0 nao e 1 sim. tabela, colunas 0, 1 e 2 sao S,M,L respec...
#ifndef EMPLEADOS_H #define EMPLEADOS_H #include <string> /** * class Empleados * */ class Empleados { public: // Constructors/Destructors // /** * Empty Constructor */ Empleados (); /** * Empty Destructor */ virtual ~Empleados (); // Static Public attributes // // Pub...
#include "netlist.h" #include <iostream> #include <fstream> #include <cstring> #include <stdlib.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) char *trim(char *); /* parse_input - takes a filename which contains the complete circuit/netlist representation and * gener...
#include <iostream> #include <ctime> #include <gtest/gtest.h> #include "hs_math/linear_algebra/latraits/vector_eigen.hpp" #include "hs_math/linear_algebra/lafunc/arithmetic_eigen.hpp" #include "hs_math/fdjac/forward_finite_difference_sparse_jacobian_matrix_calculator.hpp" #include "hs_sfm/bundle_adjustment...
#include "nucleotide_count.h" namespace dna { counter::counter(string input) { string::iterator it; string temp = "ATCG"; for (it = temp.begin(); it < temp.end(); it++) data[*it] = 0; for (it = input.begin(); it < input.end(); it++) { if (*it == 'A' || *it == 'T' || *it == 'C' || *it == 'G') data[...
// 5. Longest Palindromic Substring // dp[i,j]: substring from i to j (inclusive) is palindromic // dp[i,j] = 1 if j == i // = (s[j] == s[i]) if j = i + 1 // = (s[j] == s[i]) && dp[i+1, j-1] if j > i + 1 class Solution { public: string longestPalindrome(string s) { if (s.empty()) return ""; ...
#ifndef M_PI #define M_PI 3.14159265358979323846 #endif #define PARI_OLD_NAMES #include <stdio.h> #include <iostream> #include <stdlib.h> #include <math.h> #include <pari/pari.h> //#include <pari.h> #include <time.h> #include <vector> #include <string.h> #include <sys/time.h> struct timeval tv; void print(GEN x){ ...
#ifndef STUDENT_H #define STUDENT_H #include <iostream> //#include "Department.h" const int CREDIT_POINTS_REQUIRED = 160; class Department; class Student { private: std::string firstName, lastName, address, id; // Decided that id should be string because sometimes the id starts with 0 int collegeStartYear, totalCr...
// 链式方法解决冲突的HashMap // 1.用数组形式建立哈希表 // 2.使用链式方法解决冲突 // 3.平方取中法通过字符串Hash函数求hash值(还有很多种其他的hash函数) #include <iostream> #include <string> #include <cstring> #include <stdlib.h> #include <time.h> using namespace std; typedef unsigned long(*GetKeyValue)(const string& ); //该类用来处理冲突的节点 template<class Type...
#include <iostream> #include <string> using namespace std; // caser cipher :) int main() { string s = "Abc123"; string res = ""; for (int i = 0; i < s.length(); i++) { res += s[i] + 3; } cout << res; return 0; }
#include "pch.h" #include <iostream> #include <atomic> #include <vector> #include <thread> using namespace std; struct AtomicAccount { atomic<int> balance; }; bool atomic_transfer(AtomicAccount& from, AtomicAccount& to, unsigned amount) { if (from.balance < amount) { return false; } from.balance -= amount; t...
// Copyright (C) 2017 Elviss Strazdins // This file is part of the Ouzel engine. #pragma once #include <windows.h> #include "input/CursorResource.h" namespace ouzel { namespace input { class CursorResourceWin: public CursorResource { public: virtual ~CursorResourceWin(); ...
#include "Operator.h" /* * Responsible for initializing Operator members to safe state */ Operator::Operator() { ID = ""; firstName = ""; lastName = ""; role = 'X'; } /* * Responsible for reading operator data from file into array of Operator structs * * * @param fileName: input filename * @param return: arra...
#define MODTYPE Valu // Standard IO Includes #include <stdio.h> #include <stdlib.h> #include <iostream> // Necessary Includes for Verilated #include "alu/Valu.h" #include "verilated.h" // Test Bench Class Definition and Implementation #include "inc/testbench.hpp" // Catch Library #include "inc/catch.hpp" void logO...
#ifndef _DX_GRAPHICS_H #define _DX_GRAPHICS_H #include <d3d9.h> #include <d3dx9.h> class Graphics { LPDIRECT3D9 _d3d; LPDIRECT3DDEVICE9 _d3ddev; LPDIRECT3DSURFACE9 _backBuffer; public: Graphics(); ~Graphics(); bool Init_DirectX3D(HWND hWnd, int width, int height, int fullscreen); LPDIRECT3D9 getDirect3D...
#pragma once #ifndef Stock_h #define Stock_h #include <iostream> #include <string> #include <vector> #include "TradeData.h" using namespace std; class Stock { private: string sSymbol; vector<TradeData> trades; public: Stock() {} Stock(const Stock& stock) { sSymbol = stock.sSymbol; trades = ...
#include "HelloPolycodeApp.h" #include <iostream> #include <sstream> HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : EventHandler() { core = new SDLCore(view, 640,480,false,false,0,0,90); CoreServices::getInstance()->getResourceManager()->addArchive("default.pak"); CoreServices::getInstance()->getReso...
/** MIT License Copyright (c) 2019 mpomaranski at gmail 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 limitation the rights to use, copy, modify, merge, ...
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { // Set up some numbers std::vector< int > v; v.reserve( 10 ); for ( int i = 0; i < 10; i++ ) v.push_back( i ); // Set the first half all equal to zero v[ 1 ] = v[ 2 ] = v[ 3 ] = v[ 4 ] = 0; cout << "Si...
#include <iostream> #include <iomanip> using namespace std; void main() { char N; cin >> N; if ('A' <= N && N <= 'Z') cout << 1; else if ('a' <= N && N <= 'z') cout << 1; else cout << 0; }
#include <ros/ros.h> #include <math.h> #include <cmath> #include <stdio.h> #include <nav_msgs/OccupancyGrid.h> #include <geometry_msgs/Pose2D.h> #include <std_msgs/Int8.h> #include "std_msgs/Bool.h" // global variables int cell_h, cell_w; float map_granularity; int** map = NULL; bool mapRead = false; bool readNewMap...
#include "device.h" #include "fmt.h" using namespace unet; std::error_code device::loop_rx(eth &recvr) { for (;;) { auto *buf = unet::buffer::create(2024); auto ec = read(*buf); if (ec) { delete buf; return ec; } recvr.recv(buf->begin()); delete buf; } } ssize_t device::transmit(buffer &buf, cons...
#include <iostream> #include <type_traits> struct foo { void m() { std::cout << "Non-cv\n"; } void m() const { std::cout << "Const\n"; } }; template <class T> void call_m() { T().m(); } int main() { call_m<foo>(); call_m<std::add_const<foo>::type>(); const int i = 5; int& j = std::remo...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
#ifndef CONSOLE_H #define CONSOLE_H #include "basicheaders.h" #include "radixSort.h" #define DEBUG 0 class Console { private: radixSort *workSort; public: Console(); void consoleExec(); }; #endif // CONSOLE_H
#include "Run_time_Framework.h" GLvoid CRun_time_Framework::background(float r, float g, float b) { glClearColor(r, g, b, 1.0f); // 바탕색을 'blue' 로 지정 glClear(GL_COLOR_BUFFER_BIT); // 설정된 색으로 전체를 칠하기 } GLvoid CRun_time_Framework::Draw_Ball() { GLfloat a[] = { 0.2,0.2,0.2,1.0 }; GLfloat d[] = { 0.8,0.8,0.8,1.0 }; ...
#pragma once #include "sshchannel.h" #include <QAbstractSocket> #include <QLoggingCategory> class QTcpSocket; Q_DECLARE_LOGGING_CATEGORY(logsshtunnelin) class SshTunnelIn : public SshChannel { Q_OBJECT private: quint16 m_localTcpPort; LIBSSH2_LISTENER *m_sshListener; quint16 m_port; QString m_n...
#include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> #include <string> #include <iostream> #include <glog/logging.h> #include "cnetnode.h" #include "cepollserver.h" #include <sys/epoll.h> CNetNode::CNetNode() { _read_buff = new MsgBuffer; _write_buff = new MsgBuffer; _fd = 0; _nodetype = kNodeType...
#include "CACLInteger.hpp" // 重载赋值 void CACLInteger::operator=(const CACLInteger &number) { for (int i = 0; i < number.bit; ++i) { num[i] = number.num[i]; } bit = number.bit; symbol = number.symbol; } void CACLInteger::operator=(const long long number) { const CACLInteger translatedNumbe...
// github.com/andy489 // https://www.spoj.com/problems/THRBL/ #include <iostream> using namespace std; #define ios ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr) #define mxN 50000 #define K 16 int main() { ios; int n, i(0), j(1), q, A, B, ans(0); cin >> n >> q; int arr[mxN]; ...
/*main.cpp*/ // // Daniela Chavez // U. of Illinois, Chicago // CS 251: Spring 2020 // Project #07 part 2: open street maps, graphs, and Dijkstra's alg // // References: // TinyXML: https://github.com/leethomason/tinyxml2 // OpenStreetMap: https://www.openstreetmap.org // OpenStreetMap docs: // https://wiki.opens...
#include<bits/stdc++.h> using namespace std; int main() { cout << sizeof(printf("anilsunilmmhh")) << endl; return 0; }
/* SH_MainWindow.cpp */ #include "include\sh_mainwindow.h" /* Constructor */ SH_MainWindow::SH_MainWindow(QWidget *parent) : QMainWindow(parent) { /* Setup main window ::FramelessWindowHint - We dont want any window frames */ setWindowFlags(Qt::FramelessWindowHint); setMinimumSize(1280, 1024); /* Using def...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "base.h" WINRT_WARNING_PUSH #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Management.3.h" WINRT_EXPORT ...
#include <cstdio> #include <algorithm> #include <vector> using namespace std; vector<int> v; int main() { //freopen("input.txt","r",stdin); int T,a; scanf("%d",&T); while(T--){ int n; v.clear(); scanf("%d%d",&n,&a); v.push_back(a); for(int i=1;i!=n;++i){ ...
/* Alexis Hunter * Coding Sample 1: Pig Latin Translator * letter.h */ #ifndef LETTER_H #define LETTER_H #include <iostream> #include <string> #include <iomanip> #include <vector> //#include "alphabet.h" using namespace std; class Letter { private: // Letter character char character; // If the l...
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "GameFramework/GameModeBase.h" // needed for access to splitscreen enum #include "TempCapstoneProject.h" #include "TempCapstoneProjectGameMode.generated.h" UCLASS(minimalapi) class ATempCapstoneProjectGameMode : publi...
/*************************************************************************** Copyright (c) 2020 Philip Fortier 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...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; const int N = 1000111; int n; int a[N], b[N], p[N], z[N]; int main() { scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", a + i); if (!a[i]) { b[i] = i; ...
#include <atomic> #include <cstddef> #include <functional> #include <ios> #include <mutex> #include <sstream> #include <string> #include <thread> #include <utility> #include <vector> #include <Windows.h> #include <tchar.h> #include "gflags/gflags.h" #include "glog/logging.h" #include "vix.h" #include "vm_basic_types....
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Management.Workplace.2.h" WINRT_EXPORT namespace winrt { namespace Windows::Management::Workplace { struct MdmPolicy { MdmPolicy() = delete; static bool IsBrowserAl...
// This file has been generated by Py++. #include "boost/python.hpp" #include "generators/include/python_CEGUI.h" #include "UBox.pypp.hpp" namespace bp = boost::python; void register_UBox_class(){ { //::CEGUI::UBox typedef bp::class_< CEGUI::UBox > UBox_exposer_t; UBox_exposer_t UBox_exposer = U...
#include <iostream> #include "foo_export.h" FOO_EXPORT int foo() { std::cout << "foo" << std::endl; return 0x42; }
#include "sns_utility.h" /** * @todo Write doccomment */ namespace sns { /** * @todo Write doccomment */ namespace utility { char* get_results_path(int filename_max_length, char* results_root_path, char* subfolder) { char* results_path = new char[filename_max_length]; if( !results_path) { return...
#ifndef TITLE_SEQ #define TITLE_SEQ #include "Child.h" namespace Sequence { class Parent; class Title:public Child { public: Title(){ b= 0;} ~Title() {}; Child* update(Parent* parent); int b; }; } #endif
#include "myArray.h" myArray::myArray(int size) { MaxSize = size; arr = new int[MaxSize]; CurrentSize = 0; } myArray::myArray(const myArray& obj) { MaxSize = obj.MaxSize; CurrentSize = obj.CurrentSize; arr = new int[MaxSize]; for (int i = 0; i < CurrentSize; i++) { arr[i] = obj.arr[i]; } ...
//--------------------------------------------------------------------------- //#include "stdafx.h" #pragma hdrstop #include "SeveralHandCmp.h" #include <io.h> #include <fcntl.h> //#include <time.h> #include <sys\stat.h> #include <share.h> stVerManyHands ***glSHCarrHands; //stVerManyHandsOld ***glSHCarrHandsOld; stVer...
#include <VirtualWire.h> const int pushButtonPin = 2; //PINO DIGITAL UTILIZADO PELO PUSH BUTTON const int txPin = 3; //PINO DIGITAL UTILIZADO PELO PUSH BUTTON const int ledPin = 4; int currentValue = 0; void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps pinMode(pushButt...
/* * Copyright (C) 2012 Arthur O'Dwyer * * 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 limitation * the rights to use, copy, modify, merge, publ...
/* * Copyright (C) 2007-2015 Frank Mertens. * * Use of this source is governed by a BSD-style license that can be * found in the LICENSE file. * */ #include <flux/Format> #include <flux/RefGuard> #include <flux/System> #include <flux/stream/TimeoutLimiter> #include "exceptions.h" #include "ErrorLog.h" #include "...
#include <stdio.h> #include <stdint.h> #include "sum.h" int main(int argc, char** argv) { FILE *a, *b; a = fopen(argv[1], "rb"); b = fopen(argv[2], "rb"); uint32_t num1, num2; fread(&num1, sizeof(uint32_t), 1, a); fread(&num2, sizeof(uint32_t), 1, b); sum(num1, num2); fclose(a)...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; int main(void) { ios_base::sync_with_stdio(false); string input; int count=0; getline(cin,input); //cout<<input<<'\n'; for(int i=0; i<input.length(); i++){ if(input.at(i) == ' ') c...
#ifndef _PPM_H_ #define _PPM_H_ #include <vector> #include <string> #include <iostream> #include <fstream> #include <cstdlib> class PPM{ public: PPM(); PPM(const int& w,const int& h,const int& max); int getWidth( ) const; int getHeight( ) const; int getMaxColorValue( ...
#include<bits/stdc++.h> #define maxn 5005 using namespace std; pair<int,int> a[maxn], b[maxn]; int aa[maxn], bb[maxn]; int visa[maxn], visb[maxn]; int rk[maxn]; int n; int nd[maxn]; int cal2(int x) { for(int i=1; i<=n; i++) nd[i] = 0; int pt = n; int cnt = 0; for(int i=1; i<=n; i++) { if(visa...
/*************************************************************************** simpleshader.h - description ------------------- begin : Tue Jul 25 2002 copyright : (C) 2002 by Marco Bubke email : marco@bubke.de ...
#include <bits/stdc++.h> using namespace std; class Solution { public: int threeSumClosest(vector<int> &nums, int target) { int t_sum = accumulate(nums.begin(), nums.end(), 0); int ans = 0, diff = INT_MAX, len = nums.size(); for (int i = 0; i < len; i++) { for (int j ...
// ***************************************************************** // This file is part of the CYBERMED Libraries // // Copyright (C) 2007 LabTEVE (http://www.de.ufpb.br/~labteve), // Federal University of Paraiba and University of São Paulo. // All rights reserved. // // This program is free software; you can redist...
#include <cstdio> #include <cstdlib> #include "ASRender.h" #include "../Utils/shader/GLFBO.h" using namespace as_rendering; int main(int argc, char * argv[]) { // Initialize GLUT glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); glutInitWindowSize(800, 800); g...
// // Created by Jared on 5/27/2015. // #ifndef PIXXY_HTTP_H #define PIXXY_HTTP_H #include <main.h> class http { public: static void ev_handler(struct ns_connection *nc, int ev, void *ev_data); static int run(const char *port); static void run_t(const char *port); static bool is_running; static...
// MainFrm.h : interface of the CMainFrame class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_MAINFRM_H__E0BCEF90_0E03_4074_9DAE_C387A66FD589__INCLUDED_) #define AFX_MAINFRM_H__E0BCEF90_0E03_4074_9DAE_C387A66FD589__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif...
#include <iostream> #include <GL/glut.h> //#include <GLUT/glut.h> #include "Sphere.h" #include "Scene.h" #include "Plane.h" /****************************************************************** Notes: This is the same utility as in the earlier homework assignment. Image size is 400 by 400 by default. You may adjust ...
#include<bits/stdc++.h> using namespace std; struct Node { int data; Node *left, *right; }; struct Node* getNode(int data) { struct Node *newNode = new Node; newNode->data = data; newNode->left = newNode->right = NULL; return newNode; } void preorder(Node* root) { if(root!=NULL) { cou...
#include <bits/stdc++.h> using namespace std; int main() { freopen("in", "r", stdin); freopen("out", "w", stdout); int T; cin>>T; for(int tt=1; tt<=T; tt++) { cout<<"Case #"<<tt<<": "; int n; cin>>n; string a[n]; int dp[n]; bool f = 1; int s = 0, d = 0; for(int i=0; i<n; i++) { cin>>a[...
#include "pch.h" #include <windows.h> #include <string> #include <iostream> CRITICAL_SECTION CriticalSection; DWORD WINAPI ThreadProc(CONST LPVOID lpParam) { EnterCriticalSection(&CriticalSection); int* working_variable = (int*)lpParam; for (int i = 0; i < 50000; i++) { int j = *working_variable; *working_v...