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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a71bceb73c5c88813e0279fb77cd7bb3349149a5 | C++ | Embracethevoid/typecheker | /expr.h | UTF-8 | 1,416 | 2.765625 | 3 | [] | no_license | #ifndef EXPR_H
#define EXPR_H
#inlcude<list>
#include<string>
using namespace std;
typedef struct expr_val* exp;
struct expr_val
{
char* str;
int num;
float num;
};
extern exp mk_int(int item);
extern exp mk_str(char* item);
extern exp mk_float(float item);
class class_signature{}
class class_body{}
class prog... | true |
1f2361835f561d72a499821435dbff3d330a24d9 | C++ | waterinet/miscellaneous_repo | /cpp_console/stree.h | UTF-8 | 8,938 | 2.96875 | 3 | [] | no_license | #ifndef STREE_H
#define STREE_H
#include <map>
#include <vector>
#include <queue>
#include <string>
#include <iostream>
#include <cstdarg>
namespace pgr {
template<typename T>
std::vector<T> array_as_vector(int count, ...)
{
std::vector<T> vec;
va_list args;
va_start(args, count);
for (int i = ... | true |
b1c50e694872cd909bd726565a0b9bf6f5a0783b | C++ | jeremiahwitt/Dragons | /All Code/routing.h | UTF-8 | 822 | 2.59375 | 3 | [] | no_license | /**
*@file routing.h
*@brief Provides class used to manage routing of map
*/
#pragma once
#include <vector>
#include <iostream>
#include "namespaces.h"
using namespace SimplifiedMapSymbols;
/*!
*@class SingletonRouting
*this singleton class is used for the routing part of map validation
*/
class SingletonRouting
{
priv... | true |
29e5eeea68048a39445e9e86d9e297638702dd71 | C++ | nnonnoon/AbstractDataType | /week3/chain.cpp | UTF-8 | 2,122 | 3.125 | 3 | [] | no_license | #include<iostream>
using namespace std;
typedef int valueType;
struct ListNode
{
valueType val;
ListNode* next;
ListNode* prev;
ListNode(valueType val, ListNode* next=0,ListNode* prev=0)
: val(val), next(next) ,prev(prev){}
};
void print_list(ListNode* node){
while(node!=NULL){
cout<<node->val... | true |
f7a29837a07b5a1a58491d662cb0c71e1432fc25 | C++ | njoy/nuclearData | /implementation/PolymorphicInterpolationCrossSection/test/PolymorphicInterpolationCrossSection.test.cpp | UTF-8 | 3,144 | 2.859375 | 3 | [
"BSD-2-Clause"
] | permissive | #define CATCH_CONFIG_RUNNER
#include <cmath>
#include <functional>
#include "catch.hpp"
#include "math/interpolate.hpp"
#include "math/implementation.hpp"
#include "nuclearData/implementation/PolymorphicInterpolationCrossSection.hpp"
namespace {
std::vector<double> X = {1.0, 2.0, 3.0, 4.0, 5.0};
auto f = [](double ... | true |
d07f7e605b4ce7fea83a0fc83f7d0c9a7f0fb143 | C++ | rfsheffer/genesis-game-engine | /utilities/data/data_bits.h | UTF-8 | 2,235 | 3.21875 | 3 | [] | no_license | //
// data_bits.h
// Classes for helping traversal of and setting of individual bits.
//
// Created by Ryan Sheffer on 11/17/2013.
// Copyright (c) 2013 Ryan Sheffer. All rights reserved.
//
#ifndef DATA_BITS_H
#define DATA_BITS_H
#ifdef _WIN
#pragma once
#endif
namespace data
{
//---------------------------... | true |
cd548ca3d0f84bb34a2e4b3009dc4a79d5c1c5cc | C++ | tischsoic/klasy-2-JMP-Cpp | /klasy 2 JMP 2/Punkt3D.h | UTF-8 | 252 | 2.578125 | 3 | [] | no_license | #include <iostream>
#include "Punkt.h"
using namespace std;
#pragma once
class Punkt3D : public Punkt
{
double z;
public:
Punkt3D();
Punkt3D(double _x, double _y, double _z) : Punkt(_x, _y) { z = _z; }
~Punkt3D();
double distance(Punkt3D);
};
| true |
3acc2086e75f7449cb2443867ceb9c2950a596da | C++ | emuikernel/BDXDaq | /devel/coda/src/rc/runControl/Common/codaSlist.h | UTF-8 | 6,623 | 2.703125 | 3 | [] | no_license | //-----------------------------------------------------------------------------
// Copyright (c) 1994,1995 Southeastern Universities Research Association,
// Continuous Electron Beam Accelerator Facility
//
// This software was developed under a United States Government license
// described in t... | true |
b4d137f5c831032d9ab02daa11e95919d77a2f5a | C++ | Mtj-p/20FAL-CSC-17A-49285 | /Homework/McDonaldJohnPaul_Gaddis_9thEd_Chap4_Prob10_DaysinaMonth/main.cpp | UTF-8 | 1,773 | 3.421875 | 3 | [] | no_license | /*
* file: McDonaldJohnPaul_Gaddis_9thEd_Chap4_Prob10_Daysinamonth
* Author: John-Paul McDonald
* Date: 06/29/20
* Purpose: Input a month, output the number of days
*/
//System Libraries
#include <iostream>
using namespace std;
//User Libraries
//Global Constants
//Universal Math, Physics, Conversions, Higher D... | true |
07949e1116f1b2c59c7de41ddc3ceac22d3c7382 | C++ | MaxKudravcev/KeyLogger | /KeyLogger/LogServer.cpp | UTF-8 | 730 | 2.734375 | 3 | [] | no_license | #include <iostream>
#include "TcpServer.h"
std::wstring GetCurrentDirectory(std::wstring executable) {
return executable.substr(0, executable.find_last_of(L'\\'));
}
int wmain(int argc, wchar_t* argv[])
{
std::locale::global(std::locale("ru_RU.UTF-8"));
int maxClients = std::stoi(argv[2]);
std::wstring gLogDire... | true |
4d241521bb1dff7dceafe7e896c4eff3b136c644 | C++ | chiahsun/chiahsun.github.io | /_posts/src/2016-03-01-move-semantics-c++/solve1.cc | UTF-8 | 3,258 | 3.90625 | 4 | [
"MIT"
] | permissive | #include <cstdlib>
#include <cassert>
#include <iostream>
#include <utility> // for std::swap, std::move
class Vector {
int* _p_array;
int _capacity, _size;
public:
Vector() { std::cout << "Call constructor" << std::endl; init(2); }
Vector(size_t cap) { std::cout << "Call constructor 2" << std::endl; i... | true |
204553f463805e23c25df1ed97766bb3ed48456e | C++ | rdkadiwala/BOokMyTicket | /main.cpp | UTF-8 | 1,646 | 2.71875 | 3 | [
"MIT"
] | permissive | /*
* Author : Ravi Kadiwala
*/
#include<iostream>
#include<iomanip>
#include<cstring>
#include<fstream>
#include<cstdlib>
#include "Login.h"
#include "MovieDetail.h"
#include "PriceBookingDetail.h"
#include "Admin.h"
using namespace std;
int main(){
while(1){
int choi;
PriceBookingDet... | true |
31b6b639da67cb8f2cab0aea267466b87642aa50 | C++ | awerkamp/MSD_script | /env.h | UTF-8 | 876 | 2.5625 | 3 | [] | no_license | //
// Created by Awerkamp on 3/30/21.
//
#ifndef MSD_SCRIPT_ENV_H
#define MSD_SCRIPT_ENV_H
#include <cstdio>
#include "pointer.h"
//#include "val.cpp"
#include "val.h"
#include <string>
#include <sstream>
class Val;
class Env {
public:
virtual PTR(Val) lookup(std::string find_name) = 0;
static PTR(Env) emp... | true |
c2d24d0c1fb964e8c049249ea9c07ecd3f9af3aa | C++ | AmadeusChan/worder | /include/WordBankImpl.h | UTF-8 | 1,865 | 3.125 | 3 | [] | no_license | #ifndef WORD_BANK_IMPL_H
#define WORD_BANK_IMPL_H
#include <vector>
#include "WordBank.h"
#include "WordSet.h"
template <typename T> class WordBankImpl : public WordBank<T>
{
WordSet<T>* m_word_set_;
public:
WordBankImpl(OperateFileStrategy* _m_operate_file_strategy_, string _path_, WordSet<T>* _m_word... | true |
395f7091d1e66c07ae4139654b6702d1fe94bb52 | C++ | MAYUE-92/MY-ssh | /C++/c++study/Circle/BorderCircle.h | UTF-8 | 272 | 2.53125 | 3 | [] | no_license | #include "Circle.h"//声明基类Circle
class BorderCircle:public Circle //公有继承
{
public:
double w; //宽度
double InnerArea();//求内圆面积
double BorderArea();//圆环面积
void Input();//输入半径和圆环宽度
};
| true |
d61c6058dd96a6e2e85f5a32ba5aaf0a41213808 | C++ | goinproduction/moto-manager | /Source/cars-manager/ORDER.cpp | UTF-8 | 4,356 | 3 | 3 | [] | no_license | #include "ORDER.h"
ORDER::ORDER()
{
this->totalPrice = 0;
}
ORDER::~ORDER()
{
}
string ORDER::getCustomerPhone()
{
return this->customerPhone;
}
void ORDER::setCustomerPhone(string phone)
{
this->customerPhone = phone;
}
void ORDER::setTotalRevenue(__int64 revenue)
{
this->totalRevenue = revenue;
}
__int64 OR... | true |
8acdf44704ff1429746cb196b23685881a394acb | C++ | lc19890306/Exercise | /leetcode/Insertion_Sort_List.cc | UTF-8 | 1,328 | 3.34375 | 3 | [] | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* insertionSortList(ListNode* head) {
if (head == nullptr)
return head;
auto prev_i(head);
... | true |
17c46cc45a9f26e50390120c13f5091b4dbc9961 | C++ | adelliinaa/hyped-2017 | /master-slave-comms/slave/slave.cpp | UTF-8 | 2,205 | 2.8125 | 3 | [] | no_license | #include <chrono>
#include <iostream>
#include <string>
#include <vector>
#include "drivers/i2c.hpp"
#include "drivers/vl6180.hpp"
#include "NetworkSlave.hpp"
#define SENSOR1_PIN PIN4
#define SENSOR2_PIN PIN24
NetworkSlave master;
const int SLAVE_PORT = 11999;
const std::string NAME = "Slave:1";
const bool continuou... | true |
9062576d80ec0e75c9df1f24daca2dcd30c94bc8 | C++ | calrose/Example | /datafetcher.hpp | UTF-8 | 2,654 | 2.8125 | 3 | [] | no_license |
#ifndef DATASFETCHER_H
#define DATASFETCHER_H
#include <sstream>
#include <cstdlib>
#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>
#include <curlpp/Exception.hpp>
#include <iostream>
int simpleTest(std::ostream& output)
{
const char *url = "https://csi330-testingdemo.herok... | true |
a67456e439b413a7eae10783d9898573b6ce20e8 | C++ | Patrikvs94/OpenGL-Project-Tnm061 | /ballin/lightsource.cpp | UTF-8 | 1,109 | 2.75 | 3 | [] | no_license | #include "lightsource.hpp"
lightsource::lightsource()
{
pos=new cordinate;
pos->x=0.0f;
pos->y=0.0f;
pos->z=0.0f;
tex.createTexture("textures/red.tga");
norm.createTexture("textures/red_norm.tga");
sphere.createSphere(0.5f, 2);
}
lightsource::~lightsource()
{
delete pos;
}
void light... | true |
3ea39bdea0fdf7c07ba973b04caba1e21347e278 | C++ | Svaard/Operating-Systems | /Lab 13/rcvmes.cpp | UTF-8 | 1,266 | 2.609375 | 3 | [] | no_license | #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdio.h>
#include <iostream>
#include <errno.h>
#include <string.h>
#include <unistd.h>
using namespace std;
int main () {
int myqueue;
key_t mykey;
int status;
int msgsz = 10;
struct Mybuf {
long mtype;
char mtext[2];
};
... | true |
fc70192781d37538634f081c48022eb771288797 | C++ | lnicosia/Piscine-CPP | /day04/ex02/AssaultTerminator.hpp | UTF-8 | 584 | 2.5625 | 3 | [] | no_license | #ifndef ASSAULTTERMINATOR_HPP
# define ASSAULTTERMINATOR_HPP
#include "ISpaceMarine.hpp"
class AssaultTerminator : public ISpaceMarine
{
public:
AssaultTerminator(void);
AssaultTerminator(AssaultTerminator const &instance);
AssaultTerminator &operator=(AssaultTerminator const &rhs);
virtual ... | true |
9603a03b601b45e5be7584d65331301b0d85b430 | C++ | jamesus95/Cpp | /lab4-343/lab4headers/borrow.h | UTF-8 | 3,673 | 3.03125 | 3 | [] | no_license | //-------------------- Metadata --------------------
/**
* @file borrow.h
* Purpose: Header file for class Borrow
*
* @author James Murphree <murphs95@uw.edu>
* @author Vu Dinh <vdinh143@uw.edu>
* @date June 06 2014
* @copyright WTFPLv2.1
*
* Note: Private helpers are typically found und... | true |
e21459f8ee6987ac14c243fca066f0c9a74f799a | C++ | sphanlung/Cpp_Primer_5th_Edition | /Ex_1_4.cpp | UTF-8 | 1,182 | 3.28125 | 3 | [] | no_license | ///////////////////////////////////////////////////////////////////////////////////////
// Name: Ex_1_4.cpp //
// //
// Author: Sergio PL ... | true |
7d0c9a621566684ae85e9574e5a855320b5698f9 | C++ | arin6395/c-programs | /KFUNC.cpp | UTF-8 | 1,100 | 2.890625 | 3 | [] | no_license | /*
* KFUNC.cpp
*
* Created on: 07-Nov-2015
* Author: arindam
*
#include<iostream>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#include<cmath>
#include<iomanip>
using namespace std;
typedef unsigned long long int lli;
#define FOR(i,a,b) for(int i=a;i<b;i++)
lli f(lli n)
{
lli sum=0;
while(n)
... | true |
fa8aced007d4f4f7064d0bbbfbf58f170cbff177 | C++ | SiddharthMishraPersonal/InterviewPreperation | /DataStructures/Docs/PriorityQueueWithLinkedList.cpp | ISO-8859-1 | 5,040 | 3.9375 | 4 | [
"Unlicense"
] | permissive | // An example of simple priority queue using linked lists.
// Priority depends on identity number. Small identity number has greater priority.
// If identity numbers are equal. Then FIFO rules are used.
#include <iostream>
#include <cstring>
#include <iomanip>
using namespace std;
struct DAT
{
int id;
char fullname[50... | true |
a2899febfc7c87fe272bd5a50e69f60832c53bb5 | C++ | SwReliab/gof4srm | /src/KS_arma.cpp | UTF-8 | 3,090 | 3.140625 | 3 | [
"MIT"
] | permissive | #include <Rcpp.h>
using namespace Rcpp;
//' Compute P(D->d-) for the generalized KS statistic
//'
//' This is an experimental function instead of compute_Pdminus.
//' This is not used yet.
//'
//' @param ctime A sequence represents time slots (bins)
//' @param count A sequence indicates the number of samples falls int... | true |
2ff46974ea7d59d07c4862a9be1ea964fb10404b | C++ | czfshine/ComputerGraphics | /src/basic/point.cpp | UTF-8 | 920 | 3.21875 | 3 | [
"MIT"
] | permissive | //基础:利用opengl绘制一个点
// Created by czfshine on 19-2-25.
//
#include <GL/glut.h>
/**
* 主要的绘制函数
* 因为这个程序是静态而且没有交互,所以只要这一个函数就行
* @return
*/
void Display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glPointSize(5.0f); //大小
glBegin(GL_POINTS); //表明开始画点
glVertex2f(0.5f,0.8f);//屏幕分为x(-1,1)y(-1,1)的矩形
glEnd();... | true |
fbd3d612b2e5ead154cd08a44b11cd1f296311b0 | C++ | averkhaturau/Tarificator | /src/Master/Others/Всякие тесты и прочие рудименты/MashineNameControl.h | WINDOWS-1251 | 1,184 | 2.640625 | 3 | [
"MIT"
] | permissive | #ifndef __MASHINENAMECONTROL_H__
#define __MASHINENAMECONTROL_H__
#include <string>
#include "LineControl.h"
class CMashineNameControl : public CLineControl
{
protected:
std::string m_sMashineName;
// . Create.
LOGFONT m_LogFont;
CFont m_Font;
//
COLORREF m_TextColor;
//
DWO... | true |
2e81633b54b01ad110ce10e85f76c9f981f2f90a | C++ | tuannt8/tuan-ercp | /ERCP_interac_line_point/include/Graphics/TopologyModifier.cpp | UHC | 11,022 | 2.765625 | 3 | [] | no_license | #include "stdafx.h"
#include "TopologyModifier.h"
TopologyModifier::TopologyModifier(void)
{
}
TopologyModifier::~TopologyModifier(void)
{
}
void TopologyModifier::addPoints(TopologyContainer* container, std::vector<Vec3f>* points)
{
for(int i=0;i<points->size();i++)
addPoint(container, (*points)[i]... | true |
42dfec180df99a9f6e5055baa847346a83e94a5d | C++ | hyle-team/zano | /src/crypto/crypto-sugar.h | UTF-8 | 29,167 | 2.5625 | 3 | [] | no_license | // Copyright (c) 2020-2021 Zano Project
// Copyright (c) 2020-2021 sowle (val@zano.org, crypto.sowle@gmail.com)
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//
// Note: This file originates from tests/functional_tests/cryp... | true |
28df2a81cfaa7a749a35fa06f32332004b994ff3 | C++ | benmhide/OpenGL-3D | /src/Brick.cpp | UTF-8 | 238 | 2.546875 | 3 | [] | no_license | #include "Brick.h"
//Constructor
Brick::Brick()
{
//Defualt values
position = { 0.0f, 0.0f, 0.0f };
scale = { 1.0f, 1.0f, 0.0f };
colour = { 1.0f, 1.0f, 1.0f };
rotation = 0.0f;
brickAlive = true;
brickDying = false;
hits = 1;
} | true |
464814756443147e86c3dbe27cd2202a5403767d | C++ | r-lyeh-archived/codex | /sample.cc | UTF-8 | 11,105 | 2.671875 | 3 | [
"Zlib"
] | permissive | #include <cassert>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include "codex.hpp"
int main( int argc, const char **argv )
{
assert( encode::html::dec(0) == "�" );
assert( encode::html::dec('\'') == "'" );
assert( encode::html::hex('\'') == "'... | true |
397ed9c676e73b8f3e987f861368efd9520a68ed | C++ | lucianovr/competitive-programming | /URI/2022.cpp | UTF-8 | 2,666 | 2.546875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i(a); i < (b); i++)
#define all(c) c.begin(), c.end()
#define UNIQUE(c) \
{ sort(ALL(c); (c).resize( unique(ALL(c))-c.begin() ); ... | true |
52080fda2df86255343ea4cc2af9ae2e8d95323c | C++ | sriharishekhar/Codeforces | /beautifulyear-problem271A.cpp | UTF-8 | 1,000 | 2.984375 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::string n;
std::cin >> n;
int number = (n[0] - 48)*1000 + (n[1] - 48)*100 + (n[2] - 48)*10 + (n[3] - 48);
++number;
std::vector<int> v;
v.push_back(number/1000);
v.push_back((number - (v[0]*1000))/100);
v.push_back((number - (v... | true |
6dd7642c040ce269a383e8e9e775fa8ed70d9bf7 | C++ | kutsanovm/Assignment6 | /main.cpp | UTF-8 | 1,516 | 3.125 | 3 | [] | no_license | #include "sort.h"
#include <iostream>
#include <fstream>
#include<string>
#include <ctime> //http://www.codebind.com/cpp-tutorial/cpp-program-display-current-date-time/
using namespace std;
int main(int argc, char const *argv[])
{
if (argc > 1)
{
time_t t = time(NULL);
tm* timePtr = localtime(&t);
sort luke ... | true |
754ecf00eb6dc8c3464507be6674d22c9142b446 | C++ | akasilov/EmbeddedLinuxProj | /drivers/gpiobutton.h | UTF-8 | 1,467 | 2.5625 | 3 | [] | no_license | #ifndef GPIOBUTTON_H
#define GPIOBUTTON_H
#include <QString>
#include <QObject>
#include <QTimer>
#include "gpiobase.h"
class gpioButton : public QObject, public gpioBase
{
Q_OBJECT
public:
explicit gpioButton(QObject *parent = nullptr, quint16 PinNumber = 0);
virtual ~gpioButton();
bool configureG... | true |
f240c86f711b34e1ff1ab48d88178f87770211f6 | C++ | valentinvstoyanov/fmi | /dsa-cpp/game-map/game_map.h | UTF-8 | 797 | 2.703125 | 3 | [] | no_license | #ifndef GAME_MAP_GAME_MAP_H
#define GAME_MAP_GAME_MAP_H
#include <vector>
#include <ostream>
#include "graph.h"
class GameMap {
using KeyMap = std::unordered_map<std::string, std::vector<std::string>>;
std::string initial_zone;
KeyMap keys;
Graph<std::string, std::string> zones;
bool canPass(const std::st... | true |
6e3bbbc587e4aca99ba9ee480652286cb5cfaa37 | C++ | it-rangers/Red-Ranger | /równanie kwadratowe.cpp | UTF-8 | 906 | 3.40625 | 3 | [] | no_license | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
cout << "Program do obliczania rownania kwadratowego, ktore ma postac :" << endl;
cout << "__________________a*x^2 + b*x + c = 0_________________________" <<endl <<endl;
cout << "Podaj wartosci stalych a,b,c" <<endl;
flo... | true |
549f421816420198cecec65441cf7693b2c285f3 | C++ | RobotCasserole1736/RoboSim | /Octave/DevTest/Serial_test/arduino_serial_tx_test/arduino_serial_tx_test.ino | UTF-8 | 626 | 2.65625 | 3 | [] | no_license | #define ROTATION_RAD_TO_TX_CHAR_CONV 254.0/2.0/PI
#define POSITION_FT_TO_TX_CHAR_CONV 254.0/50.0
double robot_x_pos = 0;
double robot_y_pos = 0;
double robot_rotation = 0;
void setup() {
Serial.begin(115200);
}
void loop() {
robot_x_pos = (int)(robot_x_pos + 1) % 40;
robot_y_pos = (int)(robot_y_pos + 3 + r... | true |
a327954a1e05f6299b6ed2f79c1f4014c2b19586 | C++ | DoktorNebel/Portfolio | /Evil Supermarket Tycoon/Evil Supermarkt Tycoon/Product.cpp | UTF-8 | 3,022 | 3 | 3 | [] | no_license | #include "Product.h"
Product::Product()
{
}
Product::Product(ProductListItem* description, unsigned short amount, GameData* gameData, TextureHandler* texHandler)
{
this->Name = description->Name;
this->Amount = amount;
this->Quality = description->Quality;
this->Price = description->Price;
this->ExistenceDays... | true |
b808dfc6c6c75d95ddc7b17c9890e3483ed1fc6f | C++ | bamby97/haptic-bullseye-3D | /TargetShootingVr/Logger.h | UTF-8 | 589 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | #ifndef LOGGER_H
#define LOGGER_H
#include <iostream>
#include <fstream>
#include <vector>
#include <iomanip>
using namespace std;
struct gameInfo {
bool hitTarget;
float timeRemaining;
float projectilePosition[3];
float projectileVelocity[3];
float targetDepth;
int throwNumber;
int addedScore;
int targetHit;... | true |
593e086fe61cd67dadefb0006b801f1d1a2e46bc | C++ | Ghadeerof/cplusplus-practices | /ExampleOfPrintingInvoiceData.cpp | UTF-8 | 582 | 3.609375 | 4 | [] | no_license | #include <iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter number of products : "<<endl;
cin>>n;
double units,price,partialPrice , totalPrice = 0;
for(int i = 0; i < n; i++){
cout<<"Enter Units #" <<(i+1)<<endl;
cin>>units;
cout<<"Enter Pri... | true |
4914519c48eeefc0d44099066d75bb0b91990756 | C++ | things-i-want-to-forget/dismay5 | /DCommand.h | UTF-8 | 1,007 | 2.53125 | 3 | [] | no_license | #ifndef DCOMMAND
#define DCOMMAND
#include "DDismay.h"
class DCommand;
typedef void DCommandCallback_t(const char*);
extern DDismay* dismay;
class DCommand
{
public:
DCommand()
{
}
DCommand(const char* name, int fnCallback)
{
m_pszName = name;
m_bIsLua = true;
m_fnLuaCallback = fnCallback;
m_pNext ... | true |
d666834bb61cbf71bc27b94c9c7055e90fd9745c | C++ | yahoo/tunitas-basics | /src/tunitas/number/wc/to_numeric.xcpp | UTF-8 | 6,802 | 2.59375 | 3 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | // This is -*- c++ -*- nearly C++23 with Modules TS but in the S.C.O.L.D. stylings that are so popular these days.
// Copyright Yahoo Inc.
// Licensed under the terms of the Apache-2.0 license.
// For terms, see the LICENSE file at https://github.com/yahoo/tunitas-basics/blob/master/LICENSE
// For terms, see the LICENS... | true |
afeb82742490d6d70d887f131b4202a649a57606 | C++ | MorS25/cvg_quadrotor_swarm | /lib_cvglogger/src/source/dronelogfileswritter.cpp | UTF-8 | 2,697 | 2.78125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | #include "dronelogfileswritter.h"
DroneLogfilesWritter::DroneLogfilesWritter(std::string stackPath) :
init_date(boost::gregorian::day_clock::local_day()),
init_time(boost::posix_time::microsec_clock::local_time()),
eventslog_out(&eventslog_buf),
flight_diary_out(&flight_diary_buf)
{
// creating... | true |
b020036908fb03c02850fbf2a32fbd54a8bf1e0d | C++ | PeterH2N/SOP | /src/camera.hpp | ISO-8859-15 | 1,848 | 2.921875 | 3 | [] | no_license | #ifndef CAMERA_H
#define CAMERA_H
// camera klsee er implementeret p baggrund af denne video: https://www.youtube.com/watch?v=ns9eVfHCYdg
#include "mesh.hpp"
#define YAW -90.0f
#define PITCH 0.0f
#define SPEED 6.0f
#define SENSITIVITY 0.1f
#define ZOOM 45.0f
class Camera
{
public:
Camera(sf::RenderWindow* _window... | true |
8243a6dea82bb260f679b1b3ce36e9fe38395996 | C++ | matheuslc/car-system | /doubly_linked_list.h | UTF-8 | 8,561 | 4.09375 | 4 | [
"Apache-2.0"
] | permissive | #ifndef STRUCTURES_DOUBLY_LIST_H
#define STRUCTURES_DOUBLY_LIST_H
#include <cstdint> // std::size_t
#include <stdexcept> // C++ exceptions
template<typename T>
class DoublyLinkedList {
public:
DoublyLinkedList();
~DoublyLinkedList();
void clear();
void push_back(const T& data);
void push_f... | true |
a1e1eb9bc90dfe977dcd8bef20b8ddc1beb7f845 | C++ | kohstephen/transCnt | /calculation.h | UTF-8 | 3,345 | 2.71875 | 3 | [] | no_license | #ifndef CALCULATION_H
#define CALCULATION_H
#include <vector>
#include <string>
#include "planewall.h"
#include "planewallpoint.h"
#include "infcylinder.h"
#include "infcylinderpoint.h"
#include "rectbar.h"
#include "rectbarpoint.h"
#include "cylinder.h"
#include "cylinderpoint.h"
#include "infrectbar.h"
#... | true |
1807ddd5e8dead266b3d8aaf4ac3b61f014bc057 | C++ | hsy77/Data_Code | /CLionProjects/data_structure/Maze/Maze.h | UTF-8 | 3,241 | 3.109375 | 3 | [] | no_license | //
// Created by rain on 2019/9/27.
//
#ifndef MAZE_MAZE_H
#define MAZE_MAZE_H
//#include <CirQueue>
enum Error_code{underflow, overflow, success};
const int maxqueue = 20; // small value for testing
template<class Queue_entry>
class MyQueue{
public:
MyQueue();
bool empty() const;
Error_code serve();
... | true |
4968d86370344e07329b3d82d55f46f5882e64ae | C++ | frongtb/average | /average/Source.cpp | UTF-8 | 243 | 3.046875 | 3 | [] | no_license | #include<stdio.h>
int main()
{
float a, b, c;
scanf_s("%f", &a);
scanf_s("%f", &b);
scanf_s("%f", &c);
printf("frist number : %f\nsecond number : %f\nthird number : %f\n", a, b, c);
printf("average is %f", (a + b + c) / 3);
return 0;
} | true |
706efe31a9df3825fde5dfc786e09967890905a8 | C++ | musgravehill/aquaUdoPump | /Firmware_v1/FEEDER.ino | UTF-8 | 495 | 2.53125 | 3 | [] | no_license |
void FEEDER_1DOSE_init() {
if ( (millis() - FEEDER_time_start_ms) > 61000L ) { //можно запустить 1 раз в течение конкретной минуты
FEEDER_isFeed = true;
FEEDER_time_start_ms = millis();
}
}
void FEEDER_1DOSE_process() {
if (FEEDER_isFeed) {
if ( (millis() - FEEDER_time_start_ms) <= FEEDER_1DOSE_ms) ... | true |
2adf39feaa4fca7e20fef48af029267f86476da7 | C++ | Brygramming/InsandOuts_Bryan | /SS6-4_LED_Pattern/SS6-4_LED_Pattern.ino | UTF-8 | 2,689 | 3.078125 | 3 | [] | no_license | //4 LED Pattern by Bryan Santiago
//Button
const int Button = 13;
int ButtonState = 0;
//Lights
const int LightOne = 2;
const int LightTwo = 3;
const int LightThree = 4;
const int LightFour = 5;
void setup()
{
pinMode(Button, INPUT);
pinMode(LightOne, OUTPUT);
pinMode(LightTwo, OUTPUT);
pinMode(LightThree, O... | true |
6f19f40254c527a3b2383be949b5e2844f976aa4 | C++ | cfriedt/leetcode | /cut-off-trees-for-golf-event.cpp | UTF-8 | 2,971 | 3.1875 | 3 | [
"MIT"
] | permissive | /*
* Copyright (c) 2021, Christopher Friedt
*
* SPDX-License-Identifier: MIT
*/
// clang-format off
// name: cut-off-trees-for-golf-event
// url: https://leetcode.com/problems/cut-off-trees-for-golf-event
// difficulty: 3
// clang-format on
#include <algorithm>
#include <deque>
#include <unordered_set>
#include <... | true |
4c69b6dd3ad5e78a5748619bfa031a302ade3701 | C++ | jpommerening/template-hell | /units/si_units.h | UTF-8 | 2,544 | 2.828125 | 3 | [
"MIT"
] | permissive | #ifndef _SI_UNITS__H
#define _SI_UNITS__H
#include "unit.h"
namespace SIUnits {
/**
* SI base units.
* @{
*/
class m : public Unit::unit< Unit::length > {
public:
static const char * const name;
};
class g : public Unit::unit< Unit::mass > {
public:
static const char * const nam... | true |
ced4729ea6fb7440b6ef7905560af2473d54ea10 | C++ | GoingMyWay/LeetCode | /1482-how-many-numbers-are-smaller-than-the-current-number/solution.cpp | UTF-8 | 545 | 2.859375 | 3 | [] | no_license | class Solution {
public:
vector<int> smallerNumbersThanCurrent(vector<int>& nums) {
vector<int> count(101, 0);
vector<int> res(nums.size(), 0);
for (int i =0; i < nums.size(); i++) {
count[nums[i]]++;
}
for (int i = 1 ; i <= 100; i++) {
... | true |
c0040141ff0fbf2415906c00363285627125ffb8 | C++ | muhammadtarek98/data-structure-c-implemenation- | /linkedlist.cpp | UTF-8 | 4,042 | 3.65625 | 4 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
//my code
class linked_list
{
private:
struct node
{
int item;
node *next;
};
node *first,*last;
int length;
public:
linked_list()
{
first=NULL;
last=NULL;
length=0;
}
bool IsEmpty()
{
if(length==0)
{
... | true |
af65c49c2f7c30002207c0833d033cb542dd10fc | C++ | jswilder/squealing-prune | /asg4/FiloTree.cpp | UTF-8 | 3,937 | 3.1875 | 3 | [] | no_license | // Jeremy Wilder
// Asg4
#ifndef FILOTREE_CPP
#define FILOTREE_CPP
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
#include "FiloTree.h"
FiloTree::FiloTree(string fileName){
int i, j;
// Read in the file of course..
ifstream infile;
infile.op... | true |
4381cc65cfa879e441e977f5f2ca015cbda1325b | C++ | danbergeland/PencilDurabilitySim | /PencilSim/PaperTest.cpp | UTF-8 | 2,419 | 3.453125 | 3 | [] | no_license | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <string>
#include "Paper.h"
TEST_CASE("Read and write update text","[paper]")
{
Paper p;
p.write("abc");
REQUIRE(p.read() == "abc");
}
TEST_CASE("Clear_at turns letters to spaces","[paper]")
{
Paper p;
p.write("space");
//Intended functi... | true |
e8cbfcf337df5088ac4e13b7d0766f332f1cfb63 | C++ | GT-TDAlab/SARMA | /include/algorithms/uniform.hpp | UTF-8 | 2,724 | 3.03125 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | #pragma once
/**
* @brief This namespace contains required functions for
* the uniform (checker-board) partitioning. Uniform partitioning
* is one of the straightforward algorithms that is used to solve
* mLI problem. Its dual (sarma::uniform::bal) solves the mNC problem
*/
#if defined(ENABLE_CPP_PARALLEL)
namespace s... | true |
e263d76b9574d3bd2c4f8597be5658cda82da8b5 | C++ | niofire/Deuterium-Engine | /Deuterium/Common/d_enum.h | UTF-8 | 344 | 3.015625 | 3 | [] | no_license | #pragma once
#include <string>
namespace deuterium
{
class dEnum
{
public:
dEnum(int enum_id, const std::string& enum_str)
{
_enum_id = enum_id;
_enum_str = enum_str;
}
~dEnum();
const int id() {return _enum_id;}
const std::string& to_string() { return _enum_str;}
private:
int _enum_id;
std::... | true |
b6049835008828379547bc789c48aec017b9ecdd | C++ | Guy-Git/ComputerGraphicsCourse | /Viewer/include/MeshModel.h | UTF-8 | 1,988 | 2.625 | 3 | [] | no_license | #pragma once
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <string>
#include <memory>
#include "MeshModel.h"
#include "Face.h"
struct Vertex
{
glm::vec3 position;
glm::vec3 normal;
glm::vec2 textureCoords;
};
class MeshModel
{
protected:
std::vector<Face> faces_;
std::vector<glm::vec3> vertices_;
std::... | true |
f2c28b9ba9760954ade4b4a159fe2322a7027623 | C++ | Galathorn/desktop-tutorial | /NPuzzleAStar/npuzzle/npuzzle/src/Astar.class.cpp | UTF-8 | 3,651 | 2.609375 | 3 | [] | no_license | #include "../includes/Astar.class.hpp"
using namespace std;
Astar::Astar(void) : Algorithm() {}
Astar::~Astar(void) {}
std::list<std::string> Astar::findPath(nPuzzle &p)
{
p.setLastMove("");
std::list<std::string> path;
std::list<nPuzzle> openSet = std::list<nPuzzle>();
std::list<nPuzzle> closedSet = std::l... | true |
6d855db16798262874136c3ec5011bfb53cadfd7 | C++ | 37947538/Young3_7 | /Classes/GameTools/GameStatePause.cpp | UTF-8 | 1,147 | 2.515625 | 3 | [] | no_license | //
// GameStatePause.cpp
// hero3_2
//
// Created by jl on 14-9-25.
//
//
#include "GameStatePause.h"
#include "BulletObject.h"
#include "BulletBLL.h"
GameStatePause* GameStatePause::instance()
{
static GameStatePause instance;
return &instance;
}
void GameStatePause::enter(GameBLL* gb)
{
}
void GameSt... | true |
d9690c1406aa983f2fc64ebb970967c5c9d31fe3 | C++ | deephealthproject/eddl | /src/serialization/onnx/net/layers/operators/sum_onnx.cpp | UTF-8 | 2,097 | 2.578125 | 3 | [
"MIT"
] | permissive | #if defined(cPROTO)
#include "eddl/serialization/onnx/layers/operators/mult_onnx.h"
#include "eddl/layers/normalization/layer_normalization.h"
#include "eddl/serialization/onnx/utils_onnx.h"
// ONNX import
Layer* build_sum_layer(onnx::NodeProto *node,
map<string, vector<float>> &map_init_values,... | true |
70c662a21f8e8d45b211d06845f71fd52161136f | C++ | nischalbasuti/JNTUH-AA-Lab-2016 | /02.heapsort/hs.cpp | UTF-8 | 941 | 4 | 4 | [
"MIT"
] | permissive | #include<iostream>
void max_heapify(int arr[],int n, int i){
int largest = i;
int left = 2*i + 1;
int right = 2*i + 2;
//left is larger than root
if(left < n && arr[left] > arr[largest]){
largest = left;
}
//if right is larger than largest
if(right < n && arr[right] > arr[largest]){
largest = right;
}
//... | true |
079b185187c209e2b0584247c50f1a9bb489f880 | C++ | pyo7410/Study | /baek/2588_mul_parsing/2588_mul_parsing/소스.cpp | UTF-8 | 355 | 3.28125 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main()
{
int num1, num2;
int n1, n2, n3;
cin >> num1 >> num2;
n1 = num2 / 100;
n2 = (num2 - (n1 * 100)) / 10;
n3 = num2 - (n1 * 100) - (n2 * 10);
cout << num1 * n3 << endl;
cout << num1 * n2 << endl;
cout << num1 * n1 << endl;
cout << (num1 * n1 * 100) + (num1 ... | true |
df0301a5aa58df67ca2585e5fa1caf8a2d225989 | C++ | johngirvin/KoolBox | /Sources/KoolBox/Graphics/Batcher.h | UTF-8 | 5,244 | 2.703125 | 3 | [
"MIT"
] | permissive | #ifndef KOOLBOX_GRAPHICS_BATCHER_H
#define KOOLBOX_GRAPHICS_BATCHER_H
#include "KoolBox.h"
namespace KoolBox
{
class Batcher : private NonCopyable
{
public:
// constructor
// ibCount - number of indices to batch at most
// vbCount - number of vertices to batch at most
Batc... | true |
ba750ef05337c193a1b464b80e3cf80f8d915d79 | C++ | Jeonghwan-Yoo/brain_cpp | /25_성적표ver3/student.cpp | UHC | 5,644 | 3.65625 | 4 | [] | no_license | //25_21
#include "BaseOutput.h"
#include "student.h"
#include <iostream>
#include <iomanip>
//25_15
#include <sstream>
using namespace std;
//
//sNo:й
Student::Student(int sNo) {
//й
this->sNo = sNo;
// ʱȭ
kor = eng = math = 0;
ave = 0.0f;
}
// Ҹ
Student::~Student() {
}
// Է ´.
//ڷκ Է Ƽ ϰ ձ Ѵ.
//ڱ ... | true |
92bba7f038c273fe05ab4dcd2f227021c7cc2a6b | C++ | EdsonYamamoto/URI-Online-Judge-Beginner | /1176.cpp | UTF-8 | 857 | 3.421875 | 3 | [] | no_license | /*
URI Online Judge | 1176
Fibonacci em Vetor
Adaptado por Neilor Tonin, URI Brasil
Timelimit: 1
Faça um programa que leia um valor e apresente o número de Fibonacci correspondente a este valor lido. Lembre que os 2 primeiros elementos da série de Fibonacci são 0 e 1 e cada próximo termo é a soma dos 2 anteriores a el... | true |
88555686279830c2ac22800531d3a78e3ed23d39 | C++ | quanhuynh2007/oop | /matrix/matrixVer1/fractionOperator.h | UTF-8 | 833 | 2.609375 | 3 | [] | no_license | #ifndef _Fraction_h
#define _Fraction_h
#include <iostream>
#include <math.h>
#include <fstream>
#include <vector>
#include <iomanip>
#include <string>
#define FLT_EPSILON (float)1.19209e-07
#define ulong unsigned long
using namespace std;
class Fraction
{
private:
ulong numerator;
ulong denominator;
public:
... | true |
70aec619f47a825fc0702a3b3d21f042c49a20a8 | C++ | uchile/bh-motion_ros-pkg | /src/bh_src/Src/Representations/Modeling/ObstacleModel.cpp | UTF-8 | 2,219 | 2.890625 | 3 | [] | no_license | /**
* @file ObstacleModel.cpp
* Implementation of class ObstacleModel
* @author <a href="mailto:Tim.Laue@dfki.de">Tim Laue</a>
*/
#include "ObstacleModel.h"
//#include "Tools/Debugging/DebugDrawings.h"
/*
void ObstacleModel::draw()
{
DECLARE_DEBUG_DRAWING("representation:ObstacleModel", "drawingOnField");
DECLARE... | true |
d26db0e06ad4166a0dc24d856742c1c9b9d61877 | C++ | judefdiv/chipSmith | /include/toml/toml/value.hpp | UTF-8 | 41,615 | 2.640625 | 3 | [
"MIT"
] | permissive | // Copyright Toru Niina 2017.
// Distributed under the MIT License.
#ifndef TOML11_VALUE_HPP
#define TOML11_VALUE_HPP
#include "traits.hpp"
#include "into.hpp"
#include "utility.hpp"
#include "exception.hpp"
#include "storage.hpp"
#include "region.hpp"
#include "types.hpp"
#include <vector>
#include <tuple>
#includ... | true |
0ce5af0cf8a48bbbb2f8472e245f9fd2201f5c29 | C++ | BenjBarral/STABLE_FLUIDS | /main.cpp | UTF-8 | 11,516 | 2.59375 | 3 | [] | no_license | //
// main.cpp
//
//
// Created by Benjamin Barral.
//
/// C++
#include <cstdio>
#include <cstring>
#include <iostream>
#include <math.h>
#include <algorithm>
#include <ctime>
/// OpenCv
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
/// Eigen
#include <eigen3/Eigen/Dense>
#include<ei... | true |
4c3903e8070605fb1c892559228e0c5c4b7b5eab | C++ | quhezheng/ros | /pi/src/sp1s/src/gy85/adxl345.h | UTF-8 | 3,279 | 2.875 | 3 | [] | no_license | #pragma once
#include <wiringPiI2C.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <math.h>
#define ADXL345_DevAddr 0x53 //device address
#define POWER_CTL 0x2d
#define DATA_FORMAT 0x31
#define FIFO_CTL 0x38
#define AFS_2g 0
#define AFS_4g 1
#define AFS_8g 2... | true |
aaa694f4d6e7f6ba4bfecbbf63502a60fe0dbf28 | C++ | Xin-Jiaqi/C-exercises | /文件.cpp | GB18030 | 1,465 | 3.0625 | 3 | [] | no_license | /*ļ
ıļĸֽڣASCֵ
ļָ룺FILE *fp
*/
ļ
if((fp = fopen("f1.txt","w")) == NULL){
printf("File open error!\n");
exit(0);
}
رļ
if(fclose(fp)){ ʧܷEOF-1
printf("Can not close the file!\n");
exit(0);
}
fgetc
int fgetc(FILE *fp)
while((c = fgetc(fp)) != EOF){
printf("%c",C);
}
fp... | true |
498eda26c4837a2a8cfaca5f8b7dfce5d3228c41 | C++ | k0167/Exercicios | /listaEncadeada/main.cpp | UTF-8 | 1,057 | 3.03125 | 3 | [] | no_license | #include "elemento.h"
#include <QString>
class Lista{
private:
Elemento* inicio;
Elemento* fim;
public:
Lista(){
this->inicio=this->fim=nullptr;
}
~Lista(){
if(this->inicio!=nullptr)
delete this->inicio;
}
void inserir(Elemento* novo){
if(th... | true |
02223c2cadf89fed3cbc2afa76906930bb26b119 | C++ | Arquanite/ProjektPO | /src/addumpiredialog.cpp | UTF-8 | 1,251 | 2.515625 | 3 | [] | no_license | #include "addumpiredialog.h"
#include "ui_addumpiredialog.h"
AddUmpireDialog::AddUmpireDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AddUmpireDialog){
ui->setupUi(this);
connect(ui->OK, SIGNAL(clicked(bool)), this, SLOT(Sprawdz()));
connect(ui->Anuluj, SIGNAL(clicked(bool)), this, SLOT(reject()));
... | true |
e906db188ec1c0d10ca3650e332a3bab116d09a8 | C++ | guzhaolun/LeetCode | /LeetCode/MyCode/76 minimum_window_substring.h | GB18030 | 2,814 | 3.140625 | 3 | [] | no_license | #include <string>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
using namespace std;
class Solution76
{
public:
//1.ظĸֿӰ㲻ˡ
//2.˹ˣò״ظģʱˡ
//ҵ뷨Ǽ¼ÿӽȥλãȻظȥǸظ
//Ȼ漰ܶɾֻǶ˸hash_map¼Щظģ
//Ȼǰ߾ͺˣţơ
string minWindow(string s, string t)
{
if (s.size() < t.size())
return "";
map<char, int> map_t;... | true |
003e9f448281944cf5067d07d53c624b47dcec38 | C++ | Jackie890621/Arithmetic | /stack.cpp | UTF-8 | 1,072 | 3 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main()
{
int n;
long long num1, num2;
vector<long long> stack;
string str;
string temp;
cin >> n;
for (int i = 0; i < n; i++) {
scanf("\n");
getline(cin, str);
for (int j = 0; j < str.l... | true |
f338cb623f634c44fd283bb65eb04686fa290cb5 | C++ | igusher/euler | /20. FactorialDigitSum/main.cpp | UTF-8 | 657 | 2.703125 | 3 | [] | no_license | #include <iostream>
#include "MyBigInt.h"
using namespace std;
void main ()
{
unsigned long long sum =0;
char * buff = new char[1000];
int buffSize = 0;
MyBigInt * bigInt = new MyBigInt();
bigInt->add(1);
unsigned int rem;
for(int i = 2 ; i <= 100; i++)
{
bigInt->mul(i);
}
//bigInt->mu... | true |
15571797846a56a536889f650656a00a204a58ac | C++ | leungyukshing/DataStructure | /Queen/Queens.cpp | UTF-8 | 1,411 | 3.328125 | 3 | [] | no_license | #include <iostream>
#include "Queens.hpp"
using namespace std;
void Queens::insert(int col) {
queen_square[count++][col] = true;
}
void Queens::remove(int col) {
queen_square[--count][col] = false;
}
Queens::Queens(int size) {
board_size = size;
count = 0;
for (int row = 0; row < board_size;... | true |
c14437ff2dc1c83339523afbb598ddb7b561b107 | C++ | lwxGitHub123/micro-manager | /mmCoreAndDevices/MMDevice/ModuleInterface.cpp | UTF-8 | 4,237 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | ///////////////////////////////////////////////////////////////////////////////
// FILE: ModuleInterface.cpp
// PROJECT: Micro-Manager
// SUBSYSTEM: MMDevice - Device adapter kit
//-----------------------------------------------------------------------------
// DESCRIPTION: The implementation for t... | true |
e70d40a9881291f8e627bb85ae6d35f365d0be87 | C++ | devyetii/OOP_PaintForKids_Ph2 | /GUI/Output.cpp | UTF-8 | 11,631 | 2.71875 | 3 | [] | no_license | #include "Output.h"
Output::Output()
{
//Initialize user interface parameters
UI.InterfaceMode = MODE_DRAW;
UI.width = 1250;
UI.height = 650;
UI.wx = 5;
UI.wy = 5;
UI.StatusBarHeight = 50;
UI.ToolBarHeight = 60;
UI.MenuItemWidth = 70;
UI.DrawColor = BLUE; //Drawing color
UI.FillColor = GREEN; //Filling ... | true |
86705898bc582b4a559448ab396012c4b88dfd47 | C++ | jacobswisher/ChessV3 | /Headers/Move.h | UTF-8 | 738 | 3 | 3 | [] | no_license |
#include <cstdint>
class Move {
public:
uint8_t origin;
uint8_t destin;
bool isCapture;
bool isDoublePush;
bool isKingCastle;
bool isQueenCastle;
bool isEP;
bool isKnightPromo;
bool isBishopPromo;
bool isRookPromo;
bool isQueenPromo;
Move(uint8_t o, uint8_t d) {
origin = o;
destin ... | true |
413af8ae4723bdc01dcf47890d1b2d9412fd0240 | C++ | veldrinlab/veldrinlabProjects | /AlleMario/AlleMario/Allegro/Viewport.cpp | WINDOWS-1250 | 1,858 | 2.984375 | 3 | [] | no_license | /**
* Viewport.cpp
* File contains definition of Viewport class.
*
* Created on: 2010-07-09
* Author: Szymon "Veldrin" Jaboski
*/
#include <iostream>
#include "Viewport.h"
using namespace std;
Viewport::Viewport()
{
setViewportWidth(640.0f);
setViewportHeight(480.0f);
setWorldX(0.0f);
setWorldY(0.0f... | true |
2c52e2517ed0c837e5d717636ea9265558cc9f03 | C++ | adillon3/CPSC-350-Assignment-5 | /StudentBST.cpp | UTF-8 | 584 | 2.625 | 3 | [] | no_license | /*******************************
* Andrew Dillon
* 2382400
* CPSC 350
* Assignment 05
*******************************/
#include "StudentBST.h"
void StudentBST :: SerializeStudentBST(ostream& oFile)
{
SerializeStudentBSTHelper(oFile, root);
}
void StudentBST :: SerializeStudentBSTHelper(ostream... | true |
f464bc103cc52d6b60b316e9004a57473a7f61c1 | C++ | jwvg0425/boj | /solutions/3050/3050.cpp14.cpp | UTF-8 | 1,159 | 2.96875 | 3 | [] | no_license | #include <stdio.h>
#include <algorithm>
#include <queue>
#include <iostream>
#include <bitset>
#include <memory.h>
int maxHeight[401][401];
int main()
{
int r, c;
scanf("%d %d", &r, &c);
std::vector<std::string> map;
for (int i = 0; i < r; i++)
{
std::string str;
std::cin >> str;
map.push_back(str);
}... | true |
26dabd1d457effade3123b233c473369f4b9cbdf | C++ | cycasmi/proyectos-VS | /Segundo semestre orientada a objetos/ProyectoFinal v.5/YogurGriego.h | UTF-8 | 547 | 2.515625 | 3 | [] | no_license | #pragma once
#include "Yogur.h"
class YogurGriego : public Yogur
{
private:
string fruta;
public:
YogurGriego(string nombre, int costo, int precio, int calorias, int diaC, int mesC, int anioC) : Yogur(nombre, costo, precio, calorias, diaC, mesC, anioC) {}
void imprimir()
{
cout << "\nSoy un Yogur Griego\n";
... | true |
ee2453a5ecb6930328402fcb3c30b1c15548e756 | C++ | satomshr/toy_car | /test_motor_sensor_01/test_motor_sensor_01.ino | UTF-8 | 1,789 | 2.5625 | 3 | [] | no_license |
// test_motor_sensor_01.ico ; test program of mortor (DRV8835) and
// ultrasonic sensor (HC-SR04)
// author ; sato.mshr@gmail.com
// connection of DRV8835
// Vcc = 5V
// MODE = GND (using IN/IN mode)
// AIN1 = D5 (arduino)
// AIN2 = D6 (arduino)
// BIN1 = GND
// BIN2 = GND
// VM = 3V
// AOU... | true |
e564f72d13e7788f51185b1e3c304cf5c3214fcc | C++ | legendsovermyths/DSA | /C++/PopulateInorderSuc.cpp | UTF-8 | 2,772 | 3.5625 | 4 | [] | no_license | // { Driver Code Starts
#include <stdio.h>
#include <stdlib.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
struct node
{
int data;
struct node *left;
struct node *right;
struct node *next;
node(int x)
{
data = x;
left = NULL;
right = NULL;
... | true |
268422c64518b601fe8a3c9e6c9fe633009956fa | C++ | Sarvesh2k/FreeRTOS_Arduino | /Accurate_Delay/Accurate_Delay.ino | UTF-8 | 1,056 | 3.359375 | 3 | [] | no_license | #include <Arduino_FreeRTOS.h>
//Program to perform more accurate delays using getTick
//Define two tasks
void Task_Print1(void *param);
void Task_Print2(void *param);
TaskHandle_t TaskHandle_1;
TaskHandle_t TaskHandle_2;
void setup() {
// Inititalize serial communication at 9600 bits per second
Serial.begin(9600... | true |
72a6b88c43cf7129815549c0e6a0077bfb0f13e5 | C++ | algorithm005-class01/algorithm005-class01 | /Week_08/G20190343020042/LeetCode_8_0042.cpp | UTF-8 | 712 | 2.984375 | 3 | [] | no_license | class Solution {
public:
int myAtoi(string str) {
int index = 0, sign = 1, total = 0;
if(str.length() == 0) return 0;
while(str[index] == ' '&& index < str.length())
index++;
if(str[index] == '+'||str[index] == '-'){
sign = str[index] == '+' ? 1 : -1;
... | true |
1b5f91339f29183b5fea31bc94cea012f594b4f7 | C++ | JustZyx/StackCalculator | /Input.h | UTF-8 | 359 | 2.875 | 3 | [] | no_license | #if !defined (INPUT_H)
#define INPUT_H
const int maxBuf = 100;
// Tokens are tokNumber, tokError, +, -, *, /.
const int tokNumber = 1;
const int tokError = 2;
// Gets input from stdin, converts to token.
class Input
{
public:
Input ();
int Token () const { return _token; }
int Number () const;
private:
int _... | true |
ee3915455c270c63ded2d8aa94abe2eae86deef0 | C++ | kiborroq/CPP_piscine | /CPP00/ex01/main.cpp | UTF-8 | 3,775 | 3.25 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... | true |
87e0d723bdde3132233eca92eb9e185fbdd6b696 | C++ | Compiler/Far-Game-Engine | /FarEngine/src/EntityComponentSystem/EntityManager.h | UTF-8 | 5,809 | 2.765625 | 3 | [] | no_license | #pragma once
#include <stdint.h>
#include <vector>
#include <unordered_map>
#include <memory>
#include <EntityComponentSystem/Components/Component.h>
#include <iostream>
#include <Tools/Logging/TmpLog.h>
namespace far{
typedef uint64_t Entity;
class EntityManager{
private:
std::unordered_m... | true |
8d01464f10adbf410f2adc360c96f2d93e6321ca | C++ | revilo196/ofVisualGenerator | /src/PreviewApp.cpp | UTF-8 | 1,069 | 2.8125 | 3 | [] | no_license | /**
* @file PreviewApp.cpp
* @author PreviewApp code
* @brief
* @version 0.1
* @date 2020-06-26
*
* @copyright Copyright (c) 2020
*
*/
#include "PreviewApp.h"
/**
* @brief setup the PreviewApp
* allocate the FBO's
*/
void PreviewApp::setup()
{
settings.loadFile("settings.xml");
const int width = setti... | true |
dd80099a5ea608621aaf694d4b054ba1d0740516 | C++ | YishaiSeela/ex3 | /Map/BfsSearch.h | UTF-8 | 616 | 2.84375 | 3 | [] | no_license |
#ifndef EXERCISE1_BFSSEARCH_H
#define EXERCISE1_BFSSEARCH_H
#include "Grid.h"
#include <queue>
class BfsSearch
// Class that performs the bfs algorithm search
// and prints the shortest path
{
public:
queue<Node *> ptQueue; // The stack for the bfs algorithm
Grid gameGrid; // The grid of the map
//BfsS... | true |
d18586db1a29fa3053482b4a75247575adf95d14 | C++ | Bingyy/LeetCode | /C++/lib.h | UTF-8 | 226 | 2.546875 | 3 | [] | no_license | #include <vector>
#include <algorithm>
#include <string>
#include <stack>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL){}
}; | true |
0d4046c6d2bcd00d30eb46217d0e2f86d6e3960f | C++ | dcampora/netfpga-polling | /poller/udp_headers.cpp | UTF-8 | 2,050 | 2.734375 | 3 | [] | no_license |
#include "udp_headers.h"
UDPPacket::UDPPacket(GenericPacket* packet){
// Assuming the packet is an UDPPacket
processPacket(packet->_header, packet->_packet);
}
bool UDPPacket::processPacket(const struct pcap_pkthdr* header, const u_char* packet){
cloneHeaderAndPacket(header, packet);
// Generic... | true |