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 |
|---|---|---|---|---|---|---|---|---|
e30558c0746a15c27d443819c78cd3cb1ab4e7fb | fd4ca9bb0197c6270563428928a3b99f9e5a8c1f | Cjkkkk/minisql | /mc_driver.cpp | C++ | cpp | 7,857 | no_license | #include <cctype>
#include <fstream>
#include <cassert>
#include "mc_driver.hpp"
#include "API.h"
// #include "catalogManager.h"
// extern catalog c;
MC::MC_Driver::MC_Driver(){
indexInfo = new IndexInfo();
tableInfo = new TableInfo();
stmt = new STMT();
stmt->colunmList = new std::vector<std::string>()... |
823278188b61e69dff014a5bb67ceb0aa89f1358 | 680602987caa280711343040242dc3c0ce0f8f45 | MathDotSqrt/LevelOneAdventure | /src/source/Graphics/GLSLProgram.cpp | C++ | cpp | 3,424 | no_license | #include "Graphics/GLSLProgram.h"
#include <GL/glew.h>
#include <glm/gtc/type_ptr.hpp>
using namespace LOA::Graphics;
GLSLProgram::GLSLProgram(ProgramID program, VertexID vertex, FragmentID fragment)
: program(program), vertex(vertex), fragment(fragment) {
}
GLSLProgram::GLSLProgram(GLSLProgram&& other)
: progra... |
da63b327d76424ae7ea163b70d4ac473e1e7df4f | dc3d77b825ced5caf260e093ff91cc7a18e70209 | TkachenkoRoman/MatrSolver | /MtxSolver/MatrSolver.cpp | C++ | cpp | 4,326 | no_license | /*
* File: MatrSolver.cpp
* Author: roman
*
* Created on October 2, 2015, 5:43 PM
*/
#include "MatrSolver.h"
MatrSolver::MatrSolver()
{
}
MatrSolver::MatrSolver(int size)
{
InitVars(size);
InitRand();
InitMatr();
SetMtx(matr, b_matr, n);
PrintMtx(matr, n);
std::cout << "Матрица В: " ... |
9bcbe38ae4596dd15686c5e3193d11e4c7dfdfd7 | 2bf0746a4ad8409be119011f07a0153a252bf5c1 | NeerajKemisetti/Google-Code-Jam | /2020/Qualification round/Vestigium.cpp | C++ | cpp | 1,458 | no_license | #include <bits/stdc++.h>
using namespace std;
void trace(vector<vector<int>> vec, int size)
{
int sum=0;
int k=1;
int rowRepeatCounts=0;
int colRepeatCounts =0;
for(int i=0; i< size; i++)
{
bool rowHasDups = false;
bool colHasDups = false;
multiset<int> row... |
1bf1046eaeda0eb7440d4b6aeee2abb9a326da75 | 3ef0a05950659a87df9b4959f89ca45e6b49801f | davidmunoz-dev/Piscine_Cpp_EPITECH2 | /cpp_d10/ex00/Peon.hh | C++ | hh | 511 | no_license | //
// Peon.hh for in /home/munoz_d/piscine_cpp/cpp_d10
//
// Made by David Munoz
// Login <david.munoz@epitech.eu>
//
// Started on Fri Jan 13 11:20:24 2017 David Munoz
// Last update Fri Jan 13 14:44:08 2017 David Munoz
//
#ifndef PEON_H_
#define PEON_H_
#include "Victim.hh"
class Peon : public Victim
{
publ... |
7003f3263409bfc8ac538c30328f1558a90e7106 | 1c0404570e98501ce2bd310c181db78b766ee28c | InSimo/ISSofaGUI | /sofa/gui/qt/QDisplayDataWidget.cpp | C++ | cpp | 17,926 | no_license | /******************************************************************************
* SOFA, Simulation Open-Framework Architecture, version 1.0 RC 1 *
* (c) 2006-2021 INRIA, USTL, UJF, CNRS, MGH, InSimo *
* *
... |
cbaeec9b7da55eaee6cbc91c519f2a9369791d06 | d9d9e9ee5e91127631a4b95084e7ea3d556d7b4f | bingtaoli/c-labs | /deque/MyDeque.cpp | C++ | cpp | 5,036 | no_license | /*
双向队列(deque,全名double-ended queue)
设计实现双端队列。
你的实现需要支持以下操作:
MyCircularDeque(k):构造函数,双端队列的大小为k。
insertFront():将一个元素添加到双端队列头部。 如果操作成功返回 true。
insertLast():将一个元素添加到双端队列尾部。如果操作成功返回 true。
deleteFront():从双端队列头部删除一个元素。 如果操作成功返回 true。
deleteLast():从双端队列尾部删除一个元素。如果操作成功返回 true。
getFront():从双端队列头部获得一个元素。如果双端队列为空,返回 -1。
getRear(... |
ad9e723ffca74905c66c47d0094b6c1c415c91fb | 8f28a8fdc5ccfbf2e910dba63009d4cde9ae59dd | quang-ha/Albany | /src/Aeras/evaluators/Aeras_SurfaceHeight_Def.hpp | C++ | hpp | 4,131 | permissive | //*****************************************************************//
// Albany 2.0: Copyright 2012 Sandia Corporation //
// This Software is released under the BSD license detailed //
// in the file "license.txt" in the top-level Albany directory //
//**************************************... |
510da8b6071baebd29ace1323357cd09d269b153 | b1dfd94492b9c8cb0f641a625fc410e671ea111e | Futaba-Kosuke/algorithm | /atcoder/educational_dp/2/e_knapsack2.cc | C++ | cc | 888 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
const int MAX_N = 100;
const int MAX_W = 1e9;
const int MAX_V = 1e3;
int N, W;
int w[MAX_N];
int v[MAX_N];
ll sum_v = 0;
ll dp[MAX_N + 1][MAX_N * MAX_V + 1];
ll solve (void) {
fill(dp[0], dp[0] + MAX_N * MAX_V + 1, INF... |
555cf1aceed2cfe13ec7cbd2ac3938f6bcb2bb57 | ddbb377fcf65b1b9ab71db35f32477a6fd3d367b | Sahana-Urs/10daysofcode | /day9.cpp | C++ | cpp | 1,084 | no_license | #include <vector>
#include <iostream>
#include <cmath>
#include <limits.h>
using namespace std;
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define FOR(i, a, b) for(int i = (a); i <= (b); i++)
#define LL long long
#define modulo 1000000007
LL power(LL base, LL exponent, int mod = modulo)
{
... |
7060ec3ab038937820248e7abfee9c0e5cdadaf3 | 8e917c131128845a8335e6035edfdb13610e4b1e | sdhanush13/carlaviz | /backend/third_party/xviz/include/xviz/third_party/asio/ip/address_v6.hpp | C++ | hpp | 9,604 | permissive | //
// ip/address_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef ASIO_IP_ADDRESS_V6_HPP
#d... |
c0538c83ebe3340792eb97ed781db5f87628d403 | ec86e0171d55e8ee902d9ec51435e5672cef12f7 | blackdrako/Study | /2020/4/OOP/rgz/armor.cpp | C++ | cpp | 2,269 | no_license | #include "armor.h"
dArr<std::string> Armor::names;
void Armor::initNames()
{
Armor::names.push("Devilish Defender");
Armor::names.push("Angelish Defender");
Armor::names.push("Iron Sheets");
}
Armor::Armor():Item()
{
this->type = -1;
this->defence = 0;
}
Armor::Armor(int level, int rarity)
:... |
a41600937a921b5f54b03e0eac1f332b77a299d5 | d419114c77e989319d2e7a5cbd6976c68061a40c | ancaudristoiu/VTK | /Accelerators/Vtkm/vtkmExtractVOI.cxx | C++ | cxx | 4,303 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkExtractVOI.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is... |
918558254af849b98b5379ea2efc4c80c286d62f | 6537c013465ce0539fc64ce84a4451bcd31f4fda | gurvinder123/LeetCode-Programs | /TopKFrequentElements.cpp | C++ | cpp | 1,099 | no_license | class Solution {
public:
struct temp{
int num;
int freq;
};
struct comp{
bool operator()(temp& a, temp& b){
if(a.freq < b.freq){
return true;
}
return false;
}
};
vector<int> topKFrequent(vector<int>& n... |
4b47b696384fc9150d8d1a9be57551fdcaa44bbb | 9c44189b58b0e3dc581e2ede59004c40ec6155b4 | mwiegant/CS480_wiegant | /PA4/src/object.cpp | C++ | cpp | 3,036 | no_license | #include "object.h"
Object::Object()
{
}
Object::~Object()
{
Vertices.clear();
Indices.clear();
}
bool Object::Initialize(char* modelPath)
{
return loadModel(modelPath);
}
void Object::Update(unsigned int dt)
{
model = glm::mat4(1.0f);
}
glm::mat4 Object::GetModel()
{
return model;
}
void Object::Ren... |
5b96333bd31176d6621e0c76bccdc21c7edb6e2c | 563a274027a103e0da429963d284d2898a9fe17f | ishantsharma29/Competitive-Programming | /topic-based/comparatorusing_bool.cpp | C++ | cpp | 461 | no_license | #include<bits/stdc++.h>
using namespace std;
int t,n,i,j,k,l;
struct node
{
int x,y;
};
typedef struct node ll;
ll arr[100];
bool comp( node a, node b)
{
return a.x<b.x;
/*a.x<b.x increasing
a.x>b.x decreasing
a.y<b.y increasing
a.y>b.y decreasing
*/
}
int main()
{
cin >> n;
for(i=0;i<n;i++)
{
... |
8569d6c0741f28bb2aa65f2da5896ad0ffd84c60 | 5958274516da6b6fb4b985cf3f2894853ea05be0 | 15831944/TRiAS | /TRiAS/TRiAS/GeometrieVerarbeitung/Maschenbildung/OBJKANTE.CPP | C++ | cpp | 13,556 | no_license | /*
Datei: OBJKANTE.CPP
Das Modul stellt elementare Datenstrukturen und Methoden zur Realisierung
der Linienverfolgung bereit.
Erarbeitet: J.Benkenstein Stand vom: 15. Oktober 1996
*/
#include "pheader.h" // vorübersetzte Header
#include "resource.h" // Ressource-Konstanten
// GUID-Header
#include ... |
66b5f6a642e5d9eb78ee4f3d80f195a461af2b5d | bcb1bbf8705cc186de9b1d8b05f337b5f81ec930 | zrkcode/cesium-unreal | /Source/CesiumEditor/Private/CesiumCommands.cpp | C++ | cpp | 1,475 | permissive | // Copyright 2020-2021 CesiumGS, Inc. and Contributors
#include "CesiumCommands.h"
#include "CesiumEditor.h"
#define LOCTEXT_NAMESPACE "CesiumCommands"
FCesiumCommands::FCesiumCommands()
: TCommands<FCesiumCommands>(
"Cesium.Common",
LOCTEXT("Common", "Common"),
NAME_None,
... |
ce4b6d7ac27264541724a531ec54705c0eb354d2 | 846fedec5f28b6b4ff9df8ad938fbfaeb2fdf7ae | arun11299/Cpp-Metaprogramming-WS | /has_f_so.cc | C++ | cc | 1,190 | no_license | #include <type_traits>
#include <iostream>
//
// Meta if/then/else specialization
//
struct substitution_failure { };
template<typename T>
struct substitution_succeeded : std::true_type { };
template<>
struct substitution_succeeded<substitution_failure> : std::false_type { };
//int f(int i);
//
// sfinae to derive... |
0ba302cac8e65c794941807856f44dd8a0b2e407 | 5a4efc004256fb394c6d62c632063a54b8ae7a30 | iridium-browser/iridium-browser | /third_party/pdfium/fxjs/xfa/cjx_subform.cpp | C++ | cpp | 4,550 | permissive | // Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fxjs/xfa/cjx_subform.h"
#include <vector>
#include "fxjs/cfx_v8.h"
#include "fxjs/fx... |
4787f578d594860ff572d9dee5ab912b9b211d95 | bbd93e315a841f40765522ac383ee25bcc43a2b8 | jomiq/godot_voxel | /storage/voxel_data_map.cpp | C++ | cpp | 14,562 | permissive | #include "voxel_data_map.h"
#include "../constants/cube_tables.h"
#include "../generators/voxel_generator.h"
#include "../util/macros.h"
#include "../util/memory.h"
#include "../util/string_funcs.h"
#include <limits>
namespace zylann::voxel {
VoxelDataMap::VoxelDataMap() {
// TODO Make it configurable in editor (wi... |
0f885d128dddd9eb0ab9617de07ec61da6198993 | 65cde1b16a48e5316bfb63c9851b9654f9efbcb4 | compix/VoxelConeTracingGI | /source/engine/rendering/util/SATGenerator.cpp | C++ | cpp | 3,960 | permissive | #include "SATGenerator.h"
#include <engine/rendering/util/GLUtil.h>
#include <engine/geometry/Rect.h>
#include <engine/resource/ResourceManager.h>
#include <engine/rendering/renderer/MeshRenderers.h>
SATGenerator::SATGenerator(int texWidth, int texHeight)
: m_width(texWidth), m_height(texHeight)
{
m_fullscreen... |
1dc5ecc5d21bdcdb1c2c3ef61982b0058ff0d761 | 0fbc43da8b35bc50d1e4b731109681f6d45345bb | burningDown/my_leetcode | /程序员面试金典/normal-面试题_10.09-排序矩阵查找/面试题_10.09-排序矩阵查找.cpp | C++ | cpp | 542 | no_license | class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
if(matrix.size() == 0 || matrix[0].size() == 0)
return false;
const int h = matrix.size();
const int w = matrix[0].size();
int p1 = h - 1, p2 = 0;
while(p1 >= 0 && p2 < w)
... |
e4005f4c2935077ed1ba9e8eab9d28106f9c3e59 | 8d15105b3b07006133147ea2c644c9dc64e66c41 | realityforge-experiments/Quake3AI | /code/q3radiant/cameratargetdlg.cpp | C++ | cpp | 2,087 | no_license | /*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
publish... |
326290ef4c0ffd350a242fac7ed8d15642ecb701 | ccd5edc1dba8cc2e72c02b56f8d5e18c7dbba3f2 | RenshengWang/HiraExp_NW_ScinFul_Sim | /include/Config.hh | C++ | hh | 1,457 | no_license | /*
Author: R.Z. Wang Date: Oct 23, 2014
Function: Read Configure file, whose format is fixed
( one key-index corresponses one value, the key-index is unique;)
( with "! " as the comment line beginning.)
How to use:
with map<string,string> as the storage data structure,the value that you
get is string, so you have ... |
bf6b0f54ced789cad81f48dd2025524d9c95bb80 | 2596b57c076306decdde3065d1856b978051f2ba | mdonaka/CompetitiveProgrammingCpp | /Library/DataStructure/SegmentTree.hpp | C++ | hpp | 3,240 | no_license | #pragma once
#include <vector>
#include <deque>
#include <utility>
template<class T>
class isMonoid {
template <class U>
static auto check(U x) -> decltype(x.binaryOperation(x), std::true_type{});
static std::false_type check(...);
public:
static bool const value = decltype(check(std::decl... |
3bf320e8cd54405c5593c2f62c8e0283170cac57 | d9f8718881d0eae62b1b8afc9d20e28232a1b290 | cms-nanoAOD/cmssw | /Validation/SiOuterTrackerV/plugins/OuterTrackerMCHarvester.cc | C++ | cc | 37,379 | permissive | #include "OuterTrackerMCHarvester.h"
OuterTrackerMCHarvester::OuterTrackerMCHarvester(const edm::ParameterSet &iConfig) {}
OuterTrackerMCHarvester::~OuterTrackerMCHarvester() {}
// ------------ method called once each job just after ending the event loop
// ------------
void OuterTrackerMCHarvester::dqmEndJob(DQMSto... |
d7834ca08b42b128182c559f01e8773996b193b1 | 175d053f93f933513170a068c2af3437dfffa032 | MaYunlong123/mapbox-gl-native | /test/api/custom_layer.test.cpp | C++ | cpp | 4,399 | permissive | #include <mbgl/test/util.hpp>
#include <mbgl/platform/gl_functions.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/map_options.hpp>
#include <mbgl/gl/defines.hpp>
#include <mbgl/gfx/headless_frontend.hpp>
#include <mbgl/storage/resource_options.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/layers/custo... |
3e95ccd65fd8be0cfbc3bf66242f6235bb46c074 | 2811f6cb86eeee1c256e998340c20c7f4fc46a71 | pwkalana9/OvenWebRTCTester | /srcs/tests/UdpTestServer/UdpServer.cpp | C++ | cpp | 2,184 | no_license |
#include "UdpServer.h"
//====================================================================================================
// UdpServer
//====================================================================================================
UdpServer::UdpServer(boost::asio::io_service& io_service, int port, std::vec... |
77af165c6a3f315ae4fa4dc228bbbd77afa20db3 | fcba5ab77a89dab2e342149a924f40e62cea299d | Arelaxe/practicasSCD | /Práctica_2/barberia.cpp | C++ | cpp | 3,101 | no_license | #include <iostream>
#include <iomanip>
#include <cassert>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <random>
#include "HoareMonitor.h"
using namespace std ;
using namespace HM ;
const int N_CLIENTES = 4;
template< int min, int max > int aleatorio()
{
static default_random_engine ge... |
84fbe4cb839ea323fe4c1d7cd4d2905409a196cb | 6900178e69725f1b2524e2b44114fe3c66a74ea3 | haditabatabaei/webproject | /backend/collecting/collectedFiles/C++/edited/ethereumsolidityblob9b61fb2e99a29ae97f6c29bc7309d70622b73886libevmasmExpressionClasses.cpp | C++ | cpp | 4,717 | permissive |
#include <libevmasm/ExpressionClasses.h>
#include <utility>
#include <tuple>
#include <functional>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/noncopyable.hpp>
#include <libevmasm/Assembly.h>
#include <libevmasm/CommonSubexpressionEliminator.h>
#include <libevmasm/SimplificationRules.h>
using namesp... |
6b67370999144c1fefe79e891e799c48f1aaf4af | 749ec9a9d946884bd934aadf83be53f854c6d374 | kashefy/elm | /modules/elm/layers/test/graphcompatibility_unittests.cpp | C++ | cpp | 11,042 | permissive | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2015, Youssef Kashef
// Copyright (c) 2015, ELM Library Project
// 3-clause BSD License
//
//M*/
#include "elm/layers/graphcompatibility.h"
#include "elm/core/featuredata.h"
#include "elm/core/signal.h"
#incl... |
87ed1e10f227914624d977ef01a70bb640fe99dd | 3113ad72a35cdb317737f5da92cef456f99c350a | Nipun4338/Solved-Programming-Problems | /CodeForces/1296/a/70374160_wrong_answer_1.cpp | C++ | cpp | 2,535 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long llu;
const ll inf = 1e9;
const ll mod = 1e9 + 7;
const double eps = 1e-8;
const ll MAX = 1e7 + 20;
#define fast ios_base:: sync_with_stdio( false ); cin.tie(0); cout.tie(0);
#define eb emplace_back
#define em ... |
16f28127533acb24b030acdde84102efd4a1492c | 37c5b35ed76b48f8d90e4b37877d1371ddbc6045 | Tubbz-alt/crysp | /crysp/type.cpp | C++ | cpp | 1,341 | no_license |
#include <cstdio>
#include <unordered_map>
#include "type.hpp"
CRYSP_NS_START
int Type::print(FILE *out) const {
return fputs(name(), out);
}
const char * Type::name() const noexcept {
static_assert(type::t_id == 0 &&
type::type_id == 1 &&
type::float_id == 2 ... |
184abba7304c6ed119a83de9912a2c72f4719d3e | d9a75beb5de08a197971340effc579ceffcc50bb | kennyist/RushHourDX11 | /RushHour - Solution/Soft351WorldRow.cpp | C++ | cpp | 3,606 | no_license | #include "Soft351WorldRow.h"
// -- Usefull links
// Vector:
// http://www.cplusplus.com/reference/vector/vector/
// Constructor and initial value setup
Soft351WorldRow::Soft351WorldRow()
{
active = true;
m_resources = 0;
}
// Deconstructor
Soft351WorldRow::~Soft351WorldRow()
{
}
// Create a new row
void Soft351Wo... |
f4ba77549d337bf06fb8655375ed932fd30cf1be | 1e4456360ad10eb8df18a3e800175c1ed2eb7086 | MaxLindahl/CPROG_Spel_Uppgift | /CPROGUppgift/CPROGUppgift/System.cpp | C++ | cpp | 832 | no_license | #include "System.h"
#include <stdexcept>
#ifdef __APPLE__
#include <SDL2/SDL.h>
#elif defined _WIN32 || defined _WIN64
#include <SDL.h>
#endif
using namespace std;
namespace gameEngine {
System::System()
{
SDL_Init(SDL_INIT_EVERYTHING);
win = SDL_CreateWindow("GameEngine", 100, 100, ... |
2e728a42cbeda55f649431a266ee4d237e1c29fa | e374d5b60c0c593a58def3aa09e8716f6375c9a6 | satishrdd/comp-coding | /codeforces/545-D/545-D-21398034.cpp | C++ | cpp | 785 | no_license | /*****************************************************************************************/
/* */
/* Satish Reddy Yerva */
/* */
/*****************************************************************************************/
#include <bits/stdc++.h>
/*... |
60edbf8d12b5309d16e60ad6c74a63eb2390a372 | 1a6fc48ceed482f463beb90c8559d0ca6629ece0 | liza-jahan/newCodeforce-solution-all | /CF.A. Magical Sticks.cpp | C++ | cpp | 263 | no_license | #include<iostream>
using namespace std;
int main()
{
int a,b,c,d,t;
cin>>a;
while(a--)
{ cin>>t;
if(t%2==0)
{
c = t/2;
}
else
{
c = (t/2)+1;
}
cout<<c<<"\n";
}
}
|
a9dd46e8960a675de6749afa435d184d7b8c5e0b | aff0169f43ce5bc0f24af90a71bf73313effcba4 | SREERAGI18/chromium | /chrome/browser/ui/webid/identity_dialog_controller.cc | C++ | cc | 4,719 | permissive | // Copyright 2020 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/webid/identity_dialog_controller.h"
#include <memory>
#include "base/strings/strcat.h"
#include "base/strings/string_piece.h... |
acee5d37ccc6dc9c7df38e54904b7d363bacdd83 | 292e909482c18a68dfc94c7f1583d2a8f194c671 | dsapandora/nao_collaborative_motion | /nao_custom/src/nao_sonar.cpp | C++ | cpp | 1,171 | no_license | /*
* nao_sonar.cpp
*
* Created on: Feb 2, 2014
* Author: Olivier BALLAND
*/
#include <ros/ros.h>
#include <alproxies/almemoryproxy.h>
#include <nao_custom/Sonar.h>
using namespace nao_custom;
int main(int argc, char** argv)
{
ros::init(argc, argv,"nao_sonar");
ros::NodeHandle nh;
// Robot parameters... |
f16cd57338c5597596b8d906edde9cf81c8f942f | be1b2897258f47f73af51538440e66530c41e3b7 | dendisuhubdy/onnxruntime | /onnxruntime/core/framework/utils.cc | C++ | cc | 14,624 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/framework/utils.h"
#include "core/graph/graph_viewer.h"
#include "core/framework/execution_frame.h"
#include "core/framework/execution_providers.h"
#include "core/framework/kernel_def_builder.h"
#include "c... |
e907737c1b6e93a29ffe3a2285a80d488cfef69c | 6a6d7e7646684c781fab2f47c8ee37174a19c4bc | Lakshmipade/Projects-on-C | /DIGICLOC.CPP | C++ | cpp | 549 | no_license | #include<stdio.h>
#include<conio.h>
void main()
{
int h=0,m=0,s=0;
printf("Please enter the format in HH:MM:SS:");
scanf("%d%d%d",&h,&m,&s);
start:
for(h;h<24;h++)
{
for(m;m<60;m++)
{
for(s;s<60;s++)
{
clrscr();
printf("\n\n\n\t\t\t\t%d %d %d\n",h,m,s);
printf("\n\n\n\t\tSunday 18 NOV... |
8405a4314cab71ccaefe3ede23f356717582bf99 | 0876ac0e233eb06c00241528575b072302c820f8 | aurantst/windows-XP-SP1 | /XPSP1/NT/windows/appcompat/shims/general/removeddeflagfromshellexecuteex.cpp | C++ | cpp | 2,642 | no_license | /*++
Copyright (c) 2001 Microsoft Corporation
Module Name:
RemoveDDEFlagFromShellExecuteEx.cpp
Abstract:
Some applications call ShellExecute which in turn calls ShellExecuteEx.
One of the flags in the SHELLEXECUTEINFO structure is 'SEE_MASK_FLAG_DDEWAIT'.
This flag gets set by ShellE... |
b3fbea9ea0c8ad9cb688c0c825e2176c9f976f56 | 018bcf3f0908d98ddb7bcf45e79fb81043a0f380 | luotuoqingshan/acm | /goodbye2017/a.cpp | C++ | cpp | 1,543 | no_license | #include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define N 300010
typedef long long ll;
int n;
int a[N],c[N];
vector<int> g,r,b;
int main()
{
scanf("%d",&n);
int pos=0,G=0;
for(int i=1;i<=n;++i)
{
char opt[3];
scanf("%d%s",&a[i],opt);
... |
bbe963f18793dd46e33da137e8d594640c9b45dd | 330c00a99c68dbcb069ef3357245be310933f7cb | emnaSE/Xdata-test-master | /src/net.cpp | C++ | cpp | 110,448 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2019 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#i... |
1e14467fe408a6bd383476682ba2f70c4157870a | 35e39ec3da4d3b00f64507ef04b9304528135078 | lukesterbu/Project3 | /Vampire.cpp | C++ | cpp | 1,039 | no_license | /**********************************************************************
** Author: Luke Burris
** Date: 8/6/2018
** Description: Vampire class definition for fantasy game
**********************************************************************/
#include "Vampire.hpp"
#include <iostream>
using std::cout;
us... |
ad5b6b6f573eb082c3bbd72d571a16d172383c82 | ac87e1d06e54852059f946577ec0fcb6ba689178 | alexandraback/datacollection | /solutions_6404600001200128_1/C++/phidnight/s.cpp | C++ | cpp | 578 | no_license | #include <cstdio>
int T,N;
int mvl[1008];
int main() {
scanf("%d",&T);
for(int tn=1;tn<=T;tn++) {
scanf("%d",&N);
for(int i=0;i<N;i++) scanf("%d",&mvl[i]);
long long sumx=0;
int min_ratio=0;
for(int i=1;i<N;i++) {
if(mvl[i]<mvl[i-1]) {
sumx+=mvl[i-1]-mvl[i];
if(min_ratio<mvl[i-1]-m... |
307b0f65cad2d5acbec9232b939777e05281c6f5 | 0860cef55ef35ae5dda63ca9374d4df4e1a2f756 | Sauri-Sufian/cpp-code | /oneVSone_Tictactoe.cpp | C++ | cpp | 5,314 | no_license | #include<bits/stdc++.h>
#include<windows.h>
using namespace std;
char p_1='X',p_2='#';
char tic[9]={'1','2','3','4','5','6','7','8','9'};
int in,inp;
void tic_map();
void timer(int sec);
void input();
void com_input ();
int check_result();
void result1();
void result2();
int main()
{
int mes=1,draw... |
88ee8ef365899901bc38cfd1f3748d0e3b984f3a | 0de5fd70afee456b5cf977e3f62153651d59766d | GraemeKnowles/School | /CSC 180/Hiya/Samurai.cpp | C++ | cpp | 1,354 | no_license | #include "Samurai.h"
#include "GameBoard.h"
#include "Player.h"
Samurai::~Samurai()
{
}
std::vector<Move> Samurai::getPossibleMoves() const
{
std::vector<Move> moves;
const Position p = getPosition();
const int xStart = p.getX(), yStart = p.getY();
const int forwardDir = getOwner()->getAttackDirection();
// Ri... |
2f1a923d172b84dfde8a56b8d082e1c2ff2140e7 | a1eceb67ed01f17fec337d7afdca73bfaf76acb1 | Halksel/Competition | /AOJ/DSL/2G.cpp | C++ | cpp | 2,915 | no_license | #include <bits/stdc++.h>
using namespace std ;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r),end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define ... |
85112c36b74f31492f979534b7c1939451cc1568 | e2ec789c9b4c0710e8fec32298f57ee16f064193 | 202saloni/Electronic-voting-machine | /evm.cpp | C++ | cpp | 5,115 | no_license | #include<stdio.h> // HEADER FILE FOR STANDARD I/0
#include<graphics.h> // HEADER FILE FOR GRAPHICS MODE
#include<dos.h> // HEADER FILE FOR ENABLING SOUND
#include<conio.h> // HEADER FILE FOR CONSOLE I/O
#include<stdlib.h> // HEADER FILE FOR LIBRARY FUNCTIONS
union REGS i,o;
int initmouse(); // FUNCTION TO INITIALIZE MO... |
36e5ac15ac4acf5152acd9dd61a775a6f646c6f4 | f028b8d993e250b1ec3d2dbf1f862cc886b12e67 | netpack/XFB | /src/addjingle.cpp | C++ | cpp | 2,225 | no_license | /*
* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be u... |
608941c890abc21e2fc4604470b2bd442530dbb9 | ab43840fd75c914d275f43c12048a3748adffc13 | 15831944/SIPCall | /RWIni.cpp | C++ | cpp | 10,203 | no_license | #include "StdAfx.h"
#include "RWIni.h"
CRWIni::CRWIni(void)
{
m_strIniPath = L"";
// 得到exe执行路径.
TCHAR tcExePath[MAX_PATH] = {0};
::GetModuleFileName(NULL, tcExePath, MAX_PATH);
// 设置ini路径到exe同一目录下
#ifndef CONFIG_FILE
#define CONFIG_FILE (TEXT("Config.ini"))
#endif
//_tcsrchr() ... |
08a722818dbe517c1e7a38be7595a7364903734e | 689ae1528efd9348d1ddb5dd6d67a14011b9d06a | namwkim/sirikata | /test/unit/libmesh/AnotherTest.hpp | C++ | hpp | 1,998 | permissive | /* Sirikata Tests -- Sirikata Test Suite
* MeshDataTest.hpp
*
* Copyright (c) 2008, Daniel Reiter Horn
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of sou... |
d118eb0f983fb64c384cbc9534699b6c60395c8a | 5b0b5ea754f1dd43fdecc26599597b118faa2ac9 | stanfortonski/3D-Engine-OpenGL-4 | /camera/BaseCamera.cpp | C++ | cpp | 1,148 | permissive | /* Copyright (c) 2020 by Stan Fortoński */
#include "BaseCamera.hpp"
namespace Engine
{
void BaseCamera::moveRight()
{
position += right * (speed * Engine::get().getDeltaTime());
}
void BaseCamera::moveLeft()
{
position -= right * (speed * Engine::get().getDeltaTime());
}
void BaseCamera::move... |
dc38d103b6a59da9ae36acac218e576bb1bd0c4e | 09d4fbdd40d98f2fd0dd9be40c262160c9d09fa7 | zanzo420/zSoT-SDK | /External/SDK/Title_AF_AthenasVoyager_functions.cpp | C++ | cpp | 552 | no_license | // Name: SoT, Version: 2.2.0.2
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//----------------------------------------------------... |
26e4f597f4055d618fe89339f6021cf327c16f62 | acb4d5c59ec7ead699c979149c32db46c3391a22 | luaman/modplug | /OpenMPT/mptrack/Moptions.cpp | C++ | cpp | 36,088 | permissive | /*
* Moptions.cpp
* ------------
* Purpose: Implementation of various setup dialogs.
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#include "stdafx.h"
#include <shlobj.h>
#include <afxpriv.h>
#include "mptrack.... |
c9c9e3780b566bf80b3409b4e0e64c2a8a8054ce | 92cd4a9d214f430fe1747920cde61aa9b81fd033 | rloger/cossacks-revamp-2017 | /src/Main executable/gText.cpp | C++ | cpp | 5,708 | no_license | #include <math.h>
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include "ResFile.h"
#include <assert.h>
#include "gFile.h"
class GFSYSTEM
{
public:
GFILE* FILES[256];
GFSYSTEM();
~GFSYSTEM();
GFILE* GetFile();
void FreeFile(GFILE* F);
};
GFSYSTEM::GFSYSTEM()
{
memset(FILES, 0, sizeof FILES);
}
G... |
2d6a3119afcaba60c69fc9e14379284d3636595f | f991982b48b31b3a766495f25440c60fdde2bf01 | ritvik03/Miscellaneous-Computer-Vision-Projects | /Summer Intern 2nd Year -2018/sperm/motionTrack3.cpp | C++ | cpp | 13,758 | no_license | #include "opencv2/imgcodecs/imgcodecs.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/videoio/videoio.hpp"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/video/video.hpp>
#include <opencv2/tracking/tracking.hpp>
#include <opencv2/core/ocl.hpp>
//C
#include <stdio.h>
//C++
#include <iostream>
#in... |
aa3f00f0f35f4a5b45c6929f8a298ef3cfce51f6 | e9b1e4776050e7220fb5659ee2f72647a7af7138 | guptaanurag2106/Cplusplus | /Codeforces_Solutions/25A.cpp | C++ | cpp | 398 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<int> l;
int n;
cin>>n;
for (int i=0;i<n;i++){
int a;
cin>>a;
l.push_back((a%2==0)?1:0);
}
if (n==1)
cout<<1;
else{
int t=(count(l.begin(),l.end(),1)>count(l.begin(),l.end(),0))?0:1;
for (int i=0;i<n;i++... |
c52fedfa3ca408a327eba75658c36e13f058aed9 | 4423db8a21ee553a8bbff69718d0e33b90ad0d99 | betty29/code-1 | /recipes/C++/580719_Convert_Html_Pdf_ASPNET_MVC_C_SelectPdf_Free/recipe-580719.cpp | C++ | cpp | 1,482 | permissive | [HttpPost]
public ActionResult Convert(FormCollection collection)
{
// read parameters from the webpage
string url = collection["TxtUrl"];
string pdf_page_size = collection["DdlPageSize"];
PdfPageSize pageSize = (PdfPageSize)Enum.Parse(typeof(PdfPageSize), pdf_page_size, true);
string pdf_orientat... |
37db51a4ebdeac87c764194934314fc1c0a6ae49 | 792ffb520e22b488bab6bf07b6519c79de2a6fe0 | alldatacenter/alldata | /olap/ByConity/src/AggregateFunctions/AggregateFunctionBitmapLogic.cpp | C++ | cpp | 4,673 | permissive | /*
* Copyright (2022) Bytedance Ltd. and/or its affiliates
* 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 appl... |
1c28c5921b526ff2ceeb26e38a991675907bb9ce | 86a61780398cdace2921036649244de7ca5ed97b | FahadAminShovon/Solved-Problems | /HackerRank/pangrams/7769929_AC_0ms_0kB.cpp | C++ | cpp | 663 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
string alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string sentence;
getline(cin,sentence);
int x=sentence.size();
for(int counter=0;counter<x;counter++)
{
sentence[counter]=toupper(sentence[counter]);
}
int breaker=0;
for(int counter=0;counter<26;... |
44f9bde649f757f012e25c2efc9f06f2d0586237 | 12923e69d37ef5e3bd4206992495b103c0f21aea | google/filament | /filament/src/FrameInfo.cpp | C++ | cpp | 3,274 | permissive | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
48e94b5ef668333724c245683e5ddb20c3745459 | 80b3a411078b4703588ff6ad62df14f7239cd6a5 | FaegerPilot/SATBIRD | /MPU6050.cpp | C++ | cpp | 6,704 | no_license | //------------------------------------------------------------
// SAT Bird Project
// Christoph Messerli
//------------------------------------------------------------
#include "MPU6050.h"
//-----------------------------------------------------
// Wichtige MPU6050 Register Adressen / Werte
//----------------... |
7f090921f3ca1ee40ef29cd574aa9fa5e1b6077a | c8411f270189f32b8afd9c43b00113ffc5bb9a14 | adilbaig/linux-process-explorer | /lpe/process.cpp | C++ | cpp | 11,514 | no_license | #include "process.hpp"
#include <sstream>
using namespace std;
vector<int> _signals_bitmask_to_vector(string bitmask_hex)
{
// Given a bitmask, get a vector of Signals
long long n;
istringstream(bitmask_hex) >> std::hex >> n;
vector<int> ret = {};
for (int signum = 1; signum <= _NSIG; signum++)
... |
ce20b2fe4c02c417c90e6f75c41bac56d16aaa4e | 640f5d0d30e1945ccb3471f7409e943a52653d92 | vianneyPL/qdb-benchmark | /bench/tests/qdb/hset/insert.hpp | C++ | hpp | 852 | permissive | #pragma once
#include <bench/tests/qdb/qdb_test_template.hpp>
namespace bench
{
namespace tests
{
namespace qdb
{
namespace hset
{
class insert : public qdb_test_template<insert>
{
public:
explicit insert(bench::test_config config) : qdb_test_template(config)
{
}
void run_iteration(std::uint32_t iter... |
f0e9ef02fa061c9426d347f26eb6ef6439cf37b5 | 479a1aa06373748b654b4be09ae8860d03b313e2 | LeoWelzel/Quadtree | /source/quadtree.cpp | C++ | cpp | 13,308 | permissive | #include "quadtree.hpp"
QuadNode::QuadNode(int firstChild, int numElements)
: firstChild(firstChild), numElements(numElements)
{
}
ElementNode::ElementNode(int next, int colliderIndex)
: next(next), colliderIndex(colliderIndex)
{
}
QuadNodeData::QuadNodeData()
: quadNodeIndex(0), depth(0), top(0), bottom... |
3c55266e72c0cffa5a9c14144d1342e056335d56 | 2f025538ca779acadaeb74a1ce45e6c565943b61 | zhaoyang10/ACM_HDU | /hdu_4637_Rain on your Fat brother.cpp | C++ | cpp | 7,997 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<cstdlib>
#include<vector>
using namespace std;
#define eps (1e-9)
#define N 1010
const double pi=acos(-1.0);
double degtorad(double deg){return deg/180.0*pi;}
double radtodeg(double rad){return rad*180.0/pi;}
double fab... |
a1082d51a3a8968965953fa0f67274284470e5c5 | 5cd4f5b8841b0c9369938a8c537d636d64953a46 | linzy/MicroChat | /mars/baseevent/src/active_logic.cc | C++ | cc | 3,536 | no_license | // Tencent is pleased to support the open source community by making Mars available.
// Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
// Licensed under the MIT License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the Licens... |
a154fb782ddb0633f5b50507c4c41f0cb2e709f5 | 10a796a39213256d1d620ece2567a2f125ef79f8 | belmonrj/Run7AuAu | /Xnalyze/backup/analyze_20100414-1402.cxx | C++ | cxx | 61,060 | no_license | // Author: Ron Belmont
// Date: 2009-07-28
// Revision - only tofw histos
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <sys/time.h>
#include "hadrontree.h"
#include "TROOT.h"
#include "TFile.h"
#include "TTree.h"
#include "TH1.h"
#include "TH2.h"
#in... |
00171603fc0bb79a4667392389f1e2621a4360a0 | 1e3f0909af0bacced5aab3d45435f214c7a96d88 | JulianBiancardi/Wolfenstein-Taller1 | /server/src/main/packet_handlers/shot_handler.cpp | C++ | cpp | 1,598 | permissive | #include "shot_handler.h"
#include "../../../../common/src/main/packets/packing.h"
#include "../../../../common/src/main/ids/gun_ids.h"
ShotHandler::ShotHandler() {}
ShotHandler::~ShotHandler() {}
void ShotHandler::handle(Packet& packet, ClientManager& client_manager,
MatchManager& match_ma... |
403655aa680d675b51d51d82d4e418b91eba29c1 | 1ac679e37225bc24940ac80035033b662a51aafd | iridium-browser/iridium-browser | /chrome/browser/web_applications/locks/app_lock.cc | C++ | cc | 957 | permissive | // Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/web_applications/locks/app_lock.h"
#include "chrome/browser/web_applications/locks/lock.h"
#include "components/services/storage/indexed_db/locks/part... |
da059cf0f4e2796cf10f98ecc6784171903494dd | 4503b6313205cbaf179faa3a7f967d956deb2f1a | LEChaney/Engine | /Engine/Texture.cpp | C++ | cpp | 888 | no_license | //
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2018 Media Design School
//
// Author : Lance Chaney
// Mail : lance.cha7337@mediadesign.school.nz
//
#include "Texture.h"
Texture Texture::Texture2D(GLsizei width, GLsizei height, GLint internalFormat, GL... |
ee5c87efa25e5f925a753d0d32015553e21978f6 | e20f28f310d3e206bb2f8a0388033bdd93565723 | ddssingsong/webrtc_android | /libwebrtc5776/src/main/java/sdk/android/src/jni/pc/media_source.cc | C++ | cc | 853 | permissive | /*
* Copyright 2017 The WebRTC 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 in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... |
95a96cce590b557cd49f1c6d787d6339b43cf5c4 | 6affd1b4f8e6d7c2138038468d2461016d8162fc | yagiken0525/homographyStepEstimation | /src/main.cpp | C++ | cpp | 231 | permissive | #include <iostream>
#include "FootPrint.h"
using namespace std;
using namespace cv;
int main() {
// input "PROJECT_NAME" and "VIDEO_NAME"
FootPrint footPrint("badminton", "badminton");
footPrint.run();
return 0;
} |
167674a83b5aa87ed507e6ec6e002582359bcd21 | bee397a6b1648ad013cd7f782a4b73ea4ec1b1db | sshhsun-code/AndroidMethodHook | /AndHook/app/src/main/jni/test.cpp | C++ | cpp | 1,349 | no_license | #include <jni.h>
#include <stdio.h>
#include <cassert>
#include "test.h"
#include <malloc.h>
#include <string.h>
static void repair(JNIEnv* env,jclass clazz,jobject thiz) {
LOGD("panda");
jclass cls=env->FindClass(JAVA_CLASS);
jmethodID m=env->GetMethodID(cls,"test2","()I");
env->CallIntMethod(thiz,m);
return;
}
... |
55d7430dba7caf78ccfb4bc90d9bf558604282ee | 85dc3d7d140b9bad01ffd0f512f4ff0d2692fee2 | cs4440/Project-3 | /src/tokenizer.cpp | C++ | cpp | 10,606 | no_license | #include "../include/tokenizer.h" // sql_tokenizer declarations
// STATIC VARIABLES
int Tokenizer::_table[state_machine::MAX_ROWS][state_machine::MAX_COLS];
bool Tokenizer::_need_init = true;
/*******************************************************************************
* DESCRIPTION:
* Default constructor init... |
ebbe4a3c839db2a4b983ab23f210035a8c3dfb78 | 471518fc5bfcc417d6839f9eb2bef31e6da58f41 | RubikRun/Database-Project | /Table/Table.hpp | C++ | hpp | 5,235 | no_license | #include "../String/String.hpp"
#include "../Vector/Vector.hpp"
#include "Enums.hpp"
#include <iostream>
typedef Vector<String> Row;
const String NOVALUE_INTERNAL = "";
const unsigned INVALID_COLUMN = 0xffffffff;
class Table
{
//The name of the table and the name of the file where it's stored
String name, f... |
02357da92fc7645f2d50def3eb2bc5b7ac4ba5b3 | 218e275e0894c43316f24ad9d09b8f2934580a4d | strigazi/athena | /LArCalorimeter/LArCnv/LArAthenaPool/src/LArCellContainerCnv.cxx | C++ | cxx | 3,065 | permissive | /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "LArCellContainerCnv.h"
// CaloDetDescr includes
#include "CaloDetDescr/CaloDetDescrManager.h"
// Gaudi
#include "GaudiKernel/MsgStream.h"
// Athena
#include "StoreGate/StoreGateSvc.h"
#include "AthenaKernel/StorableConversions... |
4c6b92a01ce9237ea3515e8fda0aac0ca55de8f5 | 0a7f5fd58e95253be77c79cf1c6a547dd3b2b1a3 | BoHauHuang/Leetcode | /easy/94. Binary Tree Inorder Traversal/Binary Tree Inorder Traversal.cpp | C++ | cpp | 776 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
4724b91069157aa3749c23c10de4d2b1e43718fc | aa9848b5e0cbcb40e4984c2298c4c33659a17acc | sky94520/old-code | /android/FlyPlane/jni/src/HelloWorldScene.cpp | C++ | cpp | 2,356 | no_license | #include "HelloWorldScene.h"
#include "OperateLayer.h"
Scene* HelloWorld::createScene()
{
// 'scene' is an autorelease object
auto scene = Scene::create();
// 'layer' is an autorelease object
auto layer = HelloWorld::create();
OperateLayer*layer2 = OperateLayer::create();
// add layer as a ch... |
3f8493e9b40c3c9f812562c28341686d12a595e7 | 0c99ebf7a92ab66dc612c30750e4e7e8ca5dd09b | eeeee/teeworlds | /src/engine/client/graphics_threaded.cpp | C++ | cpp | 24,522 | permissive | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#include <base/detect.h>
#include <base/math.h>
#include <base/tl/threading.h>
#include <base/system.h>
#include <engine/exter... |
10d41d7a34c75e2fc56e1444d24fa251f5db7ad2 | f884a2b0e81082f231d6905fab950ff7c29aeb45 | mpsitech/wzem-WhizniumSBE-Engine-Monitor | /wzemcmbd/CrdWzemOpx/PnlWzemOpxList_evals.cpp | C++ | cpp | 557 | permissive | /**
* \file PnlWzemOpxList_evals.cpp
* job handler for job PnlWzemOpxList (implementation of availability/activation evaluation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 1 Dec 2020
*/
// IP header --- ABOVE
using namespace std;
using na... |
45246b71cef8930c16873d88f19e3c932c2d73ec | 50c6d2c375022a86cd47ffe63c971ea11ae7be99 | wesz/gusanos | /lighter/gfx.cpp | C++ | cpp | 1,642 | no_license | #include "gfx.h"
#include <boost/bind.hpp>
#include <boost/assign/list_inserter.hpp>
using namespace boost::assign;
#include <allegro.h>
#include <loadpng.h>
#include <string>
#include <algorithm>
#include <iostream>
#include <list>
#include <stdexcept>
using namespace std;
Gfx gfx;
Gfx::Gfx()
{
}
Gfx::~Gfx()
{... |
30a46e8f3e4a2bebacd863700943b99e2938a939 | c54476a9fd123fb51d9ec48daf14f35758be8610 | alexandraback/datacollection | /solutions_5766201229705216_1/C++/wtthhh/p2large.cpp | C++ | cpp | 1,326 | no_license | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
#define FOR(i,l,r) for(int i=l; i<=r; i++)
#define COR(i,r,l) for(int i=r; i>=l; i--)
#define FORG(j,x) for(int j=h[x],v=b[j]; j; j=nt[j],v=b[j])
#define FILL(a,b) memset(a,b,sizeof(a))
#define INF 1000000000
#define N 120001
int n,m,... |
8d9be89350dbd22a0bc3ef83e5e0705ab6c73756 | c4f20464b5eb0285e18feef49214853f98941355 | chenf99/leetcode | /20.valid-parentheses.cpp | C++ | cpp | 1,583 | no_license | /*
* @lc app=leetcode id=20 lang=cpp
*
* [20] Valid Parentheses
*
* https://leetcode.com/problems/valid-parentheses/description/
*
* algorithms
* Easy (36.05%)
* Total Accepted: 632.4K
* Total Submissions: 1.7M
* Testcase Example: '"()"'
*
* Given a string containing just the characters '(', ')', '{', ... |
193c3fdd8c37200f90790c56b3e4d6e5d16106b2 | e0527d5258b23a4e26478a5d6184ef0b430e6198 | pedris11s/coj-solutions | /lmm-p1678-Accepted-s360454.cpp | C++ | cpp | 423 | no_license | //by pter
#include <cstdio>
const int NUMERAZO = 500;
int main()
{
int t;
scanf("%d", &t);
int a, b, c;
int min = NUMERAZO;
for(int i = 0; i < t; i++)
{
scanf("%d%d%d", &a, &b, &c);
if( (a + b) > c && (a + c) > b && (b + c) > a )
{
int p = a + b + c;
... |
5e41e08e6eb988501ada80d537f8d7d89e6414ec | a6e40464ad5c34b3823f9d90109b5bf88ad75a05 | VinInn/ctest | /floatPrec/acosh.cpp | C++ | cpp | 513 | no_license | #include<cmath>
#include <iostream>
#include<cstdio>
int main(int h) {
{
double x = 0x1.01825ca7da7e5p+0;
x *= h;
double y = acosh(x);
std::cout << x << ' ' << y << std::endl;
printf("%a %a\n",x,y);
}
// 0x1.0001ff6afc4bap+0
{
double x = 0x1.0001ff6afc4bap+0;
x *= double(h);
double y = acosh(x... |
cbfaeae8ceb569ffb46e6e896327d7ef82692471 | ccfacd5a3969d649d71d24bc39e94d084ace6862 | bss9395/bss9395.github.io | /_en/Computer/Operating_System/Qt_C++_Programming/Canvas/Main.cpp | C++ | cpp | 533 | no_license | /* Main.cpp
Author: BSS9395
Update: 2022-02-12T02:12:00+08@China-Guangdong-Shenzhen+08
Design: Canvas
Encode: UTF-8
System: Qt 5.14.2
*/
#include "Common.h"
int main(int argc, char *argv[]) {
System::Logging(__FUNCTION__);
QApplication application(argc, argv);
iptr ret = QDialog::Rejected;
(new Logi... |
b70ceef75938fa76c987cd330886ed3f0a5cbb38 | d33b60f869bdab4e87179ba9133ea5a154251ec6 | face-sea/wabt | /src/interpreter.cc | C++ | cc | 80,812 | permissive | /*
* Copyright 2016 WebAssembly Community Group participants
*
* 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... |
816affdc2edab7cff896c5e70d6336f76c2da183 | ade9ddadc2101c02ca64b70b3eff008cd0a354f2 | lethep/Agui | /src/Agui/Widgets/TextBox/ExtendedTextBox.cpp | C++ | cpp | 16,063 | permissive | /* _____
* /\ _ \ __
* \ \ \_\ \ __ __ __ /\_\
* \ \ __ \ /'_ `\ /\ \/\ \\/\ \
* \ \ \/\ \ /\ \_\ \\ \ \_\ \\ \ \
* \ \_\ \_\\ \____ \\ \____/ \ \_\
* \/_/\/_/ \/____\ \\/___/ \/_/
* /\____/
... |
172c959ff93a972fc915ac8b6e5182168d592733 | 41d40c0beaf8ab1a61ff2592aa202398ba0521d3 | Fazle-Rabby-Sourav/Light-Online-Judge-Solutions | /String/KMP/1255 - Substring Frequency.cpp | C++ | cpp | 4,598 | no_license | #include <iostream>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <set>
#include <cmath>
#include <cstring>
#include <stdio.h>
#include <string.h>
#include <sstream>
#include <stdlib.h>
#include <vector>
#include <iomanip>
#include <ctime>
#include <as... |
0c0e56921bf26e0e1e24b863259c5ef1b6252705 | 95f47e509ed7e5ea4cb9bd04ed77dd75f5a05ef1 | FranciOrtiz/jutge_problems | /X66950_ca_Matriu_amb_sumes_decreixents.cpp | C++ | cpp | 860 | no_license | #include <iostream>
#include <vector>
using namespace std;
typedef vector<vector<int> > Mat;
Mat llegirMat(int n, int m) {
Mat A(n, vector<int>(m));
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cin >> A[i][j];
}
}
return A;
}
int suma_fila(const Mat &A, con... |
f40d4921299657ff8d121e5b6dccc05c662f5826 | 751c46b8ff3c8f9ea414a65243feb4015728d4b5 | GuelorEmanuel/Team-Tech-Support | /D4/cupid/UserManagement/accounttypeoption.cpp | C++ | cpp | 656 | no_license | #include "UserManagement/accounttypeoption.h"
#include "UserManagement/logincontrol.h"
#include "ui_accounttypeoption.h"
AccountTypeOption::AccountTypeOption(LoginControl &control,
QWidget *parent) :
QDialog(parent),
_control(control),
_ui(new Ui::AccountTypeOption)
{
... |
3a2d297253c35c6519daed82ecb84adf14342178 | 5a86a3af5b0a97e7c8120e064f543a340c3c667d | xhnsworks/v-engine | /dependencies/pugi-1.0/pugixml.hpp | C++ | hpp | 41,604 | no_license | /**
* pugixml parser - version 1.0
* --------------------------------------------------------
* Copyright (C) 2006-2010, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
* Report bugs and download new versions at http://pugixml.org/
*
* This library is distributed under the MIT License. See notice at the end
*... |
d6ff13b3487a3b96a69847b92b49f707adc3df53 | 34f0bf07206c8a945566d2fad4829997b898bc13 | shafik/llvm-project | /clang/test/CodeGenCXX/constructor-destructor-return-this.cpp | C++ | cpp | 11,510 | permissive | //RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=i686-unknown-linux | FileCheck --check-prefix=CHECKGEN %s
//RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=thumbv7-apple-ios6.0 -target-abi apcs-gnu | FileCheck --check-prefix=CHECKARM %s
//RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm... |
ed1b9f192e11bd841b8ba3bcc7da95020d863f94 | 37b2fc7e182fc869da1cc12f0b01764e94e6c57c | Hackjaku/astrobee | /gnc/matlab/code_generation/sharedutils/phdjbaaiglngbaaa_xzlarfg.cpp | C++ | cpp | 2,206 | permissive | //
// File: phdjbaaiglngbaaa_xzlarfg.cpp
//
// Code generated for Simulink model 'est_estimator'.
//
// Model version : 1.1142
// Simulink Coder version : 8.11 (R2016b) 25-Aug-2016
// C/C++ source code generated on : Mon Dec 4 08:33:06 2017
//
#include "rtwtypes.h"
#include <math.h>
#include "... |
96e293284a912134a544e5381d93dbea76b2e520 | 130c04148df0aedb1565b2e03023db369cc8ef3b | satyaaditya/My_C | /is_a_mirror.cpp | C++ | cpp | 1,864 | no_license | /*check whether a binary tree and its mirror are equal or not
function tobe checked """"""""""check_equality"""""*/
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
struct node {
int data;
struct node *left = NULL, *right = NULL;
};
struct queue1{
int front = -1;
int rear = ... |
11d4032c269fef534d5a474f43b15e49152930b0 | 52284e5759a0fa0f080cf9aadae172ededf798dc | q871980431/SeedCore | /logic/Core/RedisMgr/RedisHelper.cpp | C++ | cpp | 3,756 | no_license | #include "RedisHelper.h"
#include "hiredis.h"
#include "win32.h"
RedisResult::~RedisResult()
{
if (_free)
freeReplyObject(_reply);
}
bool RedisResult::GetInteger(s64 &val)
{
if (_reply->type == REDIS_REPLY_INTEGER)
{
val = _reply->integer;
return true;
}
return false;
}
bool RedisResult... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.