text string | size int64 | token_count int64 |
|---|---|---|
#include "class_9.h"
#include "class_6.h"
#include "class_7.h"
#include "class_1.h"
#include "class_3.h"
#include "class_8.h"
#include <lib_7/class_1.h>
#include <lib_3/class_0.h>
#include <lib_13/class_8.h>
#include <lib_9/class_5.h>
#include <lib_1/class_9.h>
class_9::class_9() {}
class_9::~class_9() {}
| 308 | 154 |
/*=================================================
* FileName: FishManager.cpp
*
* Created by: Komodoman
* Project name: OceanProject
* Unreal Engine version: 4.18.3
* Created on: 2015/03/17
*
* Last Edited on: 2018/03/15
* Last Edited by: Felipe "Zoc" Silveira
*
* -------------------------------------------------
*... | 2,841 | 1,206 |
#include "outmessagelistpage.h"
#include "ui_messagelistpage.h"
#include "guiutil.h"
#include "messagetablemodel.h"
#include "optionsmodel.h"
#include "walletmodel.h"
#include "newmessagedialog.h"
#include "platformstyle.h"
#include "messageinfodialog.h"
#include "csvmodelwriter.h"
#include "ui_interface.h"
#include <Q... | 8,051 | 2,524 |
#include "DriverTimerLocal.h"
#include "HostImplementation.h"
#ifdef GENERIC_TARGET_IMPLEMENTATION
#include <GenericTarget.hpp>
#include <TargetTime.hpp>
#endif
void CreateDriverTimerLocal(void){
#ifndef GENERIC_TARGET_IMPLEMENTATION
#ifdef HOST_IMPLEMENTATION
HostImplementation::CreateDriverTimerLocal();... | 1,450 | 601 |
#pragma once
#include <glm/glm.hpp>
#include "Material.hpp"
class PhongMaterial : public Material {
public:
PhongMaterial(const glm::vec3& kd, const glm::vec3& ks, double shininess);
virtual ~PhongMaterial();
// private:
glm::vec3 m_kd;
glm::vec3 m_ks;
double m_shininess;
};
| 291 | 119 |
/*
* Copyright (c) 2021 Nuovation System Designs, LLC
* 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/L... | 34,309 | 12,369 |
#include "drape/texture_manager.hpp"
#include "drape/gl_functions.hpp"
#include "drape/font_texture.hpp"
#include "drape/symbols_texture.hpp"
#include "drape/static_texture.hpp"
#include "drape/stipple_pen_resource.hpp"
#include "drape/support_manager.hpp"
#include "drape/texture_of_colors.hpp"
#include "drape/tm_read... | 20,078 | 6,980 |
/*
* Copyright (C) 2014 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... | 1,971 | 631 |
/*******************************************************************************
# Copyright (C) 2021 Xilinx, 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.apach... | 2,117 | 941 |
/*
* Snake game program using the SDL library
*
* @author J. Alvarez
*/
#include <iostream>
#include <cstring>
#include <vector>
#include <time.h>
#include <stdlib.h>
#include "Snake.hpp"
#include "Food.hpp"
#include "Wall.hpp"
#include "Screen.hpp"
#include "SDL2/SDL.h"
using namespace SnakeGame;
bool holdGame(S... | 3,942 | 1,746 |
#ifndef MBGL_TEXT_TYPES
#define MBGL_TEXT_TYPES
#include <mbgl/util/vec.hpp>
#include <mbgl/util/rect.hpp>
#include <array>
#include <vector>
#include <boost/optional.hpp>
namespace mbgl {
typedef vec2<float> CollisionPoint;
typedef vec2<float> CollisionAnchor;
typedef std::array<float, 2> PlacementRange;
typedef ... | 3,539 | 1,104 |
// Tip: Hold Left ALT + SHIFT while tapping or holding the arrow keys in order to select multiple columns and write on them at once.
// Also useful for copy & paste operations in which you need to copy a bunch of variable or function names and you can't afford the time of copying them one by one.
//
#include <stdio.h... | 1,550 | 520 |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: System.Linq.Expressions.Interpreter... | 7,343 | 2,334 |
/*
* Phonetisaurus.cpp
*
Copyright (c) [2012-], Josef Robert Novak
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
notic... | 8,454 | 2,988 |
#ifndef SETTINGS_DIALOG_HPP
#define SETTINGS_DIALOG_HPP
#include <QDialog>
#include "Settings.hpp"
#include "ui_settings.h"
class SettingsDialog : public QDialog {
Q_OBJECT
public:
SettingsDialog(QWidget *parent);
protected slots:
void editorPathChanged(QString);
void browseEdi... | 417 | 146 |
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <QAbstractBarSeries>
#include <QApplication>
#include <QBoxLayout>
#include <QClipboard>
#include <QComboBox>
#include <QDateEdit>
#include <QDateTimeEdit>
#include <QDebug>
#include <QFileInfo>
#include <QFormLayout>... | 934 | 341 |
// Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#include <cppast/cpp_friend.hpp>
#include <cppast/cpp_template.hpp>
#include <cppast/cpp_template_parameter.hpp>
#inclu... | 4,812 | 1,268 |
#include "stdafx.h"
#include "Input.h"
JF::JFCInput::JFCInput()
{
memset(m_bKeyCodeArray, 0, sizeof(m_bKeyCodeArray));
memset(m_bKeyCodeArrayUp, 0, sizeof(m_bKeyCodeArrayUp));
m_vMousePos = { 0, 0, 0 };
m_vClickPos = { 0, 0, 0 };
}
JF::JFCInput::~JFCInput()
{
}
void JF::JFCInput::OnKeyDown(WPARAM wParam)
{
m_bK... | 1,375 | 645 |
#pragma once
#include "message_list.hpp"
#include "source_address.hpp"
namespace dbg
{
void FireAssert(SourceAddress const & sa, string const & msg);
}
#define CHECK(x, message) do { if (x) {} else { ::dbg::FireAssert(SRC(), ::msg::MessageList message); } } while (false)
#ifdef DEBUG
#define ASSERT(x, msg) CHE... | 369 | 137 |
// 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/task_manager/task_manager_resource_providers.h"
#include <string>
#include "base/basictypes.h"
#include "base/bind.h"
#incl... | 60,491 | 17,448 |
// Copyright (C) 2016 Vicente J. Botet Escriba
//
// 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)
#ifndef JASEL_EXAMPLE_FRAMEWORK_MEM_USAGE_HPP
#define JASEL_EXAMPLE_FRAMEWORK_MEM_USAGE_HPP
#if __cplusplus >= 20... | 1,528 | 591 |
/**
*\file
* TestBufferView.h
*\author
* Sylvain Doremus
*/
#ifndef ___D3D11Renderer_BufferView_HPP___
#define ___D3D11Renderer_BufferView_HPP___
#pragma once
#include "renderer/D3D11Renderer/D3D11RendererPrerequisites.hpp"
namespace ashes::d3d11
{
class BufferView
{
public:
BufferView( VkDevice device
, VkBu... | 634 | 275 |
/*
* 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 ... | 5,800 | 1,797 |
// -*- C++ -*-
// $Id: OS_NS_math.inl 1861 2011-08-31 16:18:08Z mesnierp $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS {
ACE_INLINE double
log2 (double x)
{
return ace_log2_helper (x);
}
} // ACE_OS namespace
ACE_END_VERSIONED_NAMESPACE_DECL
| 267 | 137 |
/*
* Anti-doublon
*/
#ifndef __OPENKN_MATH__MATH_IO_HPP__
#define __OPENKN_MATH__MATH_IO_HPP__
/*
* External Includes
*/
#include <cstring>
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
#include "Eigen/Dense"
using namespace Eigen;
/*
* Namespace
*/
namespace kn {
/**
* \co... | 6,734 | 2,012 |
/***********************************************************************
created: 13/4/2004
author: Paul D Turner
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2012 Paul D T... | 18,274 | 4,679 |
/*
SequentialCounter.cpp
Li-Yi Wei
07/07/2007
*/
#include "SequentialCounter.hpp"
SequentialCounter::SequentialCounter(void)
{
// nothing else to do
}
SequentialCounter::SequentialCounter(const int dimension, const int digit_min, const int digit_max) : Counter(dimension), _digit_min(dimension), _digit_... | 2,008 | 707 |
/*
* Copyright (c) 2020 Andreas Pohl
* Licensed under MIT (https://github.com/apohl79/audiogridder/blob/master/COPYING)
*
* Author: Andreas Pohl
*/
#include "App.hpp"
#include <signal.h>
#include "Server.hpp"
namespace e47 {
App::App() : m_menuWindow(this) {}
void App::initialise(const String& commandLinePar... | 2,130 | 741 |
/**
* Created by Xiaozhong on 2020/9/19.
* Copyright (c) 2020/9/19 Xiaozhong. All rights reserved.
*/
#include "iostream"
#include "vector"
#include "algorithm"
using namespace std;
class Node {
public:
int val;
Node *prev;
Node *next;
Node *child;
};
class Solution {
private:
Node *dfs(Node *... | 1,020 | 446 |
// -*- C++ -*-
// $Id: Hello_Sender_exec.cpp 97306 2013-08-31 14:05:50Z johnnyw $
#include "Hello_Sender_exec.h"
#include "ace/Guard_T.h"
#include "ace/Log_Msg.h"
#include "tao/ORB_Core.h"
#include "ace/Date_Time.h"
#include "ace/OS_NS_unistd.h"
#include "ace/Reactor.h"
namespace CIAO_Hello_Sender_Impl
{
// TAO_ID... | 9,305 | 3,284 |
#include <bits/stdc++.h>
#include <limits>
using namespace std;
int count_changes_to_palindrom(string s) {
int changes{0};
for (size_t idx = 0; idx < s.length(); ++idx) {
auto current_letter = s.at(idx);
auto mirror_letter = s.at(s.length() - idx - 1);
cout << current_letter << "--" <<... | 1,538 | 533 |
class Solution {
public:
int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {
if (obstacleGrid.empty() || obstacleGrid[0].empty()){
return 0;
}
int row = obstacleGrid.size();
int column = obstacleGrid[0].size();
vector<vector<int>> board(row, vector... | 948 | 368 |
#include "agent_based_epidemic_sim/core/hazard_transmission_model.h"
#include <array>
#include <iterator>
#include <numeric>
#include <vector>
#include "absl/random/distributions.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
#include "agent_based_epidemic_sim/core/constants.h"
#include "agent_based_epid... | 2,626 | 834 |
#include "RecorteMarioSaltando.hpp"
#define ESTADOS_MARIO 12
#define DESPLAZAMIENTO_X 20
#define ALTO 28
#define ANCHO 20
RecorteMarioSaltando::RecorteMarioSaltando(){
estadoActual = 0;
inicializarEstados(ESTADOS_MARIO,DESPLAZAMIENTO_X,ALTO,ANCHO);
}
void RecorteMarioSaltando::actualizarSprite(){
if(ciclo... | 609 | 259 |
/* CirKit: A circuit toolkit
* Copyright (C) 2009-2015 University of Bremen
* Copyright (C) 2015-2016 EPFL
*
* 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, in... | 2,433 | 892 |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... | 13,473 | 5,133 |
#include "../include/cli3DS.h"
Option::Option(std::string _text) : text(_text) {
selectable = false;
selected = false;
view_entry = NULL;
}
std::string Option::get_text() {
return text;
}
void Option::set_selectable() {
view_entry = NULL;
selectable = true;
}
bool Option::get_selectable() {
... | 1,134 | 371 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
* The mai... | 105,333 | 30,198 |
#include "defs.h"
#include <optional>
#include <utility>
#include <vector>
/**
* Solves the quadratic formula of where a ray intersects the surface of a
* sphere.
*
* Derivation comes from:
*
* ```
* radius^2 = |P - center| * |P - center| => <P-center, P-center>
* P = origin + dir*t
* ```
*
* ... | 2,742 | 964 |
#include "main.h"
int main() {
const char* base_map =
".............."
". ... ."
". .... * ."
". . ."
". O . v.. ."
". R<<. ."
". .... .. ."
". ... . ."
". . O ."
". . .. ."
". ... | 572 | 224 |
//===-- ProcessInfoTest.cpp -------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 708 | 243 |
/*
Copyright (c) "2018-2019", Shenzhen Mindeng Technology Co., Ltd(www.niiengine.com),
Mindeng Base Communication Application Framework
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redi... | 11,677 | 3,548 |
#include <iostream>
#include <vector>
#include <random>
#include <string>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include "phong_shader.hpp"
#include "Shaders/shaders.hpp"
PhongShader::PhongShader()
{
std::string vSSrc = Shaders::getVertexShader();
std::string fSSrc = Shaders::getFragmentSha... | 2,303 | 872 |
#include "utils.h"
static FILE* out;
static jrawMonitorID vmtrace_lock;
static jlong start_time;
void check_jvmti_error(jvmtiEnv *jvmti, jvmtiError errnum, const char *str) {
if (errnum != JVMTI_ERROR_NONE) {
char *errnum_str;
errnum_str = NULL;
(void) jvmti->GetErrorName(errnum, &errnum_str);
printf("ERRO... | 2,183 | 842 |
/*
* GridTools
*
* Copyright (c) 2014-2021, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include "../../meta/list.hpp"
namespace gridtools {
namespace stencil {
namespace core {
t... | 688 | 215 |
#include <iostream>
#include <numeric>
#include <fstream>
#include <climits>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <deque>
#include <vector>
#include <string>
#include <cstdlib>
#include <cassert>
#include <sstream>... | 1,532 | 865 |
/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2012 UniPro <ugene@unipro.ru>
* http://ugene.unipro.ru
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version... | 8,527 | 2,770 |
#include <cstdio>
#include <cstring>
#include <string>
//http://wjwwood.io/serial/doc/1.1.0/classserial_1_1_serial.html
#include "telecom/telecom.h"
#define ERR_CHECK \
do { if (com.status() != 0){ \
fprintf(stdout, "Error: %s\n", com.verboseStatus().c_str()); \
return com.status(); \
} } while(0)
int main... | 1,891 | 692 |
//
// main.cpp
//
// Exercises the calendar class.
//
// --------------------------------------------------------------------------
// Attribution: "Programming Abstractions in C++" by Eric Roberts
// Chapter 6, Exercise 5
// Stanford University, Autumn Quarter 2012
// http://web.stanford.edu/class/archive/cs/cs106b/cs... | 989 | 352 |
#include "../../include/solution.h"
class Solution {
public:
ListNode* removeNthFromEnd(ListNode* head, int n) {
int len = 0;
auto tail = head;
while (tail) {
len++;
tail = tail->next;
}
int id = 0;
ListNode* fake_head = new ListNode(0);
... | 1,346 | 415 |
#include "AnimationChannel.hpp"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/matrix_interpolation.hpp>
#include <Utils/Serialization/SerializationArchives.hpp>
namespace AGE{
void AnimationChannel::fin... | 2,100 | 1,023 |
// --------------------------------------------------------------------
/*
tcbn_create.cpp
Dec/27/2011
*/
// --------------------------------------------------------------------
#include <iostream>
#include <cstring>
#include <map>
#include <tcbdb.h>
using namespace std;
// ----------------------------------... | 2,380 | 1,009 |
#pragma once
#include <memory>
#include <functional>
#include <cstdlib>
#include "IDiscIO.hpp"
#include "Util.hpp"
namespace nod {
class IFileIO {
public:
virtual ~IFileIO() = default;
virtual bool exists() = 0;
virtual uint64_t size() = 0;
struct IWriteStream : nod::IWriteStream {
uint64_t copyFromDisc... | 2,229 | 798 |
//
// Created by Alex Beccaro on 03/12/18.
//
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include "../../src/problems/101-150/106/problem106.hpp"
BOOST_AUTO_TEST_SUITE( Problem106 )
BOOST_AUTO_TEST_CASE( Example1 ) {
auto res = problems::problem106::solve(4);
BOOST_CHECK_EQUA... | 633 | 279 |
#include <algorithm>
#include <ctime>
#include <fstream>
#include <iostream>
#include <sstream>
#include <openssl/hmac.h>
#include <tw/authenticator.h>
#include <tw/base64.h>
#include <tw/oauth.h>
#include <utils.h>
static const char *INSTRUCTIONS = "In order to allow LynxBot to use your "
"Twitter account, you must r... | 5,030 | 1,888 |
// Bring in gtest
#include <gtest/gtest.h>
#include <boost/cstdint.hpp>
// Helpful functions from libsm
#include <sm/eigen/gtest.hpp>
#include <sm/kinematics/quaternion_algebra.hpp>
#include <sm/kinematics/UncertainTransformation.hpp>
TEST(UncertainTransformationTestSuite, testConstructor)
{
using namespace sm::k... | 6,685 | 2,798 |
#include <bits/stdc++.h>
using namespace std;
int N, V;
int K[10];
vector<int> C[10];
int ans;
void func(int r, int c) {
if (r == N) {
ans += 1;
} else if (c >= (int) C[r].size()) {
func(r + 1, 0);
} else {
int curr = 1;
if (c - 1 >= 0) {
curr = max(curr, ... | 885 | 365 |
#include <unistd.h>
#include "db_logger.h"
#include "util.h"
// static
bool DbLogger::LOG_FLOW_INFO_ = false;
bool DbLogger::Connect() {
//
return true;
}
DbLogger::DbLogger(string table_subfix) : table_subfix_(table_subfix) {
if (!Connect()) {
exit(-1);
}
has_init_coflow_info_table_ = false;
if (L... | 9,414 | 3,561 |
//sets up the game and starts the main loop
#include "Game.h"
int Game::instances = 0;
void Game::run() {
bool running = true; //set running to true
SDL_Event sdlEvent;
std::cout << "Progress: About to enter main loop" << std::endl;
while (running)
{
while (SDL_PollEvent(&sdlEvent))
{
if (sdlEvent.type... | 3,497 | 1,346 |
#include "HelperApp.h"
#include <vector>
#include <QApplication>
#include <QHostAddress>
#include <Core/Macros.h>
HelperApp::HelperApp(u16 port, QObject* parent)
: QObject(parent)
, m_menu()
, m_tcpSocket()
, m_socketReadData()
, m_dbConn()
, m_projectsWindow(m_dbConn)
, m_errorsWindow(m_d... | 3,206 | 1,084 |
#include "cameranorotation.h"
CameraNoRotation::CameraNoRotation()
{
}
void CameraNoRotation::mouseMove(const QPointF &p)
{
if(firstPassInMouseMove){
lastPos3D=mousePosTo3D(p);
firstPassInMouseMove=false;
return;
}
QTime currentTime = QTime::currentTime();
vp = mousePosTo3D(... | 499 | 204 |
#include "parameters_parser.hh"
#include "flags.hh"
namespace Kakoune
{
String generate_switches_doc(const SwitchMap& switches)
{
String res;
if (switches.empty())
return res;
auto switch_len = [](auto& sw) { return sw.key.column_length() + (sw.value.takes_arg ? 5 : 0); };
auto switches_len ... | 3,094 | 967 |
/*++
Copyright (c) 1995 Microsoft Corporation
Module Name:
apimonwin.h
Abstract:
Implemenation for the base ApiMon child window class.
Author:
Wesley Witt (wesw) Dec-9-1995
Environment:
User Mode
--*/
#include "apimonp.h"
#pragma hdrstop
#include "apimonwn.h"
A... | 3,202 | 1,187 |
#include<iostream>
using namespace std;
int main(int argc, char* argv[])
{
int n = 0;
cin >> n;
int* o = new int[n] {0};
for (int i = 0; i < n; ++i)
{
cin >> o[i];
}
int max = o[0];
int min = o[0];
for (int i = 0; i < n; ++i)
{
if (o[i] < min)
{
min = o[i];
}
if (o[i] > max)
{
max = o[i];... | 500 | 297 |
#include "SED.h"
// Could remove the columns that are all zeros and speed up the computation
SED::SED(){}
void SED::ComputeObjFunMuti( vector<int> all_distance_block, VectorXd* smp_vec_muti, vector<double>* obj_seq_pt, int val_idx ) {
double obj_tmp = 0;
for (int i=0; i<all_distance_block.size(); i++) {... | 2,961 | 1,135 |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... | 5,652 | 2,184 |
/*
* Copyright (c) 2016 dresden elektronik ingenieurtechnik gmbh.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
*/
#include "de_web_plugin_private.h"
/*! WSN... | 3,104 | 1,028 |
#include <gtest/gtest.h>
#include <searchlib.h>
#include <filesystem>
#include <fstream>
#include "test_utils.h"
using namespace searchlib;
const auto KJV_PATH = "../../test/t_kjv.tsv";
auto normalizer = [](auto sv) { return unicode::to_lowercase(sv); };
static auto kjv_index() {
InMemoryInvertedIndex<TextRang... | 3,366 | 1,558 |
// Copyright 2009 by BBN Technologies Corp.
// All Rights Reserved.
#include "Generic/common/leak_detection.h"
#include "Generic/theories/Region.h"
#include "Generic/common/LocatedString.h"
#include "Generic/common/OutputUtil.h"
#include "Generic/common/InternalInconsistencyException.h"
#include <wchar.h>
#... | 3,405 | 1,139 |
// Author: Mihai Oltean, https://mihaioltean.github.io, mihai.oltean@gmail.com
// More details: https://jenny5.org, https://jenny5-robot.github.io/
// Source code: github.com/jenny5-robot
// License: MIT
// ---------------------------------------------------------------------------
#include "lidar_controller.h"
#includ... | 4,048 | 1,417 |
/*
* Copyright (C) 2009 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... | 2,926 | 865 |
/**
* @file plrmsg.cpp
*
* Implementation of functionality for printing the ingame chat messages.
*/
#include "all.h"
static BYTE plr_msg_slot;
_plrmsg plr_msgs[PMSG_COUNT];
/** Maps from player_num to text colour, as used in chat messages. */
const char text_color_from_player_num[MAX_PLRS + 5] = { COL... | 5,336 | 2,601 |
30 atime=1476297919.065719166
30 ctime=1476297919.066923277
| 60 | 54 |
/**
* Copyright (c) 2018, University Osnabrück
* 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 li... | 13,547 | 4,265 |
//==============================================================================
///
/// File: DeviceGraphicsDX11Shader.cpp
///
/// Copyright (C) 2000-2013 by Smells Like Donkey, Inc. All rights reserved.
///
/// This file is subject to the terms and conditions defined in
/// file 'LICENSE.txt', which is part of this... | 11,113 | 3,442 |
#include <vector>
#include <algorithm>
using namespace std;
#include "longestArithmeticSubsequence.h"
/////////// For Testing ///////////////////////////////////////////////////////
#include <time.h>
#include <cassert>
#include <string>
#include <iostream>
#include "../common/iostreamhelper.h"
void testLongestArit... | 1,162 | 361 |
// Copyright 2017 the V8 project 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/builtins/builtins-utils-gen.h"
#include "src/builtins/builtins.h"
#include "src/code-stub-assembler.h"
namespace v8 {
namespace internal ... | 775 | 254 |
// 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.
#include "third_party/blink/renderer/core/animation/timing_input.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/b... | 19,705 | 6,111 |
#include<iostream>
using namespace std;
int main(){
// Floyd's Pattern
int n;
cin>>n;
int count = 0;
for(int i=1; i<=n; i++){
for(int j=1; j<=i; j++){
cout<<count+1<<" ";
count = count + 1;
}
cout<<endl;
}
return 0;
} | 294 | 112 |
/*
* Copyright (c) 2011 Motorola Mobility, 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 cond... | 124,497 | 37,579 |
/*
* 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,283 | 983 |
// Copyright (c) 2016 ASMlover. All rights reserved.
//
// ____ __
// /\ _`\ /\ \
// \ \ \/\_\\ \ \___ __ ___ ____
// \ \ \/_/_\ \ _ `\ /'__`\ / __`\ /',__\
// \ \ \L\ \\ \ \ \ \/\ \L\.\_/\ \L\ \/\__, `\
// \ \____/ \ \_\ \_\ \__/.\_\ \____/\/\____/
// \/___/ \/_/\/_/\/__/\/_/\/___... | 7,976 | 2,890 |
/******************************************************************************
* Copyright 2018 The Apollo 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
... | 3,100 | 1,014 |
// Copyright 2020, Robotec.ai sp. z o.o.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... | 2,177 | 712 |
/*
* Copyright (C) 2010 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... | 8,742 | 2,993 |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ----... | 4,302 | 1,642 |
#include <torch/script.h> // One-stop header.
#include <torch/torch.h>
#include <chrono>
#include <iostream>
#include <memory>
using Time = decltype(std::chrono::high_resolution_clock::now());
Time time() {return std::chrono::high_resolution_clock::now();};
double
time_diff(Time t1, Time t2)
{
typedef std::chr... | 2,063 | 757 |
#ifndef XPCC_LPC111X__ADC_HPP
#define XPCC_LPC111X__ADC_HPP
#include "../device.h"
/* ---------- ADC Data Register bit names --------------------*/
#define ADC_GDR_DONE (1 << 31)
#define ADC_DR_DONE ADC_GDR_DONE
/* ---------- ADC Control Register bit names ------------------*/
#define ADC_CR_SEL_MASK (0xff << 0) ... | 12,580 | 5,703 |
template<typename C>
void print2nd(const C& container) {
if (container.size() > 2) {
C::const_iterator iter(container.begin());
...
}
} | 147 | 52 |
#include "SimpleRenderModeFactory.h"
#include "LoggerAPI.h"
#include "Vertex.h"
#include <array>
#include <cassert>
using std::array;
SimpleRenderModeFactory::SimpleRenderModeFactory(GPUPtr &gpu, const ScenePtr &scene) :
m_gpu(gpu),
m_scene(scene)
{
}
SimpleRenderMode SimpleRenderModeFactory::crea... | 10,305 | 3,635 |
#include "track.h"
using namespace mctracker::tracker;
Track
::Track(const float& _x, const float& _y, const KalmanParam& _param, const cv::Mat& h, const int cameraNum)
: Entity(), hist(h)
{
kf = std::shared_ptr<KalmanFilter>(new KalmanFilter(_x, _y, _param.getDt()));
ntimes_propagated = 0;
freezed = ... | 1,522 | 551 |
/*------------------------------------------------------------
* CACTI 6.5
* Copyright 2008 Hewlett-Packard Development Corporation
* All Rights Reserved
*
* Permission to use, copy, and modify this software and its documentation is
* hereby granted onl... | 20,848 | 8,602 |
//
// Created by ekaterina on 08.10.2020.
//
// Copyright 2020 Your Name <ekaterina>
#ifndef INCLUDE_HEADER_HPP_
#define INCLUDE_HEADER_HPP_
#include <vector>
#include <string>
#include "Student.hpp"
class Table {
public:
explicit Table(const json& j);
~Table();
static Table parseFile(const std::string& s);... | 556 | 237 |
// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit
// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
// other details. No copyright assignment is required to contribute to Conduit.
//-----------------------------------------------------------------------------
///... | 53,068 | 22,544 |
//
// code_1.cpp
// Algorithm
//
// Created by Mohd Shoaib Rayeen on 23/11/18.
// Copyright © 2018 Shoaib Rayeen. All rights reserved.
//
#include <iostream>
using namespace std;
long countWays(int n, int k) {
long dp[n + 1];
memset(dp, 0, sizeof(dp));
int mod = 1000000007;
dp[1] = k;
long ... | 721 | 324 |
#include "CrosshairDrawer.hpp"
#include "Dr16.hpp"
#include "math.h"
#include "BoardPacket.hpp"
void CrosshairDrawner::Init()
{
SetDefaultTicksToUpdate(550);
m_pGimbalController = (GimbalController*)GetOwner()->GetEntity(ECT_GimbalController);
m_rpcIndex = 255;
BoardPacketManager::Instance()->GetTes... | 7,723 | 3,056 |
// Copyright 2009-2021 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2021, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directory... | 1,701 | 675 |
#include <cstdio>
int main(){
int n, k; scanf("%d %d", &n, &k);
int t = 240 - k;
int count(0);
while(t >= 5 * (count + 1)){++count; t -= 5 * count;}
count = (n < count) ? n : count;
printf("%d\n", count);
return 0;
}
| 248 | 111 |
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE banner below
* An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
*... | 13,990 | 5,391 |
#include <AMReX.H>
#include "MyTest.H"
int main (int argc, char* argv[])
{
amrex::Initialize(argc, argv);
{
BL_PROFILE("main");
MyTest mytest;
for (int i = 0; i < 1; ++i) {
mytest.solve();
}
mytest.writePlotfile();
}
amrex::Finalize();
}
| 310 | 128 |