text stringlengths 54 60.6k |
|---|
<commit_before>// Test how we produce the scariness score.
// RUN: %clangxx_asan -O0 %s -o %t
// On OSX and Windows, alloc_dealloc_mismatch=1 isn't 100% reliable, so it's
// off by default. It's safe for these tests, though, so we turn it on.
// RUN: export %env_asan_opts=detect_stack_use_after_return=1:handle_abort=1... |
<commit_before>/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
==... |
<commit_before>/*****************************************************************************************[Aiger.C]
Copyright (c) 2007, Niklas Sorensson
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 Softw... |
<commit_before>
<commit_msg>Update outputter.cpp<commit_after>#include <iostream>
#include <iterator>
#include <string>
#include <vector>
int main();
{
std::copy(parseCommand.begin(), parseCommand.end(), std::ostream_iterator<std::string>(std::cout, "\n")); //test line to op "parseCommand"
}
<|endoftext|> |
<commit_before>#include <accumulate.hpp>
#include <vector>
#include <iterator>
#include <string>
#include "catch.hpp"
using iter::accumulate;
TEST_CASE("Simple sum", "[accumulate]") {
std::vector<int> ns{1,2,3,4,5};
auto a = accumulate(ns);
const std::vector<int> v(std::begin(a), std::end(a));
cons... |
<commit_before>// Makes distance matrix based on procrustes RMS between maps
#include "acmacs-base/argv.hh"
#include "acmacs-base/range-v3.hh"
#include "acmacs-base/quicklook.hh"
#include "acmacs-chart-2/factory-import.hh"
#include "acmacs-chart-2/chart-modify.hh"
#include "acmacs-chart-2/procrustes.hh"
#include "acma... |
<commit_before>/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: matchlocale.hxx,v $
* $Revision:... |
<commit_before>/*
* Copyright (C) 2014 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 r... |
<commit_before>#ifndef test_elementretrieveallattributes
#define test_elementretrieveallattributes
/*
This C++ source file was generated by for Arabica
and is a derived work from the source document.
The source document contained the following notice:
Copyright (c) 2001 World Wide Web Consortium,
(Massachusetts Ins... |
<commit_before>#include "photoeffects.hpp"
using namespace cv;
Point findFarthestPoint(Point vector, Mat& image)
{
int a,b;
if(vector.x<=0)
{
a=0;
}
else
{
a=1;
}
if(vector.y<=0)
{
b=0;
}
else
{
b=1;
}
return Point(a*image.cols,... |
<commit_before>#include "CodeGen_OpenCL_Dev.h"
#include "Debug.h"
// TODO: This needs a runtime controlled switch based on the device extension
// string.
//#define ENABLE_CL_KHR_FP64
namespace Halide {
namespace Internal {
using std::ostringstream;
using std::string;
using std::vector;
static ostringstream nil;
C... |
<commit_before>/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkBenchmark.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkPaint.h"
#include "SkPicture.h"
#include "SkPoint.h"
#include "SkRandom.h"
#inclu... |
<commit_before>/*
* Copyright (C) 2013 by Glenn Hickey ([email protected])
*
* Released under the MIT license, see LICENSE.txt
*/
#include <iostream>
#include <string>
#include <set>
#include <vector>
#include <map>
#include "hal.h"
#include "halBlockMapper.h"
using namespace hal;
using namespace std;
hal_size... |
<commit_before>/*
* MIT License
* Copyright (c) 2016 Vladislav Tananaev
*/
#include "ComputationalGraph.h"
using std::string;
ComputationalGraph::ComputationalGraph()
{
grad_input_last_gate = 1; // This is gradient input for the last gate
}
void ComputationalGraph::add(string name, Gate::Ptr g, float &input_a,... |
<commit_before>/* -*- mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
// vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s
/* Copyright (c) FFLAS-FFPACK
* Written by Bastien Vialla <[email protected]>
* ========LICENCE========
* This file is part of the library FFLAS-FFPACK.
*
*... |
<commit_before>#include "Log.h"
#include <iostream>
namespace spdlog
{
namespace sinks
{
template <class Mutex>
class stdout_sink_no_debug : public base_sink<Mutex>
{
using MyType = stdout_sink_no_debug<Mutex>;
public:
stdout_sink_no_debug() {}
static std::shared_ptr<MyType> instance()
{
sta... |
<commit_before>/*
*******************************************************************************
*
* Purpose: Low Power Mode implementation
*
*******************************************************************************
* Copyright Monstrenyatko 2014.
*
* Distributed under the MIT License.
* (See accompanyi... |
<commit_before>// Copyright (c) 2004 Daniel Wallin and Arvid Norberg
// 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... |
<commit_before>#include "vm.hpp"
#include "process.hpp"
#include "core_image.hpp"
#include "mmc_image.hpp"
#include "defs.hpp"
#include "mmobj.hpp"
#include "prims.hpp"
#include "utils.hpp"
#include "mmc_fun.hpp"
#include <cstdlib>
#define DBG() _log << _log.magenta + _log.bold + "[VM|" << __FUNCTION__ << "] " << _log... |
<commit_before>/*
* Copyright (C) 2017 Rhys Ulerich
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef DESCENDU_SEXP_HPP
#define DESCENDU_SEXP_HPP
#inc... |
<commit_before>
#include <cmath>
#include <vector>
#include <cassert>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
using namespace std;
namespace {
template<class T>
string as_binary(T num) {
stringstream s;
auto num_bits = (sizeof(T) * 8);
T mask = T(0x1) <... |
<commit_before>#include "DebuggerTestClient.h"
#include "DebuggerTestHandler.h"
#include <string>
#include <iostream>
#ifdef WIN32
#define sleep(n) Sleep(1000*n)
#endif
namespace zorba {
int test_run() {
sleep(8);
std::cout << "Run Test" << std::endl;
DebuggerTestClient client("test.xq", "<a>Hel... |
<commit_before>//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===-------------------------... |
<commit_before>// Copyright (C) 2015 Elviss Strazdins
// This file is part of the Ouzel engine.
#include <functional>
#include "Button.h"
#include "Engine.h"
#include "Sprite.h"
#include "EventHander.h"
#include "EventDispatcher.h"
#include "Layer.h"
#include "Utils.h"
namespace ouzel
{
Button::Button()
{
... |
<commit_before>#ifndef OPTIONAL_H_
#define OPTIONAL_H_
#include <utility>
#include <type_traits>
namespace experimental {
template <typename T> class optional
{
/**
* \brief The internal storage of size T and
* properly aligned on T.
*/
typename std::aligned_storage<sizeof(T), ... |
<commit_before>#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
cout << "Hello world!\n";
return 0;
}<commit_msg>Added sample main routine.<commit_after>/*! \file ibpm2.cc
*
* Sample main routine for IBPM code.
*/
#include <iostream>
#include <fstream>
using namespace std;
/*! \bri... |
<commit_before>#define BOOST_TEST_MODULE TEST_IO
#include <iostream>
#include <fstream>
#include <chrono>
#include <stdexcept>
#include <boost/test/unit_test.hpp>
#include <dynet/dynet.h>
#include <dynet/expr.h>
#include <dynet/rnn.h>
#include <dynet/lstm.h>
#include <dynet/gru.h>
#include <dynet/io.h>
#include "te... |
<commit_before>//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2016, Image Engine Design 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:... |
<commit_before>// Copyright (C) 2010-2013 Joshua Boyce.
// See the file COPYING for copying permission.
#include <hadesmem/thread.hpp>
#include <locale>
#include <sstream>
#include <utility>
#define BOOST_TEST_MODULE process
#include <hadesmem/detail/warning_disable_prefix.hpp>
#include <boost/thread.hpp>... |
<commit_before>#include "Bitmap.hpp"
#include <zlib.h>
Bitmap::Bitmap(AVFrame *frame) {
pix_fmt = static_cast<PixelFormat>(frame->format);
width = frame->width;
height = frame->height;
avpicture_alloc(&picture, pix_fmt, frame->width, frame->height);
av_image_copy(picture.data, picture.linesize, const_cast<const... |
<commit_before>/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2006 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public... |
<commit_before>#include <boost/test/unit_test.hpp>
#include "../src/n_vector.hpp"
#include "test_utils.hpp"
template <position_t DIMENSIONS,typename T>
void test_vector_coordinates_equal(Vector<DIMENSIONS,T> const &values,Vector<DIMENSIONS,T> const &expected)
{
std::string number;
for(position_t i = 0; i < v... |
<commit_before>#include "Client.h"
#include <iostream>
#include "Logger.h"
#include "Common.h"
#include "../gen/ConnectionMessage.pb.h"
#include "PCLUtil.h"
int Client::leader_id = -1;
Client::Client(int id, int tcp_socket)
: _tcp_con(tcp_socket)
, _sensor_data()
, _data_available(0)
, _running(1)
, _data_mute... |
<commit_before>// This file is part of the uSTL library, an STL implementation.
//
// Copyright (c) 2005 by Mike Sharov <[email protected]>
// This file is free software, distributed under the MIT License.
#include "ustdxept.h"
#include "mistream.h"
#include "mostream.h"
#include "strmsize.h"
#include "uio... |
<commit_before>/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation ([email protected])
**
** This file is part of meegotouch-controlpanelapplets.
**
** If you have que... |
<commit_before>/*
*
* Copyright 2018 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
<commit_before>/*
* Copyright 2015 Facebook, 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 l... |
<commit_before>// BUG: this whole thing depends on the specifics of how the clang version I
// am using emits llvm bitcode for the hacky RMC protocol.
// We rely on how basic blocks get named, on the labels forcing things
// into their own basic blocks, and probably will rely on this block
// having one predecessor and... |
<commit_before>/*
This file is part of the ORK library.
Full copyright and license terms can be found in the LICENSE.txt file.
*/
#pragma once
#include"ork/ork.hpp"
namespace ork {
enum class align {
left
, right
, center
};
enum class border {
none
, inside
, outside
, both
};
namespace html {
//Ba... |
<commit_before>/*
* Copyright 2019-2021 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* 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/... |
<commit_before>#include <stdlib.h>
#include "aes.h"
namespace i2p
{
namespace crypto
{
#ifdef __x86_64__
ECBCryptoAESNI::ECBCryptoAESNI ()
{
m_KeySchedule = m_UnalignedBuffer;
uint8_t rem = ((uint64_t)m_KeySchedule) & 0x0f;
if (rem)
m_KeySchedule += (16 - rem);
}
#define KeyExpansion256 \
"pshufd $... |
<commit_before>/****************************************************************************
* Copyright (c) 2012, Michael P. Gerlek ([email protected])
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are... |
<commit_before>/**
* Copyright (c) 2011-2020 Trevor Pounds <[email protected]>
*
* 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 t... |
<commit_before>#ifndef UTILS_HPP
#define UTILS_HPP
#include <glm/glm.hpp>
#include <SDL.h>
#include <SDL_ttf.h>
#include <cmath>
#include <string>
#include <iostream>
namespace trac0r {
SDL_Texture *make_text(SDL_Renderer *renderer, TTF_Font *font, std::string text,
const SDL_Color &color) {... |
<commit_before>// Scintilla source code edit control
// KeyMap.cxx - defines a mapping between keystrokes and commands
// Copyright 1998-2000 by Neil Hodgson <[email protected]>
// The License.txt file describes the conditions under which this software may be distributed.
#include "Platform.h"
#include "Scintilla.... |
<commit_before>// Scintilla source code edit control
/** @file LexSQL.cxx
** Lexer for SQL.
**/
// Copyright 1998-2002 by Neil Hodgson <[email protected]>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#inclu... |
<commit_before>//
// Platform.cpp
// CatchLib
//
// Created by Sebastian Odbjer on 5/10/12.
// Copyright (c) 2012 Catch22. All rights reserved.
#include "Platform.hpp"
Platform::Platform()
{
}
Platform::~Platform()
{
}
vector<PlatformBlock*> Platform::getPlatformBlocks()
{
return platformblocks;
}
void Pla... |
<commit_before>#include "Shader.h"
const GLchar* vshader[] =
{
"varying vec2 LVertexPos2D;"
"void main() {"
" gl_Position = vec4( LVertexPos2D.x, LVertexPos2D.y, 0, 1 );"
"}"
};
void Shader::Init() {
// Create the program
program = glCreateProgram();
// Create and compile the vertex shader
vertexShader = gl... |
<commit_before>//Includes
#include <fstream>
#include <iostream>
#include <cvc4/cvc4.h>
//Header File
#include "../include/Solver.hpp"
#include "../include/Matrix.hpp"
using namespace CVC4;
using namespace std;
vector<int> Solver::find_x(std::vector<double>& coef, int n, int w, bool v)
{
ExprManager em;
... |
<commit_before>// Thread.cpp
#include "stateval/Thread.h"
/* STD */
#include <cassert>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
namespace Threading {
// ===============================================================================================
// = class Mutex
// ==============================... |
<commit_before>#ifndef TOOLBOX_HH
#define TOOLBOX_HH
#include <deque>
#include "io.hh"
#include "WordGraph.hh"
#include "NowayHmmReader.hh"
#include "NowayLexiconReader.hh"
#include "TPNowayLexReader.hh"
#include "LnaReaderCircular.hh"
#include "Expander.hh"
#include "Search.hh"
#include "TokenPassSearch.hh"
#include... |
<commit_before>#include "UvcCam.hxx"
UvcCam::UvcCam(cv::Size size, int device) : Cam(size) {
memset(map, 0, sizeof(void *) * BUFFERS);
std::string str = (boost::format("/dev/video%d") % device).str();
fd = v4l2_open(str.c_str(), O_RDWR);
if (fd < 0)
throw std::runtime_error("Couldn't open vide... |
<commit_before>#include <iostream>
#include <map>
#include <vector>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
int iabs(int a) { return a < 0 ? -a : a; }
int main(int argc, char* argv[]) {
ifstream instance(argv[1]);
ifstream solver_output(argv[2]);
string line;
map... |
<commit_before>/**
* \file XTPlot.cpp
* \brief Implements class for drawing the XT plots
*/
#include "XTPlot.h"
#include "ChaosSettings.h"
XTPlot::XTPlot(wxWindow* parent, wxWindowID id, const wxPoint& pos,
const wxSize& size, long style, const wxString& name)
: Chaos... |
<commit_before>#include <iostream>
#include <string>
#include <vector>
#include "pcl/common/time.h"
#include "pcl/features/fpfh_omp.h"
#include "pcl/features/normal_3d_omp.h"
#include "pcl/filters/crop_box.h"
#include "pcl/filters/filter.h"
#include "pcl/filters/voxel_grid.h"
#include "pcl/point_cloud.h"
#include "pcl... |
<commit_before>#include "texture.h"
#include "android_native_app_glue.h"
#include <android/log.h>
#include <vector>
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "texture.cpp", __VA_ARGS__))
namespace Texture {
struct KTXHeader {
uint8_t identifier[12];
uint32_t endianness;
uint32_t glType;
... |
<commit_before>/*
* Copyright (c) 2012 The WebRTC 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.... |
<commit_before>#include "NEKeyManager.hpp"
#include "define/define.hpp"
#include "../Kernal/Kernal.hpp"
#include "../NEBooleanKey/NEBooleanKey.hpp"
#include "../NECharKey/NECharKey.hpp"
#include "../NEByteKey/NEByteKey.hpp"
#include "../NEUByteKey/NEUByteKey.hpp"
#include "../NEWCharKey/NEWCharKey.hpp"
#include "../NES... |
<commit_before>/*
RawSpeed - RAW file decoder.
Copyright (C) 2017 Roman Lebedev
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at... |
<commit_before>
// Backup related functions are placed here to keep vital sections of
// code contained while maintaining clean code.
#include "walletdb.h"
#include "wallet.h"
#include "util.h"
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <fstream>
#include <string>
boost::filesy... |
<commit_before>/// @file hdm_serialize_action.cpp
/// @brief Implementation of hdm save & load functions called by clients
/// @author uentity
/// @version
/// @date 30.01.2012
/// @copyright This source code is released under the terms of
/// the BSD License. See LICENSE for more details.
#include "bs_bos... |
<commit_before><commit_msg>POSIX: sanitise signal handling state at startup.<commit_after><|endoftext|> |
<commit_before>#include "MainDialog.h"
#include <QDir>
#include <QDebug>
#include <QMenu>
#include <QProcess>
#include <QMessageBox>
#include <QApplication>
#include <QCoreApplication>
#include <QFileIconProvider>
#include <QDesktopServices>
#ifdef WIN32
#include <Windows.h>
#include <tchar.h>
#endif
int const MainD... |
<commit_before>// 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 "build/build_config.h"
#if defined(OS_WIN)
#include <windows.h>
#include <shellapi.h>
#include <shlobj.h>
#endif
#inclu... |
<commit_before>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/plugin_group.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h... |
<commit_before>//===- PrettyFunctionDumper.cpp --------------------------------- *- C++ *-===//
//
// 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
//
//===------------... |
<commit_before><commit_msg>Make the tests use 64-bit nexes when running 64-bit Linux Chrome<commit_after><|endoftext|> |
<commit_before><commit_msg>Fix error [FATAL:at_exit.cc(40)] Check failed: false. Tried to RegisterCallback without an AtExitManager in (possibly unused) binary perf_tests<commit_after><|endoftext|> |
<commit_before>//=======================================================================
// Copyright Baptiste Wicht 2011.
// 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)
//======================================... |
<commit_before>#include "OrthographicCamera.h"
#include <limits>
OrthographicCamera::OrthographicCamera()
: Camera() {
}
OrthographicCamera::OrthographicCamera(const Point3D& position, const uint32_t image_height, const uint32_t image_width)
: Camera(position, image_height, image_width) {
}
OrthographicCamera::... |
<commit_before>/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed in accordance with the terms specified in
* the LICENSE file found in the root directory of this source tree.
*/
// clang-format off
#include <sys/types.h>
#include <sys/stat.h>
// clang-fo... |
<commit_before>/*
* Copyright (c) 2016 The ZLToolKit project authors. All Rights Reserved.
*
* This file is part of ZLToolKit(https://github.com/xiongziliang/ZLToolKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing... |
<commit_before>#include "PyInterpreterState.h"
#include "PyThreadState.h"
#include "PyFrameObject.h"
#include "PyDictObject.h"
#include "fieldAsPyObject.h"
#include <engextcpp.hpp>
#include <cstdint>
#include <memory>
#include <vector>
#include <optional>
using namespace std;
namespace PyExt::Remote {
PyInterpret... |
<commit_before>/*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https... |
<commit_before>#include "twoDInfraredSensor.h"
#include <commonTwoDModel/engine/twoDModelEngineInterface.h>
using namespace trikKitInterpreter::robotModel::twoD::parts;
TwoDInfraredSensor::TwoDInfraredSensor(interpreterBase::robotModel::DeviceInfo const &info
, interpreterBase::robotModel::PortInfo const &port
,... |
<commit_before>#include "TrigModifyText.h"
#include "Chkdraft.h"
#include "Settings.h"
enum ID {
TAB_META = 0,
TAB_PLAYERS,
TAB_CONDITIONS,
TAB_ACTIONS,
TAB_TEXT,
EDIT_TRIGMODIFYTEXT = ID_FIRST,
CHECK_AUTOCOMPILE,
BUTTON_COMPILE,
BUTTON_COMPILEANDSAVE,
BUTTON_RELOAD
};
TrigMod... |
<commit_before>
#include "cfgmap.h"
#include <stdio.h>
#include <iostream>
using namespace std;
//******************************************************************************
void EscapeStr(const string & input, string & output)
{
string::const_iterator ch;
for(ch = input.begin(); ch != input.end(); ++ch)
... |
<commit_before>#include "p2Defs.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1Input.h"
#include "j1Textures.h"
#include "j1Audio.h"
#include "j1Render.h"
#include "j1Window.h"
#include "j1Map.h"
#include "j1Colliders.h"
#include "j1Pathfinding.h"
#include "j1Menu.h"
#include "j1Scene.h"
#include "j1Entities.h"
#... |
<commit_before>// Time: ctor: O(n),
// update: O(logn),
// query: O(logn)
// Space: O(n)
// Segment Tree solution.
class NumArray {
public:
NumArray(vector<int> &nums) : nums_ref_(nums) {
root_ = buildHelper(nums, 0, nums.size() - 1);
}
void update(int i, int val) {
i... |
<commit_before>
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT A... |
<commit_before>#include <stack>
#include <string>
#include <string.h>
using namespace std;
bool IsOp(const char ch)
{
return ch == '+' || ch == '-' || ch == '*' || ch == '/';
}
bool IsOp(const string &str)
{
return str == "+" || str == "-" || str == "*" || str == "/";
}
bool IsEqualOrGreat(char ch1, char ch2)
{
if... |
<commit_before>#include "ezxml.h"
#include "cfg.h"
#include <string>
#include <iostream>
#include <string.h>
void cfgNode::Fill(ezxml_t arg) {
if(arg==NULL) {
name=NULL;
value=NULL;
attrs=NULL;
next=NULL;
child=NULL;
return;
}
int i=0;
attrs=(char**)malloc(2*sizeof(char*));
while( (arg->attr)[i]!=0 )... |
<commit_before>#include <ncurses.h>
#include <locale>
#include <chrono>
#include <thread>
#include <string>
#include <vector>
#include <regex>
#include <iostream>
#include <stdexcept>
using namespace std::literals::string_literals;
using std::string;
using std::tuple;
using std::vector;
bool is_utf8_first(uint8_t ch)
... |
<commit_before>/*
* fPls - playlist handler for fIcy
* Copyright(c) 2004-2005 of wave++ (Yuri D'Elia) <[email protected]>
* Distributed under GNU LGPL without ANY warranty.
*/
// local headers
#include "fIcy.hh"
#include "msg.hh"
#include "htfollow.hh"
#include "plsparse.hh"
#include "tmparse.hh"
#include "authp... |
<commit_before>/*
* HTTP/1.0 for streams sockets - implementation
* Copyright(c) 2003-2004 of wave++ (Yuri D'Elia)
* Distributed under GNU LGPL without ANY warranty.
*/
// interface
#include "http.hh"
// local headers
#include "resolver.hh"
#include "urlencode.hh"
// system headers
#include <stdexcept>
#include ... |
<commit_before>/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999 The Apache Software Foundation. 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. Redistri... |
<commit_before>////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use t... |
<commit_before>/*
* This file is part of the CN24 semantic segmentation software,
* copyright (C) 2015 Clemens-Alexander Brust (ikosa dot de at gmail dot com).
*
* For licensing information, see the LICENSE file included with this project.
*/
/**
* @file classifyImage.cpp
* @brief Application that uses a pretr... |
<commit_before>////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use t... |
<commit_before>/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkConformalFlatteningMeshFilterTest.cxx
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights... |
<commit_before>/***********************************************************************************************************************
**
** Copyright (c) 2011, 2014 ETH Zurich
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the... |
<commit_before>/*
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directo... |
<commit_before>/* $Id$ */
/*
* Copyright (c) 2010 .SE (The Internet Infrastructure Foundation)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must re... |
<commit_before>// ======================================================================
//
// Copyright (c) 2008-2022 Inc. All rights reserved.
//
// ߣ
// 䣺[email protected]
//
// ======================================================================
#include <Extend/Controls/GifBox.h>
namespace suic
{
Implemen... |
<commit_before>#include "refWindow.h"
#include "ui_refWindow.h"
#include "../kernel/ids.h"
RefWindow::RefWindow(const qrRepo::RepoApi *mApi, QString name,
QAbstractItemModel* tModel, int r, const QModelIndex &ind,
qReal::MainWindow *mWindow, QWidget *parent):
QWidget(parent),
ui(new Ui::RefWindow... |
<commit_before>// Copyright (c) 2012 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 "ash/wm/workspace/snap_sizer.h"
#include <cmath>
#include "ash/screen_ash.h"
#include "ash/wm/window_resizer.h"
#include "ui... |
<commit_before>/*************************************************************************
*
* $RCSfile: ci_text2.hxx,v $
*
* $Revision: 1.3 $
*
* last change: $Author: obo $ $Date: 2004-11-15 13:27:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following lice... |
<commit_before>// Copyright 2020 The Google Research Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by... |
<commit_before><commit_msg>Support block_size greater than chunk_size in Blocker<commit_after><|endoftext|> |
<commit_before>#include "TableMetadata.h"
/***
* Returns the allocation number of bytes required to allocate a type of data
* @param VT Cassandra Type
* @return Allocation size needed to store data of type VT
*/
uint16_t TableMetadata::compute_size_of(const ColumnMeta &CM) const {
switch (CM.type) {
ca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.