text stringlengths 3.08k 12.5k |
|---|
/*
* LocalizeVMT
* MIT License
* Copyright (c) 2020 polygonerror
*
* I'M NOT GOOD AT VARIABLE NAMES I'M SORRY
*/
#include <iostream>
#include <string>
#include <vector>
#include <filesystem>
#include "VTFLib\lib\VTFLib.h"
#include "utility.hpp"
namespace fs = std::filesystem;
std::vector<std:... |
// Copyright (c) 2009, Whispersoft s.r.l.
// 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 con... |
/*****************************************************************************/
/* */
/* File: VectLERP.cpp */
/* */
... |
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2016-2019 <NAME>, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtaining ... |
#include "sheap/Sheap.h"
#include <algorithm>
#include <benchmark/benchmark.h>
#include <cstdlib>
#include <iterator>
#include <random>
#include <utility>
#include <vector>
template <typename T1, typename T2> constexpr auto alloc_range(T1 &&a, T2 &&b) {
return std::make_pair(a, b);
}
static const int MAX_THREADS =... |
// Copyright (c) 2018-2021 bianchui https://github.com/bianchui
//
// 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, c... |
/**************************************************************************/
/*!
@file SimSound.cpp
@author <NAME>
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2016, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or w... |
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
template <class T>
using Graph = vector<vector<T>>;
/******** Utility ***************/
int bsize(int bits, int _max){
int c = 0;
for(int ix=0; ix!=_max; ++ix)
if((bits&(1<<ix)) !=0){
++c;
}
return c;
}
long factrial(long n){... |
// JPEG:
static void init_source (jpeg_decompress_struct *cinfo) {}
static boolean fill_input_buffer (j_decompress_ptr cinfo)
{
ERREXIT(cinfo, JERR_INPUT_EMPTY);
return TRUE;
}
static void skip_input_data (jpeg_decompress_struct *cinfo, long num_bytes)
{
struct jpeg_source_mgr* src = (struct jpeg_source_mg... |
/** @file CSource.cpp
*
* @brief Helper for loading and managing COLLADA source nodes
*
* Copyright 2012-2013, <NAME>
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author <NAME> (www.stewartghall.com)
* @date 3/10/2013
* @copyright Copyright 20... |
/*
* Copyright (C) 2012-2015 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... |
#include <stddef.h> /* offsetof */
#include "sokol_app.h"
#include "sokol_gfx.h"
#include "sokol_glue.h"
#include "sokol_time.h"
#include "sokol_imgui.h"
#include "gl_engine.h"
#include "gl_context_sapp.h"
#include "gl_logger.h"
#include "gl_utils.h"
#include "gl_material_diffuse.h"
#include "imgui/imgui.h"
#include ... |
/*-
* Copyright (c) 2021-2022 <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 condition... |
// The MIT License (MIT)
//
// Copyright (c) 2018 <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, m... |
#include <amara.h>
#include <amaraRPG.h>
using namespace Amara;
using namespace std;
class WalkTo: public Script {
public:
Amara::PlayerProp* gnik;
int x = 0, y = 0;
WalkTo(int tx, int ty) {
x = tx;
y = ty;
}
void prepare(Amara::Actor* actor) {
... |
/*
* Copyright (c) 2020-2021 Valve Corporation
* Copyright (c) 2020-2021 LunarG, 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... |
#include "stdafx.h"
#include "FileDownloader.h"
#include "SessionStatusListener.h"
#include "LoginParams.h"
#include "CommonSources.h"
void printHelp(std::string &);
bool checkObligatoryParams(LoginParams *);
void printSampleParams(std::string &, LoginParams *);
bool getReports(IO2GSession *session);
int main(int arg... |
/*
MIT License
Copyright (c) 2018 ShellAddicted <github.com/ShellAddicted>
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, cop... |
//
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the terms described in the LICENSE file in the root of this project.
//
#include "stdafx.h"
// This is the name of the distribution, it must only conform to the following
// regular expression: ^[a-zA-Z0-9._-]+$
#define DISTRIBUTION_NA... |
//
// Created by <NAME> on 2019-07-30.
//
#include "FontRenderer.h"
#include "messages.h"
#define GLM_FORCE_SWIZZLE
#include <glm/glm.hpp>
#include <ft2build.h>
#include <math.h>
#include <stdlib.h>
#include FT_FREETYPE_H
#include "ogl/Plane.h"
#include "ogl/Shader.h"
#include "ogl/Texture.h"
#include "ogl/ProgramSh... |
/*----------------------------------------------------------------------------*
| This file is part of WinDEU, the port of DEU to Windows. |
| WinDEU was created by the DEU team: |
| <NAME>, <NAME>, <NAME> and others... |
| ... |
#include "fileinfo.h"
FileInfo::FileInfo(QObject *parent) :
QObject(parent)
{
}
/*
* Get verbose information about a single file
*/
QVariant FileInfo::getFileInfo(const QString &fullPath)
{
QFileInfo fileInfo(fullPath);
QVariantMap replyMap;
QVariantMap detailEntries;
QVariantMap fileDetails;... |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkDashPathEffect.h"
#include "SkMatrix.h"
#include "SkPaint.h"
#include "SkPathEffect.h"
#include "S... |
// { dg-require-namedlocale "de_DE.ISO8859-15" }
// 2001-11-19 <NAME> <<EMAIL>>
// Copyright (C) 2001-2017 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 Licens... |
/**
* Word square in Gecode.
*
* From http://en.wikipedia.org/wiki/Word_square
* """
* A word square is a special case of acrostic. It consists of a set of words,
* all having the same number of letters as the total number of words (the
* "order" of the square); when the words are written out in a square gr... |
#include "encode.hpp"
#include <iostream>
#include <string>
#include <bitset>
#include <cstdlib>
#include <map>
using std::string;
using std::bitset;
using std::cout;
using std::endl;
using std::map;
string base64_encode (string text){
// we need the length of the text
// another int for index operations
// an... |
/*
* Testing.cpp
*
* Created on: May 13, 2015
* Author: david
*/
#include "GlobalDeclaration.h"
using namespace std;
using namespace Eigen;
void testDivision();
/*----------------------------------------------------------------------------------------------------
... |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
#include "GameData.h"
#include "Logic.h"
#include "Images.h"
#include "Utils.h"
// Include Arduboy2 for Sprites.
#include <Arduboy2.h>
// Include progmem reading funtions for map loading.
#include <avr/pgmspace.h>
void GameData::renderBoard() const
{
// Forward to the offset version.
this->renderBo... |
/*
* Copyright 2006-2012 Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*/
#include <driver_settings.h>
#include <image.h>
#include <kernel/image.h>
#include <private/system/safemode_defs.h>
#include <Directory.h>
#inclu... |
#include "../include/rgbcolor.h"
RGBColor::RGBColor(unsigned char r, unsigned char g, unsigned char b) :
red(r), green(g), blue(b) {}
RGBColor::RGBColor(unsigned char col) : RGBColor(col, col, col) {}
void RGBColor::setRed(unsigned char new_red)
{
red = new_red;
}
void RGBColor::setGreen(unsigned char n... |
//=====================================================================
// Copyright 2018 (c), Advanced Micro Devices, Inc. All rights reserved.
//=====================================================================
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software ... |
//=======================================================================
// Copyright <NAME> 2013-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)
//========================================================... |
/*
* Copyright 1993-2015 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduction, disclosure, or distribution of this software
* and related documentation... |
// include statements //
// #include <iostream> // TODO: remove after testing
// #include <unordered_map> // std::unordered_map
// #include <vector> // std::vector
// #include "Connection.hpp"
// #include "ControlMessage.hpp"
// #include "DataMessage.hpp"
// #include "Keyboard.hpp"
#include "Modem.hpp"
... |
//%2005////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Cor... |
/*
* Copyright 2013 The Android Open Source Project
*
* 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 applica... |
/*
PROBLEM STATEMENT:
11:Write C++/JAVA program to generate fractal patterns by using KOCH CURVES.
*/
#include<iostream>
#include<graphics.h>
#include<math.h>
using namespace std;
class DDA
{
float X1,Y1,X2,Y2,DX,DY,X,Y,X_INC,Y_INC;int X0,Y0,STEPS;int gd=DETECT,gm;
public:
DDA()
{
X0=0;
Y0=0;
... |
/*
Name: <NAME>
Date: Wednesday July 13, 2016
*/
#include "encode.h"
#define MAX_BITS_USED 16;
const char Special_Character = 3; // EOT character
const int Max_BWT_Length = 2048;
const unsigned short Max_Dictionary_Size = 65535;
void resetDictionary (map<str... |
#include <stdexcept>
#include "BAMfunctions.h"
#include "htslib/htslib/kstring.h"
string bam_cigarString (bam1_t *b) {//output CIGAR string
// kstring_t strK;
// kstring_t *str=&strK;
const bam1_core_t *c = &b->core;
string cigarString("");
if ( c->n_cigar > 0 ) {
uint32_t *cigar = bam_get_cig... |
#include "jdk_world.h"
#include "jdk_string.h"
int makebin_header( FILE *c_out, FILE *h_out, const char *prefix )
{
jdk_str<128> upper_prefix(prefix);
upper_prefix.upr();
fprintf( h_out, "#ifndef __%s_H\n#define __%s_H\n#include \"jdk_bindir.h\"\n\n", upper_prefix.c_str(), upper_prefix.c_str() );
fprintf( h... |
#include <iostream>
#include <string>
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
#include <vector>
using namespace std;
struct playerInfo
{
string playerName;
unsigned short int playerAge{};
}p_playerInfo;
int randomNumber();
int maxTries;
int origMaxTries;
vector<int> playerGues... |
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <imgui.h>
#include <Lambda/Lambda.h>
#include <Lambda/core/Entrypoint.h>
#include "ext/matrix_transform.hpp"
#include "Lambda/platform/opengl/OpenGLShader.h"
#include "Sandbox2D.h"
using lambda::core::Application;
using lambda::core::OrthographicCameraC... |
/*
* 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 the following disclaimer.
* 2. Redistributions in ... |
#include "DataFormats/L1TrackTrigger/interface/TTDTC.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <numeric>
using namespace std;
using namespace edm;
TTDTC::TTDTC(int numRegions, int numOverlappingRegions, int numDTCsPerRegion)
: numRegions_(numRegions),
numOverlappingRegions_(numOverlappi... |
#include <algorithm>
#include <cctype>
#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>
#include "compilation_database.h"
#include "config.h"
#include "logger.h"
#include "utils.h"
std::optional<compilation_database> compilation_database::read_from(const fs::path &path) {
// For some re... |
#include "mqtt_service.h"
#include <iterator>
#include <sstream>
#include <string.h>
#include <vector>
#include "esp_event.h"
#include "esp_log.h"
#include "events.h"
#include "mqtt_client.h"
static const char *TAG = "win-mqtt";
namespace {
// Forwards C-style functional ESP events to the MqttService class.
sta... |
/*
PWMReceiver.cpp - Library for asynchronous PWM signal processing on the most of the arduino pins.
It is:
* Quick - uses interrupts and event driven style of coding for the best performance and straightforward usage
* Thread safe - the values accessed from within events are thread safe so you can use them wi... |
// Copyright 2020 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 "typecd/udev_monitor.h"
#include <base/bind.h>
#include <base/check.h>
#include <base/logging.h>
#include <brillo/udev/udev_enumerate.h>
#inc... |
/**************************************************************************
***
*** Copyright (c) 2003 Regents of the University of Michigan,
*** <NAME> and <NAME>
***
*** Contact author(s): <EMAIL>, <EMAIL>
*** Original Affiliation: EECS Department,
*** The University of... |
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008, <NAME>. BlueQuartz Software
// All rights reserved.
// BSD License: http://www.opensource.org/licenses/bsd-license.html
//
//
///////////////////////////////////////////////////////////////////////////////
#inc... |
#include <vtkAssemblyPath.h>
#include <vtkCell.h>
#include <vtkCommand.h>
#include <vtkCornerAnnotation.h>
#include <vtkDataArray.h>
#include <vtkImageActor.h>
#include <vtkImageData.h>
#include <vtkImageReader2.h>
#include <vtkImageReader2Factory.h>
#include <vtkImageViewer2.h>
#include <vtkInteractorStyleImage.h>
#in... |
/* Copyright (C) 2003 MySQL AB
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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT AN... |
//---cat rawtcp.c---
// Run as root or SUID 0, just datagram no data/payload
#include "packet_sending.h"
void convert_int_to_ip(int ip_to_convert, std::string& new_ip)
{
int num_of_bytes = 4;
for (int i = 0; i < num_of_bytes; i++)
{
new_ip += std::to_string((ip_to_convert >> i*8) & 0xFF);
if (i != num_of_bytes ... |
// Copyright (c) 2012-2014 <NAME>, <NAME>, <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, m... |
/*------------------------------------------------------------------------
* (The MIT License)
*
* Copyright (c) 2008-2011 Rhomobile, Inc.
*
* 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 ... |
/**
* Domain for binary problems
*/
#include "bp_domains.hpp"
void BPDomains::init(int _nvars)
{
nvars = _nvars;
nvars_set_zero = 0;
nvars_set_one = 0;
domains.resize(nvars + 2);
for (int i = 0; i < nvars; ++i) {
domains[i].domain = DOM_ZERO_ONE;
domains[i].var = i;
}
int start = start_index();
int end... |
#include "perf.h"
#include "nanovg.h"
#include <glad/glad.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#ifdef _MSC_VER
#define snprintf _snprintf
#elif !defined(__MINGW32__)
#include <iconv.h>
#endif
// timer query support
#ifndef GL_ARB_timer_query
#define GL_TIME_ELAPSED 0x88BF
// typedef void (APIEN... |
#include <algorithm>
#include <cmath>
#include <iostream>
#include "library.h"
#include <map>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using namespace library;
class Problem {
public:
struct machine {
long registers[4] =... |
//===--- AttributeList.cpp --------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include "EditState.h"
#include <fstream>
#include <sstream>
#include "InputManager.h"
#include "Game.h"
#include "Blood.h"
#include "Flesh.h"
#include "EditableFloor.h"
#include "MenuState.h"
#include "Config.h"
#include "Rectangle.h"
#define WIDTH 1280
#define HEIGHT 720
#define N_BACKGROUND 2
using std::ifstrea... |
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <wctype.h>
#include <io.h>
#include <WinSock2.h>
#include "getopt.hpp"
uintmax_t tlinect, twordct, tcharct;
int... |
/*****************************************************************************
* Face Recognition using Eigenfaces or Fisherfaces
******************************************************************************
* by <NAME>, 5th Dec 2012
* http://www.shervinemami.info/openCV.html
*******************************... |
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
// @(#)root/reflex:$Id$
// Author: <NAME> 2004
#include "Reflex/Reflex.h"
#include <iostream>
#include <fstream>
#ifdef _WIN32
# include <windows.h>
#elif defined(__linux) || defined(__APPLE__)
# include <dlfcn.h>
#endif
using namespace ROOT::Reflex;
using namespace std;
enum Visibility { Public, Protected, Pri... |
#include "leb128.h"
#include "CLI11.hpp"
#include "json.hpp"
#include "toml.hpp"
#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"
#include <iostream>
#include <thread>
#include <vector>
#include <string>
#include <future>
#include <chrono>
#include <random>
#include <fstream>
using namespace std;
... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <cstddef>
#include <optional>
#include <ostream>
#include <pup.h>
#include <utility>
#include <vector>
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "NumericalAlgorithms/Spectral/Mesh.hpp"
#include "Parallel/PupSt... |
#include "plate_recognizer.h"
#include <regex>
void plate_recognizer::throw_if_invalid(const cv::Mat& image)
{
if (!image.data)
throw std::exception("Failed to load the plate image (Is the image corrupted?)");
}
bool plate_recognizer::try_execute_ocr(cv::Mat& plate_image, std::string& result, int& confidence)
{
o... |
#include <Rcpp.h>
using namespace Rcpp;
//' Discretization of a univariate density
//'
//' Discretizates a univariate density function using Simpson's rule.
//'
//' @param density The density function.
//' @param parameters Parameters of the density function.
//' @param ini_point Initial value for the discretization.
... |
#include <string>
#include <vector>
#include <tdme/application/Application.h>
#include <tdme/os/filesystem/FileNameFilter.h>
#include <tdme/os/filesystem/FileSystem.h>
#include <tdme/os/filesystem/FileSystemInterface.h>
#include <tdme/utils/Console.h>
#include <tdme/utils/Exception.h>
#include <tdme/utils/StringTokeni... |
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/cvaux.h>
#include <opencv/cxcore.h>
#include <opencv/ml.h>
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
using namespace std;
void cores(int &val_b,int &val_g,int &val_r,int cont){
if(cont==0){
val_r = 255;
val_b = 0;
... |
#include "EmersonUtil.h"
#include "Util.h"
#include "EmersonException.h"
#include <antlr3.h>
#include <iostream>
#include <fstream>
#include <string>
#include "EmersonLexer.h"
#include "EmersonParser.h"
#include "EmersonTree.h"
#include "EmersonInfo.h"
using namespace std;
void myRecoverFromMismatchedSet(struct AN... |
/*
* Copyright 2019 SiFive, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You should have received a copy of LICENSE.Apache2 along with
* this software. If not, you may obtain a copy at
*
* https://www.apache.org/... |
#include "RunnerThread.h"
#include <cstdlib>
#include <algorithm>
#include <unistd.h>
#include <iostream>
#include "scheduler_common.h"
#include "BiModalScheduler.h"
#include "rstm.h" /* for stm::init - initializing stm threads */
#include "atomic_ops.h"
using namespace std;
using namespace stm::scheduler;
RunnerTh... |
#include <stdio.h>
#include <stdlib.h>
#include "mpi.h"
#include <time.h>
#include <math.h>
#include <papi.h>
#define BLOCK_LOW(i,n,p) ((i)*(n)/(p))
#define BLOCK_HIGH(i,n,p) (BLOCK_LOW((i)+1,n,p)-1)
#define BLOCK_SIZE(i,n,p) (BLOCK_LOW((i)+1,n,p)-BLOCK_LOW(i,n,p))
#define BLOCK_OWNER(index,n,p) ((((p)*(index)+1)-1)/(... |
#include <iostream>
#include <SDL/SDL.h>
#include <SDL/SDL_gfxPrimitives.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_mixer.h>
#include <vector>
#include "base.h"
#include "game.h"
#include "video.h"
bool running = true;
bool playSounds = true;
Mix_Chunk *jetSound = nullptr;
Mix_Chunk *gotIt = nullptr;
Mix_Chun... |
#pragma once
#include "../modint.hpp"
#include <algorithm>
#include <array>
#include <cassert>
#include <tuple>
#include <vector>
// CUT begin
// Integer convolution for arbitrary mod
// with NTT (and Garner's algorithm) for ModInt / ModIntRuntime class.
// We skip Garner's algorithm if `skip_garner` is true or mod i... |
/// @file random_test.cxx
/// Unit tests
/// @author <NAME>
/// @date 2021
/// @copyright MIT License
#include "../../../main/cxx/core/random.h"
#include "../unittest.h"
using especia::Melg19937_64;
using especia::Mt19937_32;
using especia::Mt19937_64;
using especia::Pcg_32;
class Rng_Test : public Unit_Test {
privat... |
#include <cmath>
#include <memory>
#include "app/tide/records.h"
#include "app/tide/mass_constants.h"
#include "model/Peak.h"
#include "SpectrumCollectionFactory.h"
#include "SpectrumRecordWriter.h"
#include "io/carp.h"
#include "util/crux-utils.h"
// For printing uint64_t values
#define __STDC_FORMAT_MACROS
#ifndef ... |
#include "psmGeneralFunctions.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <chrono>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
using namespace std::chrono;
ofstream out;
class VanDerPolEquation: public PSM{
public:
void updateNthCoefficient(const vector<dou... |
#include "Util.h"
#include <sstream>
#include <cstdlib>
#include <iomanip>
#include "External/MurmurHash2_64.h"
#ifdef _WIN32
#include <windows.h>
#define _NO_OLDNAMES
#endif
std::wstring stringToWstring(const std::string& s)
{
std::wstring temp(s.length(), L' ');
std::copy(s.begin(), s.end(), temp.begin())... |
#include <iostream>
#include "..\includes\stdafx.h"
#include "dllmain.h"
#include "ConsoleWnd.h"
uintptr_t* ptrSFDMovAddr;
uintptr_t ptrcSofdec__startApp;
uintptr_t ptrmwPlyCalcWorkCprmSfd;
uintptr_t ptrcSofdec__finishMovie;
static uint32_t* ptrMemPoolMovie;
float newMovPosX;
float newMovNegX;
float newMovPosY;
floa... |
#include "framebuffer.hpp"
FrameBuffer::FrameBuffer(const char *device) {
fbfd = open(device, O_RDWR);
if (fbfd == -1) {
throw std::runtime_error("cannot open framebuffer device");
}
if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo) == -1) {
throw std::runtime_error("error reading fixed info... |
#include <bits/stdc++.h>
#define MAX_VALUE static_cast<int64_t>(1e18)
class SegmentTree {
private:
struct Node {
uint32_t left;
uint32_t right;
int64_t val;
int64_t add_val;
int64_t set_val;
bool updated;
Node()
: left(0),
right(0),
val(MAX_VALUE),
... |
/*
The MIT License
Copyright (c) 2008 <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, pu... |
/* errors.cpp
* Managing output and redirection of errors and messages; supplies yyerror()
* UnderC C++ interpreter
* <NAME>, 2001
* This is GPL'd software, and the usual disclaimers apply.
* See LICENCE
*/
#include "common.h"
#include "errors.h"
#include "input.h"
#ifdef _WCON
#include "ide.h"
#endif... |
#include <mpi.h>
#include <cassert>
#include <vector>
#include <string>
#include <random>
#include <iostream>
#include <fstream>
#include <sstream>
#include <boost/range/iterator_range.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
namespace fs = bo... |
#include <SFML/Graphics.hpp>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include "Constants.h"
#include "Fluid.h"
// Set application name
const std::string APPLICATION_TITLE = "2D Fluid Simulation";
// Set display to show normal particles
Display display = Display::Particles;
// Crea... |
#include <game.h>
void update(float delta)
{
hero.update(delta);
currentTime += delta;
if (currentTime >= prevTime + 1.125f) {
spawnEnemy();
prevTime = currentTime;
}
// Updating and cleaning enemies
for(int i = 0; i < enemies.size(); i++) {
Enemy *enemy = enemies[i];
... |
#include "mytrenderer.h"
using namespace StructureSynth::Model::Rendering;
using namespace SyntopiaCore::GLEngine;
using namespace SyntopiaCore::Math;
using namespace StructureSynth::Model;
void MyTrenderer::drawBox(SyntopiaCore::Math::Vector3f base,
SyntopiaCore::Math::Vector3f di... |
#include <math.h>
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
#include <tf/tf.h>
#include "kimera_rviz_markers/kimera_rviz_markers.h"
#include "kimera_rviz_markers/utils.h"
namespace krm {
namespace viz_msgs = visualization_msgs;
using IM = viz_msgs::InteractiveMarker;
using IMC = viz_msgs::Interacti... |
#include <mweb/mweb_transact.h>
#include <key_io.h>
#include <mw/models/tx/PegOutCoin.h>
#include <mw/wallet/TxBuilder.h>
using namespace MWEB;
TxType MWEB::GetTxType(const std::vector<CRecipient>& recipients, const std::vector<CInputCoin>& input_coins)
{
assert(!recipients.empty());
static auto is_ltc = []... |
////////////////////////////////////////////////////////////////////////////////
/// @brief Library to build up VPack documents.
///
/// DISCLAIMER
///
/// Copyright 2015 ArangoDB GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compl... |
#include "ParticleEmitter.h"
#include <algorithm>
#include <cmath>
#include <random>
#include <chrono>
#include "Game.h"
ParticleEmitter::ParticleEmitter(Shader shader, Texture2D texture, unsigned int amount, glm::vec2 square, glm::vec4 startColor, glm::vec4 endColor, unsigned int glBlendSrc, unsigned int glBlendDst) ... |
// Project: K-Means Clustering
// Date: 11 - 17 - 2016
// Class: CSCI 4350 - Intro to Artificial Intelligence
// Assignment: Open Lab 4 - Unsupervised Learning
// Filename: K-Means Driver Code (kmeans.cpp)
// Author: <NAME>
// Instructor: <NAME>
// Institution: Middle Tennessee State University
// Dep... |
#include <iostream>
#include <fstream>
#include <memory>
unsigned char *loadBMP(const char *filepath, unsigned int &width, unsigned int &height) {
std::ifstream file(filepath, std::ios::in | std::ios::binary | std::ios::ate);
if (!file.good()) {
std::cout << "Couldn't load texture from " << filepath << std::endl;
... |
#include <cstdio>
#include <algorithm>
const int BUFSIZE = 20*1024*1024;
char _stdin[BUFSIZE], *p = _stdin;
inline int readint()
{
char ch = *p++;
for (; ch > '9' || ch < '0'; ch = *p++);
int tmp = 0;
for (; '0' <= ch && ch <= '9'; ch = *p++)
tmp = tmp*10 + ch - '0';
return tmp;
}
inline char readchar()
... |
#include "stdafx.h"
// startup
void CRenderTarget::phase_scene_prepare ()
{
// KD: we need to clean up G-buffer every frame to avoid "ghosting" on sky
u_setrt(rt_Position, rt_Normal, rt_Color, 0);
CHK_DX(HW.pDevice->Clear(0L, NULL, D3DCLEAR_TARGET, 0x0, 1.0f, 0L));
// Clear depth & stencil
u_setrt(Device.dwWidth... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the agr... |
// Mathematics > Fundamentals > Mutual Recurrences
// Compute terms in a mutual recurrence.
//
// https://www.hackerrank.com/challenges/mutual-recurrences/problem
// https://www.hackerrank.com/contests/infinitum14/challenges/mutual-recurrences
// challenge id: 15898
//
#include <bits/stdc++.h>
using namespace std;
#p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.