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 |
|---|---|---|---|---|---|---|---|---|
36b81bf0fd158e4a78f90c83d5232a478bb9f2f5 | 61d2283301f8b835d8c81ee494a7bc94ecacaa9a | timblechmann/nt2 | /modules/core/trigonometric/cover/simd/fast_cos.cpp | C++ | cpp | 3,179 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
d2b39669e71db9ae130859cbef73e6a418d5c548 | 3ef766404ecfb1b1551709e25d5d2faded97ddad | ashr/notes | /data/multi.cpp | C++ | cpp | 1,278 | permissive | // address: 0x49F08C
//
// "SNetSendMessage0"
const char str_49F08C[17] = {};
// address: 0x49F0A0
//
// "SNetSendMessage"
const char str_49F0A0[16] = {};
// address: 0x49F0B0
//
// "Player '%s' killed Diablo and left the game!"
const char str_49F0B0[45] = {};
// address: 0x49F0E0
//
// "Player '%s' dropped due to t... |
5f7449b55d2154dac5ed75bafa4ac1bd513a9a45 | 9d5385f837365e1d9983c1b8daba671e66652ac7 | RealZiangLiu/usc_csci420_sp20 | /hw2-starterCode/.history/hw2_core_code/hw2_20200321171036.cpp | C++ | cpp | 36,466 | no_license | /*
CSCI 420 Computer Graphics, USC
Assignment 2: Roller Coaster
C++ starter code
Student username: ziangliu
ID: 9114346039
*/
#include "basicPipelineProgram.h"
#include "openGLMatrix.h"
#include "imageIO.h"
#include "openGLHeader.h"
#include "glutHeader.h"
#include <stdio.h>
#include <stdlib.h>
#include <... |
ccf19e2b5aeebca2eb05615b4ca3b15c02d604fc | 9e7fd1969eecce1afb8208c1c81893bfff3f5fe7 | nospamic/liteshop | /add2.cpp | C++ | cpp | 9,446 | no_license | #include "add2.h"
Add2::Add2(QWidget *parent)
: QDialog(parent)
{
QFont font("Lucida Console",12);
QFont small("Lucida Console",9);
QFont big("Lucida Console",14);
QRegExp money("[0-9]{1,4}[.,]{0,1}[0-9]{0,2}");
QRegExp intager("[0-9]{0,14}");
this->setFont(font);
this-... |
9a0c4859c258b0f4aa326c1416cfcda59ec7c549 | 147617f5240e183a70698016e3dc18196baff4e4 | YMY1666527646/Descension_MACE_UE4 | /SDK/SDK/WBP_StatsPanel_functions.cpp | C++ | cpp | 3,322 | no_license | // Name: mace, Version: 1.9.1.12285
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//-----------------------------------------------... |
5bd0a7069737586e97b684f2359b4e6ece3dd020 | 6de54094d389cd7a71b191d7955ec3604aae6d67 | sandsmark/loom | /Psyclone/src/Module/cModulePsyclone.cpp | C++ | cpp | 4,624 | no_license | #include <Psyclone/Module/cModulePsyclone.h>
#include <Core/Debug/Logger/cLogger.h>
#include <Core/Event/cDispatcherHub.h>
// #include "../Core/payload_utils.h"
using Loom::Core::cLogger;
using Loom::Core::cDispatcherHub;
using namespace Loom::Psyclone;
/****************************************************... |
dbd24b3b72c1690dd9ba3810e01b3cb200564304 | 03a7e7067df9258378664b7f94cda5a6b99329ea | ProfDru/C--Random-Particle-Generator | /src/rendering/draw.cpp | C++ | cpp | 1,571 | no_license | #include <rendering/draw.h>
#include <GL\glew.h>
namespace rpg::rendering {
void FillBuffer(const float* vertices,
int num_elements,
int vbo_id,
int attribute_id) {
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
glBufferData(GL_ARRAY_BUFFER, sizeof(float) * num_elements, ve... |
a68ffb2e970874a125ec7469a6a4e7327e8fa3b4 | 4607edd52b929bb753e96e40a6b010a31abcc4af | Houssk/Synthese-d-images-avec-OpenGL | /Lights/Without/C++/main.cpp | C++ | cpp | 5,957 | no_license | #include <GL/glew.h>
#include <GL/gl.h>
#include <GLFW/glfw3.h>
#include <SDL_image.h>
#include <iostream>
#include <stdlib.h>
#include <utils.h>
#include "Scene.h"
/**
* Scène à dessiner
* NB: son constructeur doit être appelé après avoir initialisé OpenGL
**/
Scene* scene = nullptr;
/**
* Callback pour GLFW... |
a9e30745987909f224eeda7ac37dc87800bdfb25 | fe1708559ae9368d96663d2e4c18ac93d546470d | kashin/Engine2DTest | /src/actiongraphicitem.cpp | C++ | cpp | 1,232 | no_license | #include "actiongraphicitem.h"
#include "irrlicht/irrlicht.h"
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
ActionGraphicItem::ActionGraphicItem(IVideoDriver* driver)
: GraphicBlock(driver),
mHighlighted(false)
{
}
ActionGraphicItem::~ActionG... |
2ac49a25bf33def4d981d87428dee07dd0eff6d1 | c192c8afe09e7477598723ff4472dfff31842cb9 | TU-Clausthal-Rendering/Mufflon | /src/core/scene/clustering/uniform_clustering.hpp | C++ | hpp | 688 | permissive | #pragma once
#include "util/int_types.hpp"
#include "core/scene/geometry/polygon_mesh.hpp"
#include <ei/3dtypes.hpp>
#include <ei/vector.hpp>
namespace mufflon::scene::clustering {
class UniformVertexClusterer {
public:
UniformVertexClusterer(ei::UVec3 gridRes) :
m_gridRes{ gridRes },
m_collapsedTo{} {}
void ... |
2530a1b3ddeaf28f926045b9c4ef8790639e7353 | e8c7ee831c0bb010178f0040f376247b2f2bc60e | piash76/cf-light-oj-spoj-uva-atcoder-3 | /HORRIBLE - Horrible Queries.cpp | C++ | cpp | 5,005 | no_license | ///Bismillahir Rahmanir Rahim
///ALLAHU AKBAR
#include<bits/stdc++.h>
#define flash() ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define sc1(a) scanf("%lld",&a)
#define sc2(a,b) scanf("%lld %lld",&a,&b)
#define sc3(a,b,c) scanf("%lld %lld %lld",&a, &b, &c)
#define p1(a) printf("%lld... |
af047fce700fb42e3dcf7c3ceb61621a962ef8a6 | 27d170fff45a018320f6a3838a080c9b63014831 | ExecDevOps/V3DLib | /Tests/testAutoTest.cpp | C++ | cpp | 4,024 | permissive | /******************************************************************************
*
* # AutoTest: specification-based testing of the compiler
*
`* Generates random V3DLib programs, runs them on the both
* source language interpreter and the target language emulator, and
* checks for equivalence. Currently, it only ... |
cf2b6ef06cc281c2718a32682bb8e6059ffc8304 | 7ce6121aff10c22c67b13055f97f438c91fc76ee | bitoku/raytracing | /draw_shadow.cpp | C++ | cpp | 1,170 | no_license | //
// Created by 徳備彩人 on 2020/03/07.
//
#include "image.h"
#include "camera.h"
#include "aggregate.h"
const double EPSILON = 0.001;
int main() {
Image img(512, 512);
PinholeCamera cam(Vec3(0), Vec3(0, 0, -1), 1);
Aggregate aggregate;
aggregate.add(std::make_shared<Sphere>(Vec3(0, 0, -3), 1));
a... |
ed7bcd02f5951e79efa2d171aa066b48a0b44788 | d08dea0513f1cb9c1ee595bd286d4ac248677521 | panchanam/tnvme | /GrpAdminSetGetFeatCombo/fidErrRecovery_r10b.cpp | C++ | cpp | 6,005 | permissive | /*
* Copyright (c) 2011, Intel 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 ... |
baf7ca811000c531c561533e11a924e12a8e2642 | 67fd97282be2d5f873bd3c4c13ebd8be350703d2 | relhwigi/zork | /zork/room.cpp | C++ | cpp | 2,238 | no_license | #include "room.h"
class Game;
Room::Room(string name) :
name(name)
{
exits["north"] = nullptr;
exits["east"] = nullptr;
exits["south"] = nullptr;
exits["west"] = nullptr;
room_item = nullptr;
hasEnemy = false;
}
Room::~Room(){
delete game;
delete room_item;
}
... |
1e518f04829bb775641943f6f66cf5e61a5a22a7 | 75114256969d957e8959453f8b5cdece4d974c0c | michaeloed/DecoderPro_app | /tests/misc/lightcontroltest.cpp | C++ | cpp | 39,701 | no_license | #include "lightcontroltest.h"
#include "assert1.h"
#include "abstractlight.h"
#include "junitappender.h"
#include "lightmanager.h"
#include "gregoriancalendar.h"
#include "defaultlightcontrol.h"
LightControlTest::LightControlTest(QObject *parent) : QObject(parent)
{
}
/**
* Tests for the DefaultLightControl* class
... |
78ffe3fa606d481ff618cb9c5947620ad8cc0d64 | a2f49b688b909030c8eb73dfbf7157aec89ea350 | hoangvanthien/codeForest | /SPOJ/CUT.cpp | C++ | cpp | 2,245 | no_license | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,x,y) for(int i = (x); i<=(y); ++i)
#define DFOR(i,x,y) for(int i = (x); i>=(y); --i)
#define forit(it, SS) for(__typeof(SS.begin()) it = SS.begin(); it!=SS.end(); ++it)
#define db(x) cout<<#x<<" = "<<x<<endl;
#define maxN 100002
#define pb push_back
#define m... |
44122befc707bfc5debb34219fe1c57a1d21d898 | 13dc63a40ec068cc576acfcb6f5e09c76f643c5d | KaisHasan/Spoj | /Spoj_MTOTALF_Total_Flow.cpp | C++ | cpp | 2,827 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int , int> pi;
typedef pair<double , int > dpi;
typedef pair<long long , long long> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pi> vpi;
typedef unsigned long long ull;
#define MP make_pair
#define mem(a , v) m... |
2f4db749910c4b9b05bee7aa03e3341228479a80 | 01fee8e67f1e1784f7cd46e38ed7078cfca76ecc | eaasna/low-memory-prefilter | /hashmap/lib/seqan3/test/snippet/utility/type_list/list_traits_find.cpp | C++ | cpp | 361 | permissive | #include <seqan3/utility/type_list/traits.hpp>
int main()
{
using list_t = seqan3::type_list<int, float, bool>;
// Double is not in list_t so find returns -1. However, bool is in the type list so find will return 2.
static_assert(seqan3::list_traits::find<double, list_t> == -1);
static_assert(seqan3::... |
90b2d51223a3e4601e70433e6ef857ce7f3484b8 | d0fe0c29096f6d442dbeaba9820a5f32c9cd3cf6 | dcortijo/DanielCortijo_RVR | /P1/Ejercicio 1/EJ1.cc | C++ | cc | 1,000 | no_license | #include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
#include <iostream>
int main(int argc, char** argv){
if(argc < 2)
{
std::cout << "Formato incorrecto: ./gai <dirección>\n";
return -1;
}
struct addrinfo hints;
struct addrinfo * res;
... |
fc9bbcc01450173dddd168a9f04a6d4f2518a74c | 5966fd629a83e6da51f83d943e65e8f779740c16 | Alex-McAvoy/Data-Structure | /4.Queue/4.2 Circular Queue.cpp | C++ | cpp | 2,325 | no_license | #include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define N 55 //申请空间个数
template <typename T>
class CirQueue {
public:
CirQueue(); //初始化队
int getLen(); //求队长
bool empty(); //判空
bool full(); //判满
bool pop(T &elem); //出队
bool push(... |
a4d7f1c399419ce6af40352c701c270d050438b1 | 54256ded4b38350df36e80a2d648b9b74b52f727 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14476/function14476_schedule_39/function14476_schedule_39.cpp | C++ | cpp | 727 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14476_schedule_39");
constant c0("c0", 128), c1("c1", 1024), c2("c2", 512);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"),... |
834686492fea4716fa71f7e5c81533ab14ffa480 | 9dc07cadb34747768d5c035288372279be5ade05 | zj13924/lib_ymf825board | /ymf825board/Operator.cpp | C++ | cpp | 5,158 | no_license | /* Library to use YMF825BOARD */
/* YMF825board用オペレータクラスの処理を記述 */
/* last update: 10th of September, 2017 */
/* made by mashigure */
#include "ymf825board.h"
/* コンストラクタ */
Operator::Operator()
{
SR = 0x00;
XOF = 0x00;
KSR = 0x00;
RR = 0x07;
... |
b36f9c64300514324956c5bb63990415413026e1 | ff5f53e766d9385f531f3cf416ba2eaf2d24cfe2 | akashcaptain/Cprogram | /multiply.cpp | C++ | cpp | 301 | no_license | #include<stdio.h>
int main() {
double a, b, product;
printf("Enter two numbers: ");
scanf("%lf %lf", &a, &b);
// Calculating product
product = a * b;
// %.2lf displays number up to 2 decimal point
printf("Product = %.2lf", product);
return 0;
}
|
878e1837b851143ab0a7a2d8d2caf126381fa49e | 18c0a7fb053dc223d5f854b87e09a87f5d011e04 | trevor91/algorithm | /swexpertacademy/1244.cpp | C++ | cpp | 2,267 | no_license | //https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV15Khn6AN0CFAYD&categoryId=AV15Khn6AN0CFAYD&categoryType=CODE&&&&&&
#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int rst[] = {0,0,0,0,0,0};
bool visited[] = {0,0,0,0,0,0};
void go(int arr[], int start_... |
1132ff763e44d27e37faa1a97c965d0d403d7d12 | 83ba27a613ba360e01a76e2e9b5c1e22ee913783 | thiagosantos1/Practice_CPlus | /Labs/Lab11/Circle.cpp | C++ | cpp | 579 | no_license | #include "Shape.h"
#include "Circle.h"
#include <SFML/Graphics.hpp>
#include <iostream>
Circle::Circle(int diameter)
{
radius = diameter/2;
}
void Circle::setX(int x_in)
{
x = x_in - radius;
}
void Circle::setY(int y_in)
{
y = y_in - radius;
}
void Circle::setGray (float value_in)
{
colorGrey = value_in;
}
v... |
041a583a0ac137766218fd8d6cf970ead1b80da3 | 30e3ecf7d5852a3ae0de24613ee006ec11f0a987 | cpages/gccg | /src/xml_parser.cpp | C++ | cpp | 16,619 | no_license | /*
Gccg - Generic collectible card game.
Copyright (C) 2001,2002,2003,2004 Tommi Ronkainen
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 2
of the License, or (at your... |
9057dd9a645200c0f4d801daa0eeda989a77c761 | 7737e243d8517729e98be118a27adf3d6efcbbf2 | soowoo95/GitExam | /ok.cpp | C++ | cpp | 371 | no_license | #include "iostream"
using namespace std;
int main(){
int a,b,c,temp,i=0,k=1;
cin>>a;
cin>>b;
cin>>c;
temp = a*b*c;
do{
k*=10;
i++;
}
while(k<temp);
cout<<i;
int arr[i]={0};
for(int j=0;j<i;j++){
arr[j]=temp%10;
temp=temp/10;
}
for(int j=0;j<10;j++){
int m=0;
for(int l=0;l<i;l++){
if(j==arr[l... |
c5fcca6e3e9f1791bf74893f873fc2b4047f9905 | 1af1c9d2e642d7b6519385ce2094eb81ecf7b6fb | terminal29/F3Z | /source/library/reactphysics3d/collision/shapes/ConcaveMeshShape.cpp | C++ | cpp | 14,243 | no_license | /********************************************************************************
* ReactPhysics3D physics library, http://www.reactphysics3d.com *
* Copyright (c) 2010-2022 Daniel Chappuis *
**************************************************************************... |
24ab9fc9d44d977e4f05dc59ad531123d319eb64 | f981ff8658fe95300fbee6e3ed63ee3ef66afcdc | icevl/srs | /trunk/src/app/srs_app_statistic.hpp | C++ | hpp | 6,902 | permissive | /*
The MIT License (MIT)
Copyright (c) 2013-2015 SRS(ossrs)
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, merg... |
519f2c42b73e6dae6395fee9866881e96373831a | 59c70877dcd259ff47f2dd7d6cff3fdcac8501fd | Tigrouzen/UnrealEngine-4 | /Engine/Source/Runtime/Engine/Private/InterpolationDraw.cpp | C++ | cpp | 63,166 | no_license | // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
InterpolationDraw.cpp: Code for supporting interpolation of properties in-game.
=============================================================================*/
#include "Engine... |
9a86af9883c6914fc8d9fd1258bc3f5c6dd06b33 | 5d2ca4f88c22c6c6d0ecdbf102da148899340fe6 | flaredirector/ASM | /src/ASM.cpp | C++ | cpp | 18,227 | no_license | /**
* Flare Director
* ASM
* ASM.cpp
*
* This implementation file contains the implementation
* details for the ASM class.
*/
#include "ASM.hpp"
#include "Events.hpp"
#include "../lib/gpio/errorCodeDisplay/ErrorCodeDisplay.hpp"
#include "../lib/gpio/led/LEDInterface.hpp"
#include <iostream> // For cou... |
240604d320946d862275740711f586a27baadbde | 9cd549cb420374707e8a24855081b5690a6631cd | xUser5000/competitive-programming | /C/C. Searching for Graph/main.cpp | C++ | cpp | 604 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t; cin >> t;
while (t--) {
int n, p; cin >> n >> p;
int c = 2*n + p;
vector< vector<int> > graph = vector< vector<int> > (n);
for (int i = 1; c > 0; i++) {
... |
c8f3c64c19ce75d445fab86fc189f7c81190bf39 | 6f863357d3106cfd5f9fdba210be07820739fd86 | fast-bitcoin/FastBitcoin | /src/crypto/sha512.cpp | C++ | cpp | 11,010 | permissive | // Copyright (c) 2014 The Fastbitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "crypto/sha512.h"
#include "crypto/common.h"
#include <string.h>
// Internal implementation code.
namespace
{
/// ... |
e4919ba0b962f274b0eb2355cd38eec2db91d2b2 | c9274bec73cd0d796157cfed3e3f50a2618782b3 | theilmbh/bht_ray | /main.cpp | C++ | cpp | 1,993 | no_license | #include "RayTracer.h"
#include "Primitive.h"
#include "Scene.h"
#include "globals.h"
#include "camera.h"
#include "Sphere.h"
#include <iostream>
#include <FreeImage.h>
#include "Checkerboard.h"
Camera cam(6000, 60, 1.0, glm::vec3(0, 3, 8), glm::vec3(0,1.0,0), glm::vec3(0,1,0));
Scene scene;
int main(int argc, char* ... |
5d5e8e9c5cb7de8d516f43752d2e899be850d755 | 093940459e345bf2bd284a57b4c69e9c546f1453 | Sid532001/c-c- | /bubble_sort.cpp | C++ | cpp | 1,297 | no_license | #include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#inc... |
0503c3cca40943f0dd50473146d50038f9752590 | 853134759b56f1c935b4839d84e7a6a8478f87ba | levelup/platform_frameworks_support | /v8/renderscript/jni/android_renderscript_RenderScript.cpp | C++ | cpp | 47,979 | no_license | /*
* Copyright (C) 2011-2012 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 b... |
ba62437eecbe60cdfa3fa7bf7ace8ab6907d1be9 | 67ffebf058cf4315f0e8c4d52a26835fbedf46ff | mmunoz-gmv/Fast-RTPS | /test/xtypes/TestSubscriber.cpp | C++ | cpp | 8,172 | permissive | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... |
3a4b3ae0fc2645b66c8549fff07cdc51d8a51dfb | 51686bddadaf325f7341c240ef9fc0e826e74985 | jared2501/foundationdb | /fdbclient/SystemData.cpp | C++ | cpp | 24,863 | permissive | /*
* SystemData.cpp
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtai... |
233cd8340615bd5dd3a4b7662b359526e699a2f2 | 5d07596470e7510a154177dc135bf450edc25bf7 | OscarClemente/raytracercpp | /include/Vec3.hpp | C++ | hpp | 3,798 | no_license | #ifndef VEC3_HPP
#define VEC3_HPP
#include <cmath>
#include <iostream>
#include "RTAux.hpp"
using std::sqrt;
class Vec3
{
public:
Vec3() : e{0, 0, 0}
{}
Vec3(double e0, double e1, double e2): e{e0, e1, e2}
{}
double x() const {return e[0];}
double y() const {retu... |
1cec656288fc7b342412277a5b9c60497f647d92 | 528bf434600c59b36a543456f6bebc6667f04f5a | guycole/perky-flasher | /cpp_src/switcher.cpp | C++ | cpp | 2,737 | no_license | //
// Title:switcher.cpp
//
// Description:
// Kill/restart flasher, invoked by mechanical switch
//
// g++ -Wall switcher.cpp -o switcher
//
// Development Environment:
// Angstrom v2012.12
// gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01)
//
// Author:
// G.S. Cole (guycole at gmail do... |
bcfe362c10f7305c6a586435180b75f2233fbbe5 | 93f00323715fb8175a8d7f1f619e669e1944a464 | IKholopov/QuantMate | /QuantMate/TestFactory.cpp | C++ | cpp | 604 | permissive | #include "TestFactory.h"
#include "TestScene.h"
#include "TestController.h"
#include "QuantMateResources.h"
CScene* CTestFactory::GetMainScene(CResourceManager& manager, int width, int height)
{
return new CTestScene(manager, width, height);
}
CGameController* CTestFactory::GetMainController()
{
return new CTestCon... |
98694f1609e10eb7e1038e0251012e497fb0cc5a | 7bdb5d3fdaa906473e7526ddd26d4ef78f2d1606 | lyl2000/Programming-Practice-2019 | /Week Test/Week 15 F - 东东:来不及解释了,快上车!!.cpp | C++ | cpp | 494 | no_license | #include <stdio.h>
int main(){
int n, d; scanf("%d%d", &n, &d);
int ans = 0, time = 1e6;
for(int i = 1; i <= n; ++i){
int a, b; scanf("%d%d", &a, &b);
if(a == d){
ans = i; time = d;
}
else if(a > d){
if(a < time){
ans = i; time = a;
}
}else{
int t = (d-a) % b;
if(t == 0){
... |
80a487a8f1784ef101394e97a28c0e676b9f0a6f | 29b700f382c086e8ba9a87e63d00bc843ab3d59a | andrewkpeterson/rigid-body-physics | /src/engine/physics/CylinderRigidBodyComponent.cpp | C++ | cpp | 2,188 | no_license | #include "CylinderRigidBodyComponent.h"
CylinderRigidBodyComponent::CylinderRigidBodyComponent(float diameter, float height, float mass, bool collides, bool movable, bool use_gravity, glm::vec3 color) :
RigidBodyComponent(mass, collides, calculateIBody(diameter, height, mass), movable, use_gravity, color, glm::vec3... |
157246c28ff28a65954ad111740928c9d03d6306 | cc8041169782a6f7498a26aeec5ab256d2b30960 | skkyal/DSA | /CSES problems/rectangle_cutting.cpp | C++ | cpp | 606 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve(){
ll a,b;
cin>>a>>b;
ll dp[a+1][b+1];
memset(dp,0,sizeof(dp));
for(int i=1;i<=a;i++){
for(int j=1;j<=b;j++){
if(i==j) dp[i][j]=0;
else{
ll ans=1e8;
for(int p=1;p<i;p++){
ans=min(ans,1+dp[i-p][j]+dp[p][j]);
}... |
c8eada150c96555db7ebac6e2c25d3f5ebb3e1c7 | ca4d53c9ed9d8e70c2aa9c1870f2c189ff613864 | commshare/testBuildGrpcXcode | /eeegcSdk/depends/grpc/src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc | C++ | cc | 1,377 | no_license | /*
*
* Copyright 2018 gRPC authors.
*
* 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 la... |
a025c7be11ff60602ecf6b96dd99bba96198281a | a1749f58f7f218a7ec1158d2a370ead61d4bd6d2 | Balthov60/tcd-cg-opengl-mid-term-assignment | /OpenGL MidTermAssignment/Shader/ShaderProgram.hpp | C++ | hpp | 10,899 | no_license | //
// ShaderProgram.hpp
// TriangleDemo
//
// Created by Balthazar Frolin on 08/10/2020.
//
#pragma once
#include "CGUtils.hpp"
#include "Shader.hpp"
#include "Texture.hpp"
#include "Projection.hpp"
#include "Transformation.hpp"
#include "Lights.hpp"
#define concat(first, second) first second
struct Material {
... |
c583ea1ad89cb20c9d2097bd5722ba44f2110155 | 57775f39788c7e7e849bb0333873217fa02b1a88 | sumeshthakr/Raytracer | /src/main.cpp | C++ | cpp | 320 | permissive | /*
* File: main.cpp
* Author: maru
*
* Created on October 10, 2016, 2:40 PM
*/
#include <iostream>
#include <string>
#include "World.h"
int main(int argc, char** argv) {
World world = World();
world.build_cornel_box();
world.render_scene();
world.save_image("output.bmp");
return 0;
}
|
2af67daa3f05069af4137237ed473cd94094463d | a243dc9cd37e5ef8bca702de2a4a036d82f71fff | sudekidesu/my-programes | /summer/4/11.cpp | C++ | cpp | 900 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int i,d=0,l;
char s[200000];
int a[200000]={0};
scanf("%s",s);
l=strlen(s);
for(i=0;i<l;i++)
a[i]=0;
if(s[0]=='?')
s[0]='1';
if((s[0]=='0'&&s[1]!='*'&&s[1]!='+'&&s[1]!='?... |
6930e1919957e50550fe229c43f6d81de32aac86 | 2b1c64b686cbbfedb9abd6c9b7bb552900ba420f | firstblade/MPC-BE | /src/filters/parser/AviSplitter/AviSplitter.cpp | C++ | cpp | 30,187 | no_license | /*
* (C) 2003-2006 Gabest
* (C) 2006-2014 see Authors.txt
*
* This file is part of MPC-BE.
*
* MPC-BE 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... |
3b72b25797bbccd047faf19328cd8b43f41ed457 | b043361298c4a1838f8b398405c3ec232d85b52a | Samsung/Castanets | /net/http/mock_gssapi_library_posix.cc | C++ | cc | 13,993 | permissive | // Copyright (c) 2010 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 "net/http/mock_gssapi_library_posix.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h... |
d43dd731dc6f34b0f3b7421a81425b63432ee892 | 856939eb9b2b81ba05eb5f1c192cfeb3801ded83 | Obinnunnu/tensorflow | /tensorflow/lite/delegates/gpu/metal/api.cc | C++ | cc | 11,236 | permissive | /* Copyright 2019 The TensorFlow 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 a... |
bb59c70c0db5d5ebbbc2182dcd773cd739e63063 | 3c222b00d75d8cdbf97877673865e45b8bc9de10 | ric2b/Vivaldi-browser | /chromium/components/media_router/browser/issue_manager.cc | C++ | cc | 4,177 | permissive | // Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/media_router/browser/issue_manager.h"
#include <algorithm>
#include "base/bind.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "c... |
4208356ed7e93c072cf3b1ad672ae4422699cb66 | 1d9ac91c67a3feeadfb16b1a5902753b0be91ac6 | MicrosoftDocs/visualstudio-docs | /docs/snippets/cpp/VS_Snippets_Winforms/Classic DataGrid.AllowSorting Example/CPP/source.cpp | C++ | cpp | 498 | permissive | #using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
#using <System.Data.dll>
using namespace System;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Windows::Forms;
public ref class Form1: public Form
{
protected:
DataGrid^ dataGrid1;
// <Sni... |
e7139af08f5d3444aa6d20283e17b04a2bd6699d | acb2971a678c4537e92475d8b802d2cd10df9ec4 | ckurtz22/ouster_example | /python/src/cpp/_viz.cpp | C++ | cpp | 3,174 | permissive | /**
* @file
* @brief pybind wrappers for the ouster simple viz library
*
* PoC for exposing the opengl visualizer in Python.
*/
#include <pybind11/pybind11.h>
#include <atomic>
#include <csignal>
#include <memory>
#include <vector>
#include "ouster/lidar_scan.h"
#include "ouster/lidar_scan_viz.h"
#include "ouste... |
564d30d0f0a3ebafc238feffa8dc37a0ed66573c | 7a91fd0f9fca781843b73bacc5f0ec50aa4c4bed | DerrickChanCS/coen175 | /phase3/lextest.cpp | C++ | cpp | 569 | no_license | # include <cctype>
# include <iostream>
# include "lexer.h"
using namespace std;
int main()
{
int token;
string label;
while ((token = yylex()) != 0) {
if (AUTO <= token && token <= WHILE)
label = "keyword";
else if (token == CHARACTER)
label = "character";
else if (token == STRING)
la... |
3b2d21158e9103913c79abc9021ac06e1d9d1149 | e1456077857598d36bfdc02a8c971db5a54e5c9a | barjinderpaul/Programming | /misc/new contest.cpp | C++ | cpp | 320 | no_license | #include<bits/stdc++.h>
int main(){
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
int64_t l1,r1,l2,r2;
int64_t q;
std::cin>>q;
while(q--){
std::cin>>l1>>r1>>l2>>r2;
if( ((l1+r1)/2) != ((l2+r2)/2) ){
std::cout<<(l1+r1)/2<<" "<<(l2+r2)/2<<"\n";
}else{
std::cout<<l1<<" "<<r2<<"\n";
}
}
}
|
70c3761c9dcfcddde0a9851c73a8ec77ba294b23 | 6f7977f72b55237414b5f9d2983a71b89b018c57 | hunter-packages/boost | /libs/histogram/examples/getting_started_listing_03.cpp | C++ | cpp | 1,460 | permissive | // Copyright 2018 Hans Dembinski
//
// 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)
//[ getting_started_listing_03
#include <boost/format.hpp>
#include <boost/histogram.hpp>
#include <cassert>
#include <iostrea... |
450cbd5b99a8d7b63e975b349d0a232cc8e83a86 | 4fec63fd98788f9aceef9d5a803f6b596a2043af | wangqian1992511/LeetCode | /245 Shortest Word Distance III/001.cpp | C++ | cpp | 1,308 | no_license | class Solution {
public:
int shortestWordDistance(vector<string>& words, string word1, string word2) {
idx1 = idx2 = -1;
pt = 0;
this->word1 = word1;
this->word2 = word2;
wordsIt = words.begin();
if (word1 == word2){
return shortestDistanceSame(words);
... |
aebec6043a0cf87cd17b2e133a24e1a136989e35 | 1d1f2a1e0141f05054677f6f567e938c4587b6cc | mkawserm/webkit | /Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.cpp | C++ | cpp | 16,140 | no_license | /*
* Copyright (C) 2012 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library i... |
74ec2b39fe4dcfb1e4512872cc678e0a0e95c912 | 17e3fcf8743a6f8d6f877169b9fdf2cd753ac201 | lineCode/nexus | /Nexus/Include/Nexus/MarketDataService/VirtualMarketDataClient.hpp | C++ | hpp | 14,585 | no_license | #ifndef NEXUS_MARKET_DATA_VIRTUAL_MARKET_DATA_CLIENT_HPP
#define NEXUS_MARKET_DATA_VIRTUAL_MARKET_DATA_CLIENT_HPP
#include <vector>
#include <Beam/Pointers/Dereference.hpp>
#include <Beam/Pointers/LocalPtr.hpp>
#include <Beam/Queues/Queues.hpp>
#include <boost/noncopyable.hpp>
#include <boost/range/adaptor/map.hpp>
#in... |
814d49715ac8940508433b8785f1252a49c3f816 | 0abc406ddde4f3546e49cd8ef747309b1e3a06b1 | stnava/ITK | /Modules/ThirdParty/VNL/src/vxl/core/vnl/tests/test_sparse_matrix.cxx | C++ | cxx | 8,442 | permissive | // This is core/vnl/tests/test_sparse_matrix.cxx
#include <iostream>
#include <vcl_compiler.h>
#include <vnl/vnl_sparse_matrix.h>
#include <vnl/vnl_matrix.h>
#include <testlib/testlib_test.h>
static
void test_sparse_int()
{
std::cout << "********************************\n"
<< " Testing vnl_sparse_matrix<i... |
8681b5d9f228e42ecc307d41c45844d2d57a1464 | 992a071c8258484a19c5248cd13dc916d50b5797 | Alipipe/TOP-chain | /tests/uint128/testcases/sub.cpp | C++ | cpp | 1,619 | no_license | #include <gtest/gtest.h>
#include "uint128_t.h"
TEST(Arithmetic, subtract){
top::xstake::uint128_t big (0xffffffffffffffffULL, 0xffffffffffffffffULL);
top::xstake::uint128_t small(1);
EXPECT_EQ(small - small, 0);
EXPECT_EQ(small - big, top::xstake::uint128_t(0, 2));
EXPECT_EQ(big -... |
32b15adaf5f752db874f8be715c6fe1a2eeaad58 | 704550095f9f911045738e58b64d3065b22995fb | fffffarmer/Online-Judge | /module/set.cpp | C++ | cpp | 3,035 | no_license | #include <iostream>
#include "set.h"
using namespace std;
template <class Type>
set<Type>::set(int volume)
{
currentSize = 0;
maxSize = volume;
elem = new Type[maxSize];
}
template <class Type>
set<Type>::set(const set<Type> &s)
{
currentSize = s.currentSize;
maxSize = s.maxSize;
... |
ccfa50113cb3d15669bd704c7f0b8864ab22e168 | de8e48ced6248383202472fd4828b18ecc7884ea | LuKuuu/UW-ECE150 | /assignments/a00Q02/src/a00Q02.cpp | C++ | cpp | 413 | no_license | //============================================================================
// Name : a00Q02.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
//#include ... |
ba5b64cdf8e2bb9fa067053033bddc6d8e39b4ab | 7c1201e37eab0ab2821e7c9ffb5ae5e3c1d8dc2e | ktjones/BVC2010 | /_Source/Examples/Ch04/Ex4_12.cpp | C++ | cpp | 922 | no_license | // Ex4_12.cpp
// Searching a string
#include <iostream>
#include <cstring>
using std::cout;
using std::endl;
using std::strlen;
using std::strstr;
int main()
{
char* str("Smith, where Jones had had \"had had\" had had \"had\"."
"\n\"Had had\" had had the examiners' approval.");
char* word... |
47287016aadc623e2fb6eaf1741111a912457b72 | 1f56341a2d6affcbfef2a0f0f976c8c58386b781 | ammar-nasser/paint_program_phase1 | /CMUgraphicsLib/CMUgraphics.cpp | C++ | cpp | 39,486 | no_license | /*
See "version.h" for version info and copyright information
This file was last modified on 05.16.1999
*/
#include <string>
#include <iostream>
#include <cstdio>
#include <cmath>
#include "CMUgraphics.h"
#include "error.h"
#include "windowinput.h"
#include "../resource.h"
// Keeps track of key and mouse input and... |
327f3640c57c6cb96d6bfef1377028d7fdcdfd20 | 4c9e87ec216dded9704377869a00a82f3fbbd1b9 | KHJcode/chromium | /chrome/browser/ui/webui/signin/inline_login_handler_chromeos.cc | C++ | cc | 17,130 | permissive | // Copyright 2018 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/ui/webui/signin/inline_login_handler_chromeos.h"
#include <memory>
#include <string>
#include "ash/components/account_manager/a... |
252a2804f9d6f2fdb27ff5cac6de8fb7c13c467d | 01565ca3ee606986be219c0ff6fd72d6c2df647f | leneyi/pcd | /SuperNature_Nike_FaceOff/Login/Login/oscpack/posix/UdpSocket.cpp | C++ | cpp | 15,619 | no_license | /*
oscpack -- Open Sound Control packet manipulation library
http://www.audiomulch.com/~rossb/oscpack
Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
(the "Softwar... |
434b01c9c456701cc8d0a454299b9cb3d08dab15 | f8532038b99122c42f7be9d5dd382394ab98e1ae | tzlaine/text | /perf/for_find_perf.cpp | C++ | cpp | 3,006 | permissive | // Copyright (C) 2020 T. Zachary Laine
//
// 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)
#include "string_objects.hpp"
#include <benchmark/benchmark.h>
#include <algorithm>
#include <iostream>
void BM_string... |
25452f1961e8f993a512b143b0d94ffcf0bee3a2 | b4e813666a01349a697a8c035fe8bbc2302498c1 | waymil/Project | /OutOrder.cpp | C++ | cpp | 977 | no_license | #include "OutOrder.h"
OutOrder::OutOrder(){};
OutOrder::OutOrder(const string n, const string b, const int d, const int m, const int y, const int dc, const int s, const string i) : Order(n,b,d,m,y,dc,s)
{
setInfo(i);
}
void OutOrder::setInfo(const string i)
{
this->info = i;
}
string OutOrder:... |
4793083e773d3b053403c3c1dd9c19468e246d8b | c2e56f05032cf2d6db4bf78779a29f84d0b118ce | ReidKovacs/mailbox-DSP | /old/mailbox.cpp | C++ | cpp | 6,760 | no_license | /* Arduino Bidirectional SPI Mailbox Library */
/* W. Esposito 6/2014 R01 */
/************************************************/
/* This library is for bidirectional */
/* communication between two arduinos, one */
/* configured as an SPI master and one as an */
/* SPI slave. In addtion to the normal three *... |
16d6ec93a8e1d73b4962598c053ea556a8c10a8e | 41861d44ed3d54ea2b573b1e803c388072d9bf36 | Flower35/ZookieWizard | /source/ElephantEngine/eFlyingObjectCtrl.cpp | C++ | cpp | 1,635 | no_license | #include <ElephantEngine/eFlyingObjectCtrl.h>
#include <ElephantBase/Archive.h>
namespace ZookieWizard
{
////////////////////////////////////////////////////////////////
// eFlyingObjectCtrl interface
// <kao2.004FE0B0> (constructor)
// <kao2.004FE120> (destructor)
////////////////////////////////... |
b0bc7e690b9482a46886335cf047e225daec16d7 | 8fbf1c546d2e04a5f27df73aec1fdb93becb3c81 | AuroraDysis/blaze | /blazemark/src/eigen/DMatDMatSub.cpp | C++ | cpp | 4,369 | permissive | //=================================================================================================
/*!
// \file src/eigen/DMatDMatSub.cpp
// \brief Source file for the Eigen dense matrix/dense matrix subtraction kernel
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This file is part of the Bl... |
1bafc5512621c2b4a98566893bf9095cdb069498 | 9f7af03840583f7076695794b4aa83537519cb0a | nitesh-147/Programming-Problem-Solution | /Uva/12157.cpp | C++ | cpp | 3,740 | no_license | #include <cstring>
#include <cassert>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... |
50080012bc21593e3c7903ac5ee0812a8ec3718e | b234ede563d15c38cb11fa0b77c40d95a0aa3dde | anyangmaxin/runtime | /src/coreclr/vm/loaderallocator.cpp | C++ | cpp | 68,723 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include "common.h"
#include "stringliteralmap.h"
#include "virtualcallstub.h"
#include "threadsuspend.h"
#include "castcache.h"
#include "mlinfo.h"
#ifndef DACCESS_COMPILE
#include... |
1a110fc5084d02d802a27497597475242ecd5c8a | 275901d6d86d74569a5f0a3f8651bc830018af35 | TrellixVulnTeam/Chromium_7C66 | /cc/trees/blocking_task_runner_unittest.cc | C++ | cc | 1,348 | permissive | // 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 "cc/trees/blocking_task_runner.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/single_th... |
5a069c151faec6c8a9dd5063b2d070ebbc7365d3 | 4934f15c9220db8ec4d0346588acb40bcbd34489 | kdavis-mozilla/core-alljoyn | /alljoyn_core/samples/secure/SampleCertificateUtility.cc | C++ | cc | 26,753 | no_license | /**
* @file
* @brief Sample implementation of a local Certificate Authority utility to generate
* and manage certificates.
*/
/******************************************************************************
*
*
* Copyright AllSeen Alliance. All rights reserved.
*
* Permission to use, copy, modify, and/or d... |
30378ed544297ea0c5ac79bb22f0096bffb87e6d | 39166669816a974bf9b006be49e9d61d11097518 | LuvJaiswal/dart-1 | /dart/collision/fcl/FCLTypes.hpp | C++ | hpp | 2,584 | permissive | /*
* Copyright (c) 2011-2021, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
f33c20f19b5fb36d0390c25f1b1b0a4550b0bde2 | 8bb4628f5d6bbf24d402eb6dbdec6d8b695e041f | Delostik/leetcode_solutions | /065_Hard_Valid_Number.cpp | C++ | cpp | 1,489 | no_license | #include <iostream>
#include <string>
using namespace std;
class Solution {
public:
bool isNumber(string s) {
trim(s);
if (s.empty()) {
return false;
}
auto exp = s.find("e");
if (exp != string::npos) {
string left = s.substr(0, exp), right = s.subst... |
6b064836a845916bdd54739c034175d8fa1e4045 | aebe5faf9d00dc8b476eb5e3fdff745e50f6c645 | jodavis42/ZilchShaders | /Libraries/Zilch/Project/Zilch/ArrayClass.hpp | C++ | hpp | 3,974 | permissive | /**************************************************************\
* Author: Trevor Sundberg
* Copyright 2016, DigiPen Institute of Technology
\**************************************************************/
#pragma once
#ifndef ZILCH_ARRAY_HPP
#define ZILCH_ARRAY_HPP
namespace Zilch
{
// Instantiates an array templa... |
529a892d5eb24fbc0e86ebcb3a3c7d5972018fbb | 5551f1b76f04e6eb0f9a8d1daa9a7d2910eaafee | ahadrauf/Drone-Swarm-Simulation | /DroneSwarmSimulation/Source.cpp | C++ | cpp | 10,132 | permissive | #include <iostream>
#include <string>
#include <fstream>
#include <omp.h>
using namespace std;
#include "World.h"
#include "Drone.h"
#define FIB_FACTOR 1000
void updateCommands(World *world, int turn);
string progressBar(int curr, int max);
int main() {
//Define world and drones
World world(2000*FIB_FACTOR, 2000*... |
4c06b3e532773f5d4aa8cf028511dcf7f47f8df8 | 94962b388b37bdf4fd86f94fb107e1c9b3bc4a98 | Xav83/AdventOfCode | /2015/Day15/src/part_one.cpp | C++ | cpp | 3,510 | permissive | #include "string_manipulation.hpp"
#include <algorithm>
#include <array>
#include <cassert>
#include <fstream>
#include <iostream>
#include <sstream>
constexpr auto numberOfProperties = 4;
using PropertyValue = int;
using Ingredient = std::array<PropertyValue, numberOfProperties>;
Ingredient extractIngredientFrom(con... |
f5ec73b820fa4589480a8594e20e6fa8de249d85 | b5a53a1d62fccba530fbb2825d54b8c971cba8ca | Electronic-Gulden-Foundation/lib-ledger-core | /core/src/api/HttpRequest.hpp | C++ | hpp | 1,675 | permissive | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from http_client.djinni
#ifndef DJINNI_GENERATED_HTTPREQUEST_HPP
#define DJINNI_GENERATED_HTTPREQUEST_HPP
#include "../utils/optional.hpp"
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#ifndef L... |
2dfb49e422dc442bbaedb5aba77fa0b096ee4cb9 | 769f4cb34daa265842db30e3a8f8402a9e867823 | MeteorOS-project/android_gingerbread_inspiration | /frameworks/base/libs/ui/EventHub.cpp | C++ | cpp | 39,773 | permissive | //
// Copyright 2005 The Android Open Source Project
//
// Handle events, like key input and vsync.
//
// The goal is to provide an optimized solution for Linux, not an
// implementation that works well across all platforms. We expect
// events to arrive on file descriptors, so that we can use a select()
// select() c... |
172cc1244dc3bd91fbe7536cb41214579ee4b883 | f0a0f86a1287ee53d26379791b462c819369c596 | miguelprada/sarafun_bt | /sarafun_tree/src/parse_tree.cpp | C++ | cpp | 2,619 | no_license | #include <sarafun_tree/parse_tree.h>
namespace bt_parser {
Parser::Parser(std::string filepath) { file_.open(filepath); }
Parser::~Parser() { file_.close(); }
void Parser::verifyNode(json node) {
if (!node.count("name")) {
std::string id = node["id"];
std::string error_message("The BT JSON file nodes must ... |
8d570a197123b7771e34ab34eb787121f2ccb4c0 | 852358ca26b2624517a16a770d02196fd61969a6 | liu-xiu/monitor | /maincontent/controlwidget/tablecontrol/tablewidget.cpp | C++ | cpp | 1,582 | no_license | /*****************************************
* 作者: YYC
* 日期: 2020-04-26
* 功能:表格窗口
* ***************************************/
#include "tablewidget.h"
#include "ui_tablewidget.h"
#include "tablecontrol.h"
#include <QTextStream>
#include "ui_tablecontrol.h"
#include <QMessageBox>
#include <QDesktopWidget>
// 构造函数
Tab... |
1fb945da86e8ef770d542c70a384bb692dc0ec04 | c063b3d14d8c0bfc23a9dda78b3f5ee48c5c51d3 | xetqL/SPEC | /include/communication.hpp | C++ | hpp | 13,934 | permissive | //
// Created by xetql on 2/11/19.
//
#ifndef SPEC_COMM_HPP
#define SPEC_COMM_HPP
#include <mpi.h>
struct CommunicationDatatype {
MPI_Datatype element_datatype;
MPI_Datatype minimal_datatype;
CommunicationDatatype(const MPI_Datatype &el, const MPI_Datatype &min) : element_datatype(el), minimal_datatype(mi... |
86cc50acba859a854b6592d1950f4888a6953037 | e3fbae9bc5627cfa0e78b687d4411eba064a20be | erikerlandson/st_tree | /examples/x01_hello_world.cpp | C++ | cpp | 1,677 | permissive | /******
st_tree: An easy to use and highly configurable C++ template tree class,
using STL container style interfaces.
Copyright (c) 2010-2011 Erik Erlandson
Author: Erik Erlandson <erikerlandson@yahoo.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in complian... |
a25c133d60486084d95ad092fa20652f6d02c206 | 1fb25a31bb5e73ff244461ceacc5a8b5ba4980f0 | deeckowy/II-UWr | /KursCPP/lista3/z1.cpp | C++ | cpp | 1,125 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
const vector<pair<int,string>> rzym=
{
{1000,"M"},
{900,"CM"},
{500,"D"},
{400,"CD"},
{100,"C"},
{90,"XC"},
{50,"L"},
{40,"XL"},
{10,"X"},
{9,"IX"},
{5,"V"},
{4,"IV"},
{1,"I"}
};
string bi... |
322092daf652aee70e74f92a05d8e45dbeea95fd | 7b6b2e829ad00ba91a2ae10a9eda9162167a81cd | nzlz/moveit2 | /moveit_planners/chomp/chomp_motion_planner/src/chomp_optimizer.cpp | C++ | cpp | 41,037 | permissive | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following... |
06a07dfcf16ff69639034b12e1830a62e0846f08 | 88d831370dd0ca2a95ac8ae47c5cfbaf6846f873 | Oakga/Image-Recognition | /text_line_detection/.history/main_20171208190628.cpp | C++ | cpp | 8,307 | no_license | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
class imagePP;
class BBox;
struct boxNode;
struct boxNode
{
int type; // 1 for img box, 2 for text-line box, 3 for text-word box, etc.
int minRow;
int minCol;
int maxRow;
int maxCol;
boxNode *nextBox;
boxNode()
... |
69cb89074aba2113d34f5d2fc95a6aa378e6fe6a | 6228476e5e99f37ff04678e7285005c62c5c9c0a | yxzsn/grpc | /test/core/end2end/tests/registered_call.cc | C++ | cc | 7,257 | permissive | /*
*
* Copyright 2015 gRPC authors.
*
* 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... |
77542944ecc89c76f893e70e193042fcf6bbf885 | d83d65b5744f3522c19daee24b01bf1e5a8f1051 | kgnandu/libnd4j | /include/ops/declarable/generic/parity_ops/sequence_mask.cpp | C++ | cpp | 2,836 | permissive | //
// Created to use with batched tensor by GS <sgazeos@gmail.com> 3/27/2018
//
#include <ops/declarable/CustomOperations.h>
namespace nd4j {
namespace ops {
CUSTOM_OP_IMPL(sequence_mask, 1, 1, false, 0, 0) {
NDArray<T>* input = INPUT_VARIABLE(0);
NDArray<T>* output = OUTPUT_VARI... |
e3ee612c436191da5cbce3cd80ac9563cc3f5a69 | 5a5c86ee5d0088da30c705e0a9c0e81433cf2984 | longzuo/SimpleKeyValueDb | /client/sdbclient.cpp | C++ | cpp | 762 | permissive | #include "SdbClient.hpp"
#include <iostream>
using namespace SDB;
int main() {
Net::InetAddress addr = Net::InetAddress::IPV4AddressAny();
addr.setPort(5481);
SdbClient client(addr);
std::string input;
std::string res;
while (1) {
std::cout << "sdb>>";
std::getline(std::cin, inpu... |
b3f8a0e1a11946c750770b1b3b460f685303789f | 6f9cd112c48f7d311a0ce656d6838d8351b8fe18 | AlecseyUsenco/BulletGame | /BulletGame/Car.cpp | C++ | cpp | 609 | no_license | #include "Car.h"
extern ISceneManager *smgr;
Car::Car(void)
{
}
Car::~Car(void)
{
}
void Car::Create(int models, vector3df scale)
{
std::map<int, core::string<char>>m;
m[1] = "../models/bmw/bmw.3DS";
m[3] = "../models/audi/r8.3DS";
m[8] = "../models/audi_2/rs4.3DS";
m[9] = "../models/aston_martin/db9.3DS";
co... |
58b6144fe9d250f72337708724c0c9ca540bc9d2 | 88432e616acfafc61df74e3c1e86bc9033b0b63f | SergeyStrukov/CCore-3-xx | /tools/CondLangLR1/Main/process/LR1Estimate.cpp | C++ | cpp | 754 | permissive | /* LR1Estimate.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CondLangLR1 1.00
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyright (c) 2015... |
5caafa7b4be228e55c038d45fbdbcd63168879f2 | a9303ef31fdbbe70591d2c325a5a745acb36b161 | e2bsq/SymphonyToolboxForScilab | /sym_data_query_functions.cpp | C++ | cpp | 14,556 | no_license | /*
* Implementation Symphony Tool Box for Scilab
* sym_data_query_functions.cpp
* contains Data Query Functions( 13 functions)
* Author: Sai Kiran
*/
#include <symphony.h>
#include <sci_iofunc.hpp>
extern sym_environment* global_sym_env;//defined in globals.cpp
extern "C" {
#include <api_scilab.h>
#include <Scie... |
08b55b9600985d89c638e6fbcd9977faef6dc96b | 9f567a8caabe8c9f2045cba4941cc2477d17ba2b | Dinoryong/algo-dinner | /SEASON_1/호석이두마리치킨/jy_호석이두마리1.cpp | C++ | cpp | 1,158 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
#define MAX 101
#define INF 987654321
//const int INF = (int)1e9;
int M, N; // 도시, 도로
int road[MAX][MAX];
int Dist[MAX][MAX];
int solve(int x,int y) {
int distance = 0;
for (int i = 1; i <= N; i++)
distance += min(... |
5a59e90b36a3e49c16044e17ea3f18dcfdfa824d | 326371e3e8948fa2eaa6686fa5653c7d78ba123c | colonycash/colonycash | /src/wallet/test/wallet_tests.cpp | C++ | cpp | 24,838 | permissive | // Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/wallet.h"
#include <set>
#include <stdint.h>
#include <utility>
#include <vector>
#include "rpc/server.h"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.