text
stringlengths
3.08k
12.5k
/** * Stakeout problem * * Congratulations! You are the new elite hacker in a group of * villainous ne'er-do-wells. * * Luckily this group is more saavy than your last band of ruffians, and * they are looking to software (and you) to improve their take. The con * man for the team, has gone door-to-door down ea...
#include "UtilityManager.h" RTC_Millis rtc = RTC_Millis(); const char* ntpServer = "pool.ntp.org"; const int LOCAL_TIME_OFFSET = -4; const long utcOffsetInSeconds = 3600 * LOCAL_TIME_OFFSET; bool Century = false, h12, pm; char daysOfTheWeek[7][20] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "...
#include "win32gdigrdriver2d.h" #include "../win32font/win32font.h" static Win32Font *_font; Win32GDIGrDriver2D win32GDIGrDriver2D; struct Win32GDIGrDriver2D::Context : public BBGrContext{ Win32GDIGraphics *graphics; Win32Font *font; BBRect cliprect; BBColor color; HPEN pen; HBRUSH brush; Context( Win32GDI...
#include "TFile.h" #include "TTree.h" #include "IORawData/HcalTBInputService/plugins/HcalTBSource.h" #include "IORawData/HcalTBInputService/src/CDFChunk.h" #include "IORawData/HcalTBInputService/src/CDFEventInfo.h" #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" #include "FWCore/MessageLogger/interfa...
#include <queue> #include "bsgda_cpu.h" using namespace std; using namespace torch::indexing; inline void clear(std::queue<int64_t> &q) { std::queue<int64_t> empty_q; std::swap(q, empty_q); } int64_t argmax(const unordered_map<int64_t, int64_t> &dict) { int64_t idx_max = dict.begin()->first; int64_t...
#include "FusionEKF.h" #include "tools.h" #include "Eigen/Dense" #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; /* Constructor */ FusionEKF::FusionEKF() : is_initialized_(false) , previous_timestamp_(0) // initializing matrices , R_laser_(MatrixXd(2, 2)) ,...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "../PRA_model/my_global.h" #include "../PRA_model/mprocess.h" #include "../PRA_model/mmu.h" #include "../PRA_model/ram.h" #include <QStyleOptionGraphicsItem> #include <QGraphicsRectItem> #include <QPainter> #include <QWidget> // I did it in les...
#include <fvar.hpp> #include <iomanip> #include "fish_rec.h" #include "trace.h" extern ofstream clogf; indexed_regional_fishery_record:: indexed_regional_fishery_record(indexed_regional_fishery_record& t) : fleet_list(t.fleet_list), index(t.index), nrec(t.nrec), fishery_records(t.fishery_records), mean_effort...
/*****************************************************************************/ // SGIView // Adopted by <NAME>, <<EMAIL>> // from TIFFView written by // Picking the compression method added by <NAME>, <<EMAIL>> // // SGIView.cpp // // This BView based object displays information about the SGITranslator. // // // Copyr...
/* Copyright 2017-2020 Siemens AG 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, distribute, sub...
#include "LandingSequenceManager.h" LandingSequenceManager::LandingSequenceManager(QGCApplication *app, QGCToolbox *toolbox) : QGCTool(app, toolbox) { qmlRegisterUncreatableType<LandingSequenceManager> ("QGroundControl", 1, 0, "LandingSequenceManager", "Reference only"); loadFromFile(); } void LandingSequ...
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
/* noise.cpp */ #include "noise.h" #include <random> #include <algorithm> #include <numeric> #include <core/method_bind.h> #include <core/method_bind_ext.gen.inc> //wow this is necessary for functions over five parameters to bind #include "PerlinNoise.hpp" void NoiseGenerator::_bind_methods() { ClassDB::bind_method(...
#include <iostream> #include <fstream> #include <string> #include <sys/stat.h> #include <vector> #ifdef _WIN32 #include <Windows.h> #include <Shldisp.h> #include <direct.h> #else #include <limits.h> #include <unistd.h> #endif extern "C" { #include "libraries/miniz.h" } using namespace std; /// <summary> /// Get th...
#include <gtest/gtest.h> #include "shelly/math/big_int.hpp" using namespace std; using namespace shelly; TEST(BigInt, ToString) { ASSERT_EQ(to_string(BigInt(2545235234234ll)), "2545235234234"); ASSERT_EQ(to_string(BigInt(1000000000007ll)), "1000000000007"); ASSERT_EQ(to_string(BigInt(-1000000000007ll)), "-1000...
#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/global/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESTransientHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h...
/* LibNRG - Networking for Real-time Games Copyright (C) 2012-2014 <NAME> <<EMAIL>> 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 s...
/* * BSD 3-Clause License * * Copyright (c) 2019, Analog Devices, 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: * * 1. Redistributions of source code must retain the above copyrigh...
/* * * Copyright 2015 gRPC authors. * * 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 agree...
// -*- C++ -*- // $Id: ORB_init.cpp 91648 2010-09-08 13:25:56Z johnnyw $ #include "tao/ORB.h" #include "tao/Object.h" #include "tao/SystemException.h" #include "ace/Log_Msg.h" // Valid test IOR. // Do not attempt to narrow the object represented by this IOR, nor // should you modify the IOR unless you replace it wit...
#include "GameMap.h" #include "Config.h" #include <fstream> #include "GameObjects/MovableObject.h" #include "Utils.h" GameMap::GameMap(const std::string &filename) : teleportSquaresCount(0), startPosSet(false), spawnPointSet(false) { loadFromFile(filename); } void GameMap::loadFromFile...
/* ============================================================================== 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 re...
/* * Copyright (c) 2018 * FZI Forschungszentrum Informatik, Karlsruhe, Germany (www.fzi.de) * KIT, Institute of Measurement and Control, Karlsruhe, Germany (www.mrt.kit.edu) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that t...
/** Copyright (c) 2014-2015 "M-Way Solutions GmbH" FruityMesh - Bluetooth Low Energy mesh protocol [http://mwaysolutions.com/] This file is part of FruityMesh FruityMesh 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 Foun...
#include "condition_variable_any2.hpp" #include "jthread.hpp" #include <iostream> #include <string> #include <sstream> #include <chrono> #include <mutex> #include <atomic> #include <cassert> #include <sstream> #include <vector> using namespace::std::literals; //------------------------------------------------------ ...
#include "OpenCLNetworkFunction.hpp" #include "internal.hpp" #include <string.h> using namespace unet; cl_platform_id OpenCLNetworkFunction::platformId = NULL; cl_device_id OpenCLNetworkFunction::deviceId = NULL; cl_context OpenCLNetworkFunction::context = NULL; cl_command_queue OpenCLNetworkFunction::commandQueue = ...
/* * Author: doe300 * * See the file "LICENSE" for the full license governing this code. */ #include "Compiler.h" #include "CompilationError.h" #include "Logger.h" #include "Parser.h" #include "Precompiler.h" #include "Profiler.h" #include "ThreadPool.h" #include "asm/CodeGenerator.h" #include "log.h" #include "l...
#include "../tomb5/pch.h" #include "deathsld.h" #include "../specific/function_stubs.h" #include "../game/lara_states.h" #include "collide.h" #include "laramisc.h" #include "items.h" #include "control.h" #include "sound.h" static short DeathSlideBounds[] = {-256, 256, -100, 100, 256, 512, 0, 0, -4550, 4550, 0, 0}; sta...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "utils.h" #include "reference.h" #define max(a,b) (a) > (b) ? (a) : (b) #define min(a,b) (a) < (b) ? (a) : (b) void car ( const float *__restrict img, const float *__restrict kernels, const float *__restrict offsets_h, ...
#include "../../Src/Gerador/Gerador.h" #include "../../Src/TabelaDeSimbolos/TabelaDeSimbolos.h" #include "../../Src/Tipos.h" #include <iostream> #include <sstream> #include <list> #include <memory> #include "../test_format.cpp" using namespace std; using namespace Addr3; bool test(Test& tester) { TabSim& ts = TabS...
#include <iostream> #include <Windows.h> #include <GL/glut.h> using namespace std; class Point { float x, y; public: Point(): x(0.0), y(0.0){} Point(float x, float y) : x(x), y(y) {} float getX() const { return x; } float getY() const { return y; } void setX(float x) { this->x = x; } void setY(float y)...
/* Bitcoin uses openssl's library. The openssl installed in the system uses 1.1.1, which is not compatible with shadow. In shadow, it is compatible with openssl 1.1.0h version, so you should use custom openssl(1.1.0h), not system openssl. This test is to run a test before running custom openssl on Bitcoin. Input para...
/* This file is part of Into. * Copyright (C) Intopii 2013. * All rights reserved. * * Licensees holding a commercial Into license may use this file in * accordance with the commercial license agreement. Please see * LICENSE.commercial for commercial licensing terms. * * Alternatively, this file may be used und...
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetWindowTitle( "spots and snapshots" ); ofSetVerticalSync(true); gui.setup("settings", "settings.xml", ofGetWidth()-220, 20 ); positions.setup("positions", "positions.xml", ofGetWidth()-44...
// // Created by steven on 9/30/15. // #include <gtest/gtest.h> #include "variant_visitor.h" #include <boost/program_options.hpp> #include <api/BamReader.h> #include "boost_input_utils.h" #include "src/io_data/local_bamtools/bamtools_pileup_engine.h" #include "src/io_data/local_bamtools/bamtools_fasta.h" class Par...
#include <iostream> #include <cmath> #include <random> #include <stdexcept> #include "sensorModel.hh" using namespace std; SensorModel::SensorModel(sm_t sm_p) { double sum_weights = sm_p.z_hit + sm_p.z_short + sm_p.z_max + sm_p.z_rand; if (abs(1 - sum_weights) >= 0.00001) throw runtime_error("Weights ...
#include <cstring> #include <ctime> #include <iostream> #include <fstream> #include <pthread.h> #include <semaphore.h> #include <vector> #include <queue> #include <unistd.h> using namespace std; #define _REENTRANT //保证pthread多线程安全 const int COUNTER_NUM = 2; // 定义柜员数量 struct Customer { pthread_t pID; //线程...
//-------------------------------------------------------------------------- // Parsing of GPS info from exif header. // // <NAME>, Dec 1999 - Dec 2002 //-------------------------------------------------------------------------- #include "jhead.hh" #define MAX_GPS_TAG 0x1e #define TAG_GPS_LAT_REF 1 #define TAG_...
/*========================================================================= Program: Main window Module: $RCSfile: CameraCalibrationMainWindow.cpp,v $ Creator: <NAME> <<EMAIL>> Language: C++ Author: $Author: <NAME> $ Date: $Date: 2011/07/4 15:28:30 $ Version: $Revision: 0.99 $ ======================...
/* * system_monitor.cpp * * Created on: Aug 21, 2019 * Author: <NAME> * */ #include <system_monitor_ros/system_monitor.h> #include <unistd.h> #include <fstream> #include <iostream> #include <numeric> #include <sstream> using namespace std::chrono_literals; SystemMonitor::SystemMonitor() { // Defaultin...
/* ============================================================================== KBMMappingDataStructure.cpp Created: 10 Apr 2020 11:53:40am Author: hsstraub ============================================================================== */ #include "KBMMappingDataStructure.h" KBMMappin...
#include <glutil.h> #include <math.h> const u32 FSIZE = sizeof(f32); const u32 ISIZE = sizeof(i32); const u32 SCR_WIDTH = 960; const u32 SCR_HEIGHT = 540; const f32 ASPECT = (f32)SCR_WIDTH / (f32)SCR_HEIGHT; f32* makeVertices(u32 xblocks, u32 yblocks, u32 comps, f32 from, f32 to) { f32* vertices =...
/**************************************************************************** Copyright 2021 <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 ...
/* 23. Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4->4->5->6 */ /* During 1st iteration, we merge two lists(every list is N) into one, this will make K down to K / 2. ...
/******************************************************************** find.cpp Usage: find <pattern> <file> Command line app which prints out every line in <file> which contains <pattern> *********************************************************************/ #include <stdio.h> #include <string.h> #include <st...
/* $Id: tstRTCidr.cpp 69111 2017-10-17 14:26:02Z vboxsync $ */ /** @file * IPRT Testcase - IPv4. */ /* * Copyright (C) 2008-2017 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it ...
#include<cstdio> #include<cstdlib> #include<cstring> #include <getopt.h> #include"argsparase.h" bool args_m=false;//model file; char args_model[ARGS_MAXLEN]; bool args_p=false;//powermap file; char args_powermap[ARGS_MAXLEN]; bool args_a=false;//auto; bool args_n=false; int args_points; bool args_c=...
/* Touch Sensor Example For other examples please check: https://github.com/espressif/esp-iot-solution/tree/master/examples This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS"...
// The MIT License (MIT) // // Copyright (c) 2020 <NAME> (aka Gnurdle) // // 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...
#include <iostream> #include <ctime> using namespace std; void display(char[]); void compTurn(char[], bool&); bool connectThree(char[], char); int main() { int lossCount = 0, tieCount = 0; bool gameOver = false; srand((unsigned)time(0)); char marks[11], // the Xs and Os. marks[0] is not used so that the element...
#include <iostream> #include <vector> #include <algorithm> #include <array> #include <sstream> #include <unordered_map> #include <functional> #include <memory> #include <get_input.hpp> // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * struct Instruction { std::string name; std::...
/* * Copyright 2009-2017 Alibaba Cloud 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...
/**************************************************************************** MIT License Copyright (c) 2021 <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 re...
#include "highway.h" #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<vector> #include<iostream> using namespace std; #define ll long long #define mp make_pair #define pb push_back #define ft first #define sd second #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) const int maxN=90100; i...
#include "state_merger.h" #include "mse-error.h" #include <stdlib.h> #include <math.h> #include <vector> #include <map> #include <stdio.h> #include <gsl/gsl_cdf.h> REGISTER_DEF_DATATYPE(mse_data); REGISTER_DEF_TYPE(mse_error); mse_data::mse_data(){ mean = 0; merge_point = -1; }; void mse_data::read_from(int ...
// Copyright <NAME>. All Rights Reserved. #include <iostream> #include <string> #include <vector> #include "Deck.h" #include "Card.h" using namespace consoleCards; // autograder support int GetNumCards(); void InitializeTestCaseCards(); int TestCaseNumber = 0; int NextCard = 0; Card TestCaseCards[9]...
#include <iostream> #include <stack> using namespace std; class Node{ public: Node* lchild; int data; Node* rchild; }; class BST{ private: Node* root; public: BST(){ root = nullptr; } Node* getRoot(){ return root; } void iInsert(int key); void Inorder(Node* p); Node* iSearch(int...
/* Copyright 2020 <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 to in writing,...
#include "readyscreen.h" #include <GLFW/glfw3.h> #include <cmath> #include "screens/gamescreen.h" #include <algorithm> const int LEVELS_PER_COLUMN = 3; ReadyScreen::ReadyScreen(const std::vector<int>& joysticks, unsigned int a_selected_level_index) : selected_level_index(a_selected_level_index) { for (unsigned in...
#include <iostream> #include <cstdio> #include <cstring> #include <cassert> #include <cctype> using namespace std; typedef long long lint; #define cout cerr #define ni (next_num<int>()) template<class T>inline T next_num(){ T i=0;char c; while(!isdigit(c=getchar())&&c!='-'); bool flag=c=='-'; flag?c=getchar():0; w...
// MIT License :: Copyright (c) 2017 Karmel0x // https://github.com/Karmel0x/cloudflare-js-bypass #include <string> #include <vector> //#include <iostream> template<typename functor_type> void ExtractStringBetweenDelimitersOnSameLevel( const std::string &original_string, char opening_delimiter, char closing...
#include "ff_source_syntax2.h" #include <sstream> #include <stack> #include <string> #include <unordered_set> #include "sentence_metadata.h" #include "array2d.h" #include "filelib.h" using namespace std; // implements the source side syntax features described in Blunsom et al. (EMNLP 2008) // source trees must be r...
/***************************************************************************** * GATB : Genome Assembly Tool Box * Copyright (C) 2014 R.Chikhi, G.Rizk, E.Drezen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * publi...
/* * 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 (c) FIRST 2016. 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...
/* Description: In BeagleTown live some beagles in their own doghouses, Prue who is the Sparko’s girlfriend is preparing a birthday party for him, and she wants everybody in town be part of the party, but she is going to prepare a gourmet dinner and she needs to confirm the assistance of each one in BeagleTown, that ...
#include <mockturtle/mockturtle.hpp> #include <mockturtle/traits.hpp> #include <lorina/aiger.hpp> using namespace mockturtle; void TestRead() { mig_network mig; std::basic_string<char> input_verilog; std::cout << "Input VERILOG file(.v) name: "; std::cin >> input_verilog; /* read a network fr...
#include <arpa/inet.h> #include <errno.h> #include <netdb.h> #include <string.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/poll.h> #include "core/Socket.h" #include "core/StatusPrinter.h" #include "core/TritonSortAssert.h" const int Socket::YES_REUSE = 1; Socket::Socket() : mode(NONE), addre...
// // bogle_game.cpp // BoggleMultiProcess // // Created by <NAME> on 7/5/19. // Copyright © 2019 <NAME>. All rights reserved. // #include "boggle_game.hpp" #include <algorithm> #include <iostream> #include <iterator> #include <string> #include <thread> #include "GameConstants.hpp" #include "ThreadRAII.hpp" // t...
// // VADM - Virtual Amiga DOS Machine // // VADM executes (simple) programs written and compiled for Amiga DOS / Amiga OS. This is just a proof-of-concept of an ABI emulator, // so only a very small part of the actual Amiga DOS / Amiga OS is emulated. It was inspired by Wine, the virtual DOS machine (VDM) // in Window...
/* Thing.cpp - LLibrary for capture environment variables Data and send to Gateway for Iot solutions in Agro. Created by <NAME>, September 1, 2020. License: MIT //Released into the public domain. */ #include "Arduino.h" #include "Thing.h" #include <Wire.h> #define DHTTYPE DHT21 //CONSTRUCTOR METHO...
#include <map> #include <netdb.h> #include <netinet/in.h> #include <sstream> #include <sys/types.h> #include <sys/socket.h> #include <typeinfo> #include <unistd.h> #include "../include/ppddl/mini-gpt/domains.h" #include "../include/ppddl/mini-gpt/exceptions.h" #include "../include/ppddl/mini-gpt/formulas.h" #include "...
//- // ========================================================================== // Copyright 1995,2006,2008 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk // license agreement provided at the time of installation or download, // or which otherwise accompanies th...
/* Copyright 2018 <NAME> */ #include <fstream> #include <iostream> #include <algorithm> #include <string> #include <queue> #include <stack> #include "Graph.h" #include "hashtable.h" #include "hash_functions.h" std::ofstream g("task1.out"); std::ofstream g2("task2.out"); std::ofstream g4("task4.out"); std::ofstream ...
/* 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, d...
#include <algorithm> // for std::swap #include <cstddef> #include <cassert> // Matrix traits: This describes how a matrix is accessed. By // externalizing this information into a traits class, the same code // can be used both with native arrays and matrix classes. To use the // default implementation of the traits cl...
#include<bits/stdc++.h> using namespace std; const int N = 3e5 + 9, mod = 998244353 ; template <const int32_t MOD> struct modint { int32_t value; modint() = default; modint(int32_t value_) : value(value_) {} inline modint<MOD> operator + (modint<MOD> other) const { int32_t c = this->value + other.valu...
/** * Copyright (c) 2017 <NAME> * * LICENSE * === * The MIT License * * * DESCRIPTION * === * MEX wrapper of `fasta2matrix.cpp` * * This function reads FASTA file for DNA sequences. Supported nucleic acid * codes are: N and ATGC. Assume that size_t is equal to uint64_t * * * HISTORY * === * - 20...
#include <pcl/conversions.h> #include <pcl/point_types.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl_ros/point_cloud.h> #include <ros/ros.h> #include <sensor_msgs/Image.h> #include <sensor_msgs/PointCloud2.h> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <thread> ...
/*-- Open3DMotion Copyright (c) 2004-2012. All rights reserved. See LICENSE.txt for more information. --*/ #include "Open3DMotion/OpenORM/Mappings/MapArrayFloat64.h" #include <cppunit/extensions/HelperMacros.h> using namespace Open3DMotion; using namespace std; // some useful test data namespa...
#include "FAACEncoder.h" #include <memory> FAACEncoder::FAACEncoder(const OeipAudioEncoder& audioDesc) { encoderDesc = audioDesc; if (encoderDesc.bitrate == 0) { encoderDesc.bitrate = 48000; } openEncode(); } FAACEncoder::~FAACEncoder() { if (samples) { av_free(samples); samples = nullptr; } } int32_t FA...
/* * Copyright (C) 2012-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 conditi...
#include "scara.h" #include <iostream> Scara *robot; Scara::Scara(QObject *parent) : QObject(parent), th1(0.0), th2(90.0), z(0.0), dth1(0.0), dth2(0.0), dz(0.0), posx(0.0), posy(0.0), posz(0.0), tx(1.0), ty(1.0), tz(0.0), mode(SIMPLE), r1(1.5), r2(1.5) { baseModel.load(...
#include <iostream> #include "opencv2/opencv.hpp" using namespace std; using namespace cv; using namespace cv::ml; /* GOOD TO KNOW !!! When accessing a matrix element - during creation you need to give rows, cols, type - during accessing with the at operator you need to give <type>(rows, cols) - during si...
#include <cstdio> #include <cstring> #include <vector> #include <stack> #include <algorithm> using namespace std; typedef pair<int,int> pii; const int maxn = 10005; const int maxm = 100005; int N, M, eccno[maxm]; int cntlock, cntbcc, pre[maxn], iscut[maxn], bccno[maxn]; int E, first[maxn], jump[maxm << 1], link[maxm ...
//===--- PILWitnessTable.cpp - Defines the PILWitnessTable class ----------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
#include "format.hpp" #include <math.h> #include <string> #include <iomanip> // Static member Format::data_units Format::m_data_units; std::wstring Format::NameValuePair(const std::wstring& name, const std::wstring& value, const wchar_t replace_empty_with) { constexpr std::size_t max_length = 50; std::wstri...
/* Copyright 2018 Software Reliability Lab, ETH Zurich 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 applicabl...
// MIT License // // Copyright (c) 2021 <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, merg...
#include <string.h> #include "opts.h" #include "material.h" #include "board.h" MaterialTable material; namespace { // local arrays containing the piece values in middle/end game // phase int piece_vals_mg[5] = { PawnValueMG, KnightValueMG, BishopValueMG, RookValueMG, QueenValueMG }; int piece_vals_eg[5] = { ...
#include "Angel.h" typedef vec3 color3; const color3 WHITE(1.0, 1.0, 1.0); const color3 BLACK(0.0, 0.0, 0.0); const color3 RED (1.0, 0.0, 0.0); const color3 GREEN(0.0, 1.0, 0.0); const color3 BLUE (0.0, 0.0, 1.0); const int CircleNumPoints = 1080; const int TriangleNumPoints = 3; const int EllipseNumPoints = 10...
#include <fcntl.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <stdio.h> #include <netinet/in.h> #include <resolv.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <pthread.h> #include "my.pb.h" #include <iostream> #include <sstream> #include <algorithm> #include <it...
#include "Matrix.h" #include "../Fraction/Fraction.h" #include <cfloat> #include <assert.h> #include <time.h> void printTest() //MUST check with valgrind { Matrix<double> first(4,15); first.Zero(); cout << "matrix A:" << endl; first.print(); first.t(); cout << "matrix A^t:" << endl; first.print(); first.t(); ...
#include "mqtt.h" #include "user_config.h" #include "managed_wifi.h" #include "config.h" #include "log.h" #include "led.h" Mqtt::Mqtt() : m_espClient(), m_client(m_espClient), m_hassioAlive(true), // Expect Hassio to be alive at start up to avoid unecessary recovery steps. m_error(fals...
// CCrypt.cpp : implementation file // #include "stdafx.h" #include "Crypt.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CCrypt BYTE CCrypt::m_dwTag[] = "DAR "; LPCTSTR CCrypt::szC...
#include <cassert> #if defined ( _WIN32 ) #include <windows.h> #else #include <unistd.h> #endif #include <boost/algorithm/string.hpp> #include <boost/format.hpp> #include <boost/lexical_cast.hpp> #include "ipcserver.hpp" #include "compression.hpp" #include "exception.hpp" #include "ipcprotocol.hpp" #include "ipcrespo...
// Copyright 2021 Google 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 agreed to in w...
//------------------------------------------------------------------------------ // Symbol.cpp // Symbols for semantic analysis // // File is under the MIT license; see LICENSE for details //------------------------------------------------------------------------------ #include "slang/symbols/Symbol.h" #include "slang...
/* Author: Dr. Ing. <NAME> Email: <EMAIL> Description: */ #include <bits/stdc++.h> // Standard C++ #include <geometry_msgs/PointStamped.h> // Geometry point message #include <nav_msgs/OccupancyGrid.h> // OGM #include <pcl/common/distances.h> // Euclidean dist...
/*** * * Copyright (c) 1996-2002, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. * All Rights Reserved. * * Use, distribution, and modification of this source code and/or resulting * obje...