text string | size int64 | token_count int64 |
|---|---|---|
#include "headers\GameWindows.h"
#include "headers\Errors.h"
int render_splash()
{
sf::RenderWindow *splash_screen = new sf::RenderWindow(sf::VideoMode(887, 407), "", sf::Style::None);
sf::Clock splash_clk;
sf::Texture splash_png;
if (!(splash_png.loadFromFile("res/png/Splash.png"))) {
splash_screen->setVisibl... | 2,346 | 1,047 |
// To test the parallel parking controller before implementing it in a ROS pkg
#include <cmath.h>
#include <stdio.h>
using namespace std;
#define steeringGain 2
#define throttleGain 2
float computeDistance(float first, float second);
int main()
{
x = -2;
xd = -5;
while(x != xd){
steeringCtrl = -steerin... | 429 | 154 |
#ifndef __PREPROCESSING
#define __PREPROCESSING
#include "../preprocessing/errormsg.cpp"
#include "../preprocessing/ioutilities.cpp"
#include "../preprocessing/readbinaryfiles.cpp"
#ifdef HAVE_CUDA
#include "../preprocessing/gpuDeviceInfo.cpp"
#endif
#endif | 260 | 95 |
/*
g++ --std=c++20 -pthread -o ../_build/cpp/utility_make_from_tuple.exe ./cpp/utility_make_from_tuple.cpp && (cd ../_build/cpp/;./utility_make_from_tuple.exe)
https://en.cppreference.com/w/cpp/utility/make_from_tuple
*/
#include <iostream>
#include <tuple>
struct Foo {
Foo(int first, float second, int third) {
... | 508 | 200 |
/**************************************************************************
* Author: Panos Christakoglou. *
* Contributors are mentioned in the code where appropriate. *
* *
* Permission to... | 4,365 | 1,329 |
/*
morda - GUI framework
Copyright (C) 2012-2021 Ivan Gagis <igagis@gmail.com>
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 3 of the License, or
(at your option) any later version... | 6,165 | 2,038 |
//------------------------------------------------------------------------------
//
// Copyright 2018-2020 Fetch.AI Limited
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... | 1,415 | 407 |
#include "serial.h"
int main()
{
Serial gps(4800,"/dev/ttyUSB0",false);
std::cout << gps.serialRead(41) << std::endl;
return 0;
}
| 137 | 65 |
// Copyright (c) 2013-2018 mogemimi. Distributed under the MIT license.
#pragma once
#include "Pomdog.Experimental/Gameplay/detail/ComponentTypeIndex.hpp"
#include "Pomdog.Experimental/Gameplay/Component.hpp"
#include "Pomdog/Basic/Export.hpp"
#include "Pomdog/Math/Quaternion.hpp"
#include "Pomdog/Math/Radian.hpp"
#i... | 1,930 | 627 |
// CG1_EdgeTableRow.cpp: implementation of the CG1_EdgeTableRow class.
//
//////////////////////////////////////////////////////////////////////
#include "CG1_EdgeTableRow.h"
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
////////////////... | 1,766 | 564 |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2021-2021 ArangoDB GmbH, Cologne, Germany
///
/// 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 co... | 12,579 | 3,521 |
// 8.exercise.05.cpp
//
// Write two functions that reverse the order of element in a vector<int>.
// For example, 1, 3, 5, 6, 9 becomes 9, 7, 5, 3, 1. The first reverse
// function should produce a new vector with the reverse sequence, leaving the
// original vector unchanged. The other reverse function should rev... | 3,977 | 1,293 |
#include "shared_traits.h"
#include<cassert>
using namespace logs2::SharedTraits;
AssertCheck::AssertCheck()
: _threadId{ std::this_thread::get_id() }
{
}
void AssertCheck::isSameThread() const
{
assert(std::this_thread::get_id() == _threadId);
}
| 274 | 101 |
/*
* BitMatrixParser.cpp
* zxing
*
* Created by Christian Brunschen on 20/05/2008.
* Copyright 2008 ZXing 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 Licens... | 6,324 | 1,999 |
#pragma once
#include <string_view>
namespace shady::utils {
void
Assert(bool assertion, std::string_view logMsg);
} // namespace shady::utils | 155 | 53 |
// SPDX-FileCopyrightText: 2015 - 2021 Marcin Łoś <marcin.los.91@gmail.com>
// SPDX-License-Identifier: MIT
#include "ads/simulation.hpp"
#include "tumor.hpp"
#include "vasculature.hpp"
// clang-tidy 12 complains about deleted default constructor not
// initializing some members
//
// NOLINTNEXTLINE(cppcoreguidelines... | 2,554 | 1,022 |
#include "ws-server.h"
#include "cpp/common/common.h"
#include "cpp/common/util.h"
WsServer::WsServer(QObject *parent) :
QObject(parent)
{
server = new QWebSocketServer("IMR WebSocket Server", QWebSocketServer::NonSecureMode, this);
connect(server, &QWebSocketServer::newConnection, this, &WsServer::slotCl... | 3,748 | 1,234 |
// BEGIN_COPYRIGHT
//
// Copyright 2009-2014 CRS4.
//
// 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 applicab... | 1,012 | 346 |
#include <set>
#define GLFW_INCLUDE_VULKAN
#include "Context.h"
#include "imgui/imgui_impl_vulkan.h"
#include "imgui/imgui_impl_glfw.h"
#include "spdlog/sinks/stdout_color_sinks.h"
namespace help
{
VkResult CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, con... | 26,469 | 8,128 |
#include "main.hpp"
#include <iostream>
#include <stack>
using namespace std;
ListNode* Solution::reverseKGroup(ListNode* head, int k){
stack<ListNode*> storage;
ListNode* curPtr = head;
if (k == 1){
return head;
}
for (int i = 0; i < k; i++){
if (curPtr == nullptr){
re... | 1,381 | 477 |
#include "leddriver/ledimage.hpp"
namespace LEDDriver
{
LEDImage::LEDImage() : red(std::make_unique<Channel>()),
green(std::make_unique<Channel>()),
blue(std::make_unique<Channel>())
{
this->Clear();
}
void LEDImage::Clear()
{
t... | 871 | 287 |
// Question Link ---> https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended/
class Solution {
public:
static bool cmp(vector<int> &a, vector<int> &b) {
if (a[1] == b[1]) {
return a[0] < b[0];
}
return a[1] < b[1];
}
int maxEvents(vector<v... | 726 | 235 |
/*
This file is part of PEST++.
PEST++ 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 3 of the License, or
(at your option) any later version.
PEST++ is distributed in the hope that it wi... | 6,584 | 2,732 |
// SysMonDlg.cpp : implementation file
//
#include "stdafx.h"
#include "SysMon.h"
#include "SysMonDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define VK_ESCAPE 0x1B
/////////////////////////////////////////////////////////////////////////////... | 9,568 | 4,381 |
#include <iostream>
#include <tachyon/component.hpp>
#include <itestcontract.hpp>
using namespace tachyon;
int main()
{
MasterFactory &mf = MasterFactory::Instance();
mf.Manage("component1");
mf.Manage("component2");
// test 1 is implemented in a shared dll
sp<ITestContract> sp1 = mf.Create<ITestContract>("... | 2,471 | 959 |
//
// Created by Antoine Roumilhac on 24/12/2021.
//
#include "WallpapersFrame.h"
BEGIN_EVENT_TABLE(WallpapersFrame, wxFrame)
EVT_MENU(ADD_FILES, WallpapersFrame::OnAddFiles)
EVT_MENU(DELETE_SELECTED, WallpapersFrame::DeleteSelectedFiles)
EVT_MENU(wxID_EXIT, WallpapersFrame::OnExit)
EV... | 8,063 | 2,517 |
/*
* <one line to give the library's name and an idea of what it does.>
* Copyright (C) 2015 Guillaume L. <guillaume.lozenguez@mines-douai.fr>
*
* 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 Founda... | 14,728 | 4,946 |
#ifndef RA_UI_WIN32_MULTILINEGRIDBINDING_H
#define RA_UI_WIN32_MULTILINEGRIDBINDING_H
#pragma once
#include "GridBinding.hh"
namespace ra {
namespace ui {
namespace win32 {
namespace bindings {
class MultiLineGridBinding : public GridBinding
{
public:
explicit MultiLineGridBinding(ViewModelBase& vmViewModel) noe... | 2,336 | 766 |
//Uva- 10616 - Divisible Group Sums
#include <iostream>
#include <cstring>
using namespace std;
using ll = long long;
int N, Q, D, M;
int arr[200];
ll memo[200][20][10]; //Index,Sum % 20,#Items picked
ll knapsack( int idx, int sum, int m )
{
if( idx + M - m > N ) //Impossible to collect M items
return 0... | 1,070 | 509 |
#include "CApp.h"
#undef main
CApp::CApp() {
// SDL resources
window = NULL;
renderer = NULL;
// User Resources
resourceManager = NULL;
running = true;
score = 0;
beginTime = 0;
numb_lives_to_gen = PLAYER_MAX_HEALTH - 2;
generateLives = true;
}
CApp::CApp(SDL_Renderer* ren... | 2,610 | 940 |
#pragma once
#include "SDK.hpp"
#include "RecvProxyHook.hpp"
extern VMTHook* g_client_hook;
extern VMTHook* g_game_event_manager_hook;
extern RecvPropHook* g_sequence_hook; | 174 | 71 |
#include "agg.hpp"
extern "C" {
PG_FUNCTION_INFO_V1(internal_to_array);
Datum internal_to_array(PG_FUNCTION_ARGS);
}
Datum internal_to_array(PG_FUNCTION_ARGS) {
//TODO trigger destructor
Assert(AggCheckCallContext(fcinfo, NULL));
if (PG_ARGISNULL(0)) {
PG_RETURN_NULL();
} else {
AggInternal* st... | 421 | 185 |
/*===================== begin_copyright_notice ==================================
Copyright (c) 2017 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, includi... | 77,457 | 21,640 |
TITLE("NTLvsSTL")
TOPIC_TEXT(
"[ $$0,0#00000000000000000000000000000000:Default][l288;i704;a17;O9;~~~.992; $$1,"
"0#10431211400427159095818037425705:param][a83;*R6 $$2,5#3131016247420302412518841"
"7583966:caption][b83;* $$3,5#07864147445237544204411237157677:title][b167;a42;C $"
"$4,6#4002741442464382318226934940... | 4,217 | 1,950 |
/*
* Copyright (c) 2012 Motorola Mobility, Inc. All rights reserved.
* Copyright (C) 2014-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code... | 3,917 | 1,273 |
#include "utils.h"
#include <notification.h>
#include <iostream>
void Utils::simpleNotification(QString header, QString body, QString function, QVariantList parameters)
{
Notification notification;
notification.setCategory("powietrze.update");
notification.setSummary(header);
notification.setBody(body)... | 1,555 | 442 |
//+---------------------------------------------------------------------------
//
// Microsoft Trident
// Copyright (C) Microsoft Corporation, 1997 - 1998.
//
// File: misc.cxx
//
// Contents: misc helpers for scriptoid handlers
//
//-----------------------------------------------------------------... | 3,655 | 1,274 |
#ifndef FAINTED_HPP
#define FAINTED_HPP
struct Fainted { };
#endif
| 69 | 33 |
// Given the running logs of n functions that are executed in a nonpreemptive
// single threaded CPU, find the exclusive time of these functions.
// Each function has a unique id, start from 0 to n-1. A function may be called
// recursively or by another function.
// A log is a string has this format : function_id:st... | 4,472 | 1,452 |
#include <bits/stdc++.h>
using namespace std;
int dp(int arr[],int n)
{
int res=0,ans=0;
for(int i=0;i<n;i++)
{
res = max(arr[i],res+arr[i]);
ans = max(ans,res);
}
return ans;
}
int main()
{
int n,arr[1000];
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&arr[i]);
}
printf("%d\n",dp(arr,n));
re... | 376 | 219 |
#ifndef color_gray_akin_lab
#define color_gray_akin_lab
#include "../../generic/akin/gray.hpp"
#include "../category.hpp"
#include "../../lab/category.hpp"
namespace color
{
namespace akin
{
template
<
typename tag_name
,::color::constant::lab::reference_enum lab_refer... | 541 | 190 |
/*
This header file has been created by
Name : Aravind E Vijayan
B110487EC
National Institute of Technology Calicut
*/
#ifndef PGM_HPP
#define PGM_HPP
struct table //image structure
{
int **data;
int cols;
int rows;
};
/*
function to read pgm image
Usage :
parameter must be the path of image passed... | 1,279 | 372 |
#include "EdgarRequests.h"
#include "../../../Private/source/markets/edgar/Edgar.h"
#include "../../../Private/source/markets/edgar/Form13F.h"
namespace Jde::Markets::TwsWebSocket
{
void EdgarRequests::Filings( Cik cik, ProcessArg&& inputArg )noexcept
{
std::thread( [cik, arg=move(inputArg)]()
{
try
{
... | 1,383 | 585 |
#include "Export_Lua_Scene.h"
#include "Export_Lua_Const.h"
#include "../Header/SceneConst.h"
#include "../Classes/LoadingScene.h"
#include "../Classes/TitleScene.h"
#include "../Classes/HelpScene.h"
#include "../Classes/StageSelectScene.h"
#include "../Classes/MissionSelectScene.h"
#include "../Classes/Sto... | 8,007 | 3,220 |
class Solution {
public:
TreeNode* constructBST(vector<int> preorder,int low,int high){
if(low>=preorder.size() || low>high)
return NULL;
TreeNode* root=new TreeNode(preorder[low]);
if(high==low)
return root;
int i;
for(i=low;i<=high;i++)
if(preorder[... | 605 | 210 |
/* Essential functions that will be used throughout the whole project */
#include "essentials.hpp"
using namespace std;
using namespace ess;
ess::variableTable::variableTable () {//Constructor of variableTable classs
ess::variableTable::numberOfVariables=0;
ess::variableTable::nameOfVariable.clear();
ess::varia... | 5,205 | 1,655 |
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 1,716 | 588 |
// 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.
// Defines base::PathProviderAndroid which replaces base::PathProviderPosix for
// Android in base/path_service.cc.
#include <limits.h>
#include <uni... | 2,221 | 714 |
//1
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef K::Point_2 P;
typedef K::Segment_2 S;
typedef K::Ray_2 R;
using namespace std;
double floor_to_double(const K::FT& x)
{
double a = std::floor(CGAL::to_double(x));
while (a > x) a -= ... | 2,151 | 855 |
bool p[MAXN];
vector<int> primes;
void build(void) {
memset(p, true, sizeof(p));
for (int i = 2; i <= MAXN; i++) {
if (p[i]) {
primes.push_back(i);
for (int j = i * i; j <= MAXN; j += i) {
p[j] = false;
}
}
}
}
int func(Int x) {
int ans = 1;
for (int i = 0; i < (int) primes.size() && x > 1; i+... | 862 | 461 |
#include "MCDataProducts/inc/CrvDigiMC.hh"
namespace mu2e
{
}
| 64 | 30 |
/*=========================================================================
Program: Flow Visualization
Module: main.cpp
Copyright (c) 2018 Duong B. Nguyen
All rights reserved.
See LICENSE for details
=========================================================================*/
#include "main... | 478 | 136 |
#include "./../../main.ih"
/*
* This functions runs all the instances from Santos
*
* TODO remove bool deterministic
*/
void run_benchmark_santos(int idx_instance, bool deterministic, int rep)
{
bool const withoutGurobi = false;
if (not deterministic)
throw string("Opportunistic run is not allowed! (run... | 2,006 | 740 |
#include "mpu6050.hpp"
#include "pongresources.hpp"
int main(int argc, char **argv) {
namespace target = hwlib::target;
// Intialize OLED display
auto scl = target::pin_oc(target::pins::d10);
auto sda = target::pin_oc(target::pins::d11);
auto i2c_bus = hwlib::i2c_bus_bit_banged_scl_sda(scl, sda);
auto w ... | 2,639 | 1,151 |
#include "world.h"
// FONT SET
FontSet::FontSet(const string& path) :
file(path)
{
// check if font can be loaded
TTF_Font* tmp = TTF_OpenFont(file.c_str(), Default::fontTestHeight);
if (!tmp)
throw "Couldn't open font " + file + '\n' + TTF_GetError();
// get approximate height scale factor
int size;
TTF_Si... | 7,285 | 2,836 |
#include "solutionthread.h"
solutionThread::solutionThread()
{
metRKu = 1;
gam = 0.2;
g = 9.81;
L = 2;
del = 0.9;
p2 = 4;
eps = 0.0005;
x0 = 2;
v0 = 3;
t = 30;
step = 0.01;
}
double solutionThread::p(double y2)
{
return y2;
}
double solutionThread::q(double x2, double... | 4,123 | 1,824 |
#include "pqColorOverlay.h"
#include <QPainter>
//-----------------------------------------------------------------------------
pqColorOverlay::pqColorOverlay(QWidget* parent)
: QWidget(parent)
{
setAttribute(Qt::WA_NoSystemBackground);
setAttribute(Qt::WA_TransparentForMouseEvents);
}
//----------------------... | 1,303 | 369 |
version https://git-lfs.github.com/spec/v1
oid sha256:936046e1e48adf16a2daa297a69e3318537c55f39572a05efbae9aca1479cf89
size 711
| 128 | 89 |
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNod... | 1,190 | 449 |
// Copyright (c) 2021 Álvaro Ceballos
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
/**
* @file split_helpers.hpp
*
* @brief Helpers for the `split` metafunction.
*/
#ifndef CYNODELIC_MULINUM_DETAIL_SPLIT_HELPERS_HPP... | 3,882 | 1,606 |
version https://git-lfs.github.com/spec/v1
oid sha256:516879d2c1b04ff8b7ba32487c8446e3241805e4352f374533aa6756863b4cad
size 4366
| 129 | 93 |
/***************************************************************************
Copyright 2015 Ufora 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/licen... | 4,115 | 1,405 |
//+---------------------------------------------------------------------
//
// File: frame.cxx
//
// Contents: frame tag implementation
//
// Classes: CFrameSite, etc..
//
//------------------------------------------------------------------------
#include "headers.hxx"
#ifndef X_FORMKRNL_HXX... | 3,417 | 1,163 |
/*
thorfinn thorfinn@binf.ku.dk dec17 2012
part of angsd
This class will calculate the GL in 4 differnt ways
1) SAMtools 0.1.16+ version
2) Simple GATK model
3) SOAPsnp
4) SYK
4 different output formats are supplied
1) binary 10xdouble persample
2) beagle output (requires estimation of maj... | 12,076 | 5,432 |
/*
Bacula(R) - The Network Backup Solution
Copyright (C) 2000-2018 Kern Sibbald
The original author of Bacula is Kern Sibbald, with contributions
from many others, a complete list can be found in the file AUTHORS.
You may use this file and others of this release according to the
license defined in ... | 14,602 | 5,454 |
#pragma once
#include <nall/file.hpp>
#include <nall/filemap.hpp>
#include <nall/stdint.hpp>
#include <nall/string.hpp>
namespace ramus {
struct ipspatch {
inline auto modify(const uint8_t* data, uint size) -> bool;
inline auto source(const uint8_t* data, uint size) -> void;
inline auto target(uint8_t* data, u... | 4,425 | 1,584 |
/*
* AUTHOR: Landon Brown
* FILE TITLE: Menu.hpp
* FILE DESCRIPTION: Menu for the beginning of the game
* DUE DATE: TBD
* DATE CREATED: 03/26/2020
*/
#include <iostream>
#include <string>
using namespace std;
struct Menu{
Menu(){
}
void printIntro(){
cout << endl << " @@-----------... | 2,472 | 546 |
#pragma once
#include "mtao/geometry/kdtree.hpp"
#include <map>
#include "mtao/iterator/enumerate.hpp"
#include "mtao/eigen/stl2eigen.hpp"
namespace mtao { namespace geometry {
//expects a mtao::vector<mtao::Vector<T,D>>
template <typename Container
, typename T
>
auto prune(const Cont... | 4,093 | 1,369 |
#ifndef __OBOTCHA_INVALID_KEY_EXCEPTION_HPP__
#define __OBOTCHA_INVALID_KEY_EXCEPTION_HPP__
#include <fstream>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "Object.hpp"
#include "Exception.hpp"
#include "String.hpp"
namespace obotcha {
DECLARE_EXCEPTION(InvalidKeyException){
public:
... | 439 | 176 |
// $Id: plbuf.c 12636 2013-10-26 20:47:49Z airwin $
//
// Handle plot buffer.
//
// Copyright (C) 1992 Maurice LeBrun
// Copyright (C) 2004 Alan W. Irwin
// Copyright (C) 2005 Thomas J. Duck
// Copyright (C) 2006 Jim Dishaw
//
// This file is part of PLplot.
//
// PLplot is free software; you can ... | 45,566 | 16,050 |
#include "longincsubseq.h"
#include <cmath>
using std::vector;
/*
* Do a binary search for the integer j. Such that lowerBound<=j<=upperBound
* and that maximizes seq[M[j]] while keeping seq[M[j]]<x.
*/
int binSearch(vector<int> &M, const vector<int> &seq, int x, int lowerBound, int upperBound)
{
int lo = low... | 1,251 | 483 |
/****************************************************************************************
* @author: JU_AAA: prdx9_abir, aniks2645, kzvd4729 created: Sep/15/2017 22:21
* solution_verdict: Accepted language: GNU C++14
* run... | 1,034 | 343 |
#pragma once
#include "Transport.hpp"
#include <driver/uart.h>
#include <esp_timer.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
namespace AVR
{
class ESPSerial : public Transport
{
public:
ESPSerial(uart_port_t port, uart_config_t config, size_t buffer_size, int timeout, int tx_pin, int rx_pin,... | 2,314 | 819 |
#include "pch.h"
#pragma hdrstop
void SetMYLBAcc(HWND hListWin);
void DrawMYLBFocus(HWND hListWin, LPDRAWITEMSTRUCT lpdis, MYLBFOCUS enCurFocus, INT nCurFocusId);
void DrawItem(LPDRAWITEMSTRUCT lpdis, BOOL fSelectionDisabled);
void DrawTitle(HDC hDC, LBITEM * plbi, RECT rc);
void DrawRTF(HDC hDC, LBITEM * plb... | 31,884 | 13,799 |
#include "auraCompositing.hpp"
#include "gl/shaderUtils.hpp"
#include "light/light.hpp"
#include <array>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
#include <string>
#include <sstream>
AuraCompositingEffect::AuraCompositingEffect(int w, int h) :
width(w), height(h)
{
}
void AuraCompositingEffect::initi... | 3,815 | 1,441 |
#include "kimera_rviz_markers/kimera_rviz_markers.h"
int main(int argc, char** argv) {
// Initialize ROS node
ros::init(argc, argv, "drone_marker_pub");
ros::NodeHandle nh_;
ros::NodeHandle nh_private_ ("~");
krm::DroneParams quad_params;
nh_private_.getParam("frame_id", quad_params.frame_id);
nh_priva... | 1,409 | 538 |
// This file is part of Asteria.
// Copyleft 2018, LH_Mouse. All wrongs reserved.
#include "_test_init.hpp"
#include "../asteria/src/block.hpp"
#include "../asteria/src/xpnode.hpp"
#include "../asteria/src/statement.hpp"
#include "../asteria/src/global_context.hpp"
#include "../asteria/src/executive_context.hpp"
usin... | 5,117 | 1,972 |
#include <netinet/in.h>
#include <sys/socket.h>
#include <vector>
#include <arpa/inet.h>
#include "Keylight.h"
#include "thirdparty/zeroconf.hpp"
void* get_in_addr(sockaddr_storage* sa)
{
if (sa->ss_family == AF_INET)
return &reinterpret_cast<sockaddr_in*>(sa)->sin_addr;
if (sa->ss_family == AF_INET6)... | 1,829 | 596 |
// The MIT License (MIT)
// Copyright (c) 2015 nabijaczleweli
// 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... | 17,987 | 6,641 |
#include "bitmask.hpp"
// ********************************
// ** Function Module Definition **
// ********************************
std::vector< std::vector<codeblock> > Bitmask::ranges = std::vector< std::vector<codeblock> >();
std::vector<size_t> Bitmask::hashes = std::vector<size_t>();
std::vector<char> Bitmask::co... | 59,846 | 18,924 |
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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/. */
#ifdef MOZ_LOGGING
#define FORCE_PR_... | 29,034 | 9,200 |
/* Maximum Sum Rectangle
Send Feedback
Given a 2D array, find the maximum sum rectangle in it. In other words find maximum sum over all rectangles in the matrix.
Input Format:
First line of input will contain T(number of test case), each test case follows as.
First line contains 2 numbers n and m denoting number of row... | 2,910 | 1,026 |
/*
* Opt_SnowflakeInterestingOrders.h
* OptDev
*
* Created by Nga Tran on 11/10/05.
* Questions, ask Nga Tran at nga@brandeis.edu or Tien Hoang at hoangt@brandeis.edu
*
* This class keeps interesting orders of a snowflake query
*/
#include "Opt_SnowflakeInterestingOrders.h"
// Default constructor
Opt_Sn... | 3,491 | 1,427 |
// Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC
// (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
#include <iostream>
#include "lunasa/common/GenericSequentialDataBundle.hh"
#include "SerdesStringObject.hh"
u... | 1,964 | 678 |
/*
* Ciudad.cpp
*
* Created on: May 3, 2014
* Author: matt
*/
#include "Ciudad.h"
Ciudad::Ciudad(double c, string n, double p) {
this->pheromone = p;
this->cost = c;
this->name = n;
}
Ciudad::Ciudad() {
this->cost = 0;
this->pheromone = 0;
this->name = "Undefined, please define city";
}
Ciudad::~Ci... | 679 | 288 |
#include "../../../JLongArray.hpp"
#include "../ipsec/ike/IkeTunnelConnectionParams.hpp"
#include "./VcnGatewayConnectionConfig.hpp"
#include "../../../JString.hpp"
#include "./VcnGatewayConnectionConfig_Builder.hpp"
namespace android::net::vcn
{
// Fields
// QJniObject forward
VcnGatewayConnectionConfig_Builder:... | 2,072 | 790 |
#include "materials/HomogeneousMedia.h"
namespace narvalengine {
HomogeneousMedia::HomogeneousMedia(glm::vec3 scattering, glm::vec3 absorption, float density) {
this->scattering = scattering;
this->absorption = absorption;
this->extinction = absorption + scattering;
this->density = density;
}
HomogeneousM... | 1,559 | 596 |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* insertionSortList(ListNode* head) {
ListNode *new_head = NULL;
while (head) {
ListNode *next =... | 764 | 232 |
#include <intrin.h>
#include <tchar.h>
#include <vector>
#include <windows.h>
#include "SysInfo.h"
#include "Globals.h"
#include <powrprof.h>
#pragma comment(lib, "powrprof.lib")
ULONG crc32_table[256];
int SR2_EXE_CRC = 0;
VOID WINAPI LogSystemInfo()
{
WriteToLog(_T("SysInfo"), _T("Detecting Process... | 10,538 | 4,537 |
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
| 48 | 24 |
/*===========================================================================*\
* *
* IsoEx *
* Copyright (C) 2002 by Computer Graphics Group, RWTH Aachen *
* ... | 4,806 | 1,269 |
#pragma once
#include <mbgl/util/variant.hpp>
#include <mbgl/util/feature.hpp>
#include <mbgl/util/geometry.hpp>
#include <string>
#include <vector>
#include <tuple>
namespace mbgl {
namespace style {
class Filter;
class NullFilter {
public:
friend bool operator==(const NullFilter&, const NullFilter&) {
... | 3,909 | 1,298 |
/*
Copyright 2015-2017 Kai Huebl (kai@huebl-sgh.de)
Lizenziert gemäß Apache Licence Version 2.0 (die „Lizenz“); Nutzung dieser
Datei nur in Übereinstimmung mit der Lizenz erlaubt.
Eine Kopie der Lizenz erhalten Sie auf http://www.apache.org/licenses/LICENSE-2.0.
Sofern nicht gemäß geltendem Recht vorge... | 3,455 | 1,262 |
#ifndef BOID_HPP
#define BOID_HPP
#include <glm/glm.hpp>
#include <memory>
#include <vector>
#include "BoidType.hpp"
/**
* @class Boid
* @brief Parent class for a Boid (can be rooted or movable)
*/
class Boid
{
public:
/**
* @brief Constructor for a Boid
* @param[in] location The initial position
* ... | 1,860 | 693 |
// Filename: run_p3dpython.cxx
// Created by: drose (29Aug09)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You sho... | 1,433 | 389 |
#include "Fighter.h"
#include "FighterAttack.h"
#include "Charge.h"
Fighter::Fighter(int idx)
:Hero(HeroClass::FIGHTER, 17 + rand() % 4, 5 + rand() % 2, idx)
{
skills.push_back(SkillInfo(std::make_unique<FighterAttack>()));
skills.push_back(SkillInfo(std::make_unique<Charge>()));
}
| 287 | 128 |
class Sound_CBRN_cough_assaultboy:Sound_CBRN_coughBase {sound = "CBRN_cough_assaultboy";};
class Sound_CBRN_coughMuffled_assaultboy:Sound_CBRN_coughMuffledBase {sound = "CBRN_coughMuffled_assaultboy";}; | 202 | 89 |
// Copyright 2019 kvedder@seas.upenn.edu
// School of Engineering and Applied Sciences,
// University of Pennsylvania
//
//
// 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 restrict... | 8,252 | 2,941 |
/*
TinyTinyJPG library
Copyright (c) 2011, Rasmus Neckelmann (neckelmann@gmail.com)
All rights reserved.
This source code is released under the terms of the BSD license; see the
file LICENSE.TXT for details.
*/
#include <math.h>
#if defined(EMMINTRIN)
#include <emmintrin.h>
#endif
#include "TinyTinyJP... | 28,540 | 10,867 |
#include "CameraComponentWidget.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
namespace editor::impl {
CameraComponentWidget::CameraComponentWidget(QWidget* parent)
: QWidget(parent)
, m_Camera(nullptr)
, m_Projection(nullptr)
, m_ProjectionLabel(nullptr)
, m_IsActiveCamera(nullptr)
, m_... | 2,747 | 1,059 |