text
stringlengths
3.08k
12.5k
/** * (c) 2016 The LV1RE Project. * Released under MIT license. Read LICENSE for more details. */ #include "io.h" #include "lv1/lv1.h" #define MAGIC4 0x4156968E5E0D1602ULL #define MAGIC9_1 0x997997D2B58E3C01ULL #define MAGIC9_2 0x997997D2B58E3C02ULL #define MAGIC9_3 0x997997D2B58E3C03ULL // --- begin: type...
#include <cstdlib> #include <iostream> #include <string> #include <vector> #include "../check-builder.hpp" #include "../layoutable.hpp" enum { TOKEN_INVALID, TOKEN_BAREKEY, TOKEN_STRKEY, TOKEN_STRING, TOKEN_BOOLEAN, TOKEN_FIXNUM, TOKEN_FLONUM, TOKEN_DATETIME, TOKEN_LBRACE, TOKEN...
// Copyright 2004-present Facebook. All Rights Reserved. // ================================================================ // Two-level scoring of video pairs. // // * Given a single 'needle' featurized video and a list of 'haystack' // featurized videos. // // * Looking at the time-average feature using cosine si...
#include <bits/stdc++.h> #ifdef _WIN32 #include "Windows.h" #endif /* by farmersrice */ using namespace std; const string SCP_START_STRING_SUBSTRING = "<p><strong>Item #:</strong>"; const string SCP_END_STRING = "<div class=\"footer-wikiwalk-nav\">"; const string SCP_END_STRING_2 = "<!-- wikidot_bottom_300x250 -->"...
#include "stdafx.h" /*! * @brief Initializes the Wallet object with PriceQuery * @param[in] query PriceQuery object for querying information about each cryptocurrency that the user owns * @param[in] file Path to the Wallet file */ Wallet::Wallet(PriceQuery &query, std::string file) { this->query = query; this->walle...
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm.h" #include "SkCanvas.h" #include "SkPaint.h" #include "SkDashPathEffect.h" static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, ...
// Copyright 2020 Makani Technologies LLC // // 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 ...
/* Boost example/newton-raphson.cpp * Newton iteration for intervals (partial: 0/0 is missing) * * Copyright <NAME> 2003 * Permission to use, copy, modify, sell, and distribute this software * is hereby granted without fee provided that the above copyright notice * appears in all copies and that both that c...
#include "median_move_generator.h" #include "globals.h" #include <algorithm> //#include "math.h" static void get_bb_for_net_excluding_block(ClusterNetId net_id, t_bb* coords, ClusterBlockId block_id); e_create_move MedianMoveGenerator::propose_move(t_pl_blocks_to_be_moved& blocks_affected, float rlim, std::vector<int...
#include "Utils/GManager.hpp" #include <vector> #include <cstdio> #include <cstdlib> #include <cmath> #include "Utils/PseudoRandom.hpp" #include "Programs/TTT.hpp" class RunTTT : public GManager { public: RunTTT(void) : GManager() { m_state = NULL; m_turn = TTT::FIRST; m_winner = TTT::EMPTY; m_nrMoves= ...
#include <qtphonemes.h> N::SpectrumSequence:: SpectrumSequence (void) { } N::SpectrumSequence:: SpectrumSequence(const SpectrumSequence & spectrum) { assign ( spectrum ) ; } N::SpectrumSequence::~SpectrumSequence(void) { } N::SpectrumSequence & N::SpectrumSequence::operator = (const SpectrumSequence & spectrum) {...
#include "rdtsc_utils.hpp" #include "common.h" #include <dlfcn.h> #include <fcntl.h> #include <sys/stat.h> #include <time.h> #include <sys/types.h> #include <unistd.h> #include <sys/stat.h> #include <limits.h> #include <stdio.h> #include <iostream> #define NOMINAL_FREQ_EXT ".nominal_freq" static __inline__ unsigned...
// Copyright <NAME> 2015 - 2016. // 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 "sample_functions.h" #include <gtest/gtest.h> #include <type_traits> using sg14::fixed_point...
#include <QDebug> #include <QDir> #include <QVector> #include <QString> #include <QFile> #include "ftnoir_protocol_wine.h" /* * Adds standard Steam library locations to vector and collects other Steam libraries on the system */ void get_steam_libs(QVector<QString> & outvector) { /* Define input stuff */ QVec...
// Include standard headers #include <stdio.h> #include <stdlib.h> // Include GLEW #include <GL/glew.h> // Include GLFW #include <GLFW/glfw3.h> GLFWwindow* window; // Include GLM #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> using namespace glm; #include <common/shader.hpp> int main( void ) { ...
#include <IFileSystem.h> #include <IReadFile.h> #include <IniFile.h> #include "utilities.h" #include <mathUtils.h> #include <IGUIElement.h> #include <IImage.h> #include <IMesh.h> #include <IVideoDriver.h> #include <IrrlichtDevice.h> #include <IGUIFont.h> using namespace irr; using namespace core; using namespace v...
#include <htool/htool.hpp> using namespace std; using namespace htool; class MyMatrix: public IMatrix<double>{ const vector<R3>& p1; const vector<R3>& p2; public: MyMatrix(const vector<R3>& p10,const vector<R3>& p20 ):IMatrix(p10.size(),p20.size()),p1(p10),p2(p20) {} double get_coef(const int& i, const int& j)...
#include <type_traits> #include <gtest/gtest.h> #include <rose/slice.hpp> using rose::MutSlice; using rose::Slice; TEST(MutSlice, IsBothTrivialAndStandardLayout) { EXPECT_TRUE(std::is_standard_layout<MutSlice<int>>::value); EXPECT_TRUE(std::is_trivial<MutSlice<int>>::value); EXPECT_TRUE(std::is_trivially_copya...
#include "PongGame.h" /** * \brief Just redirect to SimpleApplication Constructor and create a window with a width of 800 and height of 600 pixels */ PongGame::PongGame() : SimpleApplication("PongGame", 800, 600) { SpeedX = 0.06f; SpeedY = 0.06f; BallPosX = 0; BallPosY = 0; BatPosY = 0; GameOver = false; } vo...
//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ // //=============================================================================// #pragma once #include <cstdio> // Max number of properties in a datatable and its children. #define MAX_DA...
/* * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
/* Copyright by <NAME> */ /* Turma 4 */ /* Lab 01: Controlador de Voo */ /* Programa compilado com CodeBlocks 16.01 */ #include <stdio.h> #include <stdlib.h> #include <string.h> struct ptr { char city[39]; int code; struct ...
/* * PowerupObjectImplementation.cpp * * Created on: march 3, 2012 * Author: Kyle */ #include "server/zone/objects/tangible/powerup/PowerupObject.h" #include "templates/tangible/PowerupTemplate.h" #include "server/zone/packets/scene/AttributeListMessage.h" #include "server/zone/objects/tangible/weapon/Weap...
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <iostream> #include <string> #include <vector> using namespace std; #define ASSERT assert const char* ReadSexp(const char* filepath, int* outSize) { FILE* fp = fopen(filepath, "rb"); fseek(fp, 0, SEEK_END); int fsize = ftell(fp); fseek(fp, 0, ...
/* libnotify-qt - library for sending notifications implemented in Qt * Copyright (C) 2010-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 Li...
/* * Copyright (C) 2013, British Broadcasting Corporation * All Rights Reserved. * * Author: <NAME> * * 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(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
//%Header { /***************************************************************************** * * File: src/Mushcore/MushcoreInterpreter.cpp * * Author: <NAME> 2002-2005 * * This file contains original work by <NAME>. The author and his * employer (Mushware Limited) irrevocably waive all of their copyright rights ...
#include <ros/ros.h> #include <sensor_msgs/PointCloud2.h> #include <visualization_msgs/Marker.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/filters/voxel_grid.h> #include <pcl/conversions.h> using namespace::std; typedef pcl::PointCloud<pcl::...
// MIT License // // Copyright (c) 2021 <NAME> // Repository : https://github.com/FreeYourSoul/FyS // // 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...
//-------------------------------------------------------------------------------- // StageSign.cpp //-------------------------------------------------------------------------------- // Provides an animated introduction to the current stage //-----------------------------------------------------------------------------...
/* * Copyright 2007-2021 CM4all GmbH * All rights reserved. * * author: <NAME> <<EMAIL>> * * 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 ...
#include "src/mc-graph.hpp" #include "src/one-way-reducers.hpp" #include "src/two-way-reducers.hpp" #include "src/input-parser.hpp" #include "src/utils.hpp" #include "src/output-filter.hpp" #include "src/graph-database.hpp" #include "src/colormod.hpp" //#include "src/benchmarks/benchmark-marked-set.hpp" #include "src...
#include "AutoDiff.h" #include <chrono> #include <gtest/gtest.h> #include <math.h> #include <random> using namespace autodiff; double sampleTerm(TermPtr t, TermHolder& holder, int dim, int num, std::mt19937& gen) { double ret = 0.0f; std::uniform_real_distribution<> doubleDistri(-1.0, 1.0); std::vector<do...
/////////////////////////////////////////////////////////////////////////// // // Name: <NAME> // Class: Artificial Intelligence // Date: 9-29-05 // Assignment: Knight's Tour, written in C++ using STL // // The program uses a recursive method to complete an exhaustive search // A knight moves around the chessb...
#include "MCP.h" #include "UCP.h" #include "Application.h" #include "ModuleAgentContainer.h" enum State { ST_INIT, ST_REQUESTING_MCCs, ST_ITERATING_OVER_MCCs, // TODO: Other states ST_WAITING_ACCEPTANCE, ST_NEGOTIATING, ST_NEGOTIATION_FINISHED = 10 }; MCP::MCP(Node *node, uint16_t requestedItemID, uint16_t ...
/* * 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: * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
/* * Nimrod/G Agent * https://github.com/UQ-RCC/nimrodg-agent * * SPDX-License-Identifier: Apache-2.0 * Copyright (c) 2019 The University of Queensland * * 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 ...
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif // Purpose: // // Test the infrastucture for particles. This tests the fillG...
/* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS IN USING, DISPLAYING, A...
// // Disclaimer: // ---------- // // This code will work only if you selected window, graphics and audio. // // Note that the "Run Script" build phase will copy the required frameworks // or dylibs to your application bundle so you can execute it on any OS X // computer. // // Your resource files (images, sounds, fon...
/* Author: <NAME> (c) 2018 */ #include <Arduino.h> #include <TimerOne.h> #include <Wire.h> #include <MultiFuncShield.h> /* +-----+-------+------------------------+ | Pin | Label | Description | +-----+-------+------------------------+ | A0 | | Potentiometer | | A1 | S1...
#include "LDrawSpectrum.h" #include <QVBoxLayout> #ifndef __ONEPLOT__ #define __ONEPLOT__ #elif !defined __TWOPLOT__ #define __TWOPLOT__ #elif !defined __FORPLOT__ #define __FORPLOT__ #elif !defined __SIXPLOT__ #define __SIXPLOT__ #elif !defined __TENPLOT__ #define __TENPLOT__ #endif const QString...
/* Copyright (C) 2010-2019, The Regents of The University of Michigan. All rights reserved. This software was developed as part of the The Vulcan project in the Intelligent Robotics Lab under the direction of <NAME>, <EMAIL>. Use of this code is governed by an MIT-style License that can be found at "https://github...
/************************************************************************************************************************************* *The MIT License(MIT) * *Copyright(c) 2016 <NAME>(Getnamo) *Modified work Copyright(C) 2019 - 2021 Ultraleap, Inc. * *Permission is hereby granted, free of charge, to any person o...
#include <algorithm> #include <sstream> #include "../include/ts2cpp.h" #include "ast_common.h" std::ostream& operator<< (std::ostream& out, const t2crt::JS_Val& v) { switch(v.type) { case t2crt::TY_None: out << "None"; break; case t2crt::TY_Undef: out << "undefined"; break; case t2crt::TY_Null: out << "n...
#include <cmath> #include <ctime> #include <random> #include <vector> #include "wls.hpp" #include <gtest/gtest.h> class MatrixMap { public: MatrixMap(double *a, const int m, const int n) : _a(a), _m(m), _n(n) {} inline double operator()(const int i, const int j) const { return _a[i + j * _m]; } private...
#include "Ravl/Image/OpenCVConvert.hh" #include "Ravl/Stream.hh" #include "Ravl/Image/Image.hh" #include "Ravl/Image/ByteRGBValue.hh" #include "Ravl/Image/RealRGBValue.hh" using namespace RavlN; using namespace RavlImageN; int TestOpenCVConv () { ImageC<ByteT> r1; ImageC<RealT> r2; ImageC<Byt...
/* ESP8266 mDNS serial wifi bridge by <NAME> 2nd of May 2015 */ //#define BONJOUR_SUPPORT #define USE_WDT #include <ESP8266WiFi.h> #ifdef BONJOUR_SUPPORT #include <ESP8266mDNS.h> #endif #include <WiFiClient.h> #include "esp8266_pwm.h" #include <Smarties.h> String JSON_CONFIG = "%config%"; Smarties smarties = Sma...
/* 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 <cstdio> #include <string> #include <optional> #include <thread> #include "bitstream.hpp" #include "i2c.h...
#include "Worker.h" #include "ortools_utils.h" std::list<std::ostream *> & Worker::stream() { return _stream; } /************************************************************************************\ * Name: optimizermsg * * Purpose: Display Optim...
// // Chordal graph recognition // // Description: // A graph is chordal if any cycle C with |C| >= 4 has a chord. // It is also characterized by a perfect elimination ordering (PEO): // An ordering pi is a PEO if, for all u in V, // B(u) := {u} \cup { v in N(u) : pi(v) > pi(u) } // forms a clique. A gra...
#include "Chunk.hpp" #include "Event.hpp" #include "Packet.hpp" #include "World.hpp" #include <easylogging++.h> #include <bitset> Chunk::Chunk(Vector2I32 position, bool SkyLight) : pos(position), hasSkyLight(SkyLight) {} void Chunk::ParseChunk(PacketChunkData *packet) { StreamROBuffer chunkData(packet->Data.data()...
/* * Copyright 2016 Datto Inc. * * 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 to in w...
#include <cstdlib> #include <ctime> #include <fstream> #include <functional> #include <iostream> #include <map> #include <unistd.h> #include <vector> #include <derecho/core/derecho.hpp> #include <derecho/sst/detail/poll_utils.hpp> #include <derecho/sst/sst.hpp> using namespace derecho; using namespace sst; using nam...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2007-2010 <NAME> <<EMAIL>> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as publis...
//---------------------------------------------------------------------------// // Copyright (c) 2018-2021 <NAME> <<EMAIL>> // // MIT License // // 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 Soft...
#include <algorithm> #include <iostream> #include <map> #include <string> #include <sstream> #include <vector> using Grid = std::vector<std::vector<int>>; struct Point { int x; int y; auto operator<=>(const Point&) const = default; }; auto DistanceBetween(Point a, Point b) { auto xDist = b.x - a.x; ...
//------------------------------------------------------------------ // // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
/*********************************************************************** Copyright (c) 2017, The OpenBRAS project authors. 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 sou...
///////////////////////////////////////////////////////////////////////////////////////// // // Licensed under the "New" BSD License. // License page - https://code.google.com/p/motioncodelibrary/wiki/LICENSE // // GitHub repository - https://github.com/Neill3d/MoBu // // Author <NAME> (Neill3d) 2014 // e-mail to: ...
#include "pch.hpp" #include "TerrainMeshGenerator.h" #include "Geometry.h" #include "RimfrostMath.hpp" #include "WorkerThreads.h" using namespace rfm; TerrainMesh TerrainMeshGenerator::CreateTerrainMeshFromBMP(const std::string& fileName, TerrainMeshDesc desc) { #pragma warning(suppress : 4996) FILE* fp = fopen(f...
/* * Copyright (c) 2004, Laminar Research. * * 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, ...
/* * Copyright 2006-2008 The FLWOR Foundation. * * 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...
#include<iostream> #include<cstdlib> #include<ctime> using namespace std; #define SIZE 10 #define UP 0 #define DOWN 1 #define LEFT 2 #define RIGHT 3 class Grid { public: Grid():Grid(0) {} Grid(int s) { state = s; dir[UP] = NULL; dir[DOWN] = NULL; dir[LEFT] = NULL; dir[RIGHT] = NULL; }...
/** * @file helpersCacheProxy.cc * @author <NAME> * @copyright (C) 2019 ACK CYFRONET AGH * @copyright This software is released under the MIT license cited in * 'LICENSE.txt' */ #include "cache/helpersCache.h" #include "posixHelper.h" #include "communication/communicator.h" #include "context.h" #include "fslogi...
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "../common/tutorial/tutorial.h" #include "../common/tutorial/statistics.h" #include <set> #include "../../common/sys/mutex.h" #include "../common/core/ray.h" #include "../../kernels/geometry/triangle_triangle_intersector.h" #inclu...
/* Copyright (c) 2007 <NAME>. 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 require...
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2016 Couchbase, Inc. * * 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 * * ...
// Copyright (c) 2010 The Chromium 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 "media/tools/shader_bench/gpu_color_painter_exp.h" // Matrix used for the YUV to RGB conversion. static const float kYUV2RGB[9] = { 1.f, 0...
/*---------------------------------------------------------------------------*\ Copyright: ICE Stroemungsfoschungs GmbH Copyright held by original author ------------------------------------------------------------------------------- License This file is based on CAELUS. CAELUS is free software: you can redis...
// // Teacher.cpp // C++ProjectHandIn // // Created by <NAME> on 08/04/2021. // #include <iostream> #include <fstream> #include <string> #include "Teacher.h" #include "Student.h" using namespace std; Student TeacherAccess; Teacher::Teacher() // default constructor checking to see if user has registered { fna...
//Inspired from A Faster Algorithm for Betweenness Centrality paper. //Takes O(nm) and O(nm + n^2log n) time on unweighted and weighted networks. #include <iostream> #include <cstdio> #include <fstream> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <list> #include <cstrin...
#include "Model.h" #include "Globals.h" #include "Application.h" #include "ModuleTexture.h" #include "ModuleCamera.h" #include "ModuleEditor.h" #include "UIInspector.h" #include "Mesh.h" #include "GL/glew.h" #include <assimp\cimport.h> #include <assimp\scene.h> #include <assimp\postprocess.h> #include "leak...
#include <cassert> #include <fcntl.h> #include <iostream> #include <map> #include <memory> #include <poll.h> #include <stdexcept> #include <string> #include <termios.h> #include <unistd.h> #include <util/log_fmt.h> #include <vector> struct pty_file { const int fd; pty_file() : fd(posix_openpt(O_RD...
// Copyright 2016 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/fpdfapi/fpdf_page/cpdf_color.h" #include "core/fpdfapi/fpdf_pa...
/* Copyright 2020, RespiraWorks 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 to in writing, software d...
#include "Camera.h" Camera::Camera(float x, float y, float minx, float miny, float maxx, float maxy) { mTX = x; mTY = y; mX = x; mY = y; SetBounds(minx,miny,maxx,maxy); mA = 0.005f; mShakeX = 0.0f; mShakeY = 0.0f; mShakeMagnitude = 0; mShakeTime = 0.0f; mShakeTimeTotal = 0.0f; mShakeFreqX = 0.1f; mShake...
#include "sentry_i2c.h" SentryI2C::SentryI2C(HwSentryI2C::hw_i2c_t* i2c_port, uint32_t address) : SentryStreamBase(), HwSentryI2C(i2c_port, address) { SentryStreamBase::sentry_address_ = address; } SentryI2C::~SentryI2C() {} sentry_err_t SentryI2C::Get(const uint8_t reg_address, uint8_t* value) { return I2CR...
#include "L1Trigger/L1TMuonEndCap/interface/SectorProcessorShower.h" #define NUM_CSC_CHAMBERS 4 * 9 SectorProcessorShower::SectorProcessorShower() {} SectorProcessorShower::~SectorProcessorShower() {} void SectorProcessorShower::configure(const edm::ParameterSet& pset, int verbose, int endcap, int sector) { emtf_a...
// Lazy Propagation // range_add_update (using the addval value) // range_set_update (using the setval and lazyset value) // range_sum_of_squares_query // Problem link: https://www.spoj.com/problems/SEGSQRSS/ // Idea: notice that we also need to store the normal sum to be able to update (a + x)^2 = a^2 + x^2 + 2ax #in...
#include "Engine3D.h" #define PI 3.1415926535897932384626433832795 using namespace Engine3D; Model3D::Model3D(Object_t *obj, float *qView, float* projection) { mObject = obj; Projection = projection; Qview = qView; mVertex = new Vertex_t[mObject->numVertex]; } Model3D::~Model3D() { delete []mVer...
#include "ImageProcessing.hpp" #include <raspicam/raspicam_cv.h> #include <opencv2/imgproc.hpp> #include <opencv2/opencv.hpp> #include <stdlib.h> #include <unistd.h> #include <wiringPi.h> #include <wiringSerial.h> #include "Util.hpp" #include "CatTracking.hpp" using namespace std; using namespace cv; #d...
// Copyright (c) 2009, Google Inc. // 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 of conditi...
// // "$Id: pack.cxx 5519 2006-10-11 03:12:15Z mike $" // // Fl_Pack test program for the Fast Light Tool Kit (FLTK). // // Rather crude test of the Fl_Pack object. // Changing the type() of an Fl_Pack after it is displayed is not supported // so I have to do a lot of resizing of things before that. // // Copyright 199...
// 2000-08-02 bkoz // Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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; eithe...
// // Copyright 1998-2012 <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...
#include "stdafx.h" #include "libmsstyle\VisualStyle.h" #include <cstdarg> #define FMT_NORMAL (FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE) #define FMT_OK (FOREGROUND_GREEN) #define FMT_ERROR (FOREGROUND_RED) void printfc(WORD color, const char* format, ...) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HA...
// // Created by marvinle on 2019/2/1 7:34 PM. // #include "../include/server.h" #include "../include/httpparse.h" #include "../include/httpresponse.h" #include <unistd.h> #include <sys/stat.h> #include <sys/socket.h> #include <fcntl.h> #include <sys/mman.h> #include <iostream> #include <string> using namespace serv...
#include "size_literals.h" void CompileTestUnsigned() { static_assert(1_KB == 1024, "Wrong 1KB value"); static_assert(3_KB == 3 * 1024, "Wrong 3KB value"); static_assert(41_KB == 41 * 1024, "Wrong 41KB value"); static_assert(1023_KB == 1023 * 1024, "Wrong 1023KB value"); static_assert(1_MB == 1_KB...
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2016-2017. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup"; -*- // vi:set ts=4 sts=4 sw=4 noet : // Copyright 2008, The TPIE development team // // This file is part of TPIE. // // TPIE is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public ...
// Copyright 2019 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 "svcfs-service.h" #include <fuchsia/boot/c/fidl.h> #include <lib/fidl-async/bind.h> #include <lib/zx/job.h> #include <zircon/process.h> #include ...
/** * @file * @copyright defined in eos/LICENSE.txt */ #pragma once #include <eosio/chain/asset.hpp> #include <eosio/chain/wasm_interface.hpp> #include <fc/time.hpp> #pragma GCC diagnostic ignored "-Wunused-variable" namespace eosio { namespace chain { namespace config { typedef __uint128_t uint128_t; const st...
#include <ShaderDebugger/Utils.h> #include <string.h> #include <vector> static const std::vector<const char*> floatMats = { "mat2", "mat3", "mat4", "mat2x2", "mat2x3", "mat2x4", "mat3x2", "mat3x3", "mat3x4", "mat4x2", "mat4x3", "mat4x4", "float2x2", "float3x2", "float4x2", "float2x3", "float3x3", "fl...
/* * Copyright (C) 2019-2020 Open Source Robotics Foundation * * 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...
// Copyright (c) 2013-2022 CIYAM Developers // // Distributed under the MIT/X11 software license, please refer to the file license.txt // in the root project directory or http://www.opensource.org/licenses/mit-license.php. #ifdef PRECOMPILE_H # include "precompile.h" #endif #pragma hdrstop #ifndef HAS_PRECOMPILED_ST...
// Copyright 2017 The Chromium OS 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 <gtest/gtest.h> #include "authpolicy/anonymizer.h" namespace { constexpr char kLog[] = "Starting fake search for user name USER_NAME\n"...
#include "stdafx.h" #include <boost/lexical_cast.hpp> using boost::lexical_cast; #include <boost/algorithm/clamp.hpp> using boost::algorithm::clamp; #include "bitmap.h" // @param[in] inImage 入力画像 // @param[in] nMaxSearchRadius ディスタンス計算する時にデータを検索しに行く範囲を決める係数 // @param[in] outImage 出力先ディスタンスフィールド画像 void calc_distanc...
/* Copyright (C) 2005-2011, <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 of co...