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
90966376f7d41c872b55020fd689ab51b3752bbf
f7457db699fc5ca44ece19c442577c72a3b07a1d
oneofthezombies/TeamAvengers_PUBG
/PUBG/Client/Source/Object/SkySphere.cpp
C++
cpp
1,669
no_license
#include "stdafx.h" #include "SkySphere.h" #include "EffectMeshRenderer.h" SkySphere::SkySphere() : IObject(TAG_OBJECT::Idle) , pEffectMeshRenderer(nullptr) { pEffectMeshRenderer = AddComponent<EffectMeshRenderer>(); pEffectMeshRenderer->SetEffectMesh(TAG_RES_STATIC::SkySphere); //cout << "SkySphe...
d7df44adb6882ab6b9fca000087fa9e32145d219
db7088340c58b9a5c46337dbb904c78d6059f3f7
osyo-manga/Sprout
/sprout/math/iszero.hpp
C++
hpp
644
permissive
#ifndef SPROUT_MATH_ISZERO_HPP #define SPROUT_MATH_ISZERO_HPP #include <type_traits> #include <sprout/config.hpp> #include <sprout/type_traits/enabler_if.hpp> namespace sprout { namespace math { namespace detail { template< typename FloatType, typename sprout::enabler_if<std::is_floating_poi...
ea94831061f391239927af185b12652da0291ef2
c4575f066887e951f08d4478ba77b31f71ff23a2
ZexinYan/Leetcode
/CPP/66.cpp
C++
cpp
559
no_license
#include <iostream> #include <vector> using namespace std; vector<int> plusOne(vector<int>& digits) { digits[digits.size() - 1]++; for (int i = digits.size() - 1; i >= 1; i--) { if (digits[i] >= 10) { digits[i] -= 10; digits[i-1]++; } } if (digits[0] >= 10) { digits[0] ...
7150bc6d336a3479c68e2f0860e0bcdc8e15cdc7
71766c2615207619879a3d439d33bafefddefc95
saurov2752/Programming_Problems
/Programming/575 - Skew Binary.cpp
C++
cpp
533
no_license
#include <iostream> #include <bits/stdc++.h> #include <string.h> #include <math.h> using namespace std; int main() { char str[1000]; long long a,i,len,sum=0; while(scanf("%s",str)==1) { len=strlen(str); if(strcmp(str,"0")==0) return 0; //printf("%d\n",len); i=0; ...
9af8955d42aeeae07a2606d9fd357a258753c8f0
ed1466e922466423a6da7bb02cca040b85526b41
DiscreteTom/simple-3D-room
/simple-3D-room/simple-3D-room.cpp
C++
cpp
6,032
permissive
#include <iostream> #include "gl/glut.h" #include "soil/src/SOIL.h" // to load jpg texture #ifdef _DEBUG #pragma comment(lib, "freeglutd.lib") #else #pragma comment(lib, "freeglut.lib") #endif #pragma comment(lib, "SOIL.lib") // Light values and coordinates GLfloat globalAmbient[] = {0.2f, 0.2f, 0.2f, 1.0f}; // RGBA ...
2a973b2fc37fb3842b4d19b728e7c6560e5b5ed9
a2f37da93790d3f4e02527b1add395ae59b1f2eb
AraragiEro/newk
/.history/HJ21_20210316180520.cpp
C++
cpp
414
no_license
#include<iostream> #include<string> #include<sstream> #include<unordered_map> using namespace std; unordered_map<char,int> map{ {'a',2}, {'b',2}, {'c',2}, {} } int main(){ string input; while(cin>>input){ stringstream trainer; for(auto i=input.begin();i!=input.end();i++){ ...
7bef211fb454f3a5fd257746f8d7543aca9e6292
d35f12f57ec63e4f637868b1bf1fda69a548b54a
hateom/si-air
/program/src/modwidget.cpp
C++
cpp
4,513
no_license
#include "modwidget.h" #include <qpushbutton.h> #include <qlineedit.h> #include <qcheckbox.h> #include <qapp.h> #include "optform.h" #include "mp_logger.h" #include "module_mgr.h" #include "main_buttons.h" ////////////////////////////////////////////////////////////////////////// modWidget::modWidge...
621f7e7bc8aa4fb021320c00b9edc4b927a736da
2ddc7db0258143f6deff810d66ad71b5344075ae
kimsiang/SLAC2016
/TimeWalkAnalysis/main.cxx
C++
cxx
2,053
no_license
#include <iostream> #include <fstream> #include <string> #include "TString.h" #include "WalkTimeAna.h" #include "SLACRunLog.h" #include <TCanvas.h> #include <cstdlib> int main (int argc, char **argv) { // TCanvas *mydummycanvas = new TCanvas(); string temp1, temp2; // temp1 to store filename, temp2 to store...
5db8c55f6f9be0dd746f0befdbc8a8bd9a3d7507
619f5791b69fc2f045a6a7bed840db1ef3432955
xIRaYIx-zz/xray-162
/code/engine/xrEngine/IGame_Level.cpp
C++
cpp
9,092
permissive
#include "stdafx.h" #include "igame_level.h" #include "igame_persistent.h" #include "x_ray.h" #include "std_classes.h" #include "customHUD.h" #include "render.h" #include "gamefont.h" #include "xrLevel.h" #include "CameraManager.h" #include "xr_object.h" #include "feel_sound.h" ENGINE_API IGame_Level* g_pGameLevel = ...
a62a1bd626c62e977a7d08657a6135b341507dcd
8bf4101b5bc0380308ee4eb03e9c7808a40a7f9d
erikalxq/RockUI
/skia/src/gpu/GrDistanceFieldTextContext.cpp
C++
cpp
27,751
no_license
/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrDistanceFieldTextContext.h" #include "GrAtlas.h" #include "GrBitmapTextContext.h" #include "GrDrawTarget.h" #include "GrDrawTargetCaps.h" #include "GrF...
1e47b117a18c3bb7da3184e30d334e23ef15e76e
efcd75e1e45a58069b51afa2805ad7d2c99ef77e
stephane-lb/LearnOpenGL
/src/4.advanced_opengl/10.instancing/instancing_asteroids_instanced.cpp
C++
cpp
9,184
no_license
// GLEW #define GLEW_STATIC #include <GL/glew.h> // GLFW #include <GLFW/glfw3.h> // GL includes #include <learnopengl/shader.h> #include <learnopengl/camera.h> #include <learnopengl/model.h> // GLM Mathemtics #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <le...
cd93d23fe1d9aa35740dbd121a1cc18e8e998c1d
62b9bd012e0a9060f4921c60293dcdf3b8f1e013
akshit-g/21DaysOfCode-2021
/Yash2110-Yash/OperatorOverloading(HR-problem)/OperatorOverloading_hr.cpp
C++
cpp
1,183
no_license
//Operator Overloading #include<iostream> using namespace std; class Complex { public: int a,b; void input(string s) { int v1=0; int i=0; while(s[i]!='+') { v1=v1*10+s[i]-'0'; i++; } while(s[i]==' ' || s[i]=='+'||s[i]=='i') {...
223c987246f67f14e1ef1a04d73a1b91d49da86c
30d903c93bb2945fcbecf96d5bb44c754f8ae190
saipraveenb25/cuda-raytracer
/src/dynamic_scene/widgets.cpp
C++
cpp
17,984
no_license
#include "widgets.h" #include "mesh.h" #include "skeleton.h" #include "joint.h" #include <sstream> using std::ostringstream; using namespace CMU462; using namespace DynamicScene; XFormWidget::XFormWidget() { target.object = nullptr; target.element = nullptr; objectMode = false; transformedMode = false; joi...
dd493bcef6f26cba7fca9833771ecb165d9680c7
2899bdf944be282692b6eaf58b60363eb1e4849a
rll/bulletsim
/src/perception/sparse_array.cpp
C++
cpp
1,485
no_license
#include "sparse_array.h" #include <boost/foreach.hpp> using namespace std; using namespace Eigen; SparseArray toSparseArray(MatrixXf in, float cutoff) { SparseArray out(in.rows()); for (int row = 0; row < in.rows(); row++) { for (int col = 0; col < in.cols(); col++) { if (in(row,col) > cutoff) out[row]....
0e243e4c804e72f496f981ff40536e081909a073
fd046884f0305465f01977d9f3e72b4484fae217
SharkyZg/RoboND-DeepRL
/gazebo/ArmPlugin.cpp
C++
cpp
16,059
permissive
/* * Author - Dustin Franklin (Nvidia Jetson Developer) * Modified by - Sahil Juneja, Kyle Stewart-Frantz * */ #include "ArmPlugin.h" #include "PropPlugin.h" #include "cudaMappedMemory.h" #include "cudaPlanar.h" #include "dqnAgent.h" #define PI 3.141592653589793238462643383279502884197169f #defi...
5393a430ad97d7c8d24aa4778d2a9f0b361e4438
7277e78ede7b1cf3e16cd517bed1ac85f658e3d9
Alsaka-No-One/R-Type
/lib/system/spawner/SpawnLib.hpp
C++
hpp
692
no_license
/* ** EPITECH PROJECT, 2020 ** B-CPP-501-PAR-5-1-rtype-gaetan.depin ** File description: ** SpawnLib */ #ifndef SPAWNLIB_HPP_ #define SPAWNLIB_HPP_ #include "Spawner.hpp" #include "engine/ILibCreator.hpp" namespace ecssystem { class SpawnLib: public engine::ILibCreator { public: SpawnLib() {}; ~...
219def71b044d5d8c5491692295dfac15b7bb4a7
e94a78eb2754ec6b44858cc03b383cb124c00c2e
romanzes/chromium
/content/browser/renderer_host/mixed_content_navigation_throttle.cc
C++
cc
15,846
permissive
// Copyright 2017 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 "content/browser/renderer_host/mixed_content_navigation_throttle.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h"...
5c3d29b3c299af2fef74758eda97e0f93fe22f80
e523d8bd59d11937292cc4db4b136ada6a5f023d
Ourobore/CPP-Modules
/CPP-05/ex01/Bureaucrat.hpp
C++
hpp
1,824
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Bureaucrat.hpp :+: :+: :+: ...
18448042827f1bdf8084cec4c30a9184920c78c5
a361867c5d43bed2f708ccf4c97b342cd4b8d641
animeshd9/college-books
/3rd_year_assignment/circle.cpp
C++
cpp
251
no_license
#include<iostream> using namespace std; template <class T> T Area(T radius){ return 3.14 * (radius*radius) ; } int main (){ float r; cout<<"Enter the radius of the circle: "; cin>>r; cout<<"area is "<<Area(r)<<endl; }
b8e2eda26ec7f54203b654ad9e032fbc70042aa2
3978844534a64231c2aab0a134f06a24a755b9d4
Yutaro-Ono/TND
/Source/Helicopter.cpp
C++
cpp
3,801
no_license
//--------------------------------------------------------------+ // ヘリコプタークラス //--------------------------------------------------------------+ #include "Helicopter.h" #include "HeliBody.h" #include "HeliRotorMain.h" #include "HeliRotorBack.h" #include "HeliSpotLight.h" #include "PatrolComponent.h" #include "GameWorld...
c3e57be90e5ef831f8faefa02767078bc88e501e
993e343875870e82f9895dd792e4c771a098de1b
navy1125/cppstudy
/coretest.cpp
C++
cpp
334
no_license
#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <iconv.h> #include <errno.h> #include <string.h> int main () { //char in_string[] = "\xB6\xE2ʸ\xC2\xCE"; char in_string[] = "王海军"; char * out_string = NULL; out_string[1]='1'; printf ("Final iconv output: %s\n", out_string); retur...
ee03d2a70f8bf227e0c6b041f42683d7dbb76f38
ff298fa71315ce9fceaf59c264fc73e671b49ebe
yashar-sb-sb/my-codeforces-submissions
/800-899/878/(31773744)[OK]B[ b'Teams Formation' ].cpp
C++
cpp
1,586
no_license
#include<bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long uLL; typedef long double ldb; typedef pair<int,int> pii; int A[100000]; int main() { ios_base::sync_with_stdio(0);cin.tie(0); int n, k, m; cin>>n>>k>>m; for(int i = 0; i < n; ++i) c...
0b71f106a22f89e61379e496ee012a7f77af948a
d6ea6d1cfbded535d0850490e45870df4ff737c9
yosupo06/library-checker-problems
/math/kth_term_of_linearly_recurrent_sequence/sol/naive.cpp
C++
cpp
540
permissive
#include <iostream> #include <vector> using namespace std; constexpr long long MOD = 998244353; int main() { long long n, k; cin >> n >> k; if(n > 1000) exit(1); if(k > 1000) exit(1); vector<long long> a(max(n, k) + 1), c(n + 1); for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 1; i <= n...
ba102e1c676b98a4761b19a0f11354fc90c76edd
ccb1ea43a04b86f4c8a4c27ca9eeaddd84906172
Giosh99/Programmazione_2
/esClasse/04_telefono/telefono.cpp
C++
cpp
1,181
no_license
#include "telefono.h" #include <iostream> telefonata::telefonata(){num=0;} telefonata::telefonata(const orario& i, const orario& f, char* n){ inizio=i; fine=f; num=n; } orario telefonata::Inizio() const{return inizio;} orario telefonata::Fine() const{return fine;} const char* telefonata::Numero() const{return...
07fc74d0299ac681361c8213fc0b7aa8329c9c69
6b4d7c19a111e47470457da40afa0777029e1e6c
ScSofts/ReUX
/utils/ldbin.cc
C++
cc
1,124
no_license
#include <stdlib.h> #include <string.h> #include <string> #include <iostream> #include <vector> #include<windows.h> void help(); inline std::string get_path(); int main(int argc,char *argv[]){ std::vector<std::string> args(argv,argv+argc); if(args.size() < 3){ help(); }else{ std::string pat...
9a2b3bbe52532b9e4447f45a8a79b1998f5bf9cf
01b90d65d451964150ad791ae5e786d485a224e3
barug/cpp_indie_studio
/source/components/ModelComponent.hh
C++
hh
1,715
no_license
// // ModelComponent.hh for indie studio in /home/barthe_g/rendu/tek2/c++/cpp_indie_studio/source // // Made by Barthelemy Gouby // Login <barthe_g@epitech.net> // // Started on Mon May 2 16:51:48 2016 Barthelemy Gouby // Last update Fri Jun 10 20:26:15 2016 Thomas Bogard // #ifndef _MODEL_COMPONENT_HH_ # define _...
3624dae1055be3fc4ce7ea6aca9dda12f5185161
3dc7db940cf6ba556b46590d71ff0ef70ba9834b
juarezpaulino/coderemite
/problemsets/Codejam/2010/ROUND 1B 2010/PA/PA.cpp
C++
cpp
4,112
permissive
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream>...
7f78b321a985e154ec0866c6c9214fa522c03913
ef2b94d463b443e1c9aeb11dd6db71521efe0aee
ideallx/serveree
/QtClassClient/LayerUI/UserInterface/csettingsbutton.cpp
C++
cpp
1,252
no_license
#include <QMenu> #include <QVBoxLayout> #include <QBitmap> #include "csettingsbutton.h" CSettingsButton::CSettingsButton(QWidget *parent) : QToolButton(parent) { setPopupMode(QToolButton::InstantPopup); menuCreate(); connect(ui->exitButton, &QToolButton::clicked, qApp, &QApplication::quit)...
30cd595ae72dd2e4943db97b33bdb5a8d4b9d6a6
126ced7e45ef8955e2a57c0be03484750cc2aaff
wmy-one/C--projects
/学生信息管理系统(初始版).cpp
C++
cpp
9,019
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> struct stu //定义结构体类型 {char no[10]; //学号 char name[10]; //姓名 char math[10]; //数学成绩 }st[10]; int menu(); int input(); void save(int); int display(); void del(); void add(); void search(); void search_no(); void modify(); void...
42d45bfd6cb8fd7b7e3b9d957faf8c61482e7603
95a94913d6aaddf7ea6e1140c57401d30dda0b1e
ferec/AndamBus
/arduino/andamBus/TimeGuard.cpp
C++
cpp
1,315
no_license
#include "TimeGuard.h" #include <Arduino.h> #include "util.h" #include "ArduinoAndamBusUnit.h" TimeGuard::TimeGuard(uint8_t _pin):lastSwitch(0),tgPortId(0),noSwitchPeriod(1) { setTGPin(_pin); } void TimeGuard::setTGPin(uint8_t _pin) { pPin = _pin; if (pPin > 0) { pinMode(pPin, OUTPUT); digitalWrit...
3d6155f422594f60ce1b955314e1a47b24274007
46805b71d9241dc036ded4043051a0139593052f
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13839/function13839_schedule_11/function13839_schedule_11_wrapper.cpp
C++
cpp
859
no_license
#include "Halide.h" #include "function13839_schedule_11_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){Halide::Buffer<int32_t> buf0(64, 128, 64, 64); init_buffer(buf0, (int32_t)0); ...
5cd17cd7e84154c66cb936c1200e04cfe5370ea7
c0189edf026fab1fbac3d33c32b14ff706050e2d
rhythmus-emulator/rhythmus
/src/object/Dialog.cpp
C++
cpp
3,074
no_license
#include "Dialog.h" #include "common.h" namespace rhythmus { Dialog::Dialog() : dialog_type_(DialogType::kOkDialog), title_height_(0), button_height_(0) { memset(&padding_, 0, sizeof(padding_)); } Dialog::~Dialog() {} void Dialog::Load(const MetricGroup &metric) { // Add childs with fixed member AddStatic...
79e15842bd864e912268aa8cc3bdee5ed53cfea6
1da05543d2472719f4629f73fdb6ff428908b864
clangen/musikcube
/src/musikcube/app/layout/MainLayout.cpp
C++
cpp
12,121
permissive
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004-2023 musikcube team // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redist...
1ae402d02178d2763d0a513883645fe62bf615b4
d850a8810654bc6169b4dcfb7850f672e8bbd747
DassiShenkar/ConsoleForm
/Form/Control/Control.cpp
C++
cpp
3,433
no_license
#include "Control.h" #include <iostream> using namespace std; Control* Control::globalControlInFocus = 0; void Control::Show() { if (!isVisible) isVisible = true; } void Control::Hide() { if (isVisible) { isVisible = false; } } //A method that determines what type of key was pressed Keys Control::deter...
f4f7d6ce44c26a70c541dadf74fa743212b6febe
60240f21490ee380d4c7c3b8b97a394f1f957d5d
denis-gubar/Leetcode
/all/1466. Reorder Routes to Make All Paths Lead to the City Zero.cpp
C++
cpp
611
no_license
class Solution { public: int minReorder(int n, vector<vector<int>>& connections) { int result = 0; vector<vector<int>> connectivity(n); for (vector<int> const& conn : connections) { connectivity[conn[0]].push_back(conn[1]); connectivity[conn[1]].push_back(n + conn[0]); } int V = 0; queue<int> Q; ...
bfa98c6c3f51bc619afb58353cf7f919f9f93d4d
9064b4749652d9b39e0c8368d6c210fa770b2814
NazaraEngine/NazaraEngine
/src/Nazara/Graphics/LinearSlicedSprite.cpp
C++
cpp
4,951
permissive
// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Graphics module" // For conditions of distribution and use, see copyright notice in Config.hpp #include <Nazara/Graphics/LinearSlicedSprite.hpp> #include <Nazara/Graphics/ElementRendererRegistry.hpp> #includ...
493a199f1b9b396c0afb9f00dfc60a430566d42d
e08e64c0f1b30524105434db06746a88a0e58a31
isabella232/wuffs
/example/cbor-to-json/cbor-to-json.cc
C++
cc
29,840
permissive
// Copyright 2020 The Wuffs Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed...
96a166f84db2acfd300b0448bdd5058bc67de5f0
359dcfe60a6364621bc74fd33aa7fd8b3ada3d9e
TrellixVulnTeam/Chromium_7C66
/remoting/tools/javascript_key_tester/pnacl/remoting_key_tester.cc
C++
cc
4,848
permissive
// Copyright (c) 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <string> #include "ppapi/cpp/input_event.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/var.h...
153f53439127351cbfe1d37db83000e6a93ed53d
85a24ef5f29b3a97443c7f6280c338b79f5ecd9a
TiagoAFontana/ophidian
/test/standard_cell/standard_cell_test.cpp
C++
cpp
3,054
permissive
#include <catch.hpp> #include <ophidian/standard_cell/StandardCells.h> using namespace ophidian::standard_cell; namespace { class StandardCellsFixture { public: std::string cell1Name, cell2Name; std::string pin1Name, pin2Name; PinDirection pin1Direction, pin2Direction; StandardCellsFixture() : cell1Name("cell...
7ac22bcd85a8ce2ae7b150d604d0c957be2e9870
6611b1b52b88dd38e7722686ed12b6c560d0dbeb
OpenRhythm/OpenRhythm
/src/game/game.cpp
C++
cpp
22,866
permissive
// Copyright (c) 2015-2017 Matthew Sitton <matthewsitton@gmail.com> // See LICENSE in the project root for license information. #include "config.hpp" #include "game.hpp" #include <glad/glad.h> #include <iostream> #include <stdexcept> #include "filesystem.hpp" #include "resolver.hpp" namespace ORGame { const floa...
d65a81bd368dccbb12a7cc1e72f241616b40ba5e
10466a27cce60d5feee1a9e518643f56e15fdc0c
tangYuuuuu/swift
/lib/AST/TypeCheckRequests.cpp
C++
cpp
54,982
permissive
//===--- TypeCheckRequests.cpp - Type Checking Requests ------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LI...
bc98560fb2c9c4d29c6ee6b42bf3dcabb34e7ceb
67335bae500dcbc13380562ffb603f3fff60d0c2
BrandeisMakerLab/Robotics_ZumoAutomation
/MusicPlayer.cpp
C++
cpp
1,032
no_license
/*Written by Jacob Smith for Brandeis Robotics club Allows ZumoShield and Zumo 32U4 robots to play music with their buzzers Uses ZumoBuzzer xample as a template fo array of notes March 3 20219 2018 https://stackoverflow.com/questions/38837859/cannot-convert-brace-enclosed-initializer-list-to-double-in-return?rq=1 ...
ebfc3ef7d170cdeae929c50c5ecb7db5a1fb97d9
11aaa13d683852d5a5206407bc8cca5c7caac4cd
FabulaM24/JurassicParkTrespasserAIrip
/jp2_pc/Source/Lib/GeomDBase/WaveletDataFormat.hpp
C++
hpp
7,342
no_license
/*********************************************************************************************** * * Copyright © DreamWorks Interactive. 1997 * * Contents: * Classes describing the format of the binary wavelet transformed data. * * Bugs: * * To do: * *********************************************************...
73aa4ad590db4a749a0ae7ea5b04b1d5d01ad537
828ff370c82f5179c8410a9f1a1fd8e07f762013
kendall0103/ProyectoProgra2
/probandoGit/probandoGit/probandoGit.cpp
C++
cpp
811
no_license
// probandoGit.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> int main() { std::cout << "Hello MAU!\n"; } // Run program: Ctrl + F5 or Debug > Start Without Debugging menu // Debug program: F5 or Debug > Start Debugging menu // Tips for Getting Star...
58f09ef4bea67ba8705ee19c4ca932f59ee0af98
571af851e97f32e69cbb06d93db2452cda66b0d1
microflo/microflo-core
/components/Gate.hpp
C++
hpp
869
permissive
/* microflo_component yaml name: Gate description: "Pass packets from @in to @out only if @enable is true" inports: in: type: all description: "" enable: type: boolean description: "" outports: out: type: all description: "" microflo_component */ class Gate : public SingleOutputComponent {...
23f1039f3238e041ecf61560a3ae2cf57aa88724
effe2fba743e68c147acce39eba90f6d9ba73204
Sredeption/TrenchantTracer
/src/main.cpp
C++
cpp
4,155
no_license
#include <GL/glew.h> #include <GL/glut.h> #include <iostream> #include <cuda_gl_interop.h> #include <core/Camera.h> #include <core/Renderer.h> #include <control/Controller.h> #include <loader/HDRLoader.h> #include <loader/OBJLoader.h> #include <util/Config.h> #include <bvh/BVH.h> #include <loader/SceneLoader.h> #incl...
ca6cbf1711f9306bb9ef6b3f8ba8d36a1b648d6c
f8fddf1b0a2c7b0eefaa0e7dd550594cc274b91b
NicoNox/khromium
/services/network/network_context.cc
C++
cc
110,554
permissive
// Copyright 2017 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 "services/network/network_context.h" #include <memory> #include <string> #include <utility> #include "base/barrier_closure.h" #include "base/ba...
f773a902bb2869d190972f718c13ddec34ff1d75
1c2835dd477d45194b7dc0cf3e538fa8d25ed1e3
spinute/m1w-m5
/DSL_2_B.cc
C++
cc
572
no_license
#include <iostream> #include <algorithm> using namespace std; int BIT[1000007], bit_size; void init_bit(int n) { fill(BIT, BIT+n, 0); bit_size = n; } int calc_sum(int n) { int ans = 0; while (n > 0) { ans += BIT[n]; n &= n-1; } return ans; } void add_bit(int n, int v) { while (n <= bit_size) { BIT[n] ...
b84abd0de6a84a06dcb7ca3faca60c4039e78e53
4162f76b29c6674fd7bab69d75270fac93a7ac6a
cjhgo/leetcode
/others/lcs.cpp
C++
cpp
2,481
no_license
#include <iostream> class Solution { public: int lcs_iteraion(char const * A, char const * B, int m, int n) { int lcs [m][n]; for(int i = 0; i < m; i++) for(int j = 0; j < n; j++) { if(i == 0 || j == 0) { if( i== 0 && j == 0) lcs[0][0] = A[i] == B[j]; if( A[i] == B[j]) ...
df4e7d4c32fdd5f489459898f26ee19a327ce12b
be71b5c0596854c625d5bd6b65c93aa16e0d2cb3
DrPizza/advent-of-code
/aoc/src/2017/day-7.cpp
C++
cpp
3,278
permissive
#include "stdafx.h" #include "problem.hpp" #include "utility.hpp" #include <fstream> #include <regex> #include <unordered_map> #include <vector> #include <boost/algorithm/string.hpp> #pragma warning(disable: 26495) // warning C26495: Variable '%s' is uninitialized. Always initialize a member variable (type.6). str...
edd270ccc360b6407668a0d2977a9c0429eb07ef
1240ce843cc578de4e40fe0b2c8d7d4b9ca63e44
raal00/Cpp-neural-network
/Main.cpp
C++
cpp
10,719
permissive
//******************************************// //**Program's type: AI**********************// //**Programmer: Raal************************// //**Language: C++ VS************************// //**Created: 02.02.2019*********************// //**Last update: 20.02.2019**************** // //************************************...
62b2195390c42f6fdd97733f833e39344d3c9eeb
f051480c983d99c45e279466160a0719508b288d
AlkaYadav/Companies
/workspace0/WALMART/src/insertSpaces.cpp
C++
cpp
723
no_license
/* * insertSpaces.cpp * * Created on: Oct 14, 2015 * Author: user */ #include <iostream> #include<vector> #include<algorithm> #include<bits/stdc++.h> using namespace std; void printSpacesBetweenString(char str[],char buff[],int index,int ind_buff,int len){ if(index==len){ buff[ind_buff]='\0'; for(int i...
0f0634826e2083051c2868c840f2cfba5ca391d4
df516b23864a6b72c8b9d3caa4edc4d737ec6bd9
yj5243/studyAlgo
/test4.cpp
C++
cpp
351
no_license
#include <stdio.h> #include <stdlib.h> #include <algorithm> #include <string.h> int main() { freopen("test4.txt","rw",stdin); setbuf(stdout, NULL); int count = 0; scanf("%d", &count); for( int i=1;i<=count;i++) { if(i%3 == 0) printf("x"); else printf("%d", i); printf("...
0949a209709fe265e5912c0b24948dfdb3b27e28
b4d6786344b22fa70dbb3b9dd89f4a671d323bc8
skygaofei/Code
/Luogu/P1143 进制转换.cpp
C++
cpp
811
permissive
// luogu-judger-enable-o2 #include <iostream> #include <string> #include <cmath> #include <bits/stdc++.h> #include <cstdio> #include <cstdlib> using namespace std; int main() { int n; scanf("%d",&n); char a[1010]; int s[1010]; char *stop; scanf("%s",a); int m; scanf("%d",&m); int c; ...
49bbfd9791a445a2da6326a9f0a94cd35e3efcac
dafb580dd88f863ed6f23f746c5da4b60d21f7df
shenjunHZ/TTS_Demo
/src/applications/ClientReceiver.hpp
C++
hpp
1,017
no_license
// // Created by junshen on 9/30/18. // #pragma once #include <queue> #include "logger/LoggerFwd.hpp" #include "configurations/AppConfiguration.hpp" #include "socket/ClientSocket.hpp" #include "socket/ISocketSysCall.hpp" #include "socket/IDataListener.hpp" #include "TimerService.hpp" namespace applications { cla...
3a8515ea79de500f1862290a43faf21b8c62f470
e93af8e58061f475a2e7a7fd264f9ef0c8c2fa18
kevinmiles/Xarmlib
/source/targets/LPC84x/lpc84x_interrupts.cpp
C++
cpp
11,897
permissive
// ---------------------------------------------------------------------------- // @file lpc84x_interrupts.cpp // @brief IRQ handlers and vector table for NXP LPC84x MCU. // @date 9 July 2018 // ---------------------------------------------------------------------------- // // Xarmlib 0.1.0 - https://github.com...
7d4900561062a44af49524c57bf2e0ebe252c98d
dc41d8b6b835d44bfc07db9d29aefae82faa8e0b
jjkotni/gem5-master
/src/mem/cache/replacement_policies/brrip_rp.cc
C++
cc
5,123
permissive
/** * Copyright (c) 2018 Inria * 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, this list of conditions and the fol...
5c8a1cf37662d19e4c830ad1bc8f511031aab3fb
6218711e9f626e2d0f350f3258319a4b08706217
pikacsc/CodingTestPrac
/BAEKJOON_2864_the_difference_of_5_and_6/2864_the_difference_of_5_and_6.cpp
C++
cpp
1,853
no_license
/* https://www.acmicpc.net/problem/2864 문제 상근이는 2863번에서 표를 너무 열심히 돌린 나머지 5와 6을 헷갈리기 시작했다. 상근이가 숫자 5를 볼 때, 5로 볼 때도 있지만, 6으로 잘못 볼 수도 있고, 6을 볼 때는, 6으로 볼 때도 있지만, 5로 잘못 볼 수도 있다. 두 수 A와 B가 주어졌을 때, 상근이는 이 두 수를 더하려고 한다. 이때, 상근이가 구할 수 있는 두 수의 가능한 합 중, 최솟값과 최댓값을 구해 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 두 정수 A와 B가 주어진다. (1 <= A,B <...
4714aa55498e04267cb3f563ae3f8e3e92ebd43f
8331c3f210409f94ff74ecd52e7ff389761870aa
YureVieira/AVR
/I²C/i2c85/i2c85/Wire.cpp
C++
cpp
16,109
no_license
/* Biblioteca usa funções e definições da biblioteca USI_TWI_Master da atmel. */ #include "Wire.h" #include "usiTwiSlave.h" #include <avr/io.h> #include <avr/interrupt.h> #include <util/delay.h> //********** Defines **********// // Defines controlling timing limits #define TWI_FAST_MODE #define SYS_CLK 4000.0 // ...
83940830793302833ef283fffa43ed1be162b82a
c97e53cf8505e12c996835571dec5225b5c4f9c7
apache/nifi-minifi-cpp
/libminifi/src/c2/C2Payload.cpp
C++
cpp
4,581
permissive
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you ...
041d306acab615f5bf8487fb52d7f1801a20122c
f71a0e23b407937f944f7e5709550c7ecf2719fc
chunchou/ACM
/图论/差分约束系统/poj 1275.cpp
C++
cpp
4,270
no_license
/* 数据貌似有误。。。二分上限设置成inf死都过不了。。。 详细解释一下。 为避免负数,时间计数1~24。令: R[i] i时间需要的人数 (1<=i<=24) T[i] i时间应聘的人数 (1<=i<=24) x[i] i时间录用的人数 (0<=i<=24),其中令x[0]=0 再设s[i]=x[0]+x[1]+……+x[i] (0<=i<=24), 由题意,可得如下方程组: (1) s[i]-s[i-8]>=R[i] (8<=i<=24) (2) s[i]-s[16+i]>=R[i]-s[24] (1<=i<=7) (3) s[i]-s[i-1]>=0 (1<=i<=24) (4) s[i...
3cf768e0b9da895a7694c668998190dd7e2395fc
fb8ab11e1c429734b17b531d04c182677d689b06
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-17496.cpp
C++
cpp
2,807
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 : virtual...
0adc337db6420cf522d4b6711d48fcacc0b579d2
5dce66c2af06a5d3ed60595fe50e5e93574714bf
bashell/Cpp-Primer
/ch10/ex10_31.cc
C++
cc
499
permissive
#include <iostream> #include <vector> #include <algorithm> #include <iterator> using std::cin; using std::cout; using std::endl; using std::vector; using std::sort; using std::unique_copy; using std::istream_iterator; using std::ostream_iterator; int main() { istream_iterator<int> in_iter(cin), eof; ostream_itera...
583d29e3d7c666a2a149383c4858294102eed9f5
234381655974728f86d4b41ff84f399acafcafd5
bathepawan/chromium
/chromeos/components/sample_system_web_app_ui/sample_system_web_app_ui.cc
C++
cc
1,888
permissive
// Copyright 2019 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 "chromeos/components/sample_system_web_app_ui/sample_system_web_app_ui.h" #include <memory> #include "chromeos/components/sample_system_web_app...
fdeb8b4140bf29f6e07f49bfa2cd3b103f18116a
27327239817af4e0967bdecfebdd4ae419de6715
obsolescenceL/obsolescenceL
/training/16_4_3/codeforces510B.cpp
C++
cpp
1,719
no_license
/************************************************************************* File Name: F.cpp ID: obsoles1 PROG: LANG: C++ Mail: 384099319@qq.com Created Time: 日 4/ 3 15:16:39 2016 ************************************************************************/ #include<cstdio> #include<cstrin...
dc13232ce1fd7f3e76e131f41b96d35ee1a4ad9e
abb1e3a8cf7c9f21d5441c352c267c27b90bb05f
skybarer/codeforces
/A_Equalize_Prices_Again.cpp
C++
cpp
533
no_license
#include <bits/stdc++.h> #include <iostream> using namespace std; #define endl "\n" void fastIo() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void solve() { int n; cin >> n; long arr[n]; long sum = 0; for (int i = 0; i < n; i++) { cin >> arr[i]; sum += arr[...
c033a62df35f019c578b5789191027742e8ba675
4c89efe21f5e917669474942080b0b10354dcdc2
Mumbaikar007/Code
/CodeForces/DFS/Test.cpp
C++
cpp
1,299
no_license
// // Created by optimus on 22/12/17. // #include <bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); typedef long long ll; #define mod 1e9+7 const int N = 3e5 + 5; int n , m , k; set <int> nodes; set < int > v[N]; int cnt; int a , b; int sz; bool can...
bd82a28544466bacdd41871dc9948ede60145017
b40e7b2af7be794ea6469b9c44f5d797d0dca5b7
YoussefFekky/BattleTanks
/Source/BattleTanks/TankPlayerController.cpp
C++
cpp
2,008
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "TankPlayerController.h" #include "TankAimingComponent.h" #include "Tank.h" #include "GameFramework/Actor.h" #include "Engine/World.h" void ATankPlayerController::BeginPlay() { Super::BeginPlay(); AimingComponent = GetPawn()...
d73f234c1d2c5774de5616142f836a4e48908648
5d7b761432680310aca6ee162fc57a1c28cf1e6d
clowncrew/jokecoin-DASH-old
/src/qt/askpassphrasedialog.cpp
C++
cpp
12,596
permissive
// Copyright (c) 2011-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) #include <config/jokecoin-config.h> #endif #i...
775db1a0e538da069eb551c13d5d26b298ead6da
114ec91f01c511190a34948a0a80050967e8d933
tcargile/Classwork
/Non-resume/Spring 2014/CS 530/Program 3/file_parser.cc
C++
cc
6,572
no_license
/* Nathan Purta, Trevor Cargile, Ahmad Algharabally, Mharvinn Calitis masc1235 prog1 CS530, Spring 2014 */ #include "file_parser.h" #include "file_parse_exception.h" using namespace std; //Constructor file_parser::file_parser(string name) { filename = name; } //Destructor file_parser::~file_parser() {} //File ...
fa1d7c9dd9346393917f23baef4b90e2124df0bb
e0516c26963aec539deaf920859b9ee2bce17c90
navin2608/c-plus-plus
/structure & unions/TM08-Project/Employee recordq2/main.cpp
C++
cpp
3,795
no_license
#include<iostream> #include<cstdio> #include<cstdlib> using namespace std; struct EMP { int emp_id; string emp_name; EMP *next, *prev; }; EMP *head=NULL,*tail=NULL; int addNode() { struct EMP *s, *temp; temp = new(struct EMP); cout<<"Enter employee id:"<<endl; cin>>temp->emp_id; cout<<"Ent...
9e52e3a5f13b858ceb1f1570848811525a7c29d1
bfe6c52064be598b115ab22a6b12de5ed2bf78ec
cs1730/syscalls-2017-spring
/cpp/forkexec.cpp
C++
cpp
631
permissive
#include <iostream> #include <iostream> #include <unistd.h> #include <cerrno> #include <cstdlib> using std::cout; using std::endl; void print_banner() { for (int i = 0; i < 80; ++i) cout << "#"; cout << endl; } // banner int main(const int argc, char * const argv []) { if (argc > 1) { const char * filenam...
9980fda395f5a173f85bac7312e6c3a37d3526fa
864adfa13431bee015e74f3de8a1776b6f1db47f
tarballz/CMPS104A
/4asg/lyutils.cpp
C++
cpp
1,965
no_license
// Payton Schwarz, peschwar@ucsc.edu // Alexus Munn, ammunn@ucsc.edu #include <assert.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "auxlib.h" #include "lyutils.h" bool lexer::interactive = true; location lexer::lloc = {0, 1, 0}; size_t lexer::last_yyleng = 0; vector<strin...
d2b3c2fd93a1ebf9cbd9931422f0a3ebf74d32e4
811918a3e38820d1a69ca1c13a7948d008f0a0eb
henriwoodcock/armnn
/src/profiling/test/TimelinePacketTests.cpp
C++
cpp
37,254
permissive
// // Copyright © 2019 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include <Threads.hpp> #include <ProfilingUtils.hpp> #include <armnn/utility/NumericCast.hpp> #include <common/include/SwTrace.hpp> #include <boost/test/unit_test.hpp> using namespace armnn::profiling; BOOST_A...
c9123d922793028efd0064a0104b706242dd904e
2577d25d9cf17edc3bb498be7d51c1404d25b7b0
Mitya1983/Database_client
/main.cpp
C++
cpp
306
no_license
#include <iostream> #include <chrono> #include <string> #include "database_client.h" using namespace std; int main() { boost::asio::io_context service; std::string IP = "127.0.0.1"; string port = "9090"; Database_client client(service, IP, port); client.startShell(); return 0; }
02a2b15efb4fe52539675262252c70e44b4ad522
8a7fc1de3e80245533f69e555f368159e37461d3
seblee/angle
/src/libGLESv2/entry_points_egl_ext_autogen.cpp
C++
cpp
54,899
permissive
// GENERATED FILE - DO NOT EDIT. // Generated by generate_entry_points.py using data from egl.xml and egl_angle_ext.xml. // // Copyright 2020 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. // // entry_points_egl_ext...
aa4631fa9ff0904541a33ac17cab62bcd41f7972
7a859e8f0e62fac9f0ed4a897feb74ca0ce55f9b
phoenixxxx/xgl
/tools/cache_creator/units/cache_creator_units_main.cpp
C++
cpp
1,659
permissive
/* *********************************************************************************************************************** * * Copyright (c) 2021 Google LLC. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation fil...
087799e1e6cc8ecf0fff64b1bc05de699904d179
d6909e14b633df4a7ab57f6bdb29c2745535b51e
uderos/sk02
/sk02_lib/SimpleSolver.cpp
C++
cpp
645
no_license
#include "stdafx.h" #include "Board.h" #include "CellRefSet.h" #include "SimpleSolver.h" #include "RuleCandidateTuples.h" #include "RuleUpdateCandidates.h" SimpleSolver::SimpleSolver() { rules_.emplace_back(std::make_unique<RuleUpdateCandidates>()); rules_.emplace_back(std::make_unique<RuleCandidateTuples>()); } Si...
8f93a4f2320ce1bc31484818261b6bde076403d5
b25cd01c7a553ca191fe0e76383a42bd9f44280a
ZelimDamian/Torque6
/src/3d/entity/entityTemplateAsset.cc
C++
cc
3,884
permissive
//----------------------------------------------------------------------------- // Copyright (c) 2015 Andrew Mac // // 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, inc...
41992e7a1f34dad0e9659c91829306255db2800d
b31b773f56b3e8c4677c76a28c03aa2b4770bba0
jjzhang166/benchUI
/samples/coverage/es20-depthmask.cpp
C++
cpp
1,629
no_license
/* ================================================================= * Copyright (c) 2019 Botson Corp * Botson Confidential and Proprietary * * ================================================================= */ /** * @file depthmask.cpp * @author Otto.Liu * @par History: * A001: Otto.Liu, 2019-08-26, Add c...
40cd5107a6b6f642e6fb6ef81d95c0f4ac992674
5ce2314c0677bbbd20e5181a56af98f21e838594
sleebapaul/udacity-cpp
/pointers/pointers.cpp
C++
cpp
1,484
no_license
#include <iostream> using namespace std; int main() { int a; int *p; a = 5; p = &a; cout << "Value of variable a: " << a << "\n"; cout << "Address of variable a: " << &a << "\n"; cout << "Value at pointer variable p: " << p << "\n"; cout << "Address of pointer p: " << &p << "\n"; c...
97b85e5a382e61f423450ca46ccc411cd0a7af9f
11921fa76fc67e108bbaee66c42ae226f8d7be24
gringolito/rocksdb-test
/test/server.cc
C++
cc
1,363
permissive
// Copyright (c) 2019 Filipe Utzig <filipeutzig@gmail.com> // // ---------------------------------------------------------------------------- // "THE BEER-WARE LICENSE" (Revision 42): // <filipeutzig@gmail.com> wrote this file. As long as you retain this notice // you can do whatever you want with this stuff. If we mee...
e03a5c02074695d82600429ec5717d820b3890bb
8ef596ff20568c07b4a951322fae9c33b8e579ec
NoiZeR355/libqi
/src/messaging/streamcontext.cpp
C++
cpp
4,264
no_license
/* ** Copyright (C) 2014 Aldebaran Robotics ** See COPYING for the license */ #include <boost/algorithm/string.hpp> #include "streamcontext.hpp" namespace qi { StreamContext::StreamContext() { _localCapabilityMap = StreamContext::defaultCapabilities(); } StreamContext::~StreamContext() { } void StreamContext:...
a65a6ef9f5cf7e78c8719f07033e1ae6c8c258be
dd1ad86191c77be7ac1fb4174cfd484cb6a9b0e5
ip821/model-libs
/layout/LayoutPainter_TextMultiColumn.cpp
C++
cpp
302
no_license
#include "stdafx.h" #include "LayoutPainter.h" #include "LayoutBuilder.h" #include "GdilPlusUtils.h" #include "Metadata.h" STDMETHODIMP CLayoutPainter::PaintTextMultiColumn(HDC hdc, IColumnsInfoItem* pColumnInfoItem) { RETURN_IF_FAILED(PaintContainer(hdc, pColumnInfoItem)); return S_OK; }
7acb04d521eb0b722cef3cc2e7d7ba76f5ef57c7
4cf5ec8550895aa0236eeaa726717cc377a2c825
NeoTim/hiphop-php-docker
/src/hiphop-php/hphp/runtime/ext/ext_error.ext_hhvm.cpp
C++
cpp
22,465
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) | | Copyrigh...
13a3df48c2dd705c49301abe4ed4ce2f312ac715
9a9d8656828446e08eb3eaaba3581dedea8d08b3
quarkslab/arybo
/petanque/tests/simp_remove_dead_ops.cpp
C++
cpp
1,701
permissive
#include <pa/simps.h> #include <pa/symbols.h> #include "tests.h" using namespace pa; static int check(Expr const& e, Expr const& ref) { return check_expr(e, ref, &pa::simps::remove_dead_ops); } int main() { // simplify will sort the arguments of add and mul operations and remove // duplicates. int ret = 0; ...
99c66b0f60c3fd7340b6bf98a4c504b9f9d9bffe
a7572feb87591af92bdb5d8869b98dcf30cfe11b
oleorhagen/mender
/common/crypto.hpp
C++
hpp
2,443
permissive
// Copyright 2023 Northern.tech AS // // 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 ...
0283423f343abd08ef8b20f7f1353a63027719ac
ea2173f42dee42a09ae356a9d0ee1aee4946e12a
cedinu/tsduck-mod
/src/libtsduck/dtv/descriptors/tsHEVCHierarchyExtensionDescriptor.cpp
C++
cpp
8,438
permissive
//---------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2005-2023, Thierry Lelegard // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the f...
bb8b6ee448b63548cdc2a8ef21d07a713dd12bf7
7c3e466598b86f1391d3248263d3298cf5dd0aae
akhikolla/Rcpp-TestPkgs-WebPages
/obliqueRSF/inst/testfiles/soft_sample/libFuzzer_soft_sample/soft_sample_DeepState_TestHarness.cpp
C++
cpp
1,468
no_license
// AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT // soft_sample_DeepState_TestHarness_generation.cpp and soft_sample_DeepState_TestHarness_checks.cpp #include <fstream> #include <RInside.h> #include <iostream> #include <RcppDeepState.h> #include <qs.h> #include <DeepState.hpp> Inte...
7aab55b1d6c99f5de35248f2e44fdf9599617e82
de3b560008d393713c4db31cdf6ec814887db06a
julianamarques/EDD-2017
/Exercicio1/q01.cpp
C++
cpp
244
no_license
#include <iostream> using namespace std; char L1[30]; void inverter() { for(int i = 30; i >= 0; i--) { cout << L1[i]; } } int main() { cout << "DIGITE UM TEXTO: "; cin >> L1; cout << "TEXTO INVERTIDO: "; inverter(); return 0; }
224d1340c3aaab58acaaab696a8bc116c87e2adc
e649a714d2562db733b225610a3ac6197cb9c66d
heemang2001/2D_Portfolio_HYH
/2D_Portfolio_HYH/CItem.cpp
C++
cpp
1,994
no_license
#include "CItem.h" void CItem::UpdateMoveLeft(float fElpsedTime) { mX = mX - mSpeed * fElpsedTime; } void CItem::UpdateMoveRight(float fElpsedTime) { mX = mX + mSpeed * fElpsedTime; } void CItem::UpdateMoveUp(float fElpsedTime) { mY = mY - mSpeed * fElpsedTime; } void CItem::UpdateMoveDown(float fElpsedTime) { ...
0b8a4e3638eb1bfdef1f27b6541368d95639f0ba
b997090841092dec697c3f3d4a3d28a3f55735d9
wangqifei/leetcode
/88_MergeSortedArray.cpp
C++
cpp
751
no_license
// 88 Merge Sorted Array // Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. // Note: // You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. The number of elements initialized in nums1 and nums2 are m an...
dad16f5c2c75029ffd90ec72d06b46c33c0dd1ca
7b9a3307e578bad04dc66b09b81b112f571e6771
sanyamdtu/interview_questions
/graphs/dfs.cpp
C++
cpp
619
no_license
/* Function to do DFS of graph g : adjacency list of graph N : number of vertices return a list containing the DFS traversal of the given graph */ void func(int src, vector<int> g[], int vis[], vector<int> &v) { vis[src] = 1; v.push_back(src); for (auto i : g[src]) { if (vis[i] == 0) ...
c89e014b2123038a5860a4dfb0372bdb140bc933
9e252b5335269efe6c74fe5cfc25cda8114f9816
cms-nanoAOD/cmssw
/RecoTracker/TransientTrackingRecHit/plugins/TkTransientTrackingRecHitBuilderESProducer.cc
C++
cc
5,727
permissive
#include "FWCore/Framework/interface/ESProducer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "TrackingTools/Records/interface/TransientRecHitRecord.h" #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Trackin...
60bbb84a0ff0f4b387fa8efea240c14749568614
28d3e681aec474ff6667dfb44acdf308e5a4d2da
patrickpclee/codfs
/branch/0.2/lib/mongo-cxx-driver-v2.2/src/mongo/buildinfo.cpp
C++
cpp
375
permissive
#include <string> #include <boost/version.hpp> #include "mongo/util/version.h" namespace mongo { const char * gitVersion() { return "8fdddf2e067f403b120ee27789aa510abfbf3d80"; } std::string sysInfo() { return "Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB...
3ba8d95fa1c0765451dfb20e9fbd34640e2b87f0
c4ac6b7ffca4cf68b88957bca8d05fdba15ad21f
Xiryl/univr
/Master/PSE/assignment1/Solutions/RTL/SystemC/src/tl.cpp
C++
cpp
2,107
no_license
#include "tl.hh" void tl :: fsm() { if (rst.read() == sc_dt::SC_LOGIC_1) { next_state = S_0; out_res.write(0); out_rdy.write("00"); tmp.write(0); } else { switch (next_state) { case S_0: { next_state = S_1; ...
1e812319f3d1bccc8030c49493386189bd424a34
446ce5dbfcf06db37cad5da378c6a871b6d83a4f
88b67391/AlgoSolutions
/cpp-leetcode/leetcode16-3sum-closest.cpp
C++
cpp
1,080
no_license
#include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; class Solution { public: int threeSumClosest(vector<int>& nums, int target) { int closest = nums[0] + nums[1] + nums[2]; int gap = abs(closest - target); sort(nums.begin(), nums.end()); for ...
4f4a63f21c553e4eda90622e44466c392595504b
4e6e1cf396c59888aed7bae78b09c94d4ba5c330
luntan365/Lex
/src/EquivalenceClass.cpp
C++
cpp
3,068
permissive
#include "EquivalenceClass.h" EquivalenceClass::EquivalenceClass() { equivalence_class.resize(65536); } EquivalenceClass::~EquivalenceClass() { } void EquivalenceClass::Add(CharSet &cset) { auto charset = cset.charset; int xs = cset.negate ? -1 : 1; eclass_sum++; if (cset.negate) { for (auto i = equivale...
484a500b492996fb202037807ebfbc0aeb0abd5c
7953259a78fe78bdec3dc633bafeceec6bab8fbe
soft9000/STDNOJ
/stdnoj/projects/noj_012_EzBlog/EzTextBlog/EzTextBlog.cpp
C++
cpp
1,331
no_license
/* The MIT License (Open Source Approved) Copyright (c) 1993 - 2009 R.A. Nagy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the righ...
3ea3d56078d1f818cad90458624192ad5dd4535d
3a2d555a9ebfa144189119ff315fe4a41ec66b8b
robertvalentic/opengl-fps
/GLUT_FirstTimeSetup/Input.cpp
C++
cpp
961
no_license
#include "Input.h" int Input::mouseX; int Input::mouseY; bool Input::wKeyDown; bool Input::sKeyDown; bool Input::dKeyDown; bool Input::aKeyDown; int Input::forward; int Input::right; int Input::getMouseX() { return mouseX; } int Input::getMouseY() { return mouseY; } void Input::setMouseX(int x) { mouseX = x; } ...