text
stringlengths
3.08k
12.5k
#include "csptests.h" #include <security_cdsa_client/keyclient.h> #include <security_cdsa_client/cspclient.h> #include <security_cdsa_client/macclient.h> #include <security_cdsa_client/genkey.h> #include <security_cdsa_client/wrapkey.h> using namespace CssmClient; static void testCrypt(const Guid &cspGuid); static v...
#include "HAL/Notifier.hpp" #include "HAL/Interrupts.hpp" #include <iostream> #include "errno.h" #include <stdint.h> #include <atomic> #include <cstdlib> #include <condition_variable> #include <mutex> #include <thread> class SafeThread { public: virtual ~SafeThread() = default; virtual void Main() = 0; std::mu...
#include "SimplexNoise.h" SimplexNoise::SimplexNoise() { } void SimplexNoise::init(glm::vec3 pos, glm::vec3 dim, float time) { mTime = time; } glm::vec3 SimplexNoise::getVelocity(double delta, Particle &p) { mTime+=delta; glm::vec3 pos = p.position(); //pos /= glm::length(pos); float x = octaveNoise3D(6, 0.6f...
#include "ros/ros.h" #include "justina_tools/JustinaHRI.h" #include "justina_tools/JustinaHardware.h" #include "justina_tools/JustinaManip.h" #include "justina_tools/JustinaNavigation.h" #include "justina_tools/JustinaTools.h" #include "justina_tools/JustinaVision.h" #include "justina_tools/JustinaTasks.h" #define SM_...
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
/* * Course: Elaborazione delle Immagini * University: Padova (IT) * Student: <NAME> (486228-sin) */ #include "ProcessBW.h" #include <iostream> /* used by the convolution pixel */ int ProcessBW::pixel(unsigned char* imageS, int x, int y) { int u, v; int a; int p = 0; for(v = -ofs; v <= ofs; v++) { if(...
#include <bits/stdtr1c++.h> #define MAXV 1010 #define MAXC 10010 #define EQUAL 0 #define LESSEQ -1 #define GREATEQ 1 #define MINIMIZE -1 #define MAXIMIZE +1 #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) #define dbg(x) cout << #x << " = " << x << endl #define ran(a, b) ((((ran...
#include "MeshComponent.h" #include"Globals.h" #include <assert.h> #include "Primitive.h" Meshs::Meshs() : Component(nullptr) {} Meshs::Meshs(GameObject* _m) : Component(_m) { vertexBuffer = 0; indexBuffer = 0; textureBuffer = 0; UB = 0; numIndices = 0; materialIndex = INVALID_MATERIAL; }; Mesh...
// //////////////////////////////////////////////////////// // # Title // Chip Defects // // # URL // https://projecteuler.net/problem=307 // http://euler.stephan-brumme.com/307/ // // # Problem // `k` defects are randomly distributed amongst `n` integrated-circuit chips produced by a factory // (any number of defects ...
#include "shared.hpp" #include <iostream> #include <chrono> #include <set> #include <vector> #include <unordered_map> #include "Beacon.hpp" #include "Scanner.hpp" std::vector<Scanner> ParseInput(const std::vector<std::string> &lines); std::pair<Scanner, std::vector<Offset>> SolveIntermediate(const std::vector<Scan...
#include <clocale> #include <cstdio> #include <cstdlib> #include "simulation.h" #include "WFS_landscape.h" #include "WFS_output.h" #include "fire.h" #include "WFS_fireweather.h" /*! \mainpage South African Savanna Fire Model * Fire is an important driver of vegetation dynamics in savanna ecosystems, yet often strong...
/* * Copyright (c) 2017 Samsung Electronics, Visual Display Division. * All Rights Reserved. * * @author <NAME> <<EMAIL>> * * This source code is written basing on the Chromium source code. * * Copyright (c) 2014 The Chromium Authors. All rights reserved. * * Use of this source code is governed by a BSD-styl...
#include <stdio.h> #include <string.h> #include <string> // Linux headers #include <fcntl.h> // Contains file controls like O_RDWR #include <errno.h> // Error integer and strerror() function // https://gitlab.com/Teuniz/RS-232/-/tree/master #ifdef _WIN32 #include <Windows.h> #include <assert.h> #include <tchar.h> #e...
/*! * @author <NAME>, K.K. * @date 2019 * @copyright BSD-3-Clause */ #define __CL_ENABLE_EXCEPTIONS #include <CL/cl.hpp> #include <cassert> #include <fstream> #include <iostream> #include <omp.h> #include <random> #include <sstream> #include <stdexcept> #include <vector> namespace { std::mt19937 mt(0); in...
// Copyright (c) 2013, <NAME> // All rights reserved. // Define this symbol to enable runtime tests for allocations //#define EIGEN_RUNTIME_NO_MALLOC #include <Eigen/Dense> #include <iostream> #include <fstream> #include <cstdio> #include <string> #include <ctime> #include "nn.h" using namespace std; inline void sw...
// // Copyright 2016 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trad...
#include <arrayfire.h> #include "metadiff.h" namespace md = metadiff; namespace sym = metadiff::symbolic; void test() { af::info(); af_print(af::randu(5, 4)); } void test_backend(){ try { printf("Trying CPU Backend\n"); af::setBackend(AF_BACKEND_CPU); test(); } catch (af::exc...
#include "videolabel.h" #include "common.h" #include <QEvent> #include <QMouseEvent> #include <QPainter> #include <QTime> #include <QDebug> #define VMIN 10 #define VMAX 256 #define SMIN 50 videoLabel::videoLabel(QWidget *parent):QLabel(parent), selectObject(false), trackObject(0) { } videoLabel::~...
/* # ============================================================================= # Copyright (c) 2016 - 2021 Blue Brain Project/EPFL # # See top-level LICENSE file for details. # ============================================================================= */ #include "coreneuron/coreneuron.hpp" #include "coreneuron...
/* <NAME> * Prof. <NAME> * CSS 343 : Winter 2010 * Lab 4v4 - MOVIE Store */ #include "tree.h" //------------------------------------------------------------------------------ // Constructor // - Initializes 'root' of Tree to be NULL. //---------------------------------------------------------------------...
#include "engine.h" void spherical2Cartesian() { camX = radius * cos(bet) * sin(alfa); camY = radius * sin(bet); camZ = radius * cos(bet) * cos(alfa); } void changeSize(int w, int h) { // Prevent a divide by zero, when window is too short // (you cant make a window with zero width). if(h ==...
//////////////////////////////////////////////////////////////////////////////////// // ysoftman // 리눅스(kernel 2.4 이상) EPOLL 기능 사용 서버 테스트 //////////////////////////////////////////////////////////////////////////////////// #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/sock...
#include "config.h" #include "wifi.h" #include "gvret_comm.h" #include "SerialConsole.h" static IPAddress broadcastAddr(255,255,255,255); WiFiManager::WiFiManager() { lastBroadcast = 0; } void WiFiManager::setup() { if (settings.wifiMode == 1) //connect to an AP { WiFi.mode(WIFI_STA); ...
/* * menuHandler.cpp * ColorTools * * Created by <NAME> on 5/25/11. * Copyright 2011 __MyCompanyName__. All rights reserved. * */ // This file defines the various menu handler functions. #include "IllustratorSDK.h" #include "FixBlack.h" #include "common.h" #include "menuHandler.h" #include "AIMenuGroups.h...
/* PCDM Login Manager: * Written by <NAME> (<EMAIL>) 2012/2013 * Copyright(c) 2013 by the PC-BSD Project * Available under the 3-clause BSD license */ #include "pcdm-config.h" #include "pcdm-backend.h" //Setup variables that save the current configuration data QStringList confStruct; // ******** PRIVATE FUNCTION...
#include <iostream> #include <map> #include <set> #include <Entity/Graph/Graph.hpp> #include <Entity/Graph/Dijkstra.hpp> using namespace Entity::Graph; struct City { std::string name; }; std::ostream& operator<<(std::ostream& out, const City& c) { return out << c.name; } struct Travel { struct Company ...
#include "../../src/option.h" #include <iostream> #include <cctype> #include <algorithm> using namespace std; /* option */ enum { /* high priority */ VERSION, HELP, REAL, OPERATION, BASE, /* low priority */ }; /* usr definition err */ enum { /* high priority */ INVALID_OPERATION =...
#include "MarkerTracker.h" namespace { const std::string PARSER = "parser"; const std::string YARRAR_PARSER = "yarrar_parser"; const std::string TRACKING_RESOLUTION_WIDTH = "tracking_resolution_width"; const std::string CONTOUR_MIN_AREA_SIZE = "contour_min_area_size"; const std::string INNER_RECTANGLE_MIN_SIZE = "inn...
#include"stdio.h" #include"stdlib.h" #define M 20 /*预定义图的最大顶点数*/ #include"string.h" typedef struct node{ //边表结点 int adjvex; //邻接点 struct node *next; }edgenode; typedef struct vnode{ //头节点类型 char vertex; //顶点信息 edgenode *firstedge; //邻接表表头指针 }vertexnode; typedef struct{ //邻接表类型 v...
// // Sphere.cpp // Gaia // // Created by <NAME> on 4/18/20. // Copyright © 2020 SphereEnix. All rights reserved. // #include "Sphere.h" Sphere::Sphere(){ } Sphere::Sphere(float m, float r, const std::vector<std::string>& faces): Primitive(m), radius(r){ numLon = 10; numLat = 10; cubemapTexture...
/* Copyright (c) 2014, Adapteva, Inc. Contributed by <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: Redistributions of source code must retain the above copyright notice, this list...
#include "hkbattributemodifier.h" #include "src/xml/hkxxmlreader.h" #include "src/filetypes/behaviorfile.h" uint hkbAttributeModifier::refCount = 0; const QString hkbAttributeModifier::classname = "hkbAttributeModifier"; hkbAttributeModifier::hkbAttributeModifier(HkxFile *parent, long ref) : hkbModifier(parent, ...
/* ** Copyright (C) 2000-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 2 of the License, or ** (at your option) any later version. ** ** This program...
#include "lnrs_gen.h" #include <math.h> static void clipper(float *x, float *y, int *dims) { if(*x < 0.) *x = 0.; else if(dims && *x > (dims[0]-1)) *x = (float)dims[0]-1.0F; if(*y < 0.) *y = 0.; else if(dims && *y > (dims[1]-1)) *y = (float)dims[1]-1.0F; } int Draw_DrawMods_LineResamplerCore::Resampler(OMevent_m...
/** * Copyright (c) 2018 <NAME> <<EMAIL>> * * 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, p...
#include "Game.h" #include "XeSystem.h" #include "XeAnimation.h" #include "XeObject.h" #include "ObjectList.h" #include <stdio.h> // Gamestate list #include "Game_tests.h" #include "Game_Level.h" #include "Game_LevelSelect.h" #define SPEED_TO_FLOAT(i) (float(i)/256.0f) extern XeAnimation anim; Game::Game() { _inter...
/* -*-C++-*- (c) Copyright 1993-2005, Hewlett-Packard Development Company, LP See the file named COPYING for license details */ /** @file Simple statistics functions for single variables */ #include <stdlib.h> #include <cstdio> #include <string> #include <float.h> #include <string.h> #include <boost/forma...
//******************************************************************* // // License: LGPL // // See LICENSE.txt file in the top level directory for more details. // // Author: <NAME> // // Description: // //******************************************************************* // $Id: create_histo.cpp 11743 2007-09-19 ...
// // Created by Balajanovski on 15/12/2017. // #include "ScreenBuffer.h" #include "PixelBufferBase.h" #include <memory> #include <algorithm> #include <stdexcept> #include <vector> #include <sstream> #include <fstream> #include <string> #include <iostream> #include <cassert> void ScreenBuffer::generate_shaders(co...
#include "interface.h" #include <sstream> TUI::TUI () : Interface () { initscr (); // getInitialInformations (); selected_user = 0; int y_size, x_size; getmaxyx (stdscr, y_size, x_size); users_tab = newwin (3 * y_size / 4, x_size / 3, 0, 0); messages_tab = newwin (3 * y_size / 4, (2 * x_size / 3)...
#define RAPIDJSON_HAS_STDSTRING 1 #include "data_stream.hpp" #include <boost/asio.hpp> #include <boost/asio/ssl.hpp> #include <iostream> #include <thread> #include "rapidjson/rapidjson.h" #include "rapidjson/document.h" #include "rapidjson/reader.h" #include "rapidjson/filereadstream.h" #include "rapidjson/istreamwrapp...
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup() { ofSetCircleResolution(120); float w, h; w = 1920; h = 1080; //w = ofGetWidth(); //h = ofGetHeight(); //-- // A. Params to randomize params.setName("paramsGroup"); params.add(alpha.set("alpha", 0.5f, 0...
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsListBoxLayout.h" #inc...
// Copyright (c) 2021 Xeni Robotics // // 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 ...
/* * Copyright: * <NAME>, 2012 * * 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, pu...
// tests.cpp // g++ tests.cpp -o test -I. `llvm-config --cppflags --ldflags --libs core jit native` -Wall -DUSE_LLVM #include <expressions/expressions.h> #include <iostream> #include "math.h" #include <cmath> // for fabs #include <limits> // for epsilon #ifdef USE_LLVM typedef expr::LLVMEvaluator Evaluator; typedef...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <vector> #include <math.h> #include "fastmath.h" #include "Vec2.h" #include "geom2D.h" #include "HashMap2D.h" #include <SDL2/SDL.h> #include <SDL2/SDL_opengl.h> #include "Draw2D.h" // ==================== HashMap Debug utils void drawHasMapTile( c...
/** * @file game.cxx * @desc Game framework module. */ #include <SDL.h> #include <SDL_image.h> #include <SDL_ttf.h> #include <SDL_mixer.h> #include "game.hxx" #include "scenes/scene.hxx" #include "scenes/scene_title.hxx" #include "scenes/scene_stage.hxx" #include "scenes/scene_play.hxx" #include "scenes...
/****************************************************************************** ******************************************************************************* Fuzed DS relminator http://rel.phatcode.net ******************************************************************************* ******************************...
#include "pch/pch.h" #include "system/Engine.h" #include "system/Input.h" #include "AppBase.h" #include "asset/AssetManager.h" #include "editor/Editor.h" #include "platform/windows/Win32Window.h" #include "renderer/Renderer.h" #include "world/NodeFactory.h" #include "world/World.h" #include <algorithm> Engine::~Engi...
/* $Id$ */ /* * Copyright (c) 2013 <NAME> * 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 ...
/* Hint: Let, the hash of [L,R] segment of bear is = bhash, * the hash of elephant is = ehash. * We have to either increase or decrease bhash depending on * the value of bear[L] and elephant[1] and compare it with ehash. * For example: let, base = 10 and bhash = 364. * If bear[L]-elephant[1] = 2, the new bhash wi...
/************************************************************************* * Copyright (C) [2019] by Cambricon, Inc. 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 a...
/* ================================================================================================================ A car service shop needs to keep track of the records of services they provide to their customer. Create a system for them so they could keep ATLEAST the below records: • Date the customer visited ...
/* * Copyright (C) 2017 <NAME> <EMAIL> * Source code 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 or in file COPYING-APACHE-2.0.txt * * Unless ...
#include <cassert> #include "GameView.h" #include <sstream> // Contructor GameView::GameView(GameController* controller, Game* game) : Observer(), game_(game), controller_(controller), panels_(false, 10), menu_buttons_(true, 10), player_hand_(this, controller_), ...
#include <GL/glew.h> #include <SFML/Graphics.hpp> #include <fstream> #include <vector> #include <sstream> #include <iostream> #include <string> #include <thread> #include "ShaderFactory.h" #include "Cube.h" #include "MyCamera.h" //GLM #include "glm\glm.hpp" #include "glm\gtc\matrix_transform.hpp" #include "glm\gtc\ty...
#include <string> #include "image.h" #include "scene.h" #include "camera.h" #include "debug_renderer.h" #include "basic_renderer.h" #include "parallel_renderer.h" using namespace tracemath; void setup_pbr_demo(scene& Scene) { Scene.register_triangle_mesh("assets/cornell_box/", "CornellBox-Empty.obj", vec3{0.0f, ...
#include <string> #include <iostream> #include "utility.h" #include "sequences.h" #include "scorematrix.h" using namespace std; Sequences::Sequences () { names.clear(); seqs.clear(); index.clear(); } Sequences::Sequences (const std::string& filename, bool toUpperCase) { VS s, n; names.clear(); ...
// // Created by wangrl on 2021/3/22. // #include "gtest/gtest.h" #include "include/SafeMath.h" #include "include/String.h" #include "include/Sort.h" TEST(String, SafeMath) { // NOLINT size_t max = std::numeric_limits<size_t>::max(); { size_t halfMax = max >> 1u; size_t halfMaxPlusOne = hal...
//********************************************************* // Skim_Group.cpp - zone skim control parameters //********************************************************* #include "Skim_Group.hpp" #include "Utility.hpp" //--------------------------------------------------------- // Skim_Group constructor //-----------...
#include <array> #include <fstream> #include <iostream> #include <memory> #include <string> #include <glad/include/glad.h> // MUST be included BEFORE glfw3.h #include <GLFW/glfw3.h> // TODO(unknown): Remove #include "pilcrow/engine/core/Camera.hpp" double dt{0.f}; double lastFrame{0.f}; void UnrecoverableError(co...
//===== Copyright (c) 1996-2006, Valve Corporation, All rights reserved. ======// // // Purpose: ExprSimplifier builds a binary tree from an infix expression (in the // form of a character array). // //===========================================================================// #include "vpc.h" #include "tier0/m...
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2012, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
/* Copyright (c) 2013-2016 <NAME> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "AssetTile.h" #include "CoreController.h" #include "GBAApp.h" #incl...
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <cstring> #include <map> #include <set> #include <vector> #include <utility> #include <queue> #include <stack> #include <cassert> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&...
#include <spdlog/spdlog.h> #include <iostream> #include <ostream> #include "cad-base/shader.hpp" using std::string; using std::vector; GLuint shader::LoadShaders(char* vertex_file_path, char* fragment_file_path) { spdlog::info("Compiling Shaders"); GLuint vert_shader_id = glCreateShader(GL_VERTEX_SHADER); GLuint...
#include "../../Common/Window.h" #include "../CSC8503Common/StateMachine.h" #include "../CSC8503Common/StateTransition.h" #include "../CSC8503Common/State.h" #include "TutorialGame.h" #include "../CSC8503Common/PushdownState.h" #include "../CSC8503Common/PushdownMachine.h" #include "../CSC8503Common/BehaviourNode.h" #i...
// // Keep only TrakEM2 layers in given z range and, if using // -lrbt= or -xyr= options, in given XY-box. // // -lrbt= specifies left,right,bottom,top of a bbox. // -xyr= specifies a box using Xcenter,Ycenter,radius. // #include "GenDefs.h" #include "Cmdline.h" #include "File.h" #include "TrakEM2_UTL.h" #include "TA...
/* * Copyright (c) 2016, Wind River Systems, Inc. * * 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 conditions and...
// Fill out your copyright notice in the Description page of Project Settings. #include "RoomReplacementPattern.h" #include "DungeonRoom.h" #include "DungeonFloorManager.h" URoomReplacementPattern::URoomReplacementPattern() { SelectionChance = 1.0f; bCanBeRotated = true; bRandomlyPlaced = false; } bo...
#include "map.h" #include "game.h" #include "player.h" #include "entity.h" #include "assets.h" uint8_t Map::width; bool Map::showBackground; Entity* Map::boss = NULL; namespace { const uint8_t* tilemap; uint8_t height; uint8_t solidTileIndex; uint8_t mainTile; uint8_t mainTileAlt; uint8_t mainStartTile; uint8_t mai...
/* g++ -std=c++20 -latomic -pthread -o ../_build/r/cp.exe r/cp.cpp && (cd ../_build/r;./cp.exe) */ #include <atomic> #include <iostream> #include <thread> #include <mutex> #include <shared_mutex> #include <condition_variable> std::atomic_int x, y; int r1, r2; void writeX(){ x.store(1); r1= y.load(); } void writeY...
/* ---------------------------------------------------------------------- SPPARKS - Stochastic Parallel PARticle Kinetic Simulator http://www.cs.sandia.gov/~sjplimp/spparks.html <NAME>, <EMAIL>, Sandia National Laboratories Copyright (2008) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85...
#include "konigs.h" void KonigsGraph::loadGraphFromFile(std::string file, bool createMatrix, bool createVector) { isStatsUpdated = false; std::ifstream inFile; inFile.open(file); if (!inFile) { std::cout << "Unable to open file"; exit(1); // terminate with error } std::stri...
/* * File: main.cpp * Created: 2021-02-23 09:59:27 * Modified: 2021-02-23 21:51:00 * Author: mcxiaoke (<EMAIL>) * License: Apache License 2.0 */ #include <Arduino.h> #include <SoftwareSerial.h> #include <Wire.h> //#define USE_ARDUINO_BLUE #ifdef USE_ARDUINO_BLUE #include <ArduinoBlue.h> #else #define CUSTOM_SE...
#include "ExampleLayer.h" #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <imgui/imgui.h> ExampleLayer::ExampleLayer() : Layer("Example"), m_CameraController(1280.0f / 720.0f) { m_VertexArray = Ladoo::VertexArray::Create(); float vertices[3 * 7] = { -0.5f, -0.5f, 0.0f, 1.0f, 0...
#include "ros_vehicle_model/VehicleModel.hpp" using namespace std; using namespace CIRC; /********************************************************************** ** Wheel-E Vehicle Model ** Inputs: ** - Platform Command Curvature (1/m): reciprocal of radius of ** curvature of center of robot. Positive value is lef...
// Copyright 2019 Google LLC & <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 // // Unless required by applicable law or agreed t...
#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Support/raw_ostream.h" #include...
#include "mainwindow.h" #include "ui_mainwindow.h" #include <iostream> #include <QFile> #include <QTextStream> #include <QMessageBox> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); this->setWindowTitle("Qt"); ui->tableWidget->verticalHe...
/* * Cube.cpp * * Created on: Dec 2, 2017 * Author: <NAME> * <NAME> */ #include "Cube.hpp" Cube::Cube() { vertex[0][0] = -0.5;vertex[0][1] = -0.5;vertex[0][2] = -0.5; vertex[1][0] = -0.5;vertex[1][1] = 0.5; vertex[1][2] = -0.5; vertex[2][0] = 0.5;vertex[2][1] = -0.5; vertex[2][2] = -0.5; vertex...
/* * The MIT License (MIT) * * Copyright (c) 20014 <NAME> <<EMAIL>> * * shapemapreader.h * This file is part of the QSimpleSpatial. * * 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 r...
#include "Charger.h" #include "Renderer.h" #include "Editor.h" #include "Game.h" #include "State.h" #include "Killpad.h" using namespace glm; Charger::Charger(glm::vec2 pos) { className = "Charger"; Tag("Enemy"); this->position = pos; collider = new Collidable(vec2(1.5)); AttachComponent(collider); rigidbody...
#include "Game.hpp" Game::Game(int level) { font.loadFromFile("resources/VT323-Regular.ttf"); fontColor = sf::Color::Red; backColor = sf::Color(125, 125, 125); this->level = level; if (level == 1) { board = new Board(40, 70, 5, 5); } else if (level == 2) { board = ne...
/* This file is part of the UrgBenri application. Copyright (c) 2016 <NAME>. 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 copyrig...
/* Copyright 2021 <NAME> (GitHub: https://github.com/1runeberg, Twitter: https://twitter.com/1runeberg) * * SPDX-License-Identifier: MIT * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of s...
#include <iostream> #include <fstream> #include <string> #include <windows.h> void StrTrim(std::string&str) { std::string::size_type pos = str.find_first_not_of(" \t"); if (pos != std::string::npos) str = str.substr(pos,str.find_last_not_of(" \t")-pos+1); } void StrNumTrim(std::string&str) { std::str...
/** MIT License Copyright (c) 2020 <NAME> 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, distr...
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "mali-performance-counters.h" #include <lib/async-loop/cpp/loop.h> #include <lib/trace-provider/provider.h> #include <lib/trace/event.h> #include...
// SCC, DAG, greedy #include <stdio.h> #include <stdlib.h> #include <vector> #include <queue> #include <algorithm> #include <string.h> using namespace std; const int MAXN = 1024; class SCC { public: int n; vector<int> g[MAXN], dag[MAXN]; // <SCC begin> int vfind[MAXN], findIdx; int stk[MAXN], stkIdx; int in_stk[M...
// // Projction and Reflection // // verified: // AOJ Course CGL_1_A: Projection // AOJ Course CGL_1_B: Reflection // #include <iostream> #include <vector> #include <cmath> #include <iomanip> using namespace std; //////////////////////////// // 基本要素 (点, 線分) //////////////////////////// using DD = double; const...
// Use of this source code is governed by a BSD-style license // that can be found in the License file. // // Author: <NAME> (chenshuo at chenshuo dot com) #include "muduo/base/ProcessInfo.h" #include "muduo/base/CurrentThread.h" #include "muduo/base/FileUtil.h" #include <algorithm> #include <assert.h> #include <dir...
// Copyright 2015 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcodec/jbig2/JBig2_HtrdProc.h" #include <algorithm> #include ...
//---------------------------------------------------------------------------// // ____ _____________ __ __ __ _ _____ ___ _ // // / __ \/ ____/ ___/\ \/ / | \/ (_)__ _ _ __|_ _/ __| /_\ // // / / / / __/ \__ \ \ / | |\/| | / _| '_/ _ \| || (__ / _ \ // ...
#include <cmath> #include <nana/gui.hpp> #include <nana/gui/filebox.hpp> #include <nana/gui/widgets/menu.hpp> #include <nana/gui/widgets/menubar.hpp> #include <windows.h> #include "dxf.h" int main() { dxfv::CDxf dxf; // previous mouse position when dragged with left button pressed nana::point old_pos {-...
/* Allocore Example: Gravity Well Description: The demonstrates how to make many lightweight bodies interact with the gravitational pull of a single heavy body. Press the number keys to reset the particles with different initial conditions. Author: <NAME>, Nov. 2015 */ #include "al/app/al_App.hpp" #include "al/type...
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | | | Cop...
#include "mouse.h" #include "../io/io.h" #include "../graphics/BasicRenderer.h" // Which byte from the mouse packet are we at(out of 3 or 4 usually) // 4th byte would be for scroll wheel and mouse 4 and 5 uint8_t mouse_cycle = 0; // The full mouse packet uint8_t mouse_packet[4]; bool mouse_packet_ready = false; // P...
// Copyright (c) 2013 Adobe Systems Incorporated. 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...