blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
117
path
stringlengths
3
268
src_encoding
stringclasses
34 values
length_bytes
int64
6
4.23M
score
float64
2.52
5.19
int_score
int64
3
5
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
text
stringlengths
13
4.23M
download_success
bool
1 class
169a4aeaa49d931000f63635b03a2a8808048f8a
C++
andrewjkanarek/BlackjackGit
/blackjack/statsFast.cpp
UTF-8
4,241
3.0625
3
[]
no_license
#include "deck.h" #include "statsFast.h" #include <iostream> #include <string> // #include <unordered_map> using namespace std; // namespace BJ { StatsFast::StatsFast() { decision = "HIT"; resetStats(); } void StatsFast::resetStats() { dealer_bust = 0; win_ah = 0; lose_ah = 0; push_ah = 0; win = 0; lose = 0...
true
ff3f3ba4e6b3047891520c7502102711af7e8eeb
C++
gjorquera/triad
/Source/Libs/Euclid/Geometry/Edge.h
UTF-8
707
3.140625
3
[]
no_license
#pragma once #include "../Type/Point.h" namespace Euclid { /*! * Defines a triangle's edge. * * An edge contains a Vector in an euclidean coordinate system. * * You can query it with \b vector. */ template <class Kernel> class Edge { public: typedef typename ...
true
e0b0ae07100b3404d6be9a34229213bb20e159f5
C++
AlessandroOsima/JD-UE4
/Source/BaseBlank/Character/Components/EffectComponent.cpp
UTF-8
2,293
2.75
3
[]
no_license
#include "BaseBlank.h" #include "Character/BaseCharacter.h" #include "EffectComponent.h" void UPowerInteractionsComponent::AddEffect(UBaseEffect * effect) { Effects.Add(effect); effect->StartUse(GetOwner()); } void UPowerInteractionsComponent::RemoveEffect(UBaseEffect * effect) { Effects.Remove(effect); effect-...
true
5d4fd79a5d53959ba53c3643d3d09905b57b7ec4
C++
delpart/SimpleRayTracer
/src/sphere.h
UTF-8
1,321
2.96875
3
[ "MIT" ]
permissive
#ifndef SPHEREH #define SPHEREH #include "surface.h" class Material; class Sphere: public Surface{ public: Sphere(){} Sphere(vec3 pos, float r, Material *m) : position(pos), radius(r), mat(m) {}; virtual bool hit(const Ray& r, float tMin, float tMax, hitRecord& hitRec) const; vec...
true
b19de748603c6d253e1e835924d29210e6215336
C++
alikoptan/adventofcode2020
/src/day03/day03.cpp
UTF-8
1,460
3.375
3
[ "Unlicense" ]
permissive
#include <vector> #include <string> #include <iostream> using namespace std; class day3 { private: vector<string> textFile; void readFile() { freopen("input.txt", "r", stdin); string line; while(getline(cin, line)) { textFile.push_back(line); } } int countTr...
true
a3c9117e6391c4e285b464186bd23d9552aebbcf
C++
GAVLab/memsense_imu
/src/nodes/imu_filter.h
UTF-8
819
2.65625
3
[]
no_license
/** * @file * @author Joan Pau Beltran * @brief ROS Memsense IMU filter presentation. * * This is a filter to be used with the Memsense IMU node. * IMU samples are stored in vectors, and filtered with the desired method * on demand. */ #ifndef IMU_FILTER_H #define IMU_FILTER_H #include "imu_sample.h" namespa...
true
23d9dd1211d91de43b30bd12932ffb56de60352a
C++
bjhaussmann/cs256_hw02
/bjhaussmann_hw02/bjhaussmannhw02.cpp
UTF-8
674
3.703125
4
[]
no_license
/* Haussmann, Ben ** CS256-01, Fall 2017 ** Homework Assignment #2 ** Description: ** Averages two numbers a use-defined amount of times. */ #include "stdafx.h" #include "iostream" using namespace std; int main() { int iterations = 0; double val1, val2 = 0; cout << "How many pairs of integers to be read? "; c...
true
76eea1fd405a9de9ff7505ebe66fa028532020b2
C++
prashant97sikarwar/leetcode
/Graph/MinimumJumpsToReachHome.cpp
UTF-8
1,422
2.6875
3
[]
no_license
//Problem Link:- https://leetcode.com/problems/minimum-jumps-to-reach-home/ #include<bits/stdc++.h> using namespace std; class Solution { public: int minimumJumps(vector<int>& forbidden, int a, int b, int x) { unordered_map<int,int> mp; for(int i=0;i<forbidden.size();i++){ mp[forbidden...
true
f7586b50cf72999b21f8c2fb5b9ba0e1d5b202d8
C++
cr13-cr/c-codes
/program to print series(1,4,7.40).cpp
UTF-8
129
2.59375
3
[]
no_license
#include<iostream> using namespace std; int main() { int x; for(x=1;x<=40;x+=3) cout<<x<<"\t"<<endl<<"\n"; return 0; }
true
389bb29c8462241fdbdd7829aa5753613938ecc5
C++
rcelsom/CS_162
/project 3/Character.cpp
UTF-8
928
3.34375
3
[]
no_license
/*************************************** Program Name: Project 3 Author: Robert Elsom Date: 2/4/2019 Description: Barbarian class, contains all getters and setters for barbarian characters along with updateStrength and getType. **************************************/ #include <cstdlib> #include "Character.hpp" #i...
true
231451119abf5f65505c7504bcf4900ed3dd16cb
C++
shahriarrifat7/git-push-demo
/Code Templates/extended euclid.cpp
UTF-8
445
3.171875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> pii; #define x first #define y second pii extendedEuclid(int a, int b) { if(b==0) return pii(1,0); else { pii d = extendedEuclid(b, a%b); return pii(d.y, d.x - d.y*(a/b)); } } int main() { int a,...
true
01d193167df882149afa0f9acddab7d2b2f64498
C++
sdiebolt/molecular-dynamics
/src/event.cc
UTF-8
1,290
3.21875
3
[ "MIT" ]
permissive
// Copyright 2018, Samuel Diebolt <samuel.diebolt@espci.fr> #include "include/event.h" #include "include/particle.h" // Initializes a new event to occur at time t, involving particles a and b Event::Event(Event::Type type, double t, Particle* a, Particle* b) : type_ {type}, time_ {t}, a_ {a}, b_ {b}, collisio...
true
a4c3b9093c67245779d6fd97ff42bf57a539ed5a
C++
dkwliu/AllProjects
/C++/Assignment - Doubly Linked Lists and Linked List with Queues/Assignment 13/LinkedListStack/LinkedListStack.cpp
UTF-8
2,559
4.28125
4
[]
no_license
#include <string> #include <iostream> using namespace std; /**************************************************************************************/ // Node struct. This struct will be the foundation of each node in the doubly linked list. struct node { char data; node *next; node *prev; }; /********************...
true
562b46c5baf27296ff8a441a0dfb2a4314b07729
C++
gluke77/meto_forms
/triggervalue.h
UTF-8
2,057
2.96875
3
[]
no_license
#ifndef _TRIGGERVALUE_INCLUDED #define _TRIGGERVALUE_INCLUDED #include "storedvalue.h" class TriggerValue : public StoredValue { Q_OBJECT bool _on; int _readMask; int _readOnValue; int _readOffValue; int _writeOnValue; int _writeOffValue; public: bool isOn() const { return _on; }; bool isOff() ...
true
877705e0c1237740fabad639604d4e757b415ba7
C++
Dimbelio/Programming-Principles-and-Practice-Using-C-by-Bjarne-Stroustrup-
/Visual Studio 2010/Projects/bjarneStroustrupC++PartI/object_oriented_examples/Chapter4Exercise3.cpp
UTF-8
1,388
3.75
4
[ "MIT" ]
permissive
/* TITLE City Distances Chapter4Exercise3.cpp Bjarne Stroustrup "Programming: Principles and Practice Using C++" COMMENT Objective: Calculates total distance, min, max, mean distance. Input: Prompts for input. Output: Prints: Total sum of input distances. Smallesr and greates...
true
8307676595edd0ab9462f3a577df46b18ac658a4
C++
marcuslio23/PiramideFaraoni
/Tranzactie.h
UTF-8
2,355
2.796875
3
[]
no_license
#pragma once #include <utility> #include "Entitate.h" #include "GenericRepo.h" class Tranzactie: public Entitate{ private: string nume_faraon; int id_piramida; int pret; public: inline static RepositoryFile<Tranzactie> repo; Tranzactie(); Tranzactie(int id_trz, const string& nume_faraon, int i...
true
765d14a96861027405994ca154c08b655768ea8d
C++
thanhtphung/cppware
/appkit/win/Directory-win.cpp
UTF-8
5,473
2.625
3
[]
no_license
/* * Software by Thanh Phung -- thanhtphung@yahoo.com. * No copyrights. No warranties. No restrictions in reuse. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include "syskit/sys.hpp" #include "appkit-pch.h" #include "appkit/Directory.hpp" using namespace syskit; BEGIN_NAMESPACE1(appkit) ...
true
67b38b69bd2d640bf21d58e134c32a3412ca8d9c
C++
merym/ProgettoP2
/Liberty/Modello/soldato.h
UTF-8
667
2.671875
3
[]
no_license
#ifndef SOLDATO_H #define SOLDATO_H #include "Modello/Interfacce/dpsInterface.cpp" class Soldato: public DpsInterface{ protected: bool increaseLevel(unsigned int newExpPoint); public: /***Il costruttore richiama in automatico il costruttore standard di DpsInterface, che inizializza ProbCritico sempre a 2...
true
8e0d049dcb9e1b6f5dd6bec8b83ffc5dfe611608
C++
HearyShen/HwCodeCraft2020
/2_preliminary/testc/thread11.cpp
UTF-8
997
3.484375
3
[]
no_license
#include <iostream> #include <vector> #include <thread> using namespace std; void f1(int n) { for (int i = 0; i < 5; ++i) { cout << "Thread " << n << " executing (" << i << ")" << endl; // this_thread::sleep_for(chrono::milliseconds(10)); } } void f2(int n, vector<int> &v) { for (int i = ...
true
b0b0a58593aa80fa6008fa997136b8984e7f926d
C++
Jiltseb/Leetcode-Solutions
/solutions/1406.stone-game-iii.323056031.ac.cpp
UTF-8
936
2.796875
3
[ "MIT" ]
permissive
static auto io_accelerator = []() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }(); class Solution { public: string stoneGameIII(vector<int> &stoneValue) { int n = stoneValue.size(); for (int i = n - 2; i >= 0; i--) stoneValue[i] += stoneValue[i + 1]; ...
true
d1733f0790dce663943f0da1c3eab479e37f9395
C++
classner/forpy
/include/forpy/util/serialization/eigen.h
UTF-8
2,881
2.578125
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#pragma once #ifndef FORPY_UTIL_SERIALIZATION_EIGEN_H_ #define FORPY_UTIL_SERIALIZATION_EIGEN_H_ #include "./basics.h" #include <Eigen/Dense> #include "../../global.h" // Eigen serialization helper. // (c.f. https://stackoverflow.com/questions/22884216/serializing-eigenmatrix-using-cereal-library) namespace cereal {...
true
64204a8161656ed73c94eeea60f155090f934e1f
C++
thirty30/Muffin
/TCore/TArithmetic/TInsertionSort.h
GB18030
498
3.171875
3
[ "MIT" ]
permissive
// лʱЧʽϸ #pragma once namespace TCore { namespace TArithmetic { template<typename T> T_INLINE void TInsertionSort(T* a_array, n32 a_nBegin, n32 a_nEnd) { n32 nL = a_nBegin + 1; for (n32 i = nL; i <= a_nEnd; i++) { T curValue = a_array[i]; n32 nIdx = i - 1; while (nIdx >= 0 && a_array[nId...
true
72e0283423be2bbb6449a10b9fd62998d8902a10
C++
IsacVM/Problema-de-C
/Problema19.cpp
UTF-8
1,309
3.265625
3
[]
no_license
#include <stdio.h> #include <conio.h> int n1,n2,n3; main(){ printf("Problema 19:Ordenar n%cmeros de Mayor a menor\n",163); printf("Dame el primer n%cmero: \n",163); scanf("%d",&n1); printf("Dame el segundo n%cmero: \n",163); scanf("%d",&n2); printf("Dame el tercer n%cmero: \n",163); scanf("%d",&n3); if((n1>...
true
d625a9ce53d00c285388242cd02c97964d1f5abb
C++
BrunoLevy/geogram
/src/examples/geogram/opennl_LSCM/main.cpp
UTF-8
25,753
2.515625
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright (c) 2000-2022 Inria * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditi...
true
7789fb36aaf01527440ce9484ce7cc770b3b6851
C++
jcabdala/ArduinoInicialUNC
/Clase 5/Codigo/rf_emisor.ino
UTF-8
1,070
2.640625
3
[]
no_license
#include <SPI.h> #include "RF24.h" /* Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 9 & 10 */ RF24 radio(9,10); /**********************************************************/ byte addresses[][6] = {"1Node","2Node"}; // Used to control whether this node is sending or receiving void setup() {...
true
b3b3bcdd1e641919349bf632dd321dbfd6654113
C++
wayrick/yaramod
/include/yaramod/types/location.h
UTF-8
1,940
3.421875
3
[ "MIT", "BSD-3-Clause" ]
permissive
/** * @file src/types/location.h * @brief Declaration and Implementation of class Location. * @copyright (c) 2017 Avast Software, licensed under the MIT license */ #pragma once #include <algorithm> #include <cstdint> #include <iostream> namespace yaramod { class Location { public: Location() : Location(std::st...
true
0d42a0b9206683c8dbbf3cd7a884a3d44a35af1e
C++
jlee7737/cpp-practice
/ConsoleApplication23/LP17.cpp
UTF-8
1,270
3.59375
4
[]
no_license
/* Junhak Lee ITP 165, Fall 2014 Lab Practical 17 junhak.lee@usc.edu */ #include <iostream> #include <cmath> #include <string> #include <cstring> using std::cout; using std::endl; using std::cin; int main() { double sum = 0; //create variables double mean = 0; double sumMeanDevSqr = 0; double st...
true
3d0a686a0640016c1f3b275040e08c3bdba8818e
C++
jimfinnis/uesmanncpp
/bpnet.hpp
UTF-8
12,784
2.8125
3
[]
no_license
/** * @file bpnet.hpp * @brief This implements a plain backprop network * */ #ifndef __BPNET_HPP #define __BPNET_HPP #include "net.hpp" /** * \brief The "basic" back-propagation network using a logistic sigmoid, * as described by Rumelhart, Hinton and Williams (and many others). * This class is used by output...
true
c4ec0c5f2a76baab27b3c80731927274227c1222
C++
YeongjinOh/Algorithm-practice
/Contest/Samsung_SCPC/SCPC_2017_1/3.light/tmp.cpp
UTF-8
7,018
2.671875
3
[]
no_license
/* You should use the statndard input/output in order to receive a score properly. Do not use file input and output Please be very careful. */ #include <iostream> #include <vector> #include <stack> using namespace std; int Answer; int main(int argc, char** argv) { int T, test_case; /* ...
true
44550a0e004a625944d32f4a1d4b4cff37bc40bb
C++
pnm6054/Algorithm_exercise
/BOJ/Q11948.cpp
UTF-8
385
2.71875
3
[]
no_license
#include <iostream> using namespace std; int main(void) { int r[6] = { 0, }, min = 100, sum; for (int i = 0; i < 6; i++) { cin >> r[i]; if (i < 4) if (min > r[i]) min = r[i]; } sum = r[4] > r[5] ? r[4] : r[5]; for (int i = 0; i < 4; i++) { if (r[i] == min) { min = 101; continu...
true
b15dc543ae56f6f1931202fd1a21c27a80cdf733
C++
jingwang9302/Cpp
/array/src/array.cpp
UTF-8
1,236
3.96875
4
[]
no_license
//============================================================================ // Name : array.cpp // Author : Zoe // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include ...
true
566291dd89881c639821d2e50522f90822cf9bd6
C++
paprota55/PK3_project
/PK3/searchComplex.cpp
UTF-8
4,099
3.03125
3
[]
no_license
#include "stdafx.h" #include "searchComplex.h" medicine * searchComplex::searchGood(const int &, const std::string &, medicine *) { return nullptr; } medicine * searchComplex::writeAndSearch(medicine *) { return nullptr; } bool searchComplex::searchInList(medicine*tempo, const std::string&name) //prze...
true
07119a1264800b716988800da27758933a1f30de
C++
lintcoder/leetcode
/src/2678.cpp
UTF-8
294
2.578125
3
[]
no_license
int countSeniors(vector<string>& details) { int ct = 0; int len = details.size(); for (int i = 0; i < len; ++i) { if ((details[i][11] > '6') || (details[i][11] == '6' && details[i][12] > '0')) ++ct; } return ct; }
true
d1174be5289a205b0dcf1f9d68f6929937545742
C++
wz125/course
/coursera/dsalgo-001/11-square.cpp
UTF-8
1,995
2.703125
3
[]
no_license
/*============================================================================= # FileName: square.cpp # Desc: poj 2002 # Author: zhuting # Email: cnjs.zhuting@gmail.com # HomePage: my.oschina.net/locusxt # Version: 0.0.1 # CreatTime: 2013-12-04 18:27:36 # LastChange: 2013-12-04 1...
true
ed1ad8d77f9ff0917a5fabe2925fcc343ebc64e7
C++
ojles/uni
/cpp-programming/ProgrammingLanguage/main.cpp
UTF-8
477
2.671875
3
[]
no_license
#include <iostream> #include <fstream> #include "Compiler.h" #include "VirtualMachine.h" using namespace std; string readFile(const string& fileName) { string data; ifstream in(fileName.c_str()); getline(in, data, string::traits_type::to_char_type(string::traits_type::eof())); return data; } int main() { strin...
true
77a22a89cf7e124e44fb0445d67ae448f778d810
C++
BoGyuPark/VS_BOJ
/BOJ_READY_simulation/BOJ_READY_simulation/BOJ_14890.cpp
UHC
1,644
3.015625
3
[]
no_license
#include<iostream> #include<vector> #include<cstring> using namespace std; int n, l, a[101][101], b[101][101], c[101][101]; bool go(int row, int map[101][101]) { for (int i = 1; i < n; i++) { if (map[row][i] != map[row][i - 1]) { int dif = map[row][i] - map[row][i - 1]; if (dif < 0) dif = -dif; if (dif != 1...
true
01ccf12a43cd0cdd15b160583f82fa437dac262d
C++
kstandbridge/DesignPatterns
/DesignPatterns/Structural/Proxy/communication_proxy.cpp
UTF-8
1,820
3.171875
3
[]
no_license
#include <iostream> #include <string> #include <cpprest/http_client.h> #include <cpprest/filestream.h> using namespace utility; // Common utilities like string conversions using namespace web; // Common features like URIs. using namespace web::http; // Common ...
true
cf1663d3937da0b6b620b9813ce3a6b4e3ae166a
C++
DavidChan0519/exercise
/C++/c++11/make_shared/make_shared.cpp
UTF-8
275
3.25
3
[]
no_license
#include <iostream> #include <memory> using namespace std; void foo(shared_ptr<int> &i) { (*i)++; } int main() { shared_ptr<int> pt = make_shared<int>(15); cout << "before: " << *pt << endl; foo(pt); cout << "after : " << *pt << endl; return 0; }
true
6169e3974dfd5373b5023eee6f324b7f1d550926
C++
vinz486/fingerprint-r503-mqtt
/fingerprint-mqtt/src/led.cpp
UTF-8
1,684
2.640625
3
[]
no_license
#include "led.h" #include "setup.h" boolean boardLedIsOn = false; boolean boardLedBlinkMode = false; void boardLedOn() { digitalWrite(LED_BUILTIN, LOW); boardLedIsOn = true; } void boardLedOff() { digitalWrite(LED_BUILTIN, HIGH); boardLedIsOn = false; } void boardLedBlinkLoop() { if (!loopDelay(...
true
18553650256c62b0d02da6b92fb6c00056ff99c5
C++
atlas25git/DSA_Mastery
/Searching/MoreThanNbyK.cpp
UTF-8
2,712
3.71875
4
[]
no_license
// { Driver Code Starts // A C++ program to print elements with count more than n/k #include <iostream> #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // Function to find elements with count more than n/k times // arr: input array struct eleCount { int e; // Element int c; // Count }; c...
true
8ea339a6b8bc319a7e028dabdedb3cd4437720e5
C++
d01000100/network_p1
/chatroom/AuthProtocol/AuthProtocol.cpp
UTF-8
2,178
2.65625
3
[]
no_license
#include "AuthProtocol.h" using namespace auth_protocol; std::string writeSignUpRequest(std::string username, std::string plain_text_password) { Request req; req.set_username(username); req.set_action(SIGN_UP); req.set_plaintextpassword(plain_text_password); req.set_length(req.ByteSizeLong()); return req.Seri...
true
8e6a1594c0e5771fc5d82e0999a4898bcfe1f4e0
C++
LuxorInteractive/taiga-wizard
/configinifile.cpp
UTF-8
6,845
2.84375
3
[]
no_license
#include "configinifile.h" #include <QStringList> #include <QSettings> #include <QDir> // constructor ConfigIniFile::ConfigIniFile(QString fileName):ConfigFile(fileName) { ConfigType = "ConfigIniFile"; if(this->loadSuccess) // file read succeeded { bool sectionFound=false; bool errors = fal...
true
c48c50d65bacb5eac5eb088fa04e82ddf1a3ec0d
C++
CoreRobotics/CoreRobotics
/src/physics/FrameDh.cpp
UTF-8
6,603
2.75
3
[ "BSD-3-Clause" ]
permissive
/* * Copyright (c) 2017-2019, CoreRobotics. All rights reserved. * Licensed under BSD-3, https://opensource.org/licenses/BSD-3-Clause * http://www.corerobotics.org */ #include "FrameDh.hpp" #include "Eigen/Dense" namespace cr { namespace physics { //--------------------------------------------------------------...
true
3fdac54179e5ae50d43964e9701219fac6661fc2
C++
CharleyLiu/Leetcode
/Sort Colors/Sort Colors.cpp
UTF-8
573
2.671875
3
[]
no_license
class Solution { public: void sortColors(vector<int>& nums) { int len=nums.size(); int r=0; int white=0; int blue=0; for(int i=0;i<len;++i) { if(nums[i]==0) { nums[blue++]=2; nums[white++]=1; nums...
true
0a61bbcc0208ecb628ec700ff2bf2bf6ccb59847
C++
arpit353/competitive-coding
/codechef/Rectangle.cpp
UTF-8
453
2.78125
3
[]
no_license
#include<iostream> using namespace std; int main() { int n,a,b,c,d; cin>>n; for(int i=0;i<n;i++) { cin>>a>>b>>c>>d; if(a==b && c==d) { cout<<"YES\n"; } else if(a==c && d==b) { cout<<"YES\n"; } else if(a==d && c==...
true
fa6fe011371a6f1a0ca7369caa10dc3a612c0ad8
C++
Ecquus/imageEditor
/imageEditorApp/src/model/interpolator.cpp
UTF-8
2,007
3.046875
3
[ "MIT" ]
permissive
#include "interpolator.h" #include <util.h> using namespace util::types; Cell::Cell(const QPointF& p, const QImage& img, QRgb extrapColor) { // fill data with the colors of the pixels around point p in the image corners[0][0] = getColor(QPoint{ util::floor(p.x()), util::floor(p.y()) }, img, extrapColor); // ...
true
aae82513fddd2c694be026a04be2656aacc37032
C++
mchughj/iBoardBot
/code/deviceFirmware/iBoardBot/Servos.ino
UTF-8
3,137
2.5625
3
[]
no_license
// iBoardbot project // Init servo on T4 timer. Output OC4B (Leonardo Pin10) servo1, OC4D (Leonardo Pin6) servo2, optional I2C output for servo2 // Servo2 compatible with OC4A (Leonardo Pin13) // We configure the Timer4 for 11 bits PWM (enhacend precision) and 16.3ms period (OK for most servos) // Resolution: 8us per ...
true
d6e57ef918797f1bd9ac87a47b5e80fc56102be4
C++
MarkChen16/QtDemo
/CustomObject/QPerson.cpp
UTF-8
601
2.84375
3
[]
no_license
#include "QPerson.h" QPerson::QPerson(QString szName, int intAge, int intScore, QObject *parent) : QObject(parent) { m_name = szName; m_age = intAge; m_score = intScore; } QPerson::~QPerson() { } QString QPerson::name() { return m_name; } int QPerson::age() { return m_age; } void QPerson::setAge(int value) {...
true
ddbc86566c7ab5cbbfe393ac451b1c6801799437
C++
leonardo98/run_core
/Core/LinkToComplex.h
UTF-8
868
2.59375
3
[]
no_license
#ifndef LINK_TO_COMPLEX_H #define LINK_TO_COMPLEX_H #include "LevelSet.h" #include "BeautyBase.h" class LinkToComplex : public BeautyBase { private: //Matrix _drawMatrix; std::string _id; LevelSet *_complex; float _shiftX; float _shiftY; public: float GetShiftX() const { return _shiftX; } float GetShiftY() ...
true
121158d21d0c256e582e576a3b73b8d9b9efbe84
C++
DaCrRa/Klondike-cpp
/src/model/inc/MoveOrigin.h
UTF-8
619
2.546875
3
[]
no_license
/* * MoveOrigin.h * * Created on: 4 de may. de 2016 * Author: dancre */ #ifndef SRC_MODEL_INC_MOVEORIGIN_H_ #define SRC_MODEL_INC_MOVEORIGIN_H_ #include <Pile.h> #include <GameElement.h> #include <MoveOriginVisitor.h> class MoveOrigin : virtual public GameElement { public: virtual void recoverCard(con...
true
7306c15507d60ba6980d4593503af23151508eb5
C++
wcole3/SDL_LazyFoo
/SDL_Joystick/SDL_joystick/SDL_joystick/main.cpp
UTF-8
6,569
3.046875
3
[]
no_license
// // main.cpp // SDL_joystick // Toy program to use joysticks to control program // Created by William Cole on 11/23/18. // Copyright © 2018 William Cole. All rights reserved. // #include <iostream> #include <SDL2/SDL.h> #include <SDL2_image/SDL_image.h> #include <stdio.h> #include "lTexture.h" //screen globals...
true
ae9a4922ea8bd009ae98ca2c69ae2f3a34a4dbd9
C++
KEDIARAHUL135/WatermarkImages
/main.cpp
UTF-8
4,199
3.140625
3
[]
no_license
#include "opencv2/opencv.hpp" #include <iostream> #include <filesystem> namespace fs = std::filesystem; // ISO C++17 Standard (/std:c++17) int ReadImage(std::string InputImagePath, std::vector<cv::Mat>& Images, std::vector<std::string>& ImageNames) { // Checking if path is of file or folder. if (fs::is_regular_fi...
true
2e231be63d8236091752c67924e2326294671810
C++
eglrp/StitchingToPanorama
/TinyGiga/ColorCorrect.cpp
UTF-8
5,023
3.265625
3
[]
no_license
/** @brief mesh pyramid class @author Shane Yuna @date Mar 3, 2018 */ #include "ColorCorrect.h" ColorCorrect::ColorCorrect() {} ColorCorrect::~ColorCorrect() {} /** @brief static function to calculate image color mean, covariance matrix @param cv::Mat input: input image @param cv::Mat & outmean: output color mean ve...
true
e0a7503a3d44726948292af9b4f5d7c637031364
C++
ImTangYun/comprehensive
/C++/leetcode/LRU_Cache/solution.cpp
UTF-8
2,359
3.4375
3
[]
no_license
struct ListNode_ { int val; int key; ListNode_* pre; ListNode_* next; ListNode_(int k, int v):key(k),val(v),pre(NULL),next(NULL){} }; class LRUCache{ private: int capacity_; int size_; unordered_map<int, ListNode_*> k_v; ListNode_* head_; ListNode_* tail_; public: LRUCache(...
true
7802fb699efebc8a4d66bdae9e9a9fdcad16db47
C++
avikodak/Algorithms
/src/sites/geeksforgeeks/linkedlist/page04/CheckPalindromeSinglyLL.h
UTF-8
3,116
2.546875
3
[]
no_license
/***************************************************************************************************************** * File Name : CheckPalindromeSinglyLL.h * File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\sites\geeksforgeeks\linkedlist\page04\CheckPalindromeSinglyLL.h * Created on : Dec 18, ...
true
691f58c5fc1ada6f39d98c744daf091885020920
C++
gn0mesort/RothmanAlexander_CSC5_41202
/Class/MarkSort/main.cpp
UTF-8
3,785
4.03125
4
[]
no_license
/* * File: main.cpp * Author: Alexander Rothman * Purpose: To develop a sorting routine called MarkSort * Created on February 2, 2016, 8:18 AM */ //System Libraries #include <cstdlib> #include <ctime> #include <iostream> using namespace std; //User Libraries //Global Constants //Function Prototypes void fi...
true
320a27fa25164be05925e1fadd6f8e9fab01a9a0
C++
craigsapp/scorelib
/src-library/ScorePage_layer.cpp
UTF-8
3,903
2.71875
3
[]
no_license
// // Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu> // Creation Date: Tue Jul 8 12:03:53 PDT 2014 // Last Modified: Tue Jul 8 12:03:55 PDT 2014 // Filename: ScorePage_layer.cpp // URL: https://github.com/craigsapp/scorelib/blob/master/src-library/ScorePage_layer.cpp // Syntax: C++1...
true
56f64221fdf6e691826e72f67d7de0f6acfae5e9
C++
yolandalillo/Asa-I
/ARDUINO/Cuadernillo 1/hito1.9.ino
UTF-8
499
3.203125
3
[]
no_license
//Este programa aumenta el valor almacenado en la valiable 'PWMpin' //desde 0 hasta 255 mediante un bucle for. int PWMpin=10; //LED conectado en el pin 10 en serie con una r=470ohm. void setup() { Serial.begin(9600); } void loop() { for(int i=0; i<=255; i++){ //Desde i igual a 0, hasta i igual o menor que 255...
true
152ccdf6a64da9eb2c6cba6e06d26b5f2c216b5b
C++
INF1015-2021H/c04-s03-exercices-Zabiullah-sz
/Exercises/Employee.hpp
UTF-8
459
3.203125
3
[]
no_license
/// /// Classe d'employé dans une compagnie. /// #pragma once #include <cstddef> #include <cstdint> #include <string> using namespace std; class Employee { public: //Employee(); // Si on n'en met pas un, le compilateur n'en met pas un pour nous. Employee(const string& name, double salary = 0.0); ~Employee(); ...
true
b402518f41067823e0a048f326c8165f252666ab
C++
UtkarshGupta12/InterviewBit
/Tree Data Structure/populate-next-right-pointers-tree.cpp
UTF-8
1,178
3.5
4
[]
no_license
/** * Definition for binary tree with next pointer. * struct TreeLinkNode { * int val; * TreeLinkNode *left, *right, *next; * TreeLinkNode(int x) : val(x), left(NULL), right(NULL), next(NULL) {} * }; */ void Solution::connect(TreeLinkNode* root) { TreeLinkNode* res = root; //BASE CASE if(root==NU...
true
43c912111bd6ff9fa50bd840ad3c466a1868a27e
C++
sonyhome/DigitalIO
/Examples/4_ultrasonicSensorSonar/4_ultrasonicSensorSonar.ino
UTF-8
4,246
3.046875
3
[ "MIT" ]
permissive
//////////////////////////////////////////////////////////////////////////////// // DigitalIO demo // A straightforward library to use rotary encoders on Arduinos //////////////////////////////////////////////////////////////////////////////// // Ultrasonic Sensor - Sonar example // // This demo shows how to measure di...
true
259e2aa19d0e0d138a76170c55de2fbff72b54c7
C++
ElectronicsWorks/Runner-Multitasking
/Runner4.ino
UTF-8
19,765
3.015625
3
[]
no_license
#define _ESP32 //#define _ARDUINO /* Runner (C) 2019 Dipl. Phys. Helmut Weber smallest (and fastest?) Cooperative Multitasking ever ESP32-Version, Arduino-Version Is it possible to use a cooperative OS as an RTOS ? What is an RTOS? It garantees a Job to be done just in a predefined time. Same is tr...
true
d5399aaffefd0a3f00608b26be7457e69d366ca9
C++
rgayatri23/matvec
/Serial/matvec.cpp
UTF-8
2,431
3.09375
3
[]
no_license
#include "../arrayMD/arrayMD.h" #include <bits/stdc++.h> #include <chrono> #include <ctime> #include <iostream> #include <random> using namespace std::chrono; using DataType = int; #define ARRAY2D ArrayMD<DataType, 2, Device::cpu> #define ARRAY3D ArrayMD<DataType, 3, Device::cpu> const int N = 1000; const int repeat ...
true
13009cde50946e269c75b26bdac52791df97e24a
C++
chiseungii/HONGIK
/2_1/객체지향프로그래밍/과제/hw3/5.cpp
UTF-8
2,641
3.453125
3
[ "MIT" ]
permissive
/* hw3 #5 */ #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include "Member.h" using namespace std; int main() { Member* mArray = new Member[4]; // 객체 배열 동적 할당 // 각 정보 초기화 mArray[0].setID("cheol88"); mArray[0].setPWD("cheol88"); mArray[0].setName("김철수"); mArray[0].setAge(23); mArray[1].setID("ywjeon...
true
51fe5ffa56b73dfa036213ed63046b39b66e9aa1
C++
Ukun115/CarBOOM
/ExEngine/effect/EffectEngine.cpp
SHIFT_JIS
3,429
2.59375
3
[]
no_license
#include "stdafx.h" #include "EffectEngine.h" EffectEngine* EffectEngine::m_instance = nullptr; //B̃CX^XB EffectEngine::EffectEngine() { MY_ASSERT( m_instance == nullptr, "EffectEnginẽCX^X𕡐邱Ƃ͂ł܂B" ); auto format = DXGI_FORMAT_R8G8B8A8_UNORM; auto d3dDevice = g_graphicsEngine->GetD3DDevice(); auto commandQ...
true
da66a12b11af5ff4f34366d5cdd58f37ad125f51
C++
jo797/HWK6
/HWK6/ArithmeticExpression.cpp
UTF-8
2,704
3.734375
4
[]
no_license
/* * Name: Joletta Cheung, Cameron Swinoga, Aleksander Mercik * MacID: cheunj3, swinogca, mercikaz * Student Number: 1406622, 1404603, 1413714 * Description: This program takes a mathematical expression and outputs the answer */ #include <iostream> #include "ArithmeticExpression.h" #include <string> #include <std...
true
7d9e7adba329c6fd9bf83937b64e9d0fefc078cc
C++
wmotte/toolkid
/src/orient/orient.cpp
UTF-8
5,263
2.546875
3
[ "MIT" ]
permissive
#include "itkOrientImageFilter.h" #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageFileWriter.h" #include "itkImageIOBase.h" #include <string> #include "tkdCmdParser.h" template< class TPixel, unsigned int VDimension > int OrientImage( const std::string& inputFileName, const std::string& out...
true
2b299d64a9428085b70f9032cf62adef1b686d56
C++
TaintedGear/LudumDare-28
/OneShotOneKill Source/LudumDare_48/ImageManager.h
UTF-8
754
3.09375
3
[ "Zlib", "FTL" ]
permissive
#ifndef IMAGE_MANAGER_H #define IMAGE_MANAGER_H #include <iostream> #include <vector> #include <string> #include <SDL.H> using std::string; using std::vector; struct Image { Image() { m_texture = NULL; m_imageWidth = 0; m_imageHeight = 0; m_imageLabel = "NULL"; } void Release() { if(m_texture != NUL...
true
f488c06061c9ac95435fd97b315e6e40cbe14640
C++
al-ry/OOP-labs
/lab5/task1/Rational/RationalTests/CRationalTests.cpp
UTF-8
10,528
3.390625
3
[]
no_license
#include "stdafx.h" #include "../Rational/CRational.h" void VerifyNumeratorAndDenumerator(const CRational& verifiableFraction, int expectedNumerator, int expectedDenominator) { BOOST_CHECK(verifiableFraction.GetNumerator() == expectedNumerator); BOOST_CHECK(verifiableFraction.GetDenominator() == expectedDenominator...
true
dd2272fb048b6989f0f396fcc546e08ee4234a2f
C++
margaridav27/feup-aeda
/weekly practical exercises/aeda2021_p02_extra/Tests/zoo.cpp
UTF-8
1,961
3.28125
3
[]
no_license
#include "zoo.h" #include <iostream> #include <sstream> #include <stdlib.h> using namespace std; unsigned Zoo::numAnimals() const { return animals.size(); } unsigned Zoo::numVeterinarians() const { return veterinarians.size();} void Zoo::addAnimal(Animal *a1) { animals.push_back(a1); } string Zoo::getInfo() const {...
true
85058cf86f1f991fbb5b996308e79eb18e809fc3
C++
Raswood/Portafolio_00199718
/Laboratorio 2/Ejercicio 4a Labo 2.cpp
UTF-8
482
3.296875
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; void pi(int a, int b){ if(b>0){ if(a%2 != 0) cout<<a*2-1; else cout<<a*2-1; } pi(a+1, b-1); } int main(){ int n; cout<<"ingrese el dato:"<<endl; cin>>n; pi(1,n); return 0; } /*double pi(double); int main(){ cout<<"Ingrese el val...
true
9ca7ee782729839d7fffee3f455881c31c0a3adf
C++
sergiogutierrez2/Intro_to_C_plus_plus_Projects-DeAnza-2014
/Labs/Lab 5/Lab543.cpp
UTF-8
3,345
3.625
4
[]
no_license
// This program finds the average time spent programming by a student // each day over a three day period. // PLACE YOUR NAME HERE #include <iostream> using namespace std; int main() { int numStudents; float numHoursprogram, numHoursbio, total, averageprogramming, averagebiology, totalprogram, totalbio; int student, ...
true
764efb83532327d9186ed9877cd7c54b750b1843
C++
degarashi/revenant
/src/gl/error.cpp
UTF-8
4,496
2.625
3
[ "MIT", "BSD-3-Clause", "Zlib", "BSL-1.0" ]
permissive
#include "error.hpp" #include "if.hpp" #include "debug.hpp" namespace rev { // ------------------------- GLError ------------------------- const std::pair<GLenum, const char*> GLError::ErrorList[] = { {GL_INVALID_VALUE, "Numeric argument out of range (GL_INVALID_VALUE)"}, {GL_INVALID_ENUM, "Enum argument out of ...
true
f7548ece0c55624fc76198c8b3643846fca9e971
C++
Svilen-Stefanov/Practicle-course-Image-reconstruction-and-visualisation
/part2-team1/test/AcquisitionTests.cpp
UTF-8
6,722
2.609375
3
[]
no_license
#include "catch.hpp" #include "TestUtils.h" #include <string> #include <iostream> #include <vector> #include <Eigen/Dense> #include <Eigen/Geometry> #include <math/Volume.h> #include <io/EDFhandler.h> #include <math/Detector.h> #include <math/Raytracer.h> using namespace std; using namespace Eigen; const string EDF...
true
ca688e471a8effb664eb7a822e5ba3c04487fe65
C++
LionZWY/vambush
/HEW_version1/effect.cpp
SHIFT_JIS
11,608
2.546875
3
[]
no_license
//============================================================================= // // GtFNg [effect.cpp] // Author : 镶 // vO쐬 : 2018/3/09 //============================================================================= #include "effect.h" #include "input.h" #include "camera.h" //****************************************...
true
25db375be863553c2c463efd35ad7c81599a7888
C++
Teatoller/cpp_project
/tictactoe/main.cpp
UTF-8
3,057
4.4375
4
[]
no_license
/* For this programming quiz, I would like you to create a game called TicTacToe. In this version of the game you will need to: Create a 4x4 game board Prompt the first user (the 'x' user) to enter their name Prompt the second user (the 'o' user) to enter their name Prompt the 'x' user to select a grid position where ...
true
27a44b23cc6a6025ed4bc5703a3adcbfe02ddcc7
C++
Artigrok/Laboratory-Works
/LW10/LW10N3/main.cpp
WINDOWS-1251
478
3.0625
3
[]
no_license
#include <iostream>; using namespace std; int main() { setlocale(LC_ALL, "ru"); int A; cout << " : "; cin >> A; if ((A % 2 == 0) and (A / 10 > 0) and (A / 10 < 10)) { cout << " "; } else { cout << " "; } }
true
89a4b71eb5f4bc4553c8f169c87f88840fcc8153
C++
abhinavrungta/databaseimpl
/project/src/QueryPlanNode.cc
UTF-8
9,903
2.796875
3
[]
no_license
#include "QueryPlanNode.h" using namespace std; map<int, Pipe*> QueryPlanNode::pipesList; vector<RelationalOp*> QueryPlanNode::relOpList; void QueryPlanNode::ExecutePostOrder() { if (this->left) this->left->ExecutePostOrder(); if (this->right) this->right->ExecutePostOrder(); this->ExecuteNode(); } void Quer...
true
22abf8fce1ff90b35c86564e2abf5f9e74bcd54a
C++
chernant/polkadot_api_cpp
/test/query_storage.cpp
UTF-8
1,893
2.75
3
[ "Apache-2.0" ]
permissive
#include "../src/polkadot.h" #include "helpers/cli.h" #undef NDEBUG #include <cassert> #include <set> int main(int argc, char *argv[]) { auto app = polkadot::api::getInstance()->app(); app->connect(getNodeUrlParam(argc, argv)); // Get the most recent block number and hash auto lastblock = app->getBlo...
true
538d41ce01a34c0d8b06d4f1f88a1780cd2c5738
C++
hoangvanthien/codeForest
/UVa/10806.cpp
UTF-8
2,041
2.53125
3
[]
no_license
/* github.com/hoangvanthien Thien Van Hoang UVA 10806 - "Dijkstra, Dijkstra" */ #include <bits/stdc++.h> using namespace std; #define FOR(i,x,y) for(int i = (x); i<(y); ++i) #define DFOR(i,x,y) for(int i = (x); i>(y); --i) #define maxN 1002 #define pb push_back #define mp make_pair #define F first #define ...
true
19cb307a31c2efb4108204e0353d49fb7206f415
C++
royelee/leetcode
/XProject/Level10.cpp
UTF-8
12,602
3.4375
3
[]
no_license
// // Level10.cpp // XProject // // Created by Roye Li on 1/6/16. // Copyright (c) 2016 Roye Li. All rights reserved. // #include "Level.h" #include "Utils.h" #include <algorithm> #include <iostream> #include <sstream> #include <vector> #include <map> #include <numeric> #include <set> #include <cmath> #include <s...
true
fe439f1cdff46da43f703e2f2db6238d99f8f0f8
C++
wangfuli217/ld_note
/cheatsheet/ops_doc-master/Service/misc/test_api/src/test_stream/test_read_file_size.cpp
WINDOWS-1252
448
3.015625
3
[]
no_license
// obtaining file size #include <iostream> #include <fstream> #include <stdlib.h> using namespace std; const char * filename = "test.txt"; int main() { long l, m; ifstream in(filename, ios::in | ios::binary); l = in.tellg(); in.seekg(0, ios::end); m = in.tellg(); in.close(); cout << "size ...
true
267b146d37ff74f82e4bb7932357cd1e41bdc84d
C++
dhananjay1438/Data-Structures-and-Algorithms
/trees/expression-tree/expression_tree.cpp
UTF-8
478
3.46875
3
[]
no_license
#include <iostream> class Node { Node *left; int data; Node *right; }; class ExpressionTree { private: Node *root; void _insert(); public: ExpressionTree(); void insert(std::string); int solve(); }; ExpressionTree::ExpressionTree() : root(nullptr) {} void ExpressionTree::insert(std::string str) {}...
true
94ca9718c5afdce424ff991df1c7acdad6b17e88
C++
hardenchant/labaratornaya
/Threads/Threads/Threads.cpp
WINDOWS-1251
1,852
3.578125
4
[]
no_license
// Threads.cpp: . // #include "stdafx.h" #include <thread> #include <iostream> #include <string> #include <chrono> #include <mutex> #include <system_error> using namespace std; mutex glock; void func1(string str) { for (int j = 0; j < 100; j++) { glock.lock(); for (int i = 0; i < 4; i++) { cout << str ...
true
f33a544a4d43df261c5f7d57f05946e31741e21d
C++
Vidminas/OpenGL-Projects
/GLEngine/shaderFactory.cpp
UTF-8
1,400
2.8125
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <GL/glew.h> #include "shader.hpp" #include "shaderFactory.hpp" ShaderFactory::ShaderFactory() { //nothing } ShaderFactory::~ShaderFactory() { for (unsigned short index (0); index < mShaders.size(); index++) { glDetachShader (mProgra...
true
057cd2c84f21a10a5c2bff92c12e92e1c0b18f84
C++
TheIslland/learning-in-collegelife
/18.c++/智能指针遍历二叉树尝试.cpp
UTF-8
1,138
3.390625
3
[]
no_license
/************************************************************************* > File Name: 智能指针遍历二叉树尝试.cpp > Author:TheIslland > Mail: 861436930@qq.com > Created Time: 2019年04月05日 星期五 11时14分59秒 ************************************************************************/ #include <iostream> #include <string> #include <m...
true
ee8568e7b3e17b015227a4bc83bb8daa786e04e7
C++
irff/cp-codes
/TOKI/kubangan.cpp
UTF-8
1,966
2.515625
3
[]
no_license
#include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; #define R(i,_a,_b) for(int i=int(_a);i<int(_b);i++) #define PII pair<int,int> #define PIII pair<int,PII> #define x first #define y second int minx,miny,maxx,maxy,pa,pb,n,aa,bb,teskes,d[1001][1001]; char m[1001][...
true
53d640db2a21831c0aa0e8ca6fdea04922a12113
C++
HeoJiYong/JYBaekJoon
/BaekJoon/BaekJoon/10799_스택_미완.cpp
UHC
621
3.0625
3
[]
no_license
/* 10799 踷빮 */ #include <iostream> #include <stack> #include <string> using namespace std; stack <char> st; string str; int main() { //freopen("input.txt", "r", stdin); int stick = 0, result = 0; int temp = 0; cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == '(') { st.push(str[i]); s...
true
ad28511bbee0c055a68c963fb7c61a70e773f3cd
C++
simon0191/ProgrammingExercises
/PowerStrings-UVA-10298/powerStrings.cpp
UTF-8
679
2.875
3
[]
no_license
#include <cstdio> #include <cstring> int main(){ char buff[1000000]; int size; bool flag; while(scanf("%s",buff)==1 && buff[0]!='.'){ flag = false; size = strlen(buff); for(int i = 1;i<size-1 && !flag;++i){ if(size%i == 0){ flag = true; ...
true
2f67c5033644ea18cdb91ccdb6247e5121691ecc
C++
ebrahimree/snmppp
/code/test/test_03_get.cpp
UTF-8
4,535
2.8125
3
[ "MIT" ]
permissive
// SNMPpp: https://sourceforge.net/p/snmppp/ // SNMPpp project uses the MIT license. See LICENSE for details. // Copyright (C) 2013 Stephane Charette <stephanecharette@gmail.com> #include <assert.h> #include <iostream> #include <SNMPpp/Get.hpp> void testGetNext( SNMPpp::SessionHandle &sessionHandle ) { std::cout <<...
true
d07487d874f9c95ef89dea36b083d1d1847e8f34
C++
gykovacs/vessel
/src/lib/openipDS/openipDS/Frame3.cc
UTF-8
1,388
2.984375
3
[]
no_license
#include <openipDS/Frame3.h> namespace openip { Frame3::Frame3() { origin= Vector3<float>(0,0,0); baseX= Vector3<float>(0,0,1); baseY= Vector3<float>(0,1,0); baseZ= Vector3<float>(1,0,0); } Frame3::Frame3(const Frame3& f) { origin= f.origin; baseX= f...
true
d1d8eaf08d85211ca4d3e5b20af21f29bd66db9d
C++
yangcnju/cpp_primer_5
/ch19/ex19.26.cc
UTF-8
469
3.703125
4
[]
no_license
// Exercise 19.26: Explain these declarations and indicate whether they are // legal: #include <iostream> using namespace std; extern "C" int compute(int *, int); //extern "C" double compute(double *, double); int main(int argc, char **argv) { int i = 1; int j = 2; cout << compute(&i,j) << endl; return 0; } e...
true
0a0252eb4a52dcee3fc03bc6d135883624358f1f
C++
zpzjzj/renkou
/Scheme/is_container.hpp
UTF-8
2,758
2.6875
3
[]
no_license
#include <boost/preprocessor/cat.hpp> #include <type_traits> #include <boost/mpl/bool.hpp> template<bool T> using bool_ = boost::mpl::bool_<T>; template <class T> using rm_ref_t = typename std::remove_reference<T>::type; namespace detail { // a preprocess iteration will be better. I an not able to and not interested...
true
cdc8df4df814459342e4f43eb8c579faaf4c6c42
C++
andymina/csci13600-labs
/lab_10/time.cpp
UTF-8
569
3.75
4
[]
no_license
#include "time.h" void printTime(Time time){ std::cout << time.h << ":" << time.m; } int toMinutes(Time time){ return (time.h * 60) + time.m; } Time toTime(int minutes){ Time temp = {0, 0}; temp.h = minutes / 60; temp.m = minutes % 60; return temp; } int minutesSinceMidnight(Time time){ return toMinutes(time...
true
74fc5da121ad16a930c52fc7851bffab95617613
C++
JuhunC/3D_Chess
/Chess/Geometry/Sphere3D.h
UTF-8
596
2.953125
3
[]
no_license
/* Authored by Prof. Jeong-Mo Hong, CSE Dongguk University for Introduction to Computer Graphics, 2017 Spring */ #pragma once #include "GenericDefinitions.h" #include "Box3D.h" class Sphere3D { public: TV center_; T radius_; Sphere3D(const TV& _center, const T& _radius) : center_(_center), radius_(_radius) {...
true
554289aea8eaf5f2cc5b356232155157ef432566
C++
leeheekyo/DES
/DES.cpp
UHC
20,180
2.65625
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> char key[65]; //PCMONE int PCMONE[56]={57, 49, 41, 33, 25, 17, 9, 1 , 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7 , 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45...
true
e61a62dae7418f5a046397e31e0cd2308fcccea7
C++
vikashkumr/Competitive-Programming
/practice/Data structures/Linked list/reverse_linked_list.cpp
UTF-8
1,064
4.28125
4
[ "MIT" ]
permissive
//iterative program to reverse a singly linked list #include<iostream> #include<cstdlib> using namespace std; struct node { int data; struct node *next; }; struct node *head=NULL; void insert(int x) { //creating node dynamically struct node *temp=(struct node *)malloc(sizeof(struct node)); //initiliasing value t...
true
0713039677c42729757e3caf9f36ba4cafb6d0ab
C++
basaraking1221/BTree_Submit
/BTree.hpp
UTF-8
20,129
3.0625
3
[]
no_license
#include "utility.hpp" #include <functional> #include <cstddef> #include "exception.hpp" #include <fstream> const int Mmax=1000; const int Lmax=400; namespace sjtu { template <class Key, class Value, class Compare = std::less<Key> > class BTree { public: typedef pair<const Key, Value> value_type; ...
true
6fddc75c2e7a856d74b3272b0935e197b31c6fee
C++
aranoy15/embedded-software
/app/drivers/bsp/F103xB_METEOSTATION/flash.cpp
UTF-8
1,011
3
3
[]
no_license
#include <flash.hpp> #include <main.h> void bsp::flash::erase() { FLASH_EraseInitTypeDef erase_inits; uint32_t errors = 0; std::uint32_t start = start_address; std::uint32_t count = 1; erase_inits.TypeErase = FLASH_TYPEERASE_PAGES; erase_inits.PageAddress = start; erase_inits.NbPages = count; ...
true
f56b8c968e0caf5ee0c8464011e9abb8b5bbce94
C++
tynrare/remote-games-control
/httpdownloader.cpp
UTF-8
6,129
2.515625
3
[]
no_license
#include "httpdownloader.h" #include <QtWidgets> #include <QtNetwork> #include <QUrl> ProgressDialog::ProgressDialog(const QUrl &url, QWidget *parent) : QProgressDialog(parent) { setWindowTitle(tr("Download Progress")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setLabelT...
true