text stringlengths 3.08k 12.5k |
|---|
#include <stdio.h>
#include <string.h>
#include <math.h>
#define max(a,b) (a)>(b)?(a):(b)
const int N = 1005;
struct bign {
int s[N];
bign () {
memset(s, 0, sizeof(s));
}
bign (int number) {*this = number;}
bign (const char* number) {*this = number;}
void put();
bign mul(int d);
void del();
bign operator ... |
#include "DiscobusDataUart.h"
#include <avr/interrupt.h>
////////////////////////////////////////////
/// Prototypes
////////////////////////////////////////////
void uartReceive();
void uartSendNextByte();
void writeByteToRegister(uint8_t);
////////////////////////////////////////////
/// Macros
///////////////////... |
#include "autogen/include/Parser.hpp"
#include "bootstrap/include/callback.hpp"
#include "bootstrap/include/lexer.hpp"
#include "codegen/include/json_generator.hpp"
#include "grammar/include/grammar.hpp"
#include "table/include/lalr_table.hpp"
#include "table/include/lr_table.hpp"
#include "table/include/table.hpp"
#in... |
#include "stdafx.h"
#include "evolutionmanager.h"
cEvolutionManager::cEvolutionManager()
: m_state(eState::Wait)
, m_curEpochSize(0)
, m_incT(0.f)
, m_graphIdx(0)
{
}
cEvolutionManager::~cEvolutionManager()
{
}
bool cEvolutionManager::Init()
{
return true;
}
// start evolution simuation
bool cEvolutionMan... |
//===-- SparcISelDAGToDAG.cpp - A dag to dag inst selector for Sparc ------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*******************************************************************\
Module: Symbolic Execution
Author: <NAME>
\*******************************************************************/
#include "complexity_limiter.h"
#include "goto_symex_state.h"
#include <cmath>
complexity_limitert::complexity_limitert(
message_ha... |
#include <assert.h>
#include "simplex.hh"
#include "geometry2.hh"
#include "matrix.hh"
#include "deformation-state.hh"
Real
simplex_area (Simplex const &s,
Node_vector_func2 func,
Deformation_state *def)
{
Vector2 v1, v2;
v1 = (*func) (s.node (0), def) - (*func) (s.node (2), def);
v2 = (*func) ... |
/*
Copyright (c) 2012-2017 <NAME> <<EMAIL>>
This file is part of SimpleScreenRecorder.
SimpleScreenRecorder is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) an... |
#include<bits/stdc++.h>
using namespace std;
#define MAX 110005
typedef pair<long long int,long long int>pa;
#define pb push_back
long long int INF=1e17;
vector<pa>adj[MAX]; // Graph
vector<pa>adjr[MAX]; // Reversed Graph
long long int v_for[MAX]; //virtual function for forward/main Graph
long long int v_back... |
#include "Enums.h"
#include <vector>
#include <string>
#include <numeric>
#include <iostream>
using namespace std;
string GetDeviceClassString(DeviceClass deviceClass)
{
switch (deviceClass)
{
case DC_Miscellaneous:
return "Miscellaneous";
case DC_Computer:
return "Computer";
case DC_DesktopC... |
// Copyright (C) Ipion Software GmbH 1999-2000. All rights reserved.
/********************************************************************************
* Name: ivp_templates
* Description: interface structures, needed to send the world representation
* to the physics engine
* Attention: All IVP_*_Te... |
/*
* Copyright 2019 Xilinx 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 ... |
#include "stdafx.h"
#include "build.h"
#include "../xrlc_light/xrdeflector.h"
#include "../xrlc_light/xrface.h"
#include "../xrlc_light/xrlc_globaldata.h"
extern void Detach(vecFace* S);
void setup_bbs(Fbox& b1, Fbox& b2, Fbox& bb, int edge) {
Fvector size;
b1.set(bb);
b2.set(bb);
size.sub(bb.max, bb.... |
/*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file exce... |
//===- llvm-reduce.cpp - The LLVM Delta Reduction utility -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
#include <pybind11/stl.h>
#include <pybind11/pybind11.h>
#include <pybind11/eigen.h>
#include <pybind11/numpy.h>
#include <functional>
#include <Eigen/Dense>
#include "logval.h"
namespace py = pybind11;
typedef LogVal<double> LogValD;
namespace Eigen {
typedef Eigen::Matrix<LogValD, Dynamic, Dynamic> MatrixXl... |
/* <orly/csv_to_bin/synth.cc>
Implements <orly/csv_to_bin/synth.h>.
Copyright 2010-2014 OrlyAtomics, 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... |
/*
* Copyright (C) 2016 FIX94
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include "stdafx.h"
#include "public.h"
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
#include <cstdint>
#include "vjoyinterface.h"
//a,b,c,d,ri... |
#include <Sigma/acpi/madt.h>
acpi::madt::madt(): legacy_pic{false}, lapic_addr{0}, cpus{}, ioapics{}, isos{}, table{(acpi::madt_header*)acpi::get_table(acpi::madt_signature)} {}
uint64_t acpi::madt::get_lapic_address(){
return this->lapic_addr;
}
void acpi::madt::parse_lapic(uint8_t* item){
auto* lapic = re... |
// Copyright (c) 2006-2008 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 "chrome/browser/shell_integration.h"
#include <windows.h>
#include <shlobj.h>
#include <shobjidl.h>
#include "app/win_util.h"
#include... |
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=50010;
const int maxM=600010;
const int inf=2147483647;
class Splay_Data
{
public:
int fa,ch[2];
int size;
... |
#include <Arduino.h>
#include <PID_v1.h>
void AlterSimulationConditions();
void SimulateInput();
void DoSerial();
//working variables/initial conditions
double setpoint, input, output;
double kp = 1, ki = 2, kd = 0;
const double outputStart = 50;
const double inputStart = 200;
const double setpointStart = 200;
PID ... |
#include<bits/stdc++.h>
#include<stdio.h>
#define pb push_back
#define mp make_pair
#define BP 2 //break point -> ini yang bisa di ganti ganti jadi kalau break pointnya 2 byte itu break_point + 1.
using namespace std;
/*
contoh input
encode
1I am Sam
Sam I am
That Sam-I-am!
That Sam-I-am!
I do not like
that Sam-I-... |
/*
SplitLas, 2015
<NAME> <<EMAIL>>
This program takes the input of a LAS
file and splits it into 195mx195m LAS files.
*/
#include <stdio.h>
#include <vector>
#include <iostream>
#include <string>
#include <fstream> // std::ifstream
#include <liblas/liblas.hpp>
#include <liblas/filter.hpp>
#include <sstream>
#inclu... |
/*******************************************************************************
Copyright (c) 2012-2013 <NAME>
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... |
#include <QApplication>
#include <QKeyEvent>
#include <QBuffer>
#include <QFileInfo>
#include "QImageWidget.h"
#include "QKinectGrabber.h"
#include "QKinectIO.h"
#include <iostream>
#include <iterator>
#include <array>
#include "Volumetric_helper.h"
#include "Timer.h"
#include <Eigen/Dense>
#include <cuda_runtime.h>
... |
/**
* The Reality texture manager.
*/
#include <QObject>
#include <QFileDialog>
#include <QMessageBox>
#include <QDesktopServices>
#include "ReImageMapManager.h"
#include "textures/ReImageMap.h"
#include "RealityBase.h"
#include "ReLogger.h"
#include "actions/ReSetImageMapAction.h"
ReImageMapManager::ReImageMapMana... |
// C++
#include <cassert>
#include <sstream>
#include <time.h>
#include <ctime>
// Infra.
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable:4309)
#endif
#include <AMDTBaseTools/Include/gtString.h>
#include <AMDTOSWrappers/Include/osFilePath.h>
#include <AMDTOSWrappers/Include/osFile.h>
#include <AMD... |
#include "LocBranching.h"
LocBranching::LocBranching(GeneralizedAssignemnt* GAPinstance, int & zz) : zub(zz)
{
//ctor
GAP = GAPinstance;
m = GAP->m;
n = GAP->n;
sol = GAP->sol;
solbest = GAP->solbest;
req = GAP->req;
}
LocBranching::~LocBranching()
{
//dtor
}
int LocBranching::localBranching... |
/**************************************************************
*
* 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. The ASF licenses this file
* to y... |
// SPDX-FileCopyrightText: 2015 - 2021 <NAME> <<EMAIL>>
// SPDX-License-Identifier: MIT
#include <cstdlib>
#include "erikkson_mumps_split.hpp"
ads::bspline::basis create_basis(double a, double b, int p, int elements, int repeated_nodes) {
int points = elements + 1;
int r = repeated_nodes + 1;
int knot_si... |
//
// view_handler.cpp
// GameOfLive
//
// Created by Кирилл on 10.10.17.
// Copyright © 2017 Кирилл. All rights reserved.
//
#include "view_handler.h"
const char ALIVE_CELL = 'O';
const char NO_CELL = ' ';
// Maximum command length in command mode
const size_t MAX_COMMAND_LEN = 50;
CursesViewHandler::CursesVie... |
// -----
// RotaryEncoder.cpp - Library for using rotary encoders.
// This class is implemented for use with the Arduino environment.
//
// Copyright (c) by <NAME>, http://www.mathertel.de
//
// This work is licensed under a BSD 3-Clause style license,
// https://www.mathertel.de/License.aspx.
//
// More infor... |
/*
* adjacency matrix
*/
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iterator>
#include <limits>
#include <vector>
#include "../io_util.hpp"
#include "../algorithms/BC.h"
#include "../algorithms/BFS.h"
#include "../algorithms/Componen... |
/*----------------------------------------------------------*/
/* */
/* Turbo Vision TVDEMO source file */
/* */
/*----------------------------------------------------------*/
... |
/*
Copyright (c) 2018 Gdańsk University of Technology
Unless otherwise indicated, Source Code is licensed under MIT license.
See further explanation attached in License Statement (distributed in the file LICENSE).
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
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... |
// Copyright 2019 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 ... |
/*
Created by <NAME>.
Last edited 0222-03-07.
*/
#include <iostream>
#include <time.h>
#define BORN 'o'
#define LIVING 'O'
#define DYING 'x'
#define DEAD ' '
#define BOARD_Y 50
#define BOARD_X 100
void printGrid(char[BOARD_Y][BOARD_X]);
bool solitude(char[BOARD_Y][BOARD_X], int, int);
bool overpopul... |
#include "Window.h"
#include "pch.h"
#include <WinUser.h>
#include <timeapi.h>
HWND Window::screen_handle = nullptr;
HDC Window::screen_dc = nullptr;
HBITMAP Window::screen_hb = nullptr;
HBITMAP Window::screen_ob = nullptr;
bool Window::exit_state = 0;
int Window::keys[512] = {0};
bool Window::left_button_state = fals... |
/*ckwg +29
* Copyright 2014-2018 by Kitware, 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 li... |
//-----------------------------------------------------------------------------
// Copyright (c) 2013 GarageGames, LLC
//
// 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 restr... |
#include <vector>
#include <algorithm>
#include "p2Defs.h"
#include "p2Log.h"
#include "Module_Buff.h"
#include <iostream> //To be able to use "unique_ptr"
#include "j1Render.h"
#include "j1App.h"
#include "PugiXml/src/pugiconfig.hpp"
#include "PugiXml/src/pugixml.hpp"
#include "j1Textures.h"
#include "SDL/include/SDL_... |
/* MDS per-thread basher */
#include <time.h>
#include <stdio.h>
#include "testParams.h"
#include <security_cdsa_client/mdsclient.h>
/* for malloc debug */
#define DO_PAUSE 0
using namespace Security;
/* most of this is cribbed from cspxutils/mdsLookup/ */
/* free attribute(s) allocated by MDS */
static void free... |
#include "MPlayer.h"
#include <regex>
#include <boost/regex.hpp>
#include "../json/json.hpp"
MPlayer::MPlayer(boost::asio::io_service& service, const std::string& configDB, const std::string &logFilePath) :
Player(configDB, logFilePath), m_service(service)
{
readStopPosition();
}
void MPlayer::handleEnd()... |
/*
The MIT License (MIT)
Copyright (c) 2017 <NAME>, <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, co... |
//// Trigger Primitive Converter for RPC hits
////
//// Takes in raw information from the TriggerPrimitive class
//// (part of L1TMuon software package) and outputs vector of 'ConvertedHits'
////
#include "L1Trigger/L1TMuonEndCap/interface/PrimitiveConverterRPC.h"
PrimitiveConverterRPC::PrimitiveConverterRPC() {
}
l... |
/**
* \class L1GtPsbConfig
*
*
* Description: class for L1 GT PSB board configuration.
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: <NAME> - HEPHY Vienna
*
* $Date$
* $Revision$
*
*/
// this class header
#include "CondFormats/L1TObjects/interface/L1GtPsbConfig.h"
// system ... |
/* \author <NAME> */
// Create simple 3d highway enviroment using PCL
// for exploring self-driving car sensors
#include "sensors/lidar.h"
#include "render/render.h"
#include "processPointClouds.h"
// using templates for processPointClouds so also include .cpp to help linker
#include "processPointClouds.cpp"
std::vec... |
#include "TextureImporter.h"
#include "Application.h"
#include "ModuleFileSystem.h"
#include "ModuleRenderer3D.h"
#include "Devil/include/ilut.h"
#include "ImGui/imgui.h"
#include "Devil/include/ilut.h"
#include "Devil/include/il.h"
#pragma comment (lib, "Devil/libx86/DevIL.lib")
#pragma comment (lib, "Devil/libx86/I... |
//
// Sofa.cpp
// G53GRA
//
// Created by <NAME> on 3/26/15.
// Copyright (c) 2015 NottinghamUniversity. All rights reserved.
//
#include "TextureManager.h"
#include "Environment.h"
#include "CouchMain.h"
using namespace sofa;
CouchMain::CouchMain(Position* pos) : pos(pos)
{
texture_manager = new TextureMana... |
// Copyright 2017 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 "src/virtualization/bin/vmm/arch/x64/page_table.h"
#include <page_tables/x86/constants.h>
namespace {
constexpr size_t kMaxSize = 1ul << PML4_S... |
#include <iostream>
#include <fstream>
#include <string>
#include "SDL2/SDL.h"
#include "mainwindow.h"
#include "log.h"
#include "chip8/chip8.h"
const std::string WINDOW_NAME = "8Chips";
const int CHIP8_SCREEN_WIDTH = 64;
const int CHIP8_SCREEN_HEIGHT = 32;
const int WINDOW_RATIO = 10;
const int FRAMERATE = 60;
//T... |
/*
* $Source: /project/arl/arlcvs/cvsroot/wu_arl/openNetLab/proxy/streamConn.cc,v $
* $Author: cgw1 $
* $Date: 2008/04/09 18:39:35 $
* $Revision: 1.8 $
* $Name: $
*
* File: session.cc.c
* Created: 12/29/2004 10:56:15 AM CST
* Author: <NAME>, <<EMAIL>>
* Organization: Applied Research Labor... |
/*
* Copyright 2019 Xilinx 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 ... |
#include "vsnippet.h"
#include <QObject>
#include <QDebug>
#include "vconstants.h"
#include "utils/vutils.h"
#include "utils/veditutils.h"
#include "utils/vmetawordmanager.h"
extern VMetaWordManager *g_mwMgr;
const QString VSnippet::c_defaultCursorMark = "@@";
const QString VSnippet::c_defaultSelectionMark = "$$";... |
/*
* Copyright (C) 2020 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 <cstdlib>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include "banner.h"
#include "waveletsample.h"
#include "waveletsampleblock.h"
#include "transforms.h"
#include "delay.h"
#include "cmdlinefuncs.h"
#include "flatparser.h"
void usage()
{
char *tb=GetTsunamiBanner();
char ... |
#include "stdafx.h"
/*
* This code is derivative of guess.c of Gauche-0.8.3.
* The following is the original copyright notice.
*/
/*
* guess.c - guessing character encoding
*
* Copyright (c) 2000-2003 <NAME>, All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* m... |
//
// FireworksEffect.cpp
// PehlaSchool
//
// Created by <NAME> on 9/7/17.
//
//
#include "FireworksEffect.hpp"
#include "base/ccMacros.h"
void FireworksEffect::fire()
{
const auto margin = Size(200, 200);
auto winSize = Director::getInstance()->getWinSize();
{
auto pos = Vec2(... |
/* BSD 3-Clause License
*
* Copyright © 2008-2021, Jice and the libtcod contributors.
* 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 ... |
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include "argparse.h"
#include "formatter.h"
#include <sys/mman.h>
#include <sys/errno.h>
#include <unistd.h>
#include <fcntl.h>
#include "mmem.h"
#include "fhandle.h"
void copydata(uint8_t *dst, const uint8_t *src, int size, int access)
{... |
#include "Body.h"
#include "BodyPart.h"
#include "PhysUtil.h"
#include "World.h"
#include "Material.h"
#include "Wheel.h"
#include <BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h>
using namespace Phys;
Body::Body(Dojo::Object& object, World& world, const Material& material, Group group, BodyType type /... |
/*
* Copyright (c) 2014-2015 Advanced Micro Devices, Inc.
* All rights reserved.
*
* For use for simulation and test purposes only
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of sourc... |
#pragma once
#include "p5.hpp"
/*
* <dt> base
* <dd> The base color is the color that is used as the "dominant" color
* for graphical objects. For example, a button's text is drawn on top
* of this color when the button is "up".
* <dt> highlight
* <dd> A lighter rendition of the base color used to creat... |
#include "IwDebug.h"
#include "s3e.h"
#include "IwNUI.h"
#include "ExampleUI.h"
const CColour COLOUR_GREY (0xffC9C0BC);
bool ListBoxSelect(void *pData, CListBox* list, int item)
{
list->SetAttribute("selected",0); // reset selection
return true;
}
ExampleUI::ExampleUI()
{
app = CreateApp();
CWindowPt... |
#define FUSE_USE_VERSION 29
#include <stdio.h>
#include <iostream>
//#include <leveldb/db.h>
#include "rocksdb/db.h"
#include "fs/inode.hpp"
#include "fs/kvfs.hpp"
#include <fuse.h>
using namespace kvfs;
static KVFS * fs;
int wrap_getattr(const char * path,struct stat * statbuf)
{
return fs->GetAttr(path,statbu... |
#include <vector>
#include <unistd.h>
#include <sstream>
#include <pcapplusplus/SystemUtils.h>
#include <pcapplusplus/DpdkDeviceList.h>
#include <pcapplusplus/TablePrinter.h>
#define BOOST_STACKTRACE_LINK
#define BOOST_STACKTRACE_USE_BACKTRACE
#include <boost/stacktrace.hpp>
#include <boost/filesystem.hpp>
#include ... |
#include "particlefx.h"
#include "resources.h"
using namespace Tempest;
ParticleFx::ParticleFx(const Daedalus::GEngineClasses::C_ParticleFX &src) {
ppsValue = src.ppsValue;
ppsScaleKeys_S = src.ppsScaleKeys_S;
ppsIsLooping = src.ppsIsLooping!=0;
ppsIsSmooth = src.ppsIsSmooth!=0... |
#include "dlgFilterOneFormat.cpp"
enum enumArchiveFilter {
ID_AF_TITLE,
ID_AF_USEALLREMAINING,
ID_AF_SEPARATOR,
ID_AF_FILTERLIST,
ID_AF_SEPARATOR2,
ID_AF_UP,
ID_AF_DOWN,
ID_AF_ADD,
ID_AF_REMOVE,
ID_AF_EDIT,
ID_AF_SEPARATOR3,
ID_AF_OK,
ID_AF_CANCEL
};
LONG_PTR __stdcall hndArchiveFilter(FarDialog* D, int... |
#include <iostream>
#include <vector>
using namespace std;
class list
{
int val;
list* next;
void add(list* item)
{
list newitem(item->val);
next = &newitem;
}
void add(int newval)
{
list* item = new list;
item->val = newval;
this->next = item;... |
// square lattice Ising model with checkerboard metropolis update
// parallelization using openmp pragmas
// mic:
// $ icc -std=c99 -mmic -openmp -fno-inline -O3 ising_omp.c
// $ export KMP_AFFINITY=balanced && export OMP_NUM_THREADS=240
// $ nohup ./a.out 10 100 8 128 test.dat &
// gcc:
// $ gcc -std=c99 -Wall -O3 ... |
//
// Created by kuhlwein on 5/25/19.
//
#include <imgui/examples/libs/gl3w/GL/gl3w.h>
#include <iostream>
#include <cstring>
#include <memory>
#include <zfp/include/zfp.h>
#include <chrono>
#include <thread>
#include "Texture.h"
Texture::~Texture() {
glDeleteTextures(1,&id);
}
Texture::Texture(int width, int heig... |
/*
Author: <NAME> @ RIKEN
Description:
This reads genome fasta and saves 32-mers
that appears more than 1 time in a genome
as a 2-bit binary file.
Compile:
g++ -o save_redundant_kmers save_redundant_kmers.cpp -O2
g++ -shared -fPIC -o save_redundant_kmers.so save_redundant_kmers.cpp -O2
Usage:
... |
/****************************************************************************/
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
// Copyright (C) 2006-2020 German Aerospace Center (DLR) and others.
// This program and the accompanying materials are made available under the
// terms of the Ecli... |
#include "Networking/HorizonClient.h"
#include <iostream>
#include <ws2def.h>
#include "Api/Api.h"
#include <msgpack.hpp>
#include <charconv>
#include <fstream>
using namespace std;
using namespace Horizon::Client::Networking;
using namespace Horizon::Client::Api;
class ChatPacket {
public:
int Age;
string Name;
... |
// asio-spawn-echo-server.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include "pch.h"
#include <iostream>
#include <memory>
#include <utility>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <functional>
#include <numeric>
#include <cmath>
#include <boost/asio.hpp>
#include <boost/as... |
#include <iostream>
std::string Map =
" "
" "
" "
" "
" ... #... "
" . .... . "
" .. # ...S "
" ...... "
" ~ ### .# "
" ~~~~...... "
" ~~~... |
#include <cassert>
#include <iostream>
#include "wasm-type.h"
using namespace wasm;
// Construct Signature, Struct, and Array heap types using undefined types.
void test_builder() {
std::cout << ";; Test TypeBuilder\n";
// (type $sig (func (param (ref $struct)) (result (ref $array) i32)))
// (type $struct (st... |
#include "BMP180.h"
BMP180::Calibration::Calibration() {
ac1 = 0;
ac2 = 0;
ac3 = 0;
b1 = 0;
b2 = 0;
mb = 0;
mc = 0;
md = 0;
ac4 = 0;
ac5 = 0;
ac6 = 0;
}
bool BMP180::Calibration::insertData(const unsigned char *buffer, int size) {
if (size != CALIBRATION_DATA_SIZE) {
return false;
}
/... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the demonstration applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding v... |
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
#include <nav_msgs/Odometry.h>
#include <ax2550/StampedEncoders.h>
#include <tf/transform_datatypes.h>
#include <ros/console.h>
#include <geometry_msgs/Quaternion.h>
//initialize global variables
int wheel1_new = 0;
int wheel2_new = 0;
int wheel3_ne... |
// <!--encoding UTF-8 UTF-8编码--!>
/*****************************************************************************
* ----Stay Hungry Stay Foolish---- *
* @author : Shen *
* @name : hdu 3966 ... |
// state.cpp
#include <sstream>
#include "headers.h"
#include "state.h"
#include "TextGenerator.h"
// Draw each of the objects in the world
void State::draw()
{
int i;
if (currentTime < 1)
TextGenerator::PrintString("GOOD LUCK", 0.37, 0.38, GLUT_BITMAP_TIMES_ROMAN_24, vector(1.0, 1.0, 1.0));
if(... |
/*
* TdZdd: a Top-down/Breadth-first Decision Diagram Manipulation Framework
* by <NAME> <<EMAIL>>
* Copyright (c) 2014 ERATO MINATO Project
*
* 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 So... |
#include <iostream>
#include <cassert>
#include <vector>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/Triangulation_face_base_2.h>
#include <CGAL/Triangulation_data_structure_2.h>
#includ... |
#include "PointEntRenderer.h"
#include "primitives.h"
#include <string.h>
PointEntRenderer::PointEntRenderer(Fgd* fgd, ShaderProgram* colorShader) {
this->fgd = fgd;
this->colorShader = colorShader;
genPointEntCubes();
}
PointEntRenderer::~PointEntRenderer() {
for (int i = 0; i < entCubes.size(); i++... |
#include "bloomfilter.h"
#include <math.h>
#include <stdlib.h>
#include <hash.h>
#include <random.h>
CRollingBloomFilter::CRollingBloomFilter(const unsigned int nElements, const double fpRate)
{
double logFpRate = log(fpRate);
/* The optimal number of hash functions is log(fpRate) / log(0.5), but
... |
#include "PapyrusUI.h"
#include "ScaleformCallbacks.h"
#include "ScaleformMovie.h"
#include "GameMenus.h"
#include "Utilities.h"
#include "GameEvents.h"
namespace papyrusUI
{
template <> void SetGFxValue<bool> (GFxValue * val, bool arg, GFxMovieView * view) { val->SetBool(arg); }
template <> void SetGFxValue<f... |
#include "plugindialog.h"
#include "ui_plugindialog.h"
#include "basic4glMisc.h"
PluginDialog::PluginDialog(PluginDLLManager& manager, QWidget *parent) :
QDialog(parent),
manager(manager),
isLoaded(false),
wasChangeMade(false),
ui(new Ui::PluginDialog)
{
ui->setupUi(this);
setWindowFlags(windowFlags() ... |
#include "Terminal.hpp"
using namespace godot;
void Terminal::_register_methods() {
godot::register_method("read", &Terminal::read);
godot::register_method("fork", &Terminal::fork);
godot::register_method("write", &Terminal::write);
godot::register_method("get_envs", &Terminal::get_envs);
}
Terminal::Terminal() ... |
// Copyright (C) 2013-2014 DNAnexus, Inc.
//
// This file is part of dx-toolkit (DNAnexus platform client libraries).
//
// 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
//
// htt... |
#include "../include/Config.h"
#include <common/Utils.h>
#include <opencv2/imgcodecs.hpp>
#include <errno.h>
#include <sys/stat.h>
#include <iterator>
#include <sstream>
Config::Images::Images(const YAML::Node& imagesNode) {
bool loadSuccess = true;
auto tmpLogger = spdlog::get(config::FILE_LOGGER);
load... |
#include "tinylang/Basic/Diagnostic.h"
#include "tinylang/Basic/Version.h"
#include "tinylang/CodeGen/CodeGenerator.h"
#include "tinylang/Parser/Parser.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Support/CommandLine.h"
#include "l... |
#include "FPSCamera.h"
#include "mathf.h"
#include "Quaternion.h"
FPSCamera::FPSCamera(GLuint _UBO_BP,
Vector3 _position,
Vector3 _up,
float _yaw,
float _pitch) : ICamera(_UBO_BP) {
movementSpeed = 9.00f;
mouseSensitivity = 0.05f;
zoom... |
/*ALL MAJOR SORTING TECHNIQUES ARE INCLUDED HERE*/
//1.BUBBLE SORT
//2.SELECTION SORT
//3.INSERTION SORT
//4.MERGE SORT
//5.QUICK SORT
//6.COUNT SORT
#include <bits/stdc++.h>
using namespace std;
int count_sort(int A[],int n)
{
//calculating max for size of array of C[] counter array
int max=0;
... |
#include <iostream>
#include <fstream>
/*
______ _ _ _____ _ _______
| ____| | | (_) | __ \ | | |__ __|
| |__ _ _ _ __ ___| |_ _ ___ _ __ | |__) | __ ___ | |_ ___ | |_ _ _ __ ___ ___
| __| | | | '_ \ / __| __| |/ _ \| '_ ... |
#include "graphics/geom/Interval.h"
#include "graphics/XChart.h"
#include "graphics/scale/Scale.h"
#include "graphics/scale/continuous/Linear.h"
using namespace xg;
float geom::Interval::GetDefaultWidthRatio(XChart &chart) {
if(chart.coord_->GetType() == coord::CoordType::Polar) {
const std::string &xFiel... |
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
*
* 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, or (at your option)
* any later version.
*
* ... |
#include <boost/asio/async_result.hpp>
#include <boost/asio/bind_executor.hpp>
#include <boost/asio/executor_work_guard.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/read.hpp>
#include <boost/asio/write.hpp>
#include <boost/beast/core/type_traits.hpp>
#include <boost/pr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.