text string | size int64 | token_count int64 |
|---|---|---|
// Copyright 2014 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.
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
#include "config.h"
#include "V8TouchEvent.h"
#include "bindings/core/v8/Ex... | 14,056 | 4,641 |
////////////////////////////////////////////////////////////////////////////
//
//
// Project : VideoNet Ver. 1.0.
// Description : Video Conferencing over the LAN.
// Author : Vladiimir Novick ( v_novick@yahoo.com )
// Date : 17/12/2005
//
// I have converted origional fast h.263 ... | 18,162 | 8,168 |
//
// Copyright (c) 2020 Richard Hodges (hodges.r@gmail.com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/madmongo1/webclient
//
// This project was made possible ... | 9,310 | 2,798 |
//! Assign nodal connectivity property for bspline elements
template <unsigned Tdim, unsigned Tnfunctions>
void mpm::HexahedronBSplineElement<Tdim, Tnfunctions>::
initialise_bspline_connectivity_properties(
const Eigen::MatrixXd& nodal_coordinates,
const std::vector<std::vector<unsigned>>& nodal_pro... | 13,036 | 4,456 |
#ifndef GODOT_CPP_SKELETON2D_HPP
#define GODOT_CPP_SKELETON2D_HPP
#include <gdnative_api_struct.gen.h>
#include <stdint.h>
#include <core/CoreTypes.hpp>
#include <core/Ref.hpp>
#include "Node2D.hpp"
namespace godot {
class Bone2D;
class Skeleton2D : public Node2D {
struct ___method_bindings {
godot_method_bind... | 1,262 | 515 |
class SparseMultiGRAPH
{
int Vcnt, Ecnt; bool digraph;
struct node
{
int v; node* next;
node(int x, node* t){ v = x; next = t; }
};
typedef node* link;
vector<link> adj;
public:
SparseMultiGRAPH(int V, bool digraph = false):
adj(V), Vcnt(V), Ecnt(0), digraph(dig... | 1,104 | 425 |
#include <QtWidgets/QApplication>
#include "cellcounter.h"
#include<QMessageBox>
#include<QIcon>
class CC: public QApplication
{
public:
CC(int argc, char **argv): QApplication(argc, argv)
{
}
bool notify(QObject *rec, QEvent *ev)
{
try{
return QApplication::notify(rec, ev);
... | 1,089 | 315 |
// Copyright 2020 Krasilnikov Alexey
#include "../../../modules/task_1/krasilnikov_a_count_sentences/count_sentences.h"
#include <mpi.h>
#include <ctime>
#include <random>
#include <string>
std::string getRandomString(const size_t size) {
std::mt19937 generator;
std::string str(size, '_');
for (auto &symbol : ... | 1,947 | 796 |
//============================================================================
// Copyright 2009- 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... | 3,106 | 989 |
TEST(Color, base) {
// Testing same operations on colors.
// ==================================
// Colors are red, green, blue tuples.
Color c(-0.5, 0.4, 1.7);
EXPECT_EQ(c.red(), -0.5f);
EXPECT_EQ(c.green(), 0.4f);
EXPECT_EQ(c.blue(), 1.7f);
// Adding colors.
Color c1(0.9, 0.6, 0.75);
Color c2(0.7... | 1,784 | 938 |
// Copyright (c) 2012 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/chromeos/login/help_app_launcher.h"
#include <string>
#include "base/stringprintf.h"
#include "base/utf_string_conversions.... | 2,237 | 687 |
#include "a0_bin_conv.h"
#include "AESL_pkg.h"
using namespace std;
namespace ap_rtl {
void a0_bin_conv::thread_sel_tmp175_fu_26354_p3() {
sel_tmp175_fu_26354_p3 = (!tmp_170_reg_51104.read()[0].is_01())? sc_lv<2>(): ((tmp_170_reg_51104.read()[0].to_bool())? old_word_buffer_0_5_18_fu_1550.read(): sel_tmp174_fu_26... | 237,049 | 145,140 |
#include <bits/stdc++.h>
using namespace std;
#define SIZE 30000
inline int scan(int &x) {
char c;
while (c = getchar(), c < '0' || c > '9')
;
x = c - '0';
while (c = getchar(), c >= '0' && c <= '9')
x = x * 10 + c - '0';
}
int tree[32768][51];
int B, N, D;
int cost[SIZE + 1], value[SIZE + 1];
int ... | 2,101 | 1,046 |
#include "test_common.h"
TEST_CASE("RangeTracker objects must work correctly on the given get tests",
"[RangeTracker]") {
auto rts = ALL_IMPLEMENTATIONS(int);
std::vector<std::pair<int, int>> empty = {};
for(auto& it: rts) {
it->Add(1, 3);
it->Add(5, 6);
}
std::vector<std::pair<int, int>> existi... | 1,173 | 565 |
#include "tarch/parallel/Node.h"
#include "tarch/Assertions.h"
#include "tarch/services/ServiceRepository.h"
#include <sstream>
#include <cstdlib>
#include "tarch/compiler/CompilerSpecificSettings.h"
#include "tarch/multicore/MulticoreDefinitions.h"
/**
* For the machine name. If it doesn't work, switch it off in t... | 11,595 | 4,035 |
#include "renderer.h"
#include <SDL.h>
namespace SDL{
Renderer::Renderer():renderer(nullptr){}
Renderer::Renderer(const Window& window, int index, Uint32 flags){
//SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)
renderer.reset(SDL_CreateRenderer(window.window.get(), index, flags), SDL... | 1,635 | 600 |
#include <stdio.h>
#include <string.h>
#include "machine.hpp"
#include "utils.hpp"
#define MAX(a, b) ((a) > (b) ? (a) : (b))
void SingleStepInfo()
{
printf("Single Step Mode Help:\n");
printf("c: continue\n");
printf("r: print all registers\n");
printf("d: dump machine status to file 'status_dump.txt'\n");
print... | 8,141 | 3,804 |
/* Copyright (c) <2003-2019> <Newton Game Dynamics>
*
* 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 purpose,
* includi... | 34,597 | 14,188 |
/** @file
MODULE : ImagePlaneDecoder
TAG : IPD
FILE NAME : ImagePlaneDecoder.cpp
DESCRIPTION : A base class with the common implementations for a
family of implementations to read sequentially from
a bit stream, decode and inverse quantise each colour
pl... | 4,458 | 2,068 |
#include <QDebug>
#include <Qt>
#include <QApplication>
#include "sniffermodel.h"
#include "snifferwindow.h"
#include "SnifferDelegate.h"
SnifferModel::SnifferModel(QObject *parent)
: QAbstractItemModel(parent),
mFilter(false),
mNeverExpire(false),
mFadeInactive(false),
mMuteNotched(false),... | 8,397 | 2,701 |
/////////////////////////////////////////////////////////////////////////////
// Name: bootdevice_vscp.cpp
// Purpose:
// Author: Ake Hedman
// Modified by:
// Created: 16/12/2009 22:26:09
// RCS-ID:
// Copyright: (C) 2000-2020
// Ake Hedman, Grodans Paradis AB, <akhe@vscp.org>
// (C) 201... | 35,226 | 11,958 |
#ifndef BIT_STL_UTILITIES_DETAIL_VARIANT_INL
#define BIT_STL_UTILITIES_DETAIL_VARIANT_INL
//----------------------------------------------------------------------------
// Constructors / Assignment
//----------------------------------------------------------------------------
template<typename...Types>
inline constex... | 23,571 | 7,547 |
#include "lab2/vector.h"
#include <cmath>
#include <iterator>
#include <utility>
using namespace lab2;
Vector::Vector(std::istream& is) {
double el;
while (is >> el) {
data.push_back(el);
}
if (size() == 0) {
throw "Vector is empty";
}
}
Vector::Vector(const std::vector<double>& ... | 2,086 | 712 |
// Copyright 2021 Research Institute of Systems Planning, 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 b... | 5,970 | 2,040 |
#include "console.h"
#include "fan.h"
#include "handtiles.h"
#include "print.h"
#include <iostream>
#include <vector>
int main() {
// 构造手牌
mahjong::Handtiles ht;
ht.StringToHandtiles("[456s,1][456s,1][456s,3]45s55m |EE0000|fah");
// 计算听牌
mahjong::Fan fan;
std::vector<mahjong::Tile> ting = fan.... | 1,283 | 636 |
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from rmf_traffic_msgs:msg/MirrorUpdate.idl
// generated code does not contain a copyright notice
#ifndef RMF_TRAFFIC_MSGS__MSG__DETAIL__MIRROR_UPDATE__TRAITS_HPP_
#define RMF_TRAFFIC_MSGS__MSG__DETAIL__MIRROR_UPDATE__TRAITS_HPP_
#include... | 1,424 | 573 |
/***************************************************************************\
RenderWire.h
Scott Randolph
May 5, 1998
This sub class draws an out the window view in wire frame mode.
\***************************************************************************/
#include "TOD.h"
#include "Tpost.h"
#includ... | 2,797 | 954 |
#include "catch.hpp"
#include "parser/parser.hpp"
#include <vector>
#include <string>
static std::vector<std::string> valid_queries = {
// true/false predicates
"truepredicate",
"falsepredicate",
" TRUEPREDICATE ",
" FALSEPREDICATE ",
"truepredicates = falsepredicates", // keypaths
// cha... | 3,293 | 1,520 |
/* The MIT License (MIT)
Copyright (c) [2015] [Nrupatunga]
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... | 10,739 | 4,235 |
#include "rational.h"
#include <iostream>
using std::cout;
using std::cin;
using std::cerr;
int main()
try {
cout << "Enter the integers of two rational numbers:\n";
int a, b, c, d;
cin >> a >> b >> c >> d;
Rational r1{a, b};
Rational r2{c, d};
cout << "Add: " << r1 + r2 << '\n'
<< "... | 557 | 228 |
/**
* @file GoalModel.cpp
*
* @author <a href="mailto:borisov@informatik.hu-berlin.de">Alexander Borisov</a>
* @author <a href="mailto:xu@informatik.hu-berlin.de">Xu, Yuan</a>
* @author <a href="mailto:scheunem@informatik.hu-berlin.de">Marcus Scheunemann</a>
* @author <a href="mailto:mellmann@informatik.hu-berlin.de">H... | 5,552 | 2,037 |
#include <sstream>
#include "evalexpr.hpp"
void test(std::string const &str) {
auto res = Evalexpr::pExpr(str);
std::cout << "test :\"" << str << "\"" << std::endl;
std::cout << res << std::endl;
if (res.valid()) {
std::cout << "size = " << sizeof(res.f) << std::endl;
std::cout << "e... | 970 | 388 |
// SPDX-License-Identifier: Apache-2.0
// ----------------------------------------------------------------------------
// Copyright 2011-2021 Arm 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 ... | 20,448 | 13,200 |
/**
* Copyright (C) 2016 MongoDB 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 that it will be usef... | 7,402 | 2,125 |
// Copyright (c) 2021 Jeremy Linton
//
// big_vec.cpp
// C++ wrapper around the $PLAT_objs.cpp vector to extend its len
//
//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... | 18,661 | 8,504 |
#include "List.h"
#include <iostream>
Node *prepareNewNode(const int array[][2]) {
Node *tmp = new Node();
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 2; j++) {
tmp->data[i][j] = array[i][j];
}
}
tmp->next = nullptr;
return tmp;
}
void prepare(List *list) {
... | 1,403 | 505 |
/*=========================================================================
Program: ParaView
Module: $RCSfile$
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView lice... | 3,292 | 1,120 |
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 24,068 | 6,890 |
#include <iostream>
#include "calendar.h"
#include "date/tz.h"
int main()
{
Event event("test");
auto d = date::local_days{date::April/30/2004};
event.convertToTime(d, "8:10-9:10");
std::cout << event.dtstart << std::endl << event.dtend << std::endl;
return 0;
} | 284 | 116 |
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... | 16,642 | 5,002 |
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at http://ec... | 21,022 | 7,050 |
#ifndef LIGHTSOURCE_HPP_
#define LIGHTSOURCE_HPP_
#include <glm/vec3.hpp>
#include "abcg.hpp"
#include <glm/vec3.hpp>
#include "boids.hpp"
class OpenGLWindow;
class Boids;
class LightSource {
public:
void update(float deltaTime);
private:
friend OpenGLWindow;
friend ... | 486 | 179 |
//: C03:Menu.cpp
// Simple menu program demostrating
#include <iostream>
using namespace std;
int main()
{
char c;
while(true)
{
cout << "MAIN MENU: " << endl;
cout << "l: left, r: right, q: quit -> ";
cin >> c;
if(c == 'q')
break; // Out of "while(1)"
if(c == 'l')
{
cout << "LEFT MENU: " <<en... | 1,066 | 543 |
#ifndef SRC_HTTPSSERVERCONSTANTS_HPP_
#define SRC_HTTPSSERVERCONSTANTS_HPP_
#include "Arduino.h"
// 1: Error
// 2: Error + Warn
// 3: Error + Warn + Info
// 4: Error + Warn + Info + Debug
#ifndef HTTPS_LOGLEVEL
#define HTTPS_LOGLEVEL 3
#endif
#ifdef HTTPS_LOGTIMESTAMP
#define HTTPS_LOGTAG(LVL) Serial.printf("[H... | 2,615 | 977 |
#include <../inc/InputValidation.hpp>
#include <gtest/gtest.h>
struct InputValidationTest : public ::testing::Test
{
};
TEST_F(InputValidationTest,
check_if_substring_from_object_input_will_be_correct)
{
// GIVEN
InputValidation input("Player:x|--|4/|x|");
// WHEN call gestSubstring method
// T... | 9,460 | 3,582 |
/*
*
* Copyright (c) 2013-2017 Nest Labs, 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... | 19,822 | 6,731 |
// Generated from /POI/java/org/apache/poi/ss/formula/FormulaRenderer.java
#include <org/apache/poi/ss/formula/FormulaRenderer.hpp>
#include <java/io/Serializable.hpp>
#include <java/lang/ArrayStoreException.hpp>
#include <java/lang/CharSequence.hpp>
#include <java/lang/ClassCastException.hpp>
#include <java/lang/Comp... | 6,566 | 2,299 |
/**
* \class L1GlobalTriggerObjectMapRecord
*
*
* Description: see header file.
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
* \author: W. David Dagenhart
*
*
*/
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMap... | 13,528 | 3,802 |
/*
* Copyright (c) 2017 - 2018, Intel Corporation
*
* 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, ... | 36,367 | 13,191 |
#ifndef APP_GROUND_TYPE_HPP
#define APP_GROUND_TYPE_HPP
namespace app
{
enum class GroundType
{
Ground1,
Ground2,
Ground3,
Slope,
UnderWater
};
} // namespace app
#endif // APP_GROUND_TYPE_HPP
| 218 | 99 |
// G100Config.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "MachDevice.h"
#include "G100Config.h"
#include "G100-Structs.h"
#include ".\g100config.h"
#include "LocalIPQuery.h"
#include "GRexControl.h"
extern GRexControl *TheRex;
bool Exit;
// G100Config dialog
IMPLEMENT_DYNAMIC... | 2,365 | 1,073 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--) {
long long ans= 0;
long long no = 0;
string x;
cin>>x;
long long streak = 0;
for(long i=0;i<x.size();i++) {
if(x[i] == '1') {
if(streak != 0){
ans += no;
ans += no*streak;
}
no++;
streak = 0... | 443 | 252 |
// Copyright 2019 Open Source Robotics Foundation, 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 appli... | 4,736 | 1,555 |
/***************************************************************
* Name: wxwidgets_testMain.cpp
* Purpose: Code for Application Frame
* Author: tsn (talipovsn@gmail.com)
* Created: 2020-02-26
* Copyright: tsn (github.com/tsnsoft)
* License:
************************************************************... | 4,789 | 1,920 |
//------------------------------------------------------------------------------------------------------------
// File: Random.cpp
// Class: teh::Random
//
// Description:
// Random number generator using the code from zufall.h/.c.
// See header file for more details.
//
// Author: Thomas E. Hilinski <https://githu... | 15,147 | 6,299 |
// Copyright 2019-2022 Cambridge Quantum Computing
//
// 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... | 4,124 | 1,588 |
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2012, Willow Garage, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditi... | 24,452 | 7,095 |
// Copyright 2017-2021 Closed Sum Games, LLC. All Rights Reserved.
#include "Managers/WidgetActor/Cache/CsCache_WidgetActorImpl.h"
// Library
#include "Managers/Pool/Payload/CsLibrary_Payload_PooledObject.h"
// Pool
#include "Managers/Pool/Payload/CsPayload_PooledObject.h"
// FX
#include "Managers/WidgetActor/Payload/... | 4,185 | 1,744 |
// Copyright (c) 2012 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.
// This file tests the chrome.alarms extension API.
#include "base/json/json_writer.h"
#include "base/values.h"
#include "chrome/browser/extensions/a... | 7,588 | 2,409 |
/****************************
Copyright (c) 2006-2012 Luke Salisbury
Copyright (c) 2008 Mokoi Gaming
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... | 2,217 | 800 |
/* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certai... | 6,602 | 2,199 |
// Created on: 1994-02-08
// Created by: Gilles DEBARBOUILLE
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of th... | 1,206 | 383 |
#ifndef CUKE_STEPMANAGER_HPP_
#define CUKE_STEPMANAGER_HPP_
#include <map>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
#include <boost/enable_shared_from_this.hpp>
#include <boost/make_shared.hpp>
#include <boost/shared_ptr.hpp>
using boost::shared_ptr;
#include "../Table.hpp"
#includ... | 5,340 | 1,707 |
#pragma once
#include <memory>
#include <string_view>
#include "Runtime/GCNTypes.hpp"
#include "Runtime/World/CActor.hpp"
namespace urde {
class CElementGen;
class CParticleElectric;
class CScriptEffect : public CActor {
static u32 g_NumParticlesUpdating;
static u32 g_NumParticlesRendered;
TLockedToken<CElect... | 3,123 | 1,123 |
// RUN: %clang_cc1 -fsyntax-only -verify %s
// C++ [dcl.ref]p5:
// There shall be no references to references, no arrays of
// references, and no pointers to references.
// The crazy formatting in here is to enforce the exact report locations.
typedef int &intref;
typedef intref &intrefref;
template <class T> c... | 3,828 | 1,005 |
#include "./utility/rt.h"
#include <math.h>
int N;
int M;
#define A_OFFSET 0
#define R_OFFSET N * M
#define Q_OFFSET N * M + N * N
void gramschmidt_trace(double* A, double* R, double* Q) {
int k, i, j;
double nrm;
vector<int> idx;
for (k = 0; k < N; k++) {
nrm = 0.0;
for (i = 0; i < M; i++) {
... | 2,468 | 1,210 |
#pragma once
#include "chain_conversions.hpp"
#include "check.hpp"
#include "operators.hpp"
#include "reflection.hpp"
#include "from_json.hpp"
#include <stdint.h>
#include <string>
namespace eosio {
/**
* @defgroup time
* @ingroup core
* @brief Classes for working with time.
*/
class microseconds {
public:
... | 8,958 | 3,118 |
#include "urlify_in_place.h"
using urlify_in_place::buffer_t;
namespace {
struct Lengths {
size_t current;
size_t urlficated;
};
Lengths compute_lengths(const buffer_t *p_buffer) {
Lengths lengths = {0, 0};
for (size_t i = 0; p_buffer->at(i) != '\0'; i++) {
lengths.current++;
lengths.urlficated += p_... | 950 | 358 |
/* NAME:
TThreadPool.cpp
DESCRIPTION:
NThreadPool tests.
COPYRIGHT:
Copyright (c) 2006-2021, refNum Software
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 s... | 4,470 | 1,413 |
/*
* Copyright (c) CERN 2016
*
* 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... | 9,171 | 3,159 |
//
// mass.hpp
// krypton
//
// Created by Jack Zou on 2018/4/7.
// Copyright © 2018年 jack.zou. All rights reserved.
//
#ifndef mass_h
#define mass_h
#include "core/common.hpp"
#include "core/quantity.hpp"
BEGIN_KR_NAMESPACE
template<class T> using microgram = quantity<T, mass, std::micro>;
template<class T> us... | 517 | 212 |
/*
* ButtonControl.cpp
* Created: 31.03.2021 20:42:49
* Author: Markus Scheich
*/
#include "ButtonControl.h"
#include <string.h>
template <int StringLength>
ButtonControl<StringLength>::ButtonControl(unsigned char locX, unsigned char locY, unsigned char width, unsigned char height, const char* buttonText, void* ... | 1,760 | 700 |
/* Copyright (c) 2008-2013, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
There is NO WARRANTY for this software. See l... | 15,815 | 6,443 |
#include <array>
#include <cstdint>
#include <string>
#include <vector>
#include "source/common/buffer/buffer_impl.h"
#include "source/common/grpc/codec.h"
#include "test/common/buffer/utility.h"
#include "test/proto/helloworld.pb.h"
#include "test/test_common/printers.h"
#include "gtest/gtest.h"
namespace Envoy {
... | 9,866 | 3,801 |
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2002
*
* Last modified:
* $Date: 2017-02-21 06:45:56 +0100 (Tue, 21 Feb 2017) $ by $Author: schulte $
* $Revision: 15465 $
*
* ... | 11,092 | 4,273 |
#include <Core/Core.h>
#include <Functions4U/Functions4U.h>
#include <Eigen/Eigen.h>
#include "Utility.h"
namespace Upp {
using namespace Eigen;
double R2(const VectorXd &serie, const VectorXd &serie0, double mean) {
if (IsNull(mean))
mean = serie.mean();
double sse = 0, sst = 0;
for (Eigen::Inde... | 545 | 248 |
#include <wayfire/plugin.hpp>
#include <wayfire/output.hpp>
#include <wayfire/render-manager.hpp>
#include <wayfire/input-device.hpp>
#include <wayfire/output-layout.hpp>
#include <wayfire/core.hpp>
#include <wayfire/util/log.hpp>
#include <giomm/dbusconnection.h>
#include <giomm/dbuswatchname.h>
#include <giomm/dbusp... | 8,121 | 2,689 |
#pragma once
#if defined(SPRAWL_NO_EXCEPTIONS)
# define SPRAWL_EXCEPTIONS_ENABLED 0
#elif defined(__clang__)
# define SPRAWL_EXCEPTIONS_ENABLED __has_feature(cxx_exceptions)
#elif defined(__GNUC__)
# ifdef __EXCEPTIONS
# define SPRAWL_EXCEPTIONS_ENABLED 1
# else
# define SPRAWL_EXCEPTIONS_ENABLED 0
# endif
#elif def... | 1,022 | 430 |
////////////////////////////////////////////////////////////////////
//
// $Id: PMLIO.cxx 2021/06/05 13:58:48 kanai Exp $
//
// Copyright (c) 2021 Takashi Kanai
// Released under the MIT license
//
////////////////////////////////////////////////////////////////////
#include "envDep.h"
#include <iostream>
#include <f... | 4,340 | 1,747 |
// Shasta.
#include "CompressedAssemblyGraph.hpp"
#include "Assembler.hpp"
#include "deduplicate.hpp"
#include "findLinearChains.hpp"
#include "html.hpp"
#include "platformDependent.hpp"
#include "runCommandWithTimeout.hpp"
#include "subgraph.hpp"
using namespace shasta;
// Boost libraries.
#include <boost/algorithm/s... | 33,341 | 10,376 |
#include "stdafx.h"
#include "ShopManager.h"
//public
#include "Obj_Human.h"
#include "Player.h"
#include "Obj_Monster.h"
#include "PAP_DBC.h"//DBC
#include "ItemHelper.h"//TSerialHelper
#include "ItemTable.h"//_ITEM_TYPE
#include "TimeManager.h"//g_pTimeManager
#include "GCShopUpdateMerchandiseList.h"//GCShopUpdateM... | 12,729 | 4,900 |
#include "gdx/test/testbase.h"
#include "gdx/algo/clip.h"
#include "infra/crs.h"
namespace gdx::test {
TEST_CASE_TEMPLATE("Clip raster", TypeParam, UnspecializedRasterTypes)
{
RasterMetadata meta(4, 4, -1.0);
meta.xll = 0.0;
meta.yll = 0.0;
meta.set_cell_size(100.0);
meta.set_projection_from_epsg... | 1,352 | 550 |
//Include the deafult library iostream
#include <iostream>
//Main function
int main() {
//std cout to print hello world
std::cout << "Hello world!\n";
} | 161 | 49 |
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
int n, num, i;
char c;
float coe = 0, rat = 0, sap = 0;
float total;
float coep, ratp, sapp;
scanf("%d", &n);
for( i = 1; i <= n; i++)
{
scanf("%d %c", &num, &c);
if(c == 'C')
coe += num;
... | 900 | 384 |
#include "stdAfx.h"
#include "Logger.h"
#include "ErrorHandling.h"
#include "fileops.h"
#include "ComponentSystem.h"
using namespace std;
void ComponentSystem::readComponentConnections() {
pugi::xpath_node_set::const_iterator it;
map<FriendlyNameType, OriginalNameType>::iterator iter;
// Read ... | 3,736 | 1,323 |
#include<bits/stdc++.h>
int main()
{
freopen("saloon.in","r", stdin);
freopen("saloon.out","w", stdout);
int n, h, m ,k, time, x;
scanf("%d", &n);
std :: deque <int> arr;
int person = 0, j = 0;
for(int i = 0; i < n; i++)
{
scanf("%d %d %d", &h, &m, &k);
time = h * 60 + m... | 928 | 355 |
//
// Created by Megha Ganesh on 4/24/20.
//
#include "ParticleController.h"
#include "Conversions.h"
#include "Globals.h"
#include "cinder/Vector.h"
namespace particles {
ParticleController::ParticleController() {}
b2World* ParticleController::setup(b2World &w) {
world_ = &w;
return world_;
}
void ParticleCont... | 3,501 | 1,211 |
// Copyright 2020 The XLS 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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | 67,167 | 24,812 |
/*************************************************************************/
/* memory_pool_dynamic_static.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... | 6,680 | 2,582 |
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "subsystems/subsystem_Arm.h"
subsystem_Arm::subsystem_Arm() : m_ArmMotor{ArmConstants::ArmMotorPort, rev::CANS... | 1,780 | 643 |
// tests execution with different flags
#include "regexp-executor.hpp"
#include "catch.hpp"
namespace e = regulator::executor;
namespace f = regulator::fuzz;
TEST_CASE( "compile and exec with case-insensitive (8-bit)" )
{
v8::Isolate *isolate = regulator::executor::Initialize();
v8::HandleScope scope(isolat... | 1,598 | 567 |
// dear imgui: Platform Backend for Windows (standard windows API for 32 and 64 bits applications)
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
// Implemented features:
// [X] Platform: Clipboard support (for Win32 this is actually part of core dear imgui)
// [X] Platform: Mouse... | 2,459 | 800 |
namespace stk
{
template<typename T>
VolumeHelper<T> normalize(const VolumeHelper<T>& src,
T min,
T max,
VolumeHelper<T>* out)
{
T src_min, src_max;
find_min_max(src, src_min, src_max);
dim3 di... | 983 | 329 |
//!
//! Copyright (c) 2021, The casual project
//!
//! This software is licensed under the MIT license, https://opensource.org/licenses/MIT
//!
#include "transaction/manager/transform.h"
#include "transaction/common.h"
#include "common/event/send.h"
#include "common/environment.h"
#include "common/environment/normali... | 4,284 | 1,052 |
#include "util/codec_util.h"
#include <cassert>
#include <string.h>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <string>
#include <openssl/crypto.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/md5.h>
#include "util/file_util.h"
#include "util/sha1.h"
#include <opens... | 5,199 | 2,000 |
#include "LightHelper.h"
| 25 | 10 |
#include <cstdio>
#include <cstdlib>
#include <list>
#include <fstream>
#include <iostream>
#include <sstream>
#include <cstring>
#include <random>
#include <stdio.h>
#include <stdlib.h>
#include <sys/timeb.h>
#include "../QmaxKV.hpp"
#include "../HeapKV.hpp"
#include "../SkiplistKV.hpp"
#include "Utils.hpp"
#define... | 5,405 | 2,193 |
/***
* ==++==
*
* Copyright (c) Microsoft Corporation. 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... | 7,118 | 3,265 |
// problem name: Life of Phi
// problem link: https://toph.co/p/life-of-phi
// contest link: https://toph.co/c/practice-icpc-2019-dhaka
// author: reyad
// time: (?)
#include <bits/stdc++.h>
using namespace std;
#define N 1000000
long long int phi[N + 10], sum[N + 10];
int mark[N + 10] = {0};
int ... | 766 | 432 |
// InjectHook.cpp : 定义 DLL 应用程序的导出函数。
//
#include "stdafx.h"
| 65 | 42 |