text string | size int64 | token_count int64 |
|---|---|---|
#include <bts/mail/message.hpp>
#include <fc/crypto/aes.hpp>
namespace bts { namespace mail {
const message_type signed_email_message::type = email;
const message_type transaction_notice_message::type = transaction_notice;
digest_type email_message::digest()const
{
fc::sha256::encoder enc;
... | 1,626 | 557 |
// Copyright (c) 2021 by Apex.AI 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 ap... | 6,556 | 2,347 |
#include "client.h"
#include <iostream>
namespace bb = boost::beast; // alias to make things easier to read
Client::Client() : host_("0.0.0.0"), port_("80"), resolver_(ioc_), stream_(ioc_)
{
std::cout << "[HTTP CLIENT]\n... constructed" << std::endl;
}
Client* Client::Instance()
{
// c++11 will only run thi... | 2,672 | 917 |
#include "SubValueProperty.h"
#include "ValueProperty.h"
using namespace DAVA;
SubValueProperty::SubValueProperty(int32 anIndex, const DAVA::String& propName)
: AbstractProperty()
, index(anIndex)
, name(propName)
{
}
SubValueProperty::~SubValueProperty()
{
}
uint32 SubValueProperty::GetCount() const
{... | 1,623 | 507 |
/*
Copyright (c) 2018 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "runtime/alloc.h"
#include "runtime/debug.h"
#include "runtime/thread.h"
#include "runtime/object.h"
#include "runtime/io.h"
#include "runtime/stac... | 900 | 282 |
/* Copyright (c) 2006-2021, Universities Space Research Association (USRA).
* 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
... | 3,528 | 1,131 |
#include <iostream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#include <dos.h>
using namespace std;
string y;
string password;
string master;
string user;
string input;
int main()
{
cout << "Welcome please log in" << endl;
cout << "Username: " << endl;
cin >> input;
if (input ... | 5,839 | 2,908 |
#include "mlir/mhlo/builder/gru_cell.h"
#include "mlir/mhlo/builder/activation.h"
#include "mlir/mhlo/builder/constant.h"
#include "mlir/mhlo/builder/element_wise_binary.h"
#include "mlir/mhlo/builder/slice.h"
namespace mlir {
namespace mhlo {
/*
The BuildGRUCell builds the following computation graph:
```
def gru_c... | 5,392 | 2,254 |
/*
* Copyright (C) 2009 Google 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 condit... | 3,345 | 1,192 |
#include <torch/csrc/jit/passes/utils/op_registry.h>
// Location for Commonly Used Shape registries
namespace torch {
namespace jit {
// Requirements:
// dims : preserved from the first argument
// scalar type : preserved from the first argument (doesn't have to
// match other arg... | 5,605 | 1,826 |
/**********************************************************************************************
Copyright (c) 2015 DisplayModule. All rights reserved.
Redistribution and use of this source code, part of this source code or any compiled binary
based on this source code is permitted as long as the above copyright not... | 6,240 | 2,609 |
#include "FrameworkPCH.h"
GameCore::GameCore(Framework* pFramework, EventManager* pEventManager)
{
m_pFramework = pFramework;
m_pEventManager = pEventManager;
}
GameCore::~GameCore()
{
delete m_pEventManager;
}
| 225 | 79 |
#include "./dart_api/dart_api.h"
#include "LabSound/LabSound.h"
#include "KeepNode.cpp"
#include "struct.h"
using namespace lab;
DART_EXPORT int createPannerNode(AudioContext* context) {
auto node = std::make_shared<PannerNode>(*context);
return keepNode(node);
}
DART_EXPORT int PannerNode_panningModel(int no... | 6,610 | 2,342 |
// Copyright 2019 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 "ui/ozone/platform/wayland/host/shell_object_factory.h"
#include "base/logging.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"... | 2,913 | 959 |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/permissions/permission_actions_history.h"
#include <vector>
#include "base/containers/adapters.h"
#include "base/optional.h"
#in... | 9,253 | 2,865 |
#include <stdio.h>
#include <windows.h>
#include <string>
#include <wincrypt.h>
#include <bcrypt.h>
#include "detours/detours.h"
#include <tchar.h>
#include "ransomwaremonitor.h"
#pragma comment (lib, "advapi32")
#pragma comment (lib, "user32")
#pragma comment (lib, "detours/detours")
#pragma comment (lib, "bcrypt.lib... | 19,678 | 9,339 |
#ifndef PRIME_HPP
#define PRIME_HPP
double cpu_time ( );
int prime_number ( int n );
void timestamp ( );
#endif
| 113 | 46 |
#pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
// USB device controller
namespace UsbIntst{ ///<OTG Interrupt Status
using Addr = Register::Address<0x2008c100,0x00000000,0x00000000,unsigned>;
///Timer time-out.
constexpr Register::FieldLocation<Addr,Register::maskFromRa... | 244,938 | 75,362 |
// Copyright 2018 The Fuchsia 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 "src/developer/memory/monitor/monitor.h"
#include <errno.h>
#include <fcntl.h>
#include <lib/async/cpp/task.h>
#include <lib/async/cpp/time.h>
#i... | 21,943 | 7,578 |
#include "command.class.h"
#include "facebookApi.class.h"
#include "../include/common.h"
using namespace std;
Command::Command(){
// Imposto di defaul che l'id dell'utente che ha in uso la sessione è 0
nUserId = 0;
// Creo il vettore con la lista di comandi ammessi
this->aCommandList.push_back("/start");
this->... | 2,409 | 857 |
/*
==============================================================================
PhaseVocodeur.cpp
Created: 9 Dec 2020 9:19:32pm
Author: Julian Vanasse
By `push`ing into this class, the input is distributed among overlapping buffers,
this permits a frequency-domain processing and reconstruct... | 10,313 | 3,790 |
// By --------- Alauddin -----------
#include<stdio.h>
#include<iostream>
#include<time.h>
#include<BigInt_Al.h>
/*===========================MAIN=============================*/
#define Size 1000
void main()
{
int i;
char bignum[1010]="";
BigInt N;
for(i=0;i<1000;i++)
bignum[i]='9';
cout<<"sizeof(BigInt_Al)=... | 905 | 414 |
//===- inst_simplify.cc ---------------------------------------------------===//
//
// Copyright (C) 2019-2020 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 ... | 71,965 | 26,137 |
#ifndef RANDOM_AGENT_H
#define RANDOM_AGENT_H
#include <random>
#include "bboard.hpp"
#include "strategy.hpp"
namespace agents
{
/**
* Use this as an example to implement more sophisticated
* agents.
*
* @brief Randomly selects actions
*/
struct RandomAgent : bboard::Agent
{
std::mt19937_64 rng;
std::u... | 2,131 | 719 |
//
// pragma.hpp
// SimpleDB
//
// Created by lifeng on 2019/6/5.
// Copyright © 2019 feng. All rights reserved.
//
#ifndef pragma_hpp
#define pragma_hpp
#include "declare.hpp"
#include "describable.hpp"
namespace SDB {
class Pragma : public Describable {
public:
static const Pragma applicat... | 3,914 | 1,058 |
// Jopnal Engine C++ Library
// Copyright (c) 2016 Team Jopnal
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any pur... | 9,465 | 2,365 |
#include "onewire.h"
#include "hardware_defs.h"
OneWire::OneWire(GPIO_Basic *gpio){
this->gpio = gpio;
reset_search();
}
// Perform the onewire reset function. We will wait up to 250uS for
// the bus to come high, if it doesn't then it is broken or shorted
// and we return a 0;
//
// Returns 1 if a device asserte... | 7,498 | 3,098 |
// Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and
// other Axom Project Developers. See the top-level LICENSE file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
#ifndef MINT_MESH_HPP_
#define MINT_MESH_HPP_
#include "axom/core/Macros.hpp" // for Axom macros
#include "axom/mint/m... | 34,828 | 10,681 |
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* 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... | 12,100 | 4,453 |
/***************************************************************
*
* Copyright (C) 2009-2011 Red Hat, 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.or... | 3,690 | 1,231 |
#include <string>
#include <iostream>
#include "format.h"
using std::string;
using std::to_string;
using std::cout;
// INPUT: Long int measuring seconds
// OUTPUT: HH:MM:SS
string Format::ElapsedTime(long elapsedTime) {
long hours = elapsedTime / 3600;
float mins = ((elapsedTime / 3600.0) - hours) * 60;
... | 646 | 230 |
/*
* (C) Copyright 2013 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergo... | 2,200 | 1,586 |
// Generated wrapper code for package Adaptor2d
#include "OcctPCH.h"
#include "Adaptor2d.h"
using namespace System::Runtime::InteropServices; // for class Marshal
#include "Adaptor2d.h"
#include "Geom2dAdaptor.h"
#include "ProjLib.h"
#include "BRepAdaptor.h"
#include "Standard.h"
#include "GeomAbs.h"
#i... | 34,893 | 16,665 |
/***********************************************************************
created: 28/5/2011
author: Martin Preisler
purpose: Implements platform independent clipboard handling
*************************************************************************/
/*********************************************... | 5,782 | 1,620 |
// Copyright 2018 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 "diagnostics/dpsl/internal/dpsl_thread_context_impl.h"
#include <utility>
#include <base/lazy_instance.h>
#include <base/location.h>
#includ... | 3,536 | 1,105 |
#pragma once
#ifndef DISH2_PERIPHERAL_READABLE_STATE_INTROSPECTIVE_STATE_RESOURCESTOCKPILE_HPP_INCLUDE
#define DISH2_PERIPHERAL_READABLE_STATE_INTROSPECTIVE_STATE_RESOURCESTOCKPILE_HPP_INCLUDE
#include "../../../../../third-party/conduit/include/uitsl/datastructs/PodLeafNode.hpp"
#include "../../../../../third-party/c... | 761 | 312 |
/*
Name: stdafx
Copyright: Copyright (C) 2003-2017 SIL International.
Documentation:
Description:
Create Date: 28 Jun 2011
Modified Date: 28 Jun 2011
Authors: mcdurdin
Related Files:
Dependencies:
Bugs:
Todo:
Note... | 704 | 237 |
#include "DarkTemplarRush.h"
#include "..\..\UnitUtil.h"
using UAlbertaBot::MetaPairVector;
using UAlbertaBot::MetaPair;
using UAlbertaBot::UnitUtil::GetAllUnitCount;
AKBot::DarkTemplarRush::DarkTemplarRush(BWAPI::Player self)
: _self(self)
{
}
void AKBot::DarkTemplarRush::getBuildOrderGoal(MetaPairVector& goal, in... | 833 | 353 |
#pragma once
#include <toy_compiler/munster/ast/op/op.hpp>
namespace munster::ast
{
class assign_op : public op
{
public:
using ptr = std::unique_ptr<assign_op>;
public:
assign_op(node_ptr val_0, node_ptr id_decl, node_ptr val_1);
void accept(visitor_variant &visitor) const override;
... | 422 | 149 |
/**************************************************************************
*
* Copyright (c) 2002 - 2011 by Computer Architecture Department,
* Universitat Politecnica de Catalunya.
* All rights reserved.
*
* The contents of this file may not b;e disclosed to third parties,
* copied or duplicated in any form, i... | 3,886 | 1,553 |
#include "printer.hpp"
#ifndef RANGE_HPP
#define RANGE_HPP
struct range {
int start;
int stop;
int stride;
range(int start, int stop) : start(start), stop(stop), stride(1) {}
range(int start, int stop, int stride) : start(start), stop(stop), stride(stride) {}
struct iterator;
iterator ... | 1,504 | 440 |
#pragma once
#include "Injector/Defines.hpp"
#include "Injector/ECS/EcsManager.hpp"
#include "Injector/Mathematics/Matrix4.hpp"
#include "Injector/Graphics/GraphicsAPI.hpp"
#include <chrono>
namespace Injector
{
class Engine final
{
private:
static bool engineInitialized;
static bool networkInitialized;
sta... | 3,214 | 1,030 |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: shader for drawing sprites as cards, with animation frame lerping
//
// $Header: $
// $NoKeywords: $
//===========================================================================//
#include "BaseVSShader.h"
#include "convar.h"... | 17,049 | 7,944 |
#include <xtd/forms/native/tab_page.hpp>
#include "fl_tab_page.hpp"
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms::native;
| 156 | 59 |
#include <iostream>
#include <functional>
#include <vector>
#include <map>
#include <string>
#include <utility>
#include "Event.h"
#include "EventListener.h"
using namespace std;
class Foo
{
public:
Foo() {}
Event<int> event;
void setValue(int i)
{
value = i;
... | 1,039 | 348 |
#include <stdlib.h>
#include <exception>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "DetectorDescription/Core/interface/DDExpandedNode.h"
#include "DetectorDescription/Core/interface/DDExpandedView.h"
#include "Detec... | 21,189 | 7,406 |
//===- LowerUniformRealMath.cpp ------------------------------------------===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.... | 15,051 | 4,243 |
/* ------------------------------------------------------------------
* Copyright (C) 1998-2009 PacketVideo
*
* 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.o... | 30,144 | 18,286 |
#include <opengl/buffer.hpp>
#include <fstream>
#include <glad/glad.h>
#include <opengl/check-error.hpp>
constexpr int usageToGlUsage(Buffer::Usage usage) {
switch(usage) {
case Buffer::StreamDraw: return GL_STREAM_DRAW;
case Buffer::StreamRead: return GL_STREAM_READ;
case Buffer::StreamCop... | 2,821 | 975 |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... | 17,910 | 6,841 |
/* ========================= 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
*
* ... | 4,168 | 1,295 |
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Project: tiler
// File: PrintUtils.cpp
// Authors: Ofer Dekel
//
////////////////////////////////////////////////////////////////////////////////////////////////////
#include "PrintUtils.h"
namespace t... | 826 | 235 |
//#ifdef _DEBUG
//#include "../../../library/src/debug_template.hpp"
//#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
//#else
//#define DMP(...) ((void)0)
//#endif
//
//#include <cassert>
//#include <cstdio>
//#include <cmath>
//#include <iostream>
//#include <iomanip>
//#include <vector>
//#include <set>
//#include ... | 3,198 | 1,389 |
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using Pii = pair<int, int>;
using Pll = pair<LL, LL>;
using VI = vector<int>;
using VP = vector<pair<int, int>>;
#define rep(i, a, b) for (auto i = (a); i < (b); ++i)
#define rev(i, a, b) for (auto i = (b - 1); i >= (a); --i)
#define grep(i, u) for (au... | 1,778 | 882 |
#include "fbx_lod_group_loader.hpp"
#include <utils/f_typedefs.hpp>
namespace fengine
{
float FbxLodGroupLoader::RetrieveThreshold(int index) const
{
FbxDistance threshold;
auto result = this->GetThreshold(index, threshold);
return result ? threshold.value() : FLT_MAX;
}
}
| 284 | 109 |
#include <QmlNet/types/NetReference.h>
#include <QmlNet/types/NetTypeArrayFacade.h>
#include <QmlNet/qml/NetVariant.h>
#include <QmlNet/qml/NetValue.h>
#include <QmlNet/qml/NetJsValue.h>
#include <QmlNet/qml/NetQObject.h>
#include <QmlNetUtilities.h>
#include <QDateTime>
#include <QDebug>
#include <QJSEngine>
#include ... | 32,104 | 10,715 |
/*
Copyright (c) 2010 David Anderson.
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 t... | 6,420 | 2,107 |
//
// Polynomial.cpp
// cpp_Midterm2
//
// Created by Nguyen Le Khanh Ngoc on 11/11/2020.
// Copyright © 2020 Nguyen Le Khanh Ngoc. All rights reserved.
//
#include "Polynomial.h"
#include <string> //string type
#include <string.h>
#include <vector> //vector
#include <ctype.h> //isalpha... | 4,385 | 1,499 |
#include "../common/d2.hpp"
#include "../learn/wm3.hpp"
#include <string>
#include <sstream>
#include <time.h>
int main(int argc, char** argv) {
using namespace d2;
server::Init(argc, argv);
size_t len = 864, size=400;
Block<Elem<def::Histogram, 0> > data (size, len);
std::string filename("data/orl/orl.... | 958 | 454 |
#include <cassert>
#include <sodium/randombytes.h>
#include <libff/common/utils.hpp>
namespace libiop {
template<typename T>
std::vector<T> all_subset_sums(const std::vector<T> &basis, const T& shift)
{
const size_t m = basis.size();
std::vector<T> result;
/* as we are I/O-bound here, reserve + emplace_b... | 4,730 | 1,711 |
#include "../.././Core/Container/Buffer/BfAcc2Iter.hh"
| 57 | 26 |
#pragma once
#include <input/Input.hh>
#include <input/common/iCade.hh>
struct ICadeHelper
{
UIView *mainView, *dummyInputView;
uint active, cycleResponder;
void init(UIView *mainView)
{
if(!dummyInputView)
{
logMsg("init iCade helper");
dummyInputView = [[UIView alloc] initWithFrame:CGRectZero];
va... | 1,329 | 540 |
//
// JsonDocument.cpp
// JSON
//
// Created by Iulian on 13.03.2013.
//
#include "JsonDocument.hpp"
#define SHOW_LIST( list ) for (auto iteratorBeing=list.begin(); iteratorBeing != list.end(); iteratorBeing++) {\
std::cout<<(*iteratorBeing)<<std::endl;}
#define SHOW_LIST_POINT( list ) for (auto iteratorBeing=lis... | 15,878 | 4,538 |
#include "Client.h"
#include <string>
#include <ostream>
using namespace std;
Client::Client(string id, string nom, string prenom, int nbReservations){
_id = id;
_nom = nom;
_prenom = prenom;
_nbReservations = nbReservations;
}
string Client::getId() const{
return _id;
}
string Client::getNom() c... | 1,063 | 396 |
/*/////////////////////////////////////////////////////////////////////////////////
/// An
/// ___ ____ ___ _____ ___ ____
/// / _ \ / ___|_ _|_ _/ _ \| _ \
/// | | | | | _ | | | || | | | |_) |
/// | |_| | |_| || | | || |_| | _ <
/// \___/ \____|___| |_| \___/|_| \_\
/// ... | 16,706 | 5,260 |
#include "common.h"
HMENU hMenuMain;
HMENU hMenuTray;
HMENU hMenuPlayListPop;
ConfigReference BP_ConfigReference;
CurrentFileInfomation BP_CurrentInfomation;
MainWindowInfomation BP_MainWindowInfomation;
ClassInfoTrackbar BP_tris, BP_trie;
SkinConfiguration SkinConfig;
publicInfo BP_PublicInfo;
HICON hIcon_Tray;
HICO... | 472 | 203 |
//@file update.cpp
/**
* Copyright (C) 2008 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope th... | 21,927 | 5,567 |
/****************************************************************************
*
* Copyright 2018 Samsung Electronics 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... | 2,806 | 987 |
// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
// SPDX-License-Identifier: MIT
#include <TestFramework.h>
#include <Tests/General/IslandTest.h>
#include <Physics/Collision/Shape/BoxShape.h>
#include <Physics/Body/BodyCreationSettings.h>
#include <Layers.h>
JPH_IMPLEMENT_RTTI_VIRTUAL(IslandTest)
{
JPH_ADD_BASE_CLASS... | 904 | 434 |
#include <gtest/gtest.h>
#include <defer.hpp>
TEST(DEFER_TEST,BAST_TEST)
{
bool flag = false;
{
defer_scope [&flag]
{
flag = true;
};
}
EXPECT_TRUE(flag);
flag = false;
{
defer_scope [&flag]
{
flag = true;
};
}
... | 465 | 176 |
#include <iostream>
#include <vector>
#include <stack>
using namespace std;
std::vector<vector<int>> vec;
std::vector<bool> visited;
void dfs_r(int s){
int i;
visited[s] = true;
cout << "\nVisited: "<< s;
for(i=0; i < vec[s].size(); ++i ){
if (visited[vec[s][i]] == false )
... | 1,748 | 706 |
#include "nn_acc/CombWrite.hh"
#include "debug/CombWrite.hh"
CombWrite::CombWrite(CombWriteParams *params) :
CombBase(params),
n_of_iterations(params->data.size()),
_writeEvent([this]{ writeData(); }, name() + ".event")
{
for (int i = 0; i < params->data.size(); i++) {
_writeDataVector.push_b... | 897 | 372 |
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/browser_about_handler.h"
#include <algorithm>
#include <string>
#include <vector>
#include "base/callback.h"
#include "base... | 48,770 | 15,857 |
/*
* Copyright (C) 2007 Vitor Sessak <vitor1001@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg 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... | 13,359 | 4,932 |
#pragma once
#include <vector>
#include <string>
// like `trait`
struct
MagicItem {
virtual void has_enough_mana(const char* spellname) const noexcept = 0;
/// \note same for all types
// @gen(inject_to_all)
//S interface_data;
};
template<typename T1>
struct
ParentTemplated_1 {
virtual void has_P1(T1 nam... | 685 | 261 |
#include "sdlxx/core/blendmode.h"
#include <SDL_blendmode.h>
#include "sdlxx/utils/bitmask.h"
using namespace sdlxx;
#define ASSERT_BLENDMODE(x) \
static_assert(static_cast<SDL_BlendMode>(BlendMode::x) == SDL_BLENDMODE_##x);
ASSERT_BLENDMODE(NONE);
ASSERT_BLENDMODE(BLEND);
ASSERT_BLENDMODE(ADD);
ASSERT_BLENDMODE... | 1,891 | 774 |
#include "expression.hpp"
#include "comparison.hpp"
bool operator==(const Constant& c1, const Constant& c2)
{
return c1.name == c2.name;
}
bool operator==(const Value& v1, const Value& v2)
{
return v1.value == v2.value;
}
bool operator==(const Variable& v1, const Variable& v2)
{
return v1.name == v2.nam... | 813 | 322 |
//@group Misc/impl
#include "../DgBinaryReader.h"
namespace Dg
{
BinaryReader::BinaryReader(EndianConverter const a_ec)
: BinaryIO(a_ec)
{
}
BinaryReader::BinaryReader(Stream * a_pStream, EndianConverter const a_ec)
: BinaryIO(a_ec)
{
Open(a_pStream);
}
BinaryReader::~BinaryReader()
{
... | 1,465 | 551 |
#pragma once
#ifndef DISH2_DEBUG_LOGSTACKFRAME_HPP_INCLUDE
#define DISH2_DEBUG_LOGSTACKFRAME_HPP_INCLUDE
#include <string>
namespace dish2 {
struct LogStackFrame {
std::string name;
std::string detail;
LogStackFrame() = default;
LogStackFrame( const std::string& name_, const std::string& detail_="" )
: ... | 441 | 178 |
#ifndef EXPRAST_H
#define EXPRAST_H
#include <memory>
#include <string>
#include <vector>
#include "llvm/IR/Value.h"
#include "../code_gen_context.hpp"
/// ExprAST - Base class for all expression nodes.
class ExprAST
{
public:
virtual ~ExprAST() = default;
virtual llvm::Value *codegen(CodeGenContext &) =... | 334 | 129 |
// -*- C++ -*-
//
// ======================================================================
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University at Buffalo
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://... | 1,491 | 487 |
#include "airplane.h"
#include "main.h"
Airplane::Airplane(float xs, float ys, float zs, color_t color) {
this->position = glm::vec3(xs, ys, 0);
this->rotation_x = 0;
this->rotation_z = 0;
this->rotation_y = 0;
this->fuel = 1000;
this->orc[0][0] = 1;
this->orc[0][1] = 0;
this->orc[0][2... | 12,719 | 6,391 |
#pragma once
#include <concepts>
#include <cstddef>
#include <type_traits>
#include <utility>
namespace opt {
// clang-format off
template <class T, class U = T, class R = T>
concept Addable =
requires (T a, U b) { { a + b } -> std::same_as<R>; };
template <class T, class U = T, class R = T>
concept Subtractible ... | 3,524 | 1,394 |
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2020 Metrological
*
* 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 ... | 3,316 | 923 |
/**
* @Copyright 2015 seancode
*
* Reads the header of a world file, as well as the json that defines it.
*/
#include "./worldheader.h"
#include <QFile>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QDebug>
#include <utility>
WorldHeader::WorldHeader() = default;
WorldHeader::~W... | 5,732 | 1,825 |
#include "stdafx.h"
#include "SoundComponent.h"
bool SoundComponent::isSame(sf::SoundBuffer& buffer) {
return &buffer == this->sound->getBuffer();
}
bool SoundComponent::Loaded() {
return this->sound != NULL;
}
#pragma region Play, Pause, Stop
SoundComponent* SoundComponent::play() {
if (this->sound == NULL)
r... | 2,154 | 731 |
#pragma once
#include "CreditsView.hpp"
#include "GameScene.hpp"
#include "MenuSceneView.hpp"
namespace HiLo {
class Game
: public Observer<MenuSceneView>
, public Observer<GameScene>
, public Observer<CreditsView> {
public:
auto receiveEvent(MenuSceneView*, MenuSceneView::Event const&) noexcept
... | 877 | 270 |
#include "run_test_files.hpp"
#include "log_pipe.hpp"
#ifndef _WIN32
# include "posix/run_test_file.hpp"
namespace platform = mettle::posix;
#else
# include "windows/run_test_file.hpp"
namespace platform = mettle::windows;
#endif
namespace mettle {
void run_test_files(
const std::vector<test_command> &comma... | 1,044 | 353 |
/*
//@HEADER
// *****************************************************************************
//
// test_termination_action_callable.extended.cc
// DARMA/vt => Virtual Transport
//
// Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC
// (NTESS). Under t... | 3,989 | 1,334 |
#include "map.h"
#include "utilities.h"
void build_unique_pentamers(DNA_to_properties& pentamers){
std::string alphabet[4]={"A","T","G","C"};
pentamers.clear();
std::string t="";
for (int i=0;i<4;i++)
for (int j=0;j<4;j++)
for (int k=0;k<4;k++)
for (int l=0;l<4;l++)
for (int m=0;m<4;m++){
t=... | 745 | 331 |
/*
KeyPad.cpp - Driver for a 4x4 keypad used for RPN calculator.
Copyright (c) 2021 Igor Mikolic-Torreira
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, ... | 4,863 | 1,767 |
// Copyright 2019 Google LLC
//
// 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... | 5,152 | 1,708 |
/*=============================================================================
NiftyLink: A software library to facilitate communication over OpenIGTLink.
Copyright (c) University College London (UCL). All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty ... | 6,932 | 2,283 |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2015, John Haddon. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributio... | 11,583 | 4,082 |
}
}
}
#endif
| 18 | 16 |
/* $id$ */
#include <windows.h>
#include <stdio.h>
#include <iostream>
using namespace std;
#define Size 8192
LPVOID Address;
volatile unsigned long counter;
DWORD __stdcall threadFunc(void *) {
fprintf(stderr, "Thread start \n");
getc(stdin);
return 0;
}
LONG MemoryExceptionFilter(_EXCEPTION_POINTERS *... | 1,507 | 623 |
// Copyright (c) 2021 The Orbit 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 "MetricsUploader/CaptureMetric.h"
#include <chrono>
#include <cstdint>
#include <filesystem>
#include "OrbitBase/File.h"
#include "OrbitBase/L... | 3,940 | 1,358 |
/**
* @file /kobuki_core/include/kobuki_core/modules/sound.hpp
*
* @brief Flags and id's for commanding sound sequences.
*
* License: BSD
* https://raw.githubusercontent.com/kobuki-base/kobuki_core/license/LICENSE
**/
/*****************************************************************************
** Ifdefs
****... | 1,354 | 380 |
/*!
\file grasp/run_trials.hh
\brief Performs grasp trials
Run full dynamic simulated grasp trials in Gazebo
\author João Borrego : jsbruglie
*/
#ifndef _RUN_TRIALS_HH_
#define _RUN_TRIALS_HH_
// Gazebo
#include <gazebo/gazebo_client.hh>
#include <gazebo/gazebo_config.h>
#include <gazebo/transport/t... | 8,282 | 2,490 |
#include <libwidget/Application.h>
#include <libwidget/Widgets.h>
int main(int argc, char **argv)
{
if (argc == 1)
return -1;
if (application_initialize(argc, argv) != SUCCESS)
return -1;
Window *window = new Window(WINDOW_RESIZABLE);
window->icon(Icon::get("image"));
window->tit... | 504 | 183 |