text string | size int64 | token_count int64 |
|---|---|---|
/*
* Copyright 2019 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 w... | 2,676 | 862 |
/*
* BSD License
*
* Copyright (c) Lydia Zoghbi 2019
*
* Permission is hereby granted, free of charge, to any person or organization
* obtaining a copy of the software and accompanying documentation covered by
* this license (the "Software") to use, reproduce, display, distribute,
* execute, and transmit the So... | 2,771 | 965 |
/*
* 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... | 5,163 | 1,768 |
#include "plane.hh"
namespace geometry {
bool Plane::intersect(const Line& line, Out<Vec3> point) const {
constexpr double EPS = 1e-7;
if (line.direction.cross(normal).norm() < EPS) {
// Parallel
return false;
}
const double d = (origin - line.point).dot(normal) / (line.direction.dot(normal));
*po... | 826 | 297 |
// This file has been generated by Py++.
#ifndef RecordCameraPathHandler_hpp__pyplusplus_wrapper
#define RecordCameraPathHandler_hpp__pyplusplus_wrapper
void register_RecordCameraPathHandler_class();
#endif//RecordCameraPathHandler_hpp__pyplusplus_wrapper
| 259 | 74 |
#include "radio.hpp"
namespace radio {
DEFINE_FLOAT64(kRadioParamModule, timeout, 0.25,
"Timeout after which radio will assume a robot is disconnected. Seconds.");
Radio::Radio()
: Node{"radio", rclcpp::NodeOptions{}
.automatically_declare_parameters_from_overrides(true)
... | 2,918 | 963 |
/**********************************************************************
* Copyright (c) 2008-2014, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publishe... | 14,278 | 4,387 |
// File Automatically generated by eLiSe
#include "StdAfx.h"
#include "cEqAppui_NoDist__PProjInc_M2CFour11x2.h"
cEqAppui_NoDist__PProjInc_M2CFour11x2::cEqAppui_NoDist__PProjInc_M2CFour11x2():
cElCompiledFonc(2)
{
AddIntRef (cIncIntervale("Intr",0,16));
AddIntRef (cIncIntervale("Orient",16,22));
AddIntRef... | 19,068 | 9,851 |
////////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Config/GeneratorConfiguration.h"
#include "Items/StructSpecificCode.h"
#include "Items/StructDescription.h"
#include "Generator/StructHelperGenerator.h"
using namespace std;
using namespace dxcodegen::Config... | 5,488 | 1,533 |
/*
In recreational number theory, a narcissistic number is also known
as a pluperfect digital invariant (PPDI), an Armstrong number or a
plus perfect number is a number that is the sum of its digits
each raised to the power of the number of digits.
*/
#include <bits/stdc++.h>
using namespace std;
// Function to check... | 1,165 | 423 |
//
// file: package.cpp
// author: Michael Brockus
// gmail: <michaelbrockus@gmail.com>
//
#include "hackazon/package.hpp"
//
// Should return a greeting message as it’s initial value
//
// Param list:
// -> There is none to speak of at this time.
//
const char *hak::greet(void)
{
return "Hello, C++ Developer.";
}... | 347 | 122 |
/**
* @file binaryBuffer.hpp
* @data 21 september, 2017
*
* \class BinaryBuffer
*
* \brief Buffer between sensor and SPI SD write
*
* This class holds a finite amount of data and acts
* as a FiFo.
*/
#pragma once
#include <vector>
#include "SystemVariables.hpp"
#include "esp_log.h"
class BinaryBuffer... | 1,680 | 594 |
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "../src/Graph.h"
#include "../src/Person.h"
using namespace std;
using testing::Eq;
void createNetwork(Graph<Person> & net1)
{
Person p1("Ana",19);
Person p2("Carlos",33);
Person p3("Filipe", 20);
Person p4("Ines", 18);
Person p5("Maria",... | 6,589 | 3,049 |
#include "ionspaymentprocessor.h"
#include <QString>
#include <iostream>
IONSPaymentProcessor::IONSPaymentProcessor(BitcoinGUI * gui, QObject * parent)
: QObject(parent), gui(gui)
{
}
void IONSPaymentProcessor::pay(QString address, QString fee)
{
QString uri("chameleon:" + address + "?amount=" + fee);
gui... | 496 | 182 |
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... | 4,209 | 1,391 |
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <set>
using namespace std;
class Class
{
public:
virtual int func1()
{
return 0;
}
virtual int func2()
{
return 1;
}
int var1;
float var2;
};
class Der : public Class
{
public:
int func1()
{
return ... | 1,567 | 833 |
// Copyright (c) 2018 Microsoft Corporation
// Licensed under the MIT license.
// Author: Paul Koch <code@koch.ninja>
#ifndef TREE_SWEEP_HPP
#define TREE_SWEEP_HPP
#include <type_traits> // std::is_standard_layout
#include <stddef.h> // size_t, ptrdiff_t
#include "ebm_native.h"
#include "logging.h"
#include "zones.h... | 5,215 | 1,773 |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <proxygen/lib/http/codec/compress/HPACKEncoderBase.h>
namespace proxygen {
uint32_t HPAC... | 863 | 272 |
#include "modules/twinkle.h"
// Background color for 'unlit' pixels
// Can be set to CRGB::Black if desired.
CRGB gBackgroundColor = CRGB::Black;
// Example of dim incandescent fairy light background color
// CRGB gBackgroundColor = CRGB(CRGB::FairyLight).nscale8_video(16);
// Add or remove palette names from this ... | 5,104 | 2,072 |
#include "browser.hpp"
#include <cstdlib>
#include <string>
#include "../util/range.hpp"
#include "config/config.hpp"
#ifdef ELONA_OS_WINDOWS
#include <windows.h>
#endif
using namespace std::literals::string_literals;
namespace
{
bool _is_trusted_url(const char* url)
{
const char* trusted_urls[] = {
"... | 1,574 | 597 |
#include "irods/rsDataObjLseek.hpp"
#include "irods/dataObjLseek.h"
#include "irods/rodsLog.h"
#include "irods/rsGlobalExtern.hpp"
#include "irods/rcGlobalExtern.h"
#include "irods/subStructFileLseek.h"
#include "irods/objMetaOpr.hpp"
#include "irods/subStructFileUnlink.h"
#include "irods/rsSubStructFileLseek.hpp"
#in... | 3,856 | 1,500 |
/*++
Copyright (C) Microsoft Corporation, 1991 - 1999
Module Name:
secclnt.hxx
Abstract:
This file contains an abstraction to the security support for clients
and that which is common to both servers and clients.
Author:
Michael Montague (mikemon) 10-Apr-1992
Revision History:
... | 11,439 | 3,822 |
/*
* Copyright (C) 2015 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... | 6,192 | 2,006 |
// Copyright (c) 2019 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... | 3,457 | 1,263 |
// Font generated by stb_font_inl_generator.c (4/1 bpp)
//
// Following instructions show how to use the only included font, whatever it is, in
// a generic way so you can replace it with any other font by changing the include.
// To use multiple fonts, replace STB_SOMEFONT_* below with STB_FONT_consolas_bold_35_us... | 47,529 | 32,492 |
#pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI 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 Licen... | 13,988 | 4,787 |
/**********************************************************
Author: Qt君
微信公众号: Qt君(首发)
QQ群: 732271126
Email: 2088201923@qq.com
LICENSE: MIT
**********************************************************/
#include "Keyboard.h"
#include <QApplication>
#include <QLineEdit>
using namespace AeaQt;
int main(int argc, char *a... | 597 | 220 |
/*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* 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... | 7,100 | 2,326 |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | 4,009 | 1,416 |
//
// Windows Server (Printing) Driver Development Kit Samples.
//
//
// Copyright (c) 1990 - 2005 Microsoft Corporation.
// All Rights Reserved.
//
//
// This source code is intended only as a supplement to Microsoft
// Development Tools and/or on-line documentation. See these other
// materials for detailed in... | 4,625 | 1,323 |
// This file is distributed under the BSD 3-Clause License. See LICENSE for details.
#pragma once
#include "fmt/format.h"
#include "lnast_ntype.hpp"
#include "upass_core.hpp"
struct uPass_verifier : public upass::uPass {
public:
using uPass::uPass;
// Assignment
// void process_assign() override { check_binar... | 3,020 | 1,034 |
#include "RegisterServer.h"
RegisterServer::RegisterServer(int port)
{
int sockFd= CreateServerSocket(port);
CreateEpollSocket(sockFd);
watchEvent = &SocketWatcher::StartServerWatcher;
printf("Register Server\n");
}
RegisterServer::RegisterServer(char* ipAddr,int port)
{
int sockFd = CreateClientS... | 2,268 | 813 |
/*
移行 Note:
map を各 GraphicsResource から CommandBuffer へ移動する。
※ ネイティブの map (transfar) は RenderPass の外側でなければ使えないので、順序制御するため CommandBuffer に統合したい
CommandBuffer と RenderPass は全て pool からインスタンスを得る。インスタンスを外側で保持し続けてはならない。
*/
#include "Internal.hpp"
#include <LuminoEngine/Graphics/Texture.hpp>
#include <LuminoEngine/Gra... | 7,388 | 2,945 |
// Date : 2019-03-26
// Author : Rahul Sharma
// Problem : http://codeforces.com/contest/6/problem/B
#include <iostream>
#include <string>
int main() {
using namespace std;
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
char p;
cin >> p;
char d[128] = {}... | 1,108 | 470 |
//
// Copyright 2017 Animal Logic
//
// 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... | 86,244 | 26,107 |
// #ifndef __NDTDLWORKER_H__
// #define __NDTDLWORKER_H__
// #include <omp.h>
// #include <cmath>
// #include <string>
// #include <vector>
// #include <rts/core/pt.hpp>
// #include <rts/op/exp.hpp>
// #include "ndt_kernel.hpp"
// #include "sched_log.hpp"
// #include "sched_core.hpp"
// #include "sched_deadline.hpp"
//... | 744 | 320 |
//https://codeforces.com/problemset/problem/339/A
#include<bits/stdc++.h>
using namespace std ;
#define aakriti string
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
aakriti s ;
int a ;
cin >> s ;
sort(s.begin(), s.end());
vector<char>v;
for(int i = 0; i < s.size(... | 532 | 236 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "std.hxx"
#include "_bt.hxx"
#include "_dump.hxx"
#include "_space.hxx"
#include "stat.hxx"
LOCAL ERR ErrDBUTLDumpTables( DBCCINFO *pdbccinfo, PFNTABLE pfntable, VOID* pvCtx = NULL );
#if !defined( MINIMAL_FUNCTIONALITY ) || define... | 165,042 | 58,169 |
/*
* File: collision.cpp
* Author: Nick (original version), ahnonay (SFML2 compatibility)
*/
#include <SFML/Graphics.hpp>
#include "collision.hpp"
namespace Collision
{
sf::Vector2f GetSpriteCenter(const sf::Sprite & Object)
{
sf::FloatRect AABB = Object.getGlobalBounds();
return sf::Vector2f(AABB.left + ... | 3,338 | 1,408 |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <stdlib.h>
// Caricature of folly::basic_fbstring without the union between small
// and medium/large data representations... | 2,177 | 759 |
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... | 9,300 | 4,747 |
// Copyright (c) 2010 The Chromium Embedded Framework 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 "include/wrapper/cef_zip_archive.h"
#include <algorithm>
#include "include/base/cef_logging.h"
#include "include/base/ce... | 4,393 | 1,501 |
#pragma once
#include <QIcon>
#include <QColor>
QIcon loadSvgIconReplacingColor(const char * file, QColor newColor);
QIcon loadSvgIconReplacingColor(const char * file, const char * newColor);
| 194 | 68 |
/*
* UltrasonicFactory.cpp
*
* Created on: Feb 10, 2018
* Author: team302
*/
#include <factories/UltrasonicFactory.h>
#include <subsys/components/DragonUltrasonic.h>
UltrasonicFactory* UltrasonicFactory::m_ultrasonicFactory = nullptr;
DragonUltrasonic* UltrasonicFactory::m_ultrasonic = nullptr;
... | 2,118 | 771 |
/****
*
* VertexBuffer maintains a vertex data array with locations, normals,
* colors and texcoords.
*
****/
#include "vertex_buffer.h"
#include <sstream>
#include "glm/gtc/matrix_inverse.hpp"
#define NO_LOGGING
#include "util/sxr_log.h"
namespace sxr {
VertexBuffer::VertexBuffer(const char* layout_desc, i... | 17,578 | 4,963 |
#include <fstream>
#include <stack>
#include <vector>
int main() {
std::ifstream in_file("input.txt");
int N;
in_file >> N;
std::vector<int> a(N);
for(int i = 0; i < N; ++i) {
in_file >> a[i];
}
in_file.close();
std::stack<int> stack;
std::vector<int> nums_global_end(N);
... | 1,486 | 565 |
/*
* Copyright (C) 2018
* Course: CO2003
* Author: Rang Nguyen
* Ho Chi Minh City University of Technology
*/
#include"Node.h"
#include <cstring> // ! Fix memmove()
#include <cmath> // ! Fix ceil()
Node::Node(int capacity) {
maxElements = capacity;
elements = new int[capacity]; // ! Allocated dynamic
... | 1,943 | 744 |
// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/extensions/api/atom_extensions_api_client.h"
#include <memory>
#include <string>
#include "atom/browser/extensions/atom_extension_web_contents_observer.h"
#inc... | 7,466 | 2,106 |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | 3,611 | 1,156 |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "perf_precomp.hpp"
namespace opencv_test {
#define TYPICAL_MAT_TYPES_MORPH CV_8UC1, CV_8UC4
#define TYPICAL_MATS_M... | 1,049 | 455 |
--- src/net.cpp.orig 2015-11-30 23:06:15 UTC
+++ src/net.cpp
@@ -58,7 +58,7 @@ static bool vfLimited[NET_MAX] = {};
static CNode* pnodeLocalHost = NULL;
CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices);
uint64 nLocalHostNonce = 0;
-array<int, THREAD_MAX> vnThreadsRunning;
+boost::array<int, THREA... | 952 | 440 |
#include <iostream>
struct str{
int a[2];
double d;
};
double fun(int i) {
str s;
s.a[i] = 1073741824;
s.d = 3.14;
return s.d;
}
int main() {
std::cout << fun(0) << '\n';
std::cout << fun(1) << '\n';
std::cout << fun(2) << '\n';
std::cout << fun(3) << '\n';
... | 404 | 190 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
int n;cin>>n;
int before;
long long sum = 0;
for (int i = 0; i < n; i++) {
int a;
cin >> a;
if(i==0) {
before = a;
} else {
... | 427 | 159 |
// Copyright (c) 2013-2015 mogemimi.
// Distributed under the MIT license. See LICENSE.md file for details.
#ifndef POMDOG_PREREQUISITESDIRECT3D_373FDC61_HPP
#define POMDOG_PREREQUISITESDIRECT3D_373FDC61_HPP
#if defined(_XBOX_ONE) && defined(_TITLE)
#include <d3dcompiler_x.h>
#else
#include <d3dcompiler.h>
#include <... | 393 | 198 |
/*
* MIT License
*
* Copyright (c) 2017 Twitter
*
* 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, modify, ... | 11,227 | 4,389 |
#include "Graphics\Include\Render2D.h"
#include "Graphics\Include\DrawBsp.h"
#include "stdhdr.h"
#include "entity.h"
#include "PilotInputs.h"
#include "simveh.h"
#include "sms.h"
#include "airframe.h"
#include "object.h"
#include "fsound.h"
#include "soundfx.h"
#include "simdrive.h"
#include "mfd.h"
#include "radar.h"
... | 62,756 | 28,330 |
class Solution {
public:
void subsets(vector<int> nums, set<vector<int>> &s, int i, vector<int> r)
{
if(i == nums.size())
{
sort(r.begin(), r.end());
s.insert(r);
return;
}
else
{
subsets(nums, s, i+1, r);
r.push... | 847 | 324 |
#include <sstream>
#include <iostream>
#include <ydk/entity_util.hpp>
#include "bundle_info.hpp"
#include "generated_entity_lookup.hpp"
#include "Cisco_IOS_XE_eem.hpp"
using namespace ydk;
namespace cisco_ios_xe {
namespace Cisco_IOS_XE_eem {
const Enum::YLeaf OperatorType::eq {0, "eq"};
const Enum::YLeaf OperatorT... | 530 | 229 |
/**
* @file main.cc
* @author Stavros Avramidis (@purpl3F0x)
* @date 16/12/2019
* @copyright 2019 Stavros Avramidis under Apache 2.0 License
*/
#include <filesystem>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include "mqa_identifier.h"
nam... | 3,198 | 1,096 |
/*
* BLueIOMPU9250.h
*
* Created on: Jul 25, 2018
* Author: hoan
*/
#include "app_util_platform.h"
#include "app_scheduler.h"
#include "istddef.h"
#include "ble_app.h"
#include "ble_service.h"
#include "device_intrf.h"
#include "coredev/spi.h"
#include "coredev/timer.h"
#include "sensors/agm_mpu9250.h"
#inc... | 11,359 | 5,337 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | 3,514 | 1,210 |
/*
Copyright 2016 Mitchell Young
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 ... | 3,881 | 1,179 |
#if defined _WIN32 || defined _WIN64
#include <Windows.h>
#define DLLEXPORT __declspec(dllexport)
#else
#include <stdio.h>
#endif
#ifndef DLLEXPORT
#define DLLEXPORT
#endif
DLLEXPORT void ExampleLibraryFunction()
{
#if defined _WIN32 || defined _WIN64
MessageBox(NULL, TEXT("Hello world!"), NULL, MB_... | 366 | 141 |
#include <iostream>
int main()
{
float x;
int n;
std::cout << "Podaj x i n: ";
std::cin >> x >> n;
switch (n)
{
case 1:
std::cout << "y = " << sqrt(2 * x);
break;
case 2:
std::cout << "y = " << (x * x) - 5;
break;
case 3:
std::cout << "y = " << cos(x) + 1;
break;
default:... | 369 | 176 |
/*
* libreoj2245
*
* LCT 维护最大值。
* 首先把边按 a 权值排序,从小到大加入,那么所需的 a 就是当前边的 a 。
* 然后用 LCT 维护从 1 到 n 的路径的 b 权值的最大值。
* 由于维护的是边权,我们要给边特别地开点,然后把本来应该相连的点连到两边。
* 动态维护一棵最小生成树,每次加入一条从 u 到 v 的路径的时候就把原来的
* u, v 之间的路径拉出来查询一下路径上的最大值,如果比当前的边要大,
* 就把代表这条边的点从路径里拿出来,再把新边放进去。
* */
#include <cstdio>
#include <algorithm>
#incl... | 4,355 | 2,109 |
#include "geoclaw.h"
#include "H20utilities/h20utilities.h"
//*********************************************************************************
// GeoClaw starts here
//*********************************************************************************
geoclaw::geoclaw(int flag, QStringList data)
{
// If needed to r... | 3,224 | 1,005 |
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
// Copyright (c) 2013 NVIDIA Corporation
// All rig... | 15,217 | 4,307 |
#pragma once
#include "AppConfig.hpp"
#include "EventEx.hpp"
#include "ScanGroups.hpp"
using namespace EventEx;
/** Defines all of the events in the application */
namespace events {
struct CapActive : public Event {
CapActive() : CapActive(0, 0, 0) {}
CapActive(uint16_t _baseline, uint16_t _measurement,... | 3,176 | 1,081 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
// vim:cindent:ts=2:et:sw=2:
/* ***** 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 ... | 164,690 | 55,349 |
//
// Copyright 2017 Animal Logic
//
// 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 ... | 215,503 | 76,855 |
/*
* Copyright (C) 2020 Frank Mertens.
*
* Distribution and use is allowed under the terms of the zlib license
* (see cc/LICENSE-zlib).
*
*/
#include <cc/Application>
#include <cc/TimeMaster>
#include <cc/PlatformPlugin>
#include <cc/PosGuard>
#include <cc/InputControl>
#include <cc/Process>
#include <cc/Bmp>
#i... | 8,072 | 2,381 |
#ifndef COIO_CPU_AFFINITY
#define COIO_CPU_AFFINITY
#include <sched.h>
#include <sys/syscall.h>
#include <unistd.h>
namespace coio {
static inline bool reset_cpu_affinity(int cpuno) {
cpu_set_t mask;
CPU_ZERO(&mask);
CPU_SET(cpuno, &mask);
auto tid = syscall(SYS_gettid);
return sched_setaffinity(tid, size... | 374 | 163 |
// Copyright 2019 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 <gmock/gmock.h>
#include <gtest/gtest.h>
#include "biod/ec_command.h"
using testing::_;
using testing::InvokeWithoutArgs;
using testing::Ret... | 4,395 | 1,587 |
// boost/detail/bitmask.hpp ------------------------------------------------//
// Copyright Beman Dawes 2006
// Distributed under the Boost Software License, Version 1.0
// http://www.boost.org/LICENSE_1_0.txt
// Usage: enum foo { a=1, b=2, c=4 };
// BOOST_BITMASK( foo )
//
// void... | 3,091 | 850 |
#include "AliAnalysisTaskEventCutsValidation.h"
// ROOT includes
#include <TChain.h>
#include <TH2F.h>
#include <TList.h>
// ALIROOT includes
#include "AliAODEvent.h"
#include "AliAODHeader.h"
#include "AliAODTrack.h"
#include "AliESDEvent.h"
#include "AliESDtrack.h"
#include "AliVEvent.h"
///\cond CLASSIMP
ClassImp... | 1,857 | 648 |
#include "linetestviewer.h"
#ifdef LINETEST
#include "tapp.h"
#include "viewerdraw.h"
#include "timagecache.h"
#include "tgl.h"
#include "trop.h"
#include "toonz/txsheethandle.h"
#include "toonz/tframehandle.h"
#include "toonz/tcolumnhandle.h"
#include "toonz/txshlevelhandle.h"
#include "toonz/tobjecthandle.h"
#inclu... | 27,548 | 10,323 |
/*******************************************************************************
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
#include <core/view.hpp>
#include <dml/detail/ml/result.hpp>
namespace dml::detai... | 1,216 | 367 |
/**
* \file QryIdecTouRef1NFile.cpp
* job handler for job QryIdecTouRef1NFile (implementation)
* \author Alexander Wirthmueller
* \date created: 30 Dec 2017
* \date modified: 30 Dec 2017
*/
#ifdef IDECCMBD
#include <Ideccmbd.h>
#else
#include <Idecd.h>
#endif
#include "QryIdecTouRef1NFile.h"
#include "... | 7,220 | 3,371 |
#include "util/Scheduler.h"
#include "util/Config.h"
#include <logging/Journal.h>
#include <gsl/gsl>
TilingScheduler::~TilingScheduler() {}
FixedThreadsScheduler::FixedThreadsScheduler(FixedThreadsSchedulerArgs args)
: _read_executor(args.read_threads)
, _indexing_executor(args.indexing_threads)
{
if (!global... | 6,008 | 1,927 |
#include "CondFormats/DataRecord/interface/EcalPFSeedingThresholdsRcd.h"
#include "CondFormats/EcalObjects/interface/EcalPFSeedingThresholds.h"
#include "RecoParticleFlow/PFClusterProducer/interface/RecHitTopologicalCleanerBase.h"
class ECALPFSeedCleaner : public RecHitTopologicalCleanerBase {
public:
ECALPFSeedClea... | 2,031 | 758 |
#pragma once
#include "Spike/Synapses/Synapses.hpp"
namespace Backend {
namespace Dummy {
class Synapses : public virtual ::Backend::Synapses {
public:
~Synapses() override = default;
void prepare() override;
void reset_state() override;
void copy_to_frontend() override;
void... | 403 | 126 |
#include "LeetCodeLib.h"
class Solution {
public:
// iterative approach
int calculate(string s) {
int result = 0;
int sign = 1;
stack<int> st;
for (int i = 0; i < s.size(); i++) {
// get the number from string
if (s[i] >= '0') {
int num = 0;
while (i < s.size() && s[i] >= '0') {
num *= 10... | 3,451 | 1,750 |
//@type greedy, DP
//@result 12964986 2015-09-11 22:53:08 zetta217 534B - Covered Path GNU C++ Accepted 15 ms 0 KB
// I don't use DP
#include <iostream>
using namespace std;
int main() {
int begin(0);
int end(0);
while (cin >> begin >> end) {
if (begin > end) {
int temp = begin;
begin = end;
... | 794 | 349 |
/*****
* TFractalViewerWindow.c
*
* The window methods for the application.
*
* TFractalViewerWindow inherits its Draw method from TWindow.
* TMandelbrot, TJulia, and others override DrawShape to draw their own kind of CGI.
*
*****/
#include <Packages.h> // for NumToString prototype
#include "TFractalView... | 2,928 | 1,070 |
#include <cstring>
#include <stdexcept>
#include "common.hpp"
class TestHandler123 : public osmium::handler::Handler {
public:
TestHandler123() :
osmium::handler::Handler() {
}
void way(const osmium::Way& way) const {
if (way.id() == 123800) {
REQUIRE(way.version() == 1);
... | 1,105 | 407 |
// 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 "chrome/test/chromedriver/chrome/chrome_desktop_impl.h"
#include <stddef.h>
#include <utility>
#include "base/files/file_path.h"
#include "... | 17,392 | 5,278 |
/*=========================================================================
*
* Copyright David Doria 2012 daviddoria@gmail.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
*
*... | 6,223 | 1,900 |
/*
* See header for notes.
*/
#include "vfd_task.h"
#include "board_defs.h"
#include "catch_errors.h"
#include "packet_utils.h"
#include "string.h" // memcpy
#include "vfd_defs.h"
VfdTask::VfdTask( //
const char* name,
UartTasks& uart,
Writable& target,
TaskUtilitiesArg& utilArg,
UBaseType_t priority)
:... | 7,145 | 2,124 |
#include <exodus/library.h>
libraryinit()
function main(in x, in y, in x2, in y2, in readwrite, io buffer) {
//TODO implement if screen handling required
//VIDEO.RW(0,0,@CRTWIDE-1,@CRTHIGH-1,'R',startBUFFER)
//eg to copy a whole screen sized 80x25, use 0,0,79,24
//R=Read, W=Write
//evade warning "usused"
fals... | 463 | 206 |
#include <iostream>
#include <string>
#include <SDL2/SDL.h>
#include <QApplication>
#include <QMessageBox>
#include <QDebug>
#include "editor.h"
#include "yaml.h"
#include "map_game.h"
#include "yaml.h"
#include "inventory.h"
#include "inventory_editor.h"
#define EXIT_PADDING 5
#define EXIT_ICON_SIDE 20
#define SAVE_P... | 6,887 | 2,939 |
/*
* Copyright (c) 2019 SK Telecom Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | 2,589 | 954 |
// C++ program to illustrate If statement
#include<iostream>
using namespace std;
int main()
{
int i = 10;
if (i > 15)
{
cout<<"10 is less than 15";
}
cout<<"I am Not in if";
}
| 197 | 93 |
//Language: GNU C++
//HACK ME, PLEASE! ^_^
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <utility>
#include <math.h>
#include <cstdlib>
#include <memory.h>
#include <queue>
#define pb push_back
#define i64 long... | 3,652 | 1,874 |
#include <iostream>
#include <vector>
#include "binary_tree.h"
using namespace std;
class Solution {
public:
TreeNode* bstFromPreorder(vector<int>& preorder) {
if (preorder.size() == 0) return nullptr;
TreeNode* root = new TreeNode {preorder[0]};
for (int i = 1; i < preorder.size(); i++) ... | 1,089 | 320 |
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 17,829 | 5,989 |
#include "p4unit.h"
#include <boost/log/attributes/constant.hpp>
#include <boost/log/sinks/syslog_backend.hpp>
#include <boost/tokenizer.hpp>
#include <fstream>
#include <sstream>
#include "../p4l/lexer.h"
namespace {
boost::log::sources::severity_logger<int> _logger(boost::log::keywords::severity = boost::log::sin... | 10,180 | 4,009 |
#include<stdio.h>
int fun(int n)
{
if(n == 0)
return 1;
else
return n*fun(n-1);
}
int main()
{
int a = 1;
int b = 2;
a = fun(b);
return a;
} | 168 | 92 |
/*
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
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 option) an... | 2,336 | 728 |
// 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 "remoting/host/screen_resolution.h"
#include <limits>
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/... | 2,150 | 838 |
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "rtklib.h"
#include "convopt.h"
#include "codeopt.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TCodeOptDialog ... | 13,250 | 7,099 |