text
stringlengths
3.08k
12.5k
/* ** ClanLib SDK ** Copyright (c) 1997-2020 The ClanLib Team ** ** This software is provided 'as-is', without any express or implied ** warranty. In no event will the authors be held liable for any damages ** arising from the use of this software. ** ** Permission is granted to anyone to use this software for a...
/* * modified from camexppixbinned.cpp * and LiveFrameSampleOCV.cpp * * Implementing ASK background subtraction * for TD OCT * with averaging over multiple frames * and inputs from ini file. * * Captures frames on receipt of s key * (from Arduino emulating a keyboard using * KeyboardWrite function.) * ...
// Copyright 2020 The Clspv Authors. 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 // // Unless required by app...
// Attenuation1D_CG44.h // created by Kuangdai on 29-Apr-2016 // 1D attenuation on coarse grid #include "Attenuation1D_CG4.h" Attenuation1D_CG4::Attenuation1D_CG4(int nsls, const RColX &alpha, const RColX &beta, const RColX &gamma, int Nu, const RRow4 &dkappa, const RRow4 &dmu, bool doKappa): Attenuation1...
#include <bits/stdc++.h> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; //获取点间距离 double getDistance(Point A, Point B) { double dis; dis = pow((A.x - B.x), 2) + pow((A.y - B.y), 2); return sqrt(dis); } /** * 拼接合并轮廓集合 * @param contours * @return */ vector<Point> mergeContours(vecto...
#include "seal/seal.h" #include "fhe_image.h" #include "cxxopts.h" using namespace seal; auto start = std::chrono::steady_clock::now(); auto diff = std::chrono::steady_clock::now() - start; void save_three_blocks_interleaved_ycc(std::ofstream &file, std::vector<Ciphertext> &y, ...
#include "Hub75.h" #include "string.h" #include <algorithm> #include <math.h> #include "pico/multicore.h" #include "hardware/pio.h" #include "hub75.pio.h" #define DATA_BASE_PIN 0 #define DATA_N_PINS 6 #define ROWSEL_BASE_PIN 6 //#define ROWSEL_N_PINS 4 #define CLK_PIN 11 #define STROBE_PIN 12 #define OEN_PIN 13 sta...
#include "ocf_namespace.h" #include <fcntl.h> #include <sys/stat.h> #include "../../../enumerable.h" #include "../../../fs/localfs.h" #include "../../../fs/path.h" #include "../../../fs/zfile/crc32/crc32c.h" #include "../../../photon/thread.h" #include "../../../alog.h" #include "../../../alog-stdstring.h" extern "C...
// license:BSD-3-Clause // copyright-holders:<NAME> // Yamaha MEG - Multiple effects generator // // Audio dsp dedicated to effects generation // // Disassembler #include "emu.h" #include "megd.h" meg_disassembler::meg_disassembler(info *inf) : m_info(inf) { } u32 meg_disassembler::opcode_alignment() const { retur...
/* * Copyright (c) 2020, NVIDIA CORPORATION. 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 * * Unless requi...
/* $Id: IDFilter.cpp,v 1.5 2013/04/08 07:38:17 severin Exp $ */ /*** NAME - EEDB::SPStreams::IDFilter SYNOPSIS DESCRIPTION a simple SPStream which does nothing and always returns a NULL object CONTACT <NAME> <<EMAIL>> LICENSE * Software License Agreement (BSD License) * EdgeExpressDB [eeDB] system * copyrig...
#include "forceControl.h" bool forceControl::init( sf::Vector2f pos, const char* fName ) { std::ifstream fin( fName ); if( !fin ) { std::cout << "no Force control data\n"; return false; } sf::Vector2f Sz; fin >> Sz.x >> Sz.y; sf::Vector2f HBofst(0.0f,-30.0f); Csurf.init( pos+HBofst, pos, Sz, "Forc...
/** * g++ canny_example.cpp -o canny_example.o `pkg-config --cflags --libs opencv` && * ./canny_example.o ../../data/img_23.jpg */ #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <stdlib.h> #include <stdio.h> #include <iostream> using namespace cv; /// Global variables Mat ...
#include "Warnings.h" #include "cmatrix_utils.h" #include "Histogram.h" #include "MAS.h" #include "ttyio.h" using namespace libcmatrix; //bool debug=false; void test_interval(const char* name, IntervalSamplerBase& sampler, double period, double maxdt, size_t repeats) { // if (debug) // std::cout << name << ":...
// TODO // Timeout message to indicate not found. #include <boost/function.hpp> #include <boost/bind.hpp> #include <pthread.h> #include <std_msgs/String.h> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "KaimiNearField.h" boost::asio::io_service kaimiNearFieldIoService_; boost...
// BEGIN CUT HERE // END CUT HERE #include <sstream> #include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <string> #include <set> #include <algorithm> using namespace std; const int N = 64; int d[N][N]; class Ega...
#pragma once #include "ValueType.hpp" #include "ValueRef.hpp" #include <cinttypes> #include <cstddef> #include <vector> #include <array> // Potential alternative to Godot::Variant // More specialized namespace gdev { using dim_t = std::array<int, 4>; class Value { public: struct iterator; struct const_iterato...
#include "SDL.hpp" #include "Mouse.hpp" //#include "SDL_main.h" #define SDL_MAIN_HANDLED #include "SDL.h" #include "ImGuiHelper.hpp" #include <stdio.h> #include <time.h> #include "Application.hpp" //----------------------------------------------------------------------------- // Idle function where we update void I...
#include "parser/ll1parser.h" bool LL1Parser::GetLL1Table() { gram.CalcFirst(); gram.CalcFollow(); int nowId, termId; vector<int> nowFirst; for (int prodId = 0; prodId < gram.P.size(); prodId++) { nowId = gram.P[prodId].first; gram.GetFirst(gram.items[gram.P[prodId].second], nowFirst); for (int i...
#include "reader.hpp" #include "resort.hpp" #include "gtest/gtest.h" #include <fstream> #include <string> // test the fucntion of Csv_Reader // read a data of a container and save it TEST(Csv_ReaderTest, init_csv_fiel) { std::string file_path = "../../test_data/data1.csv"; Csv_Reader csv_reader; bool init_...
#include <array> #include <cstdio> #include <cstdlib> #include <iostream> #include <numeric> #include <vector> #include <miopen/miopen.h> #include <miopen/version.h> #define CHECK_MIOPEN(cmd) \ { ...
/* ----------------------------------------------------------------------------- This source file is part of EOS Multimedia Scripting System For the latest info, see https://github.com/ultimoistante/eos-multimedia-scripting The MIT License (MIT) Copyright (c) 2014-2019 of <NAME> aka ultimoistante of StartupSolutions ...
/* This file is part of VoltDB. * Copyright (C) 2008-2020 VoltDB Inc. * * This file contains original code and/or modifications of original code. * Any modifications made by VoltDB Inc. are licensed under the following * terms and conditions: * * This program is free software: you can redistribute it and/or modi...
#include "Buttons.hpp" namespace functions { void coloreChordal(GraphCanvas *GC) { Chordal C(GC->GD.G); auto coloracao = C.coloring(); GC->GD.color = coloracao; } void mst(GraphCanvas *GC) { auto v = GC->GD.G.mstEdges(); for (int i = 0; i < GC->GD.G.getM(); i++) GC->GD.colorAresta[i] = (v[i] ? 1 : 100); } voi...
/* This program is free software; you can redistribute it and/or modify it under the terms of the European Union Public Licence - EUPL v.1.1 as published by the European Commission. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
/* MIT License Copyright(c) 2018-2019 megai2 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, publish, dist...
// -*-Mode: C++;-*- //*BeginLicense************************************************************** // //--------------------------------------------------------------------------- // TAZeR (github.com/pnnl/tazer/) //--------------------------------------------------------------------------- // // Copyright ((c)) 2019, ...
/*****************************************************************************/ /* Copyright (c) 2015, <NAME> */ /* All rights reserved. */ /* */ /* Re...
#include "OV2640.h" #include <WiFi.h> #include <WebServer.h> #include <WiFiClient.h> #include "SimStreamer.h" #include "OV2640Streamer.h" #include "CRtspSession.h" #include <ESPmDNS.h> // #define ENABLE_OLED //if want use oled ,turn on thi macro // #define SOFTAP_MODE // If you want to run our own softap turn this o...
/* util.c * Copyright (C) 2001, 2009, 2012 g10 Code GmbH * * This file is part of KSBA. * * KSBA is free software; you can redistribute it and/or modify * it under the terms of either * * - the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the Licen...
#include "msgcomm.h" #include "settings.h" #include "error.h" #include <stdint.h> #include <string.h> #include <string> #include <driver/uart.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" static const char* TAG = "connect-msgcomm"; const uint8_t EOT = 0x04; const uint8_t ESC...
/* <one line to give the program's name and a brief idea of what it does.> Copyright (C) 2011 <NAME> <<EMAIL>> 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 3 of...
#include <cstddef> #include <iostream> #include <fstream> #include <vector> #include <string> #include <cassert> #include <sstream> #include <memory> #include <algorithm> #include <unordered_map> #include <array> #include <numeric> using namespace std; enum class GuardState { begin, sleep, wake }; ostream& operator<<...
#include<bits/stdc++.h> using namespace std; float refresh[1000][1000]; int r[1000][1000],g[1000][1000],b[1000][1000]; struct EdgeTuple{ float xofymin,minv; int ymax; }; struct EdgeTable{ int count; EdgeTuple bucket[10]; }; bool comp(EdgeTuple a,EdgeTuple b){ return a.xofymin<b.xofymin; } void inser...
#include "game.h" #include "matlab/eml_rand_mt19937ar_stateful.h" #include <fstream> #define NS LedsChat::Game NS::Game(RenderWall & wall, uint32_t size) : m_currentData(m_mazeList.getRandomMaze()), m_maze(std::make_unique<Maze>(m_currentData)), m_wall(wall), m_squarewave(size), m_redAgent(*m_maze, m_curr...
#include "Database.h" #include "lib/win/raii.h" #include "lib/win/encoding.h" #include "lib/sodium.h" enum { CURRENT_DB_VERSION = 1 }; Database::~Database() { if (db) { sqlite3_close(db); } } bool Database::OpenOrCreate(const std::wstring& path) { sqlite3* db; int res = sqlite3...
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /*====== This file is part of PerconaFT. Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. PerconaFT is free software: you can redistribute it and/or modif...
// // sellist.cpp // // Copyright (c) 1997-1998 <NAME> // // This software is released under the MIT License. // http://opensource.org/licenses/mit-license.php // #include "stdafx.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #include "smd.h" /*******************...
#define MOCI_ENTRYPOINT #include "moci/moci.hpp" #include "imgui.h" #define GLM_ENABLE_EXPERIMENTAL #include "glm/glm.hpp" #include "glm/ext/matrix_transform.hpp" #include "glm/gtc/matrix_transform.hpp" #include "glm/gtc/quaternion.hpp" #include "glm/gtc/type_ptr.hpp" #include "glm/gtx/quaternion.hpp" #include "glm/...
/* * Copyright (c) 2013, <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of ...
/** * @file core.cpp * @author Jiaoyi * @brief * @version 3.0 * @date 2021-03-16 * * @copyright Copyright (c) 2021 * */ #include <vector> #include "../include/construct/construction.h" #include "../include/func/calculate_space.h" #include "../include/func/get_node_info.h" #include "./experiment_params.h" #inc...
#include "object2D.h" #include <vector> #include "core/engine.h" #include "utils/gl_utils.h" #include "Survivio.h" Mesh* object2D::CreateCircle(const std::string& name, glm::vec3 color, int sectors, float radius) { float alpha; std::vector<VertexFormat> vertices { VertexFormat(glm::vec3(0, 0, ...
/* * Copyright 2016 <NAME> * * This file is part of Squirrel. * * Licensed under the Academic Free License 3.0 (the "License"). * You may not use this file except in compliance with the License. * You should have received a copy of the License along with Squirrel. * If not, see <https://opensource.org/licenses/...
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /* 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 3 of the License, or (at your option) any lat...
// // OSGEventHandler.cpp // // Handle OSG events, turn them into VTP events. // // Copyright (c) 2011 Virtual Terrain Project // Free for all uses, see license.txt for details. // #include "vtlib/vtlib.h" #include "OSGEventHandler.h" #include "vtdata/vtLog.h" #define GEA osgGA::GUIEventAdapter // shorthand #defi...
// GPS for raspberry pi // Manferdelli // This used the standard serial interface via /dev/ttyS0 // You'll need to use an fdmi connector #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <termios.h> #include <string.h> #ifndef byte typedef unsigned char byte; #endif #define defaul...
/* Copyright 2012 <NAME> and <NAME> */ #include "serial/utils/serial_listener.h" /***** Inline Functions *****/ inline void defaultExceptionCallback(const std::exception &error) { std::cerr << "SerialListener Unhandled Exception: " << error.what(); std::cerr << std::endl; } inline bool defaultComparator(const s...
// // CircleLine.cpp // MurMurDombre // // Created by <NAME> on 25/02/2014. // // //TODO: make it a visuClass #include "CircleLine.h" CircleLine::CircleLine(){} CircleLine::CircleLine(vector<ofPoint>* attrin,vector<int>* famillyin, int w, int h){ attr = attrin; familly = famillyin; isLine = fal...
#include <iostream> #include <vector> #include <cmath> #include <SFML/System.hpp> #include <SFML/Graphics.hpp> double toRad(double degrees) { return degrees * M_PI / 180.0; } std::vector<sf::CircleShape> initCirclesCos(const sf::Vector2u initPos, const uint64_t count, const float scale) { std::vector<sf::Ci...
#include "Record.h" #include <unistd.h> // sleep Record::Record() { } void Record::savePlayer(Player* now, ofstream& out) { now -> listInfo(out); out << now -> getMaxHealth() << ' ' << now -> getCurrentHealth() << ' '; out << now -> getAttack() << ' ' << now -> getDefense() << '\n'; Room* cur = now -> getCurre...
///////////////////////////////////////////////////////////////////////////////////////////////////////// // Author: <NAME>, Syracuse University // CSE687 object orriented Design // // TestPerformer.cpp : This file contains the 'main' function. Program execution begins and ends there. // Child tester's ip address an...
/***************************************************************************** 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 requir...
// // Created by AUGUS on 2021/8/9. // #include "ptr.hh" #include "gtest/gtest.h" int auto_ptr::test_shared_ptr() { std::cout << "PART shared_ptr --------\n"; int a = 10; std::shared_ptr<int> sptr1 = std::make_shared<int>(a); std::shared_ptr<int> sptr2(sptr1); //copy shared_ptr有拷贝构造 std::cout << s...
// CNumbers.cpp // Debug messages (beginning with "==>") should be removed #include <iostream> #include <strstream> #include <iomanip> using namespace std; class ComplexNumber { public: ComplexNumber(double r, double i); ComplexNumber(double r); ComplexNumber(); void setNumber(double r,...
#include "Game.h" Game::Game(){ initscr(); //inicializar pantalla nodelay(stdscr,false); //Espera tecla para moverse keypad(stdscr,true); //Habilita el teclado timeout(166);//Tiempo de espera de getch antes de regresar error noecho(); //No sale lo que escribes curs_set(0); //Cursor no visible...
#include <iostream> #include <cmath> #include <unordered_map> #include <charconv> #include <fstream> #include <vector> #include <xxhash.h> #include <csvread.h> #include <xorfilter.h> #define OPTPARSE_IMPLEMENTATION #define OPTPARSE_API static #include <optparse.h> #define LEN_MULT 2 #define ID 0 #define NAME 1 #define...
#pragma comment(linker, "/STACK:100000000") #pragma comment(linker, "/HEAP:1000000000") #include <iostream> #include <fstream> #include <Eigen/Dense> #include "Lookup.h" #include <random> #include <string> #include <algorithm> #include <thread> #include <iterator> using std::string; using Eigen::MatrixXd; using Eigen:...
#include <iostream> #include <random> #include "distance.h" float distanceL2_I(const int8_t* a, const int8_t* b, size_t size) { float distance = 0; for (int i = 0; i < size; i++) { int16_t diff = ((int16_t) a[i] - (int16_t) b[i]); distance += diff * diff; } return distance; } int8_t* createVector(int ...
#include <vector> #include "fawnds_factory.h" #include "gtest/gtest.h" #define MAXNUM 262144L using namespace std; namespace fawn { static std::string conf_file = "testConfigs/testCuckoo.xml"; uint64_t key_vec1[MAXNUM]; uint64_t val_vec1[MAXNUM]; class FawnDS_Cuckoo_Test : public testing::Test { ...
#include <Python.h> #include <stdbool.h> #include <math.h> #include <list> #include <iostream> #include "bullet.h" #include "renderer.h" static PyObject* DanmakuGroup_init(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "O", &self)) return NULL; static std::list<Bullet> bullet_list; PyObject*...
#include "saber/core/context.h" #include "saber/funcs/unpool.h" #include "test_saber_func.h" #include "test_saber_base.h" #include "saber/core/tensor_op.h" #include "saber/saber_types.h" #include <vector> using namespace anakin::saber; template <typename dtype,typename TargetType_D,typename TargetType_H> void unpool...
//======================================================================= // Copyright <NAME> 2015. // Distributed under the MIT License. // (See accompanying file license.txt or copy at // http://opensource.org/licenses/MIT) //======================================================================= /* * Implementati...
#include "CDocI.h" /*------------------------------------------------------------------------*/ typedef std::vector<CDFont *> CDFontList; static CDFont *current_font = NULL; static CDFontList font_stack; static CDFontList font_def_list; /*----------------------------------------------------------------------...
#include "domain_language/Common.h" #include "domain_language/Scanner.h" #include "string.h" Scanner::Scanner(){} Scanner::~Scanner(){} void Scanner::initScanner(const char* source){ start = source; current = source; line = 1; } bool Scanner::isAtEnd() { return *current == '\0'; } bool Scanner::isAlpha(cha...
// TextureManager.cpp: implementation of the CShaderManager class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "texture.h" #include "xrShader.h" #include "xrShaderLib.h" #include "TextureManager.h" ///////////////////////////////////////////////////...
/***************************************************************************** * * NXP Confidential Proprietary * * Copyright (c) 2013-2017 NXP * All Rights Reserved * ***************************************************************************** * * THIS SOFTWARE IS PROVIDED BY NXP "AS IS" AND ANY EXPRESSED OR * IMPLIE...
#include "macro.hpp" #include <lix/exec/context.hpp> #include <lix/exec/module.hpp> #include <lix/util/args.hpp> #include <cassert> using namespace lix; namespace { using ast::node; struct aliased_symbols { std::string alias; std::string expansion; }; struct macro_expander { exec::context& ctx; ...
/** * Copyright (c) 2019 DKFZ - ODCF * * Distributed under the MIT License (license terms are at https://github.com/dkfz-odcf/FastqIndEx/blob/master/LICENSE.txt). */ #include "process/io/s3/FQIS3Client.h" #include "process/io/s3/S3Service.h" #include "common/CommonStructsAndConstants.h" #include <experimental/file...
/* Copyright 2018 <NAME> (http://github.com/stormycatcat) 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 agreed...
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> std::string removeFrontWhitespace(std::string str) { int start = str.find_first_not_of(" \f\n\r\t\v"); if(start < 0) { return ""; } return str.substr(start, str.size()); } std::vector<std::string> split(std::string str...
#include <stdint.h> #include <stdio.h> #include "gpio.h" #define GPIO_BASE 0x20200000UL #define GPIO_GPFSEL0 0 #define GPIO_GPFSEL1 1 #define GPIO_GPFSEL2 2 #define GPIO_GPFSEL3 3 #define GPIO_GPFSEL4 4 #define GPIO_GPFSEL5 5 #define GPIO_GPSET0 7 #define GPIO_GPSET1 8 #define GPIO_G...
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <boost/uuid/string_generator.hpp> #include <boost/program_options.hpp> #include <base/logging.h> #include <base/contrail_ports.h> #include <pugixml/pugixml.hpp> #include <base/task.h> #include <io/event_manager.h> #include <sandesh/com...
// // ASM.cpp // AAM // // Created by Abhishek on 20/02/15. // Copyright (c) 2015 Abhishek. All rights reserved. // #include "ASM.h" ASM::ASM() { } ASM::ASM(vector<vector <Point2f> > annotatedPoints) { _annotatedPoints = annotatedPoints; } void ASM::generateASM() { GProcrustesAnalysis procrustes; ...
/* * iupolectl.cpp * * CPI que implementa um container OLE */ #include "tOleHandler.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "iup.h" #include "iupole.h" #include "iup_object.h" #include "iup_register.h" #include "iup_attrib.h" #include "iup_...
#include "ofApp.h" ofApp::ofApp() : screenBounds(ofGetWidth(), ofGetHeight()), targetMap(ofGetWidth(), ofGetHeight()), fieldMap(ofGetWidth(), ofGetHeight()), lastDragPosition(0, 0) { blur.setup(screenBounds.x, screenBounds.y, BLUR_RADIUS, BLUR_SHAPE, ...
#include "import-command-task.hxx" #include <fstream> #include <iostream> #include <utility> #include <filesystem> #include "ansi.hxx" #include <SQLiteCpp/Transaction.h> #include "Database3.hxx" #include "utils.hxx" #include "logger.hxx" #include "command-utils.hxx" #include "database-utils.hxx" namespace fs = std...
/* * FILE: B.cpp * * @author: <NAME> <opendoor.arafat[at]gmail[dot]com> * * LINK: https://algo.codemarshal.org/contests/bacsrpc18/problems/B * * DATE CREATED: 20-07-18 16:18:17 (+06) * LAST MODIFIED: 20-07-18 17:37:15 (+06) * * VERDICT: * * DEVELOPMENT HISTORY: * Date Version Description * ---...
#include <stdio.h> #include <string> #include <iostream> using namespace std; //执行报错,a是数组类型,地址固定不变,已经绑定了,无法改变自己a++ void test1() { char a[] = "abcd!"; //"abcd!字符串常量 //a[] stack上数据。 // = copy 赋值, //“abcd”存在2份,一个是stack上,一个静态区域 //a++ == a=a+1,报错const pointer 无法是被修改的。 cout<< *a<<endl;// //cout<< a++<<endl;//e...
#include "GameEngine.h" std::vector<GameObject*> GameEngine::objects; int GameEngine::oldTimeSinceStart; int GameEngine::newTimeSinceStart; std::vector <collisonData*> GameEngine::c_data; void GameEngine::InitEngine(int argc, char** argv, const char* windowTitle, int width, int height) { glutInit(&argc, argv); //thi...
#include "LogIn.hpp" #include <sstream> #include "global.hpp" #include "Master.hpp" void Packet <PACKET_LOG_IN>::onReceive(const ENetEvent &event) { _assert(playerCharacterID < 0, "Received PACKET_LOG_IN while being already logged in."); char ch; int status = LOG_IN_ERROR_UNKNOWN; int x = 0, y = 0, d...
#include "level_2.h" using namespace std; Level2::Level2(){ unlocked = false; errmsg = ""; sw1 = new Neuron(true, 0); sw2 = new Neuron(true, 0); sw3 = new Neuron(true, 0); sw4 = new Neuron(true, 0); mid1 = new Neuron(false, 60); mid2 = new Neuron(false, 5); mid3 = new Neuron(false, 40); lt1 = new Neuron(fa...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Game.cpp :+: :+: :+: ...
/* * GameManager.cpp * * Created on: 26.03.2018 * Author: core */ #include <algorithm> #include "SFML/Graphics.hpp" #include "GameManager.h" #include "Player.h" using namespace sf; bool isDestroyed(RectangleEntity *e) { return e->getHealth() == 0; } GameManager::GameManager(RenderWindow &w) : window(...
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * 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 re...
#include "scheme_ot_vrfq_test.h" #include "scheme_ot_vrfq_alice.h" #include "scheme_ot_vrfq_bob.h" #include "scheme_ot_vrfq_protocol.h" #include "scheme_table.h" #include "scheme_table_alice_data.h" #include "scheme_table_bob_data.h" namespace { // The alice id must be hash(AliceAddr), and the bob id must be ...
// // TiledVectorLayer.cpp // G3MiOSSDK // // Created by <NAME> on 4/30/14. // // #include "TiledVectorLayer.hpp" #include "LayerTilesRenderParameters.hpp" #include "URL.hpp" #include "RenderState.hpp" #include "LayerCondition.hpp" #include "TiledVectorLayerTileImageProvider.hpp" #include "Context.hpp" #include "T...
/******************************************************************************/ /* File name : ACAN_ESP32_Settings.cpp */ /* Project : ESP32-CAN-DRIVER */ /* Description : ESP32 CAN Bit Timing Calculator and Initial settings ...
// Copyright (c) 2018, ETH Zurich and UNC Chapel Hill. // 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 code must retain the above copyright // notic...
#include "Widget/BrushWidget.h" #include "Widget/AddBrushDialog.h" #include "Brush/BrushParser.h" #include <QBoxLayout> #include <QToolBar> #include <QComboBox> #include <QFileInfo> #include <QPoint> #include <QDir> #include <QMessageBox> BrushWidget::BrushWidget( const QString& title, QWidget* parent /*= Q_NULLPTR */...
//-***************************************************************************** // // Copyright (c) 2009-2011, // <NAME> Imageworks, Inc. and // Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. // // All rights reserved. // // Redistribution and use in source and binary forms, with or wit...
// // Stiches multiple .obj files into one .obj. // #include "obj_writer.h" #include "../../tiny_obj_loader.h" #include <cassert> #include <iostream> #include <cstdlib> #include <cstdio> typedef std::vector<tinyobj::shape_t> Shape; typedef std::vector<tinyobj::material_t> Material; typedef tinyobj::attrib_t Attribut...
/* * Queue_Test.cc * * Created on: Feb 21, 2014 */ #include <iostream> #include <sstream> #include <queue> #include "../lib/BOOOS.h" #include "../lib/Scheduler.h" #include "test_scaffold.h" #include <iostream> using namespace std; using namespace BOOOS; namespace Scheduler_Test_Functions { int test_init() { ...
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include "ifmap/ifmap_server.h" #include <fstream> #include "base/logging.h" #include "base/test/task_test_util.h" #include "control-node/control_node.h" #include "db/db.h" #include "db/db_graph.h" #include "io/event_manager.h" #include "ifmap/i...
/**************************************************************************** ** ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Compositor. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license...
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
/* Q Light Controller chaserstep.cpp Copyright (C) 2004 <NAME> 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.txt Unless required b...
// In this method we will be calculating LCS by making use of time-in & time-out concept rather than using // depth (which was done in "Finding LCS By Binary Lifting & Sparse Table Approach (O(log2(n)) Time - 1.cpp") // Code is almost similar except few changes and additionally calculating time-in & time-out of all n...
#include <Arduino.h> #include <lmic.h> #include <hal/hal.h> #include <WiFi.h> #include "esp_sleep.h" // UPDATE the sessionkeys.h file in the same folder WITH YOUR TTN KEYS AND ADDR. #include "sessionkeys.h" #include "gps.h" // T-Beam specific hardware #undef BUILTIN_LED #define BUILTIN_LED 21 char s[32]; // used to...
#include "Globals.h" #include "Application.h" #include "ModuleRenderer3D.h" #include "ModuleResource.h" #include "Component.h" #include "ComponentMesh.h" #include "ComponentTransformation.h" #include "GameObject.h" #include "ModuleMeshes.h" #include "ModuleScene.h" #include "ComponentBone.h" #include "Resource.h" #in...
// // xpnetclrhost.cpp // // A .NET Core host for XPNet plugins. // // https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/netcore-hosting // // This code is somewhat generic, but it doesn't strive to be a full-featured generic CLR // host. It makes assumptions and uses some types that are the right thing ...