text stringlengths 3.08k 12.5k |
|---|
/*
* Emulation for the NEC PD4990A.
*
* The PD4990A is a serial I/O Calendar & Clock IC used in the
* NEO GEO and probably a couple of other machines.
*/
#include "driver.h"
#include "machine/pd4990a.h"
/* Set the data in the chip to Monday 09/09/73 00:00:00 */
/* If you ever read this Leejanne, you kno... |
// Copyright <NAME> 2015.
// 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)
#include "value_ptr.hpp"
#include <algorithm>
#include <cassert>
#include <iostream>
#include <tuple>
#include <utility>
#include <vector... |
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
#include "LabelData.h"
LabelData::LabelData(iml::Image *img, bool (*threshold_function)(
unsigned char r, unsigned char g,
unsigned char b, unsigned char a))
: width(img->width()), height(img->height()) {
data = new LABELTYPE[hei... |
/*
* Copyright (c)2015 - 2016 Oasis LMF Limited
* 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... |
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmIfCommand.h"
#include <string>
#include <utility>
#include <cm/memory>
#include <cm/string_view>
#include "cm_static_string_view.hxx"
#include "cmConditionE... |
/* Write a function to connect all the adjacent nodes at the same level in a binary tree.
Example:
Input Tree
A
/ \
B C
/ \ \
D E F
Output Tree
A--->NULL
/ \
B-->C-->NULL
/ \ \
D-->E-->F-->NULL
In this post, We have discussed Level Order Traversal with N... |
#include "Yolo.hpp"
#include "Triton.hpp"
static const std::string keys =
"{ help h | | Print help message. }"
"{ video v | video.mp4 | video name}"
"{ serverAddress s | localhost:8001 | Path to server address}"
"{ verbose vb | false | Verbose mode, true or false}"
"{ protocol p | grpc | Pro... |
// Document modified at : Monday, February 20, 2012 2:01:42 AM , by user : <NAME> , from computer : CREA7OR
// CEX3FTags.cpp: implementation of the CEX3FTags class.
#include "stdafx.h"
#include "CEX3FTags.h"
#include "CEX3F.h"
#include "CEX3FTagCMbM.h"
#include "CEX3FTagCMbT.h"
#include "CEX3FTagCMbP.h"
#ifdef _DEBUG
... |
#include "SDK.h"
#include "Global.h"
#include "HitMarkers.h"
#include "Draw.h"
#include "Render.h"
HitMarkers *hitMarkers = new HitMarkers();
HitMarkers::HitMarkers()
{
lastKillTime = 0;
Clear();
}
void HitMarkers::Clear()
{
markerIdx = 0;
for (int i = 0; i < MAX_MARKERS; i++)
{
markers[i].show = false;
}
}... |
#include <iostream>
#include <string>
#include <vector>
#include "tuner_api.h"
#if defined(_MSC_VER)
#define KTT_KERNEL_FILE "../tutorials/02_tuning_kernel_simple/opencl_kernel.cl"
#else
#define KTT_KERNEL_FILE "../../tutorials/02_tuning_kernel_simple/opencl_kernel.cl"
#endif
// Definition of class which will... |
/*===- ExactCheck.cpp - Implementation of exactcheck functions ------------===*/
/* */
/* The SAFECode Compiler */
/* ... |
#include "appbar.h"
#include "viewport.h"
// originally copied from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/appbars.asp
static int g_uSide, g_fAppRegistered; // gross
BOOL RegisterAccessBar(HWND hwndAccessBar, BOOL fRegi... |
//============================================================================
// Name : vector_new.cpp
// Author : <NAME>
// Version : 1.0.0
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//=========================================================================... |
#include "utfdecode.hpp"
int codepoint_to_utf8(uint32_t codePoint, uint8_t *utf8InputBuffer) {
int bufferPosition = 0;
if (codePoint <= /* 7 bits */ 0b1111111) {
utf8InputBuffer[bufferPosition++] = (uint8_t)codePoint;
} else if (codePoint <= /* 11 bits */ 0b11111111111) {
/* 110xxxxx leading byte with le... |
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Q... |
#include <bits/stdc++.h>
#include <GL/glut.h>
#include <unistd.h>
using namespace std;
//fontstyle??
GLvoid *font_style = GLUT_BITMAP_HELVETICA_18;
int nodes,edges,vt=0;
vector<int> visited;
vector<pair<int,int> > cds;
vector<vector<int> > graph;
unordered_map<string,int> col;
int nodep=0;
void display();
void mouse... |
#include "gamewindow.h"
#include ".\include\glew.h" // Header File For The Glaux Library
#include ".\include\gl.h" // Header File For The OpenGL32 Library
#include ".\include\glu.h" // Header File For The GLu32 Library
#include <stdio.h>
GameWindow& GameWindow::GetInstance()
{
static GameWi... |
#include <iostream>
using namespace std;
class Noh {
friend class ABB;
private:
Noh* esquerdo;
Noh* direito;
Noh* pai;
int valor;
int nivel;
public:
Noh(int _d) {
pai = NULL;
esquerdo = NULL;
direito = NULL;
valor = _d;
nivel = -1;
}
};
class ABB {
private:
No... |
/*********************************************************************
* @file TetrisData.cpp
* @brief Include all preset data about tetris's piece.
*
* Date Name Description
* 06/12/14 MYLS Creation.
*
*********************************************************************/
#include "Te... |
/* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain soft... |
/**
* Project:
*
* File: mpas_ordering_hilbert.cpp
* Created: Jan 16, 2014
* Modified: Thu 16 Jan 2014 03:58:27 PM PST
*
* Author: <NAME> <<EMAIL>>
*/
#include <iostream>
#include <algorithm>
#include "mpas_ordering.hpp"
typedef MPASElementOrder::mpas_element_coord_pair_t mpas_element_coord_pair_t;
ui... |
/*******************************************************************************
* Copyright (c) 2016, Hitachi-LG Data Storage
* Copyright (c) 2017, ROBOTIS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
/**
* @author Nikita
* @date 04.04.2017
* Higher School of Economics,
* Faculty of Computer Science,
* Department of Software Engineering
*/
#include <cstdlib>
//=============================================================================
//== NodeSkipList =====================================================... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <getopt.h>
#include "ThreadMgrpp.h"
#include "CommandServerIf.h"
#include "TunerControlIf.h"
#include "PsisiManagerIf.h"
#include "TunerServiceIf.h"
#include "RecManagerIf.h"
#include "ChannelManagerIf.h"
#incl... |
/*
* This file is part of the DUDS project. It is subject to the BSD-style
* license terms in the LICENSE file found in the top-level directory of this
* distribution and at http://www.somewhere.org/somepath/license.html.
* No part of DUDS, including this file, may be copied, modified, propagated,
* or distributed... |
#include <bits/stdc++.h>
using namespace std;
// Macros
#ifdef D3BUG
#define cerrd if (D3BUG) cerr
#else
#define cerrd if (false) cerr
#endif
// Types
template <typename T> using vector1D = vector<T>;
template <typename T> using vector2D = vector<vector1D<T>>;
template <typename T> using vector3D = vector<ve... |
/*++
Copyright (C) 2020 Autodesk 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 list of conditions and the follow... |
/* SPDX-License-Identifier: MIT */
/* Copyright © 2020-present <NAME> */
#pragma once
#include <cstddef>
#include <cmath>
#include <algorithm>
#include <array>
#include <cctype>
#include <cwctype>
#include <limits>
#include <rapidfuzz/details/common.hpp>
uint32_t UnicodeDefaultProcess(uint32_t ch);
/**
* @brief re... |
#include "CART.h"
#include "Metric.h"
#include <numeric>
using namespace wrf;
CART::CART(int maxDepth, int minSamplesSplit, int minSamplesLeaf, double minSplitGain) {
this->maxDepth = std::max(1, maxDepth);
this->minSamplesSplit = std::max(0, minSamplesSplit);
this->minSamplesLeaf = std::max(0, minSample... |
#include <iostream>
#include "jvmti.h"
#include "utils.h"
#include "net_enigma_test_toolkit_TestToolkitAgent.h"
#include <unordered_map>
#include <cstring>
using namespace std;
struct SetTagActionData
{
long cur_tag = 0;
long new_tag = 0;
};
typedef struct
{
jlong size = 0;
jlong count = 0;
jlong... |
/** @defgroup MleParts Magic Lantern Parts */
/**
* @file MleIvBoundingBoxCarrier.h
* @ingroup MleParts
*
* This file implements the carrier for a 3D Bounding Box property
* targeting the Inventor platform.
*
* @author <NAME>
* @date May 1, 2003
*/
// COPYRIGHT_BEGIN
//
// Copyright (C) 2000-2007 Wizzer Wo... |
#include <bits/stdc++.h>
using namespace std;
#define VERTEX_SIZE 100010
#define EDGE_SIZE 400020
typedef struct _Edge {
int to, next;
} Edge;
Edge edge[2][EDGE_SIZE];
int head[2][VERTEX_SIZE], edgePt[2];
int vertexNum, edgeNum;
void addEdge(int id, int from, int to) {
edge[id][edgePt[id]] = ... |
#include <cgreen/cgreen.h>
#include <cgreen/breadcrumb.h>
#include <cgreen/messaging.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#ifdef __cplusplus
using namespace cgreen;
#endif
#include "xml_reporter_internal.h"
static const int line=666;
static char *output = NULL;
static void clear_output(v... |
#include "stdafx.h"
#include "AsyncSocket.h"
CAsyncSocket::CAsyncSocket()
: hGethost_(NULL)
, soc_(INVALID_SOCKET)
, bReady_(false)
, bShutdown_(false)
, hwnd_(NULL)
, msg_(0)
, name_(NULL)
, port_(0)
, bKeepSession_(false)
, bDoHalfClose_(false)
{
}
CAsyncSocket::~CAsyncSocket()
{
Close();
delete [] nam... |
//<NAME>
//Project 3 - File Compression : Unzipped File Generator
//10/29/2020
#include <iostream>
#include <sstream> /*used to turn a string into a integer*/
#include <string>
#include <exception> /*used to override the exception class and write my own exception*/
#include <fstream> /*used for file input and output*/... |
#include "pch.hpp"
#include "BootROMTraps.hpp"
#include "CPUState.hpp"
#include "TraceHelper.hpp"
#include "ScriptDebugger.hpp"
#include "Core.hpp"
#include "Encryption.hpp"
#include "Opcodes.hpp"
#include "Log.hpp"
namespace
{
class ResetTrap : public IMemoryAccessTrap
{
public:
~ResetTrap() override = default;
... |
// Copyright (c) 2014 Ollix. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... |
//
// Programmer: <NAME> <<EMAIL>>
// Creation Date: Thu Dec 2 12:45:43 PST 1999
// Last Modified: Fri Feb 20 20:34:39 PST 2015
// Filename: midimixup.cpp
// Syntax: C++11
//
// Description: Reads a standard MIDI file, move the pitches around
// into a random order.
//
#include "MidiFi... |
/////////////////////////////////////////////////////////////////////////////
// Name: src/gtk1/scrolwin.cpp
// Purpose: wxScrolledWindow implementation
// Author: <NAME>
// Modified by: <NAME>
// <NAME>: removed 90% of duplicated common code
// Created: 01/02/97
// Copyright: (c) <NA... |
#include "caliper/reader/CaliperMetadataDB.h"
#include "caliper/common/Node.h"
#include <gtest/gtest.h>
using namespace cali;
TEST(MetaDBTest, MergeSnapshotFromDB) {
CaliperMetadataDB db1;
Attribute str_attr =
db1.create_attribute("str.attr", CALI_TYPE_STRING, CALI_ATTR_DEFAULT);
Attribute int... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
#include "domain.hpp"
#include "parsetree.hpp"
#include "tworegularize.hpp"
#include "util.hpp"
#include <iostream>
#include <algorithm>
using namespace std;
void tail_rekursion(method & m) {
if (m.ps.size() <= 2) { // Base case
methods.push_back(m);
return;
}
task tail_task;
string me... |
#include "wfc.h"
WaveFunctionCollapser::WaveFunctionCollapser(size_t width_, size_t height_, wfc_SampleSet sample_set_):
width(width_),
height(height_),
final_index_map((size_t*) calloc(width_ * height_, sizeof(size_t))),
index_map(new std::set<size_t>[width_ * height_]),
sample_set(sample_set_)
{
if (!final_index_ma... |
#include <tr1/memory>
#include <iostream>
#include <pthread.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ext/stdio_filebuf.h>
#include <unistd.h> /* sleep*/
#include <stack>
#include <cstring>
#include <rexio/net.h++>
#include <rexio/throw.h++>
#include <rexio... |
/*********************************************************************************
* BSD 3-Clause License
*
* Copyright (c) 2018, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*1. ... |
#include "acceptandpayofferlistpage.h"
#include "ui_acceptandpayofferlistpage.h"
#include "init.h"
#include "util.h"
#include "offertablemodel.h"
#include "onemarket.h"
#include "bitcoingui.h"
#include "bitcoinrpc.h"
#include "guiutil.h"
#include <QSortFilterProxyModel>
#include <QClipboard>
#include <QMessageBox>... |
//
// Reader.cpp
// Copyright (c) <NAME>. All rights reserved.
//
#include "Reader.hpp"
#include "Scheduler.hpp"
#include "Forge.hpp"
#include <error/Error.hpp>
#include <assert/assert.hpp>
#include <stdlib.h>
#include <memory>
#if defined(BUILD_OS_WINDOWS)
#include <windows.h>
#elif defined(BUILD_OS_MACOS)
#include... |
#include "TestWindow.h"
#include "stb/stb_perlin.h"
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
// make sure the viewport matches the new window dimensions; note that width and
// height will be significantly larger than specified on retina displays.
glViewport(0, 0, width, height);... |
#include "CoolProp.h"
#include <vector>
#include "CPExceptions.h"
#include "FluidClass.h"
#include "HFE143m.h"
HFE143mClass::HFE143mClass()
{
double n[] = {0.0, 0.77715884e+01, -0.87042570e+01, -0.28095049e+00, 0.14540153e+00, 0.92291277e-02, -0.21416510e+00, 0.99475155e-01, 0.23247135e-01, -0.12873573e-01, -0.573665... |
/**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2014 <NAME>
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.... |
#include "Lexer.h"
#include <iostream>
Lexer::Lexer(std::istream& reader): reader(reader), LastChar(' '), CurToken(), NumValue(0), BoolValue(false), DtValue(),
BinValue() {
}
TokenType Lexer::readNextToken() {
CurToken = getTok();
return CurToken;
}
TokenType Lexer::getTok... |
/**********************************************************************
* $Id: tabindex.cpp,v 1.3 2004-06-04 19:09:12 dmorissette Exp $
*
* Name: tabindex.cpp
* Project: MapInfo TAB format Read/Write library
* Language: C++
* Purpose: Create an index in an existing TAB file.
* Author: <NAME>, <EMAIL>
*
... |
// glmcamera.cpp
// MIT License
// See LICENSE.txt file in root of project
// Copyright(c) 2018 <NAME>
#include "precompiled-header.hpp"
#include "../interface/glmcamera.hpp"
#include <cmath>
#include "../interface/maths.hpp"
GLTools_ns::Camera::Camera(
Position_t const & position /*= Position_t{}*/... |
#include "process_each_node.hpp"
#include "src/new_tree_rearrangements/Profitable_Moves_Enumerators/Profitable_Moves_Enumerators.hpp"
#include "src/new_tree_rearrangements/mutation_annotated_tree.hpp"
//Mutation added by moving src to LCA doesn't match any sensitive mutation on LCA. Spliting the edge is equivalent to ... |
//
// Created by mmoroz on 7/9/20.
//
#include <fstream>
#include <iostream>
#include <algorithm>
#include <execution>
#include <stdexcept>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <spdlog/spdlog.h>
#include <tpu_tensor.h>
#include "image... |
/*
* Copyright 2011 <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 writin... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
//
// sandesh_connection.cc
//
// Sandesh connection management implementation
//
#include <io/tcp_session.h>
#include <io/tcp_server.h>
#include <base/logging.h>
#include <sandesh/protocol/TXMLProtocol.h>
#include <sandesh/sandesh_types.h>
#in... |
#include "jeff.h"
/*! @brief The constructor. */
Jeff::Jeff(int argc, char *argv[]) : QObject() {
setlocale(LC_ALL, "");
/*! If settings file does not exist, sets default settings. */
if (not basis->exists() or not basis->correct()) {
basis->write(basis->isGreetingsEnabledSt, true);
basis->write(basis->g... |
/* This is the city side */
#include <string>
#include <iostream>
#include <fstream>
#include "socket_link2.h"
#include "socket_utils2.h"
#include "http.h"
#include "../clink2dtn/ProcessManager.h"
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include "clink2dtnUtils.h"
#include "sendall.h"
s... |
#include "renderer.h"
#include "gfx.h"
#include "log/log.h"
#include "stdlib.h"
#include "glm/glm.hpp"
namespace Renderer {
void PrepareRenderer();
void RendererSetProjectionMatrix(glm::mat4 proj);
#define MAX_QUADS 16
static constexpr uint32_t maxVertices = MAX_QUADS * 4;
static constexpr uint... |
/*
This file is part of Magnum.
Original authors — credit is appreciated but not required:
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 —
<NAME> <<EMAIL>>
2020 — <NAME> <<EMAIL>>
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use,... |
#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define all(v) v.begin(),v.end()
#pragma gcc optimize("O3")
#pragma gcc optimize("Ofast")
#pragma gcc optimize("unroll-loops")
using namespace std;
const int INF = 1e9;
const int TMX = 1 << 18;
const long long llINF = 2e18;
const long long ... |
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <cstring>
#include <limits>
#include <vector>
#include "mex.h"
using namespace std;
void kMeans(double* centroids, double* labels, int numSamples, int numDims, double* features, double* ar, int K, int numIter)
{
// Several run... |
#include <napi.h>
#include <uv.h>
#include "window_wrap.h"
#include "log_message.h"
Napi::FunctionReference Window::constructor;
static
int InitSDL() {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, S... |
#include <iostream>
#include <chrono>
#include <queue>
#include <opencv2/opencv.hpp>
// Enable anti-aliasing
// #define ANTI_ALIASING
constexpr float t_step = 0.001f;
std::vector<cv::Point2f> control_points;
void mouse_handler(int event, int x, int y, int flags, void *userdata) {
if (event == cv::EVENT_LBUTTON... |
/*! \file
\brief Contains macros to define smart enumeration types
The macro \ref REACTIONS_POW_ENUM_WITH_UNKNOWN is provided in this file, which
defines a class containing an enumeration type, and several functions and
constant objects to iterate over the enumeration values and convert/parse
them to/from st... |
/*
* Copyright (c) 2009-2010, Oracle and/or its affiliates. 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,
* th... |
#include <gtest/gtest.h>
#include "detail/comparison.h"
#include "detail/variadic_traits.h"
#include <vector>
namespace
{
enum class op_t
{
lt,
lt_eq,
gt,
gt_eq,
eq,
neq
};
template<op_t Op1, op_t Op2>
struct is_op : std::false_type {};
template<op_t Op>
struct is_op<Op, Op> ... |
/*
* Copyright (c) 2017-2020 CelePixel Technology Co. Ltd. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... |
/*
Naive matrix-matrix multiplication(mmm)
c = a * b
a: N*M
b: M*K
c: N*K
By <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <assert.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include <apollo/Apollo.h>
#include <apollo/Region.h>
#define REAL float
REAL *alloc2D(int m, int n) //... |
//
// Created by genshen on 2019-04-25.
//
#include "system_configuration.h"
#include "atom/atom_element.h"
std::array<_type_atom_force, DIMENSION> configuration::systemForce(
AtomList *atom_list, InterAtomList *inter_atom_list) {
_type_atom_force force_x = 0.0, force_y = 0.0, force_z = 0.0;
atom_list... |
#include "globals.hpp"
#include "ImageFormatJPG.h"
#include <TJpg_Decoder.h>
static const char *module = "ImageFormatJPG";
namespace FreeTouchDeck
{
const char *enum_to_string(JRESULT res)
{
switch (res)
{
case JDR_OK:
return "Succeeded";
case JDR_INTR:
... |
/*
* Copyright (c) 2017-2021, Alibaba Group Holding Limited
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <vector>
#include "PDBClient.h"
#include "FFMatrixBlockScanner.h"
#include "FFTransposeMult.h"
#include "FFAggMatrix.h"
#include "FFMatrixWriter.h"
#include "FFMatrixBlock.h"
#include "FFMatrixUtil.h"
#include "Simpl... |
/*
* This file is part of Poedit (http://poedit.net)
*
* Copyright (C) 2000-2015 <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 li... |
/* bzoj 1036 */
/* 树链剖分 */
#include <bits/stdc++.h>
using namespace std;
#define MAXN 30030
#define MAXM (MAXN<<1)
struct edge {
int v;
edge *n;
edge(void) {}
edge(int vv, edge *nn):v(vv),n(nn) {}
};
typedef edge *ep;
int nE;
edge E[MAXM];
ep front[MAXN];
void add_edge(int u, int v) {
int ne = ++nE;
... |
/* Copyright (C) 2014 InfiniDB, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but W... |
#include <sketches/graph.hpp>
#include <cmath>
// Node functions
Node::Node(StateManager *applicationStateManager, int value, float x, float y, float radius, float sketchWidth, float sketchHeight)
: StateElement(applicationStateManager, x, y, radius * 2, radius * 2)
{
this->x = x;
this->y = y;
this->va... |
void harmonic_force(std::vector<double> &x_coor, std::vector<double> &y_coor, std::vector<double> &z_coor, std::vector<double> &harter_x, std::vector<double> &harter_y, std::vector<double> &harter_z, std::vector<std::vector<int>> &matrix, std::vector<std::vector<int>> &mask_end, std::vector<std::vector<double>> &matrix... |
////////////////////////////////////////////////////////////////////////////
//
// This file is part of SNC
//
// Copyright (c) 2014-2021, <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// ... |
#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
using namespace std;
unsigned long int biggestValueIn_N_bits(unsigned long int bv)
{
unsigned long int a = bv;
unsigned long int rem;
unsigned long int ... |
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
*
* 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
*
* ... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2019-2020 Edward.Wu
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* ... |
#include "DES.h"
// On déclare un objet permutation, celui-ci nous permettra de réaliser l'ensemble des permutations nécessaires au S-DES (P8, P10, ...)
permutation permut;
string bitset_to_string(bitset<64> message)
{
string message_string = "";
for (size_t j = 0; j < 8; j++)
{
char c =... |
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistribut... |
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/epoll.h>
#include <sys/fcntl.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <pthread.h>
#define RETRY_EINTR_RC(rc, expr) \
{ \
do \
... |
// Created by <NAME>
#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 pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int,int> pii;
template<class T> using oset=tree<T, null_type, l... |
// Copyright 2011 The Avalon Project Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0
// that can be found in the LICENSE file.
// <NAME>, May 2011
#include "helmsman/ship_control.h"
#include <stdio.h>
extern int debug; // globally shared
MetaState ShipControl::meta_sta... |
#include "stdafx.h"
#include "SolarSystem.h"
namespace
{
const unsigned INITIAL_YEAR = 2012;
const float DEFAULT_TIME_SPEED = 0.1f;
const float MIN_TIME_SPEED = -20;
const float MAX_TIME_SPEED = +20;
const float TIME_ADJUSTMENT = 0.02f;
// 40 пикселей на астрономическую единицу
const float DEFAULT_SCALE = 100.f;
cons... |
#include <condition_variable>
#include <mutex>
#include <thread>
#include <vector>
#include "maybe.hpp"
namespace event {
// type-erasure class
template<class A>
class any {
struct base {
virtual ~base() {}
virtual maybe<A> poll() = 0;
virtual A wait() = 0;
};
template<class E>
struct derived: ... |
/// Copyright (C) 2021 <NAME>, Control of Networked Systems,
/// University of Klagenfurt, Austria.
///
/// All rights reserved.
///
/// This software is licensed under the terms of the BSD-2-Clause-License with
/// no commercial use allowed, the full terms of which are made available in the
/// LICENSE file. No licens... |
#include <cmath>
#include <cstdio>
#include <iostream>
#include <glog/logging.h>
#include <gflags/gflags.h>
#include "ceres/ceres.h"
#include "ceres/rotation.h"
#include "mex.h"
struct SnavelyReprojectionErrorWithQuaternions {
// (u, v): the position of the observation with respect to the image
// center point.... |
#include "nau/render/passFactory.h"
#include "nau.h"
#include "nau/errors.h"
#include "nau/slogger.h"
#include "nau/render/iAPISupport.h"
#include "nau/render/pass.h"
#include "nau/render/passDepthMap.h"
#include "nau/render/passProfiler.h"
#include "nau/system/file.h"
#include <iostream>
#include <vector>
#include ... |
#include <iostream>
#include <vector>
#include <cmath>
#include <random>
#include "VecQuantity.h"
/* === Newtonian gravity in 3D, with N bodies === */
typedef Vec<3, double> Vec3;
Vec3 ex = {1, 0, 0};
Vec3 ey = {0, 1, 0};
Vec3 ez = {0, 0, 1};
typedef Quantity<1, 0, 0, 0, 0, 0, 0, double> Length;
typedef VecQ... |
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "reflection.h"
#include "values.h"
#include "rpcrequest.h"
#include "supervisor.h"
FRT_Method::FRT_Method(const char * name, const char * paramSpec, const char * returnSpec,
FRT_MET... |
#include "jpeg_codec.h"
static void set_error_mgr(jpeg_decompress_struct* cinfo, jpeg_utils_error_mgr* errorManager)
{
cinfo->err = jpeg_std_error(errorManager);
errorManager->error_exit = jpeg_utils_error_exit;
}
static void overwrite_mem_buffer_size(jpeg_decompress_struct* cinfo)
{
cinfo->mem->max_memor... |
// Vaca - Visual Application Components Abstraction
// Copyright (c) 2005-2009 <NAME>
//
// This file is distributed under the terms of the MIT license,
// please read LICENSE.txt for more information.
#include <vaca/vaca.h>
#include "../resource.h"
using namespace vaca;
enum {
ID_EXIT = 1000,
ID_CH... |
/************************************************************************************
Authors : <NAME> <<EMAIL>>
Copyright : Copyright <NAME>. All Rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may ob... |
/*
* file: atom.cpp
*/
#include "atom.h"
#include <fstream>
#include <sstream>
#include <iomanip>
using namespace std;
Atom::Atom()
{
record_type = RECORD_UNKNOWN;
atom_number = 0;
atom_name = " ";
alternate_location = ' ';
residue_name = " ";
chain_id = ' ';
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.