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
4cc42e23916d48fa2f18bd20f0bfed0ce718e74e
48c6011b4a5cd406d5f98b2e7d352ce430c659c7
milksob/hifi
/plugins/oculusLegacy/src/OculusLegacyDisplayPlugin.cpp
C++
cpp
9,318
permissive
// // Created by Bradley Austin Davis on 2014/04/13. // Copyright 2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "OculusLegacyDisplayPlugin.h" #include <memory> #include <QThread>...
221b5f48fdccea31b6816012cdf4f7fb26f872bf
297976c347d0e018ef476c4f17cea41a55baabdf
hanchaa/Algorithm_Study
/Baekjoon Online Judge/04386_별자리 만들기.cpp
C++
cpp
1,195
no_license
#include <stdio.h> #include <algorithm> #include <math.h> using namespace std; typedef struct { float cost; int start, end; } Edge; int parent[100]; Edge edge[10000]; int UF_find(int cur) { if (parent[cur] == cur) return cur; return parent[cur] = UF_find(parent[cur]); } void UF_union(int aParent, int bParen...
7567cb94d066c3a6a40ebdb61a92b6a4b839a213
ec9ccb9af9f8433dac5d9460958b6bef6d0838d4
DARKPOP/frameworks_base
/cmds/bootanimation/BootAnimation.cpp
C++
cpp
23,119
permissive
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
298ff81f7b840982ff3a0c4901228845c1e88327
5389af4eaae5f1f75b68ea0c5047f29c86a5f8b2
799169/library
/graph/articulation.cpp
C++
cpp
3,733
no_license
/* 関節点 ord[v]: dfs森でのid low[v]: lowlink, dfs木で子にいく + 一回だけ後退辺で上に上がれる ときにたどりつけるord のmin vが関節点⇔ vがdfs木のroot かつ 次数が2以上 or vがdfs木のrootでない かつ ある子uが存在し, ord[v]<=low[u] ord[v]=low[u]でも関節点(自分にサイクルが戻ってきたとしても上にはいけないのでまだ関節点なまま) なことに注意 二重(頂点)連結成分 橋に対する二重辺連結成分のように、二重連結成分が定義される。 辺集合Eが二重連結⇔Eで誘導されるグラフが関節点を持たない 二重辺連結成分分解が木を作るように、関...
c8e3e829eccd4a23e142ce90c2ad19e62129e4eb
2c2ef3d7221006a666f2966ac74513d7d393a083
profoundsoul/chromium
/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
C++
cc
14,948
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/settings/chromeos/device_storage_handler.h" #include <algorithm> #include <limits> #include <numeric> #include <string>...
d0eb33ccebab80002601db40b21c11c0ff49789f
ab020812c5871b13b316626b145133c94b93c1ac
yujika/CarND-PID-Control-Project
/src/main.cpp
C++
cpp
3,696
permissive
#include <math.h> #include <uWS/uWS.h> #include <iostream> #include <string> #include "json.hpp" #include "PID.h" // for convenience using nlohmann::json; using std::string; // For converting back and forth between radians and degrees. constexpr double pi() { return M_PI; } double deg2rad(double x) { return x * pi() ...
8d6674ef8a5c3d1d3f4dfbbf19246fd2ebb843b0
5e4572be4ed2bfdc9612d7b612a4fda1d6c57fc2
efornal/captura
/christian_workspace/tp5/fuente/ejer2/ejer2_2.cpp
C++
cpp
1,738
no_license
/* * ejer1_2.cpp * * Created on: 22/04/2010 * Author: christian */ #define cimg_use_fftw3 1 #ifdef cimg_use_fftw3 extern "C" { #include "fftw3.h" } #endif #include <iostream> #include <CImg.h> #include "../lib5/lib5.h" #include "../lib5/figuras.h" #include "../../../tp4/fuente/lib4/CPDSI_functions.h" #inclu...
f9a26571e087633e53acb858b468e4b2e9e09dfa
6c3db01d9784e5fc15d0d992cd87e6edc7593805
bjkeller/fca-utils
/src/buildfreqtable.cpp
C++
cpp
5,355
permissive
#include <iostream> #include <sstream> #include <string> #include <utility> #include <set> #include <map> #include <queue> #include "concept.hpp" #include "lattice.hpp" std::string separateVariable(const std::string& attr) { std::istringstream iss(attr); std::string variable; std::getline(iss,variable,'_'); ...
fdde9a5ea064b2cc6071bea8fb8682545fd7cce7
b9e2c63d69132300793f6b912728d800ed0d8398
catalinaleopea/FMI-INFO-2016-2019
/AN2/Sem1/Tehnici Avansate de Programare/laborator/lab2/contest (1).cpp
C++
cpp
1,118
no_license
#include <iostream> #include <fstream> #include <cstring> #include <unordered_map> #include <vector> using namespace std; #define MIN_INF -320000; #define MAX_IDX 1000; #define MAX_LENGTH 32 struct Round { string name; int score; }; // ifstream f("date.in"); unordered_map< string, int > M1,...
d94380950a0e8c042833dd6f48d19fdfa61bf944
03658756b4ce16838d486b4b0d70582c70b34e6c
auberj/ComputerNetworkB1
/network_test/network_demo5.cpp
C++
cpp
9,996
no_license
//Author: dm6g13 #define __PLATFORM_AVR__ char callsign; #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #include <string.h> #include <stdio.h> #include "network_demo.h" #include "callsign.h" #include "timer/timer.cpp" #include "uart/uart.c" //#include "uartlink/uartlink.cpp" ...
f708b55f2190fb5968679ba0abd4b80f4d6ff27f
8f9016f5564a5ab0986bf5f14a0ab67640e00eb2
teekenl/v8
/src/x64/code-stubs-x64.cc
C++
cc
90,636
permissive
// Copyright 2013 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #if V8_TARGET_ARCH_X64 #include "src/api-arguments.h" #include "src/bootstrapper.h" #include "src/code-stubs.h" #include "src/codegen.h" #include "src/...
bc111ad4b21559fa606877321845b12163ececd5
804eac0672f1023628424f402e1421ccdc0beffc
thomaslamson/quickdiagram
/Preprocessing/LineFit.cpp
C++
cpp
3,396
no_license
#include "stdafx.h" #include <Windows.h> #include <math.h> #include <vector> #include "CommonFunction.h" double CalcErrorToLine(POINT* rgPoints, int nPoints, double A, double B, double C) { double A2B2 = sqrt(A * A + B * B); double error = 0; for (int i = 0; i < nPoints; i++) { error += fabs(A ...
d4658c4b6e408100bdf91134a83d1650e8878e30
01d9f1a729b27fe3193d48f8ebd11e50142d30c7
LiDoGitHub/swift
/lib/Sema/ConstraintSystem.cpp
C++
cpp
62,106
permissive
//===--- ConstraintSystem.cpp - Constraint-based Type Checking ------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
8ff345a2920dff464ee0153bd139be94529cec6b
fe05396fc56af6562f1d1d2f444427d66eb7b2c1
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE78_OS_Command_Injection/s07/CWE78_OS_Command_Injection__wchar_t_environment_w32spawnl_43.cpp
C++
cpp
3,708
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_environment_w32spawnl_43.cpp Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-43.tmpl.cpp */ /* * @description * CWE: 78 OS Command Injection * BadSource: environment Read input fr...
cce1f506e10b7ba05d18209367658b1148463d6c
a8f65d26523fd78a6ed2203f2236a66aacd47e80
romluis/predator-prey-model
/main.cpp
C++
cpp
230
no_license
#include <iostream> #include "grid.h" using namespace std; int main() { grid* world = new grid; int i = 0; while(i<400) { world->Update(); i++; } return 0; }
a1bba294aeecb3a551ae7e26325c9f3b08e26c05
b77d9abced9e6a543fac7a9102d6b95c9717e095
JimmyJones97/aasd
/SDK/FN_PinnedSchematicItemsWidget_functions.cpp
C++
cpp
1,885
no_license
// Fortnite SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function PinnedSchematicItemsWidget.PinnedS...
50055763bc032fceb406ca3f62837f0473a1fae1
37ce7c89bd638889a6facc743fca0ac9a9775868
StellaSong12/AndroidRemoteDebug
/app/src/main/cpp/fake_dlfcn.cpp
C++
cpp
5,172
permissive
// // Created by lofei on 2019/1/24. // #include "fake_dlfcn.h" #include <cstdio> #include <fcntl.h> #include <sys/mman.h> #include <elf.h> #include <android/log.h> #include <malloc.h> #include <cstring> #include <unistd.h> #define TAG_NAME "fake_dlfcn" #define log_info(fmt,args...) __android_log_print(ANDROID_LOG...
e010c1f2f52060efa3651f23263ea853b0771559
31fe7f7508c4f3090ab1811b8edb5ed27c9b6c09
cookish/deeptile
/heuristicMod.cc
C++
cc
680
permissive
// // Created by Martin Cook on 2019-05-27. // #include "include/HeuristicScorer.hh" #include "include/Settings.hh" #include <pybind11/pybind11.h> #include <algorithm> #include <string> using std::string; namespace py = pybind11; class PyHeuristicScorer : public HeuristicScorer { public: explicit PyHeuristicSco...
f64a67e2d80133ec16d9d99012c1d004f0372b96
570d8b271a8fb8ffe747c4e1873b9f28a3682412
dieuninh1997/spoj-2017
/SQRBR.cpp
C++
cpp
205
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll ; #define FOR(i,a,b) for(int i=a;i<b;++i) #define FORI(i,b,a) for(int i=b;i>=a;--i) void solve() { } int main() { solve(); return 0; }
03a6dbe29c4c10148126d6d30ba613c22fa8a034
1a3ba6a0b38765b72f3c559e2d8e631f5aa5e223
zaorangyang/NuRaft
/src/peer.cxx
C++
cxx
8,081
permissive
/************************************************************************ Modifications Copyright 2017-2019 eBay Inc. Author/Developer(s): Jung-Sang Ahn Original Copyright: See URL: https://github.com/datatechnology/cornerstone Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file ...
a4f8c66173923c02b3486c2cd8adf60e0dad39c1
0dbf15ee6fc0c66316dcf67764fd481feac3eabe
RipleyTom/llvm-mirror
/unittests/IR/VectorTypesTest.cpp
C++
cpp
15,309
permissive
//===--- llvm/unittest/IR/VectorTypesTest.cpp - vector types unit tests ---===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
a0dbda4674c6ec0fb0d3b3970e7251ba3b159da6
ebc257b96320734529e46aa4829c6d83d2d157d4
dogjin/QtRestClient
/src/restclient/restclient.cpp
C++
cpp
7,794
permissive
#include "restclient.h" #include "restclient_p.h" #include "restclass.h" #include "standardpaging_p.h" #include <QtCore/QBitArray> #include <QtCore/QCoreApplication> #include <QtCore/QRegularExpression> #include <QtCore/QUuid> using namespace QtRestClient; RestClient::RestClient(QObject *parent) : QObject(parent), d...
1acc726ae7804537e5211b00a90e845df5cf1bf6
872fb7ea644922995324a4918c5bd7b3020d359a
liuq901/code
/LOJ/l_1135.cpp
C++
cpp
1,818
no_license
#include <cstdio> #include <algorithm> using namespace std; struct tree { int l,r,cnt,ans[3]; }; tree a[270000]; void build(int x,int l,int r) { a[x].l=l,a[x].r=r,a[x].cnt=a[x].ans[1]=a[x].ans[2]=0,a[x].ans[0]=r-l+1; if (l==r) return; int ls=x<<1,rs=ls+1,mid=a[x].l+a[x].r>>1; build(ls,l,mid)...
e32065bd0a7a8d9f12b7e5ba32eb5169ed89dd9e
74c0c7b786773a9e6fd7a3255d656c2796122cac
DatabaseNC/yugabyte-db
/src/yb/util/thread.cc
C++
cc
27,716
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 may...
132246fa2686e7afc0be9297074a8b448d5be4e6
e43097e51eed7b2d021385aeb307333689a450de
KhawarKhalil55/C_Plus_Plus_Solutions
/Chapter 2 Exercise_files/exercise_3.cpp
C++
cpp
382
no_license
//Chapter 2 Exercise //Problem 3 //ex1_3.cpp //Program to generates following output. #include<iostream> using namespace std; int main() { int num = 10; cout <<'\n' <<num <<endl; num += 10; cout <<num <<endl; --num; cout <<num <<endl; cout <<"\nOR" <<endl; num = 10; cout <<'\n' <<num <<endl; num *=...
053453bde7c7e45d851f25933e7e897f16015b72
598d4951533fd5df7c952d63f782bd645519188d
james25/dataStructure
/cPlusPlus/priorityMail.cpp
C++
cpp
2,673
no_license
/* * priorityMail.cpp * * Created on: Apr 25, 2015 * Author: james */ #include "priorityMail.h" //-----------------------------PriorityMail Class------------------------------------// PriorityMail::PriorityMail(Zone z, double w, bool urg):urgent(urg),area(z),weight(w){ price = 0; }; istream& operator>...
76d09971863a6e1ce8275bcb1fb0cb800ec4af0d
a467675e4817ad15643b9f04e4f9f0a5c41b009e
liuzix/newos
/src/vga.cc
C++
cc
2,032
permissive
// // Created by Zixiong Liu on 12/16/16. // #include "vga.h" #include "x86.h" #include "lib/assert.h" int vga::pos_x = 0; int vga::pos_y = 0; inline uint8_t make_color(vga::vga_color_t fg, vga::vga_color_t bg) { return fg | bg << 4; } inline uint16_t make_vgaentry(char c, vga::vga_color_t color) { uint16_t c16 =...
03580454aab669cd5b4797b11427ebe78f6074c4
9e3acb0657111a4fbfa9013ec4e4f40764051c03
WizardSkillbox/Module26_Task_2
/src/main.cpp
C++
cpp
4,289
no_license
#include <iostream> #include <string> #include <map> using namespace std; class Record { string userName; public: explicit Record(const string &userName) { this->userName = userName; } const string *getUserName() const { return &userName; } }; class AddressBook { map<string, ...
9d880efecc90f5f0e71fbaf52790ae7f4e23bb42
98718bfdfb73f497205c003fca615e52cbd61053
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14548/function14548_schedule_4/function14548_schedule_4_wrapper.cpp
C++
cpp
925
no_license
#include "Halide.h" #include "function14548_schedule_4_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> buf00(64, 64); Halide::Buffer<int32_t> buf0(64, 64, ...
9ddf2096ee7db799ab88bdfe5223d86297a98469
fac4d2de7f625bbfa3d5876741984336b222218c
GauravBansal29/LiveBatchNov2020
/Lecture-12/WavePrint.cpp
C++
cpp
515
no_license
#include <iostream> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif int a[100][100]={ {1,2,3,4}, {5,6,7,8}, {9,10,11,12} }; int r=3,c=4,number =1; for(int col = 0 ; col < c ; col++){ if(col%2 == 0){ // even column f...
afd4f7512ab0065b62f715ec0a8b234a430638df
b8e2b1eae2013924a3b74c28ae839e614f829270
Cheng-HsiLin/AlgorithmProblemPractice
/11_ContainerWithMostWater.cpp
C++
cpp
853
no_license
// // 11_ContainerWithMostWater.cpp // AlgorithmPractice // // Created by Cheng-Hsi Lin on 3/07/17. // Copyright © 2017 Cheng-Hsi Lin. All rights reserved. // #include <iostream> #include <vector> #include <algorithm> using namespace std; // Two Pointers Method class Solution { public: int maxArea(vector<int>...
350fd9728566da2e4c1419543e93ff9f9b1ffc37
8f4cde5029d407dd26af0d3b8bf6e0f7ee59f635
sxs-collaboration/spectre
/tests/Unit/Utilities/TypeTraits/Test_RemoveReferenceWrapper.cpp
C++
cpp
6,807
permissive
// Distributed under the MIT License. // See LICENSE.txt for details. #include <functional> #include "Utilities/TypeTraits.hpp" #include "Utilities/TypeTraits/RemoveReferenceWrapper.hpp" namespace { class A; } // namespace // [remove_reference_wrapper_example] static_assert( std::is_same_v<const double, tt::re...
f4d705c202ae73c97236939f9ceee244df6bd1fb
2db83366ae268370a165aeb62f9a63bbcb034c40
ronak1009/C-training
/basic-cplusplus/day09/01-structDeclaration/Source01.cpp
C++
cpp
281
no_license
int main() { struct Point { int m_x; int m_y; }; } /* 'Point' is user defined type (UDT). 'm_x' &'m_y' are called data members. here, m_ prefexing enables to recognise the variables as data members. This is just a practice and not a rule. 'struct' is keyword of language. */
48f9f770c9b0af4225d0d563a5ff53e12cef88e4
936fdd655fe3241677bd8719fded2a6a6494a6b9
filipeRmlh/trabalhosCG
/main.cpp
C++
cpp
1,008
no_license
#include <memory> #include <memory> /* When creating your project, uncheck OWL, uncheck Class Library, select Static instead of Dynamic and change the target model to Console from GUI. Also link glut.lib to your project once its done. */ #include <stdlib.h> #include<string> #include<iostream> // //// change Op...
0d716e12b5cd4ffabded94aaa4957be067ed12ee
de77f8932ea4eacb23bf59581a31fff94e513dd7
shwetamali/1BM18CS420_ADA
/BinarySqrt.cpp
C++
cpp
740
no_license
#include <iostream> #include <time.h> using namespace std; int Squareroot(int x) { if (x == 0 || x == 1) return x; int start = 1,end = x,ans; while (start<=end) { int mid=(start + end)/2; if(mid*mid==x) return mid; if(mid*mid<x) ...
6e27ac016b05a3496a28e735490aef2d140d3513
bfb8fddf32a27f6b163982510b821f9ae715df79
francescobigoni/lyt
/library/utils.cpp
C++
cpp
482
no_license
#include "utils.h" #include "settings.h" #include <cmath> #include <cstdlib> double pi = 3.14159265359; int samples(float seconds) { return std::ceil(seconds * LYT_SETTINGS.sampleRate); } float seconds(int samples) { return (float)samples / LYT_SETTINGS.sampleRate; } float randNum() { return static_cast...
727c72104882457b2001f6961cc17bf5ecd80877
e666d92e7ea749f4d16672068defcf23d5390001
yingzhang536/mrayy-Game-Engine
/Engine/mrayEngine/src/XMLTree.cpp
C++
cpp
530
no_license
#include "stdafx.h" #include "XMLTree.h" #include "IXMLParser.h" #include "IStream.h" #include "IFileSystem.h" namespace mray{ namespace xml{ XMLTree::XMLTree():XMLElement(mT("Root")) { } XMLTree::~XMLTree(){ } bool XMLTree::load(OS::IStream* stream){ Clear(); return IXMLParser::getInstanc...
16a4aa954035b66c655ebc1851946bf061d5cd62
e041058b063ee55bb9974570e7d1271dbaf040ba
AndrewGaspar/parthenon
/src/driver/driver.cpp
C++
cpp
2,550
permissive
//======================================================================================== // (C) (or copyright) 2020. Triad National Security, LLC. All rights reserved. // // This program was produced under U.S. Government contract 89233218CNA000001 for Los // Alamos National Laboratory (LANL), which is operated by T...
f5c18aa99d8171746939672a1753c81f9596376f
5edf830a28ba080e66b9ae21a356db80ed37507e
Zaladim/Tek2_OOP
/OOP_arcade/games/centipede/Object.cpp
C++
cpp
1,041
no_license
/* ** EPITECH PROJECT, 2019 ** OOP_arcade_2018 ** File description: ** Object */ #include "Object.hpp" Object::Object(int x, int y, int value) : _x(x), _y(y), _value(value) { } Object::~Object() { } // === GETTER === int Object::getPosX() const { return _x; } int Object::getPosY() const { return _y; } int O...
59f27114958a9491864eeade98dcef0d23f9e6b0
cc367d4319555e8abe5ad671f38c78692ff770f1
fatdeer/leetcode
/50-Pow(x,-n)/solution_2.cpp
C++
cpp
515
no_license
class Solution { public: double myPow(double x, int n) { if (n < 0) return 1.0 / power(x, -n); else return power(x, n); } private: double power(double x, int n) { if (n == 0) return 1; if (abs(x) < numeric_limits<double>::epsilon()) { ...
6fea567b61ca8c4a93cd935e90d2c0d4de18f429
203d4bfac7064ba9cf07beb8ec6bef17f03e9ed6
DavePearce/TuttePolynomial
/tuttex/biguint.cpp
C++
cpp
18,616
permissive
// (C) Copyright David James Pearce and Gary Haggard, 2007. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitabili...
cd6b2d7da52a9bf34850506e2df552a219236903
5d5eaa5f357c24c3d5ad2d69ffee2187168ff835
dorsMaster/shell
/main.cpp
C++
cpp
8,692
no_license
#include "includes.h" #include "commands.cpp" #include "job.cpp" #include "utils.cpp" vector<Job> jobs; /** * Checks whether the PID given is currently in the tasks * @param cmdPID * @param ljobs */ bool hasPid(string cmdPID, vector<Job> ljobs) { for (int i = 0; i < ljobs.size(); i++) { if (ljobs[i]....
8dfecb12d396e62cd6d9b80e1be35d6c5e976533
b1d88b910b04b938db7e4cffcd080dbb91322a22
hexuscoin/hexus
/src/qt/paymentserver.cpp
C++
cpp
28,022
permissive
// Copyright (c) 2011-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2019 The Hexus Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "paymentserver.h...
13bc74a382694ec4a65ba15579296f43479e2a6b
4f5d35d790c3e4de721c1663a33623e5423840ac
aurantst/windows-XP-SP1
/XPSP1/NT/multimedia/directx/dxvb/dx7vb/d3drmanimationset2obj.cpp
C++
cpp
4,558
no_license
//+------------------------------------------------------------------------- // // Microsoft Windows // // Copyright (C) Microsoft Corporation, 1998 - 1999 // // File: d3drmanimationset2obj.cpp // //-------------------------------------------------------------------------- // d3drmAnimationSet2Obj.c...
7a94bb9acab2a53c209153df0f6400dc6bac4d22
7d7e89f7db808a94ce96f71a29867cd62a269d3c
chuanzzx/Leetcode
/606 Construct String from Binary Tree.cpp
C++
cpp
770
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: string tree2str (TreeNode *t) { return build (t); } string build (TreeNode...
e778730f5ed1b09a6edf5221367f354bfb8574a7
0b55fa697400ea9be17a76310c89059c2a48c152
phiwen96/ph_cryptography
/tests/test_cryptography.cpp
C++
cpp
421
permissive
#include <catch2/catch.hpp> #include <ph_cryptography/cryptography.hpp> using namespace ph::cryptography; using std::cout; using std::endl; // // // TEST_CASE ("Constructs and assignments") { //GIVEN ("User defined classes A B C D") //{ // AND_WHEN () // { // THEN // { // // } // } //} sqrt(100); cout ...
e59bf10ed33ee6489494192d31031f9474ddf32b
80c64ed73bbc47c373c7042bf3ae8b495680a771
hackerlank/Test-3
/GateServer/src/TradeMgr/ExchangeMgr.cpp
C++
cpp
14,684
no_license
/* * ExchangeMgr.cpp * * Created on: 2014年5月16日 * Author: root */ #include "ExchangeMgr.h" #include "SvrConfig.h" #include "../ServerManager.h" #include "Log/Logger.h" #include "MessageStruct/CharLogin/ExchangMessage.pb.h" #include "MessageStruct/ServerReturnInt.pb.h" #include "../MessageBuild.h" #include "...
e6eb439d4c8d858539badd43d2b105e8ee85e41a
c7965af59fa065078ac8af8ff5a40246249ad601
dmriser/analysis-projects
/pid/calib/eid/src/checkParameters.cxx
C++
cxx
2,866
no_license
#include <iostream> using std::cout; using std::endl; // Mine #include "h22Option.h" #include "Parameters.h" // ROOT #include "TApplication.h" #include "TF1.h" #include "TFile.h" #include "TCanvas.h" #include "TH2.h" #include "TStyle.h" int main(int argc, char *argv[]){ // Setup options h22Options opts; op...
efee1791ec02003b05a7574438788f3d3b481605
db7caa5ba430760affcee8316bd896d128262002
GeoTuxMan/Matrix---Kronecker-Product
/Kroneckerproduct.cpp
C++
cpp
881
no_license
// Calculeaza produsul Kronecker a doua matrice a, b // rezultatul il stocheaza in p #include <iostream> using namespace std; const int cola = 2, rowa = 2, colb = 2, rowb = 2; //dimensiuni matrice void kron ( int a[][cola], int b[][colb]) { int kprod[rowa * rowb][cola * colb]; ...
f384bf20d8bea5ce54f07cd7edcd8054e4251bdd
4a1b183a972ec901e3055f9d1200b07e2cd8a7f2
woosungkim/Memgorithm
/MEMGORITHM/662_Iceberg.cpp
C++
cpp
3,357
no_license
/* VCPP, GPP에서 사용 */ #include <iostream> using namespace std; int r, c; int iceOrigin[301][301]; int ice[301][301]; int year = 0; int nPiece = 0; int piece[301][301]; int rQueue[10001]; int cQueue[10001]; int front = 0, rear = 0; void initData() { year = 0; nPiece = 0; } void printIceberg() { for (int i = 0; ...
0f029459941c3250833685fe86a7586935e07705
974c5a38a493ddf230aaf563bbc01eed9826ce00
Dhina17/ProblemSolving
/CodeChef/DataStructure/Topics/Array/Basics/binarysearch.cpp
C++
cpp
547
no_license
#include<iostream> using namespace std; void display(int arr[]){ for(int i = 0; i < 5; i++){ cout << arr[i] << endl; } } // binary search int binarySearch(int arr[], int L, int R, int x){ if(R>=L){ int m = L + (R-L) / 2; if(arr[m] == x) return m; if(arr[m] > x ) return ...
0ec307089d6efb3976c5171b9fc63dd509a840e2
dfc0e80ac7b899f6a48ee811408d8f5dd77a3f9c
tmobile/themes-platform-frameworks-base
/tools/aapt/Main.cpp
C++
cpp
21,545
permissive
// // Copyright 2006 The Android Open Source Project // This code has been modified. Portions copyright (C) 2010, T-Mobile USA, Inc. // // Android Asset Packaging Tool main entry point. // #include "Main.h" #include "Bundle.h" #include <utils/Log.h> #include <utils/threads.h> #include <utils/List.h> #include <utils/E...
8cf638210d639621c012d4660fbc28e7009aaaa7
87b030b1064d28a0de812322ea44075d792c9ebc
ironpillow/LimeSuite
/src/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp
C++
cpp
16,867
permissive
#include "lms7002_pnlRxTSP_view.h" #include "lms7002_gui_utilities.h" #include "LMS7002M.h" #include "ErrorReporting.h" #include "numericSlider.h" #include "lms7002_dlgGFIR_Coefficients.h" using namespace lime; using namespace LMS7002_WXGUI; static indexValueMap hbd_ovr_rxtsp_IndexValuePairs; static indexValueMap tsgf...
95f5a0dcf0ead80d240fd76c08741443e85153e8
74ac27fb34a7a5cdee3dcdece9de9f60baed6a5e
TooYoungTooSimp/my_solutions
/Algorithms/Graph/NetworkFlow/Dinic.cpp
C++
cpp
2,143
permissive
#include <cstdio> #include <cstring> const int maxn = 201, inf = 0x3f3f3f3f; inline int min(int a, int b) { return (a < b ? a : b); } struct Edge { int from, to, cap; Edge *next, *rev; Edge(int f, int t, int c) : from(f), to(t), cap(c), next(0), rev(0){}; }; typedef Edge *lpEdge; lpEdge addEdge(l...
595d3f184ae043247bd2007fb3501b74f5b53f35
d138a0812ff2f1b4295a088a1557767216516231
ludwigschwardt/casacore
/tables/Tables/test/tReadAsciiTable.cc
C++
cc
20,752
no_license
//# tReadAsciiTable.cc: Test program for the ReadAsciiTable functions //# Copyright (C) 1994,1995,1996,1999,2000,2001,2002 //# Associated Universities, Inc. Washington DC, USA. //# //# This program is free software; you can redistribute it and/or modify it //# under the terms of the GNU General Public License as publis...
06a49948a08f9acdb6f3626e9d9ff04a722eef17
49bfcc2181e793fc983f3037a27ba1317dfd1305
hradec/gaffer
/src/GafferModule/MetadataBinding.cpp
C++
cpp
14,047
permissive
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2013, Image Engine Design 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: // // * R...
3c8fa0be671618ab78f81389082b21358e168efa
da8c325b86509a5cbd97f671a28fb5bf3572f195
agravgaard/Plastimatch
/src/plastimatch/segment/autolabel_thumbnailer.cxx
C++
cxx
1,370
permissive
/* ----------------------------------------------------------------------- See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information ----------------------------------------------------------------------- */ #include "plmsegment_config.h" #include "itkImageRegionIterator.h" #include "autolabel_thum...
b1f95daf885be282aa714366d25d7f857f69afdd
1a5abdd8ce9dcfbd21899ca40973f7d2f689c7c2
carloskcheung/chromium
/ash/login/ui/login_expanded_public_account_view.cc
C++
cc
26,174
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 "ash/login/ui/login_expanded_public_account_view.h" #include <memory> #include <utility> #include <vector> #include "ash/login/login_screen_con...
7c5024310e96945aea4acd555b08168d7eced966
2d86dbed8486daa66192b566cd686031d6677248
creepyfun/bro-driver
/EveIngameWindow.cpp
C++
cpp
2,594
no_license
#include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include "eve-zam-tools.hpp" #include "EveWindow.hpp" #include "EveIngameWindow.hpp" using std::wcout; using std::endl; bool EveIngameWindow::needReFindWindow_() { bool needFind = false; if ( ref...
f2028c48a5811993ffc536dbe3c2aec445f6ff28
d22aedc55a7918e65a224de9766ee949ba9ec27e
shsr04/os
/i686-cpp/kernel/core/optional.hpp
C++
hpp
1,102
no_license
template <class T> class optional { bool loaded_ = false; public: const T value; const char *const err = "(Unknown error)"; constexpr optional() : value() {} constexpr optional(T p) : loaded_(true), value(move(p)) {} constexpr optional(bool, const char *p) : loaded_(false), value(), err(p) {...
83b298f8ec991637610a8ea1c44af904ca34fbc1
4c825d3ff4a8af331d25e2ece6abb80cedc69358
LiuZhichang/ZVK
/zvk/platform/platform_win32.cpp
C++
cpp
407
no_license
// // Created by 刘致畅 on 2021/10/13. // #include "platform_win32.h" ZVK::ZVK_Bool ZVK::Platform_WIN32::CreateWindow(ZVK::Window window) { } ZVK::ZVK_Bool ZVK::Platform_WIN32::CreateSurface(ZVK::Instance inst, ZVK::Window window, ZVK::Surface surface, ZVK::Allocator a...
b79e4d501e21ae51ea3267f402ead7ecd634fe83
3b31b9e9f7c011c6eeaed65e55528a08f6e79aaf
cardinaldevgroup/AdenEngine
/AdenWorldManager.cpp
C++
cpp
249
no_license
#include "AdenWorldManager.h" AdenWorldManager& AdenWorldManager::GetInstance() { static AdenWorldManager* instance = new AdenWorldManager(); return *instance; } AdenWorldManager::~AdenWorldManager() { } AdenWorldManager::AdenWorldManager() { }
b5157696ba45b9e43e011aeb07eb7ef2265f9cac
ca7e46bdcbda7fe83e65f8fb4773c9293b3653be
superkunn/My-ACM-Template
/04_Graph Theory/01_Union-Find Set/01_reset.cpp
C++
cpp
1,406
no_license
struct DSU{ int p[MAXN],rk[MAXN]; int Back[MAXN<<1]; int cnt; void init(int n){rep(i,0,n)p[i]=i,rk[i]=1;cnt=0;} int findp(int x){return x==p[x]?x:findp(p[x]);} void unite(int x,int y){ x=findp(x);y=findp(y);if(x==y)return; if(rk[x]>rk[y])swap(x,y); if(rk[x]==rk[y])++rk[y]...
3cfbe25110abea0cfa0b150bf485c6289427719f
44c56ab49dcc6b550214b4313e22c8818bad2d8e
Ismail-Mahmoud/Competitive-Programming
/Problems/LeetCode/872.Leaf-Similar-Trees.cpp
C++
cpp
953
no_license
// https://leetcode.com/problems/leaf-similar-trees/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNo...
3d077826b0047db2d8747bb1500f6f32a5fb4152
ef4ae12cea8206f7ef6a5b3f5d93fe21810fc597
qjagh95/Project_GONNER
/Engine/Include/Component/TitleBar_Com.cpp
C++
cpp
3,014
no_license
#include "stdafx.h" #include "TitleBar_Com.h" #include "Renderer_Com.h" #include "Material_Com.h" #include "ColliderRect_Com.h" #include "Transform_Com.h" #include "../GameObject.h" #include "../KeyInput.h" JEONG_USING TitleBar_Com::TitleBar_Com() { m_ComType = CT_TITLEBAR; SetTag("TitleBar"); m_isOver = false; ...
a31bc1ea17695f4744e25f4f9a6ba7bb11c16709
bb3e343157ec4277d2be7200fcde8788ad5ccdbb
spjewkes/roguelike_tutorial
/src/map.hpp
C++
hpp
730
no_license
#ifndef __MAP_HPP__ #define __MAP_HPP__ #include <libtcod.hpp> #include "bsplistener.hpp" #include "defs.hpp" struct Tile { bool explored{false}; // Has the player seen this tile? }; class Map { public: Map(int width, int height); virtual ~Map(); bool isWall(int x, int y) const; bool isExplored(int x, int y) c...
7b1a9654cf8dcb5ae21ba23159e8976816ec135e
6bb2123dbf79a83636759104a388eefc9e2e9d5a
Lornatang/algorithms
/hash/main.cc
C++
cc
924
permissive
#include "extension.hpp" using namespace std; int main(void) { Hash Hashy; string name1 = " "; string name2 = " "; Hashy.PrintTable(); Hashy.AddItem("Paul", "Locha"); Hashy.AddItem("Kim", "Iced Mocha"); Hashy.AddItem("Anni", "Strawberry Smoothy"); Hashy.AddItem("Sara", "Passion Tea"); Hashy.AddItem...
383abc3538b920e58128df3bf279f12c95d23a7b
62735d3890da73f2d7d25824f93c24ba1cc370dd
chuamanFeng/notes-exercises
/heapsort.cpp
C++
cpp
1,672
no_license
#include <iostream> #include<algorithm> using namespace std; void HeapAdjust(int *a,int i,int size) //调整堆 { int lchild=2*i; //i的左孩子节点序号 int rchild=2*i+1; //i的右孩子节点序号 int max=i; //临时变量 if(i<=size/2) //如果i不是叶节点就不用进行调整 { if(lchild<=size&&a[lchild]>a[max]) ...
684255ba0736b504fefa23865bc899f27be31c75
3389be520263b50598628174a6ef7785ca2af7fa
micahrichert/white_noise_sonar
/stm32f4.cpp
C++
cpp
14,872
no_license
#include <stdint.h> #include <math.h> #include <libopencm3/stm32/rcc.h> #include <libopencm3/stm32/gpio.h> #include <libopencm3/stm32/f4/rng.h> #include <libopencm3/stm32/adc.h> #include "serial_printf.cpp" #include "clock.cpp" #define USE_BUILTIN 0 // slow on stm32 but may be fast on other chips #define USE_PARALLE...
641015a59d87ef1ed37b0230b87d76bdc6e4cfb7
5d3c5537fee1ae9885633d1deb57c67d6c9699b7
CodeBoy22/HacktoberfestChamps
/windowSliding.cpp
C++
cpp
574
no_license
#include<bits/stdc++.h> #include<numeric> #include<math.h> using namespace std; const int INF = 1e9; const int N = 1e7+3; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; int k; cin>>k; int curr_sum = 0; for(int i = 0; i < k; i++){...
deb96cb4189f68a0d37b34bae7f2fea502e87602
b0f1ff0cc134800df5276222ac64ad8d398b6484
pigsinablanket/mlspp
/cmd/test_gen/main.cpp
C++
cpp
17,498
permissive
#include "crypto.h" #include "session.h" #include "test_vectors.h" #include "tree_math.h" #include <fstream> #include <iostream> TreeMathTestVectors generate_tree_math() { TreeMathTestVectors tv; tv.n_leaves = LeafCount{ 63 }; for (uint32_t n = 1; n <= tv.n_leaves.val; ++n) { auto w = NodeCount{ LeafCount{ ...
eef2d18ec49e0f2d66b0ad664d3a5e1c378be554
b1f7d555108ee3772e0f0b5488d23f419fe257a1
enola3011/HacktoberFest2k21
/cpp/Vector/VectorErase.cpp
C++
cpp
552
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <sstream> using namespace std; int main() { vector<int>v; int n,item,a,b,c; cin>>n; for(int i=0; i<n; i++) { cin>>item; v.push_back(item); } cin>>a; if(a<v.siz...
b269143e62df9049b1e15197488bd04347905273
7fc766670487148d9356b7998ba5b88c5ff76f56
noelruiz34/Infix-to-Postfix-math
/inToPost.cpp
C++
cpp
17,482
no_license
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> using namespace std; struct opNode { char parth = ' '; string nums = " "; opNode *next = nullptr; }; struct numNodes { string sNum = ""; unsigned long int num; numNodes *next = nullp...
c25a78e7707509c72750995f23b24b760584a85e
906751f4e46836deffc02f1edf02940fa200ba6a
Kotaro666-dev/APG4b
/ex10/ex10.cpp
C++
cpp
331
no_license
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; int i; cout << "A:"; i = 0; while (i < A) { cout << "]"; i++; } cout << endl; cout << "B:"; i = 0; while (i < B) { cout << "]"; i++; } cout ...
fede2e9001a9375c2ce62c4ddd0aee072ef22164
ece3e2fe721f056ba451ffc3a56880ef18ca72fa
Borjagodoy/ProtocolOfComunication
/comunication.cpp
C++
cpp
5,902
no_license
#include "comunication.h" using namespace std; void sendCharacter(interface_t iface, unsigned char MACdst[6], unsigned char type[2], unsigned char* payload, int size){ unsigned char *frame = BuildFrame(iface.MACaddr, MACdst, type, payload); SendFrame(&iface, frame, size); } void recivedChar(interface_t ifac...
a80750837094212df5e17ea2eec0925685357616
28cbd0b794245b6511fb9398495c3cc68ed18770
ShivamRajSingh/LeetCode
/Top 150 Questions/Remove_Duplicates_from_Sorted_Array.cpp
C++
cpp
376
no_license
#include "codeblock.h" int removeDuplicates(vector<int>& arr) { if(arr.size() == 0) return {}; int j =1; for(int i = 1; i < arr.size(); i++){ if(arr[j-1] != arr[i]){ arr[j] = arr[i]; j++; } } return j; } int main() { vector <int> arr = inp...
3119266656564da114567fe01e4fc8132dfb1d6a
c8984f7e816a920e4614bef0e974ac8e9080a22f
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_SE_DinoSpawnEntriesWyvernTrench_functions.cpp
C++
cpp
1,170
permissive
// ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_SE_DinoSpawnEntriesWyvernTrench_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------...
45816f37ce7b59151649a1870043cff65c44d769
84a46c962950f8e5d3c02cbe81841e12bcdd37d8
turippj/TURIPlibrariesForArduino
/src/lib/turipPort.cpp
C++
cpp
6,482
permissive
#include "TURIPport.h" TURIPport::TURIPport(uint8_t portNum){ // ポート番号の設定 this->portNumber = portNum; // パーミッションのデフォルトをREADWRITEとする this->permission = TURIP_PERMISSION_RW; // トリガ関数は無効化する this->preReceiveFunc = NULL; this->postReceiveFunc = NULL; this->preTransmitFunc = NULL; this->postTransmitFunc =...
168151c60b03427948930144dfa880a4f351a053
4c4c5bf61b06e3c9087c2365a47338f3c52efe07
IMCHO/HACKER_RANK
/30 Days of Code Challenges_C++/30 Days of Code Challenges_C++/DAY8.cpp
C++
cpp
697
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <map> #include <string> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ map<string, int> PhoneBook; map<string, int>::iterator iter; string name; int ...
a32b82b5dd52b439744b2d6a5d04a39f2f5d802c
53c3dda24ca19d9a9d286abd4a0099264fc9753b
Crusader727/Algorithms
/mod1/7_1+.cpp
C++
cpp
2,428
no_license
#include <iostream> struct athlet { int mass; int force; }; /* void mysort(athlet*& athlets, int size) { athlet buf; bool flag = false; for(int i = 0; i < size - 1; i++) { for(int j = 0; j < size - i - 1; j++) { if((athlets[j].mass > athlets[j+1].mass) || (a...
f5835bcd65fd0881cf871d9a739e39cf79e19411
759f9fc22b59ee894607d590e00119297096d3de
pvnick/data_structures_and_algorithms
/projects/2/part5/input/include/parts1_4/part4bonus/source/operation_failures.cpp
C++
cpp
3,817
no_license
#include "unit_tests.h" #include "catch/catch.hpp" SCENARIO( "Various operations fail and indicate as such with their return values" ) { GIVEN( "An AVL map with integer keys" ) { cop3530::AVL<int, int> map(1000); int value; REQUIRE(map.remove(5, value) == 0); REQUIRE(map.search(5, v...
75de6f0a2192a67300b2844c5a27d310802a9b81
7ad63d8c0b7ce233219b28ba51d385fd6b20ba43
AnthonySong98/cuda_scheduling_examiner_mirror
/src/third_party/VisionWorks-1.6-Demos/demos/motion_estimation/main_motion_estimation.cpp
C++
cpp
11,832
permissive
/* # Copyright (c) 2014-2016, NVIDIA CORPORATION. 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 cond...
1f980576535602d7077c3f5661e64f8cdeea0bd5
15fde96804d53234a1388dcb73040fb158320fba
grganzaroli/projeto_grc
/gr-mack_sdr_rossi/lib/Parity_interleaver_ATSC_impl.cc
C++
cc
3,099
no_license
/* -*- c++ -*- */ /* * Copyright 2018 <+YOU OR YOUR COMPANY+>. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This software i...
53b79b6cd7e59f6af82555e1d8c964435206987c
13641f3c8f7cc13ad60420bc3dc6aa123e8647e8
gvvynplaine/chrono
/src/chrono_vehicle/chassis/RigidChassis.cpp
C++
cpp
7,424
permissive
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
a0a134bd0ded8178a31a570b5811f0419c148a98
126c89be278a309c5f694d81af9cad46b201e144
theqbz/AZUL-qbz
/AZUL-qbz/hibakereseshez.cpp
C++
cpp
2,057
no_license
#include"iostream" #include"iomanip" #include"cmath" #include"cstdlib" #include"ctime" using namespace std; void GZsakListazas(int z[], int d[], int a[], int cv, string szoveg) //z[] zsák-, d, dobott-, a asztal tömb, cv a csempevariációk, szoveg a kiírandó szöveg { cout << "\n\n* * * HIBAKERESES:\n* * * " << szove...
6149110616986928e0d337706ced11242a7c867c
efd84dc75307cbfd298550b95ee2a84221bbf7ac
AABHINAAV/InterviewPrep
/Backtracking/Parenthesis_Gen.cpp
C++
cpp
1,196
permissive
/*Generate all Parentheses IIBookmark Suggest Edit Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses of length 2*n. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()()" Make sure the returned list of strings are sorted.*/ ...
e43554ee79d3fe8ec408610c97652a1b279f787d
1b6c476d34af97d17a2d67f7599232f67e76cb38
jhlq/Qt
/test0/src/main.cpp
C++
cpp
2,186
no_license
#include <QApplication> #include "mainwindow.h" #include <shark/Data/Csv.h> #include <shark/Algorithms/Trainers/LDA.h> #include <shark/ObjectiveFunctions/Loss/ZeroOneLoss.h> using namespace shark; #include <iostream> using namespace std; #include "trianglegrid.h" int main(int argc, char *argv[]){ Triangle t1=T...
75023b3da40743e4fb2877cb7dd75a157a0f85d0
ebde365c57e15f2dd042c2cace1c607d2befcc65
chopraji94/DATA-STRUCTURE
/Theory/breadth first search/main.cpp
C++
cpp
1,023
no_license
#include <iostream> using namespace std; int main() { int a[10][10],i,j,m,n,v1,v2,v; int qu[10]; int visit[10]={0}; int visited[10] = {0}; int front = -1; int rare = -1; cout<<"Enter the number of vertices\n"; cin>>n; cout<<"Enter the number of edges\n"; cin>>m; for(i=1;i<=...
8a457b3cac837d8a3846fb380e52b98498a935b2
e66e68c800ba4d881942fac2fb4fb238415ae7ba
nischalbasuti/CGA_Project
/src/sphereGlBody.cpp
C++
cpp
1,940
no_license
#include "sphereGlBody.h" SphereGlBody :: SphereGlBody(float radius) { this->radius = radius; this->rgba[0] = 0; this->rgba[1] = 1; this->rgba[2] = 2; this->rgba[3] = 3; this->isTextureBound = false; } void SphereGlBody :: setColor(float r, float g, float b, float a) { this->rgba[0] = r; ...
d66fb92f32c22080b86a37b81f34e7e057fab93d
89acf163f254ab50081b093d81dbefe162c214c6
AlbertSid/ouzel
/ouzel/input/Mouse.cpp
C++
cpp
4,337
permissive
// Copyright 2015-2019 Elviss Strazdins. All rights reserved. #include <algorithm> #include <iterator> #include "Mouse.hpp" #include "InputManager.hpp" #include "Cursor.hpp" #include "core/Engine.hpp" #include "events/EventDispatcher.hpp" namespace ouzel { namespace input { Mouse::Mouse(InputManager& ...
cae780da005012145e715243a2ceb6344b4f210d
2ae867bcc6baa4a01c28a808b9e59671927ac492
LennardSchmit/KBS-ESA
/KBS_Sprint3/WalkingAnimation.cpp
C++
cpp
18,108
no_license
#include "WalkingAnimation.h" #include <MI0283QT9.h> #include "Arduino.h" #include "Color.h" //Alle ontwerpen voor blokken, karakters en bommen. uint8_t destroyableBlock[12][12] = { {1,1,1,1,1,1,1,1,1,1,1,1}, {2,2,2,2,2,1,2,2,2,2,2,1}, {2,2,2,2,2,1,2,2,2,2,2,1}, {1,1,1,1,1,1,1,1,1,1,1,1}, {2,2,1,2,2,2,2,2,1,...
796121ac558d42a02d4d022b0ef22b21390adb6e
e05cd95367ca0861555628bcfb6a2cda031bed06
hardikk13/nglod
/sdf-net/lib/submodules/libigl/tutorial/704_SignedDistance/main.cpp
C++
cpp
4,742
permissive
#include <igl/cat.h> #include <igl/edge_lengths.h> #include <igl/parula.h> #include <igl/per_edge_normals.h> #include <igl/per_face_normals.h> #include <igl/per_vertex_normals.h> #include <igl/point_mesh_squared_distance.h> #include <igl/readMESH.h> #include <igl/signed_distance.h> #include <igl/slice_mask.h> ...
7c50cb16965b74379e36c08321dbc17ac5f33dc5
b2c7cb8859cdd3ae98809418c1c34e836d2bb79a
jtatman/PesetacoinCore
/src/test/checkblock_tests.cpp
C++
cpp
1,784
permissive
// Copyright (c) 2013-2014 The Bitcoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // // Unit tests for block.CheckBlock() // #include "main.h" #include "auxpow.h" #include <cstdio> #include <boost/f...
e60e11b7cfbfe91eca33a7252aabfcb82511ee2d
89366eb28bd9367cfb5a44329faaf4302d696ba8
PlumpMath/panda3d-3
/src/lib/tools/flt/fltHeader.cxx
C++
cxx
66,174
permissive
// Filename: fltHeader.cxx // Created by: drose (24Aug00) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should ...
3502107476295e1f214b08885b834dfe3d36333d
ab4fbe15bec85bed9719c2b1aa43d44da6a7fc7b
en30/online-judge
/atcoder/abc128_c.cpp
C++
cpp
573
no_license
#include <bits/stdc++.h> #include "../include/template" int N, M; int main() { cin >> N >> M; vector<vector<int>> sw(M); rep(i, M) { int k; cin >> k; rep(j, k) { int s; cin >> s; sw[i].push_back(s - 1); } } vector<int> p(M); rep(i, M) cin >> p[i]; int ans = 0; rep(...
2c48f03b56b2367721273746001373a36b280149
bf1c2389c002fb4dfff0dac68b35943be062d388
chilbok/project_Chilbok
/algorithmProblemSolving/boj/10817 세수.cpp
C++
cpp
456
no_license
#include <iostream> using namespace std; int main() { int a, b, c, temp = 0; cin >> a >> b >> c; if ((a - b)*(b - c)*(c - a) == 0) { if (a == b) cout << a; else if (b == c) cout << b; else if (a == c) cout << c; } else { if (a > b) { swap(a, b); } if (b > c) { swap(c, b); } if (a > b) { ...
ba042738c9d206d5b90092ab697b451f03db1f89
615178ece3f1d2c91510057c37678332f92935dd
MichaelBSikora/refactored-octo-engine
/magic_dates.cpp
C++
cpp
690
no_license
// A magic date is one in which when written in the following // format, MM-DD-YY, the month times the day equals the year. // This program asks a user to enter a date and the program // determines whether the month times the day equals the // year. #include <iostream> using namespace std; int main() { int Month,...
9eda4a2b3fdaa10934057d3cb65ac15815d6f35d
f12c1c2d3409e9969eac269bc48bec23eec4c838
NamSeungwoo/CppAlgorithm
/소스1.cpp
C++
cpp
533
no_license
#include <stdio.h> #define NUM_DISH 4 int win(int dishes[]) { int num_coins, i, j; for (i = 0; i < NUM_DISH; i++) { num_coins = dishes[i]; for (j = 1; j <= num_coins; j++) { dishes[i] = num_coins - j; if (win(dishes) == 0) { dishes[i] = num_coins; return 1; } } dishes[i] = num_coins; }...
2ceb829a586087c28917eed486d4b72658b9026c
dc6eeb1eebe4f39290d60dda476d9512f5f40707
devikakrishnadas/patrace
/patrace/src/common/in_file_mt.cpp
C++
cpp
11,699
permissive
#include <common/in_file_mt.hpp> #include <common/memoryinfo.hpp> #include <common/trace_limits.hpp> #include "jsoncpp/include/json/writer.h" #include "jsoncpp/include/json/reader.h" #include <unistd.h> using namespace os; using namespace std; namespace common { unsigned int gCompBufLen = 0; char* gCom...
94e5c918d1fc8d3ad89fd8a36dd777045e3c9b33
1eca2c4c5a63abd984d3f8e1f0931df91f4fbbc7
mysql1/TournamentCore
/src/server/scripts/Spells/spell_dk.cpp
C++
cpp
67,882
no_license
/* * Copyright (C) 2014-2015 TournamentCore * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the Lic...