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
329d264808033c5c08019859037633120109b906
614dbf8ff4b11fe7ca4b2445689b3fb9a2d14ce7
brisarte/brisalium
/src/fontes/FonteTeste.cpp
C++
cpp
1,047
no_license
#include "FonteTeste.h" FonteTeste::FonteTeste() { Fonte(); } void FonteTeste::setup(){ corTeste.set(255,0,0); // red cout << "Fonte carregada: Teste de cores;\n"; } void FonteTeste::draw(){ ofSetColor(corTeste); ofFill(); ofDrawRectangle( 0, 0, 256, 256); ofSetColor(0, 255, 0); // green ...
700bdb0fd417a19fb9d4e08684ad2848363e1b0b
91482bda62784951750e59bd7053be55702947ce
xmlb88/algorithm
/leetcode/island/200.numIslands.cpp
C++
cpp
2,561
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; constexpr static int dx[4] = {1, 0, -1, 0}; constexpr static int dy[4] = {0, 1, 0, -1}; int numIslands(vector<vector<char>>& grid) { int n = grid.size(), m = grid[0].size(); int res = 0; for (int i = 0; i < n; i++) { for (...
b04091c7d948031b1fb3c8d40ce93d327f1d1a67
3de7862271aacddb4f8491518d4cd93f542a253a
davidchai21/new-journey
/198 House Robber/HouseRobber.cc
C++
cc
462
no_license
class Solution { public: int rob(vector<int>& nums) { if (nums.empty()) return 0; if (nums.size() == 1) return nums.back(); if (nums.size() == 2) return max(nums[0], nums[1]); int first = nums[0]; int second = max(nums[1], nums[0]); for (int i=2;i<nums.size();i++) { ...
affd7c7fe0e1e2817dc25d18b5bc776b99366cb8
5fb972629f73f9cb35d0af989eb5533bda94e191
bright-starry-sky/nebula
/src/storage/InternalStorageServiceHandler.cpp
C++
cpp
1,150
permissive
/* Copyright (c) 2020 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "storage/InternalStorageServiceHandler.h" #include "storage/transaction/ChainAddEdgesProcessorRemote.h" #inclu...
89b3bf8cea8662ac79f24c7d550bfd9077961500
f34f806277b830c0041740f1cb788170a54763ee
ichi-raven/OpenSiv3D
/Siv3D/src/Siv3D-Platform/WindowsDesktop/Siv3D/Cursor/CCursor.cpp
C++
cpp
11,415
permissive
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2021 Ryo Suzuki // Copyright (c) 2016-2021 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # include <Siv3D/Common.hpp> # include <Siv3D/...
a1d61c11c2dcef37707c89cc410048f8ff23c3ca
ab1eefb856bbb347354ce05b4ee398b3f6499f09
FilipaDurao/Advent-Of-Code-2015
/Day 4 Part 2.cpp
C++
cpp
649
no_license
/* * Day 4 Part 2.cpp * * Created on: 28/11/2017 * Author: filipa */ #include <iostream> #include "md5.h" using namespace std; bool checkIf6Zeros(string hashed){ if(hashed.substr(0,6) == "000000"){ return true; } else return false; } int main(){ string input = "bgvyzdsv"; string character; ...
b8a5bb0104fd4853ae58e15c275dc59c370b28f1
c49b95402af3a84acc6edd0bb553ee7fc592558b
garbear/QuickNES_Core
/nes_emu/Nes_Rom.cpp
C++
cpp
2,932
no_license
// Nes_Emu 0.5.6. http://www.slack.net/~ant/ #include "Nes_Rom.h" #include <stdlib.h> #include <string.h> /* Copyright (C) 2004-2005 Shay Green. This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software...
e93589d6f5cb66c7cd89efc1811afa3740f06ac6
119f5055e01b6c164abe2ec7b8b84259cd62e81d
winkhanh/CSC319
/Project1/Project1Tests.cpp
C++
cpp
1,869
no_license
#include <cassert> #include "Project1.h" using std::cin; using std::cout; using std::endl; void genericTests() { assert(countWords("") == 0); cout << "test #1 completed" << endl; assert( countWords("! $ ? . , : ;") == 0); cout << "test #2 completed" << endl; assert( countWords("abc def") ==...
447902aceba5691096524bd0ea48c24287ff7897
d9c16b63e82e13ce164a22c35f8c2684c2e503ee
nnn112358/180312_imageCreate
/main.cpp
C++
cpp
9,082
no_license
#include "ofMain.h" #include "ofApp.h" extern double img_dpi; extern double img_width_mm; extern double img_height_mm; extern double HT_width_mm; extern double HT_height_mm; extern double gray_white; extern double gray_black_ave; extern double gray_black_std; extern double dot_circle_r_ave; extern double d...
86f2628ce530993e494b0b3d5f2a2f86ff6b552f
a6600d0e5540262ad3ea6b7e5e0459071fc4c6ef
Shubham28/TopCoder
/testprograms/PackingShapes.cpp
C++
cpp
6,547
no_license
#include <vector> #include <map> #include <queue> #include <algorithm> #include <sstream> #include <iostream> #include <cmath> #include <cstdlib> #include <set> #include <numeric> #define FOR(A,B,C) for(int A=B;A<C;A++) #define EFOR(A,B,C) for(int A=B;A<=C;A++) #define RFOR(A,B,C) for(int A=B;A>=C;A--) #define PB(A,B)...
2bce78f364f6bc4f104547b2f17df97b56be1082
9ddee9619c8ee16dce6585d1885ec14051b0c534
vangaru/labs_4_semester
/OOTISP/lab5/src/program1.cpp
C++
cpp
1,346
no_license
#include <iostream> #include <iterator> #include <set> using namespace std; int main() { multiset <char> mset1 = {'a', 'b', 'k', 'k', 'c', 'y', 'x', 'z'}; cout << endl << "multiset lookup: "; for(auto &item : mset1) { cout << item << " "; } cout << endl << "remove some elements and loo...
ab3ca2523037dc02276f3959df7fa4986506df8c
e28632d301f64e9a2adad8cf1803e31e1023147f
mdiannna/EmbeddedSystems
/lab5/lcd.cpp
C++
cpp
774
no_license
#include <Wire.h> #include <stdio.h> #include <Arduino.h> #include "lcd.h" #include <LiquidCrystal_I2C.h> //initialize the liquid crystal library //the first parameter is the I2C address //the second parameter is how many rows are on your screen //the third parameter is how many columns are on your screen // For rea...
c6409712fb860d1c1ce6a6e9d62ec8fa044ba2dd
0a05a0923706dd220f37611e76c4c47db563eb1c
rfabbri/vxl-1
/core/vidl/vidl_ffmpeg_ostream_params.cxx
C++
cxx
3,139
no_license
// This is core/vidl/vidl_ffmpeg_ostream_params.cxx #include "vidl_ffmpeg_ostream_params.h" //: // \file // \author Matt Leotta // \date 3 Jan 2006 // //----------------------------------------------------------------------------- #include <vidl/vidl_config.h> #if VIDL_HAS_FFMPEG // some versions of FFMPEG require ...
5d89d5fee9aa8e34a7a33bd0c5b15207621ed407
26b144ea574f01db1888c08c52a628020f495568
linmonsv/C_CPP
/Professional C++/t_21_7_2_template_loop.cpp
C++
cpp
603
no_license
#include <iostream> #include <string> #include <functional> using namespace std; template<int i> class Loop { public: template <typename FuncType> static inline void Do(FuncType func) { Loop<i - 1>::Do(func); func(i); } }; template<> class Loop<0> { public: template <typename FuncType> static inline void Do(...
42d7bddb0b084c58b653256645c71dbc128a3e04
db64c3e18fc441f4cc884a68437caa985978ebaf
austian/MonteCarloDerivativePricing
/Jump Diffusion/Option.cpp
C++
cpp
2,666
no_license
#include <algorithm> #include "Option.h" #include <vector> #include "PathGenerator.h" #include "Parameters.h" #include <cmath> #include "RandomNumber.h" #include <iostream> using namespace std; const double pi = 3.14159265358979325; CallOption::CallOption(double Strike) : Strike(Strike) {} double CallOption::Payoff(...
4e9882215b86f1baf98ba1b875745f09e3993489
b05629ab81a0394ee268345c6484d01fc663d290
gabrielmorete/Competitive-Programming
/Code Forces Gym/UBC 2019/b.cpp
C++
cpp
1,850
no_license
#include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define ms(x,i) memset(x,i,sizeof(x)) #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.b...
c02afc562e95d5362b51e7ba8fe7d4e4796a54c0
ca647afa000e61628ca4cf423f09f5e787a547c8
kubonits/atcoder
/abc/200/260/abc262/d/main.cpp
C++
cpp
1,128
no_license
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define MOD 1000000007 #define MOD2 998244353 using namespace std; typedef long long ll; #include <cstring> int main() { ...
3fe4ab3b397b66774309fd5301004af863404f99
43751c11e9f1e81bd60de7bcaa6e25c203436ef3
shuvokr/LeetCode_Solution
/Algorithms/1154.DayOfTheYear.cpp
C++
cpp
773
no_license
class Solution { public: int dayOfYear(string date) { int daysInMonth[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; vector<int> v; char *tok; char *str = const_cast<char*>(date.c_str()); tok = strtok(str, "-"); while(tok != NULL) { v.push_back(a...
5cf21bbc0395d257733e5ddd70cf6306a1dfe817
6b48a982a165d3f22df58190b34bb46b4418e793
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_Ocean_Basilosaurus_Character_BP_classes.hpp
C++
hpp
906
permissive
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_Ocean_Basilosaurus_Character_BP_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //-----------------------------------------...
d5baf69d37f4f7bc44d6588e31c8e83cad0ea46b
09ddc8fb1034f3ecce4e30ef9f45d92aa44bf8ae
brunolauze/openpegasus-providers-old
/src/Providers/UNIXProviders/PhysicalCredentialAuthentication/UNIX_PhysicalCredentialAuthentication.cpp
C++
cpp
3,926
permissive
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
3cffa09e0762a5edd7daa3f8a2ae51f92d884b83
77876b1bec335c6790fa70e91d20224900c25165
Elviraali/5LR
/PSZI 5LR/PSZI 5LR/PSZI 5LR.cpp
C++
cpp
1,020
no_license
#include <iostream> #include <time.h> using namespace std; void main() { int N; cout << "Vvedite dlinu parolia:\n"; //выводим сообщение N = 6; //считываем длину пароля srand(time(NULL)); //инициализируем генератор случайных чисел char* pass = new char[N + 1]; //выделяем память для строки пароля for ...
640fc02a08747ead8e574a97212254d2fc6a5a1f
7fc7ad2b2a9eeaa942d53a3ab44292a73bd00dfe
neopenx/caffe2
/caffe2/core/operator_schema_test.cc
C++
cc
4,209
permissive
#include "caffe2/core/operator_schema.h" #include "caffe2/core/logging.h" #include "caffe2/utils/proto_utils.h" #include "gtest/gtest.h" namespace caffe2 { OPERATOR_SCHEMA(OpSchemaTestOp) .NumInputs(1).NumOutputs(1); TEST(OperatorSchemaTest, BasicSchema) { const OpSchema* schema = OpSchemaRegistry::Schema("OpSc...
bb5f2c462ffa934df680a1f7dd2bd79cbf1cc537
750c2e328bba306d800a1334ac5feb885c0a047c
smil-in-javascript/blink
/Source/modules/notifications/Notification.cpp
C++
cpp
6,454
permissive
/* * Copyright (C) 2013 Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
9c02cf3cd7a852c5d4c69ae517484cf884e4a62c
dffb4fc883688c5c2ff48aaf38b58e3034fb5fe8
profoundsoul/chromium
/mojo/public/tools/fuzzers/mojo_parse_message_proto_fuzzer.cc
C++
cc
2,628
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. // Implementation of a proto version of mojo_parse_message_fuzzer that sends // multiple messages per run. #include "base/message_loop/message_loop.h" #i...
507c9e6df4f87541889f051420ea46cae67065a0
322ef3d4b9e13a68de88955e5b64a5d4fdb33a68
lukka/chromium
/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
C++
cc
18,727
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/media/in_process_video_capture_device_launcher.h" #include <utility> #include <vector> #include "base/bind.h" #i...
b01552da201fc3ab88444209783329aa24d6d5a0
03e4aaa9ebc3d9a5c069a289951fe13e3dbfd860
ZJULiHongxin/Path-Planning-Based-on-Astar-for-Soccer-Robots
/robot_static_path_planning/robotest/main.cpp
C++
cpp
14,564
permissive
/*---------------------------------------------------------------- // Copyright (C) 2019 李鸿鑫 // 版权所有。 // // 文件名:main.cpp // 文件功能描述:静态路径规划,使用A* // // // 创建者:李鸿鑫(Hongxin Li) // 时间:2019/8/26 // // 版本:V1.0.0 //----------------------------------------------------------------*/ #include "astar.h" #include "receive.h" #inclu...
db1ab2f898514f49c2349317f06e119d2d7ce6ea
5839086681d33989b8ab26d8136e50f9aa5eaf4b
curtiszimmerman/sneezymud
/code/code/misc/periodic.cc
C++
cc
75,770
no_license
////////////////////////////////////////////////////////////////////////// // // SneezyMUD - All rights reserved, SneezyMUD Coding Team // // periodic.cc : functions that are called periodically by the game // /////////////////////////////////////////////////////////////////////////// #include <stdio.h> #inclu...
b855e80ce4363483e56a46d4cd241d21f33dbac9
cac65edb5950646df0f900bcef5ea942a5406bfa
Grbt49/cobalt
/cobalt/media/filters/vp9_uncompressed_header_parser.cc
C++
cc
30,813
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 "cobalt/media/filters/vp9_uncompressed_header_parser.h" #include "base/logging.h" #include "starboard/memory.h" namespace cobalt { namespace me...
e739242b0b1a09818100736be4d5f35eec757706
23250c86cee8fc8e974439d723a617e0261feb99
xiaolizi521/PenguinShooter
/bubbleBeam.cpp
C++
cpp
2,266
no_license
#include "bubbleBeam.h" #include <iostream> Beam::Beam() { xdirR = speed; xdirL = -speed; ydir = 0; image.load("robotBullet.png"); rect = image.rect(); resetState(); } Beam::~Beam() { //std::cout << ("Beam deleted\n"); } void Beam::startPosition(int px, int py) { rect.moveTo(px, py); } void Beam:...
82b2a8dd28862ff496d977e87eb9c615518fd5e0
3dd5b0ca4af3c4757144317b884fe9f53b658f69
SammyEnigma/CQCharts
/test/CLorenzCalc.cpp
C++
cpp
1,756
permissive
#include <CLorenzCalc.h> #include <CRungeKutta.h> double CLorenzCalc::A { 10.0 }; double CLorenzCalc::B { 28.0 }; double CLorenzCalc::C { 8.0/3.0 }; double CLorenzCalc::xmin_ = -17.99; double CLorenzCalc::ymin_ = -24.15; double CLorenzCalc::zmin_ = 0.00; double CLorenzCalc::xmax_ = 19.83; double CLorenzCalc::ymax_...
5f8ddc43e99e02449114feea881d05fe1bd8b331
0f56b0c3db1cb6d1b7a4959ed5398dd4a0daf5a7
MakerPlayground/MakerPlayground_Library
/lib/arduino/MP_BLYNK_NOTIFICATION/MP_BLYNK_NOTIFICATION.cpp
C++
cpp
566
no_license
#include "MP_BLYNK_NOTIFICATION.h" MP_BLYNK_NOTIFICATION::MP_BLYNK_NOTIFICATION(MP_BLYNK* blynk) : blynk(blynk) { } int MP_BLYNK_NOTIFICATION::init() { if (!blynk) return MP_ERR_INTERNAL_ERROR; if (!blynk->isReady()) return MP_ERR_CLIENT_NOT_READY; return MP_ERR_OK; } void MP_BLYNK_N...
7c0b981c285feb2fe17e59b16984fdd260ce216e
b881309d47f4773efa51d2bf4ec5d445a65b0f3c
robort-yuan/AI-EXPRESS
/source/solution_zoo/xstream/methods/postprocessmethod/src/PostProcessMethod.cc
C++
cc
2,139
permissive
/** * Copyright (c) 2020 Horizon Robotics. All rights reserved. * @File: postprocess_method.cc * @Brief: definition of the PostProcessMethod * @Author: zhe.sun * @Email: zhe.sun@horizon.ai * @Date: 2020-08-25 14:28:17 * @Last Modified by: zhe.sun * @Last Modified time: 2020-08-25 16:21:08 */ #include "PostPro...
5b94daaa5f7b8ab4bb6f2f05ef2cc60cbb8bbc24
29c3130372592413d224be2c52e2c78abf0390f3
yaskh/C-Oop-project
/Food Store/ProjectFinalFinal/Email.cpp
C++
cpp
1,530
no_license
#include "stdafx.h" #include "Email.h" #include <string> #include "easendmailobj.tlh" #include <conio.h> using namespace EASendMailObjLib; Email::Email() { } Email::~Email() { } void Email:: sendEmail(string email) { _bstr_t em; em = email.c_str(); ::CoInitialize(NULL); IMailPtr oSmtp = NULL; oSmtp.CreateI...
ead6c1455eb8b8a8b2b2b1f7e3f095e87ad0b337
58e8af1d2d4da0cc1f36faf13fc09fe690134943
Renelvon/ProjectEuler
/prob25/main.cpp
C++
cpp
1,070
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { const unsigned int numDigits = 1000; int f[3][numDigits + 1]; for (unsigned int i = 0; i < 3; ++i) { fill(f[i], f[i] + numDigits + 1, -1); } f[0][0] = 0; f[1][0] = 1; ...
47b7ab73b6bd6623cc1f257dafdc22a0b4ea49f3
c42d7f81d7a8455337822d4b827b99d387f5f795
mmywong/CS3A
/9-6 add entry/9-6/9-6.cpp
C++
cpp
3,374
no_license
#include <iostream> #include <string> #include <iomanip> using namespace std; int find(string entrytoDelete, string temp[], int &size); string *AddEntry(string *dynamicArray, int &size, string newEntry); string *DeleteEntry(string *dynamicArray, int &size, string entryToDelete); int main() { cout<<"<++++++++++++...
c70d60fb7e81879f8607401748162d7bec6d8399
8793d15cee4756459458b7b720d80ab20891a112
seungjae-yu/Algorithm-Solving-BOJ
/kimug2145/01927/1927.cpp14.cpp
C++
cpp
344
no_license
#include <iostream> #include <queue> using namespace std; int n; long long inp; priority_queue<long long> pq; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%lld", &inp); if (inp == 0) { if (pq.empty()) printf("0\n"); else printf("%lld\n", -pq.top()), pq.pop(); } el...
be6b872011bca62cb6adf6ca35d1a3904afc1128
477bfdde8c790dcee1e356204f439f41f3412f7f
youtube/cobalt
/third_party/llvm-project/libcxx/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp
C++
cpp
16,848
permissive
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
f535ffaa273b61520fd30a557fa4b2aff865dae6
a1b1a5b95669ac449012c0c57c2d5c75778fca34
RandomVar/ACM_Template
/Data_Structure/Union-Find_Set.cpp
C++
cpp
928
no_license
/*并查集(带路径压缩)*/ const int maxn= " "; int p[maxn]; void init(int n) { for(int i=0; i<=n; i++) p[i]=i; } int Find(int x) { if(x==p[x]) return p[x]; int y=Find(p[x]); return p[x]=y; } int Union(int x,int y) { int x1=Find(x); int y1=Find(y); if(x1==y1) return 0; p[x1]...
c47f14506ac5c3cd36e9fb823f7f4e2c6ef212f0
f5351ec492f8b7e290782d8d401986f7bfa587f3
tiagoalmeida92/P3DStuff
/assignment1/code/Assignment1/plane.cpp
C++
cpp
1,380
no_license
#include "plane.h" #include <stdio.h> Plane::Plane(glm::vec3 position1, glm::vec3 position2, glm::vec3 position3) { this->type = PLANE; this->position = position1; this->position2 = position2; this->position3 = position3; this->material = NULL; this->normal = glm::cross((this->getPosition2() - this->getPosition...
ad4bcf4ef5a3a541b949a0f48a1ea7ea83a248a5
c8fd6bc704299aea363a849bf2a7a53698f0c27a
Rp-sushil/meAMC14203
/1_1.cpp
C++
cpp
318
no_license
#include <iostream> using namespace std; int main() { int n; do { cout << "Enter N:"; cin >> n; } while (n <= 0); cout << "Divisor of N are: "; for (int i = 1; i <= n / 2; i++) { if (n % i == 0) { cout << i << " "; } } return 0; }
f8d29a105fc12a54dd91915ed070b2d6fd7979a1
4f0004c61652a029fe43e1fa5dae42555c2f150f
XUqilian/Cproject
/cpp primer plus/chapterfourteen/afterclass/stackworker.cpp
C++
cpp
2,826
no_license
#include<string> #include<iostream> #include<string> using std::string; using std::cout; using std::endl; using std::cin; //****************************************************************** class Worker { private: // char * name; string name; int id; public: Worker():name(),id(...
0af7e34870f9588c049ce6c64c3ef1fd20fbbe6e
aa387339541c6e33aa8e512025324b096078e4d7
waynezhangw/LeetCode-solutions
/Medium/378_kthSmallestElementInSortedMatrix_improved.cpp
C++
cpp
916
no_license
class Solution { public: int kthSmallest(vector<vector<int>>& matrix, int k) { unsigned int n=matrix[0].size(); int low=matrix[0][0]; int high=matrix[n-1][n-1]; while(low<=high) { double middle=low+double(high-low)/2.0; int lessNum=getLessEqualNum(matrix,m...
3dec43b17cab0bf17260161f01eba35f59b5ea5a
9209979f483cd4b4ec6f745de3f428194ceb00e6
mfkiwl/Software-Defined-Radar-Simulator
/include/input/AnalogSinusoidGenerator.hpp
C++
hpp
2,100
no_license
// Copyright (c) 2010 Ryan Seal <rlseal -at- gmail.com> // // This file is part of Software Defined Radar Simulator (SDRS) Software. // // SDRS 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 ...
a76d5d958fc1014e05740a5c25108f8a1d60b59e
0e6cd1cf5571e9515b41541bcb75e30503d4e517
Hans2004/Anycubic-Photon-decreasePixel-with-GUI
/photonfile.cpp
C++
cpp
9,682
no_license
#include "photonfile.h" using namespace std; PhotonFile::PhotonFile( FILE *file ) { fp = file; readHeader(); readPreview(); readLayerDefs(); readImages(); } PhotonFile::PhotonFile( string fileName ) { fp=fopen(fileName.c_str(), "rb"); readHeader(); readPreview(); readLayerDefs(); ...
d5b05e1a443b433bb822ea33e8c6758e81371e13
fb4e240b843939be57a0ad9f2eb215479f890005
ilvcr/Cpplgproject
/algorithmforcpp/paranthesis_matching.cpp
C++
cpp
1,351
permissive
/************************************************************************* > File Name: paranthesis_matching.cpp > Author: yoghourt->ilvcr > Mail: liyaoliu@foxmail.com @@ ilvcr@outlook.com > Created Time: 2018年07月17日 星期二 14时49分01秒 > Description: ********************************************************************...
108d12c60c75d3ff15ac456d49d239bfe4ca9571
8dadc4cd67b21ccf2daee24236e88edd64c23709
sergmetelin/eos
/libraries/chain/include/eos/chain/producer_objects.hpp
C++
hpp
12,465
permissive
/** * @file * @copyright defined in eos/LICENSE.txt */ #pragma once #include <eos/chain/types.hpp> #include <eos/chain/multi_index_includes.hpp> #include <eos/types/types.hpp> #include <eos/utilities/exception_macros.hpp> #include <chainbase/chainbase.hpp> #include <boost/multi_index/mem_fun.hpp> namespace e...
44f980c9771b44e333b4e6fbe134e95685d311d9
2a627293eba82b7dafc8fcb32e6f65ce0738b374
kamyu104/LeetCode-Solutions
/C++/design-excel-sum-formula.cpp
C++
cpp
2,827
permissive
// Time: set: O((r * c)^2) // get: O(1) // sum: O((r * c)^2) // Space: O(r * c) class Excel { public: Excel(int H, char W) : Exl_(H + 1, vector<int>(W - 'A' + 1)) { } // Time: O((r * c)^2) void set(int r, char c, int v) { auto col = c - 'A'; reset_dependency(r, col)...
1f021336cf5048936b48b2a1ef72c38e833636ef
c98426112e48ba2fce4127a96e5cd930c71f8649
blackberry/Boost
/libs/fusion/test/sequence/vector_construction.cpp
C++
cpp
595
permissive
/*============================================================================= Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0...
182f17a25aceff443960a40dad1af5059da101c1
37d12e060f118856126ed3fa452917cea86d44cb
dipendughosh/programs
/MYDEVC/CLASS/CLASSTO.CPP
C++
cpp
1,387
no_license
#include <iostream.h> #include <stdlib.h> #include <conio.h> class set { int arr[],n; public: set(int nn) { n = nn; } void readElements() { cout<<"\n"<<n; for(int i = 0; i < 4; i++) { cout<<"\nEnter data : "<<i<<" "; cin>>arr[i]; }...
a27ec8980ff3f874cb45006108bb4801718f3cec
3eeaffd9d98549fbdad742d82d11f7a5a27903f8
mtulio/kb
/Faculdade/2007-2_-_II/Programacao_II/Ex03_-_NumerosInteiros/source_extra/hexadecimal.cpp
C++
cpp
1,324
permissive
void numeroNatural::binario(unsigned long N))const { int bin, /* numero dado convertido para base 2 */ aux, /* auxiliar */ dig, /* guardara cada um dos digitos binarios */ pot; /* potencia de 10 */ /* inicializacoes */ aux = N; b...
5783bb0f28304da329dd72abb5e44f58d94e7a20
e3e399c65c73625be3ad0539b860356b26d4910f
Manan007224/street-coding
/Leetcode/shortest_bridge.cpp
C++
cpp
1,427
no_license
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int,int> pt; typedef vector<pt> vt; vi dx={-1,1,0,0}; vi dy={0,0,1,-1}; #define INF 0x3f3f3f3f class Solution { private: vt sa, sb; public: int shortestBridge(vector<vector<int>>& A) { int lr = A.size()...
7b95fce95974fb63b49b13ea40b09d655ae53055
55522494b21f5054aa6297b91b7f4e349276cd1b
willkill07/RAJA
/include/RAJA/index/RangeSegment.hpp
C++
hpp
11,552
no_license
/*! ****************************************************************************** * * \file * * \brief RAJA header file defining range segment classes. * ****************************************************************************** */ #ifndef RAJA_RangeSegment_HXX #define RAJA_RangeSegment_HXX //~~~~~~~~~...
ea6f50581959695e1beb71f48264ad70a5f08f6e
671cbf0847f5cae69d8453a83760cebd791c38d0
lyrahgames/cpp-basic-course
/fibonacci/main.cc
C++
cc
275
permissive
#include <cassert> #include <iostream> int fibonacci(int n) { assert(n >= 0); if (n <= 1) return 1; return fibonacci(n - 1) + fibonacci(n - 2); } int main() { for (int i = -1; i < 20; ++i) std::cout << "fibonacci(" << i << ") = " << fibonacci(i) << std::endl; }
aa69c946976da8d9a3966ec8dda8872dfa8413ac
0b109cbde183e329faaff950cd8e52ff8950cbbd
nuPRISM/mpmt-test-stand
/firmware/lib/TemperatureDAQ/src/Thermistor10k.cpp
C++
cpp
1,466
no_license
/** * @file Thermistor10k.cpp * Thermistor 10k temperature measurements. */ #include "Thermistor10k.h" #include <Arduino.h> /** * @param pin - Arduino Due pin */ Thermistor10k::Thermistor10k(uint32_t pin, ThermistorCalibration &calibration) : thermistorPin(pin), calibration(calibration) { } /** * Obtain...
99f02abd0b7e488b740680932e0c6301b5789480
eacaec7f44b16ef5de4061f3aa42f1237333b0e2
ikhaled28/lamure
/preprocessing/src/reduction_random.cpp
C++
cpp
3,421
permissive
// Copyright (c) 2014 Bauhaus-Universitaet Weimar // This Software is distributed under the Modified BSD License, see license.txt. // // Virtual Reality and Visualization Research Group // Faculty of Media, Bauhaus-Universitaet Weimar // http://www.uni-weimar.de/medien/vr #ifdef CMAKE_OPTION_ENABLE_ALTERNATIVE_STRATE...
5719cfbc25bccbda99a0aec831c15c4c0c451e53
cb257951d1b1ebd2b5e0a6c41c1e52fd2a30d1bc
kianoosh-j/HMAX
/Backups/BeforeSVN-May30-12%3A31PM/Hmax/implementations/libsvm.cpp
C++
cpp
5,234
no_license
#include "libsvm.h" #include "headers.h" int convert_c2_results_float_train_to_libsvm_problem ( struct svm_problem *prob ,float ** C2_results , vector<int> sizes,int numoffeatures ) { int train_size=sizes[0]+sizes[1]; prob->l=0; prob->l=train_size; prob->y =new double [train_size]; prob->x =new svm_nod...
806c6c5060f830bc3e4153e74e7b9127e56899c3
5d228694b44d640a9a40610b9bc46df4fb3bfc63
ansungho22/algorithm-practice
/[프로그래머스]네트워크/소스.cpp
C++
cpp
737
no_license
//³×Æ®¿öÅ© #include <string> #include <vector> #include <iostream> using namespace std; int com[200][200] = { 0, }; void dfs(int i,int j,int n) { com[i][j] = 0; com[j][i] = 0; for (int visit = 0; visit < n; visit++) { if (com[i][visit] == 1)dfs(visit,i, n); } } int solution(int n, vector<vector<int>> computers) ...
04257502c3980a5f5fe5eec490c9eebf9dcd5100
bc2d55917000c70f5980d23952c024599972e914
amross/GameDemo
/cardslot.cpp
C++
cpp
1,159
no_license
#include "cardslot.h" #include <QDebug> #include <QPainter> CardSlot::CardSlot(QWidget* parent, Qt::WindowFlags f) : QLabel(parent) { Q_UNUSED(f); setFrameStyle(QFrame::Panel | QFrame::Sunken); setFocusPolicy(Qt::StrongFocus); setScaledContents(true); QPixmap pix(60, 100); pix.fill(Qt::blac...
77cd30094b13439458fcebbd98705f8ef3d0a490
76fb63b29cea52c6d113846261d0aa8053eb42ba
ADKaster/serenity
/Userland/Utilities/nc.cpp
C++
cpp
11,704
permissive
/* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2023, Fabian Dellwing <fabian@dellwing.net> * * SPDX-License-Identifier: BSD-2-Clause */ #include <AK/ByteBuffer.h> #include <AK/HashTable.h> #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> #include <LibCore/Socket.h...
5c087fb294fc5c6262623845ba37e6b913d8078c
eb8c04f4ee208e723a5f9571772cc6ec06b2f308
zachliu/rayTracer
/raytracer/GeometricObjects/Primitives/Rectangle.cpp
C++
cpp
4,648
no_license
// Copyright (C) Kevin Suffern 2000-2007. // This C++ code is for non-commercial purposes only. // This C++ code is licensed under the GNU General Public License Version 2. // See the file COPYING.txt for the full license. #include "Rectangle.h" const double Rectangle::kEpsilon = 0.001; // ------------------------...
8a7b07ec366509e1d8dd4855c8353aca90a49e33
9a8d2836ce46dce3183b45ffa75fffc7b436fd22
Vukkk/PUBG-SDK
/SDK/PUBG_P_VehicleSkidAccel_Dirt_BP_classes.hpp
C++
hpp
699
no_license
#pragma once // PLAYERUNKNOWN BattleGrounds (2.4.22) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace Classes { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClas...
b187437b67cb09b17fbeee785b067551a80b9ef3
aa35d8885f988e3b4e350b8f7f89f14316cad816
SoftwareNetwork/specifications
/5b/32/20/c9/58c2f9c144273766198e71ace7586b8272ded48e86970f23efdcd11497f5ab7b7205140df9a3622e387e57c82c895358b6cc6732e6354fde2a989332/sw.cpp
C++
cpp
13,154
no_license
void build(Solution &s) { auto &gdcm = s.addProject("malaterre.GDCM", "3.0.9"); gdcm += Git("https://github.com/malaterre/GDCM", "v{v}"); auto &rle = gdcm.addStaticLibrary("rle"); { rle += "Utilities/gdcmrle/.*\\.cxx"_rr; rle += "Utilities/gdcmrle/.*\\.h"_rr; rle -= "Utilities/g...
4d81d22040f2443e445da2181db363c293e8fad3
e7e957e21b0482b20c4778c6f651df70a222bbf5
Odex-Developer/odex-core
/src/activemasternode.cpp
C++
cpp
19,242
permissive
// Copyright (c) 2014-2016 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "activemasternode.h" #include "addrman.h" #include "masternode.h" #includ...
0960b51d86f8c4f0914db3190a1180858b5332ac
43eedb2cbe2b0214619694e310650daa9a7489f3
kusvas/PolMan
/Components/FastReport 4.12/LibD16/frxEditMemo.hpp
C++
hpp
3,947
no_license
// CodeGear C++Builder // Copyright (c) 1995, 2011 by Embarcadero Technologies, Inc. // All rights reserved // (DO NOT EDIT: machine generated header) 'frxEditMemo.pas' rev: 23.00 (Win32) #ifndef FrxeditmemoHPP #define FrxeditmemoHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All warni...
43384e45aa578f84f3a0550c46617e64e8e2b5b0
6ce1dec70b8f54d1c8bb71646c13347eaa760c86
developer-wenren/PlaneProject
/Classes/AppDelegate.cpp
C++
cpp
1,591
no_license
#include "AppDelegate.h" #include "GameScene.h" #include "Define.h" USING_NS_CC; AppDelegate::AppDelegate() { } AppDelegate::~AppDelegate() { } bool AppDelegate::applicationDidFinishLaunching() { // initialize director CCDirector* pDirector = CCDirector::sharedDirector(); CCEGLView* pEGLView = CCEGLVie...
93196f7316a33aa6652f947fce1802cd2c66ebbe
fb57f2225b676d54e9e5e0407a24057176b32380
SkiRka/OneProject
/ProgrammNeNolAbs/ProgrammNeNolAbs/NeNolAbs.cpp
C++
cpp
777
no_license
// nenolabs.cpp -- находит сумму, разность, произведение и частное квадратов чисел #include <iostream> #include <cmath> int main(){ using namespace std; // вводим два ненулевых числа cout << "Введите два числа: "; int pervoe, vtoroe; cin >> pervoe >> vtoroe; int obshee; obshee = pow(pervoe,2) + pow(vtoroe,...
b2724f5cb616f34ab3d16fba8312852c30d23f55
2d75840c69a322da6d39e0a04d843135f37521ce
Ansar023459/QDialogButtonBox
/mainwindow.cpp
C++
cpp
1,313
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFile> #include <QFileDialog> #include <QMessageBox> #include <QTextStream> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; ...
256081c45fc54d6390d1b86f5eee83740f8a16a9
cef2dc49085966ff278c32d0f9b2a408539d3fb2
isabella232/stdcxx
/tests/localization/22.locale.ctype.is.cpp
C++
cpp
31,383
permissive
/*************************************************************************** * * 22.locale.ctype.is.cpp - Tests exercising the is() of ctype facet * * $Id$ * *************************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one or more * co...
8373feeaf2582bf24fe6a059f15f38c849eb556e
cf22078f4fc02b5b047928a6677acc413861f1b2
blockspacer/crogine
/samples/blocks/src/BorderMeshBuilder.cpp
C++
cpp
2,592
permissive
/*----------------------------------------------------------------------- Matt Marchant 2017 - 2020 http://trederia.blogspot.com crogine - Zlib license. This software is provided 'as-is', without any express or implied warranty.In no event will the authors be held liable for any damages arising from the use of this ...
8d4239d907ebf585ea09dbfaf2640e33eadb77d0
ea86eefc54509fa45721f9e48eaa8415edfbb7e2
tmielcza/nibbler
/srcs/AEntity.cpp
C++
cpp
1,552
no_license
// ************************************************************************** // // // // ::: :::::::: // // AEntity.cpp :+: :+: :+: ...
d222a4f5c23dea8e7bb1c57ac3effbe7407ae8db
90c6fbb3bd8f4b9a1c3d7baa59b374ed6dd1445a
linzhangfeng/WBPT
/Classes/Scene/GameHall/SettingGame.hpp
C++
hpp
376
permissive
// // SettingGame.hpp // ZJH // // Created by mac on 2017/1/2. // // #ifndef SettingGame_hpp #define SettingGame_hpp #include "cocos2d.h" #include "ZJH.h" class SettingGame : public cocos2d::Layer { public: CREATE_FUNC(SettingGame); virtual bool init(); void initSetting(); bool onTouchBegan(Touch*...
3aea80840019683c547d8958fbb2db1eafd9a715
470556a3b31d97fed84bbba6db244557cc458d2d
pulkkinho/islandgame
/UI/configurationwindow.hh
C++
hh
489
no_license
#ifndef CONFIGURATIONWINDOW_HH #define CONFIGURATIONWINDOW_HH #include <QDialog> namespace Ui { class configurationWindow; } class configurationWindow : public QDialog { Q_OBJECT public: explicit configurationWindow(QWidget *parent = 0); ~configurationWindow(); int getvalue(); signals: void se...
e6098cfe384284fc25f41dbf039a2cdd9bf8350a
c652b3abbf8b78d0446380ec4dce98dc2097550b
SahilAshar/cpp_client_telemetry
/tests/unittests/HttpDeflateCompressionTests.cpp
C++
cpp
6,876
permissive
// // Copyright (c) 2015-2020 Microsoft Corporation and Contributors. // SPDX-License-Identifier: Apache-2.0 // #include "common/Common.hpp" #include "compression/HttpDeflateCompression.hpp" #include "config/RuntimeConfig_Default.hpp" #include <utils/ZlibUtils.hpp> #include "zlib.h" #undef compress using namespace t...
414e21ebaa773af448af610530767ede2dbd1d7a
a33b9b46b015444640f1769fe18533f55b192cca
evacoin/eva
/src/rpcdump.cpp
C++
cpp
11,266
permissive
// Copyright (c) 2009-2012 Bitcoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <iostream> #include <fstream> #include "init.h" // for pwalletMain #include "bitcoinrpc.h" #include "ui_interface.h" #in...
c3949a7e34046a2022e63a1b1c48b8dd5b925815
93e0087fc19f814c2d0845e660c90844df3ef648
wesenu/CATSPDEs
/sln/Tools/MasterSegmentQuadratureRule.hpp
C++
hpp
2,001
permissive
#pragma once #include "AbstractQuadratureRule.hpp" class MasterSegmentQuadratureRule : public AbstractQuadratureRule<1, 2> { // singleton MasterSegmentQuadratureRule() : AbstractQuadratureRule { // (1) element (master triangle) { { -1., 1. } }, // (2) nodes (n := polynomial order) { // n = 0 { -.57735...
601b0e4b82dc1a536dfa8d4949d75e41eb9eb643
4354c016b0992782ae91c9f5994dd0eef0c9a633
lunixbochs/wav2letter
/src/data/test/DataTest.cpp
C++
cpp
10,361
permissive
/** * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <arrayfire.h> #include <flashlight/flashlight.h> #include <gmock/gmock.h> #include <gtest/g...
ad039240ff5acd220526ad8d8e4a2d7e888c9093
d236b4158dba209740bcdf7c5140babe1271e449
KanZhang23/Tmass
/include/npstat/stat/AbsBandwidthCV.hh
C++
hh
4,896
no_license
#ifndef NPSTAT_ABSBANDWIDTHCV_HH_ #define NPSTAT_ABSBANDWIDTHCV_HH_ /*! // \file AbsBandwidthCV.hh // // \brief Interface definitions for KDE or LOrPE cross-validation calculations // // Implementations of these interfaces should calculate the quantity // which is to be maximized (pseudo log likelihood, -AMISE, etc.)...
a92c53bc906d51d108f6f6f3a303688af3bcb0d2
6b44f8b473ddef2f64fb8e2027e70e8239114793
chenqin/datasketches-cpp
/tuple/test/theta_a_not_b_experimental_test.cpp
C++
cpp
8,697
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 ...
b09b7f371aa917e492818ad6c850bea10529e6f4
1fe4a5c259213c8d79428b9efffd072bf1e79855
DMyhai/Tasks
/chapter2/6/main.cpp
C++
cpp
306
no_license
#include <iostream> using namespace std; double foo (double); int main() { double a; cout<<"Enter thr number of light years: "; cin >> a; foo(a); cout<<a<<" light years = "<<foo(a)<<" astronomical units"<<endl; return 0; } double foo(double a){ a*=63240; return a; }
39eac0f9222b1ca65a67dace2242a45a396f7ef6
96cd1234ff4452ae60bbe8ff04f70fe5b7694236
AutonomyLab/libcreate
/src/serial_stream.cpp
C++
cpp
2,720
permissive
#include <iostream> #include <memory> #include "create/serial_stream.h" #include "create/types.h" namespace create { SerialStream::SerialStream(std::shared_ptr<Data> d, const uint8_t& header, bool install_signal_handler) : Serial(d, install_signal_handler), readState(READ_HEADER), headerByte(header) { } bool ...
9045fb253886bd964da4b9456153ff04a63bd326
71cfb11b2a9b66ccc3a1308eeef0fd9610059965
himanshusahu99/CPP_DS_Algo
/Begining cpp(pattern, sorting)/armstrong.cpp
C++
cpp
318
no_license
#include<iostream> #include<math.h> using namespace std ; int main() { long long int n,ans=0,a; int r ,c=0; cin >> n; a=n; while(a>0) { c++; a=a/10; } a=n;; while(a>0) { r = a%10; ans = ans + pow(r,c); a=a/10; } if(ans == n) cout << "true"; else cout << "false"; return 0; }
7387712f1ce2789fe3ff3ae7422144150afe2cee
97d242efe25e8fd42b230d98caf7e7effa922e69
buggins/cr3gl
/cr3ui/src/cruisettingswidget.cpp
C++
cpp
49,470
no_license
#include "cruisettingswidget.h" #include "crui.h" #include "cruimain.h" #include "stringresource.h" #include "cruiconfig.h" #include "lvrend.h" using namespace CRUI; class CRUISettingsListItemWidgetBase : public CRUIHorizontalLayout { protected: CRUISettingsItem * _settings; CRUITextWidget * _title; CRUI...
aca1e47c307b7222bbf68c3fcf69d0d9d44ef9aa
64f678d943b51fbbb2d26d37fbc68bbf930cbecf
adilbaig/raytracing-in-a-weekend
/ray.hpp
C++
hpp
365
no_license
#ifndef RAY_H #define RAY_H #include "color.hpp" class ray { public: ray() {} ray(const point3 &origin, const vec3 &direction) : orig(origin), dir(direction) {} point3 origin() const { return orig; } vec3 direction() const { return dir; } point3 at(double t) const { return orig + t * dir; // P(t)=A+...
2648e12fe0b7bf1c9ec5defcc3819999512a20f2
5fee0a81dc53dba2733573982feb27d0b0224c41
ProgJES/School_Projects
/C++/Workshops/Workshop_9/PickupTruck.cpp
C++
cpp
1,954
no_license
/* Student Name: Eunseok Jeon Student ID: 026 110 148 Date: 2016/Nov/16 */ #include <cstring> #include "PickupTruck.h" using namespace std; namespace sict { /***Constructors***/ //Sets the loadAmount_ attribute to zero and the loadecMaterial_ to an empty C-style string. PickupTruck::PickupTruck() { this->load...
b8dc54ac2ed87ed56abbce28784489d924ce7719
b52fdc284eb3dc38c0514e0f08af15657ddc0366
ebrevdo/tensorflow
/tensorflow/compiler/xla/service/interpreter/platform.cc
C++
cc
4,152
permissive
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
e2f1d178d890181a8f9d667986aada6b73a7e567
856ffc22e6a33a4c9a5fc992c1b88929fee4bd82
Kelvin-Wei/atfa-examples
/no-op/no-op.cpp
C++
cpp
757
no_license
/* * Universidade Federal do Rio de Janeiro * Escola Politécnica * Projeto Final de Graduação * Ambiente de Teste para Filtros Adaptativos * Pedro Angelo Medeiros Fonini * Orientador: Markus Lima */ #include <atfa_api.h> extern "C" { struct AdapfData { float placeholder; }; AdapfData *adapf_init(void) { ...
e7c1b3e7b374c19d91c421a31434d10c887190ea
598690dd4a83e3e90204996e9a8c880b573ae531
mosesmccabe/C-review-2-
/Template/basicTemplate_Example.cpp
C++
cpp
476
no_license
#include <iostream> using namespace std; template <class T> T square (T number) { return number * number; } int main() { int tempI, resultI; float tempF, resultF; cout << "Enter a integer number: "; cin >> tempI; resultI = square(tempI); cout << "The square of " << tempI << " is " << resultI << "\n\n"; ...
53ec6a3d9edee476a7cc385fc40d4c6f3544f364
580c2ed27e3807bb2d7699fa6c1c8db46014533a
Frederiknoer/SemesterProject3.0
/Programmering/DFT/DFT.cpp
C++
cpp
1,288
no_license
#include "DFT.h" #define TWOPI 6.283185 DFT::DFT() { } void DFT::DFTrans8(vector<double> samples, double N, int sampleFreq) { double FreqFaktor = N/(sampleFreq); int FreqTabel[] = {697, 770, 852, 941, 1209, 1336, 1477, 1633}; for (int k = 0; k < 8; k++) { complex<double> sum(0.0, 0.0); ...
fc394b91e0a9a8ef40cac4847816535ec8416ff0
b16253ff3a7c2781b783a89c37b8e6c2bab79d65
meraioth/IDMMO
/GMO/GenericMPoint.cpp
C++
cpp
12,859
no_license
/* 1 Includes*/ #include "GenericMPoint.h" #include "ListUtils.h" #include "NestedList.h" #include "NList.h" #include "Symbols.h" #include "StandardTypes.h" // #include "../Network/NetworkAlgebra.h" // #include "../Spatial/SpatialAlgebra.h" #include "NetworkAlgebra.h" #include "SpatialAlgebra.h" #include "DateTime.h" #...
c9136b3339d8ad3d7f3a8000fc322111be425d57
e5f146e63052af4f299ad70e31fb9618003dd938
mhochsteger/blaze
/blazetest/src/mathtest/dmatsmatschur/UDbHCa.cpp
C++
cpp
4,247
permissive
//================================================================================================= /*! // \file src/mathtest/dmatsmatschur/UDbHCa.cpp // \brief Source file for the UDbHCa dense matrix/sparse matrix Schur product math test // // Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved // // Thi...
33e536a56de17280aea40c28676780c47a7c425c
38cfc07deaf70df2cfe2009ebf88be48cae084e0
powerticket/algorithm
/cpp/heap_sort.cpp
C++
cpp
1,024
no_license
#include <stdio.h> int number = 9; int heap[9] = {7, 6, 5, 8, 3, 5, 9, 1, 6}; int main(void) { for (int i = 1; i < number; i++) { int c = i; do { int root = (c - 1) / 2; if (heap[root] < heap[c]) { int temp = heap[root]; heap[root] = heap[c];...
4bb08bc2df6811a1d6345cfa53d313616a133079
9d608e03003a959b5bdf87aff559692a9ecf4f29
codeboy47/Competitive-Programming
/GeeksForGeeks/DynamicProgramming/matrixChainMultiplication.cpp
C++
cpp
1,242
no_license
#include <bits/stdc++.h> using namespace std; int dp[1000][1000]; // top down int minIterations(int *arr, int i, int j){ if(i >= j){ return 0; } if(dp[i][j] != -1) return dp[i][j]; int ans = INT_MAX; for(int k = i; k < j; k++){ ans = min(ans, minIterations(arr,i,k) + minIteratio...
25b700156c7f68525f0ff33c351e09a30127efc1
65e400e86d98676e85cdecaec1aa2e516dba877a
otcshare/chromium-src
/chromeos/components/sync_wifi/synced_network_updater_impl_unittest.cc
C++
cc
12,511
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 <memory> #include "ash/public/cpp/network_config_service.h" #include "base/bind.h" #include "base/macros.h" #include "base/memory/ptr_util.h" #i...
a7e701fabba7fa6db63e4606f2a0e9f95dfed5d3
476b730121e03a04dab060a25fab5c676842ab33
ahmedeltaweel/UVa-Problems
/3n+1 problem.cpp
C++
cpp
3,010
no_license
/** * Ahmed El-Taweel * ahmed.m.eltaweel@gmail.com **/ /* a program to to determine the maximum cycle length over all numbers between i and j, including both endpoints. to reach 1 form a given integer from the input by using the formula if the number is even then devide by 2 if the number is odd ther multiply by 3 an...
0b800b2538dc5de48902973580fe0036b78012e3
3869cd3c926922b4c2715145f0b382f4382d9353
mkuhn/blast-matrix
/src/corelib/interprocess_lock.cpp
C++
cpp
12,651
no_license
/* $Id: interprocess_lock.cpp 217377 2010-12-16 17:47:03Z gouriano $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Gove...
ea40f3c42523e296ab0794284e2b8988e6530367
ba62152a4e0c1e487373dee048581e0454e352de
deveshmishra34/shaka-packager
/packager/media/formats/mp4/mp4_media_parser_unittest.cc
C++
cc
10,298
permissive
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #include <gmock/gmock.h> #include <gtest/gtest.h> #include "packager/base/bind.h" #include "packa...
9be5852f68b53d27f3ea5a52b2a6fe48fdec2f4e
b9fd5d1cb420e37392fd8b7b032e1a9959abb716
JadeMatrix/stickers.moe-API
/src/handlers/shop.cpp
C++
cpp
13,516
no_license
#line 2 "handlers/shop.cpp" #include "handlers.hpp" #include "../api/shop.hpp" #include "../common/auth.hpp" #include "../common/crud.hpp" #include "../common/json.hpp" #include "../server/parse.hpp" #include <show/constants.hpp> namespace { void shop_to_json( const stickers::bigid & id, co...
894f4b2100baffe333466f7e77801c86c2961910
eaafb1a464e39cd693cb3de46ed830840ded9048
Manish-Giri/v8
/src/arm/macro-assembler-arm.cc
C++
cc
96,333
permissive
// Copyright 2012 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. #include <limits.h> // For LONG_MIN, LONG_MAX. #if V8_TARGET_ARCH_ARM #include "src/assembler-inl.h" #include "src/base/bits.h" #include "src/base/di...
58505ba8b3a472f61a97a133809616b0207a2303
a05d289e07774d467777222614c279166718a97f
hechengda/CPL
/Section5/S5.5.cpp
C++
cpp
738
no_license
void strcpy1(char *s, char *t) { int i = 0; while ((s[i] = t[i]) != '\0') { i++; } } void strcpy2(char *s, char *t) { while ((*s = *t) != '\0') { s++; t++; } } void strcpy3(char *s, char *t) { while ((*s++ = *t++) != '\0') { ; } } void strcpy4(...
892b3a177284c449949675bbbdee3a04b68d2ccc
d557c10a00c33dc6e8a80e1e9c62a455fe838518
quietust/nintendulator-mappers
/src/iNES/mapper114.cpp
C++
cpp
2,104
no_license
/* Nintendulator Mapper DLLs * Copyright (C) QMT Productions */ #include "..\DLL\d_iNES.h" #include "..\Hardware\h_MMC3.h" namespace { uint8_t PRG; uint8_t Valid; void Sync (void) { MMC3::SyncPRG(0x3F, 0); MMC3::SyncCHR_ROM(0xFF, 0); MMC3::SyncMirror(); if (PRG & 0x80) EMU->SetPRG_ROM16(0x8, PRG & 0xF); } i...