text string | size int64 | token_count int64 |
|---|---|---|
/*
* Copyright (c) 2022, suncloudsmoon and the Simple-Library contributors.
*
* 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... | 4,075 | 1,563 |
#include "../dborl_evaluation.h"
#include <vbl/vbl_smart_ptr.txx>
VBL_SMART_PTR_INSTANTIATE(dborl_exp_stat);
| 110 | 58 |
// Copyright 2015 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/sync/glue/autofill_wallet_data_type_controller.h"
#include "base/bind.h"
#include "chrome/browser/autofill/personal_data_manager... | 2,951 | 949 |
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "BaseThreadsRecordModel.hpp"
#include "Style.hpp"
namespace gui::model
{
class ThreadsSearchResultsModel : public BaseThreadsRecordModel, public app::Async... | 890 | 268 |
#include<bits/stdc++.h>
using namespace std;
#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
char board[9][9];
struct ChessBoard {
enum class Turn {white, black} turn;
enum class Piece {king, queen, white_pawn, black_pawn, rook, bishop, knight};
static map<Piece,int> pieceValues;
bool ... | 13,702 | 4,910 |
#include "stdafx.h"
#include "action_trim_spaces.h"
#include "RegisterGlossDlg.h" // trim_spaces
namespace action
{
//! Trims the spaces from all records in the TM.
//! Backs up TM so it can be undone.
void ActionTrimSpaces::redo()
{
using namespace mem_engine;
mem_engine::trans_set records ;
thi... | 676 | 281 |
// IFR_Client_Adapter_Impl.cpp,v 1.3 2001/09/25 05:12:33 irfan Exp
#include "IFR_Client_Adapter_Impl.h"
#include "IFR_ExtendedC.h"
#include "tao/ORB_Core.h"
#include "tao/Invocation.h"
ACE_RCSID(IFR_Client, IFR_Client_Adapter_Impl, "IFR_Client_Adapter_Impl.cpp,v 1.3 2001/09/25 05:12:33 irfan Exp")
TAO_IFR_C... | 181,138 | 100,734 |
class Solution {
public:
vector<int> intersect(vector<int>& nums1, vector<int>& nums2) {
if(nums2.size() < nums1.size()){
return intersect(nums2,nums1);
}
unordered_map<int,int> hash_map;
for(int num:nums1){
hash_map[num]++;
}
vector<int> ans;
... | 618 | 209 |
// Copyright 2018-2020 JXMaster. All rights reserved.
/*
* @file FrameBuffer.cpp
* @author JXMaster
* @date 2020/3/11
*/
#pragma once
#include "FrameBuffer.hpp"
#ifdef LUNA_GFX_D3D12
namespace Luna
{
namespace Gfx
{
namespace D3D12
{
R<RenderTargetViewDesc> get_default_rtv(Resource* res)
{
ResourceDesc... | 8,964 | 4,975 |
/*------------------------------------------------------------------------------*
* (c)2016, All Rights Reserved. *
* ___ ___ ___ *
* /__/\ / /\ / /\ *
* \ \:\ / /:/ / /::\ *
* ... | 15,672 | 5,572 |
#ifndef __AFS_COMPUTE_THREAD_HPP_INCLUDED__
#define __AFS_COMPUTE_THREAD_HPP_INCLUDED__
#include <stdio.h>
#include <stdint.h>
#include <string>
#include "../config.hpp"
#include "thread.hpp"
#include "up_thread.hpp"
#include "down_thread.hpp"
#include "../wrap_item.hpp"
#include "router_base.hpp"
#include "../queu... | 13,760 | 4,684 |
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
#include <G4ThreeVector.hh>
#include <G4TwoVector.hh>
#include <vector>
#include "typecast.hh"
#include "opaques.hh"
namespace py = pybind11;
void export_globals(py::module &m)
{
py::bind_vector<G4intVector>(m, "G4intVector")... | 568 | 233 |
/* Automatically generated file. Do not edit directly. */
/* This file is part of The New Aspell
* Copyright (C) 2001-2002 by Kevin Atkinson under the GNU LGPL
* license version 2.0 or 2.1. You should have received a copy of the
* LGPL license along with this library if you did not you can find it
* at http://ww... | 12,726 | 4,281 |
// Given two integers a and b, find their least common multiple.
#include <iostream>
using namespace std;
int gcd_euclid(long a, long b) {
if (a % b == 0) {
return b;
}
int gcd = gcd_euclid(b, a % b);
return gcd;
}
long long lcm(long a, long b) {
long long mult = a * b;
return (long ... | 448 | 182 |
#include <goliath/transitions/tickable.h>
using namespace goliath::transitions;
Tickable::Tickable(const size_t ticksPerSecond)
: duration(0), ticksPerSecond(ticksPerSecond) {}
std::chrono::milliseconds Tickable::getDuration() const {
return duration;
}
const size_t Tickable::getTicksPerSecond() const {... | 350 | 118 |
//
// Created by furture on 2018/10/29.
//
#include "ScrollerView.h"
#include <render/core/rendering/RenderScrollView.h>
#include <render/platform/common/log.h>
#include <render/core/parser/Screen.h>
#include <render/core/parser/StyleParser.h>
namespace weexuikit{
ScrollerView::ScrollerView(UIContext *context... | 6,680 | 1,898 |
// Copyright 2021 RobosoftAI Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | 18,745 | 5,939 |
/*
* Copyright 2022 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 applica... | 1,304 | 424 |
// This file is part of the dune-gdt project:
// https://github.com/dune-community/dune-gdt
// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// or GPL-2.0+ (http://opensource.org/lice... | 10,534 | 3,499 |
/*******************FLANGER.C******************************/
#include "delay.h"
#include "flanger.h"
static short samp_freq;
static double var_delay;
static short counter;
static short counter_limit;
static short control;
static short max_delay;
static short min_delay;
static double mix_vol;
static double delay_step;... | 1,922 | 654 |
#include <data_types/filterbank.hpp>
#include <iostream>
#include <stdexcept>
#include <assert.h>
using namespace std;
int main(void){
std::string filename("/lustre/projects/p002_swin/surveys/HTRU/medlat/2009-09-12-01:41:41/11/2009-09-12-01:41:41.fil");
try {
SigprocFilterbank filobj(filename);
} catch (... | 1,674 | 777 |
/*
* DroidContainerComponent.cpp
*/
#include "DroidContainerComponent.h"
#include "server/zone/objects/scene/SceneObject.h"
#include "server/zone/objects/creature/CreatureObject.h"
#include "server/zone/objects/creature/ai/DroidObject.h"
#include "server/zone/objects/player/PlayerObject.h"
bool DroidContainerCompon... | 2,081 | 689 |
#include <iostream>
#include <mutex>
#include <thread>
std::mutex cout_mutex;
void printThreadId(){
bool success = true;
if(std::unique_lock<std::mutex> lck(cout_mutex, std::try_to_lock); lck.owns_lock()){
std::cout <<"Ten napis nie zostal poszatkowany "<< std::this_thread::get_id()<<std::endl;
}else{
... | 589 | 266 |
#include "Image.h"
#include <algorithm>
#include <fstream>
#include <vector>
#include <tuple>
#include <assert.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
namespace sgl {
Image::Image(const std::string& file)
{
#pragma message("Fill me up!")
}
Image::~Image()
{
#pragma message("Fill me up!")
}
... | 345 | 137 |
// 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 <CoreVideo/CoreVideo.h>
#include <OpenGL/CGLIOSurface.h>
#include "base/bind.h"
#include "base/thread_task_runner_handle.h"
#include "content/co... | 8,454 | 2,891 |
#include "Common.h"
#include "CPS4.h"
#include "PropertiesHolder/PropertiesHolder.h"
#include "Material.h"
#include <Eigen/Dense>
#include "GaussQuadrature.h"
Eigen::Matrix<float, 4, 4> CPS4::m_C;
Eigen::Matrix<float, 4, 4> CPS4::m_IC;
float XI[4] = { -1.0, 1.0, 1.0, -1.0 };
float ETA[4] = { -1.0, -1.0, 1.0, 1.0 };... | 4,695 | 2,615 |
#include <boost/smart_ptr/shared_ptr.hpp>
#include <caffe/blob.hpp>
#include <caffe/common.hpp>
#include <caffe/filler.hpp>
#include <caffe/layers/gauss_conv_layer.hpp>
#include <caffe/proto/caffe.pb.h>
#include <caffe/test/test_caffe_main.hpp>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <vector>
names... | 42,725 | 16,520 |
__________________________________________________________________________________________________
sample 4 ms submission
class Solution {
public:
int getMoneyAmount(int n) {
vector<vector<int>> cache(n+1, vector<int>(n+1, 0));
return cost(cache, 1, n);
}
int cost(vector<vector<int>>& v,... | 1,634 | 538 |
#ifndef ESC_DETAIL_IS_ANY_OF_HPP
#define ESC_DETAIL_IS_ANY_OF_HPP
#include <type_traits>
namespace esc::detail {
/// Type Trait defined as true if T is_same as any of Us.
template <typename T, typename... Args>
bool constexpr is_any_of = (std::is_same_v<Args, T> || ...);
} // namespace esc::detail
#endif // ESC_DE... | 339 | 144 |
#include <FLIGHT/Core/Game.hpp>
#include <FLIGHT/Entity/Plane.hpp>
#include <FLIGHT/Entity/Coin.hpp>
namespace FLIGHT {
Plane::Plane(const Blueprint & blueprint, const std::string & blueprintName)
: m_srcBlueprint(blueprintName), m_pitch(0.f), m_roll(0.f), m_thrust(1.f),
m_yVelocity(0.f) {
for (auto & pa... | 4,988 | 1,839 |
// INPUT:Hello
struct production
{
static constexpr auto rule = LEXY_LIT("Hello") | LEXY_LIT("Hi");
};
| 107 | 41 |
/*
* If not stated otherwise in this file or this component's Licenses.txt file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* 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 ... | 16,384 | 5,302 |
//
// Copyright (c) 2016-2018 João Baptista de Paula e Silva.
//
// 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, cop... | 2,147 | 671 |
/** \file device_facecap_device.cxx
* Developed by Sergei <Neill3d> Solokhin 2019
* e-mail to: s@neill3d.com
* twitter: @Neill3d
*
* OpenMoBu github - https://github.com/Neill3d/OpenMoBu
*/
//--- Class declaration
#include "device_facecap_device.h"
//--- Registration defines
#define CDEVICEFACECAP__CLASS CDEVICEFAC... | 11,618 | 4,573 |
/* Sirikata
* CommonOptions.hpp
*
* Copyright (c) 2009, Ewen Cheslack-Postava
* 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 ... | 5,301 | 1,773 |
#pragma once
#include <ysu/node/bootstrap/bootstrap.hpp>
#include <atomic>
#include <future>
namespace ysu
{
class node;
class frontier_req_client;
class bulk_push_client;
class bootstrap_attempt : public std::enable_shared_from_this<bootstrap_attempt>
{
public:
explicit bootstrap_attempt (std::shared_ptr<ysu::nod... | 3,730 | 1,349 |
/**
* BSD 3-Clause License
*
* @copyright (c) 2019, Umang Rastogi Naman Gupta
* 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 copyrig... | 4,726 | 1,629 |
/* File: Market.cpp */
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <limits>
#include <unistd.h>
#include "../Input_Validation/Input_Validation.hpp"
#include "../Items/Armor.hpp"
#include "../Items/Potion.hpp"
#include "../Items/Weapon.hpp"
#include "../Living/Heroes/Hero.hpp"
#incl... | 74,166 | 27,350 |
/**
* Copyright (c) 2014-2015, HTWK SmartDriving
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this lis... | 14,059 | 5,740 |
/*
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 2013 <copyright holder> <email>
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 ve... | 2,599 | 810 |
#include<iostream>
#include<string>
#include "Song.h"
void Song::SetSongName(string userSongName) {
songName = userSongName;
}
void Song::SetSongFirstLine(string userSongFirstLine) {
songFirstLine = userSongFirstLine;
}
void Song::SetTimesPlayed(int userTimesPlayed) {
timesPlayed = userTimesPlayed;
}
S... | 786 | 280 |
#include "dbgstream.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <fstream>
#ifdef DBG_TIMESTAMP
extern "C" {
#include <time.h>
};
#endif /* DBG_TIMESTAMP */
using namespace std;
dbgstream dbg;
dbgbuf::~dbgbuf()
{
flushMsg();
}
void dbgbuf::flushMsg()
{
if (msg.length() > 0) {
#if DBG_TIMESTAMP
... | 1,127 | 535 |
#pragma once
#include "core.hpp"
#include <string>
namespace Cairo
{
struct Font
{
std::string family = "Arial";
double size = 12;
cairo_font_weight_t weight = CAIRO_FONT_WEIGHT_NORMAL;
cairo_font_slant_t slant = CAIRO_FONT_SLANT_NORMAL;
};
}
| 290 | 117 |
//
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
// System include... | 24,902 | 6,740 |
/*! \file SimLucidSteppingVerbose.hh
* \brief The header file for the SimLucidSteppingVerbose class.
*/
class SimLucidSteppingVerbose;
#ifndef SimLucidSteppingVerbose_h
#define SimLucidSteppingVerbose_h 1
// GEANT4 includes
#include "G4SteppingVerbose.hh"
/*! \brief Class handling user-defined verbose actions.
@... | 880 | 289 |
// CFPExercise2.21.2019.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
using namespace std;
int main()
{
//establish variables
double dblfirstvariable = .0;
double dblsecondvariable = .0;
double dblvariablec = .0;
c... | 829 | 281 |
#include <iostream>
#include <string>
using namespace std;
int main()
{
int N;
cin >> N;
while (N--)
{
string s;
cin >> s;
int sum1 = 0, sum2 = 0;
sum1 = (s[0] - '0') + (s[1] - '0') + (s[2] - '0');
sum2 = (s[3] - '0') + (s[4] - '0') + (s[5] - '0');
... | 552 | 213 |
#include <iostream>
#include "Direction.hpp"
#include "Board.hpp"
using namespace std;
using namespace ariel;
int main() {
ariel::Board board;
// declaration of all variables
uint row , column , length;
int func;
int dir;
string message;
Direction direction;
// wellcome line
cout <<... | 5,237 | 1,541 |
#ifndef __GAME_ACT_PHYSICAL_PUSH_PLATE_HPP__
#define __GAME_ACT_PHYSICAL_PUSH_PLATE_HPP__
#include "GameAct/Objects/Physical/Button/Button.hpp"
namespace GameAct
{
namespace Physical
{
class PushPlate
: public Button
{
public:
void setRotation( float angle ) override;
void runAction( const st... | 376 | 160 |
/*******************************************************************************
* Project: Beacon
* @file CmdNodeDisconnect.hpp
* @brief
* @author bwar
* @date: Feb 14, 2017
* @note
* Modify history:
******************************************************************************/
#ifndef SRC_CMDNODED... | 1,193 | 393 |
#include "catch.hpp"
#include "GFStorage.h"
using T = uint8_t;
using Elem = GFlinalg::BasicGFElem<T>;
using Ref = GFlinalg::GFElemRef<Elem>;
using Ptr = GFlinalg::GFElemPtr<Elem>;
template<size_t R, size_t C>
using Matrix = GFlinalg::MatrixEngine<Elem, R, C>;
TEST_CASE("Smart reference", "[GFElemRef]") {
SECTION... | 1,819 | 831 |
#include <iostream>
#include<string>
using namespace std;
struct Date {
int day=18 , month=11, year=2020;
};
void Date_next(){
Date current;
for (int i = 1; i < 45; i++) {
if(current.day==31){
current.day=1;
current.day+=1;
current.month+=1;
}
else
current... | 507 | 191 |
#include <ros/ros.h>
#include <ros/master.h>
#include "udp_bridge/ChannelStatisticsArray.h"
void statisticsCallback(udp_bridge::ChannelStatisticsArray const &stats)
{
std::vector<std::string> headers {"source topic", "remote host", " messages", "message data", " packet data", " compressed", " ratio", "send e... | 3,006 | 1,162 |
#include "CMessageHeader.h"
//
// Message header
// (4) message start
// (12) command
// (4) size
// (4) checksum
extern char pchMessageStart[4];
CMessageHeader::CMessageHeader()
{
memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
memset(pchCommand, 0, sizeof(pchCommand));
pchCommand[1] = 1... | 1,497 | 600 |
#include "GBO.h"
void GBO::Load()
{
Shader.Load("Shaders\\Geometry-Buffer.vert", "Shaders\\Geometry-Buffer.frag");
}
void GBO::Initialize()
{
glGenFramebuffers(1, &FBO);
glBindFramebuffer(GL_FRAMEBUFFER, FBO);
// POSITION
glGenTextures(1, &Position);
glBindTexture(GL_TEXTURE_2D, Position);
... | 1,834 | 791 |
/**************************************************************************
*
* Copyright 2011 Jose Fonseca
* All Rights Reserved.
*
* 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 wit... | 3,559 | 1,122 |
/**
******************************************************************************
* @file spark_wiring_spi.h
* @author Zach Supalla
* @version V1.0.0
* @date 06-December-2013
* @brief Header for spark_wiring_servo.cpp module
******************************************************************************... | 3,279 | 1,203 |
/*
* ::718604!
*
* Copyright(C) November 20, 2014 U.S. Food and Drug Administration
* Authors: Dr. Vahan Simonyan (1), Dr. Raja Mazumder (2), et al
* Affiliation: Food and Drug Administration (1), George Washington University (2)
*
* All rights Reserved.
*
* The MIT License (MIT)
*
* Permission is hereb... | 8,746 | 2,679 |
//:
// \file
// \brief
// \author Ozge Can Ozcanli (ozge@lems.brown.edu)
// \date 10/03/07
#include "dborl_image_bbox_description.h"
#include <vsol/vsol_box_2d.h>
#include <vcl_iostream.h>
void dborl_image_bbox_description::add_box(vcl_string cat, vsol_box_2d_sptr b)
{
vcl_map<vcl_string, vcl_vector<vs... | 1,870 | 825 |
#include "clang/Frontend/FrontendActions.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Tooling.h"
#include "clang/Tooling/ArgumentsAdjusters.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "clang/AST/ASTConsumer.h"
#i... | 2,330 | 760 |
#include "hypothesis.h"
#include <math.h>
#include <boost/math/quadrature/gauss.hpp>
#include <boost/math/distributions/chi_squared.hpp>
using namespace std;
Hypothesis::Hypothesis() = default;
// Hypothesis test for the avarage, we use the library Boost to integrate the function
// that corresponds for th... | 6,385 | 2,244 |
#include <Arduino.h>
int pinoLed = 13;
int pinoSensorLuz = 34;
int valorLuz = 0;
void setup() {
pinMode(pinoLed,OUTPUT);
}
void loop() {
valorLuz = analogRead(pinoSensorLuz);
if(valorLuz<750)
{
digitalWrite(pinoLed,LOW);
}
else
{
digi... | 362 | 156 |
/* Dimensions
PIRL CVS ID: $Id: Dimensions.hh,v 1.27 2011/02/18 02:29:28 castalia Exp $
Copyright (C) 2010 Arizona Board of Regents on behalf of the
Planetary Image Research Laboratory, Lunar and Planetary Laboratory at
the University of Arizona.
This library is free software; you can redistribute it and/or modify ... | 49,201 | 16,049 |
// Copyright (C) 2018 ETH Zurich
// Copyright (C) 2018 UT-Battelle, LLC
// All rights reserved.
//
// See LICENSE for terms of usage.
// See CITATION.md for citation guidelines, if DCA++ is used for scientific publications.
//
// Author: Peter Staar (taa@zurich.ibm.com)
//
// GPU kernels for walker tools.
#ifndef DCA_... | 1,116 | 476 |
#include "Utils/Streams/InputStream.h"
using namespace L2NextCryptoStreams;
| 78 | 27 |
#ifndef BENCHMARK_UTIL_H
#define BENCHMARK_UTIL_H
#include <cudd/cplusplus/cuddObj.hh>
#include <string>
#include <vector>
namespace abo::benchmark {
enum class ErrorMetric
{
WORST_CASE,
WORST_CASE_RELATIVE_APPROX,
WORST_CASE_RELATIVE_BINARY_SEARCH,
WORST_CASE_RELATIVE_RANDOMIZED,
WORST_CASE_RELA... | 4,375 | 1,489 |
#include "mvToggledOpenHandler.h"
#include "mvLog.h"
#include "mvItemRegistry.h"
#include "mvPythonExceptions.h"
#include "mvUtilities.h"
namespace Marvel {
mvToggledOpenHandler::mvToggledOpenHandler(mvUUID uuid)
:
mvAppItem(uuid)
{
}
void mvToggledOpenHandler::customAction(void* data)
{
if (static_cast... | 615 | 267 |
int min(){ | 10 | 4 |
/*
* Copyright 2017 Keith Mendoza
*
* 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 agree... | 7,048 | 2,424 |
/*
* event.cpp
* This file is part of SVMOS
*
* Copyright (C) 2017 - Ecular, Maxul
*
* VmOs is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your opti... | 4,397 | 1,583 |
#ifndef TextureManager_hpp
#define TextureManager_hpp
#include "Game.hpp"
class TextureManager
{
public:
static SDL_Texture *LoadTexture(const char *textureFile, SDL_Renderer *renderer);
};
#endif /* TextureManager_hpp */ | 226 | 77 |
/* Cycript - The Truly Universal Scripting Language
* Copyright (C) 2009-2016 Jay Freeman (saurik)
*/
/* GNU Affero General Public License, Version 3 {{{ */
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the... | 2,202 | 708 |
// SPDX-License-Identifier: BSD-2-Clause
// This code is part of the sfizz library and is licensed under a BSD 2-clause
// license. You should have receive a LICENSE.md file along with the code.
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#include "DataHelpers.h"
#include <string>
#i... | 2,150 | 773 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
int n;
cin>>n;
for(int i =1 ; i<= n ; i++){
int le = 1 , chan = 0;
for(int j = i-1 ; j >= 0 ; j--){
if(j%2 ==0){
cout<<le;
}else{
cout<<chan;
}
}cout<<"\n";
}
} | 281 | 138 |
#include "eventdispatcher.h"
#include <core/log/log.h>
#include <core/video/context.h>
namespace fd {
namespace core {
namespace event {
using namespace utils;
using namespace log;
using namespace video;
List<EventListener*> EventDispatcher::allListeners;
List<EventListener*> EventDispatcher::windowList... | 4,506 | 1,561 |
#define STRICT
#include <windows.h>
#include <windowsx.h>
#include <crtdbg.h>
#include <olectl.h>
#include <docobj.h>
#include <servprov.h>
#include <exdisp.h>
#include <exdispid.h>
#include "winmain.h"
#include "events.h"
#include "ctr.h"
//+---------------------------------------------------------------------------... | 8,011 | 2,671 |
#include "depth_algorithms.h"
// Find the median of a continuous cv::Mat
float findMedianOfMat(cv::Mat mat) {
float median = 0;
if (mat.isContinuous()) {
// copy matrix data to a vector
std::vector<float> vec;
mat = mat.reshape(0, 1);
mat.copyTo(vec);
// remove 255 (when this is called, values that are mas... | 11,918 | 4,779 |
//////////////////////////////////////////////////////////////////////////////
// NOTICE:
//
// ADLib, Prop and their related set of tools and documentation are in the
// public domain. The author(s) of this software reserve no copyrights on
// the source code and any code generated using the tools. You are encour... | 23,509 | 7,239 |
//
// ImguiBuild.cpp
// Kreator
//
// Created by iKan on 10/04/22.
//
/// Include the Imgui example .cpp files for implementation of Imgui functionality
#define IMGUI_IMPL_OPENGL_LOADER_GLAD
#include <examples/imgui_impl_opengl3.cpp>
#include <examples/imgui_impl_glfw.cpp>
| 280 | 113 |
name = "SIA Additional Factions v2 (DEV)";
author = "Solders in Arms";
picture = "picture.paa";
logoSmall = "LogoSmall.paa";
logo = "Logo.paa";
logoOver = "LogoOver.paa";
action = "https://github.com/Soliders-in-Arms-Arma-3-Group/SIA-Additional-Factions-V2.git";
overview = "Adds additional factions."; | 302 | 124 |
/*******************************************************************************
*
*Copyright: armuxinxian@aliyun.com
*
*Author: f
*
*File name: hisys_conf.hpp
*
*Version: 1.0
*
*Date: 03-12月-2019 13:31:48
*
*Description: Class(hisys_conf) 表示海思系统配置信息
*
*Others:
*
*History:
*
*******************************************... | 2,878 | 1,732 |
/******************************************************************************
* Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved.
* iSulad licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan P... | 1,655 | 538 |
#include "Buma3DPCH.h"
#include "RenderPassVk.h"
namespace buma3d
{
B3D_APIENTRY RenderPassVk::RenderPassVk()
: ref_count { 1 }
, name {}
, device {}
, desc {}
, vkdevice {}
, inspfn {}
, devpfn {}
, render_pass{}
{
}
B3D_APIENTRY RenderPassVk::~RenderPassV... | 15,689 | 5,813 |
#pragma once
#include "../AxlibConfig.h"
#include "ax_intdatetime.h"
#include "ax_platform.h"
#include "ax_types.h"
#include "ax_printf.h"
#include "ax_string.h"
#include "ax_logger.h"
#include "ax_assert.h"
#include "ax_thread.h"
#include "ax_memory.h"
#include "ax_time.h"
#include "ax_thread.h... | 4,260 | 2,170 |
#pragma once
#include "./backend/wsi/WindowSystem.hpp"
#include "../../core/thread_pool/job_queue/JobQueue.hpp"
// gui
#include "./backend/gui/VulkanGUIHandler.hpp"
// render graph
#include "./render_graph/RenderGraph.hpp"
// scene (TODO)
#include "./scene/Scene.hpp"
#include "../../imgui/imgui.h"
#include "../../... | 2,858 | 1,012 |
#include "PihaTime.h"
#ifdef _WIN32
#include <Windows.h>
#else
#include <cstddef> // For NULL
//#include <sys/time.h>
#include <time.h>
#endif
#include <assert.h>
namespace Piha
{
#ifdef _WIN32
/*
TimeInternals (Windows platform)
On Windows, there are many time functions available.
- the standard ftime fu... | 5,145 | 1,809 |
#include "sim/init.hh"
namespace {
const uint8_t data_m5_objects_GarnetLink_d[] = {
120,156,205,86,89,111,211,64,16,30,59,247,1,173,80,27,
110,225,7,30,44,164,96,14,21,132,4,8,81,33,132,132,
0,185,8,137,188,88,142,119,147,56,241,17,121,183,77,242,
192,83,249,13,252,93,152,25,219,105,10,5,193,83,201,49... | 3,865 | 3,482 |
/*
* Duncan Horn
*
* UnitsTests.cpp
*
* Tests for the animation_manager.h types/functions
*/
#include "stdafx.h"
#include <dhorn/experimental/animation_manager.h>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace dhorn
{
namespace tests
{
TEST_CLASS(AnimationManagerTests)... | 7,306 | 1,844 |
#ifndef ARDUIMU_VISUALISATION_GYROSCOPE_HPP_INCLUDED
#define ARDUIMU_VISUALISATION_GYROSCOPE_HPP_INCLUDED
#include <quan/three_d/vect.hpp>
#include <quan/reciprocal_time.hpp>
#include <quan/angle.hpp>
quan::three_d::vect<
quan::reciprocal_time_<
quan::angle::deg
>::per_s
> get_gyroscope();
void set_gyro... | 498 | 239 |
// Copyright (c) 2013-2015 mogemimi.
// Distributed under the MIT license. See LICENSE.md file for details.
#include "MouseCocoa.hpp"
#include <type_traits>
namespace Pomdog {
namespace Detail {
namespace Cocoa {
//-----------------------------------------------------------------------
MouseCocoa::MouseCocoa()
: scro... | 1,963 | 478 |
#include "client_pch.h"
#include "cl_splitscreen.h"
#if defined( _PS3 )
#include "tls_ps3.h"
#define m_SplitSlot reinterpret_cast< SplitSlot_t *& >(GetTLSGlobals()->pEngineSplitSlot)
#endif // _PS3
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
class CSplitScreen : public ISp... | 11,224 | 4,528 |
/*
Missing numbers
------------------
# One missing
Approach 1 : sum
approach 2 : XOR
Assume a1 ^ a2 ^ a3 ^ …^ an = A and a1 ^ a2 ^ a3 ^ …^ an-1 = B
Then A ^ B = an
Approach 3 : a[a[i]] = 1
------------------
# Two missing
Approach 1 sum and avg (statistical)
sum of array, avg of array - compare with sum a... | 937 | 349 |
#include "part1.hpp"
#include "part2.hpp"
using namespace std;
string Part2::solve(const vector<string> &signals) {
vector<map<char, int>> freqs = Part1::getFreqs(signals);
// pick the least popular letter for each position
string corrected = "";
for (const auto freq : freqs) {
vector<pair<ch... | 679 | 233 |
#pragma once
#include <Siv3D.hpp>
#include "Bullet.hpp"
#include "../Scenes/Game.hpp"
class Laser final : public Bullet {
private:
bool isCharging = true;
int energy = 1;
Vec2 myPos;
bool isLeft;
bool isLInvalid = false;
bool isRInvalid = false;
static bool isLShooting;
static bool isRShooting;
static Option... | 1,910 | 812 |
#include <stdlib.h>
#include "VVexRiscvCpu.h"
#include <verilated_vcd_c.h>
#include "verilated.h"
#include "periph.h"
#include "memctrl.h"
#include "sim.h"
#include <iostream>
#include <vector>
class VexRiscv : public SimElement {
public:
ForwardingOutputSignal<uint8_t> iBusRead;
ForwardingOutputSignal<uint3... | 6,140 | 2,339 |
// Copyright Oliver Kowalke 2009.
// 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 AUTOBOOST_CONTEXT_FCONTEXT_H
#define AUTOBOOST_CONTEXT_FCONTEXT_H
#if defined(__PGI)
#include <std... | 1,112 | 456 |
#include "src.h"
std::array<int,10> primes(){
return {2,3,5,7,11,13,17,19,23,29};
}
std::array<std::pair<int,int>, 3> zip(std::array<int,3> a, std::array<int,3> b){
return {
std::make_pair(a[0], b[0]),
std::make_pair(a[1], b[1]),
std::make_pair(a[2], b[2])
};
} | 298 | 149 |
#pragma once
#include <filesystem>
#include <glob.h>
#include <vector>
#include <assimp/scene.h>
#include "afk/renderer/Animation.hpp"
#include "afk/renderer/Bone.hpp"
#include "afk/renderer/Mesh.hpp"
#include "afk/renderer/ModelNode.hpp"
#include "afk/renderer/Texture.hpp"
namespace Afk {
struct Model {
usi... | 970 | 340 |
/* -*- mode: C++; c-basic-offset: 4; tab-width: 8; -*-
* vi: set shiftwidth=4 tabstop=8:
* :indentSize=4:tabSize=8:
*/
#include "gtest/gtest.h"
#include "history.h"
#if defined(_WIN32)
#include <io.h>
#include <stdio.h>
namespace {
int unlink(const std::string& fn)
{
return _unlink(fn.c_str());
}
i... | 2,177 | 914 |
/*! \file */ //Copyright 2011-2018 Tyler Gilbert; All Rights Reserved
#include <cmath>
#include "sgfx.hpp"
#include "draw/ArcProgress.hpp"
using namespace draw;
ArcProgress::ArcProgress() {
m_offset = 0;
m_direction = 1;
}
void ArcProgress::draw_to_scale(const DrawingScaledAttr & attr){
//draw the progress bar on... | 2,067 | 968 |