text stringlengths 3.08k 12.5k |
|---|
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include <gtest/gtest.h>
#include "gestures/include/activity_log.h"
#include "gestures/include/prop_registry.h"
using std::str... |
// Copyright 2022 <NAME>
#include <iostream>
#include <stb_image.h>
#include "Window.h"
using namespace Hazard;
Window::Window(const std::string& title, std::uint32_t width, std::uint32_t height, std::uint32_t fontSize) {
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) {
std::cerr << "ERROR: Could not initia... |
// =============================================================================
// High Performance ParalleX Library (libhpx)
//
// Copyright (c) 2013-2017, Trustees of Indiana University,
// All rights reserved.
//
// This software may be modified and distributed under the terms of the BSD
// license. See the C... |
#include <stdlib.h>
#include <string.h>
#include "cvwrap.hpp"
W2Mat::~W2Mat()
{
if (data_owner) {
free(data);
}
}
W2Mat::W2Mat()
:data_owner(false),
data(NULL),
data_byte_width(0),
data_height(0),
view_top(0),
view_left(0),
view_width(0),
view_height(0)
{
}
W2M... |
/*
* \brief Raw audio terminal sink
* \author <NAME>
* \date 2018-02-10
*/
/*
* Copyright (C) 2018 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* Genode includes */
#include <gems/magic_rin... |
#include "scene_sphere.hpp"
#define INF 9999999
#define MIN_ILLUMINATION 0.2f
std::vector<Planet> planets;
std::vector<Ball> stars;
std::array<light,1> lights;
Ray camera;
SimplexNoise background;
void scene_sphere_init() {
camera.origin = vec3(0, 60, 0.1f);
camera.dir = camera.origin * -1.f;
camera.dir.normalize... |
// Author: <NAME> <<EMAIL>>
# include <fstream>
# include <iostream>
# include <chrono>
# include <random>
# include <vector>
# include <algorithm>
# include <string>
# include <cstring>
# include <cstdint>
// How many times the program should try generating a random edge before giving up.
# define MAX_ITERATIONS... |
/* -*- C++ -*- *****************************************************************
* Copyright (c) 2013 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All rights reserved.
*
* Licensed under the NASA Open Source Agreement, Version 1.3 (the "Lice... |
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "Importer.h"
#include "DuplicateMessageTypeException.h"
#include "DuplicateRelationshipException.h"
#include "MessageTypeNotFoundException.h"
#include "PersonNotFoundException.h"
#include "Driver.h"
Driver::Driver() {
// Seed the random number genera... |
//
// $Id$
//
//
// <NAME> <<EMAIL>>
//
// Copyright 2009 Spielberg Family Center for Applied Proteomics
// Cedars Sinai Medical Center, Los Angeles, California 90048
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. ... |
/* Library for the nRF24L01+ module connected to the RaspberryPi
<NAME> 2014
*/
#include <sys/time.h>
#include <bcm2835.h>
#include "nRF24L01.h"
#include "nrf.h"
nrf::nrf(char chan, int pl_len) : nrf(chan, pl_len, new char[3], new char[3]) {}
nrf::nrf(char chn, int pl_len, char * tx, char * rx) {
channel = (c... |
/*
DP with broken profile
t[i][j] -> dx, dy for jth cell in ith transition
id[i][j] -> bit number for the cell (j+1)th cell in the ith transition in mask
We can check if the following states can be placed using (2*n)+1 bits where n is the number of rows
$
###
#
$##
#
#
#
$##
#
#
#
$##
Bits are numbers... |
/****************************************************************************
- Codename: Single-shot Monocular RGB-D Imaging using Uneven Double Refraction (CVPR 2020)
- author: <NAME> (<EMAIL>)
- Institute: KAIST Visual Computing Laboratory
@InProceedings{Meuleman_2020_CVPR,
author = {<NAME> and <NAME> and <NAME> an... |
#include "gdrawer.hpp"
#include <QtWidgets>
MainWindow::MainWindow()
{
picture = new QLabel;
QHBoxLayout *layout = new QHBoxLayout;
layout->addWidget(picture, 1);
QFormLayout *form = new QFormLayout;
pathLabel = new QLabel;
form->addRow(tr("GDrawer"), pathLabel);
QPushButton *openButton = new QPushButton(tr(... |
/**************************************************************************
*
* Copyright (c) 2002 - 2011 by Computer Architecture Department,
* Universitat Politecnica de Catalunya.
* All rights reserved.
*
* The contents of this file may not be disclosed to third parties,
* copied or duplicated in any form, in... |
/* This file is part of the KDE project
Copyright 2005,2007 <NAME> <<EMAIL>>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your optio... |
#include "common/variant.h"
using namespace love;
Proxy* Variant::TryExtractProxy(lua_State* L, size_t index)
{
Proxy* proxy = (Proxy*)lua_touserdata(L, index);
if (!proxy || !proxy->type)
return nullptr;
if (dynamic_cast<Object*>(proxy->object) != nullptr)
return proxy;
return null... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <set>
using namespace std;
int G[100][100];
void upd(int i, int j, set<int> &S) {
if (i<0 || j<0) {
return;
}
S.insert(G[i][j]);
}
cl... |
#include "FastJoin.h"
#include "TokenSigScheme/TokenSigSchemeFactory.h"
#include "TokenSigScheme/TokenSigScheme.h"
#include "TokenSetSigScheme/JaccardTokenSetSigScheme.h"
#include "TokenSetSigScheme/DiceTokenSetSigScheme.h"
#include "TokenSetSigScheme/CosinTokenSetSigScheme.h"
#include "Tokenizer/StandardTokenizer.h"
#... |
#include <lem/macro_parser.h>
#include <lem/solarix/dictionary.h>
#include <lem/solarix/tokens.h>
#include <lem/solarix/LexiconStorage.h>
#include <lem/solarix/TreeScorers.h>
#include <lem/solarix/WordEntrySetItem.h>
#include <lem/solarix/WordSetItem.h>
#include <lem/solarix/TreeScorer.h>
using namespace Sola... |
#include "avx2.h"
#include "scalar.h"
#include <immintrin.h>
uint64_t avx2_count_byte(const uint8_t* data, size_t size, uint8_t byte) {
const __m256i v = _mm256_set1_epi8(byte);
const uint8_t* end = data + size;
const uint8_t* ptr = data;
__m256i global_sum = _mm256_setzero_si256();
__m256i loc... |
/* Authors: <NAME> and <NAME>
* Feedback: <EMAIL>
* See: http://cs.baylor.edu/~hamerly/software/kmeans.php
* Copyright 2014
*/
#include "hamerly_kmeans.h"
#include "general_functions.h"
#include <cmath>
/* Hamerly's algorithm that is a 'simplification' of Elkan's, in that it keeps
* the following bounds:
* - O... |
// Copyright 2011-2014 Google
// 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 wri... |
struct Disc : Thread, Memory::Interface {
Node::Object node;
Node::Port tray;
Node::Peripheral cd;
VFS::Pak pak;
VFS::File fd;
CD::Session session;
struct Debugger {
//debugger.cpp
auto load(Node::Object) -> void;
auto commandPrologue(u8 operation, maybe<u8> suboperation = nothing) -> void;
... |
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
// Copyright (C) 2015 Faust Logic, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and ... |
/*
* VPE publisher node
* Copyright (C) 2018 Copter Express Technologies
*
* Author: <NAME> <<EMAIL>>
*
* Distributed under MIT License (available at https://opensource.org/licenses/MIT).
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Sof... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
using namespace std;
typedef long long lint;
#define cout cerr
#define ni (getint())
inline int getint(){
int t;
int ret=scanf("%d",&t);
assert(ret!=EOF);
return t;
}
template<class T>inline T next_num(){
T i=0;char c;
w... |
/*
Copyright(c) 2002-2017 <NAME>(anatoliy_kuznetsov at yahoo.com)
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 o... |
#include "duel/cui.h"
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include "core/server/game_state.h"
using std::string;
using std::cout;
namespace {
const int kMaxMessageLines = 6;
const char C_RED[] = "\x1b[41m";
const char C_BLUE[] = "\x1b[44m";
const char C_GREEN[] = "\x1b[42m"... |
//
// coreclrhost.cpp
//
// A .NET Core host for XPNet plugins.
//
// https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/netcore-hosting
//
// This code is somewhat generic, but it doesn't strive to be a full-featured generic CLR
// host. It makes assumptions and uses some types that are the right thing t... |
// https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4393
#include <vector>
#include <stack>
#include <algorithm>
// Strongly Connected Components
// Memory: O(E + V)
// NOTE: directed, multi-edge
class SCC {
int N;
std::vector<std::vector<int>> G;
std::vector<std... |
//======== (C) Copyright 1999, 2000 Valve, L.L.C. All rights reserved. ========
//
// The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the ... |
/*
Copyright 2016-2020 Intel 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... |
// Copyright (c) 2009-2012, <NAME> (<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:
//
// * Redistributions of source code must retain the above copyright
// notice, this list... |
#include <../../nrnconf.h>
/* /local/src/master/nrn/src/nrnoc/clamp.cpp,v 1.2 1997/08/15 13:04:10 hines Exp */
/* modified from fstim.cpp */
/* 4/9/2002 modified to conform to new treeset.cpp */
/*
fclamp(maxlevel, loc)
allocates space for maxlevel level changes all at location loc
previously existing clamp is rele... |
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2011,2014,2015,2017,2018 by the GROMACS development team.
* Copyright (c) 2019,2020, by the GROMACS de... |
//
// async_tcp_echo_server.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2019 <NAME> (chris at kohlhoff dot com)
//
// 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 <cstdlib>
#include <iostr... |
#include "getRank2NodeBroadcast.hpp"
#include "mex.h"
#include "matrix.h"
template<class Encoder, class Decoder, class Decoder_an>
struct simRes simMex(unsigned int K, unsigned int N, double * p, bool isSystematic, bool pruneZeros,
unsigned int no_of_users, double * pep, unsigned int iterations, u... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2014-, Open Perception, 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 mus... |
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
const int DIMENSION = 8;
enum tEstadoCasilla{ VACIA, HIELO, MURO, CAJA, JOYA, TORTUGA, NUMESTADOS };
enum tDir {UP, DOWN, RIGHT, LEFT};
struct tTortuga{
int id;
tDir dir;
};
struct tCasilla{
tEstad... |
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/platform/default/logging.h"
#include "tensorflow/core/framework/shape_inference.h"
#include<cmath>
// Signatures for GPU kernels here
using namespace tensorflow;
#include "ZeroOutRow.h"
R... |
/*<NAME> 2018-2020. Periodic Boundary Conditions.
This utility applies PBC to the positions in a spunto-like file
USAGE:
cat file | ./pbc [opt] > file.pbc
[opt]:
-L X To specify equal box length, X, in the three directions
-L X Y Z To specify independent lengths along eac... |
#include "solid/frame/manager.hpp"
#include "solid/frame/scheduler.hpp"
#include "solid/frame/service.hpp"
#include "solid/frame/aio/aioresolver.hpp"
#include "solid/frame/mprpc/mprpcconfiguration.hpp"
#include "solid/frame/mprpc/mprpcservice.hpp"
#include "mprpc_request_messages.hpp"
#include <deque>
#include <iost... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list... |
//
// General:
// This file is part of .NET Bridge
//
// Copyright:
// 2010 <NAME>
// 2017 <NAME> and Contributors
//
// License:
// 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 th... |
/*
+----------------------------------------------------------------------+
| See COPYING file for further copyright information |
| This is a specialized hash map mapping uintprt_t to int32_t |
+----------------------------------------------------------------------+
| Author: <NAME... |
/*
Copyright (c) <2013-2014>, <BenHJ>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and th... |
#include <cassert>
#include <cmath>
#include <gtc\random.hpp>
#include <iostream>
#include "Pedestrian.hpp"
void drawCircle(SDL_Renderer *renderer, float x, float y, float radius, int numPoints)
{
assert(renderer);
assert(numPoints > 2);
const float CIRCLE_INCREMENT = glm::radians(360.0f / numPoints);
SDL_Point... |
//---------------------------------*-C++-*-----------------------------------//
/*!
* \file construct/test/tstConeShape.cc
* \brief Tests for class ConeShape
* \note Copyright (c) 2020 Oak Ridge National Laboratory, UT-Battelle, LLC.
*/
//---------------------------------------------------------------------------... |
#include <cassert>
#include <memory>
#include <stdexcept>
#include <string>
#include <utility>
// IGNORE! Helper class for testing.
struct SMFCounter {
static std::size_t Ctor, CCtor, MCtor, CAsg, MAsg, Dtor;
static void reset() { Ctor = CCtor = MCtor = CAsg = MAsg = Dtor = 0; }
SMFCounter() : ID(0) { ++Ctor; }... |
// \file f9tws/ExgMkt_UT.cpp
//
// 測試 TSEC/OTC 行情格式解析.
//
// \author <EMAIL>
#define _CRT_SECURE_NO_WARNINGS
#include "f9tws/ExgMdPkReceiver.hpp"
#include "f9tws/ExgMdFmt6.hpp"
#include "f9extests/ExgMktTester.hpp"
struct TwsPkReceiver : public f9tws::ExgMdPkReceiver {
fon9_NON_COPY_NON_MOVE(TwsPkReceiver);
usi... |
#include <iostream>
using namespace std;
/** INHERITANCE
* another capability of C++ classes where the design can be structured int a hierachy
* The base class can be defined (e.g Person)
* then specialized versions can be created that inherit properties of the base (e.g Student)
* The "specialized class" inher... |
// This file is distributed under the BSD 3-Clause License. See LICENSE for details.
#include "floorplanner.hpp"
#include <stdexcept>
#include <typeinfo>
#include "cell.hpp"
#include "ann_place.hpp"
#include "lgedgeiter.hpp"
#include "helpers.hpp"
Lhd_floorplanner::Lhd_floorplanner(Node_tree&& nt_arg)
: root_l... |
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <stdlib.h>
#include <time.h>
#include <conio.h>
using namespace std;
int seed,fortune,in,bpool,count;
bool isQuick;
char *filename=(char *)malloc(10);
bool confirm();
void bpset();
int hash(int seed);
void getinf();
vo... |
/***************************************************************************
* Copyright (C) 2006 - 2016 by *
* <NAME>, KURI <<EMAIL>> *
* <NAME> <<EMAIL>> *
* <NAME> <<EMAIL>> *
* ... |
/* This file is part of VoltDB.
* Copyright (C) 2008-2020 VoltDB Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to... |
/*********************************************************************/
/* Copyright (c) 2016-2018, EPFL/Blue Brain Project */
/* <NAME> <<EMAIL>>*/
/* <NAME> <<EMAIL>> */
/* All rights reserved. */
/* ... |
/*
* watershed_demo.cpp
*
* Created on: 2017年3月18日
* Author: icyplayer
*/
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
namespace wt{
#define WINDOW_NAME "[window 1]"
Mat g_srcImage, g_maskImage;
// callback... |
/* Copyright (c) 2019 Anakin Authors, Inc. 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 applicab... |
#include "ros/ros.h"
#include "std_msgs/Float32.h"
#include "std_msgs/Float32MultiArray.h"
#include "pcan/CANMsg.h"
//------------------------GLOBAL VARIABLES------------------------//
float desired_angle = 0;
int Ts = 50; //Loop rate (Hz)
float current_angle = 0;
float current_speed = 0;
//-----------------------FUN... |
//Generic utilities
//Author: <NAME>
//Copyright (c) 2021 Sentek Systems, LLC. All rights reserved.
#pragma once
//System Includes
#include <string>
#include <chrono>
//External Includes
#include "../../handycpp/Handy.hpp"
inline double FractionalPart(double x) { return x - std::floor(x); }
inline double SecondsSi... |
/*
* Copyright 2015, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include "QueryList.h"
#include <Autolock.h>
#include <Debug.h>
#include <NodeMonitor.h>
#include <VolumeRoster.h>
static BLooper* sQueryLooper = NULL;
static pthread_once_t sInitOnce = PTHREAD_ONCE_INIT;
static void
in... |
/*
* See header file for a description of this class.
*
* \author <NAME> - INFN Torino
*/
#include "DTOccupancyCluster.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "TH2F.h"
#include "TMath.h"
#include <iostream>
using namespace std;
using namespace edm;
DTOccupancyCluster::DTOccupa... |
//
// Created by alexwang on 6/19/16.
//
#include "Camera.h"
#include "utils/Logger.h"
#include "utils/MathUtils.h"
#include "utils/ThreadPool.h"
#include <cmath>
#include <algorithm>
#include <opencv/highgui.h>
#include <fstream>
std::shared_ptr<alex::Ray> alex::Camera::getRay(int x, int y) const {
if (x > width ... |
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// Name :
// Author : Avi
// Revision : $Revision: #18 $
//
// Copyright 2009-2020 ECMWF.
// This software is licensed under the terms of the Apache Licence version 2.0
// which can be obtained at http://www.apache.org/lic... |
// This source file is part of the Argon project.
//
// Licensed under the Apache License v2.0
#include <object/arobject.h>
#include "bool.h"
#include "function.h"
#include "error.h"
using namespace argon::object;
using namespace argon::memory;
bool function_is_true(Function *self) {
return true;
}
ArObject *fu... |
/*
* Copyright 2007-2012 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*
* Authors:
* <NAME>
*/
#include "accelerant.h"
#include <errno.h>
#include <string.h>
#include <unistd.h>
AccelerantInfo gInfo; // global data used by source files of accelerant
static uint32 vide... |
/****************************************************************************
* Copyright: National ICT Australia, 2007 - 2010 *
* Developed at the ATP lab, Networked Systems research theme *
* Author(s): <NAME>, <NAME> *
* This file is distributed un... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004-2021 musikcube team
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redist... |
#include <stdio.h>
#include "dependency_resolver.hpp"
#include "git_lib.cpp"
string MatchVersionRange(application_context& ctx, version_t& version, repository* repo) {
vector<string*>* repositoryTags = GetTagsForRepository(ctx, repo);
if (repositoryTags->empty()) {
delete repositoryTags;
ret... |
/* Copyright 2017 The TensorFlow Authors. 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 law or ag... |
/*
* Copyright (C) 2015, 2016 "IoT.bzh"
* Author "<NAME>" <<EMAIL>>
*
* 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 require... |
/**Kattis - pointinpolygon
* What supposed to be easy turned out to be a mad hunt for a bug. Turns out, finding the
* length of a vector using hypot(x, y) gave WA but using sqrt(x*x+y*y) is AC? Idk man, I
* think the testcases were prepared wrongly
*
* Time: O(nq), Space: O(n)
*/
#pragma GCC optimize("Ofast")
#p... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by the bzip2
// license that can be found in the LICENSE file.
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.... |
// Copyright 2021 University of Adelaide
//
// 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 agr... |
/*
* PROGRAM: Object oriented API samples.
* MODULE: 04.print_table.cpp
* DESCRIPTION: Run SELECT statement without parameters.
* Use attachment method to open cursor.
* Print all fields for selected records in a table.
* Learns how to access blob data and use unprepared statement.
*
* Example ... |
// ────────────────────────────────────────────────────────────
// ╔╗ ╔╗ ╔══╗ ╔════╗
// ║╚╗╔╝║ ╚╣╠╝ ║╔╗╔╗║
// ╚╗╚╝╔╝ ║║ ╔══╗ ╚╝║║╚╝
// ╚╗╔╝ ║║ ║╔╗║ ║║
// ║║ ╔╣╠╗ ║╚╝║ ║║
// ... |
/* =======================================================================
Copyright (c) 2011-2014, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
-----------------
Vie... |
#include "events.h"
#include "../misc/misc.h"
#include "../ragebot/ragebot.h"
#pragma comment( lib, "Winmm.lib" )
c_event_listener g_events;
c_event_listener::c_event_listener( ) { }
c_event_listener::~c_event_listener( ) {
if( !m_eventlistener )
return;
g_csgo.m_game_event->RemoveListener( this ... |
// ======================================================================
/*!
* \file
* \brief A program to dump shapefile contents in qdtext SVG form
*/
// ======================================================================
/*!
* \page shape2svg shape2svg
*
* shape2svg takes as input a single filename indicat... |
// written by <NAME> 2008 - 2015
// this work is public domain. the code is undocumented, scruffy, untested, and should generally not be used for anything important.
// i do not offer support, so don't ask. to be used for inspiration :)
#include "replaymenu.hpp"
#include "main.hpp"
#include "framework/schedule... |
/*
Copyright (C) 1999-2005 by <NAME> and <NAME> for the
Wisconsin Multifacet Project. Contact: <EMAIL>
http://www.cs.wisc.edu/gems/
--------------------------------------------------------------------
This file is part of the Opal Timing-First Microarchitectural
Simulator, a component of the... |
/*---------------------------------------------------------------------------------
Copyright (C) 2007 Acekard, www.acekard.com
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 restrictio... |
#include <algorithm>
#include <array>
#include <string>
#include <system/src/linux/x11_keyboard.hpp>
#include "X11/XKBlib.h"
#include <X11/keysym.h>
namespace
{
using framework::system::KeyCode;
constexpr int key_codes_count = 256;
KeyCode key_codes[key_codes_count] = {KeyCode::unknown};
Display* d;
struct KeyNa... |
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
// Copyright (c) 2013 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 <string.h>
#include "gn/source_file.h"
#include "base/logging.h"
#include "gn/filesystem_utils.h"
#include "gn/source_dir.h"
#include "util... |
/*
pbrt source code Copyright(c) 1998-2012 <NAME> and <NAME>.
This file is part of pbrt.
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 copyr... |
// gcc MovingPoly.cpp -lGL -lGLU -lglut -lm -o MovingPoly
#include <GL/glut.h>
#include <math.h>
#include <stdio.h>
#include <iostream>
// These are very important parameters to take
// into consideration
#define SCREEN_WIDTH 600
#define SCREEN_HEIGHT 600
// Global declaration
float i,j;
double x,y;
// Aug went as... |
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <afx.h>
#define BUF_LEN 132
#define MIN_SECTION_LEN 1024
#define NL "\r"
#define DEVNULL_FILE "md8tmp.tmp"
typedef int boolean;
// The minimum line length before the program decides that
// an intra paragraph line break is intentional. GP defi... |
#include "Display.h"
#include <SDL.h>
#include <SDL_image.h>
#include <vector>
#include <map>
#include "Game.h"
#include <algorithm>
#include "Colors.h"
static constexpr auto LOGICAL_WIDTH = 640;
static constexpr auto LOGICAL_HEIGHT = 360;
static constexpr auto SCREEN_WIDTH = LOGICAL_WIDTH * 2;
static constexpr auto SC... |
#include "RAIIUtils.h"
#include "SignatureCheck.h"
#include "ci.h"
#define SHA1_IDENTIFIER 0x8004
#define SHA256_IDENTIFIER 0x800C
#define IMAGE_DIRECTORY_ENTRY_SECURITY 4
extern "C" PVOID RtlImageDirectoryEntryToData(PVOID BaseAddress, BOOLEAN MappedAsImage, USHORT Directory, PULONG Size);
bool inRange(const BYTE*... |
/*
* Copyright (c) 2005 by ESO Technologies.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This
* file and program are licensed under a BSD style license. See
* the Copy... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2005 by <NAME>
// Permission to use, copy, modify, distribute, and sell this software for any
// purpose is hereby granted without fee, provided that the above copyright
// notice appear in all copies and that both... |
/*
* ABKcontrol.cpp
* Copyright (C) 2017 <NAME> <<EMAIL>>
*
* Distributed under terms of the MIT license.
*/
#include "ABKcontrol.h"
void ABK_set_drum_mode(ABK_drum_mode_t mode) {
switch(mode) {
case ABK_DRUM_BRAKED:
brake = 1; // brake is active when 1
break;
case AB... |
/*
* MIT License
*
* Copyright (c) 2017 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... |
/*
* 2013+ Copyright (c) <NAME> <<EMAIL>>
* 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 as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version... |
/*
Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
Copyright (c) 2020, <NAME>, <NAME> 10, bus 2452, B-3001 Leuven-Heverlee, Belgium.
All rights reserved
*/
#include "Input_Output_Simple.h"
#include "Exceptions/Exceptions.h"
#include "System/Networking.h"
... |
#include <cpplib/stdinc.hpp>
class Persistent_Seg_Tree {
struct Node {
int val;
Node *left, *right;
Node(const int v) : val(v), left(nullptr), right(nullptr) {}
};
private:
const Node NEUTRAL_NODE = Node(0);
int merge_nodes(const int x, const int y) { return x + y; }
private:
const int n;
vect... |
//
// Created by alican on 10.05.2016.
//
//#include <functional>
#include "Population.h"
Population Population::selection(int generation) {
// std::default_random_engine generator;
float ex = (float) (0.5 + (generation / 300.0));
// std::exponential_distribution<double> distribution(ex);
std::vect... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.