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
1830845c90935fd087c325b96708a1d0f72a8dd0
cac26bd5dc33ef944e1f0f0c1a4d25fba2bb4e51
polgreen/cbmc
/src/cpp/cpp_typecheck_expr.cpp
C++
cpp
77,360
permissive
/*******************************************************************\ Module: C++ Language Type Checking Author: Daniel Kroening, kroening@cs.cmu.edu \*******************************************************************/ /// \file /// C++ Language Type Checking #include "cpp_typecheck.h" #include <cstdlib> #inclu...
ece5e49fa85f7d5733f427f6f48c7aae3c459449
82617627497196c98cb9bcc361a00efefdc2dc48
pingcap/boost-extra
/boost/container/detail/copy_move_algo.hpp
C++
hpp
39,831
permissive
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2005-2013. 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) // // See http://www.boost.org/libs/c...
874ca1f725f3474cac3712c72d13803787629fc9
5671bf475899aee71dc1f231ed5214ff60b867c3
bartek56/MediaServer
/UnitTests/DlnaConfigFileTest.cpp
C++
cpp
5,956
no_license
#include <gtest/gtest.h> #include <QDebug> #include "../MediaServerLib/ConfigFile/DlnaConfigFile.h" #include "Mock/MockFileManager.h" class DlnaConfigFileTest : public ::testing::Test { virtual void SetUp() { mockFileManager = new MockFileManager(); fileManager = std::unique_ptr<MockFileManager>(mo...
8d1e6f659e7d5c021ee8be6e8f1b1ff912de3bb0
b2ad5ccdf77dce57d0afffd2676d727019768e9b
Alcanteria/CQuest
/CQuest/Core/Game.cpp
C++
cpp
4,341
no_license
#include "stdafx.h" #include "Game.h" #include "..\Menus\MainMenu.h" #include "..\Menus\GameOverMenu.h" #include "..\Menus\StorySelectMenu.h" #include <iostream> #include <time.h> Game::Game() { // Instantiate parts. timer = new Timer(); dm = new DM(*this); saveData = new SaveData(*this); logo = new Logo(*this); ...
98f534b6daecdf5da808d4a3209560d2d9e2be1c
5de86be610020bf56e7d396c3fde4b4505680234
kidynamit/CppAss4
/src/Image.cpp
C++
cpp
6,791
permissive
// // Created by User on 2020-03-27. // #include <iostream> #include <fstream> #include <cmath> #include "ImageProcessing.h" #include "Image.h" using ZMMALE001::ImageProcessing; using ZMMALE001::Image; using ZMMALE001::RGB; void Image::addPixel (RGB pix){ pixels.push_back(pix); } void Image::processHist(int bi...
c6bef3d1ad18f13dc8a807ce87ebf1149683cba0
0348356ee5a09faa27186bba4bdf2fdbf7506d3c
rela0426/delphi
/lib/to_json.cpp
C++
cpp
9,123
permissive
#include "AnalysisGraph.hpp" #include <fmt/format.h> using namespace std; using namespace fmt::literals; using namespace nlohmann; typedef vector<pair<tuple<string, int, string>, tuple<string, int, string>>> Evidence; // TODO: For debugging remove later. using fmt::print; string AnalysisGraph::to_json_string(int in...
5dddb13a1a90a02aad0dfb450c213a1601a9f6b6
0599ca89b25de091334cf50f91678cb95deadea1
AlexSotoDev/CryingEngine
/CryingEngine/src/Engine/AlarmDeregistrationCommand.cpp
C++
cpp
386
no_license
#include "AlarmDeregistrationCommand.h" #include "Alarmable.h" AlarmDeregistrationCommand::AlarmDeregistrationCommand(Alarmable * alarm, AlarmID alarmID) { ptrAlarm = alarm; currentAlarmID = alarmID; } AlarmDeregistrationCommand::~AlarmDeregistrationCommand() { ptrAlarm = nullptr; } void AlarmDeregistrationComma...
03b6a3627e7d68c0fb860bc3c2b673d2a94c4448
1ffb7dd651dae299805ad985f760d11931ea63bd
kinglon/driverdll
/driverdll/PRNT/PRNT.cpp
C++
cpp
6,256
no_license
#include "stdafx.h" #include "InterfaceSpec.h" #include "DeviceSetting.h" #include "ImCharset.h" #include "PrintManager.h" using namespace std; PB_RESULT PB_API PRNT_Initialize(const char* lpszConfigXml) { if (lpszConfigXml == nullptr || strlen(lpszConfigXml) == 0) { LOG_ERROR(L"PRNT_Init...
6b214a24c15bac50d9f7b8e403ca812e174b202b
e1af8183947ec610f464d9425f798597a8aea1d1
paulyc/lrose-core
/codebase/apps/radar/src/HawkEye/ColorMapTemplates.cc
C++
cc
6,994
permissive
#include "ColorMapTemplates.hh" #include "FlowLayout.hh" #include "../HawkEye/ColorBar.hh" #include "toolsa/LogStream.hh" #include <QPushButton> #include <QApplication> #include <QDesktopWidget> ColorMapTemplates::ColorMapTemplates(QWidget *parent) : QDialog(parent) { // add title to dialog //const QRect a...
5684bb5df28e712b801138bd911db7bc24539a8e
ec8234c6aa0c252ebaa1f357dd3df11300575893
MENGJIANGTAO/GameServer-2
/map_server/map_moudle/fight_moudle/MapBeast.cpp
C++
cpp
11,757
no_license
/* * MapBeast.cpp * * Created on: Nov 15, 2013 * Author: peizhibi */ #include "MapBeast.h" #include "MapPlayerEx.h" #include "Scene.h" #include "MapMonitor.h" #include "FightField.h" #include "ProtoDefine.h" MapBeast::MapBeast(void) : master_(0) { this->beast_detial_.beast_id_ = MAP_MONITOR->generate_beas...
b87fc08a2af9530f0f37603f84adfe38f6faa790
c400597e42d41c303041849e603e616ecc3245d7
GodsEye-07/Placement-Preparations
/learning-cpp/5. Loops/Palindrome_of_number.cpp
C++
cpp
551
no_license
//program that checks if the number is palindrome or not. //made by AYUSH VERMA(GodsEye-07) //lang: C++ #include <iostream> using namespace std; int main() { long int n = 8923691; int r,x,rev; x = n; rev = 0; while(n!=0){ r = n%10; rev = (rev*10) + r; n = n/10; } c...
c20f12726311d7b066c2bfcd4ef790e1021392f5
7da39ca68de238ffa2b2c417facebd216f2e90c1
FSource/FEngine
/lib/libfaeris/src/support/util/FsPathUtil.cc
C++
cc
885
permissive
#include <string.h> #include "support/util/FsPathUtil.h" NS_FS_BEGIN bool PathUtil::absolutePath(const char* name) { if(name[0]=='/') { return true; } if((strlen(name)>=2)&&name[1]==':') { return true; } return false; } std::string PathUtil::getDirName(const char* name) { int split=0; int name_len=st...
69f30bbca10cda8cb55cb1449d4f89b34a529b15
a215c08721b44c39a1ca49c95d6f3bf3c6ea96fa
sdhanush13/carlaviz
/backend/third_party/xviz/include/xviz/third_party/asio/detail/null_socket_service.hpp
C++
hpp
15,768
permissive
// // detail/null_socket_service.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...
fd584dcd3ca3f1f97a2c86ebb1c2a4db9f4444d5
fed3c6312bceb6426a7154c07e150161c072ea92
radamchin/ofxRemoteKinect
/example/remoteKinectServer/src/testApp.cpp
C++
cpp
3,546
permissive
#include "testApp.h" #include <sstream> static const char kNearClip[] = "rk_nc"; static const char kFarClip[] = "rk_fc"; static const char kTiltAngle[] = "rk_ta"; static const char kQuality[] = "rk_qu"; //-------------------------------------------------------------- testApp::testApp(int publisherPort, int resp...
e7b4c7257ab58e9ec7b60e428b21f52877015e05
0263196e8d91b87e443a3339d1a9c8590c9ae625
DavideCorradiDev/space-balls
/include/MessageSystem/MsgContactBullet.hpp
C++
hpp
353
no_license
#ifndef MSGCONTACTBULLET_HPP #define MSGCONTACTBULLET_HPP #include <MessageSystem/Message.hpp> namespace mnk { class MsgContactBullet : public Message { public: MsgContactBullet(bool ofPlayer) : ofPlayer(ofPlayer) {} virtual ~MsgContactBullet() {} public: bool ofPlayer; }; } ...
2fd7edc6afb895f63d00f07aff7d4ccc34ad8d66
a451ec09cd007235043d1d724cc6b9b31884aed0
DzambaTz/zadace-strukture-2021
/Zadaca_2/zadatak1/ll_stack.hpp
C++
hpp
5,535
no_license
#pragma once #include "stack_interface.h" #include <cstddef> #include <iostream> template <typename T> class List_stack : public stack_interface<T> { private: struct Node { friend List_stack; Node *next_; T data_; Node() : next_(nullptr) {} Node(const T &val, Node *const...
a9f86b2c2b73436d40610636c9ba923ea15c0c15
4e66e299d21e7ce7bc3bd90569c0af263872274f
Sun24Y/lemonbuddy
/src/modules/base.cpp
C++
cpp
3,494
permissive
#include "lemonbuddy.hpp" #include "registry.hpp" #include "modules/base.hpp" #include "utils/config.hpp" #include "utils/string.hpp" std::string ModuleFormatter::Format::decorate(Builder *builder, std::string output) { if (this->offset != 0) builder->offset(this->offset); if (this->margin > 0) builder->space(thi...
66063050b39e021217d9b254935c3fdae4e92862
6b84429e683cf3d2adc2a095814c7f026d7e0ce0
alexandraback/datacollection
/solutions_5644738749267968_1/C++/dotkrnl/war.cpp
C++
cpp
2,116
no_license
#include <cstdio> #include <vector> #include <list> #include <algorithm> using namespace std; #define MAX_SIZE (1000 + 2) template <typename T1, typename T2> struct Tuple { T1 x; T2 y; Tuple() {} Tuple(T1 _x, T2 _y): x(_x), y(_y) {} }; typedef Tuple<double, char> Block; inline bool comp(const...
b1fb81495a95f506c104481c5fb9c8b3db98ef60
7d0f1dcc62621131f5d65eb1a934d4ac29f804e3
ECS-251-W2020/chromium
/chrome/browser/translate/android/translate_bridge.cc
C++
cc
15,363
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/translate/android/translate_bridge.h" #include "base/android/jni_array.h" #include "base/android/jni_string.h" #include "chrome/...
be05fa45cd5469ed43810753ea7ba3bd78c8869e
104f6f138cb0888d32150a8c1e4c8c1fce56a7fd
keithhackbarth/Ultimate-Frisbee-Computer-Game
/CMU Graphic Package/source test/src/Window.cpp
C++
cpp
22,894
no_license
/* See "CarnegieMellonGraphics.h" for library version info and copyright information $Id: Window.cpp,v 1.9 2003/01/07 20:24:09 jsaks Exp $ */ #include <iostream> #include <CarnegieMellonGraphics.h> #include <Daemon.h> #include <PortMutex.h> #include <Debugging.h> #include <stdlib.h> #include <stdio.h> #include <Global...
efa8e761465fe1e4ce00d50efe4d637a1b87de03
c153f8509188e713261223eff5f29bacdba61ec4
rafailpieri/C_Lukeiou_Cyprus
/Ενότητα 2/2_7.cpp
C++
cpp
253
no_license
#include <string> #include <iomanip> #include <iostream> using namespace std; int main () { string s; cin >> s; for (int i=0;i<s.size();i++) for (int j=0;j<=i;j++) { cout << s[i]; } return 0; }
1b7621fa3256cbcd451c12f837be7f6cc61ca6d4
9cdbb7f132424c0262aecf4125c2a738010ac8f3
vxp3503/Graph
/DFS.cpp
C++
cpp
697
no_license
#include<bits/stdc++.h> using namespace std; class Graph { int size; list<int>*adj; bool *visited; public: Graph(int V) { size=V; adj=new list<int>[V]; visited=new bool[V]; } void add_edge(int u,int v) { adj[u].push_back(v); adj[v].push_back(u)...
8d0e83ecba617128f29b5d6052f77da086bf475f
a600e6f9d0fe21baff256a7a648bd4fc5dc562a6
Prankishor/Data-Structures-and-Algorithms
/Dynamic Programming/Longest Common Subsequence (LCS)/Longest Common Substring.cpp
C++
cpp
1,064
no_license
//Prankishor (21) //Dynamic Programming //Problem: Longest Common substring (variation on LCS) // The only change is, when ever we encounter different elements, we start from 0 again, and return the max value of dp, see code #include<bits/stdc++.h> using namespace std; void lcsT(string s1, string s2, int n, i...
b128e2b76f4eb1bff65693959d88891d1422c456
5a785436cba4c96148a66ab9ae2117690f24807c
TimothyW553/Competitive-Programming
/Olympiads Homework/pickit.cpp
C++
cpp
681
permissive
#include <bits/stdc++.h> using namespace std; int a[256]; int dp[256][256]; int solve(int l, int r) { if(l == r) return 0; if(dp[l][r] != -1) return dp[l][r]; int ans = 0; for(int m = l + 1; m < r; m++) ans = max(ans, solve(l, m) + solve(m, r) + a[l] + a[m] + a[r]); return dp[l][r] = ans; ...
e01d6d2ea3cde4ec74d30fd5e91fbe17e19636aa
233fe8a43cb79e5b0e9b8778f3e155e582082a22
dragondjf/webkit
/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
C++
cpp
78,252
no_license
/* * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of ...
e124b5f645514df60e7c4c37bc31ee01e98a403d
f2f1034110ff81fb1b15b2197d426d65c85384b6
Samsung/Castanets
/chrome/browser/sync/test/integration/single_client_themes_sync_test.cc
C++
cc
3,541
permissive
// Copyright (c) 2011 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 "base/macros.h" #include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/sync/test/inte...
91cae78bad6911b7636de4b010d38be91b6ed514
fbb29292c2ab84000ff22f42b56541ad253fde31
HO4X/buildOpenCVTX2
/opencv/modules/dnn/src/layers/normalize_bbox_layer.cpp
C++
cpp
12,270
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
fb66d212dc91d9702a175ace8131ef209cfea7a9
7bd6bb21a4138d6ccc2e74a69daaf7f6370cd272
LongJohnCoder/Infinity
/SDK/Framework/Controls.cpp
C++
cpp
5,779
no_license
#include "Controls.h" #pragma once #include <UI.h> #include <cstdlib> #include <scheduler.h> #include <VG/VG.h> namespace ui { void Image::onPaint() { float w = getWidth(), h = getHeight(), x = 0, y = 0; glColor4f(1.0f, 1.0f, 1.0f, 1.0f); glUseProgram(0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEX...
02d98f78b018721187fc9d538ec85ed61afcf730
821e1b1de3739d55ae527bcf83f0b9b5b845a07f
blackle/Basilisk-Hunter
/src/model/Solution.cpp
C++
cpp
910
permissive
#include "Solution.h" static const SHA256State DEFAULT_HASH({ 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, }); Solution::Solution() : m_hash(DEFAULT_HASH) {} Solution::Solution(const SHA256State& hash, const std::string& nonce) : m_hash(hash) , m_nonce(nonce) {...
334b6e7334afa246071553dbea8588953f382df4
473d63a372b20bfffdf989c87ae730be0b716c02
harryborison/BOJAlgorithm
/큐_스택_덱/18258.cc
C++
cc
1,248
no_license
#include <math.h> #include <stdio.h> #include <map> #include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <cstring> #include <queue> #include <stack> #include <stdlib.h> using namespace std; vector<string> tmp; int main(void) { ios_base::sync_with_stdio(...
eca6ff0f2aca1d3744de15e8fc0f55a21d486626
b7a3bffcbbafea8da9090b13bdda5568c15bb522
jjzhang166/WinNT5_src_20201004
/NT/net/ias/providers/nap/cond/condition.cpp
C++
cpp
1,245
no_license
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 1998, Microsoft Corp. All rights reserved. // // FILE // // Condition.cpp // // SYNOPSIS // // This file implements the class Condition. // // MODIFICATION HISTORY // // 02/04/1998 Original vers...
9b81c8518f631654df3905009a59ddc0a5af6680
66762050ea43a1a8e3c452c8200a990ae63cb2b4
EchoQian/PhoebeM
/modem_proc/rfdevice_asm/src/rfdevice_asm_cxm3641er_data_ag.cpp
C++
cpp
7,676
no_license
/* WARNING: This file is auto-generated. Generated using: asm_autogen.pl Generated from: v2.3.127 of RFDevice_ASM.xlsm */ /*============================================================================= R F C A U T O G E N F I L E GENERAL DESCRIPTION This file is auto-generated and it captures t...
296b7235a137c4b4ee7fd0ceefc8382b70a73eb6
2bdcc689e56d7a8ec383f9230d1e30d1b40fd87c
brycelelbach/nt2
/modules/gsl_specfun/include/nt2/toolbox/gsl_specfun/function/simd/sse/sse4_1/gsl_sf_zeta.hpp
C++
hpp
752
permissive
////////////////////////////////////////////////////////////////////////////// /// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand /// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI /// /// Distributed under the Boost Software License, Version 1.0 /// ...
20ce8463405b07fc33dad8e1807f715da0711a2a
7b5881fa349f3dbab7534d70e7326996f5812dda
chenkun4417/huaweicloud-sdk-cpp-v3
/ecs/src/v2/model/NovaAssociateSecurityGroupResponse.cpp
C++
cpp
673
permissive
#include "huaweicloud/ecs/v2/model/NovaAssociateSecurityGroupResponse.h" namespace HuaweiCloud { namespace Sdk { namespace Ecs { namespace V2 { namespace Model { NovaAssociateSecurityGroupResponse::NovaAssociateSecurityGroupResponse() { } NovaAssociateSecurityGroupResponse::~NovaAssociateSecurityGroupResponse()...
09852d8abfc87f0f73f381dba46a4f42bb757450
c872d77b52913f1e2e3420b7c5c2b4b198a6b354
sidratul-muntaher/c-plus-plus-final-IUBAT
/operator_overloading/Assignment-02.cpp
C++
cpp
448
no_license
#include<iostream> using namespace std; class test { int x; public: test() { x = 0; } test(int a) { x = a; } void display() { cout << x << endl; } test operator -(test s) { test temp; temp.x = this->x - s.x; return temp; ...
ca7f6a99ffcc4d9558fc8636e46f91786b9e9d10
51f558d076a75d09e108de432c07cdc0f3f83938
OrigenesZhang/-1s
/codeforces/ER52/CF1065E.cpp
C++
cpp
1,148
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define FOR(i, a, b) for (int (i) = (a); (i) <= (b); (i)++) #define ROF(i, a, b) for (int (i) = (a); (i) >= (b); (i)--) #define REP(i, n) FOR(i, 0, (n)-1) #define all(x) (x).begin(), (x).end() #define reset(x, y) memset(x, ...
567e8e38d115c6096b7ce0e5d899b8ad8fd5e306
a28b872e6177bd0909c65ae6d4120f657e63211a
kcroo/ChurchOfTheDamned
/dungeon.cpp
C++
cpp
4,082
no_license
/*************************************************************************************************** Program name: Final Project File: Dungeon.cpp Author: Kirsten Corrao Date: 03/04/2019 Description: this is the implementation file of the Dungeon class. It is a derived class of Room. The dungeon contains Ghoul Torment...
381d6ee57e23a5724e77c16796499a57909bd528
3249c4b29fcccfc04db2a24c9e009450cca67e98
meniossin/src
/third_party/angle/src/tests/gl_tests/WebGLCompatibilityTest.cpp
C++
cpp
153,725
permissive
// // Copyright 2015 The ANGLE 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. // // WebGLCompatibilityTest.cpp : Tests of the GL_ANGLE_webgl_compatibility extension. #include "test_utils/ANGLETest.h" #include "common/mathu...
075df7208c956668e83b84c3d796fc3844589aeb
394898fff1b96d9fe1077b070056a34ca3165203
WhiZTiM/coliru
/Archive/df26399389923484d0ad2dcff2ba9e83-50d9cfc8a1d350e7409e81e87c2653ba/main.cpp
C++
cpp
4,362
no_license
/** * Problem 12 * ---------- * The sequence of triangle numbers is generated by adding the natural numbers. * So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The * first ten terms would be: * 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... * * Let us list the factors of the first seven triangle ...
9e2a0dd85284e23c4425d8360c377e3c6866f21c
140270fd9a8a58d0ae24de70d21e5f572fd4f14c
jizillon/platform_system_core
/fastboot/util.cpp
C++
cpp
2,346
permissive
/* * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, t...
0a6ff6e3a7d7d912d686f2336d407b1a4ba12711
5d288979619f7887517cf2cdd61aec4368f449f4
xmoyKing/CS_CPP
/20160616/20160616_欧勇_String.cc
C++
cc
8,114
no_license
//1. 实现String类的其它运算符的重载,COW实现方式(Copy on Write) // 由于gcc版本问题,有一些string的实现不是以COW的方式 // gcc 5.x.x 是SSO(Short String Optimisation 短字符优先)的策略 #include<iostream> #include<stdio.h> #include<string.h> #include<stdlib.h> using namespace std; class String{ private: class CharProxy;//前置声明 public: //String();//默认构造函数 //...
2423e6c34c9a2eeaa4552eb1ea24d5712e4d36f5
00762fe3e2e77839be4148bff0826601f10b2f26
Hincoin/mid-autumn
/src/pbr_svr/rpc_svr.cpp
C++
cpp
2,756
no_license
#include "net.hpp" #include "dispatcher.hpp" #include "serialization.hpp" #include "rpc_svr.hpp" #include "pbr_svr.hpp" #include "render_node.hpp" namespace ma{ namespace rpc{ struct svr_send_rpc_handler:net::connection_write_handler_base { typedef void result_type; svr_send_rpc_handler(render_node& ctx):rpc_c...
1c09258968bfd60b3355d4f8840e1fc1cf48ef15
8108d35343b111c7c0e9e85695d321b191255be6
lincolnbphillips001/Snake
/Board.cpp
C++
cpp
577
no_license
#include "Board.h" Board::Board ( int screenWidth, int screenHeight, unsigned int boardWidth, unsigned int boardHeight, unsigned int boardUnitInPixels) { mScreenWidth = screenWidth; mScreenHeight = screenHeight; mBoardWidth = boardWidth; mBoardHeight = boardHeight; mBoardUnitInPixels = boardUnitInPixels; }...
5e56356cf2e76d3bd0758e35eb7df543b44166cb
26182214f2b4c50921538947e69176f4f54b3fed
yaxchuang/rfkon
/source_codes/konsens/dds/Server_Requester/tcpacceptor.cpp
C++
cpp
2,011
no_license
/* * tcpacceptor.cpp * * GLOBAL DEĞİŞKENLER: * Yok * * ENUM KULLANIMI: * Yok * * FONKSİYON PROTOTİPLERİ: * int start(); * TcpStream* accept(); * * AMAÇ: * TcpAcceptor sınıfı, TCP/IP soket mekanizmasını kapsülleyerek PASİF bir * şekilde istemciden bağlantıyı kabul eder. Bu sınıf ayrıca, sun...
806213ae346523a7a95a032cfe8947462a79229f
49fd0028b6347911ba2004e4eeada88d4f36e7d0
tyler-cranmer/Data_Structures
/Program Discussions/DescendingToAscending/ConsoleApplication3.cpp
C++
cpp
1,531
no_license
// ConsoleApplication3.cpp : This function rearanges / flips the elements of the array. // #include<iostream> using namespace std; void flip(int list[], int size); int main() { int list1[] = { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }; int i; int lSize = size(list1); cout << "Your initial List is: "; for...
5f0611911b8f3f05d78ed918b9c4a21c8bb0f582
64f400bb232a7650236b75d8e987dac47d0949fe
legobrainiac/TankEngineLite
/TankEngineLite/Libraries/sol2/sol/sol.hpp
C++
hpp
2,658
no_license
// The MIT License (MIT) // Copyright (c) 2013-2019 Rapptz, ThePhD and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitatio...
8c96477e36dd671b47d0e69c0faa69790b627779
5753f01d5992abdccb435538a30374cae0c81a64
laugiera/BarrenLands
/glcustom/src/IBO.cpp
C++
cpp
339
no_license
// // Created by Lou Landry on 16/12/2017. // #include "IBO.hpp" glcustom::IBO::IBO() { glGenBuffers(1, &m_id); } glcustom::IBO::~IBO() { glDeleteBuffers(1, &m_id); } void glcustom::IBO::bind() { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_id); } void glcustom::IBO::debind() { glBindBuffer(GL_ELEMENT_A...
4a69e5b72ab950530b517e4402d9e60cac3f0bb5
4c47f892a0b48c2008bb5bcec8cb86c56d1e87b9
JackLCL/milvus
/internal/core/unittest/test_scalar_index_creator.cpp
C++
cpp
4,592
permissive
// Copyright (C) 2019-2020 Zilliz. 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 l...
6c0e5ed7293480b81d350be58f8085a8f5f7d335
5799fe123ba311b6b44ee0ee8d86fbd1b32b6367
cms-sw/cmssw
/CondCore/EcalPlugins/plugins/EcalLaserAPDPNRatiosRef_PayloadInspector.cc
C++
cc
15,284
permissive
#include "CondCore/Utilities/interface/PayloadInspectorModule.h" #include "CondCore/Utilities/interface/PayloadInspector.h" #include "CondCore/CondDB/interface/Time.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "DataFormats/EcalDetId/interface/EEDetId.h" #include "CondCore/EcalPlugins/plugins/EcalDra...
9b202b0d07ee34205aa2f698b48599ea4017b07c
70019090699ccae923539c1f69822afcc2cc2577
Khaledhesham/wallet-client
/main.cpp
C++
cpp
200
no_license
#include <QCoreApplication> #include <QDebug> #include "walletclient.h" int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); WalletClient walletClient; return a.exec(); }
8c5775e9cdd4366360cb54722da87d482f399f73
56588a60f7bb473dca6f013d824f322497481cf4
barbinbrad/cereal
/messaging/messaging.hpp
C++
hpp
4,869
permissive
#pragma once #include <cstddef> #include <map> #include <string> #include <vector> #include <capnp/serialize.h> #include "../gen/cpp/log.capnp.h" #ifdef __APPLE__ #define CLOCK_BOOTTIME CLOCK_MONOTONIC #endif #define MSG_MULTIPLE_PUBLISHERS 100 class Context { public: virtual void * getRawContext...
e66199b25ed61310d075b75062327c67dcaf21f5
d418b974287ec87e2df1f80be9e8e16ba12cf900
mobilenjoy/learning_cpp_functional_programming_kor
/CodeBlocks/Chapter01/auto/auto.cpp
C++
cpp
581
no_license
/* auto.cpp */ #include <iostream> #include <typeinfo> auto main() -> int { std::cout << "[auto.cpp]" << std::endl; // 여러 개의 auto 타입 변수를 생성한다. auto a = 1; auto b = 1.0; auto c = a + b; auto d = {b, c}; // 변수의 실제 타입을 출력한다. std::cout << "type of a: " << typeid(a).name() << std::endl; ...
66be81ace4cfa51fec8d82047e63af8e8edcc93b
ffb2d827d525e91f31a463d9b319ac5ea7aff2ab
Grahammc123/dascoin-blockchain
/libraries/chain/proposal_evaluator.cpp
C++
cpp
9,282
permissive
/* * Copyright (c) 2015-2018 Cryptonomex, Inc., and contributors. * * The MIT License * * 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 limitatio...
516af7f8abcdad87345b4d11ab0167f942f66da8
135523651e6862f25f8c4b957a4ef027bbd0b2b9
tjaworski/serenity
/Userland/Libraries/LibWeb/WebDriver/Client.cpp
C++
cpp
13,169
permissive
/* * Copyright (c) 2022, Florent Castelli <florent.castelli@gmail.com> * Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org> * Copyright (c) 2022, Tobias Christiansen <tobyase@serenityos.org> * Copyright (c) 2022, Linus Groh <linusg@serenityos.org> * Copyright (c) 2022-2023, Tim Flynn <trflynn89@serenityos.or...
150948cb84f8994164c7ef75359d9af335de7191
34c3b5b09e52994553f6d705a878a38e8a7d868e
Killerbear/Sea-Of-Thieves-External-ESP-v2
/Cheat.cpp
C++
cpp
26,311
no_license
#include "Cheat.h" #include <fstream> cCheat* Cheat = new cCheat(); std::string cCheat::getNameFromIDmem(int ID) { try { DWORD_PTR fNamePtr = Mem->Read<uintptr_t>(GNames + int(ID / 0x4000) * 0x8); DWORD_PTR fName = Mem->Read<uintptr_t>(fNamePtr + 0x8 * int(ID % 0x4000)); return Mem->Read<t...
877247120b23b8f54dcb6fdd0be9c2277ddd186e
a5c8a0eb4d44eeeb60018afb542764b7a356fc1e
Neverous/codeforces
/77/D1/d.cpp
C++
cpp
1,465
no_license
/* 2011 * Maciej Szeptuch * II UWr */ #include<cstdio> #include<queue> #include<vector> int verts, start, end, distance[4096]; bool visited[4096]; std::vector<int> graph[4096]; inline static const int findCycle(const int &v, const int &f = -1); inline static void countDistances(void); int main(void) {...
0e8c250d8612b848ec3aef8c929e312aa84e0125
87ceaf21bac864e4228ab8d829bfd98c5a2fbab3
dlyongemallo/qtorch
/XregGraphGen/main.cpp
C++
cpp
4,585
permissive
# # Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya, Alán Aspuru-Guzik # # 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 # # U...
5a41af307ce275a43187dc37441f5db8f29c22eb
b6d855c2d32723fff981908fe80a49e23fd7f233
pohsun/BTaggingCommission
/plotter/macro/checkRoughBTagEff.cc
C++
cc
4,691
no_license
// vim: set sw=4 sts=4 fdm=marker et: //Description : Get the rough b-tagging efficiency. //Author : Po-Hsun Chen (pohsun.chen.hep@gmail.com) //Last Modified : 31 Oct 2017 10:40 #include <iostream> #include "TROOT.h" #include "TStyle.h" #include "TFile.h" #include "TH1D.h" #include "TAxis.h" #includ...
dd3d3218b198782f2f3fa306d772e6a0ac51dd50
a8b6278d4f54f407012f08e8d364daa53c6c6684
DerNerger/Siedler
/Sourcecode/View/TreeWidget.cpp
C++
cpp
4,226
no_license
#include "TreeWidget.h" TreeWidget::TreeWidget(Team *T, bool ForPicture, QWidget *parent) : QWidget(parent),forPicture(ForPicture),t(T) { setMouseTracking(true); grid = new QGridLayout(this); int col=1; QList<TreeElement*> subtreeList = t->getChildren(); for(int i=0 ; i<subtreeList.length() ; i++)...
fd41b94994f81f500a29774d743cf8fbadac7747
65ec0cef630b14c41689fce0e8a285aa4fb749d8
phamvannam191199/task6
/bai5task6.cpp
C++
cpp
969
no_license
#include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { char kyTu; printf("\t\t MENU\n"); printf("\t========================"); printf("\n\t2. C"); printf("\n\t3. HDJ"); printf("\...
5b42e24f5b796f2071f44e25aa873c710695cfaf
63ab45b569b90e5c70a15f83c003947201d3584a
kimgibaam/Algorithm
/Baekjoon Online Judge/브루트 포스(n과m)/15665. n과m(11).cpp
C++
cpp
639
no_license
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<map> using namespace std; int N, M; vector<int> v; vector<int> picked; map<int, int> m; void solve(int cnt) { if (cnt == M) { for (int i = 0; i < M; i++) { cout << picked[i] << " "; } cout << "\n"; return; } for (int i =...
fe81c2925bfea5758690c98acb31726fc20a81d6
7aea72bd1d62da22f9a127555a922fc601beec39
patro-sp/codersp
/recursion/substring.cpp
C++
cpp
331
no_license
#include<iostream> using namespace std; void generate(char *a,char *b,int i,int j) { if(a[i]=='\0') { b[j]='\0'; cout<<b<<endl; return; } b[j]=a[i]; generate(a,b,i+1,j+1); generate(a,b,i+1,j); } int main() { char a[]="abc"; char b[100]; generate(a,b,0,0); ...
a3496178b3761250144debdac7d963646c4b35b1
a4d2bb5412d832e941726810820bcd4f4aa99832
Inozitol/cypher_tools
/keyed.cpp
C++
cpp
722
no_license
#include "keyed.h" void Keyed::encrypt(std::string input, std::string key){ _input=input; std::string alph; transform(key.begin(), key.end(), key.begin(), ::toupper); for(int i=0;i<key.length();i++){ if(key[i]!=' '){ if(alph.find(key[i])==std::string::npos) alph+=key[i]; } } if(alph.length()!=26){ char ...
ca8311ec430f13e245559b8700977327757628af
d2a53c9867f8210a62da2896f994d5a110ec2df7
ordinarv/ACM
/OJ/2019寒假训练/day-1/数位DP/HDU-3652Bnumber.cpp
C++
cpp
773
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 15; int digit[maxn]; ll dp[maxn][maxn][3]; ll dfs(int pos,int mod = 0,int sta = 0,bool limit = 1){ if(pos == 0) return (!mod && sta == 2); if(!limit && dp[pos][mod][sta]) return dp[pos][mod][sta]; int ans = 0,up = (limit?digit[pos]:9...
2b9e62ece76667306e7305591afc98733eb89c57
db30e99e71dd81b43e1b79a32e7b1701780614fa
bmb7904/TableCompSci355
/main.cpp
C++
cpp
1,279
no_license
#include <iostream> #include "table.cpp" using namespace std; template <class T> void fill(table<T>& t, T item); template <class T> void randomize(table<T>& t); int square(int k); int main() { table<int> t1(3,3); for(int i = 0; i < t1.get_rows(); i++) { for(int j = 0; j < t1.get_cols(); j++) ...
86112e14b75a8455dad2657000f959abddaacadf
29efff5217f8f3b01086b2bb6eae6e9b4e920938
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_PrimalItemConsumable_UnlockEmote_Evil_functions.cpp
C++
cpp
1,236
permissive
// ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemConsumable_UnlockEmote_Evil_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //--------------------------------------------...
bff689f909c88f21b8d5693b894ece3485a17b59
e9b1029e5d6707abe358055a2ec86d2381cfa950
GauravWalia19/RAINBOW
/src/C++/rainFormatColor.hpp
C++
hpp
11,738
permissive
/************************************************************************************ * FORMATTING WITH COLORS * ************************************************************************************/ /************************** * LIGHT GREEN * ****...
76252c7e70a8463e9cdc6e57f31f1c5f4ecfa367
5d763323a36c3819136a0f32e596a429071517ee
truenas/ports
/www/chromium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc
C++
cc
1,750
permissive
--- chrome/test/chromedriver/key_converter_unittest.cc.orig 2021-05-12 22:05:46 UTC +++ chrome/test/chromedriver/key_converter_unittest.cc @@ -264,7 +264,7 @@ TEST(KeyConverter, AllShorthandKeys) { ->Generate(&key_events); builder.Generate(&key_events); builder.SetKeyCode(ui::VKEY_TAB); -#if defined(OS_LIN...
fdb2c76892dc7d44687e6dc78420b21bdaeec756
7814614b10ee07a0c903011d328a0313fe8e4756
brunolauze/openpegasus-providers-old
/src/Providers/UNIXProviders/ProtocolAdapter/UNIX_ProtocolAdapterProvider.cpp
C++
cpp
4,995
permissive
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
c8b0e831f5b9b2819b359dd7a31075728f4410e7
38cb6f455835db0e48e0817368084dd3c88a35e7
MananVyas24/CSCI574-Computer-Vision
/SIFT-Homography-RANSAC/main.cpp
C++
cpp
13,081
no_license
#include "Assignment2.h" #include <math.h> Assignment2::Assignment2() { // TODO Auto-generated constructor stub } Assignment2::~Assignment2() { // TODO Auto-generated destructor stub } Assignment2::Assignment2(cv::Mat m) { image = m.clone(); } void Assignment2::extractSiftFeatures() { SIFT siftobject; siftob...
87107e2394eb398a65d6a2bef53ff11b0fd38b28
587426fa6a875ce954f9744b6d0437ce4d345fb9
Servicerobotics-Ulm/ComponentRepository
/ComponentVisualization/smartsoft/src/AmclVizTask.hh
C++
hh
1,221
no_license
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
1cb207e3fe8741577fb340af0b7963062a042cad
07752be64283c094c51f3b8f8e7c9c3a8902fa59
agicy/OI
/Luogu/P5025.cpp
C++
cpp
3,315
no_license
#include<bits/stdc++.h> using namespace std; #define reg register typedef long long ll; #define MOD 1000000007 #define INF 0X3F3F3F3F3F3F3F3F #define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) static char buf[1<<21],*p1=buf,*p2=buf; inline ll read(void){ reg bool f=false; reg char ch=...
e027455c3a895e9101365cbe2fb279ead28bb549
c8ab71a88417d48e367017b16daa06e25632fde1
iznotek/DigitalKnob
/DKPlugins/DKSFMLWindow/DKSFMLWindow.cpp
C++
cpp
15,489
no_license
#include "DK/stdafx.h" #include "DKSFMLWindow/DKSFMLWindow.h" #include <SFML/Graphics.hpp> std::vector<boost::function<bool(sf::Event& e)> > DKSFMLWindow::event_funcs; std::vector<boost::function<void()> > DKSFMLWindow::draw_funcs; ///////////////////////// bool DKSFMLWindow::Init() { DKLog("DKSFMLWindow::Init()\n"...
e40258adff002e72bf039dd4eaeecf25c3018774
eab7ab7d4e36e654d4bba65f2f3ed82d37d0146b
UnacceptableBehaviour/gdb_lldb
/test/q254.cc
C++
cc
4,609
no_license
// compile with - C++17 // // g++ -v -Wall -Weffc++ -std=c++17 test_c++.cc -o test_c++ // -v verbose show commands issued by compiler / linker // -Wall show c++ related warnnings // -Weff++ warning generated by code that breaks coding advice in Effective C++ - S.Meyers // -g include debugger inform...
ab442e18bdf517d6d28768605e1bf39a6795c105
72fe856b7c3fbadebb56c0e8ada0c16762fa6b0d
opensourcegamedeveloper/luascript
/parser/parser.cpp
C++
cpp
975
permissive
/* * This file is part of LuaScript * https://github.com/perbone/luascrip/ * * Copyright 2017-2021 Paulo Perbone * * 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.apa...
53e00e162e3495bbebc0bc645f3aeb850833b598
ea67af393e725ee2510105988a8b76dbb7bf040c
RussTorres/cloud-volume
/ext/third_party/compressed_segmentation/src/compress_segmentation_test.cc
C++
cc
7,984
permissive
/** * @license * Copyright 2016 Google Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
c95559bf4a7e60f640e8bf4e605195d434ac988a
13577a93397443add7ccb538580f7cb28af295ef
ashmanmode/code-samples
/GfG/293A.cpp
C++
cpp
1,319
no_license
#include <bits/stdc++.h> using namespace std; #define fr(i,n) for(int i = 0 ; i < n ; i++ ) #define mp(a,b) make_pair(a,b) #define pb(a) push_back(a) #define printvect(a) fr(i,a.size()) cout << a[i] << " " ; typedef unsigned long long int ull; int main() { string s,t ; cin >> s >> t ; int s_arr[26]; int S_arr[26...
0c4a9f8fa82962e08507b51e3555476cd4bfbb32
054a67a3427deae25db63f62ecd09fd4f247775e
i96751414/torrest-cpp
/src/main.cpp
C++
cpp
8,393
permissive
#include <iostream> #include "boost/program_options.hpp" #include "boost/filesystem.hpp" #include "boost/algorithm/string.hpp" #include "spdlog/spdlog.h" #include "oatpp/network/Server.hpp" #if TORREST_ENABLE_SWAGGER #ifdef OATPP_SWAGGER_RES_PATH #include "oatpp-swagger/Controller.hpp" typedef oatpp::swagger::Control...
08f371ac59589ba839e7765094591ed77162e285
ee9dcc11b2527346871122907bce126cd57da3fe
ishine/BERTCpp
/test/bertembeddingtest.cpp
C++
cpp
3,136
permissive
#include"../src/bertembedding.h" #include"gtest/gtest.h" #include <cmath> using namespace std; using namespace lh; TEST(CommonTest, bertembedding){ size_t vocab_size = 5; size_t type_vocab_size = 2; size_t hidden_size = 3; size_t seq_length = 4; size_t batch_size = 2; float word_embeddings[15...
f772e986023822cd26c5a7b069b6d8a166f05ef5
46ba0354f915cb803c96f998c93bf6c546b91f30
JordanField/connectedhomeip
/src/platform/android/KeyValueStoreManagerImpl.cpp
C++
cpp
7,059
permissive
/* * * Copyright (c) 2020-2021 Project CHIP 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/LI...
c1f3ad637beff7ebc379dfcd8e0312baf1963120
4bceafed5b37192d11104a9cd17377b8dcf1a126
sbakas/CaPTk
/src/applications/Preprocessing/src/Preprocessing.cxx
C++
cxx
26,795
no_license
#include "cbicaCmdParser.h" #include "cbicaLogging.h" #include "cbicaITKSafeImageIO.h" #include "cbicaUtilities.h" #include "cbicaITKUtilities.h" #include "ZScoreNormalizer.h" #include "itkBoundingBox.h" #include "itkPointSet.h" //! Detail the available algorithms to make it easier to initialize enum AvailableAlgori...
dbdf43cfb9f0f2b2758565c48238d0a32ea79d72
defe39414e90a65f175c2174bc48ffcc9209b227
daugraph/engine
/engine_race/data_store.cc
C++
cc
2,683
permissive
// Copyright [2018] Alibaba Cloud All rights reserved #include <fcntl.h> #include <sys/stat.h> #include <sys/mman.h> #include <sys/types.h> #include <map> #include <cstring> #include <iostream> #include <utility> #include <cassert> #include <thread> #include "util.h" #include "data_store.h" #include "data_store_imp.h"...
b6221938da856ec2bbca385a363ba7b5fbfb9774
321d8b1be0f3092bf33dc8114ca65403e4082eca
fuad7161/CSES-Solutions
/src/1147 - Maximum Building I.cpp
C++
cpp
991
no_license
/* Problem Name: Maximum Building I Problem Link: https://cses.fi/problemset/task/1147 Author: Sachin Srivastava (mrsac7) */ #include<bits/stdc++.h> using namespace std; #define int long long #define endl '\n' int a[1005]; signed main(){ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #ifdef LOCAL ...
2b77178453bc1350fe77de99b5dbda33d84c2f2f
2d767ea4757c146902e1e37385f7acac64cd1065
goldsail/Leetcode
/Leetcode/Q133.cpp
C++
cpp
1,092
permissive
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, vector<Node*> _neighbors) { v...
052c38b29b0a48b47e75a79543f5b652d91f0e19
91c7b682dbc2c5c6932aea4d4f23e800efc67dcd
lum7na/ACM
/POJ/2533/8004421_AC_16ms_672kB.cpp
C++
cpp
932
no_license
#include <cstdio> #include <iostream> using namespace std; int s[1005],n,f[1005]; //Product by MiracleEEEE inline int read_num(){ char ch = getchar(); int re = 0; bool fl = 1; if(ch == '-') {fl = 0 ; ch = getchar();} while( ch >= '0'&& ch <= '9'){re = re * 10 + ch - '0'; ch = getchar();} return fl ? re : -re; } in...
d0fc346cc993579461a1174ac37f9c8db6987261
e802891904be9f1ddbba105592c75c7b9860ab05
xnzhxnzh/C-
/2_13.cpp
C++
cpp
512
no_license
//Make a program: //Display "Please input days:" to ask user to input a number of days(example: 3) //Convert it into minutes(example: 3 days =3*24*60=4320 minutes) //Print the result as "The [days] days have [minutes] minutes." //Please fill in the blank to make the program completed. #include <iostream> int ma...
fe3e95c4750d70ed7f7bded76374ae1afc8e7306
bc2d6090c491668eb68617ca95a59f593360575c
yoraish/raspi_bot
/src/cpp/camera_test.cpp
C++
cpp
1,149
no_license
#include <ctime> #include <iostream> #include <raspicam/raspicam_cv.h> // #include "opencv2/imgcodecs.hpp" using namespace std; int main ( int argc,char **argv ) { time_t timer_begin,timer_end; raspicam::RaspiCam_Cv Camera; cv::Mat image; int nCount=100; //set camera params Camera.set( CV_CAP_PROP_FORMAT,...
24b88d83f88dd9b7ed649307829f61de3cd98188
45c15bd1bad4f31013e23017d25015106ba61c28
nsendoda/bpuyoai
/src/mawashistate.cpp
C++
cpp
10,709
no_license
#include "mawashistate.h" MawashiState::MawashiStateType MawashiState::Decide() { return [&](const State& state_, BpuyoPad* bpuyopad_) { for (int c = 1; c < Field::COLUMN; c++) { int height = state_.field.GetLowestEmptyRows(c); if (height >= 13) { // 2列目で12段なら確実に1列目では回せないのでリセット if (c < 3) { _ma...
6fb0f9032c4e18d7896cefc88491778632207de4
3ea106c62994d3ad186243585655df42f21e4f3a
Sitispeaks/turicreate
/src/external/boost/boost_1_68_0/boost/mpl/aux_/preprocessed/plain/greater.hpp
C++
hpp
2,022
permissive
// Copyright Aleksey Gurtovoy 2000-2004 // // 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) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace ...
46c6d274b9f4859b8ba9848af1d6bbec6ca92bc5
06b1a72b27c9b63cd250ffc50d755a3b538a78e3
tarrinr/RMS-EDF-scheduler
/scheduling.cpp
C++
cpp
13,184
no_license
#include "scheduling.h" #define ELSE_FIN_FAIL else { t.println(); t.println("ERROR: invalid input file."); t.println("Fix file formatting and restart."); t.println(); t.getInput(); return 1; } // Get input file int scheduler::getInputFile(int argc, char* argv[]) { // Reinitialize after error id.clear...
0ef3512e7983526ef0c63786bea587ea8f8666ae
713d3a110c1a16644105563a14dbe16e93a8bb2b
florianvoelkers/Flow3D
/Flow3D/Flow3D/src/Flow3D/Rendering/Shapes/Cube.hpp
C++
hpp
2,074
permissive
#pragma once #include "Flow3D/Math.hpp" #include "Flow3D/Rendering/Shader.hpp" #include "Flow3D/Rendering/Texture.hpp" #include "Flow3D/Color.hpp" #include "Flow3D/Rendering/RenderingEngine.hpp" // Constructor: Cube(float r, float g, float b, (optional)float a) or Cube(Color color) // or Cube(Texture diffuseTexture...
0ac96c18704a5e8ba19cefb72b502b36c20793b7
c98737efff129bcb10e1ff0ee2e096f7e9c5d590
conorjp/Parrish_Draper_Worley_CSCI2270_FinalProject
/HashTable.cpp
C++
cpp
17,207
no_license
// // HashTable.cpp // // Final Project // CSCI-2270 // Conor Parrish, James Draper, Luke Worley // #include <iostream> #include <vector> #include <string> #include <fstream> #include <sstream> #include "HashTable.h" using namespace std; int livesT; HashTable::HashTable(){ table = vector<Location*> (tableSi...
94e48c4f1e23c23966b16c49d5dbd6e04b834d7f
c7393db46562e593139888ff441d59a355090f9b
ryuriymega/chromium
/components/autofill_assistant/browser/client_context.cc
C++
cc
2,972
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 "components/autofill_assistant/browser/client_context.h" #include "base/metrics/field_trial.h" #include "base/strings/string_util.h" #include "co...
3f048b18bcb6238ec01e0b85952c6667c268b7df
3ccbbbd46cd9ed4e860235adebb0ce2c3d6c206c
giftnuss/libftl
/ftl/BinaryTree.hpp
C++
hpp
7,229
no_license
/* * BinaryTree.hpp -- binary tree * * Copyright (c) 2007-2011, Frank Mertens * * See ../COPYING for the license. */ #ifndef FTL_BINARYTREE_HPP #define FTL_BINARYTREE_HPP #include "atoms" #include "BinaryNode.hpp" namespace ftl { #ifdef min #undef min #endif #ifdef max #undef max #endif template<class T, cla...
6433741c0f482beb5ee9cdff6e673676d14390c6
e2f5b8b0d8941efb14b6646a857227ca46cdd312
ajlende/BulletPhysicsDemo
/Headers/mesh.hpp
C++
hpp
1,919
no_license
#ifndef MESH_HPP #define MESH_HPP #pragma once // System Headers #include <assimp/importer.hpp> #include <assimp/postprocess.h> #include <assimp/scene.h> #include <glad/glad.h> #include <glm/glm.hpp> // Standard Headers #include <map> #include <memory> #include <vector> // Define Namespace namespace ComS342 { ...
c9263f1c9ce2d8ee0c2276da513245bccb12e1e2
987a6fb0a4491ebae84b73a7e94982a69d20d0ab
RafikFarhad/Code_is_fun
/Codeforces/C debt.cpp
C++
cpp
4,857
no_license
#include <cstdio> #include <iostream> #include <string> #include <cstring> #include <math.h> #include <ctime> #include <cstdlib> #include <algorithm> #include <new> #include <vector> #include <stack> #include <queue> #include <map> #include <set> /******************************************/ /** Author : Rafik Farha...
4d62f77e3db531bb1e33cf344b8413da92abbf4c
93b3041f54ad71f9d2ae33090592b9be1c810374
qt-ios/SFOsaka
/client/SFOsaka/src/SFOAppHighlight.cpp
C++
cpp
1,561
no_license
#include "SFOAppHighlight.h" #include <QDebug> #include <QGeoCoordinate> #include <QVariant> const QString SFOAppHighlight::OrderKey = "order"; const QString SFOAppHighlight::DetailKey = "detail"; const QString SFOAppHighlight::DetailJpKey = "detail_jp"; SFOAppHighlight::SFOAppHighlig...
9be3cb8b39e6f00fb414a6893f04c2a1c3992154
995e8f9acf2f4f90c84072073cb457b58e45180a
hetgrotelab/Carnaval
/lib/UTFT/UTFT.cpp
C++
cpp
28,504
permissive
/* UTFT.cpp - Multi-Platform library support for Color TFT LCD Boards Copyright (C)2015-2018 Rinky-Dink Electronics, Henning Karlsen. All right reserved This library is the continuation of my ITDB02_Graph, ITDB02_Graph16 and RGB_GLCD libraries for Arduino and chipKit. As the number of supported disp...
8012cb84eb4824f2a213a55f1187fe8573230b8f
162e8190b992a9114cd24105955e0f10f3daee2c
AaronGeesink/CS1C-QT-Painter-Project
/3_class_files/mainwindow.cpp
C++
cpp
1,776
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include "shapes.h" #include "canvas.h" #include <QDebug> #include <QMessageBox> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); contact = new class contact(this); login = new class login(t...
c1df3a39903b4574ce0e97d2f46d46c90bee906a
d5908c7d4bbc173e85ab2d35e31d9b02e8a98622
ros2/rclcpp
/rclcpp/test/rclcpp/test_duration.cpp
C++
cpp
12,357
permissive
// Copyright 2017 Open Source Robotics Foundation, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...