text string | size int64 | token_count int64 |
|---|---|---|
#include <stdlib.h>
#include "serving/processor/serving/model_config.h"
#include "serving/processor/serving/tracer.h"
#include "include/json/json.h"
#include "tensorflow/core/util/env_var.h"
#include "tensorflow/core/lib/core/errors.h"
namespace tensorflow {
namespace processor {
namespace {
constexpr int DEFAULT_CP... | 12,570 | 4,162 |
// Copyright (c) 2017 by Addison-Wesley, David Vandevoorde, Nicolai M. Josuttis, and Douglas Gregor. All rights reserved.
// See the LICENSE file in the project root for more information.
//
// Name: byref.hpp
// Author: crdrisko
// Date: 08/13/2020-12:12:50
// Description: Missing file from book
#ifndef BYREF_HPP
#de... | 437 | 172 |
#include "sim/init.hh"
namespace {
const uint8_t data_m5_internal_enum_TimingExprOp[] = {
120,156,197,88,239,114,211,214,18,223,35,201,78,236,56,196,
36,144,240,39,128,129,2,190,92,18,67,248,219,194,48,165,
109,218,161,211,134,123,37,58,80,181,115,85,199,58,177,21,
108,201,149,142,67,220,73,190,52,157... | 8,061 | 7,453 |
#include <iostream>
using namespace std;
int main()
{
for (int i = 0; i != 6; ++i)
cout << "Hello "[i] << ' ';
for (int i = 0; i != 6; ++i)
cout << *("World!" + i) << ' ';
cout << endl;
return 0;
}
| 246 | 101 |
#include "../classfile/AccessFlag.h"
#include "../classfile/ClassFile.h"
#include "../misc/Debug.h"
#include "../misc/Option.h"
#include "../runtime/JavaClass.h"
#include "../runtime/JavaHeap.hpp"
#include "CallSite.h"
#include "Interpreter.hpp"
#include "MethodResolve.h"
#include "SymbolicRef.h"
#include <cassert>
#i... | 75,637 | 20,745 |
#ifdef _OPENMP
#include<omp.h>
#endif
#include "WRP.h"
int OPHWRP::readxyz(string filename) //read point cloud
{
int dimen = 3;
ifstream infilee(filename);
string temp, temp2mat;
vector <string> temsplit;
if (!infilee)
{
cerr << "can not read the file";
return -1;
}
while (getline(infilee, temp))
{... | 2,593 | 1,310 |
// Copyright (c) 2012 Daniel Kogler
//
// 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)
//this file simply enumerates a multitude of functions used to define the action
//used in the benchmark. Which functi... | 5,698 | 2,190 |
#include "lab4/classic_newton.h"
#include <lab3/solver.h>
#include <utility>
#include "iostream"
using namespace lab4;
ClassicNewton::ClassicNewton() : p(lab2::Vector({1})) {}
lab2::Vector ClassicNewton::iteration(lab2::NFunction& f, double) {
lab2::Vector x = get_points().back();
p = la... | 495 | 190 |
#include "dummy_server_handler.h"
#include <iostream>
DummyServerHandler::DummyServerHandler(
const std::shared_ptr<BaseConfig> &config) {
append_string = config->get_string_field({"AppendString"});
}
void DummyServerHandler::handle_request(const std::shared_ptr<Request> &req) {
std::cout << req->get_body() <... | 564 | 194 |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of... | 54,852 | 15,528 |
#include <iostream>
#include "World.h"
using namespace std;
int main()
{
World* house = new World();
cout << "You are in the: " << house->getPlayer()->getLocation()->getName() << ". "
<< house->getPlayer()->getLocation()->getDescription() << endl;
cout << "\n";
// GameLoop
while(!house->getPlayer()->isPlayer... | 483 | 173 |
#include "misc.h"
float LinearInterpolation(float first, float second, float weight){
float result = weight * second + (1.0f - weight) * first;
return result;
}
float CosineInterpolation(float first, float second, float weight){
float modifiedWeight = (1 - cos(weight * 3.14))/2.0f;
modifiedWeigh... | 452 | 148 |
/******************************************************************
*
* Round for C++
*
* Copyright (C) Satoshi Konno 2015
*
* This is licensed under BSD-style license, see file COPYING.
*
******************************************************************/
#include <boost/test/unit_test.hpp>
#include <sstream... | 4,650 | 1,674 |
class Solution {
public:
vector<int> countBits(int num) {
vector<int>ans;
int two[30];
int now;
int SIZE = 30;
two[0] = 1;
for(int i = 1; i < SIZE; i++)
two[i] = two[i - 1] * 2;
ans.push_back(0);
if(num == 0) return ans;
a... | 826 | 287 |
#include "phys-services/I3FileOMKey2MBIDFactory.h"
#include "phys-services/I3FileOMKey2MBID.h"
I3_SERVICE_FACTORY(I3FileOMKey2MBIDFactory);
I3FileOMKey2MBIDFactory::I3FileOMKey2MBIDFactory(const I3Context& context)
: I3ServiceFactory(context)
{
AddParameter("Infile",
"The file to read the OMKey to MBID co... | 618 | 241 |
//
// Copyright (c) Microsoft Corporation. All Rights Reserved
//
#include "Precomp.h"
#include <array>
#include "NciHciDataPacket.h"
NciHciDataPacket::NciHciDataPacket(
_In_ uint8_t connectionId,
_In_ uint8_t pipeId,
_In_ phHciNfc_MsgType_t messageType,
_In_ uint8_t instruction,
_In_ std::init... | 4,730 | 1,740 |
/*
* Copyright (c) 2014-2022 The Voxie Authors
*
* 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, mer... | 3,350 | 1,066 |
/**
* i != (j < k)
* i != (true/false)
* i != (0/1)
* It means checking if i is 1 or 0 which is resulted from j < k
*/
| 126 | 54 |
// The MIT License (MIT)
// Copyright (c) 2016 Sachin Shenoy
// Player Isolation is a game played between two players, on a 5 by 5
// grid. The first player, player one, has white tokens, while player
// two has black token. The game starts by player one placing a white
// token on one of the 25 squares. After that, ... | 8,773 | 3,556 |
#include "winnie_alloc.h"
#include "new_delete.h"
#if defined(NDEBUG) && OP_NEW_DEBUG
#undef NDEBUG
#pragma message ("warning: NDEBUG and OP_NEW_DEBUG do not match. forcing #undef NDEBUG")
#endif
#include "assert.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <new>
#include "string.h"
#if OP_NEW_... | 7,536 | 2,900 |
#include <iostream>
// linked lists hee hee ha fucking kill me
// SOURCE: https://www.geeksforgeeks.org/linked-list-set-1-introduction/
// modified a bit
class Node {
public:
// int data and pointer to class node?
int data;
Node* next; // pointer to the next node
// example: second->data=2;... | 1,718 | 503 |
#include "WUSB.h"
#include "ftd2xx.h"
#define CRC_Init 0xDE //CRC Initial value
FT_HANDLE ftHandle; //device handle
FT_STATUS ftStatus; //device status
const unsigned char
FEND = 0xC0, //Frame END
FESC = 0xDB, //Frame ESCape
TFEND = 0xDC, //Transposed Frame END
TFESC = 0xDD; //T... | 5,672 | 2,727 |
// Copyright (c) 2016, German Neuroinformatics Node (G-Node)
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted under the terms of the BSD License. See
// LICENSE file in the root of the Project.
#include "nixtag.h"
#include "me... | 5,414 | 1,849 |
#ifndef PAPER_GROUP_HPP
#define PAPER_GROUP_HPP
#include <Paper/Item.hpp>
#include <Paper/Constants.hpp>
namespace paper
{
class Document;
class STICK_API Group : public Item
{
friend class Item;
public:
static constexpr EntityType itemType = EntityType::Group;
Group();
... | 459 | 159 |
////////////////////////////////////////////////////////////////////////
///
/// Copyright (c) 2019, Wasserman lab
///
/// FILE tst_stats.cpp
///
/// DESCRIPTION This file contains tests for the stats class
///
/// Initial version @ Godfrain Jacques Kounkou
///
///////////////////////////////////////////////////... | 3,560 | 1,141 |
/* This file is part of PyMesh. Copyright (c) 2015 by Qingnan Zhou */
#include "VertexCustomOffsetParameter.h"
using namespace PyMesh;
VertexCustomOffsetParameter::VertexCustomOffsetParameter(
WireNetwork::Ptr wire_network, const MatrixFr& offset) :
PatternParameter(wire_network), m_derivative(offset) {
... | 1,328 | 471 |
/**
* Copyright (C) 2015 Topology LP
*
* 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... | 2,478 | 858 |
#include <iostream>
#include <sstream>
#include "OmnetIf_pkt.h"
OmnetIf_pkt::OmnetIf_pkt()
{
fileBuffer_arraysize = 0;
this->fileBuffer = NULL;
}
OmnetIf_pkt::~OmnetIf_pkt()
{
delete [] fileBuffer;
}
void OmnetIf_pkt::setFileBufferArraySize(unsigned int size)
{
char *fileBuffer_var2 = (size==0) ?... | 983 | 368 |
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include ... | 2,002 | 709 |
//******************************************************************
//
// Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except ... | 2,204 | 819 |
#include "PluginDiscovery.h"
#include "LichtensteinPluginHandler.h"
#include "HardwareInfoStruct.h"
#include "../util/StringUtils.h"
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
// includes for i2c
#ifdef __linux__
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#endif
#include <glog/logging... | 4,642 | 1,781 |
/*
** Provides an ALSA implementation of a MIDI output device.
**
**---------------------------------------------------------------------------
** Copyright 2008-2010 Randy Heit
** Copyright 2020 Petr Mrazek
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification... | 12,826 | 5,289 |
#include<bits/stdc++.h>
using namespace std;
int main(){
int arr[]={6, 5, 3, 2, 8, 10, 9};
int n=sizeof(arr)/sizeof(arr[0]);
int k=3;
priority_queue<int,vector<int>,greater<int> > pq;
for(int i=0;i<n;i++){
pq.push(arr[i]);
if(pq.size()==k+1){
cout<<pq.top()<<" ";
... | 443 | 197 |
#include "all.h"
#include "loader.h"
extern"C"{
#include "vorbis\vorbisfile.h"
}
#ifdef _DEBUG
#pragma comment(lib, "ogg_d.lib")
#pragma comment(lib, "vorbis_d.lib")
#else
#pragma comment(lib, "ogg.lib")
#pragma comment(lib, "vorbis.lib")
#endif
//----------------------------
const int BITDEPTH = 16; //bitdept... | 3,927 | 1,410 |
/**
@file
@author Stefan Frings
*/
#include "staticfilecontroller.h"
#include <QFileInfo>
#include <QDir>
#include <QDateTime>
using namespace stefanfrings;
StaticFileController::StaticFileController( const QSettings* settings, QObject* parent ) :
HttpRequestHandler( parent ),
m_encoding( settings->va... | 6,068 | 1,896 |
/**
* Addle source code
* @file
* @copyright Copyright 2020 Eleanor Hawk
* @copyright Modification and distribution permitted under the terms of the
* MIT License. See "LICENSE" for full details.
*/
#ifndef BRUSHID_HPP
#define BRUSHID_HPP
#include "addleid.hpp"
#include "brushengineid.hpp"
namespace Addle {
c... | 579 | 227 |
#ifndef LIBNDGPP_NET_BASIC_IPV4_ADDRESS_HPP
#define LIBNDGPP_NET_BASIC_IPV4_ADDRESS_HPP
#include <cstdint>
#include <array>
#include <ostream>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <libndgpp/error.hpp>
#include <libndgpp/net/ipv4_array.hpp>
namespace ndgpp {
namespace net {
temp... | 9,723 | 3,379 |
// Example usage for MM_Lib-Particle library by Veenema Design Works.
#include "Particle.h"
#include "MM_Lib-Particle.h"
void setup();
void loop();
SYSTEM_MODE(SEMI_AUTOMATIC);
// Initialize the Manager (MUST BE DONE BEFORE ANY SETTINGS OR STATE)
MM_Manager AppManager(10);
// Initialize objects from the lib
MM_Inp... | 1,303 | 569 |
#pragma once
#include "RuleSet.hh"
#include "VolumeRegistry.hh"
#include "VolumeSet.hh"
#include <memory>
class Profile
{
public:
const RuleSet& getRuleSet() const { return getRuleSet_impl(); }
RuleSet& getRuleSet() { return getRuleSet_impl(); }
const VolumeRegistry& getVolumeRegistry() const { return getVolum... | 597 | 188 |
//
// Created by 赖於领 on 2021/9/1.
//
#include <vector>
#include <iostream>
using namespace std;
//最佳观光组合
class Solution {
public:
int maxScoreSightseeingPair(vector<int> &values) {
// if (values.size() == 2) {
// return values[0] + values[1] - 1;
// }
//values[i]+values[j]+i-j... | 996 | 429 |
#include "collision/spherecollider.hpp"
#include "collision/aabbcollider.hpp"
#include <cstddef>
using namespace Collision;
SphereCollider::SphereCollider(const glm::vec3& center, const float radius){
this->center = glm::vec3(center);
this->radius = radius;
}
bool SphereCollider::visitCollide(Collider* node){
retu... | 1,343 | 528 |
#include <cinttypes>
#include <cstdint>
#include "utility/log.hpp"
#include "utility/time/time.hpp"
int main()
{
sjsu::LogInfo("Delay Application Starting...");
sjsu::LogInfo("This demo prints a statement every second using Delay(1s).");
sjsu::LogInfo(
"Notice that the uptime does not increase by 1 secon... | 676 | 246 |
/********************************************************************
created: 2011/12/21
filename: RenderProperty.cc
author: Crazii
purpose:
*********************************************************************/
#include <BladePCH.h>
#include <interface/public/graphics/RenderProperty.h>
#include <interface/publ... | 4,991 | 1,740 |
// Copyright 2006 Peralex Electronics (Pty) Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | 2,763 | 1,104 |
#include <deque>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int horizontal_length;
int vertical_length;
vector<vector<bool>> maze;
vector<vector<bool>> is_visited;
deque<pair<int, int>> neighboring_paths;
int number_of_needed_pop_front;
int current_new_path_count;
int row_step[4] = ... | 2,710 | 920 |
//
// get_environment_from_os.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Defines a pair of functions to get the environment strings from the operating
// system. These functions copy the environment strings into a CRT-allocated
// buffer and return a pointer to that buffer. The cal... | 3,505 | 1,122 |
//=================================================================================================================================
// Joe Schutte
//=================================================================================================================================
#include "BuildCommon/CDisneySceneBuildP... | 29,192 | 7,456 |
// question link: https://www.geeksforgeeks.org/common-elements-in-all-rows-of-a-given-matrix/
#include <bits/stdc++.h>
using namespace std;
vector<int> findCommon(vector<vector<int>> &nums)
{
vector<int> common;
unordered_map<int, int> map;
// marking all row 0 elements as present
for (int j = 0; j ... | 1,477 | 550 |
// Name: Tommy Le
// This program calculates the tax and tip on a restaurant bill.
#include <iostream>
int main()
{
double mealcost,tax,tip,totalbill;
std::cout << "Welcome to the Restaurant Bill Calculator!\n";
//Input Meal Cost
std::cout << "What is the total meal cost? ";
std::cin >> mealcost;
//... | 622 | 239 |
#include "Kernels/vnImageNearest.h"
#include "Utilities/vnImageBlock.h"
VN_STATUS vnNearestKernel( CONST CVImage & pSrcImage, FLOAT32 fX, FLOAT32 fY, UINT8 * pRawOutput )
{
if ( VN_PARAM_CHECK )
{
if ( !VN_IS_IMAGE_VALID(pSrcImage) || !pRawOutput )
{
return vnPostError( VN_ERROR_I... | 1,150 | 469 |
// This file has been generated by Py++.
#ifndef TriangleList_hpp__pyplusplus_wrapper
#define TriangleList_hpp__pyplusplus_wrapper
void register_TriangleList_class();
#endif//TriangleList_hpp__pyplusplus_wrapper
| 215 | 70 |
////////////////////////////////////////////////////////////////////////////////
// flash.cpp
////////////////////////////////////////////////////////////////////////////////
extern "C"
{
#include "gd32vf103.h"
}
#include "GD32VF103/spi.h"
#include "GD32VF103/gpio.h"
#include "GD32VF103/time.h"
#include "Longan/lc... | 12,766 | 5,821 |
#include <iostream>
#include <stdexcept>
#include "../globals.hpp"
#include "opcodes.hpp"
using namespace std;
opcodes::opcodes() {
std::map<unsigned short, int> optable;
}
opcodes::~opcodes() {
}
/**
* Gets function from the hashtable at a given index - If the function has not yet
* been added to the lookup ... | 13,076 | 6,132 |
#include <bits/stdc++.h>
using namespace std;
int postfixEvaluation(string s)
{
stack<double> st;
for (int i = 0; i < s.length(); i++)
{
if (s[i] >= '0' && s[i] <= '9')
{
st.push(s[i] - '0');
}
else
{
double op2 = st.top();
st.pop(... | 941 | 315 |
#include "phoenix.hpp"
using namespace nall;
using namespace phoenix;
struct TestWindow : Window {
TestWindow() {
setGeometry({64, 64, 480, 640});
setTitle("Test Window");
onClose = [&] {
setVisible(false);
};
}
} *testWindow = nullptr;
struct Application : Window {
VerticalLayout layout;... | 2,386 | 894 |
#include <stdlib.h> // pocketpt, single-source GLSL path tracer by Reinhold Preiner, 2020
#include <stdio.h> // based on smallpt by Kevin Beason
#include <windows.h> // Make: g++ -O3 pocketpt.cpp -o pocketpt -lopengl32 -lgdi32
#include <GL/GL.h> // Usage: ./pocketpt <samplesPerPixel> <y-resolution>,... | 8,161 | 3,495 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int k;
ll sum = 0;
cin >> k;
for(int i=1; i<=k; i++){
for(int j=1; j<=k; j++){
int a = __gcd(i, j);
for(int l=1; l<=k; l++){
sum+= __gcd(a, l);
}
}
}
cout << sum << endl;
return 0;
}
| 298 | 165 |
#include "Capstan/Allocators/DoubleStackAllocator.h"
| 53 | 20 |
#include "Canopen.hpp"
#include "ANSIEscapeCodes.hpp"
#include "CanFestivalLocker.hpp"
#include "Logging.hpp"
#include "PeripheralDrivers/CanIO.hpp"
#include "PeripheralDrivers/TerminalIO.hpp"
#include <algorithm>
namespace remote_control_device
{
Canopen *Canopen::_instance = nullptr;
Message Canopen::RTD_StateBoot... | 23,656 | 7,226 |
////////////////////////////////////////////////////////////////////////////////
//
// Test program for The Loki Library
// Copyright (c) 2008 Richard Sposato
// The copyright on this file is protected under the terms of the MIT license.
//
// Permission to use, copy, modify, distribute and sell this software for any
/... | 13,759 | 3,924 |
// Autogenerated from CppHeaderCreator on 7/27/2020 3:09:17 PM
// Created by Sc2ad
// =========================================================================
#pragma once
#pragma pack(push, 8)
// Begin includes
// Including type: UnityEngine.MonoBehaviour
#include "UnityEngine/MonoBehaviour.hpp"
#include "utils/il2cp... | 1,524 | 519 |
// Copyright (c) 2015-2015 The restful Authors. All rights reserved.
// Created on: 2015/11/24 Author: jiaoyongqing
#include<malloc.h>
#include<stdlib.h>
#include<memory.h>
#include <string>
#include <sstream>
#include <map>
#include <list>
#include <vector>
#include "tools/tools.h"
#include "tea/tea.h"
#include "ne... | 11,089 | 4,411 |
#pragma once
#include "Rimfrost\EventSystem\Event.hpp"
namespace Rimfrost
{
class EventObserver
{
public:
EventObserver() = default;
virtual ~EventObserver() = default;
virtual void onEvent(const Event& e) = 0;
};
}
| 228 | 85 |
version https://git-lfs.github.com/spec/v1
oid sha256:943d9f005beb984bd9d29ed487bf6adf30882f9fa79903c6092cbd91ecee3e90
size 6381
| 129 | 89 |
// lambdaAndAuto.cpp
#include <functional>
#include <iostream>
double divMe(double a, double b){
return double(a/b);
}
using namespace std::placeholders;
int main(){
std::cout << std::endl;
// invoking the function object directly
std::cout << "1/2.0= " << [](int a, int b){ return divMe(a, b); }(1, 2.0) <... | 1,060 | 412 |
#include <whisperstreamlib/mts/mts_types.h>
#define CHECK_MARKER(bit_array, type, bit_size, expected_value) {\
type marker = bit_array.Read<type>(bit_size);\
if ( marker != expected_value ) {\
LOG_ERROR << "Invalid marker: " << (int)marker\
<< ", expected: " << (int)expected_value;\
... | 12,063 | 4,618 |
#include "DocumentRoot.h"
//static const double pi = std::acos(-1.0); // お手軽に π を得る。
//==============================================================
// Constructor / Destructor
//==============================================================
//--------------------------------------------------------------
//
//-----... | 8,948 | 2,709 |
#include "SQLite.h"
#include <sqlite3/sqlite3.h>
#include <stdio.h>
#include <vector>
namespace beebox
{
CSQLite::CSQLite()
{
m_db = NULL;
}
CSQLite::~CSQLite()
{
close();
}
bool CSQLite::open(string filePath)
{
if (m_db)
{
close();
}
return sqlite3_open_v2(filePath.c_str(), &m_db, ... | 3,508 | 1,256 |
/*
Given a value N, if we want to make change for N cents, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins, How many ways can we make
the change? The order of coins doesn’t matter.
input: N = 4
S = [ 1, 2, 3 ]
Output = 4
There are four solutions: [ 1, 1, 1,... | 1,246 | 509 |
#include<iostream>
#include<bits/stdc++.h>
#include<unordered_map>
using namespace std;
int countindexpairs(int arr[],int n)
{
unordered_map<int,int> mp;
for(int i=0;i<n;i++)
mp[arr[i]]++;
int ans=0;
unordered_map<int,int> ::iterator it;
for(it = mp.begin();it != mp.end();it++)
{
int fre... | 542 | 252 |
#include <iostream>
#include <sstream>
#include <vector>
#include <OGRE/Ogre.h>
#include <OIS/OIS.h>
#include "Gui3D.h"
#include "Gui3DPanel.h"
#include "MyEnvironmentDemoPanelColors.h"
typedef struct PanelAndDirection
{
Gui3D::Panel* panel;
Ogre::Vector3 cameraDirection;
int yaw;
} PanelAndDirection;... | 8,946 | 3,231 |
#include <iostream>
#include <cassert>
#include <cmath>
#include <algorithm>
#include <cannon/log/registry.hpp>
#include <cannon/math/primes.hpp>
#include <cannon/math/digits.hpp>
using namespace cannon::log;
using namespace cannon::math;
/*!
* The number 3797 has an interesting property. Being prime itself, it is
... | 1,923 | 750 |
#include <chrono>
#include <glm/geometric.hpp>
#include "camera.h"
#include "orthographic_camera.h"
#include "pinhole_camera.h"
#include "scene.h"
#include "buffer.h"
#include "raytracer.h"
#include "path_tracer.h"
#include "bvh.h"
int main() {
unsigned int width = 256;
unsigned int height = 256;
Pinhole... | 1,901 | 671 |
// Copyright 2015 Patrick Putnam
//
// 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 o... | 2,477 | 827 |
#define max(a, b) a > b ? a : b
#define min(a, b) a < b ? a : b
class bign
{
public:
int len, s[MAX_L];
bign();
bign(const char *);
bign(int);
bool sign;
string toStr() const;
friend istream &operator>>(istream &, bign &);
friend ostream &operator<<(ostream &, bign &);
bign operato... | 7,451 | 2,970 |
#include "smoothmethod.h"
SmoothMethod::SmoothMethod()
{
}
SmoothMethod::~SmoothMethod()
{
}
QImage SmoothMethod::averageFiltering(QImage *originImage)
{
bool ok;
int filterRadius = QInputDialog::getInt(nullptr, QObject::tr("均值滤波"), "输入滤波器大小(1~30)", 3, 1, 30, 1, &ok);
if (ok)
{
if (filterRadi... | 14,729 | 5,071 |
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/visualization/cloud_viewer.h>
#include <opencv2/opencv.hpp>
#include "semanticConf.hpp"
#include "genData.hpp"
int main(int argc,char** argv){
if(argc<4){
std::cout<<"Usage: ./kitti_gen cloud_folder label_folder output_file"<<std::endl... | 2,548 | 945 |
#include "KDFpch.h"
#include "OpenGLContext.h"
#include <GLFW/glfw3.h>
#include <Glad/glad.h>
namespace KDF {
OpenGLContext::OpenGLContext(GLFWwindow* windowHandle)
: m_windowHandle(windowHandle)
{
KDF_CORE_ASSERT(windowHandle, "Window handle is null!");
}
void OpenGLContext::Init()
{
glfwMakeContextCur... | 760 | 317 |
// UVa12096 The SetStack Computer
// Rujia Liu
#include<iostream>
#include<string>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<algorithm>
using namespace std;
#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())
typedef set<int> Set;
map<Set,int> IDcache; // 把集合映射成ID
vector... | 1,221 | 563 |
// Copyright 2016 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 "base/test/scoped_feature_list.h"
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include "base/stl_util.h"
#inclu... | 5,432 | 1,625 |
#ifndef MOONEY_RIVLIN_HH
#define MOONEY_RIVLIN_HH
#include "linalg/invariants.hh"
#include "utilities/functionTools.hh"
namespace Kaskade
{
template <int dim, class VolumetricPenalty = void, Invariant i = Invariant::Principal, class Direction = void> class MooneyRivlin;
/**
* \param lambda first Lame constant... | 5,958 | 2,317 |
#include "hand.h"
Hand::Hand() {
discardAll();
}
void Hand::discardAll() {
curValue.count = 0;
curValue.soft = false;
}
void Hand::addCard(Card c) {
int countCard;
if (c.spot != ACE) {
if (c.spot <= NINE) {
countCard = c.spot + 2;
curValue.count += countCard;
... | 1,117 | 357 |
#ifndef SOKOBAN_AGENT_DEFINES
#define SOKOBAN_AGENT_DEFINES
#include <vector>
#include <string>
#include <iostream>
enum MoveDirection{
Left = 0,
Right = 1,
Up = 2,
Down = 3,
Unspecified = -1,
};
using Map = std::vector<std::string>;
using Position = std::pair<int, int>;
using Decimal = float;
s... | 970 | 317 |
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#ifndef RIGCONFIGURATIONWIDGET_HPP
#define RIGCONFIGURATIONWIDGET_HPP
#include <QWidget>
#include "ui_rigconfigurationwidget.h"
#include "libvideostitch/stereoRigDef.hpp"
class RigConfigurationWidget : public QFrame, public Ui::RigConfiguratio... | 1,561 | 460 |
#include <basic/options/option_macros.hh>
#include <basic/options/keys/corrections.OptionKeys.gen.hh>
#include <riflib/scaffold/nineA_util.hh>
#include <vector>
#ifdef GLOBAL_VARIABLES_ARE_BAD
#ifndef INCLUDED_rif_dock_test_hh_1
#define INCLUDED_rif_dock_test_hh_1
OPT_1GRP_KEY( StringVector , rif_dock, s... | 53,605 | 19,697 |
#include <cstdio>
#include <cstdlib>
#include <image.h>
#include <misc.h>
#include <pnmfile.h>
#include "mex.h"
#include "segment-image.h"
void mexFunction(int nlhs,mxArray* plhs[],int nrhs,const mxArray* prhs[])
{
// check arguments
if (nrhs != 5)
{
mexPrintf("Usage: [seg] = segmentGraphMex_edge(ma... | 1,771 | 779 |
/*/////////////////////////////////////////////////////////////////////////////
/// @summary Implements the entry point of the application. This handles the
/// setup of our third party libraries and the creation of our main window and
/// rendering context, along with implementing the game loop.
/// @author Russell Kl... | 8,806 | 2,784 |
#include "core/logging_event.h"
#include <errno.h>
#include "util/environment.h"
namespace logbox {
LoggingEvent::LoggingEvent(
LogSeverity severity,
const char* file,
int line,
const char* function)
: severity_(severity),
file_fullname_(file),
file_basename_(Environment::GetBasename(... | 473 | 154 |
#include "Time.h"
#include <chrono>
//-------------------------------------------------------------------------
namespace KRG
{
KRG::Nanoseconds EngineClock::CurrentTime = 0;
//-------------------------------------------------------------------------
Nanoseconds::operator Microseconds() const... | 1,197 | 338 |
#include "types.h"
#include "AppThread.h"
/*
* --INFO--
* Address: 80424E18
* Size: 00003C
*/
AppThread::AppThread(u32 stackSize, int msgCount, int priority)
: JKRThread(stackSize, msgCount, priority)
{
}
| 215 | 93 |
class Solution {
public:
int countPrimeSetBits(int L, int R) {
const unordered_set<int> PRIMES = {2,3,5,7,11,13,17,19};
int answer = 0;
for(int num = L; num <= R; ++num){
int setBitsCnt = __builtin_popcount(num);
answer += (PRIMES.find(setBitsCnt) != PRIMES.end... | 370 | 144 |
/*---------------------------------------------------------------------------*\
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2015 Applied CCM
-------------------------------------------------------------------------------
License
This file is part of CAELUS.
CAELUS is free software: you can redist... | 44,217 | 13,753 |
/*
* ParallelTimings.cpp
*
* Created on: 2019-11-05
* Author: Armin Wiebigke
*/
#include <map>
#include "ParallelTimings.h"
namespace NetworKit {
void ParallelTimings::addTime(Aux::Timer &timer, const std::string &name) const {
timer.stop();
double elapsed = timer.elapsedNanoseconds();
auto tid = omp_get_th... | 1,525 | 589 |
#include "prism/texture.h"
#include<algorithm>
#ifdef DREAMCAST
#include <png/png.h>
#else
#include <png.h>
#endif
#include "prism/file.h"
#include "prism/log.h"
#include "prism/system.h"
#include "prism/math.h"
using namespace std;
#define FONT_CHARACTER_AMOUNT 91
static int isFontDataLoaded;
static TextureData ... | 6,370 | 2,861 |
#ifndef PYTHONIC_INCLUDE_BUILTIN_REFERENCEERROR_HPP
#define PYTHONIC_INCLUDE_BUILTIN_REFERENCEERROR_HPP
#include "pythonic/include/types/exceptions.hpp"
PYTHONIC_NS_BEGIN
namespace __builtin__
{
PYTHONIC_EXCEPTION_DECL(ReferenceError)
}
PYTHONIC_NS_END
#endif
| 267 | 129 |
/* $Id: ncbi_safe_static.cpp 177027 2009-11-24 19:19:28Z grichenk $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Gover... | 5,692 | 1,874 |
// This file is part of the Yttrium toolkit.
// Copyright (C) Sergei Blagodarin.
// SPDX-License-Identifier: Apache-2.0
#include <yttrium/geometry/matrix.h>
#include <yttrium/geometry/euler.h>
#include <yttrium/geometry/size.h>
#include <cmath>
#include <numbers>
namespace Yt
{
Matrix4::Matrix4(const Euler& e) noe... | 5,808 | 3,225 |
/****************************************************************************
* Copyright (c) 2012-2017 by the DataTransferKit authors *
* All rights reserved. *
* *
* This ... | 7,054 | 2,041 |
/*
Plugin-SDK (Grand Theft Auto San Andreas) source file
Authors: GTA Community. See more here
https://github.com/DK22Pac/plugin-sdk
Do not delete this comment block. Respect others' work!
*/
#include "CColDisk.h"
// Converted from thiscall void CColDisk::Set(float startRadius,CVector const&start,CVect... | 788 | 241 |
#pragma once
#include "Decode.hpp"
#include "Encode.hpp"
#include "Meta.hpp"
| 78 | 32 |