text stringlengths 3.08k 12.5k |
|---|
#include<iostream>
#include<cstring>
#include<memory>
/*
In this sample code I tried to demonstrate use of move semantics using RValue References in modern C++
Special thanks to this link: https://www.internalpointers.com/post/c-rvalue-references-and-move-semantics-beginners
Notice Only for learning purposes:
In... |
#include "PageView.h"
#include <iostream>
PageView::PageView(SDL_Renderer *r, int w, int h)
{
//SETUP
renderer = r;
screen_w = w;
screen_h = h;
//SET Url bar params
url_bar.x = 0;
url_bar.y = 0;
url_bar.w = screen_w;
url_bar.h = screen_h / 8;
//SET links bar params
int box_length = 200;
links_ba... |
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
#include <boost/python/args.hpp>
#include <string>
#include <scitbx/array_family/shared.h>
#include <scitbx/array_family/versa.h>
#include <scitbx/array_family/accessors/c_grid.h>
#include "cma/cmaes_interface.h"
/* ===============================... |
/***************************************************************************
* Name <NAME>
***************************************************************************/
/***************************************************************************
* Copyright (C) 2012, 2015 <NAME> (<EMAIL>) *
* ... |
/***********************************************************
CSCI 241 - Assignment 2 - Fall 2018 - Northern Illinois University
Progammer: <NAME>
Z-ID: z1761994
Section: 3
TA: <NAME>
Date Due: Feb 6, 2018
Purpose: This is a program that searches for numbers in a vector
and finds how many comparisons it to... |
#include <bits/stdc++.h>
using namespace std;
long long totalComparisons;
long long commonNodeCount;
struct node{
long long nodeId;
node *left;
node *right;
};
struct bst{
long long size;
node *root;
};
node *getNewNode(){
node * newnode = new node;
newnode->left = NULL;
newnode->right = NUL... |
/*
This project implements the methods in the following paper. Please cite this paper, depending on the use.
<NAME>, <NAME>, <NAME>, <NAME> and <NAME>. Segment-Tree based Cost Aggregation for Stereo Matching, in CVPR 2013.
The code is written by <NAME>, <<EMAIL>>, 2013.
LICENSE
Copyright (C) 2012-2013 by <NAME>
Perm... |
#include "ns3/core-module.h"
#include "ns3/simulator.h"
#include "ns3/applications-module.h"
#include <cmath>
#include <algorithm>
#include <sstream>
#include "ns3/network-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/random-variable-stream.h"
using namespace ns3;
NS_OBJECT_ENS... |
template <class T>
void rsMaxHeapify(T *buffer, int length, int i, int heapSize,
bool (*less)(const T& left, const T& right))
{
int left = 2*i+1;
int right = 2*i+2;
int largest;
if(left <= heapSize-1 && less(buffer[i], buffer[left]))
largest = left;
else
largest = i;
if(right <= heapSize-1 && ... |
/*
* Copyright [2021] JD.com, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... |
#include <stdlib.h>
#include <string>
#include <queue>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#define MOSSRESULTS "out"
#define PAGERESULTS "mossel_tov.html"
using namespace std;
struct Student {
string student;
bool queued;
Student(string student, bool ... |
/* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... |
/*
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be... |
//FAMOS headers
#include "FastSimulation/CaloGeometryTools/interface/CaloSegment.h"
#include "FastSimulation/CaloGeometryTools/interface/CaloGeometryHelper.h"
#include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer1Properties.h"
#include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer2Pro... |
#include <click/config.h>
#include "gathererror.hh"
#include <click/straccum.hh>
#include <click/confparse.hh>
#include <algorithm>
const unsigned char *
skip_utf8_char(const unsigned char *s, const unsigned char *end)
{
int c = *s;
if (c > 0 && c < 0x80)
return s + 1;
else if (c < 0xC2)
/* zero, ... |
/*
An example that shows how to implement the monitor synchronization concept.
See also http://en.wikipedia.org/wiki/Monitor_(synchronization) for more
information about this concept.
----------------------------------------------------------------
Notice that the following BSD-style license applies ... |
/*
This file is part of the MiLi Minimalistic Library.
Copyright (C) <NAME>, <NAME>, FuDePAN 2011
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt in the root directory or
copy at http://www.boost.org/LICENSE_1_0.txt)
MiLi IS PROVIDED "AS I... |
//
// This source file is a part of borsch.3d
//
// Copyright (C) borsch.3d team 2017-2018
//
// 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 limitat... |
/* This code is released into the public domain. */
#include <algorithm>
#include "ImagePNG.h"
#include "Matrix.h"
struct Pos
{
Pos(unsigned xx, unsigned yy, unsigned n) : x(xx), y(yy), nb(n) {}
unsigned x, y, nb;
inline bool operator< (const Pos& p) const
{
return nb < p.nb;
}
};
inline unsigned red (uns... |
#include "./SDARecoFallingTimeCalc.h"
#include "../JPetRecoSignalTools/JPetRecoSignalTools.h"
#include "../../../framework/JPetManager/JPetManager.h"
ClassImp(SDARecoFallingTimeCalc);
//standard constructor
SDARecoFallingTimeCalc::SDARecoFallingTimeCalc(const char* name, const char* title,
const c... |
/*
* GStreamer
* Copyright (C) 2010 <NAME> <<EMAIL>>
*
* 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, modi... |
/**
uc::apng::loader
Copyright (c) 2017, <NAME>
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
#define STB_IMAGE_IMPLEMENTATION
#include"uc_apng_loader.h"
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <array>
#include <vector>
#include <string>... |
#include "xo/system/test_case.h"
#include "xo/geometry/angle.h"
#include "xo/geometry/vec3.h"
#include "xo/geometry/quat.h"
#include "xo/string/string_cast.h"
#include <vector>
#include <math.h>
struct Quaternion
{
double w, x, y, z;
};
Quaternion ToQuaternion( double yaw, double pitch, double roll ) // yaw (Z), pit... |
/*
* システム関連
*
* Copyright (c) 2016 Wakayama.rb Ruby Board developers
*
* This software is released under the MIT License.
* https://github.com/wakayamarb/wrbb-v2lib-firm/blob/master/MITL
*
*/
#include <Arduino.h>
#include <eeprom.h>
#include <reboot.h>
#include <mruby.h>
#include <mruby/string.h>
#include <mru... |
#include "rip.h"
#include <stdint.h>
#include <stdlib.h>
#include <endian.h>
#include "myendian.h"
#include "myip.h"
#define DEBUG 0
#if DEBUG
#include <stdio.h>
#endif
int lowbit(int x) {
return x & -x;
}
bool test_single_one(int x) {
return lowbit(x) == x;
}
//if x==0 return true
bool test_01(int x) {
return t... |
//
// Tactool.cpp
//
// Converts tactics and reaction files from text to binary
//
#define __MEMMGR_H__ // Don't use the memory manager
#define NO_MALLOC_MACRO
#include <stdio.h>
#include <conio.h>
#include <stddef.h>
#include <fcntl.h>
#include <io.h>
#include <stdlib.h>
#include "cmpglobl.h"
#include "tactics.h"
/... |
/******************************************************************************************
* Copyright (c) 2015 eProsima. All rights reserved.
*
* This copy of eProsima Non-Intrusive DDS Recorder is licensed to you
* under the terms described in the DDSRECORDER_LICENSE file included in this distribution.
*
*****... |
/**
* Copyright (c) 2017 <NAME>
* File Name: Notfredo.cpp
* Header File Name: Notfredo.h
* Class Name: Notfredo
* Objective: Defines the behavior and actions of a piece of the Notfredo, the hitman of the second level.
*/
#include "assert.h"
#include "Notfredo.h"
#include "Camera.h"
#include "StageState.h"
#inclu... |
// ==========================================================================
// Mason - A Read Simulator
// ==========================================================================
// Copyright (c) 2006-2012, <NAME>, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and... |
// Copyright (c) 2020 PaddlePaddle 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... |
#include "linux_parser.h"
#include <dirent.h>
#include <unistd.h>
#include <algorithm>
#include <cmath>
#include <filesystem>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
namespace fs = filesystem;
// DONE: An example of ... |
#include "gtest/gtest.h"
#include "THashTest.h"
#include "BinaryTHash.h"
#include "BinaryParserTest.h"
namespace TS=ThorsAnvil::Serialize;
TEST(THashTest, hashFundamental)
{
std::size_t shortH = TS::thash<short>();
std::size_t intH = TS::thash<int>();
std::size_t l... |
/*
* Copyright (C) 2021 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: 2018 <NAME> (<EMAIL>)
*
* 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 <fstream>
#include <iostream>
#include <memory>
#include <type_traits>
#include <vector>
#include <boost/al... |
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define NMAX 100000
#define MOD 1000000007
typedef long long int64;
static int t, n, m;
static int64 fenwick[NMAX + 10];
inline void modify(int x, int64 v) {
for (; x <= n; x += x & (-x)) {
fenwick[x] += v;
fenwick... |
/* p5_crpt.c */
/* Written by Dr <NAME> (<EMAIL>) for the OpenSSL
* project 1999.
*/
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification... |
#include "round_robin_dns.h"
#include <vector>
#include <boost/lexical_cast.hpp>
#include "dxcpp/dxlog.h"
using namespace std;
// The function getRandomIP() below (both version: Windows & non-windows) memorizes
// their first successful call, and cache ipList are cached after that, and all
// subsequent calls just r... |
/**
* @author ruarq
* @date 11.02.2022
*
* Copyright (C) 2022 ruarq
*
* 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... |
/**
This is a sample application demonstrating sending and recieving messages in a dummy game loop.
Build instructions:
Windows - a visual studio project is included in the vsproject folder.
Linux - SDL2 and cmake are required to build the sample.
*/
#include <stdlib.h>
#include <math.h>
#include "../gamedevweb... |
/***************************************************************************
* Copyright (C) 2007 by <NAME> *
* <EMAIL> *
* *
* This program is free softwar... |
/*
* CometOS --- a component-based, extensible, tiny operating system
* for wireless networks
*
* Copyright (c) 2015, Institute of Telematics, Hamburg University of Technology
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted pr... |
/*
* zsummerX License
* -----------
*
* zsummerX is licensed under the terms of the MIT license reproduced below.
* This means that zsummerX is free software and can be used for both academic
* and commercial purposes at absolutely no cost.
*
*
* ============================================================... |
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
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 ve... |
/*
Copyright [2016] [<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 writing, software
dist... |
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <stdio.h>
#include <stdlib.h>
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#include <ctime>
#include <time.h>
#include <math.h>
size_t VECTOR_SIZE = pow(2,27);
// OpenCL kernel for each work item
const char *leakyReLUKernel =
"__ke... |
#include <iostream>
#include <tuple>
using namespace std;
struct O { }; // dead
struct X { }; // alive
// starting level
using start = tuple<
O, O, O, O, O,
O, O, X, O, O,
O, O, O, X, O,
O, X, X, X, O,
O, O, O, O,... |
#include <cstdlib>
#include <iostream>
#include <string>
#include <glm/vec3.hpp>
#include <glm/vec2.hpp>
#include <unordered_map>
#define TINYOBJLOADER_IMPLEMENTATION
#include <tiny_obj_loader.h>
//#include <Windows.h>
#undef min
#undef max
#undef OPAQUE
void fatalExit(const char *message, int exitCode)
{
// Message... |
//#pragma once
#include <eosio/eosio.hpp>
#include <eosio/system.hpp>
#include "freeosgov.hpp"
#include "tables.hpp"
#include "constants.hpp"
using namespace eosio;
using namespace freedao;
using namespace std;
void freeosgov::make_points_payment(name user, asset quantity, uint32_t iteration, string transfer_memo) {... |
/*
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2008-2010 <NAME> <<EMAIL>> (see details below)
* Copyright (c) 2020 Gothel Software e.K.
* Copyright (c) 2020 ZAFENA AB
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Sof... |
#include <iostream>
#include <iomanip>
using namespace std;
const bool IN_TEST = false; // If true, you need to provide interaction with program
const bool SEARCHABLE_EXISTS = 0; // 0 - random, 1 - searchable exists
const unsigned int TEST_COUNT = 10; // Count of tests
const unsigned int TEST_STEP = 100; // Increment... |
#include "base/File.h"
#include "base/Log.h"
#include "base/CommonMacro.h"
#include "datacenter/ConfigCenter.h"
#include "AppContext.h"
/*
default addr arrangement:
agent
51XXX
channel listen
51010
51011
51012
gate
52XXX
channel listen
52010
tcp server listen
... |
// Simulation of the Hertz airport shuttle bus, which picks up passengers
// from the airport terminal building going to the Hertz rental car lot.
#include <iostream>
#include "cpp.h"
#include <string.h>
using namespace std;
#define NUM_SEATS 6 // number of seats available on shuttle
#define TINY 1.e-20 // ... |
// CPP.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <tchar.h>
#include <typeinfo>
#include <iostream>
#define BUF_SIZE 256
TCHAR szName[] = TEXT("MyFileMappingObject");
TCHAR szMsg[] = TEXT("Hey Pharo , this is C+... |
#include "path_planner.h"
#include "helpers.h"
#include "spline.h"
namespace
{
PathPlanner::History GetHistory(const ControlTrajectory& old_trajectory, const CarState& car_state)
{
ControlTrajectory previous_trajectory{};
const auto& size{old_trajectory.x.size()};
auto previous_yaw{deg2rad(car_state.yaw)}... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <queue>
using namespace std;
const int INF = 987654321;
int val(char c) {
if ('a'<=c && c<='z') {
return c-'a'+27;
} else if ... |
// vm-tutorial - Virtual machine tutorial targeting CHIP-8
//
// Written in 2021 by <NAME> aka kaichiuchu <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed wi... |
/*
* Controller.cpp
*
* Created on: Apr 5, 2013
* Author: lucasmello
*/
#include <iostream>
#include <vector>
#include "Controller.h"
#include "GameEngine/Participants/PlayerParticipant.h"
#include "GameEngine/Map.h"
using namespace std;
extern int window_weight;
extern int window_height;
extern int wind... |
#include "lidarData.hpp"
#include <algorithm>
#include <iostream>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
inline const bool withinBoundary(const double value, const double lowerBound, const double upperBound) {
return value >= lowerBound && value <= upperBound;
}
// remove ... |
//
// TestBS1770.cpp
// FxDSP
//
// Created by <NAME> on 7/9/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "bs1770.h"
#include "Signals.h"
#include "Dsp.h"
#include <stdio.h>
#include <gtest/gtest.h>
#define N_SAMPLE_RATES (4)
#define N_PHASES (3)
static float sample_rates[N_SAMPLE_RATES] =... |
/*
* fxpt_atan2.c
*
* Copyright (C) 2012, <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy,... |
/*
* jb_dial.cpp
*
* Implements jade::dial GUI element class
*
*/
/* INCLUDES *******************************************************************//******************************************************************************/
#include "jb_dial.hpp"
#define _USE_MATH_DEFINES
#include <cmath>
#ifndef M_PI
#de... |
#include <bats.hpp>
#include <vector>
#include <iostream>
#include <math.h>
#include <chrono>
#include <random>
using FT = ModP<int, 2>;
// using CpxT = bats::LightSimplicialComplex<size_t, std::unordered_map<size_t, size_t>>;
using CpxT = bats::SimplicialComplex;
inline size_t _get_idx(size_t i, size_t j, size_t n)... |
// BEGIN CUT HERE
#pragma warning(disable:4018) // signed/unsigned mistatch
#pragma warning(disable:4244) // w64 to int cast
#pragma warning(disable:4267) // big to small -- possible loss of data
#pragma warning(disable:4786) // long identifiers
#pragma warning(disable:4800) // forcing int to bool
#pragma ... |
#include "gtest/gtest.h"
#include "udChunkedArray.h"
TEST(udChunkedArrayTests, ToArray)
{
const char *pTestString = "Hello World!";
char buffer[32];
udChunkedArray<char> array;
size_t len = strlen(pTestString);
array.Init(8);
for (size_t i = 0; i < len; ++i)
array.PushBack(pTestString[i]);
EXPECT_EQ... |
/*
* ECEF/LLA convertion method from:
*
* <NAME>. Accurate Conversion of Earth-Fixed Earth-Centered Coordinates to
* Geodetic Coordinates.[Research Report] Norwegian University of Science and Technology.
* 2017. hal-01704943v2
*
* URL: https://hal.archives-ouvertes.fr/hal-01704943v2/
*
*/
#include "wgs84conv.... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: Board.cpp
* Author: osmel
*
* Created on April 7, 2021, 10:20 PM
*/
#include "Board.h"
bool Board::is_move = fal... |
#include <iostream>
#include <fstream>
#include <string>
#include "constants.h"
#include "InputData_BO.h"
using namespace std;
using namespace System::Windows::Forms;
InputData_BO::InputData_BO(const string filename)
{
// Create input file object.
ifstream infile;
// Create file buffer and input stream/
infile.op... |
/*
Copyright (C) 2012-2013 <NAME>
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.1 of the License, or (at your option) any later version.
This library is distrib... |
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define MAX 100
struct polynomial{
int coef; //係數
int expon; //指數
};
struct MyPoly{
polynomial terms[MAX]; //多項式陣列
int size; //多項式大小
MyPoly(); //建構子 初始化size=0
... |
#include "stdafx.h"
#include "Player.h"
#include "Renders/ILineVertex.h"
Player::Player(D3DXVECTOR2 position, D3DXVECTOR2 scale) :
moveSpeed(200.0f), focusOffset(-180, -120), singleLine(Shaders + L"015_Bounding.fx", &vertical)
, vertical(position, position), gravity(-98.1f), velocity(0, 0), onGround(0)
{
animation ... |
//
// Created by gen on 15-5-2.
//
#include "anim_controller.h"
#include "../../core/script_language.h"
#include "../../scene/animation/animation_player.h"
Variant AnimController::getvar(const Variant& p_key, bool *r_valid) const {
Variant ret;
if (anim_nodes.has(p_key)) {
*r_valid = true;
... |
#include "connection.h"
#include <iostream>
#include "fileread.h"
std::vector<connection>tcp_connections;
global_struct global_header;
void connection::sort_packets() {
sorter(this->dataup, this->up_behavior);
sorter(this->datadown, this->down_behavior);
this->tcp_teardown = check_close();
return;
}
void connec... |
#include <iostream>
#include <fstream>
#include <string.h>
// Matricea a este o matrice de tridimensionala;
// a[i][j][k]=k de la starea i la starea j se marge cu k-'a'+1; unde k este litera din alfabet
using namespace std;
struct AFN
{
int numarInitiale;
int numarFinale;
int caractereAlfabet;
int nu... |
/***************************************************
*
* File: filters/calculate_placement.cpp
*
* Calculate Placement Filter
* given two nodes, find a position for the first relative to the second
* that satisfies axis separation constraints,
* taking bounding boxes into consideration
* E.g. calculate a p... |
/*
* httpServer.cpp
*
* Created on: Apr 12, 2018
* Author: le0nx
*/
#include "httpServer.h"
#include <iostream>
HTTP_Server::HTTP_Server(uint32_t port, size_t threads_num=1)
: _threads_num(threads_num),
_endpoint(ip::tcp::v4(), port), // можно и v6
_acceptor(_service, _endpoint)
{std::cout << "Starti... |
#include "Hask/HaskDialect.h"
#include "Hask/HaskOps.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "llvm/Support/Casting.h"
#include <map>
#include <set>
using namespace mlir;
using namespace standalone;
struct LzLazifyPass : public Pass {
LzLazifyPass() : Pass(mlir::TypeID::get<LzLazifyPass>()){};
Str... |
#include "NN_MCTS.hpp"
NN_MCTS::NN_MCTS(std::shared_ptr<Game> game, std::shared_ptr<NetRunner> runner, std::shared_ptr<NN_Interface> interface) : MCTS(game)
{
this->runner = runner;
this->nn_interface = interface;
auto g = this->root->getGame();
auto nn_input = this->nn_interface->getNNInput(g, g->getCurr... |
/* mbox-util.c - Mail address helper functions
* Copyright (C) 1998-2010 Free Software Foundation, Inc.
* Copyright (C) 1998-2015 <NAME>
*
* This file is part of GnuPG.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* publis... |
/*
* This file is part of ImageToMapMC project
*
* Copyright (c) 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
* the Software without restriction, including without limitation the r... |
//
// Created by czl17 on 2018-3-30.
//
#include <iostream>
#include <cstdlib>
#include "ranklist_v1.h"
#include <functional>
#include <map>
#include <memory>
using namespace std;
struct Key {
Key() : val(-1), id(-1), online(false) { }
Key(const int v, const int i) : val(v), id(i), online(false) { }
/*
... |
/*******************************************************************************
* Copyright (c) 2017-2020
* School of Electrical, Computer and Energy Engineering, Arizona State University
* PI: Prof. <NAME>
* All rights reserved.
*
* This source code is part of NeuroSim - a device-circuit-algorithm framework to ... |
/**
@file
@author <NAME>
@copyright 2018 <NAME>, Licensed under the Apache License, Version 2.0.
(see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
@brief
*/
#include <iostream> // std::cout
// ============================================================================
// HEAD... |
#include <bits/stdc++.h>
using namespace std;
const int maxValueN = 1e5+1;
/*
Autor: <NAME>, <NAME>
Descripcion del Problema: Se nos presente a Uolevi quien
acabada de ganar un concurso y el premio consiste en un
viaje de uno o mas vuelos entre ciudades. De esta manera
a Uolevi le con... |
/*
* TeamSpeak 3 demo plugin
*
* Copyright (c) 2008-2016 TeamSpeak Systems GmbH
*/
#ifdef _WIN32
#pragma warning (disable : 4100)
#include <Windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <thread>
#include <qapplication.h>
#include <qcorea... |
///////////////////////////////////////////////////////////////////////////////
// User Inteface module
///////////////////////////////////////////////////////////////////////////////
//
// Private functions
//
const auto BIG_DIGIT_PAGES = 4;
const auto BIG_DIGIT_WIDTH = 16;
const auto SMALL_DIGIT_PAGES = 2;
const au... |
/*****************************************************************************
Copyright 2013 Laboratory for Advanced Computing at the University of Chicago
This file is part of TLS over UDT POC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Lic... |
#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
const double eps=1e-5;
struct Student{
string sid;
int cid;
string name;
int rank;
int s1,s2,s3,s4;
int id=0;
int total()const{return s1+s2+s3+s4;}
bool operator<(const Student& rhs)const{return total()>... |
#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 "j1PathFinding.h"
#include "j1Gui.h"
#include "j1Scene.h"
#include "Interactive.h"
j1Scene::j1Scene() : j1Module()
{
name.... |
/*
MIT License
Copyright (c) 2019 <NAME> <<EMAIL>>
Copyright holder detail: Nickname(s) used by the copyright holder: 'berkay2578', 'berkayylmao'.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Weapon.h"
#include "Components/SkeletalMeshComponent.h"
#include "DrawDebugHelpers.h"
#include "Kismet/GameplayStatics.h"
#include "GunslingersCharacter.h"
// Sets default values
AWeapon::AWeapon()
{
// Set this actor to call... |
#include "EdifData.hpp"
EdifData::EdifData() {
CellMap = new tCellMap;
CIMap = new tCIMap;
}
void EdifData::setName(const char* name) {
Name = name;
// printf("NAME: %s\n", Name.c_str());
tCellMapPtr cell_it = CellMap->find(Name);
if (cell_it != CellMap->end()) { // it exists
tInstanceMap* insta... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... |
#include "usart.h"
#include "sys.h"
#include "stdarg.h"
#include <time.h>
#include <rt_misc.h>
__asm(".global __use_no_semihosting_swi");
//#pragma import(__use_no_semihosting_swi)
struct std::__FILE { int handle; /* Add whatever you need here */ };
std::FILE std::__stdin;
std::FILE std::__stdout;
std::FILE std::__s... |
/*
* 编译:c++ -o epoll-et epoll-et.cc
* 运行: ./epoll-et
* 测试:curl -v localhost
* 客户端发送GET请求后,服务器返回1M的数据,会触发EPOLLOUT,从epoll-et输出的日志看,EPOLLOUT事件得到了正确的处理
*/
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
... |
#include "HttpResponseDecoder.h"
#include "SoPluginLog.h"
#ifdef WIN32
#define snprintf _snprintf
#ifndef strncasecmp
#define strncasecmp strnicmp
#endif
#endif
static void toLower(char *pStr)
{
while ((*pStr) != '\0')
{
if ((*pStr)>='A' && (*pStr)<='Z')
{
*pStr += 32;
}
pStr++... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2018 ArangoDB GmbH, Cologne, Germany
///
/// 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... |
// first_order_ode.cpp: program to compare different numerical solvers
//
// Copyright (C) 2017-2020 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.
#define _USE_MATH_DEFINES
#include <cmath>
// Configure the posit library wit... |
#include <graphics.h>
#include <stdio.h>
#include <time.h>
int width = 1350;
int height = 900;
int radius = 25;
int h = 30;
struct Node { ///first, build a structure to have different types of data types bundled together and named it as Node
int data; /// here we define a data variable of int type and... |
#include "Git.h"
#include <QProcess>
#include <QTextStream>
#include <QVector>
#include <QDir>
#include <git2.h>
#include <QDebug>
#include <git/GitFile.h>
#include "defer.h"
// https://libgit2.github.com/docs/guides/101-samples/
struct GitPrivate: public LoggerI<GitPrivate> {
git_repository *repo;
const QStr... |
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2011 RDK Management
*
* 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.