blob_id stringlengths 40 40 | content_id stringlengths 40 40 | repo_name stringlengths 5 114 | path stringlengths 5 318 | language stringclasses 5
values | extension stringclasses 12
values | length_bytes int64 200 200k | license_type stringclasses 2
values | content stringlengths 143 200k |
|---|---|---|---|---|---|---|---|---|
cf80e85c757812735a77794c1f0e98998411ab1b | 9d6f3f242318cb6a4549c662622b65e26f6e4aa8 | pablolevi/crave | /src/crave/experimental/CoverageBins.hpp | C++ | hpp | 10,424 | permissive | // Copyright 2012-2017 The CRAVE developers, University of Bremen, Germany. All rights reserved.
#pragma once
#include "Expression.hpp"
#include "Object.hpp"
#include "Variable.hpp"
#include "../ir/UserExpression.hpp"
#include "../utils/Evaluator.hpp"
#include <string>
#include <vector>
namespace crave {
class crv... |
b2783d3c231862aea955b535db1f2f3bacff00f7 | 426a9a483af2baf0fc68ada01921f6452e0a6816 | momartinm/AKFD | /preprocess/operator.cc | C++ | cc | 4,560 | no_license | #include "helper_functions.h"
#include "operator.h"
#include "variable.h"
#include <cassert>
#include <iostream>
#include <fstream>
using namespace std;
Operator::Operator(istream &in, const vector<Variable *> &variables) {
check_magic(in, "begin_operator");
in >> ws;
getline(in, name);
int count; // ... |
48e84a12d7523f510fd38ef5075201baf6bd72c1 | 1360fd5e9db9b96f246b5ea755fb51bbde2b8813 | aeantipov/fk_df | /tests/DMFTCubicSuscTest02.cpp | C++ | cpp | 8,582 | no_license | #include <numeric>
#include "Solver.h"
#include "DMFT.h"
#include <iostream>
#include <ctime>
#include <array>
using namespace FK;
typedef grid_object<complex_type,fmatsubara_grid> GF;
template <typename F1, typename F2>
bool is_equal ( F1 x, F2 y, real_type tolerance = 1e-7)
{
return (std::abs(x-y)<tolerance);... |
e3b6046f8b8a8f5f24d65ab0365400b1382f04f1 | dfd5ab6ca02715d11e3b0f47c8970fb3c6446b6c | ym1124/seisaku | /ray_camera.cpp | C++ | cpp | 767 | no_license | #include "ray_camera.h"
#include "calculator.h"
ray pinhole_camera::getRay(float u, float v)
{
DirectX::XMFLOAT3 focus = getFocus();
orthoNormalBasis(focus, right, up);
//ピンホールの位置
DirectX::XMFLOAT3 pinhole_pos = DirectX::XMFLOAT3(this->getEye().x + this->getFocus().x*pinhole_dist, this->getEye().y + this->getFocus... |
47e97e044634185a14637e8b9423c271b16917a7 | a14dd210f4d58a00a4caa3c5b6702337b8db16cb | jrgs1/map_of_prediction | /src/MapBuilder.hpp | C++ | hpp | 3,927 | no_license | #include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <string>
#include <ros/console.h>
#include <fstream>
#include <vector>
#include <cmath>
using namespace cv;
using... |
712d12d32ef68f16e3b265fdbaac51d351d919b5 | 5258a643ab254eaa1ab8eaa8ff7f7af3210d360a | estraier/tkrzw | /example/tinydbm_ex2.cc | C++ | cc | 2,619 | permissive | /*************************************************************************************************
* Example for serious use cases of the on-memory hash database
*
* Copyright 2020 Google LLC
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the... |
ea10ce7ca66156050676839cd6d13b00dcc8aec1 | f5079b0e5e10eb5d091df89b241fcec386e33179 | SRI-CSL/z3 | /src/smt/proto_model/datatype_factory.cpp | C++ | cpp | 10,713 | permissive | /*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
datatype_factory.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-11-06.
Revision History:
--*/
#include "smt/proto_model/datatype_factory.h"
#include "smt/proto_model/proto_model.h"
#include "ast/ast_pp.h"
#include "ast/as... |
eb4b534e347a40d3806cfcb5d32a4fc95c58dcf9 | c0a20a567a9a9c32945357e8ad4b23412af1dea7 | cccpo/BlockBusterWin32 | /board/GameBoard.cpp | C++ | cpp | 1,965 | no_license | #include <iostream>
#include "GameBoard.h"
#include "ScoreManager.h"
typedef unsigned char byte;
using std::cout;
using std::endl;
static int sBoard[GameBoard::mGbWidth + 2][GameBoard::mGbHeight + 2];
// ゲームボード初期化
void GameBoard::InitGameBoard() {
//ゲームボード内部の初期化
for (int x = 1; x < mGbWidth + 1; ++x) {
... |
55df4d9bcff700cc16ed2e1a2aff218ebc5fbd50 | 74346ca6248629fb8380b672c164dfa058a37c77 | h-nari/Humblesoft_LedMat | /src/Humblesoft_LedMat.cpp | C++ | cpp | 13,626 | permissive | #include "Humblesoft_LedMat.h"
#include <SPI.h>
Humblesoft_LedMat LedMat;
Humblesoft_LedMat::Humblesoft_LedMat()
: Humblesoft_GFX(HLM_WIDTH_MAX,HLM_HEIGHT_MAX)
{
m_enable = false;
m_sdEnable = false;
m_verbose = 0;
m_cPlane = 4;
m_bright = 16;
m_bright_max = 100;
m_configId = 1;
m_bGamma = true;
... |
66ab2e7c3f3a4d402f5deee2a48bb8b84e6a0894 | 90e8ae01fa0638d253cfa29fca72d6bed136b619 | DaniyalAhmadKhan-LUMS/CS202Assignment2 | /zambeel.hpp | C++ | hpp | 381 | no_license | #ifndef __ZAMBEEL_HPP
#define __ZAMBEEL_HPP
#include "avl.hpp"
class Zambeel {
AVL<int,int> *myTree;
public:
Zambeel(bool isAVL);
bool istAddCourse(int course_id);
bool istDropCourse(int course_id);
void istCleanEnrollment();
bool stuAddCourse(int course_id);
bool stuDropCourse(int course_id);
bool stuSwapCo... |
0d1e5dd177647f093e061ee96994430a012f18a6 | 08e0301625f12e14ed697b06eca521102eb90605 | cool2528/miniblink49 | /v8_5_7/src/interpreter/mkpeephole.cc | C++ | cc | 13,050 | permissive | // Copyright 2016 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 <array>
#include <fstream>
#include <map>
#include <string>
#include <vector>
#include "src/globals.h"
#include "src/interpreter/bytecode-peep... |
19f9f558df7e1bb754c68b744e1fca6562a7acb3 | d8a789e0e817201422437eab6ae0a659a8b28e7c | StepanPrivalov/SimpleTasks | /EGETasks/EGETasks/TaskCollection.cpp | C++ | cpp | 676 | no_license | #include "TaskCollection.h"
#include"Utility.h"
#include<iostream>
using namespace std;
// TaskCollection functions implementations
void Task1Run()
{
int minNum = 10000, k = 0;
int a[30];
for (int i = 0; i < 30; i++)
{
cin >> a[i];
if (a[i] == 0)
{
continue;
}
if ((a[i] % 5) == 0)
{
if (a[i] < ... |
7f4a5e9ad2fd691f4b170634f472c9a4e95e9343 | 26e2b4fcd3ca58cc84157cf1699a50c19c3f3466 | jzrake/ctf | /Mara/hydro.hpp | C++ | hpp | 11,755 | permissive |
/*------------------------------------------------------------------------------
* FILE: hydro.hpp
*
* AUTHOR: Jonathan Zrake, NYU CCPP: zrake@nyu.edu
*
* REFERENCES:
*
*------------------------------------------------------------------------------
*/
#ifndef __HydroBaseInterface_HEADER__
#define __HydroBaseI... |
617484d7406cd03c51989995286209b87fb56d49 | d391dd563b4ea0b6cde971b5387db743b376fc7f | billyfish/qrods | /src/RODEX/metadatadialog.cpp | C++ | cpp | 3,798 | permissive | //The MIT License (MIT)
//Copyright (c) <2015> <CIn-UFPE>
//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... |
180280b2430d3754ade0607160f18bcffd8480e9 | 304b95d9171c5a4cf14fb9e1afc96f1287ac42c0 | JacobNeal/gl-projects | /simple_model_editor/src/Editor.cpp | C++ | cpp | 6,740 | permissive | #include "Editor.hpp"
Editor::Editor(const char * title, unsigned int width, unsigned int height)
: m_deltaTime(0.0f), m_lastFrameTime(0.0f), m_width(width), m_height(height)
{
/****************************************
* Set up GLFW
****************************************/
glfwInit();
glfwWin... |
f88281d39b251a056b3e468d4d2897ce5f8d394f | 88cf4deaa73b7fb2288847ad61c08a08e645afda | henrykalex/analisisModSistSoft | /Evaluacion1Corr/Evaluacion1Corr/main.cpp | C++ | cpp | 7,781 | no_license | //
// main.cpp
// Evaluacion1Corr
//
// Created by Henry on 13/02/17.
// Copyright © 2017 Henryk. All rights reserved.
//
#include <iostream>
#include "Videojuego.hpp"
#include "Almacen.hpp"
void menu(){
char res, tempC = ' ';
int numero, tempI = 0;
std::string tipo, nombre, rating, subtipo, temp... |
21de8e40264468be8fd3b30e54766e89850d9866 | 2b267de613f38163cf12fb9e4e2b3b2790306225 | welldefinedvariables/CS3113 | /Assignments/Pong/Pong/main.cpp | C++ | cpp | 7,880 | no_license |
#include <SDL.h>
#include <SDL_opengl.h>
#include <SDL_image.h>
#include <array>
#include <math.h>
#include "Ball.h"
#include "Paddle.h"
#include "LoseAnimation.h"
#define ORTHOTOP 1.0f
#define ORTHOBOT -1.0f
#define ORTHOLEFT -1.33f
#define ORTHORIGHT 1.33f
using std::array;
SDL_Window* displayWindow;
SDL_Joysti... |
e9b255b26f056ca9cea22dbc3fc4a6dcd642476c | 2656159135aa5e47a003e6cfcf71ecacbf748b6d | doctorlove/paperbag | /evolve/Evolution/Tests/GameOfLifeTests.cpp | C++ | cpp | 13,547 | no_license | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "../GameOfLife/GoL.h"
using namespace GoL;
/*
namespace Catch { // CATCH won't find this in the global namespace
//ignoring this
std::ostream& operator<<(std::ostream& o, std::vector<int> const& s) {
for(auto&& i : s)
o << i << ' ';
return o;
... |
5ccf8a61d0c5349d7b5c96717e724cca7f42c719 | 5e5626a8458fde9419b5876195297d2f57d7dd0a | chemiczny/automateusz_gto_d2 | /include/gto_d2_kit/d2_ee_pdpd_BB.hpp | C++ | hpp | 683 | no_license | #ifndef D2_EE_PDPD_BB_HPP
#define D2_EE_PDPD_BB_HPP
void second_derivative_ee_1212_22( const double ae,
const double xA,
const double yA,
const double zA,
const double be,
const double xB,
const double yB,
const double zB,
const double ce,
const double xC,
const double yC,
... |
c25f0ad1c4e3bbdebb78e4c8b835dd38ff2795d9 | c28e1434179bbfbfd50a8c13b9543cecc555ced8 | nbecker/pythran | /pythran/pythonic/include/numpy/empty_like.hpp | C++ | hpp | 590 | permissive | #ifndef PYTHONIC_INCLUDE_NUMPY_EMPTYLIKE_HPP
#define PYTHONIC_INCLUDE_NUMPY_EMPTYLIKE_HPP
#include "pythonic/include/utils/functor.hpp"
#include "pythonic/include/numpy/empty.hpp"
PYTHONIC_NS_BEGIN
namespace numpy
{
template <class E, class dtype>
auto empty_like(E const &expr, dtype d = dtype())
-> declty... |
c111c44d13ee0c14217509a50aed554c3db6c85d | abe16f492dff107c747d992de6e14360d0736862 | liudyboy/oneflow | /oneflow/core/graph/logical_graph.cpp | C++ | cpp | 7,290 | permissive | /*
Copyright 2020 The OneFlow 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... |
27ef47e76da3f99956fe2748f1cedbdddddc1007 | 306888316fd95e8b784dfffbe14acecd783731c1 | ExpLife0011/kys-cpp | /src/UISystem.cpp | C++ | cpp | 1,959 | permissive | #include "UISystem.h"
#include "UISave.h"
#include "Event.h"
#include "Script.h"
#include "Engine.h"
UISystem::UISystem()
{
title_ = new MenuText();
title_->setStrings({ "讀取進度", "保存進度", "我的代碼", "離開遊戲" });
title_->setFontSize(24);
title_->arrange(100, 50, 120, 0);
addChild(title_);
}
UISystem::~UIS... |
6752049b65c34f05d0724f5ac911f04631c1bf79 | 9a1529358a6efea4a8fa3ce22fda040b13554f5d | irvanda/my-codeforce-code | /58A.cpp | C++ | cpp | 511 | no_license | #include <iostream>
#include <string>
#include <Cmath>
#include <algorithm>
#include <sstream>
using namespace std;
int main()
{
string s;
cin >> s;
string hello = "hello";
int j=0;
bool Hello = true, Break = false;
for(int i=0; i< 5; i++)
{
while(s[j]!=hello[i])
{
if(s[j]=='\0')
... |
c788352b6268e58c540033bbbbe61500fad80f01 | 2be9b7c2137301c016fa6afaebc841e54c812e2d | Arc-lin/swift | /lib/SILOptimizer/Mandatory/DiagnoseUnreachable.cpp | C++ | cpp | 30,042 | permissive | //===--- DiagnoseUnreachable.cpp - Diagnose unreachable code --------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
f2b7d8638c1a0c3bfc5f236c433f2b3135305d0a | b1e2eaa36069f0ae63d344bf98ba9cd06b324bc2 | oshulgin/cpp_fundamentals | /chapter.14.reusing.code.in.cpp/1/1.cpp | C++ | cpp | 2,026 | no_license | #include <iostream>
#include "winec.h"
int main () {
cout << "Enter name of wine: ";
char lab[50];
cin.getline(lab, 50);
cout << "Enter number of years: ";
int yrs;
cin >> yrs;
Wine holding(lab, yrs); // store label, years, give arrays yrs elements
holding.GetBottles(); // solicit input for year, bottle cou... |
e7e4c2c3024fe59bddd459c813c59ced80b6cc6e | 72c54f889394c4c0b20fef122250353af8c985b4 | MuhammadMouostafa/MyProjects | /codeforces/CF448-D2-A.cpp | C++ | cpp | 693 | no_license | #include<bits/stdc++.h>
#define clr(v,d) memset(v,d,sizeof(v))
#define lp(i,n) for(int i=0; i<n; i++)
#define rep(i,v) for(int i=0; i<(int)v.size(); i++)
typedef long long ll;
using namespace std;
void fast()
{
std::ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
}
ll gcd(ll a, ll... |
4375dfdea67cff4eba07a85108078e9e103bf393 | ed964002b46bd95293aea53f13f461bf53ebdcc5 | olzhas-b/algorithm-data-structure | /algo/heap/a.cpp | C++ | cpp | 1,572 | no_license | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define int long long
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define F first
#define S second
#define pb push_back
#define rep(i, a, b) for(int i = a; i < b; i++)
#define repr(i, a, b) for(int i = a - 1; i... |
852553d601cef0ce3d3921cd6712a1891907adf5 | c6c0b8109188d73d332e78c490e32a8bbdb0e4a9 | weakunix/python_git | /live_events/CompetitveProgrammingPractice/USACO/2019-2020/Feb/Silver/AfterContest/Triangles/Triangles.cpp | C++ | cpp | 1,738 | no_license | #include <fstream>
#include <vector>
#include <utility>
#include <map>
#include <unordered_map>
#include <algorithm>
using namespace std;
#define all(v) v.begin(), v.end()
ofstream fout("triangles.out");
ifstream fin ("triangles.in");
int main() {
int N;
const int ModVal = 1000000007;
long long AreaSum ... |
e41d011f3c886e0442c3b29bb65a8d454e88e161 | c9d3d8a5dd0ae8028724c5e92deb6145eb123bfe | meniossin/src | /components/autofill/core/browser/webdata/autofill_webdata_service.cc | C++ | cc | 11,570 | permissive | // Copyright 2013 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 "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h... |
2e10b5e1c0a21736a1bc99b56c9a69c60e08ccbd | 110989b0dfa3e44f55c7f79ce9ad2a2b9e6864b9 | jJayyyyyyy/OJ | /PAT/basic_level/1065_单身狗/single.cpp | C++ | cpp | 988 | no_license | #include <cstdio>
#define MAXPAIRS 100004
#define MAXGUESTS 100004
using namespace std;
struct Person{
int hasMate = 0;
int mateId = -1;
int set(int has, int id){
hasMate = has;
mateId = id;
}
};
Person person[MAXPAIRS];
int guest[MAXGUESTS]={0};
int single[MAXGUESTS]={0};
int main(){
int n, m, i, id, id1, i... |
84659a60d995583e907220c1856d8a2e7e1a043b | c0f8b2714dcdbd2e19f77cd22e6a38b2900b4532 | valbornoz/PRs_ULA | /programacion_2/Tareas/Tarea_1/mainB.cpp | C++ | cpp | 279 | no_license | #include "Banco.h"
using namespace std;
main(){
int n;
char c;
cout<<"cuantos bancos desea registrar?"<<endl;
cin>>n;
Banco b;
b.lectura(n);
cout<<"desea mostrar la informacion de los bancos ingresados [y/n]?"<<endl;
cin>>c;
if(c=='y'){
b.mostrar(n);
}
}
|
73bf9897a1fd01fe020a833891ec5f0647553faf | 802770c31e1f25a52d88d7d4aa1fd9e2e89cbff0 | korantu/vx2 | /src/navigator.cpp | C++ | cpp | 1,678 | no_license | #include "navigator.h"
///setting inital state to the camera;
camera::camera() {
center = V3f(0,0,0);
eye = V3f(0,0,-1);
up = V3f(0,1,0);
};
///Move the camera by dx/dy
camera & move(camera & to_move, int dx, int dy){
float fdx = 0.01f*dx; //inital values; scaled
float fdy = 0.01f*dy;
to_move.eye = to_mo... |
7ace86d4803586f405f71446e5a19f98967ba679 | b476e195e3ed23beaca851454f2cac502de1b004 | koide3/loam_velodyne | /src/lib/TransformMaintenance.cpp | C++ | cpp | 5,146 | permissive | // Copyright 2013, Ji Zhang, Carnegie Mellon University
// Further contributions copyright (c) 2016, Southwest Research Institute
// 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. Redis... |
579c3b7fdb3c525d0aa89b7c55341f3318950c40 | bebed15a1379b862c9a1531e4924e610ef27ba9e | agerasev/hypertrace | /kernel/ocl/geometry/euclidean.cc | C++ | cc | 3,199 | permissive | #include "euclidean.hh"
#include <transform/rotation.hh>
EuPos eu_origin() {
return make(real3)(R0);
}
EuDir eu_default_dir() {
return make(real3)(R0, R0, -R1);
}
real eu_length(EuPos a) {
return length(a);
}
real eu_distance(EuPos a, EuPos b) {
return distance(a, b);
}
__allow_unused_params__
EuDir... |
6e346b6c918412c6d43046ab67dc86e51057f13e | 35b3276003d484a80f13e25ffbe072f8d216fe04 | 2gury/design_patterns | /Structural Patterns/Proxy/Proxy.cpp | C++ | cpp | 623 | no_license | //Example of `proxy' design pattern in C++
#include <iostream>
class Subject {
public:
virtual ~Subject() {};
virtual void Request() = 0;
};
class RealSubject : public Subject {
public:
void Request() {
//...implementation
};
};
class Proxy : public Subject {
public:
Proxy(): real_subjec... |
689b7fcaf5b39bb157b89aa3bcd7b73febbce2ab | 9e096b7b17890cf68021d8f8ff333ad3325e23c0 | heitzmann/gdstk | /include/gdstk/property.hpp | C++ | hpp | 3,412 | permissive | /*
Copyright 2020 Lucas Heitzmann Gabrielli.
This file is part of gdstk, distributed under the terms of the
Boost Software License - Version 1.0. See the accompanying
LICENSE file or <http://www.boost.org/LICENSE_1_0.txt>
*/
#ifndef GDSTK_HEADER_PROPERTY
#define GDSTK_HEADER_PROPERTY
#define __STDC_FORMAT_MACROS 1
#... |
f7da409640e49e529cba02250ea9d887e69583e0 | 95ad14499a15d08f2134b824663e7aa78cb5b927 | 34234344543255455465/aws-sdk-cpp | /aws-cpp-sdk-iotanalytics/source/IoTAnalyticsClient.cpp | C++ | cpp | 52,621 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
6375c06380fd58ca0bfc0fd9f4a286423f67d0c5 | 25ac8da21371351d5f720a5272b85fbb163477cd | Teabeans/CPP_Learn | /CodeSnippets/deleteMiddleNode.cpp | C++ | cpp | 5,431 | permissive | //-----------------------------------------------------------------------------|
// AUTHORSHIP
//-----------------------------------------------------------------------------|
//
// Tim Lum
// twhlum@gmail.com
// Created: 2018.08.31
// Modified: 2018.08.31
//
/*
2.2 - deleteMiddleNode( node* ) - P.94
Implement an alg... |
d8c41e68de3fcb0c8d42e70d0a8a5bb3b86239ba | e223a84271ca497f66942de853d07ddd64d1adc5 | RaissaVieira/Atividades-LP1 | /roteiro2-LLP1/Restaurante/MesaDeRestaurante.cpp | C++ | cpp | 1,061 | no_license | #include "MesaDeRestaurante.h"
#include <iostream>
#include <sstream>
using namespace std;
MesaDeRestaurante::MesaDeRestaurante(/* args */){
indice = 0;
}
void MesaDeRestaurante::adicionaAoPedido(Pedido p){
for (int i = 0; i < 50; i++)
{
if(p.getDescricao() == pedidos[i].getDescricao())
... |
29d7d0fbc156c249eaac82c98e4c4f5ba92eee3d | fc805a623b03aed0d797a091b071d7c541016736 | qwe00921/profilo | /deps/linker/sharedlibs.cpp | C++ | cpp | 3,691 | permissive | /**
* Copyright 2004-present, Facebook, 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 ... |
2d7474fe9bb664c8eba167ecd8950af1a46fbd4d | ce1a0631b891540870953475a6fad043826f2ec6 | ssh352/nexus | /Nexus/Include/Nexus/Accounting/PortfolioController.hpp | C++ | hpp | 7,725 | no_license | #ifndef NEXUS_PORTFOLIO_CONTROLLER_HPP
#define NEXUS_PORTFOLIO_CONTROLLER_HPP
#include <unordered_set>
#include <Beam/IO/OpenState.hpp>
#include <Beam/Pointers/LocalPtr.hpp>
#include <Beam/Pointers/NativePointerPolicy.hpp>
#include <Beam/Pointers/Out.hpp>
#include <Beam/Queues/RoutineTaskQueue.hpp>
#include <Beam/Queue... |
1a89e4a69f562c1a877c8b552e18d766d820982e | 6d530b237fb683c1fe62f0225bf0f04a961a21b4 | ue4sdk/DRG-SDK | /DRG-SDK/SDK/DRG_BP_PlayerState_Tutorial_classes.hpp | C++ | hpp | 768 | no_license | #pragma once
// Deep Rock Galactic (0.22) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "DRG_BP_PlayerState_Tutorial_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//-----------------------------------------------------------------... |
84cb6a334517b61b05637226df979a7ab848d1e1 | bf9fcb014b561f8b37210ec4d70586e4e0b3e88f | mickvav/LogDevice | /logdevice/common/test/LocalLogStoreRecordFormatTest.cpp | C++ | cpp | 10,292 | permissive | /**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/common/LocalLogStoreRecordFormat.h"
#include <gtest/gtest.h>
#inc... |
7b65c31529009b4823a10a1d6f67557a2cc99042 | 94835950ad33e73be0ccfcb19b02ffe2bb9d6000 | tmuttaqueen/MyCodes | /Online Judge Code/[Other] Online-Judge-Solutions-master_from github/Codeforces/241G.cpp | C++ | cpp | 255 | no_license | #include <cstdio>
using namespace std;
int main(){
printf("302\n");
printf("0 500000\n");
for(int i = 300,pos = 454850;i >= 1;--i){
printf("%d %d\n",pos + i,i);
pos += 2 * i;
}
printf("1000000 600000\n");
}
|
f073c22088d5caf8b07e714ac751829209080a1f | 390bb6c1067b408d0b9e28e032be40991c75fe39 | Eudaemonal/leetcode | /105_Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal/test01.cpp | C++ | cpp | 2,078 | no_license | #include <iostream>
#include <queue>
#include <vector>
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
std::ostream& operator<<(std::ostream& os, TreeNode *root) {
if (root == NULL) return os;
std::queue<TreeNode*> q;
... |
645f6d8d24ecfac01b8791265986883ac67e5a31 | a1fa89ad89a4974ab5670f1cfa0390548cbcf0f0 | Tvorobey/Simulator | /main.cpp | C++ | cpp | 453 | no_license | //Qt
#include <QCoreApplication>
//SDK
#include <CMainHandler/CMainHandler.h>
//Local
#include "AppController.h"
int main(int argc, char *argv[])
{
int retCode = 0;
QCoreApplication app{ argc, argv };
CMainHandler::setApplicationVersion( APP_VERSION, APP_REVISION );
retCode = CMainHandler::parseArgs... |
5af8759acc04bb4bfb32b81ce274d9921fdeb93a | b4d82351db03494bb3a5a821acd6be0c4a255199 | gnoliyil/fuchsia | /src/connectivity/bluetooth/core/bt-host/gap/fake_adapter.cc | C++ | cc | 5,743 | permissive | // Copyright 2021 The Fuchsia 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 "fake_adapter.h"
#include "src/connectivity/bluetooth/core/bt-host/transport/link_type.h"
namespace bt::gap::testing {
FakeAdapter::FakeAdapter... |
c6cdfac80dcbbd4968275f06f3902bd958397a62 | 5f980eb0dbc7f1b867cbe01a16b486309ec2cd26 | Unarmed1000/RapidVulkan | /include/RapidVulkan/Debug/Strings/VkFragmentShadingRateNV.hpp | C++ | hpp | 4,775 | permissive | #ifndef RAPIDVULKAN_DEBUG_STRINGS_VKFRAGMENTSHADINGRATENV_HPP
#define RAPIDVULKAN_DEBUG_STRINGS_VKFRAGMENTSHADINGRATENV_HPP
#if VK_HEADER_VERSION >= 162
//***************************************************************************************************************************************************
//* BSD 3-Clause ... |
6c193386a6a562bc7aae90b6dcd20d677b968459 | c310d32ce9364498b923f5545927352db9ee85e2 | spjoe/IncludeOS | /src/fs/fat.cpp | C++ | cpp | 8,475 | permissive | //#define DEBUG
#include <fs/fat.hpp>
#include <fs/mbr.hpp>
#include <cassert>
#include <debug>
#include <cstring>
#include <locale>
#include <kernel/syscalls.hpp> // for panic()
#include <info>
//#undef debug
//#define debug(...) printf(__VA_ARGS__)
#define likely(x) __builtin_expect(!!(x), 1)
#define unlike... |
973e3ea188e315b40d3c74c0d0e41aff4467a4a2 | e8b8945ba6e31c3a7b4c2e3e82a7a8259f1e6184 | syxanash/SevenSegment | /SevenSegment/SevenSegment.cpp | C++ | cpp | 1,125 | permissive | /*
Seven Segment Display
Copyright (c) 2012 - syxanash
Mail me: syxanash@gmail
Tweet me: @syxanash
*/
#include "Arduino.h"
#include "SevenSegment.h"
SevenSegment::SevenSegment(int pins[8])
{
for (int i = 0; i < 8; i++) {
_display_pins[i] = pins[i];
pinMode(_display_pins[i], OUTPU... |
da717a018220d92d8dd81c44a35de91fac12eae5 | ebd6f744b7871320b25175b4be69cb36719695d6 | GuillermoCGTZ21/PO_GCEZAR_T03 | /Fraccion.cpp | C++ | cpp | 3,006 | no_license | //
// Created by el_me on 31/03/2018.
//
#include "Fraccion.h"
Fraccion::Fraccion(int numerador, int denominador){
this->numerador = numerador;
this->denominador = denominador;
}
Fraccion operator + (const Fraccion &f1, const Fraccion &f2){
int Denominadorf = (f1.denominador * f2.denominador);
int Nu... |
f65f7d874b16bec05b8238f1ec7cd6a53e5d6917 | 34f8a03d1bbacf4fde4c3122d93a1ee09369e3da | z0di4ckX/Exercise-C | /exercise-1-to-10/ex5.cpp | C++ | cpp | 311 | no_license | #include <iostream>
using namespace std;
int main() {
int x, y, aux;
cout << "Digite el valor de x:";
cin >> x;
cout << "Digite el valor de y:";
cin >> y;
aux = x;
x = y;
y = aux;
cout << "\nEl nuevo valor de x es: " << x << endl;
cout << "\nEl nuevo valor de y es: " << y << endl;
return 0;
} |
ee8465564a0d76fa8b68db4cb0859ac892fb4561 | 0454fa3ca428799961126dc085fdb10a665ac958 | hoaian0505/DoAnGame | /DoAnGame/DoAnGame/BoomerangW.cpp | C++ | cpp | 3,877 | no_license | #include "BoomerangW.h"
#include "World.h"
#include "Game.h"
BoomerangW::BoomerangW(LPD3DXSPRITE _SpriteHandler, World *_manager)
{
manager = _manager;
spriteHandler = _SpriteHandler;
sizeWidth = 64;
sizeHeight = 64;
objectType = WEAPON_TYPE;
texture = new Texture(_SpriteHandler, "Resources\\Sprites\\weapon\\su... |
fa82af43024c2865ec30396711782e33f31fb035 | 274c9e631c53158b1502d772cbc4426dd3b0d082 | erze/lex | /include/foonathan/lex/parse_result.hpp | C++ | hpp | 8,995 | permissive | // Copyright (C) 2018-2019 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.
#ifndef FOONATHAN_LEX_PARSE_RESULT_HPP_INCLUDED
#define FOONATHAN_LEX_PARSE_RESULT_HPP_INCLUDED
#include <type_traits>
... |
56f007b6edc1304ea08af2cac49b8581e875cb96 | e825ff7f39b43dadea29cfb1bb931a1cfe5210c4 | strogo/couchbase-lite-core | /LiteCore/Storage/KeyStore.hh | C++ | hh | 8,111 | permissive | //
// KeyStore.hh
//
// Copyright (c) 2014 Couchbase, Inc All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unles... |
a4b48e48e58699fddefcf269d7caf896b3762310 | 8de4bfcfb8feec78eb5e88905b9e981dcb3e9282 | Herbacoin/Herbacoin | /herbacoin/src/util.cpp | C++ | cpp | 43,221 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef WIN32
// for posix_fallocate
#ifdef __linux__
#define _POSIX_C_SOURCE 2001... |
b6b04a82a39dff141c46159ac6f2283f556ba1ec | 41615276510eaec850ab9b9c8da300f07cc77581 | tmrhombus/UWAnalysis | /CRAB/MuNu/farmoutAJ_analyzer/Submit_Valentine/Tbar_tWJESUp_callHistoFiller.cc | C++ | cc | 4,021 | no_license | /********************************
Instantiates histoFiller.C with
the correct chain and naming
for a definable set of parameters
Usage:
root -l -b
.L Tbar_tWJESUp_callHistoFiller.cc
Tbar_tWJESUp_callHistoFiller()
root -l -b -q Tbar_tWJESUp_callHistoFiller.cc
Author: T.M.Perry UW-Madison
****************************... |
f070cd1d6366f36ad3514ec1e484d7dd488c4e0a | c32b009480d1b1ff67489034eb968ee876205044 | alexandraback/datacollection | /solutions_5640146288377856_0/C++/0x1337/a.cpp | C++ | cpp | 924 | no_license | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cctype>
#include <cmath>
#include <fstream>
using namespace std;
typedef long long ll;
#define REP(i,k) for... |
6aa8af77cf2b80bbc7935512fba14c5f1f2c25f6 | 9a48e148faabe0a0b358a407f17b252009ea64c3 | AtikulDUET/Codeforces-problem | /208A Dubste.cpp | C++ | cpp | 461 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
string str1,str2;
char ch1='W',ch2='U',ch3='B';
int ck = 0;
cin>>str1;
for(int i=0;i<str1.size();i++){
if(str1[i]==ch1 && str1[i+1]==ch2&&str1[i+2]==ch3){
if(ck==1) str2+=" ";
i+=2;
... |
57b8f249e5416dfafef102bb0303989e1831ad72 | a768b371059fbc776c8fee9a17c8dc1d73788ffb | rmottola/Arctic-Fox | /gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp | C++ | cpp | 60,036 | permissive | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrGLCaps.h"
#include "GrContextOptions.h"
#include "GrGLContext.h"
#include "glsl/GrGLSLCaps.h"
#include "SkTSearch.h"
#include "SkTSort.h"
GrGLCaps::GrGLCaps(con... |
df1a0d837e43788794d3177a1bf04f45be5cf2f3 | 1dab2a338781193b0707b588f617d18c20693c11 | RichezA/progHELHA | /2eme/Programmation/Codes/C++/teacher code/10. operators override/07 - foncteur.cpp | C++ | cpp | 689 | no_license | #include <vector>
#include <iostream>
using namespace std;
class Tada //try to remove default cstr
{
public:
void operator () (int n)
{
cout << "Tada " << n << endl;
}
};
void f(int& n)
{
cout << "Applying f on " << n << endl;
}
bool impair(int n)
{
return n % 2 == 1;
}
int main()
{
Tada t;
t(5);
... |
94ccc3bff8761201b9cf22f865687350e5e1495c | ac394d6302bfa25a625a34fcfcc185dce4f77b38 | MedicaicloudLink/Rosetta | /main/source/src/core/conformation/parametric/Parameter.hh | C++ | hh | 12,862 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
b5f6b1a02bedf720e89534453308791c92aea6a4 | e874cd59026e5426e103c3087c3a72d40688585f | jofroid/UVProfiler | /UVProfiler/cursusmanager.cpp | C++ | cpp | 8,691 | no_license | #include "cursusmanager.h"
CursusManager* CursusManager::_instance(0);
CursusManager::CursusManager() {
EnsCredits::initEnsCreditsSystem();
load();
}
CursusManager& CursusManager::getInstance() {
if(_instance)
return *_instance;
_instance = new CursusManager();
return *_instance;
}
void Cu... |
ddaa8cf4ab3f9f6e6b91762d0045cb5e63dafe18 | 3faad86bb0f142e5a62d17f0537edf1b88af4845 | soukveda/CSUF-CPSC-131-Fall2017-project2-03-mariannes-team | /Webpage.cpp | C++ | cpp | 308 | no_license | #include "Webpage.h"
Webpage::Webpage() {
url = "N/A";
t_visited = 0;
}
Webpage::Webpage(const string& webpageURL, const time_t& timeVisited) {
url = webpageURL;
t_visited = timeVisited;
}
string Webpage::getURL() {
return url;
}
time_t Webpage::getTime() {
return t_visited;
}
|
74b15f051b75eb359793f649de89f28dfb125956 | e032b30f9cd063e6226406c88a1b1ef1e099f8d5 | Kiritow/OJ-Problems-Source | /HDOJ/5211_autoAC.cpp | C++ | cpp | 664 | no_license | #include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
#define MAXN 10005
int num[MAXN],n,f[MAXN];
int main()
{
while(scanf("%d",&n) != EOF)
{
int ans = 0;
memset(f,0,sizeof(f));
for(int i = 0;i < n;i++)
scanf("%d",&num[i]);
... |
aa150ac919dba2d74f2aecab39849c2afd7589a8 | 6e1c5baa01bf5383c833eb2040db409a2073e676 | chenxx98/tencentcloud-sdk-cpp | /mgobe/src/v20201014/model/DescribeRoomResponse.cpp | C++ | cpp | 3,095 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
6541e244869db8a915ff638ab1962e353b97c9ff | 466b5b1f36717b3ed6e28904e33e9d2a0c0604a5 | twosilly/HtmeEditor | /HtmlEditor/insertformdialog.cpp | C++ | cpp | 1,176 | no_license | #include "insertformdialog.h"
#include "ui_insertformdialog.h"
#include <QFileDialog>
InsertFormDialog::InsertFormDialog(QWidget *parent, Editor *e) :
QDialog(parent),
ui(new Ui::InsertFormDialog)
{
ui->setupUi(this);
editor = e;
this->setFixedSize(this->size());
ui->actionPath... |
9711aa3208da91e9f808b6a5a84570a04399c651 | 88198d2f12b754a8ec457564ea2a62b39eff5a4c | henrybear327/Sandbox | /HackerCup/2021/qual/A2/main.cpp | C++ | cpp | 1,473 | no_license | #include <bits/stdc++.h>
using namespace std;
bool isVowel(char c)
{
if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
return true;
return false;
}
int solve()
{
char inp[103];
scanf("%s", inp);
int dist[26][26];
memset(dist, 0x3f, sizeof(dist));
for (int i = 0; i < 2... |
b10220eac930fa1182d83be527542833aef7a320 | 2bea71eef13d64d402717aa22bb4cd4ca1bd3824 | VyacheslavKuzntesov/Control_Structures | /UniqueRandom/Source.cpp | C++ | cpp | 720 | no_license | #include<iostream>
using namespace std;
using std::cin;
using std::cout;
using std::endl;
#define tab "\t"
//#define unique_1
#define unique_2
void main()
{
setlocale(LC_ALL, "Rus");
const int n = 10;
int arr[n];
for (int i = 0; i < n; i++)
{
#ifdef unique_1
bool unique;
do
{
arr[i] = rand() % n;
u... |
94b7e2be0bf30c46791c3f910ed9594ff63de6a7 | a0dbcb44178e17108285789d4a24599c85109060 | zmd9220/algorithm_bagic | /algorithm_bagic_2020/algorithm_bagic_2020/10845 큐.cpp | C++ | cpp | 1,721 | no_license | #include <iostream>
#include <string>
using namespace std;
// stack을 환형 배열의 구조로 구현(땡기기 귀찮)
class queue
{
public:
void push(int a) // 푸쉬 입력
{
nums[end] = a;
end++;
return;
}
void pop() // 꺼내기
{
if (end != begin)//(!empty()) // 비었으면
{
cout << nums[begin] << endl;
begin++;
//nums[count] =... |
29730ed278eba0445562af369946b976ede84889 | fbe942b0f144541af900c79cefeaf225d6fcff41 | siddiqbarbhuiya/Code_Chef | /Easy/PCYCLE.cpp | C++ | cpp | 791 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main()
{
int t;
//cin>>t;
t=1;
while(t--)
{
int n;
int count =0;
cin>>n;
vector<int>a(n);
map<int,int>vis;
for(int i=0;i<n;i++)
{
cin>>a[i];
if... |
d33bb838ef0a774cc0e931b748e15a3e9f133952 | 67d6cf27ae667145cbf5f36f94ff0f619582e91f | ojaros/CS60 | /HW5/HW5.2.cpp | C++ | cpp | 411 | no_license | #include <iostream>
using namespace std;
int factorial(int f){
if (f == 0){
return 1;
}
return f * factorial(f-1);
}
int c(int n, int r){
return (factorial(n) / (factorial(r)*factorial(n-r)) );
}
int main(){
int n = 4;
int r = 2;
cout << factorial(n) << endl;
cout << factorial(r) << endl;
... |
1d0f5dea7bef96285ad026d000b1ae87755733da | ef08b43c1c8b45b6fc4dd687372ff38175ab3835 | hsorby/opencor | /src/plugins/thirdParty/LLVM/tools/clang/lib/Sema/SemaStmt.cpp | C++ | cpp | 146,020 | permissive | //===--- SemaStmt.cpp - Semantic Analysis for Statements ------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
b0350448d73fa8e7a64be775180170a324e22264 | 5caf8f99af46fd53cc4f4eb00babae2f74ddb9a7 | AlexisWilke/cpp-driver | /gtests/src/integration/bignumber.hpp | C++ | hpp | 6,130 | permissive | /*
Copyright (c) DataStax, 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 in writing, so... |
74a3e6a210e62505ed7834162af6068e03080cd4 | 6caf0ceabeb23db496e15a57ea04657957cd290e | nakkim/smartmet-plugin-wfs | /libwfs/CapabilitiesConf.cpp | C++ | cpp | 8,237 | permissive | #include "CapabilitiesConf.h"
#include <set>
#include <spine/ConfigBase.h>
#include <spine/Convenience.h>
#include <macgyver/Exception.h>
#include <boost/algorithm/string.hpp>
using Fmi::Exception;
using SmartMet::Plugin::WFS::CapabilitiesConf;
namespace ba = boost::algorithm;
namespace
{
libconfig::Setting*
get... |
c15dc83b54389370ba1dffead128dc92e6094e4a | a00c3249cb5ba7e09fca849b1088a73e852fcb0e | BioA3/BioA3 | /src/qt/paymentserver.cpp | C++ | cpp | 24,921 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2019 The BIOA3 developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "paymentserver.h"
#includ... |
d729272b951c30da2f9e6e3a9615ff73f7b23b64 | cc2f995aaec5701b14c6ede681dc49f0cbc8f871 | solisoft/arangodb | /3rdParty/boost/1.71.0/libs/multiprecision/test/test_arithmetic_mpfr_50.cpp | C++ | cpp | 726 | permissive | ///////////////////////////////////////////////////////////////
// Copyright 2012 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
#ifdef _MSC_VER
# define _SCL_SECURE_NO_WARNINGS
#endif
#include ... |
4455d12f115419913be6c8bae41d583efd19a994 | 5d5ff0cf419b1d742ef66ed552b1dbcc5917272a | QPC-database/aws-sdk-cpp | /aws-cpp-sdk-connectparticipant/source/model/SendMessageResult.cpp | C++ | cpp | 1,042 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/connectparticipant/model/SendMessageResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#includ... |
c5a84900aae29c345f31418cd722368eff737800 | c8f7270e768594fa0358e2922ffc8e6008e60013 | kohyatoh/contests | /live/codeforces/vk2012/r2/B.cpp | C++ | cpp | 1,544 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;
#ifdef DEBUGRUN
#define LOG(a) (cerr<<__LINE__<<": "#a" = "<... |
46b54fb758e8816572b6cf251bbd31394c6583d3 | ff23beaf199638cf4cc27c2b035e3e6b540f5461 | ToyoMasa/Shooting_DirectX | /DirectX_Frame/enemyPatternAttack.cpp | C++ | cpp | 1,493 | no_license | //======================================================================
// 敵攻撃パターン [enemyPatternAttack.cpp] (2018/10/31)
// Author : 豊村 昌俊
//======================================================================
#include "common.h"
#include "main.h"
#include "manager.h"
#include "camera.h"
#include "scene.h"
... |
442d5d9ae46c655ec1f6e17b9ad29dfb3c83b96a | 67e4970dc64975fc938d600f9e24858890024ce4 | imharrywu/v8 | /src/x64/interface-descriptors-x64.cc | C++ | cc | 11,557 | permissive | // Copyright 2012 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.
#if V8_TARGET_ARCH_X64
#include "src/interface-descriptors.h"
namespace v8 {
namespace internal {
const Register CallInterfaceDescriptor::ContextRegi... |
6fd095de7266b3e448baf1e9170d713efaa6d67a | 02ee1b119866d8514564acc8fb96c0789f424dd4 | HHHHHHHHHHHHHHHHHHHHHCS/MyOpenGLStudy02 | /MyOpenGLStudy02/Texture2D.cpp | C++ | cpp | 1,252 | no_license | #include "Texture2D.h"
Texture2D::Texture2D()
: Width(0), Height(0), Internal_Format(GL_RGB), Image_Format(GL_RGB)
, Wrap_S(GL_CLAMP), Wrap_T(GL_CLAMP), Filter_Min(GL_LINEAR), Filter_Max(GL_LINEAR)
{
glGenTextures(1, &this->ID);
}
//UI 2D 基本都不需要mimap
void Texture2D::Generate(GLuint width, GLuint height, unsigne... |
3297d67e6a1ff7b39c8db90c24afd01f0d9e92f4 | 44483f29568f951554216bf51c28ffd59f35fcb8 | ssaue/soundspace | /source/Soundspace/src/sspDeviceGroups.cpp | C++ | cpp | 2,965 | no_license | // sspDeviceGroups.cpp
#include "stdafx.h"
#include "resource.h"
#include "sspDeviceGroups.h"
#include <sspMidiDevice.h>
//////////////////////////////////////////////////////////////////////
// sspMidiOutDeviceGroup Class
//////////////////////////////////////////////////////////////////////
sspMidiOutDeviceGroup::... |
f40a0948671c1e197569caf9ddadf547d551e047 | 040c9006402e0ba0579d3ae4ff5cbd0a56182ca3 | whztt07/ogre3d | /RenderSystems/Direct3D11/src/OgreMonitorInfo.cpp | C++ | cpp | 2,889 | permissive | #include "OgreMonitorInfo.h"
namespace Ogre
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
template<> MonitorInfo* Singleton<MonitorInfo>::msSingleton = 0;
//---------------------------------------------------------------------
MonitorInfo::MonitorInfo()
{
Refresh();
}
//--------------------... |
d3e36c69f470c2b34e2bc0d57d4d01b9c692e139 | a42ad3bccd55f8d461e0bf9f0d628604a3dd0d5e | karunmatharu/Android-4.4-Pay-by-Data | /external/chromium_org/chrome/common/extensions/permissions/usb_device_permission_unittest.cc | C++ | cc | 2,435 | permissive | // Copyright (c) 2013 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 <set>
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
#include "base/strings/utf_string_conversions.h"
#inclu... |
b1132c450db4fbf4229f59189db5cdfc75514cfc | c709c14230c4438cbff7930b52e92b8c381e7570 | aschaffer/cugraph | /cpp/tests/link_analysis/mg_pagerank_test.cpp | C++ | cpp | 15,778 | permissive | /*
* 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 ... |
cef713c1f65ccee2e45ea02288c0bbe2c389f15b | be2bdd026a365f91427b2c65150ad875e5b1717a | hurjinhyuk1/Algorithm_Engineer-Information-Processing_study | /Algorithm_daily_coding/2019_April/0415Algorithm/0415Algorithm/BOJ9498.cpp | C++ | cpp | 335 | no_license | #pragma warning(disable 4996)
#include <stdio.h>
int N;
int main(void)
{
scanf("%d", &N);
switch (N / 10) {
case 10:case 9:
printf("A\n");
break;
case 8:
printf("B\n");
break;
case 7:
printf("C\n");
break;
case 6:
printf("D\n");
break;
default:
printf("F\n");
break;
}... |
f25756834b354a2d0e550f8cd80d73c1f6d3f3c2 | d7bea9f35f1482716826b16edf394a7b2b1a93f3 | raphaelradna/MAT201B | /assignment/2/particles-p4.cpp | C++ | cpp | 7,151 | no_license | // Raphael Radna
// MAT-201B W20
// Assignment 2
/* 4. Copy the file _particles-p3.cpp_ to _particles-p4.cpp_. Start with one of
* the systems above. Create your own twist on the system. Make something
* different and interesting.
*/
#include "al/app/al_App.hpp"
#include "al/math/al_Random.hpp"
#include "al/ui/al_... |
4aa57e65fe65cab6096f90868c4a21f08ba6023e | a64a381f0a1bb7f393bcfb12fb6a7f4375d2cc61 | DrPanigrahi/RoboND-HomeServiceRobot-Project | /src/pick_objects/src/pick_objects.cpp | C++ | cpp | 2,238 | no_license | #include <ros/ros.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>
// Define a client to send goal requests to move_base server through SimpleActionClient
typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
int main(int argc, char** arg... |
1f3f1f20d05a9e5895b1ae65fb163e5ed12ba6d0 | c0d16a544e399968dd7d9613328a74cb084b4bf2 | tpolly/PHL-OpenHexagon | /src/SSVOpenHexagon/Components/CWall.cpp | C++ | cpp | 2,406 | permissive | // Copyright (c) 2013-2015 Vittorio Romeo
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
#include "SSVOpenHexagon/Core/HexagonGame.hpp"
#include "SSVOpenHexagon/Components/CPlayer.hpp"
#include "SSVOpenHexagon/Components/CWall.hpp"
#include "SSVOpenHexagon/... |
44d6bc39a9625a25369d66b313d5d4d991b100f2 | 8738ce8f4a54c51573dcf6fd1c257fd3aa18a143 | dmajumder/cmssw | /SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorker.cc | C++ | cc | 31,818 | no_license | // File: DataMixingHcalDigiWorker.cc
// Description: see DataMixingHcalDigiWorker.h
// Author: Mike Hildreth, University of Notre Dame
//
//--------------------------------------------
#include <map>
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Utilities/interface/EDMException.h"
#inclu... |
1129a14993e4a1e6f86cd54324727a4ee8a0c4e7 | a72c116ad4375d95245ceb2ba652b1ff838acc2e | gasheva/PascalCompiler | /Compiler/Semantic.cpp | C++ | cpp | 10,551 | no_license | #include "Semantic.h"
#include <stdexcept>
#include "CVariant.h"
#include <set>
using namespace std;
CSemantic::CSemantic(CErrorManager* eManager, CLexic* lexic) {
this->eManager = eManager;
this->lexic = lexic;
}
CSemantic::~CSemantic() {}
void CSemantic::createFictiveScope() {
// integer, real, string, char - B... |
19635c041e4471ddc115d57ca9015b57e6a0f9e6 | fd3b61b76e20404297ceb499c362dccb465afc54 | Ankit-Tec40/semester2_cpp | /callbyrefrence2.cpp | C++ | cpp | 249 | no_license | using namespace std;
#include<iostream>
void show(int &a,int &b);
int main()
{
int x=1,y=5;
cout<<"x before call:"<<x<<y<<"\n";
show(x,y);
cout<<"x after call:"<<x<<y;
}
void show(int &a,int &b)
{
int c;
c=a;
a=b;
b=c;
}
|
96b26ad9ec84ce5d42ebe436566db30c9ecf80e6 | 98cd85687f3396bc0e131f1eb77a12bbd1d6fc42 | caosuomo/rads | /src/cpp/treetest.cpp | C++ | cpp | 3,835 | no_license | #include <iostream>
#include <cstdlib>
#include "treeutil.h"
#include "box.h"
#include "tree.h"
void test_boxes()
{
// vector<int> v(4);
// cout << v[8] << endl;
int dim = 2;
Point v1(dim),v2(dim),w1(dim),w2(dim);
v1[0] = 0;
v1[1] = 0;
w1[0] = 4;
w1[1] = 3;
v2[0] = 3;
v2[1] = 1;
w2[0] = 1;
... |
3d356939185362ea308667ee31c6537823a4fb68 | a5d94832c665d9661e5873076c022ac06f37444d | scarriere/udemy-toon-tank | /Source/ToonTanks/Components/HealthComponent.cpp | C++ | cpp | 935 | permissive | // Copyright Samuel Carriere 2020
#include "HealthComponent.h"
#include "ToonTanks/GameModes/TankGameModeBase.h"
#include "Kismet/GameplayStatics.h"
UHealthComponent::UHealthComponent()
{
PrimaryComponentTick.bCanEverTick = false;
}
void UHealthComponent::BeginPlay()
{
Super::BeginPlay();
Health = DefaultHealth... |
7009928ad5a387fd4dd6907c5b74a3604694c47d | 6ed71740821dfe891944ff5b07b5eabe00d78990 | thegamer1907/Code_Analysis | /contest/1542594766.cpp | C++ | cpp | 659 | no_license | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
typedef long long int llint;
typedef pair < int,int> pii;
const int N = 1e5 + 500;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
vector < string > v;
string s,x;
int n,gud = 0;
int main(){
ci... |
0854a6f89dd5964a9d61016b1aefcbf0e4cca84c | f11955b22c9baccd97636d7b910aa9ba25b5efb5 | adeptio-project/adeptio | /src/masternode-payments.cpp | C++ | cpp | 33,927 | permissive | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2020 The Adeptio developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "masternode-payme... |
9eccc96715be9727da59345fde6a7687fbe1ba15 | cec1af094700e1ad93fc52a25b589f44d7a40fe0 | joshkol1/Project-Euler | /Completed/151-200/problem159.cpp | C++ | cpp | 1,068 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
const int MAX = 1E6;
int drs[MAX];
int mdrs[MAX];
void init_drs() {
for(int i = 2; i < MAX; i++) {
if(i < 10) {
drs[i] = i; continue;
}
int i_copy = i;
int d_sum = 0;
while(... |
3b4bfb9ec852370c6216cfebbaf16539e044434b | 465e5a9fc6caa37d2dd6767e053d85a6d7b343d2 | mihaibivol/cdl | /2010/curs4/design-patterns/code/2main.cpp | C++ | cpp | 292 | no_license | // Visitor Pattern
int main() {
Visitor *visitor[2];
Visitable *animal[2];
visitor[0] = new Trainer(); visitor[1] = new Person();
animal[0] = new Cat(); animal[1] = new Dog();
for (int i = 0; i < 2; i++)
for (int j = 0; j < 2; j++)
animal[i]->accept(visitor[j]);
return 0;
}
|
d0f9637547cc88f2cec99956dac40e9e0b1b9b86 | 71c199c6682b91b76ad784e62e55468ce0bca248 | jchalex/ACM | /implementation/CF - 500 - A. New Year Transportation.cpp | C++ | cpp | 548 | no_license | #include <cstdio>
const int MAXN = 30000 + 10;
int n, t;
int a[MAXN];
bool ok;
void Read()
{
for (int i = 1; i < n; ++i)
{
scanf("%d", a + i);
}
}
void Solve()
{
int pos = 1;
while (pos < t && pos < n)
{
pos += a[pos];
}
ok = (pos == t) ? true : false;
}
void Output... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.