text stringlengths 3.08k 12.5k |
|---|
#include <bits/stdc++.h>
#include <windows.h>
#include <string.h>
#include <mysql.h>
#include <fstream>
using namespace std;
struct node
{
string word;
float pos;
int neu;
int neg;
};
void build(struct node tmp[],int n,struct node tree[]){
for(int i = 0;i<n;i++){
tree[n+i] = tmp[i];
... |
/*
* Copyright 2011-2012 <NAME>, Cornell University
* (<EMAIL>). All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* ... |
#include "utilities.hpp"
#include "CPLEX.hpp"
#include "LK.hpp"
#include "Pair.hpp"
#include "TSPsolution.hpp"
#include "Tour.hpp"
#include "utils/params.hpp"
#include <algorithm>
#include <chrono>
#include <random>
#include <set>
using std::ostream;
using std::pair;
using std::set;
using std::vector;
namespace fs =... |
#include "duckdb/common/string_util.hpp"
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <memory>
#include <sstream>
#include <stdarg.h>
#include <string.h>
#include <string>
using namespace duckdb;
using namespace std;
bool StringUtil::Contains(const string &haystack, const string &needle) {
ret... |
/*
* b09_Terrain - benchmark #9, terrain render test:
* ----------------------------------------------------------
*
* Author: <NAME> <<EMAIL>>
*
* For conditions of distribution and use, see copyright notice in license.txt
*/
#include "b09_Terrain.h"
static QUADTREENODE quadtree[] = {
{ 0.0f, 0.0f, 0.0... |
// Copyright (c) 2011 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing p... |
/*
MW3 Console plugin by Gamer_Z a.k.a. grasmanek94
Copyright (c) 2014, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
not... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
unsigned char *espial_attributeram;
unsi... |
/*
* File: tcpsegmenter.cpp
* Author: zheng
*
* Created on July 6, 2010, 12:27 PM
*/
#include "tcpsegmenter.h"
#include <string.h>
#include <fstream>
#include <assert.h>
#include <google/protobuf/message.h>
#ifdef _WINDOWS
#include <winsock2.h>
#else
#include <sys/socket.h>
#include <unistd.h>
#endif
#ifndef ... |
// MIT License
//
// Copyright (c) 2019 椎名深雪
//
// 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,... |
/*
* Structured binding
*
* In C++17, a syntax is defined that allows you to access and extract members
* of arrays, tuples and structs. This syntax is known as Structured binding.
* Let's checkout how it works.
*
* Scroll down to main() and start reading from there.
*/
// Structured binding is part of the la... |
#include <stdio.h>
#include "Halide.h"
#include <algorithm>
#include <iostream>
using namespace Halide;
using namespace Halide::Internal;
Scope<Expr> scope;
Scope<int> linearity;
Expr x = Variable::make(Int(32), "x");
Expr y = Variable::make(Int(32), "y");
Expr z = Variable::make(Int(32), "z");
const int N = 100;... |
#include <iostream>
#include <vector>
#include <algorithm>
#include "player.h"
#include <cstring>
#include <map>
using namespace std;
void makeRolls (std::vector<std::pair<DiceSet,Player*>> &pl_n_dice){
// make the rolls
for(auto &pair : pl_n_dice){
pair.second->roll_log.push_back(pair.first.roll());... |
/*
* Copyright (c) 2019 <NAME>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @brief demo for visualizing eigenmodes
*/
#include <Eigen/Eigenvalues>
#if defined(_WIN32) // windows
# define NOMINMAX // to remove min,max macro
... |
//
// "$Id$"
//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by <NAME> and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license... |
#include "mtao/geometry/mesh/read_obj.hpp"
#include <array>
#include <fstream>
#include <iterator>
#include "mtao/logging/logger.hpp"
using namespace mtao::logging;
namespace {
template <typename T>
struct MeshReader {
using Vec = std::array<T, 3>;
using Tri = std::array<int, 3>;
using Edge = std::array... |
/**
* Find the Fibonacci(n)%m - when 'n' is represented in Decimal and converted to Binary
*
* n is read from file: input_3.txt
*
* Code written by: Chellapriyadharshini.M. (MT2016041)
**/
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <ctime>
#include <string>
#include <vector>
void decimal_to_bi... |
//===- MCAsmLexer.cpp - Abstract Asm Lexer Interface ----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include<unistd.h>
#include "main.h"
#include "engine.h"
#include "timer.h"
using namespace std;
GLMatrices Matrices;
GLuint programID;
GLFWwindow *window;
/**************************
* Customizable functions *
**************************/
Engine engine;
const float width = 1482.5;
const float height = 1020;
... |
#include "tag.h"
#include <QRegularExpression>
#include <QSet>
#include <QTextDocument>
#include <QtMath>
#include "functions.h"
QMap<int, QString> stringListToMap(const QStringList &list)
{
QMap<int, QString> ret;
for (int i = 0; i < list.count(); ++i)
ret.insert(i, list[i]);
return ret;
}
Tag::Tag()
: m_type... |
/**
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
... |
#include "rabbit_mq_face.hpp"
#include "parcel_generated.h"
#include "fatal_error.hpp"
#include <amqp_tcp_socket.h>
#include <chucho/log.hpp>
#include <sstream>
namespace
{
constexpr const int YELLA_CHANNEL = 1;
void respond(const amqp_rpc_reply_t& rep)
{
if (rep.reply_type == AMQP_RESPONSE_NORMAL)
retur... |
//===-- PTXInstPrinter.cpp - Convert PTX MCInst to assembly syntax --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*
* Copyright 2021 4Paradigm
*
* 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 ... |
//
// This tool is specific to the GPGPU target.
// Convert a statically linked ELF executable into its in-memory representation
// and write it out in hex format compatible with a Verilog simulator's
// $readmemh function. This overwrites the low address of
// the binary with a jump to the entry point (this clobbers... |
// Client side C/C++ program to demonstrate Socket programming
#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include <arpa/inet.h>
#include <iostream>
#include <fstream>
#define RED "\033[31m"
#define GREEN "\033[32m"
#define YELLOW "\0... |
/*
* This file is part of the statismo library.
*
* Copyright (c) 2019 Laboratory of Medical Information Processing
* 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 ... |
/*
You are given an array nums and an integer k. The XOR of a segment [left, right] where left <= right is the XOR of all the elements with indices between left and right, inclusive: nums[left] XOR nums[left+1] XOR ... XOR nums[right].
Return the minimum number of elements to change in the array such that the ... |
#include <lem/WideStringUcs4.h>
#include <lem/macro_parser.h>
#include <lem/solarix/dictionary.h>
#include <lem/solarix/tokens.h>
#include <lem/solarix/gg_autom.h>
#include <lem/solarix/Symbols.h>
#include <lem/solarix/CoordList.h>
#include <lem/solarix/AlphabetStorage.h>
#include <lem/solarix/SyllabRule.h>
... |
#include "Window.hpp"
bool cameraEngaged;
bool firstUpdate = true;
bool frozen = false;
double atTime = 0.0;
size_t cameraIdx = 0;
bool resetCamera = false;
bool idleCam = true;
float idleCamSlowdown = 8.0f;
const char* window_title = "Petting a cat's tummy is dangerous, but nothing ventured, nothing gained";
glm::v... |
#include <stdio.h>
#include <stdlib.h>
#include <syscall.h>
#include <assert.h>
#include <dirent.h>
#include "parseklib.h"
#include <map>
#include <vector>
using namespace std;
struct ptaint {
u_long start;
u_long end;
bool marked;
};
struct pcmp {
bool operator() (const ptaint& p1, const ptaint& ... |
// Copyright (c) 2021 LG Electronics, 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 agre... |
#include "PortfolioGreedySearch.h"
#include "Eval.h"
using namespace SparCraft;
PortfolioGreedySearch::PortfolioGreedySearch(const PGSParameters & params)
: _params(params)
{
}
void PortfolioGreedySearch::calculatePortfolioScriptMoves(const GameState & state)
{
for (size_t p(0); p < 2; ++p)
{
for ... |
#include "time.h"
#include "lcd.h"
Time time_now;
IPAddress timeServer(195,220,94,163); // IP adress for the ntp-server
unsigned long ntpLastUpdate = 0;
EthernetUDP Udp;
byte packetBuffer[NTP_PACKET_SIZE];
int init_time(){
//Try to get the date and time
int trys=0;
while(!getTimeAndDate() && trys<3... |
#include "pcl_helper_exports.h"
#include "pcl_helper.h"
// PCL point type for exported C functions
typedef pcl::PointXYZRGB PointTExport;
// macro for converting void* to PCLHelper<PointTExport>*
#define HELPER(ptr) ((PCLHelper<PointTExport>*)ptr)
// factory functions that create and release instances of PCLHelper
... |
//
// NNetwork.cpp
// BiSUNAOpenCL
//
// Created by RHVT on 14/5/19.
// Copyright © 2019 R. All rights reserved.
//
// 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 cop... |
#include <iostream>
#include <queue>
#include <vector>
#include <tuple>
/* Settings */
const int MaxX = 3;
const int MaxY = 5;
const int MaxZ = 4;
// Map. 1 is open 0 is Blocked
bool map[MaxY][MaxX][MaxZ] = {
{ { 1, 0, 0, 0 }, { 1, 1, 0, 0 }, { 1, 1, 1, 1 } },
{ { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0... |
#include <mbgl/test/util.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
using namespace mbgl;
static double _signedArea(const GeometryCoordinates& ring) {
double sum = 0;
for (std::size_t i = 0, len = ring.size(), j = len - 1; i < len; j = i++) {
const GeometryCoordinate& p1 = ring[i];
cons... |
#include <algorithm>
#include <cassert>
#include <iostream>
#include <limits>
#include <random>
#include <CL/sycl.hpp>
#include <dpct/dpct.hpp>
#include "SYCLCore/device_unique_ptr.h"
#include "SYCLCore/HistoContainer.h"
template <typename T>
void go() {
std::mt19937 eng;
std::uniform_int_distribution<T> rgen(st... |
#include "common/RhodesApp.h"
#include "common/RhoMutexLock.h"
#include "common/IRhoClassFactory.h"
#include "common/RhoFile.h"
#include "common/RhoConf.h"
#include "common/RhoFilePath.h"
#include "common/Tokenizer.h"
#include "ruby/ext/rho/rhoruby.h"
#include <algorithm>
using namespace rho;
using namespace rho::co... |
#include "VariableAccess.h"
VariableAccess::VariableAccess() {
//Simple expresion
op_table.insert("pmap");
op_table.insert("pmpp");
op_table.insert("throw");
op_table.insert("plus");
op_table.insert("minus");
op_table.insert("mul");
op_table.insert("div");
op_table.insert("rem");
op_table.insert("lsh");
op... |
//=============================================================================
// Copyright (c) Zombie Master Development Team. All rights reserved.
// The use and distribution terms for this software are covered by the MIT
// License (http://opensource.org/licenses/mit-license.php) which
// can be found in the file L... |
// This file is part of the OGRE project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at https://www.ogre3d.org/licensing.
#include <OgreImGuiInputListener.h>
#include <OgreMath.h>
#include <imgui.h>
// map sdl2 mouse buttons to imgui
static... |
#include "Game2D.h"
#include "Application.h"
#include "Texture.h"
#include "Font.h"
#include "Input.h"
#include "Player.h"
#include "Vector2.h"
#include "Node.h"
Game2D::Game2D(const char* title, int width, int height, bool fullscreen) : Game(title, width, height, fullscreen)
{
// Initalise the 2D re... |
/*
* (C) 2003-2006 Gabest
* (C) 2006-2012 see Authors.txt
*
* This file is part of MPC-HC.
*
* MPC-HC 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 opt... |
//////////////////////////////////////////////////////
//
// Grayscale square grid texture generator
//
// Author: <NAME>
// Date: 29 Oct 2015
//
#include <cstdlib>
#include <vector>
#include <iostream>
#include <cstdint>
#include <opencv2/opencv.hpp>
#include "config.h"
using namespace std;
using namespace cv;
... |
#include "ContainerInterface.hpp"
#include <cassert>
ContainerInterface::ContainerInterface()
: sample_rate_(48000),
channel_count_(1)
{
// Nothing to do
}
ContainerInterface::~ContainerInterface()
{
// Nothing to do
}
void ContainerInterface::init(uint32_t sample_rate, uint8_t channel_count, int serial)
{... |
#include "ShaderPaths.hpp"
#include "UniformLocations.glsl"
#include <atlas/glx/Buffer.hpp>
#include <atlas/glx/Context.hpp>
#include <atlas/glx/ErrorCallback.hpp>
#include <atlas/glx/GLSL.hpp>
#include <atlas/gui/GUI.hpp>
#include <fmt/printf.h>
#include <magic_enum.hpp>
#include <array>
using namespace atlas;
//... |
//Flow of the program
//1.main function() -> bsp_tree() -> count_function() -> partitioning -> bsp_tree()
#include<iostream>
#include<cstdlib>
#include<cmath>
#include<time.h>
#include<iomanip>
using namespace std;
int partition_number=0;
int count_function(float vertx[], float verty[],float x[],float y[],int n,flo... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
class TransportCounting {
public:
int countBuses(int speed, vector <int> positions, vector <int> velocities, int time) {
int so... |
/****************************************************************************
**
** Copyright (C) 2020 Open Mobile Platform LLC
** Contact: https://community.omprussia.ru/open-source
**
** This file is part of the omp-info-pro.
**
** This code is licensed under the MIT License (MIT).
**
** THE SOFTWARE IS PROVIDED "AS ... |
#include "Log.hpp"
#include "Resource.hpp"
#include "SoundManager.hpp"
#include <string>
SoundManager::SoundManager(android_app *pApplication) :
mApplication(pApplication),
mEngineObj(NULL), mEngine(NULL),
mOutputMixObj(NULL),
mBGMPlayerObj(NULL), mBGMPlayer(NULL), mBGMPlayerSeek(NULL),... |
#include "VariableManager.h"
#include "utility.h"
#include "Logger.h"
#include "EquationParser.h"
#include "EquationNode.h"
#include "DerivedVariable.h"
#include "BuiltInVariable.h"
#include "fem_exception.h"
#include "file_not_found_exception.h"
#include <fstream>
#include <cstring>
VariableManager::VariableManager(v... |
/****************************************************************************
* Copyright (c) 2019, CEA
* 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 retai... |
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include "BITMAPINFO_1.h"
using namespace std;
#define LENGTH_NAME_BMP 100 //bmp file name
BITMAPFILEHEADER strHead;
BITMAPINFOHEADER strInfo;
RGBQUAD strPalette[256];
void showBmpHead(BITMAPFILEHEADER pBmpHead) {
cout << "the bitmap header file: " << ... |
// Copyright 2019 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <lib/instrumentation/vmo.h>
#include <lib/version.h>
#include <stdio.h>
#include <string.h>
#include <ktl/iterator.h>
#i... |
/**
* @author <NAME>
* @file mx-dist2weights.cc
* @brief Calculate mixture weights from distance stats.
*
* COMMENTS:
*
* Technologies langagieres interactives / Interactive Language Technologies
* Inst. de technologie de l'information / Institute for Information Technology
* Conseil national de recherches ... |
#define CGAL_TRACE_STREAM std::cerr
#include <iostream>
#include <CGAL/Octree.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Point_set_3.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/squared_distance_3.h>
#include <CGAL/Orthogonal_k_neighbor_search.h>
#include <CGAL/Search_traits_3.h>
#include <chrono... |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <sstream>
#include "yapt/logger.h"
#include "yapt/ySystem.h"
#include "yapt/ySystem_internal.h" // only needed for plugin class test
#include "yapt/ExpatXMLImporter.h"
#include "yapt/ExportXML.h"
#include "WebService.h"
#include "... |
// g++ -O3 -std=c++11 project2.cpp
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
using namespace std;
struct instance{
//data[i] contains the value of the ith feature
vector<float> data;
float group;
};
struct search_wrapper{
vector<i... |
/*
* Copyright (c) 2019, NVIDIA CORPORATION. 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... |
/**
* This is a demo to be used with Good Display 2.7 touch epaper
* http://www.e-paper-display.com/products_detail/productId=406.html 264*176 px monochome epaper
*
* The difference with the demo-touch.cpp demo is that:
*
* In this demo Epd class gdew027w3T is used.
* This class expects EpdSPI and FT6X36 to b... |
#include "atlas_builder.h"
#include "png_reader.h"
#include <fstream>
#include <json/json.h>
#include <rocket/Algorithm.h>
namespace fs = boost::filesystem;
void atlas_builder::add_bitmap_source(boost::filesystem::path const& p) {
// png_reader reader;
std::ifstream is {p.string(), std::ios_base::binary | std::ios... |
/*
-------------------------------------------------------------------------------
Copyright (c) <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 a... |
#include "gamepadvrpn.h"
// troen
#include "bikeinputstate.h"
#include "../constants.h"
#include <cmath>
using namespace troen::input;
void GamepadVRPN::reset()
{
}
GamepadVRPN::GamepadVRPN(osg::ref_ptr<BikeInputState> bikeInputState, osg::Vec3 color) : PollingDevice(bikeInputState),
m_vibrate(false)
{
// m... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* InkCgi.hpp :+: :+: :+: ... |
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (C) 2020, Raspberry Pi (Trading) Ltd.
*
* libcamera_vid.cpp - libcamera video record app.
*/
#include <chrono>
#include <poll.h>
#include <signal.h>
#include <sys/signalfd.h>
#include <sys/stat.h>
#include "core/libcamera_encoder.hpp"
#include "output/out... |
#include <im_str/im_str.hpp>
#include <chrono>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <random>
#include <string>
#include <vector>
using namespace mba;
std::vector<std::string> generate_random_strings( int cnt )
{
std::vector<std::string> ret;
std::string base(
":::::::::::::::::... |
/* Copyright 2017 <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 writi... |
//*********************************************************
// PopSyn.cpp - Population Synthesizer
//*********************************************************
#include "PopSyn.hpp"
char * PopSyn::PUMS_HOUSEHOLD_FILE = "PUMS_HOUSEHOLD_FILE";
char * PopSyn::PUMS_HOUSEHOLD_FORMAT = "PUMS_HOUSEHOLD_FORMAT";
char * Pop... |
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include "gcc.hh"
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <boost/tokenizer.hpp>
#include <sys/fcntl.h>
#include <unistd.h>
#include "thunk/ggutils.hh"
#include "thunk/thunk_w... |
#include "module.hpp"
#include <limits>
#include <type_traits>
#include <algorithm>
using std::string;
using std::ostream;
using error = std::runtime_error;
using buf_it = std::ostreambuf_iterator<char>;
module::module() noexcept:
header {
{ RMD_H_IDENT1, RMD_H_IDENT2, RMD_H_IDENT3, RMD_H_IDENT4 },
{ 1, 0 }
}
{... |
/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 <NAME>
CppAD is distributed under the terms of the
Eclipse Public License Version 2.0.
This Source Code may also be made available under the following
Secondary Lice... |
/*
MIT license - wangyueheng
<EMAIL>
改变亚伟速录机软件的背景颜色和字体颜色,保护视力。
Change the background and foreground color of a top level RichEdit
in a running program, using SendMessage.
*/
#include <iostream>
#include <vector>
#include <string>
#include <Windows.h>
#include "findpid.h"
#include "findhwnd.h"
#... |
#include <vector>
#include <iostream>
#include<mpi.h>
#include <algorithm>
#include <random>
constexpr size_t SIZE = 1 << 10; // 2 ^ 10
std::vector<unsigned int> generate_values(size_t size) {
// create random engine
std::random_device r;
std::default_random_engine e(r());
// generate numbers
std::vector<unsigne... |
#include "us_f0.hpp"
#include "flite/hrg/hrg.hpp"
#include "flite/synthcommon/phoneset.hpp"
static void apply_lr_model(cst_item* s, const us_f0_lr_term* f0_lr_terms, float* start, float* mid, float* end)
{
int i;
const cst_val* v = 0;
float fv;
/* Interceptors */
*start = f0_lr_terms[0].start;
... |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
namespace IO {
const int BUFFER_SIZE = 1 << 15;
char input_buffer[BUFFER_SIZE];
size_t input_pos = 0, input_len = 0;
char output_buffer[BUFFER_SIZE];
int output_pos = 0;
char n... |
/******************************************************************
*
* CyberLink for C++
*
* Copyright (C) <NAME> 2002
*
* File: TvMain.cpp
*
* Revision;
*
* 09/18/03
* - first revision
* 05/21/04
* - Added support for MinGW using TimeUtil::Wait.
*
******************************************************************/
... |
#include <assert.h>
#include <utils.h>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <stack>
#include <unordered_map>
#include <vector>
using namespace std;
char isMatchHelper(const string& A, const string& B, int aPos, int bPos, vector<vector<char>>& dp) {
if (aPos == A.size() && bPos == B... |
#include <Arduino.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <pins_arduino.h>
#include "gues_driver.h"
#include "alphabet.h"
#define RED_PIN 5
#define GREEN_PIN 6
#define BLUE_PIN 7
#define RED 1
#define GREEN 2
#define BROWN 3
#define BLUE 4
#define PURPLE 5
#define CYAN 6
#define WHITE 7
#define ... |
/*
MIT License
Copyright (c) 2022 Litten1up
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, dist... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
const int di[] = { 0, 1, 0, -1 };
const int dj[] = { 1, 0, -1, 0 };
class Spirals {
public:
vector <string> draw(int width, int ... |
#pragma once
constexpr unsigned int max_unloader_driver = 50;
typedef struct _unloader_information
{
UNICODE_STRING name;
PVOID module_start;
PVOID module_end;
ULONG64 unload_time;
} unloader_information, * punloader_information;
typedef struct _piddb_cache_entry
{
LIST_ENTRY list;
UNICODE_STRING ... |
#include <glm/gtc/random.hpp>
#include "Ball.h"
#include "player.h"
#include <shaders/diffuse_vert_glsl.h>
#include <shaders/diffuse_frag_glsl.h>
using namespace std;
using namespace glm;
using namespace ppgso;
// Static resources
unique_ptr<Mesh> Ball::mesh;
unique_ptr<Texture> Ball::texture;
unique_ptr<Shader> Bal... |
#include "listbox.h"
#include <Tempest/Panel>
#include <Tempest/ScrollWidget>
#include <Tempest/Layout>
#include <Tempest/ListDelegate>
#include <Tempest/ListView>
#include <Tempest/Application>
using namespace Tempest;
struct ListBox::ProxyDelegate : public ListDelegate {
ProxyDelegate(const std::shared_ptr<ListD... |
/*
* This file is part of Poedit (http://www.poedit.net)
*
* Copyright (C) 2000-2012 <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 withou... |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define int long long
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
typedef tree<int, null_type... |
/**
@file msgfactory.cpp
@brief This file is part of Kalinka mediaserver.
@author ipp <<EMAIL>>
Copyright (c) 2007-2012 Kalinka Team
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 <Xerus.h>
void onKeyPressed(int key);
void onMousePressed(int button, int x, int y);
void onMouseReleased(int button, int x, int y);
void onMouseMoved(int x, int y);
void onWindowResized(int width, int height);
xr::Window* window = nullptr;
xr::WindowPreferences createPreferences() {
xr::WindowPreferenc... |
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
using namespace std;
long long fact(long long n) {
long long ret = 1;
for (long long i = 2; i <= n; ++i){
ret = (ret * i) % 1000000007;
}
return ret;
}
long long brut(vector<string>& v, vector<bool>& used, str... |
//**************************************************************************************
/** \file task_user.cpp
* This file contains source code for a user interface task for a ME405/FreeRTOS
* test suite.
*
* Revisions:
* \li 09-30-2012 JRR Original file was a one-file demonstration with two tasks
* ... |
// Copyright 2016 Husky Team
//
// 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 writi... |
#include "wumpus-pp/requests.hpp"
#include <asio.hpp>
#include <asio/ssl.hpp>
#include "wumpus-pp/bot.hpp"
// Wrapper around Windows certificates, thanks https://stackoverflow.com/a/40710521
#ifdef _WIN32
#pragma comment (lib, "crypt32")
#include <wincrypt.h>
void add_windows_root_certs(asio::ssl::context& ctx)
{
... |
#pragma once
#include "BaseState.h"
ID3D12PipelineState* CreateACCState(FlexKit::RenderSystem* renderSystem)
{
auto VShader = renderSystem->LoadShader("VS_Main", "vs_5_0", "assets\\shaders\\ACC.hlsl");
auto HShader = renderSystem->LoadShader("HS_Main", "hs_5_0", "assets\\shaders\\ACC.hlsl");
auto DShader ... |
// NOLINTNEXTLINE
#include <chrono>
#include <iostream>
// NOLINTNEXTLINE
#include <thread>
#include "DPPIR/sockets/client_socket.h"
#include "DPPIR/sockets/server_socket.h"
#define OFFLINE_MSG_SIZE 96
#define OFFLINE_COUNT 1023688
#define QUERY_COUNT 10236881
#define RESPONSE_COUNT 10236881
namespace DPPIR {
namesp... |
// *******************************************************************************************************************************
// *******************************************************************************************************************************
//
// Name: hardware.c
// Purpose: Hardware handling ro... |
// 03-solution.cpp
// Copyright 2021 BHG [bw.org]
// as of 2021-05-31 bw
#include <cstdio>
#include "BWCRUD.h"
#include "03-solution.h"
constexpr const char * db_file = DB_PATH "/scratch.db";
constexpr const char * table_name = "domains";
constexpr const char * sql_create =
"CREATE TABLE IF NOT EXISTS domains ... |
/*
* dolier-split-k.cpp
*
* Created on: Jan 30, 2014
* Author: vbonnici
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <algorithm>
#include "data_ts.h"
#include "trim.h"
#include "pars_t.h"
#include <set>
#... |
#include <string>
#include <cstdio>
#include<iostream>
#include<iomanip>
#include <marsyas/CommandLineOptions.h>
#include <marsyas/Collection.h>
#include <marsyas/FileName.h>
//#include <marsyas/PeUtilities.h>
#include <marsyas/peakView.h>
using namespace std;
using namespace Marsyas;
// Global variables for comman... |
#include <cmath>
#include <iostream>
#include "Trackball.h"
#include <GLUT/GLUT.h>
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
#define SCALE (2.0 * M_PI)
/*
** r <- p x q
*/
static void qmul(double r[], const double p[], const double q[])
{
r[0] = p[0] * q[0] - p[1] * q[1] - p[2] * q... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.