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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7fa562b8962ebeb412a56c7ba6927fae30e2a697 | C++ | degurii/BOJ | /prob_10000~/15511_League of Overwatch at Moloco (Hard).cpp | UHC | 1,377 | 3.5625 | 4 | [] | no_license | /*
Է
First line contains two integers, n and m where 1 n 16 and 1 m 150.
The following m lines contain two integers where i+1th line
describes fi and si where 1 fi, si n. It is guaranteed that fi si for all i.
Your output should be a single line that contains a string "POSSIBLE" or "IMPOSSIBLE" (quotes for cla... | true |
4c11dcde0928d2e660e652ddd9493bee1e5f42a5 | C++ | rahulsahukar/cplusplus | /map.cc | UTF-8 | 386 | 3.078125 | 3 | [] | no_license | #include<iostream>
#include<map>
using namespace std;
int main()
{
map<int,char> m;
m[1]='a';
m[2]='b';
m[1]='c';
m.insert(pair<int,char>(3,'d'));
for(map<int,char>::iterator it=m.begin();it!=m.end();it++)
{
cout<<it->first<<" "<<it->second<<endl;
}
map<int,char>::iterator it... | true |
ece6d69b96e2f22834e5e116f7a96ab646299edd | C++ | SamBeaudoin/GAME1011_Assignment_Text-Based | /Text_Based_Assignment/TextManager.h | UTF-8 | 525 | 2.96875 | 3 | [] | no_license | #pragma once
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class TextManager
{
private:
TextManager();
void BuildStringArrays();
// String arrays
string Descriptions[20];
string Responses[20];
string Endings[5];
public:
// Setters
void setDescription(int index, string desc)... | true |
6f3870f2f7f7e48dec7ae6be068dce5944c51d86 | C++ | EdimarBauer/TCC | /khbst.cpp | UTF-8 | 7,172 | 3.15625 | 3 | [] | no_license | /*
* Author: Edimar Jacob Bauer
* Email: edimarjb@gmail.com
* Date: October 11, 2018
*/
/*
* Key Hidden Binary Search Tree
*
* Estrutura dinâmica como a DHBST (Dinamic Hidden Binary Search tree), nós podem ser inseridos no meio
* Porém, ao invés de guardar a quantidade de nós faltantes acima (miss), guarda-se o valor... | true |
ef9b2adc6ae7d877e396131b7256f024a8b4419e | C++ | Adnan-13/URI-Submissions | /1914/main.cpp | UTF-8 | 588 | 2.875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
scanf("%d", &t);
while(t--)
{
string player1, ans1, player2, ans2;
cin >> player1 >> ans1 >> player2 >> ans2;
int num1, num2;
scanf("%d%d", &num1, &num2);
if((num1 + num2) % 2 == 0 )
... | true |
274e02f0bc4a283139014e1ccbb9dbeff85f5155 | C++ | owhyy/cpp-primer | /unorganised/r_l_values.cpp | UTF-8 | 265 | 3 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <string>
#include <fstream>
using namespace std;
using std::vector;
using std::string;
void printSum(int n)
{
cout<<n+n<<endl;
}
int main()
{
int i = 5;
printSum(i);
printSum(2+3);
return 0;
} | true |
269b40d403db6e8a8531199b0b4a31f3a329fe9a | C++ | petrarce/real_time_graphics | /libs/typed-geometry/src/typed-geometry/feature/fwd_diff.hh | UTF-8 | 4,868 | 2.59375 | 3 | [
"MIT"
] | permissive | #pragma once
#include <typed-geometry/common/scalar_math.hh>
#include <typed-geometry/detail/utility.hh>
#include <typed-geometry/types/scalars/fwd_diff.hh>
namespace tg
{
// ================================= Operators =================================
// auto-diff
template <class T>
TG_NODISCARD constexpr fwd_diff<... | true |
59801adcd9da39f1dd92101233ca545505be5d2f | C++ | green-fox-academy/nemethricsi | /week-04/day-2/Zoo/main.cpp | UTF-8 | 754 | 3.046875 | 3 | [] | no_license | #include <iostream>
#include "Animal.h"
#include "Mammal.h"
#include "EggLayer.h"
#include "Reptile.h"
#include "EggLayer.h"
#include "Bird.h"
int main(int argc, char *args[])
{
Reptile reptile("Crocodile");
Mammal mammal("Koala");
Bird bird("Parrot");
Bird bird2("Galamb", 2, Gender::FEMALE, 40, 45);... | true |
b056dc53adfe0d5e89d9bb96e68fce8f3bea623d | C++ | kmyk/toyama1710_cpp_library | /queue/queue_aggregation.cpp | UTF-8 | 2,100 | 3.109375 | 3 | [] | no_license | #include <iostream>
#include <cstdio>
#include <cassert>
#include <functional>
#include <stack>
using namespace std;
using llong = long long;
//===
// #include <stack>
// #include <cassert>
template<class SemiGroup, class OP = function<SemiGroup(SemiGroup, SemiGroup)> >
struct QueueAggregation {
using Stack = stac... | true |
7a3ab39ed6ee8bf64c3f8de3bb3ea89aacd8762e | C++ | csuhuangcheng/render | /render/point.cpp | UTF-8 | 393 | 2.875 | 3 | [] | no_license | #include "render/point.hpp"
namespace Render {
Point::Point(float x, float y): x(x), y(y) {
}
void Point::Draw(Target& target) const {
(void) target;
}
void Point::SetX(float x){
this->x = x;
}
void Point::SetY(float y){
this->y = y;
}
float Point::X(void) const noexcept {
return x;
}
float P... | true |
22b1632f190cd6e1acee68aa31ef3b0bd539b623 | C++ | ttt977/algorithm | /boj/2252.cpp | UTF-8 | 548 | 2.875 | 3 | [] | no_license | #include <iostream>
#include <queue>
using namespace std;
int N,M;
vector<int> v[32001];
queue<int> q;
int degree[32001];
int main(void)
{
int a=0,b=0;
cin >> N >> M;
for(int i=0;i<M;i++)
{
scanf("%d %d",&a,&b);
v[a].push_back(b);
degree[b]++;
}
for(int i=1;i<=N;i++)
{
if(degree[i] == 0)
q.push(i... | true |
999d0fded4e74ebbedaa74ff40856be348236011 | C++ | pva701/codes | /List/list.cpp | UTF-8 | 4,474 | 3.3125 | 3 | [] | no_license | #include "list.h"
//begin of dangerous zone
list::list() {
head = new node();
head->next = head;
head->prev = head;
}
list::~list() {
node *cur = head;
cur = cur->next;
while (cur != head) {
node *nx = cur->next;
delete cur;
cur = nx;
}
delete cur;
}
list::list... | true |
e624e1907f176be60b6024b9a995685be368c830 | C++ | ulinka/tbcnn-attention | /github_code_index_sort/cpp/5/123.c | UTF-8 | 846 | 3.296875 | 3 | [] | no_license | //============================================================================
// Name : bubble-sort.cpp
// Author : Lysander Gutierrez
// Date :
// Copyright :
// Description : Implementation of bubble sort in C++
//============================================================================
#in... | true |
f822e13be7b905550b1d51d2735f8a2cd1a6a2d3 | C++ | Dogbone0714/C-_Database | /A45.cpp | UTF-8 | 217 | 2.5625 | 3 | [] | no_license | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main(void){
int a;
cin>>a;
for(int i=2;i<=a*2;i+=2){
for(int j=i;j<i+i;j+=2){
cout<<j<<" ";
}
cout<<endl;
}
}
| true |
96a13f83da0da72ca2a0c221fefb2dacad6e2f88 | C++ | KristinaGebel/HW2 | /CShape.h | UTF-8 | 604 | 2.8125 | 3 | [] | no_license | // Filename:CShape.H
// Description: An Abstract class to encapsulate the Shape properties
// Author: Kristina Gebel
// Date Modified: November 20, 2020
//
#include "Cpoint.h"
#include "CColor.h"
#pragma once
#if !defined(_CSHAPE_H_)
#define _CSHAPE_H_
class CShape
{
public:
// Default Constructor
CShape(v... | true |
c5851f5f3025343d7e534e1d91c3f2acac00d912 | C++ | kkminseok/Git_Tutorial | /Algorithm/Baekjoon/1874.cpp | UHC | 1,270 | 3.015625 | 3 | [] | no_license | #include<iostream>
#include<stack>
#include<cstring>
#include<queue>
using namespace std;
void Solution()
{
int n;
cin >> n;
stack<int> s;
queue<char> q;
bool* check = new bool[n + 1];
memset(check, false, sizeof(check));
for (int i = 0; i < n; ++i)
{
int input;
cin >> input;
if (s.empty())
{
for (i... | true |
43dfa51f2f1583263f628acb546de84a7ad3e610 | C++ | ybieri/algolab | /2018/week4/importantbridges/importantbridges.cpp | UTF-8 | 3,315 | 2.859375 | 3 | [] | no_license | // Includes
// ========
// STL includes
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cassert>
// BGL includes
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/prim_minimum_spanning_tree.hpp>
#include <boost/grap... | true |
77d45b0f9ee3e5c942fe9ed90d05dba0b3291bc5 | C++ | ssahillppatell/OOAD-Project | /classes/product.cpp | UTF-8 | 1,216 | 3.375 | 3 | [] | no_license | class Product {
private :
string username;
string id;
string name;
string category;
double price;
int quantity;
double discount;
public :
void setDetails(string, string, string, string, double, int, double);
string getId();
string getName();
double getPrice();
int getQuantity();
double ge... | true |
68365ba7151f3bec50a4cd10f6c1a86127da57d0 | C++ | atabakp/C-- | /A&D/Midterm/Midterm/Node.h | UTF-8 | 924 | 3.296875 | 3 | [] | no_license | #pragma once
template <typename T>
class Node
{
public:
T data;
Node<T> *next;
Node<T> *prev;
public:
Node();
~Node();
void setData(T val);
T getData();
void setNext(Node* next);
Node<T>* getNext();
void setPrev(Node* Prev);
Node<T>* getPrev();
};
#pragma once
#include "Node.h"
#include <stdint.h>
using n... | true |
b6315d3d3f51f2d8886a36cdeaa2babd487bec74 | C++ | agarciarin/vmu931 | /src/sensor.cpp | UTF-8 | 7,640 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | #include "vmu931/sensor.hpp"
#include "vmu931/commands.hpp"
#include <algorithm>
#include <cassert>
#include <type_traits>
#include <boost/asio/write.hpp>
#include <boost/endian/conversion.hpp>
namespace vmu931
{
template<typename T>
T read(const uint8_t* ptr);
template<>
uint32_t read(const uint8_t* ptr)
{
uint... | true |
ed6b215b46735431291cc5f39035f302abaac427 | C++ | KyleMylonakis/Cpp-examples-and-problem-solutions | /calculatorOfMeans/calculatorOfMeans/calculatorOfMeans.cpp | UTF-8 | 1,348 | 3.796875 | 4 | [] | no_license | // calculatorOfMeans.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using arithmeticFcn = int(*)(int, int);
int getNumber()
{
std::cout << "Please enter an integer \n";
int input{};
std::cin >> input;
std::cin.ignore(12345, '\n');
return input;
}
int add(i... | true |
d5a9fecc9018345040597b5d792e317159af5b1d | C++ | MrDoubleZ/LeetCode | /39.Combination Sum.cpp | UTF-8 | 1,025 | 2.75 | 3 | [] | no_license | class Solution {
public:
void back_tracking(vector<int>& candidates,
vector<int>& each_res,
vector<vector<int>>& res,
int target,
int pos,
int sum)
{
if (sum==target)
{
... | true |
ee8436c21a975ea726628189e68dd401907a1bde | C++ | aliosmanulusoy/Probabilistic-Volumetric-3D-Reconstruction | /core/vil1/tests/vil_vil1_compare_access_timings.cxx | UTF-8 | 3,494 | 2.9375 | 3 | [] | no_license | //:
// \file
// \brief Tool to test performance of different methods of accessing image data.
// When run, tries a variety of different approaches and reports their timings.
// Useful to try it on different platforms to see how different optimisers perform.
// \author Tim Cootes
#include <iostream>
#include <ctime>
... | true |
684ba71ccf0b975d917c0fec6c1d1e0b15db6c1b | C++ | koha13/All-code | /C-Thay_Son/Day doi xung.cpp | UTF-8 | 283 | 2.671875 | 3 | [] | no_license | #include<stdio.h>
void nhap(int a[], int &n){
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
}
int kt(int a[],int n){
for(int i=0;i<n;i++)
if(a[i]!=a[n-1-i]) return 0;
return 1;
}
main(){
int a[20],n;
nhap(a,n);
if(kt(a,n)) printf("Yes\n");
else printf("No");
}
| true |
9041e4e819a5b3fd6345757dc3fc83705a84ac9d | C++ | apervushin/leetcode-cpp | /path_sum_iii.cpp | UTF-8 | 676 | 3.3125 | 3 | [] | no_license | #include "tree_node.cpp"
using namespace std;
class PathSumIII {
public:
int pathSum(TreeNode* root, int sum) {
if (root == nullptr) {
return 0;
}
return pathSum(root, sum, 0) + pathSum(root->left, sum) + pathSum(root->right, sum);
}
private:
int pathSum(TreeNode* root... | true |
ada46cb6ce363613d773679a06a4f4c21fc06455 | C++ | walkccc/LeetCode | /solutions/0294. Flip Game II/0294.cpp | UTF-8 | 652 | 3.078125 | 3 | [
"MIT"
] | permissive | class Solution {
public:
bool canWin(string currentState) {
const auto it = memo.find(currentState);
if (it == memo.cend())
return it->second;
// If any of currentState[i:i + 2] == "++" and your friend can't win after
// Changing currentState[i:i + 2] to "--" (or "-"), then you can win
for... | true |
827e33e333d71569c6ea595560a7455b744dcab6 | C++ | sneilk/cpp_coursera | /W3ModuleSort.cpp | UTF-8 | 583 | 3.203125 | 3 | [] | no_license | /*
* W3ModuleSort.cpp
*
* Created on: Apr 12, 2020
* Author: sneilk
*
* Task:
* https://www.coursera.org/learn/c-plus-plus-white/programming/D5IKE/sortirovka-tsielykh-chisiel-po-moduliu
*/
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
bool ModuleCompa... | true |
90751d1c407e6fdd4fb4bf9770d1bf73d49cc734 | C++ | junkkerrigan/algorithmics | /additional/geometry/839.cpp | UTF-8 | 1,280 | 3.109375 | 3 | [] | no_license | #include <iostream>
#include <algorithm>
using namespace std;
int xA, yA, xB, yB, xC, yC, xD, yD;
int sgn(int n)
{
return (n > 0) - (n < 0);
}
int RectanglesIntersects(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
if (sgn(x3 - x2) * sgn(x4 - x1) > 0) return 0;
if (sgn(y3 - y2) * sgn(y4 - y1) ... | true |
39d85441acbc9f179cb229b33e4132d1ec3d7c7a | C++ | TomLott/cpp | /day04/ex02/main.cpp | UTF-8 | 1,170 | 2.890625 | 3 | [] | no_license | #include "AssaultTerminator.hpp"
#include "ISpaceMarine.hpp"
#include "ISquad.hpp"
#include "Squad.hpp"
#include "TacticalMarine.hpp"
int main() {
ISpaceMarine *bob = new TacticalMarine;
ISpaceMarine *jim = new AssaultTerminator;
ISquad *vlc = new Squad;
vlc->push(bob);
vlc->push(jim);
for (int i = 0; i < vlc->g... | true |
6ed113b5acbdb40b6f49306bb1bcf269b39fd53c | C++ | Tralfazz/Magshitrivia-server | /Helper.cpp | UTF-8 | 1,737 | 3.25 | 3 | [] | no_license | #include "Helper.h"
#include <string>
#include <iomanip>
#include <sstream>
// recieves the type code of the message from socket (first byte)
// and returns the code. if no message found in the socket returns 0 (which means the client disconnected)
int Helper::getMessageTypeCode(SOCKET sc)
{
char* s = getPartFromSo... | true |
0926da1f5101a6e84d6ca2c8720843670397c7b1 | C++ | sanchitgoel10/365_of_code | /LeetCode 30 Day June/Is Subsequence.cpp | UTF-8 | 286 | 2.65625 | 3 | [] | no_license | class Solution {
public:
bool isSubsequence(string s, string t) {
int n=s.size();
int c=0;
for(auto i:t){
if(c==n)return 1;
if(i==s[c]){
c++;
}
}
if(c==n)return 1;
return 0;
}
}; | true |
08fb6c3e3b9114839ba06b6fa0b85f626db2af48 | C++ | JoanCoCo/MezzoReader | /source/MezzoUtilities.cpp | UTF-8 | 31,056 | 2.78125 | 3 | [] | no_license | /**
* Utilities.cpp
*
* SMII 2020/2021
* Joan Colom Colom
*
* Implementation of the class described in Utilities.h.
*/
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#include <list>
#include "../include/MezzoUtilities.h"
#include "../include/Not... | true |
49a5521a9ccfa7706b79243a7915b5e9454c06a2 | C++ | imohdalam/HacktoberFest2k21 | /perfectNumber.cpp | UTF-8 | 285 | 3.171875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, sum=0;
cout<<"Enter Number: ";
cin>>n;
for(int i=1; i<=n; i++)
{
if(n%i==0)
sum+=i;
}
if(sum==2*n)
cout<<n<<" is Perfect Number"<<endl;
else
cout<<n<<" is NOT Perfect Number"<<endl;
return 0;
}
| true |
969550418f2824651293243e156814797b81d98b | C++ | evectis/CAS2-DAAcourse | /DAA_GolanRabago/BlanketCommunication copy/BlanketCommunication.ino | UTF-8 | 3,615 | 2.546875 | 3 | [] | no_license | /*
Basic MQTT example
- connects to an MQTT server
- publishes "hello world" to the topic "out" of yun02
- subscribes to the topic "in"
modified for Arduino Yun by mbanzi
PubSubLibrary https://github.com/knolleary/pubsubclient
Messenger Library https://www.dropbox.com/s/lmux68kbtq9k4lq/Messenger.zip
htt... | true |
b05b12946245e9b50b2bcc0d5067720dbd4ea767 | C++ | adityachd123/JustAddPopcorn | /vlib.cpp | UTF-8 | 12,268 | 3.203125 | 3 | [] | no_license | #include<fstream.h>
#include<stdio.h>
#include<string.h> //Header files
#include<conio.h>
#include<stdlib.h>
#include<process.h>
class admin
{
char password[40];
public: admin()
{strcpy(password,"qwerty");}
int count()
{return strlen(password);}
int check_pass(char pass[])
{
... | true |
238ca6d1f7c26fab58b9ae87676e314a2437a463 | C++ | jcespinoza/TDA | /avl.h | UTF-8 | 607 | 2.90625 | 3 | [] | no_license | #ifndef AVL_H
#define AVL_H
#include "nodetree.h"
#include <iostream>
using namespace std;
template <class T>
class AVL
{
public:
AVL(){
rootNode = 0;
}
void insert(T nValue);
void printTree();
protected:
NodeTree<T>* rootNode;
private:
void insert(NodeTree<T>** root, T nValue);
vo... | true |
e374b94c77ddeef94d64eec8e51151e8b306a632 | C++ | Girl-Code-It/Beginner-CPP-Submissions | /Kumari Mansi/Milestone 2/CodesDope - Decide If or Else/Q10.cpp | UTF-8 | 364 | 3.734375 | 4 | [] | no_license | /* If
x = 2
y = 5
z = 0
then find values of the following expressions:
a. x == 2
b. x != 5
c. x != 5 && y >= 5
d. z != 0 || x == 2
e. !(y < 10) */
#include <iostream>
using namespace std;
int main()
{
int x = 2;
int y = 5;
int z = 0;
cout << (x == 2);
cout << (x != 5);
cout << (x != 5 && y >= 5... | true |
1a60e9c4df3d2f48ca5707588e106f58ac0ca902 | C++ | Alex0Blackwell/c-cpp-DSA | /Algorithms/reverseCharOnly.cpp | UTF-8 | 635 | 3.46875 | 3 | [
"MIT"
] | permissive | class Solution {
private:
bool isLetter(char ch) {
return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'));
}
public:
string reverseOnlyLetters(string S) {
vector<char> letters;
string res;
for(char el : S) {
if(isLetter(el))
letters.push... | true |
ede8b490a29b2d4d5c0a9ddc25e87758be31cfdc | C++ | erikperillo/pchat | /src/chat.cpp | UTF-8 | 3,590 | 3.046875 | 3 | [] | no_license | #include "chat.h"
Chat::Chat()
{;}
bool Chat::addGroup(const std::string& group_name)
{
//checking to see if group is already inserted
for(auto const& g: this->groups)
if(g.getName() == group_name)
return false;
this->groups.push_back(Group(group_name));
return true;
}
bool Chat::delGroup(const std::string... | true |
5eb8ab987f8ef208d04b5addef826f00969bf591 | C++ | code-shiwu/data-struct | /sort/select_sort.cpp | UTF-8 | 731 | 4.09375 | 4 | [] | no_license | /**
* @brief 本程序实现选择排序算法
*/
#include <iostream>
void selcet_sort(int *arr, const int &count)
{
if (1 >= count)
{
std::cout << "数组中元素无需排序" << std::endl;
return;
}
for (int i = 0; i < count - 1; ++i)
{
int minpos = i;
for (int j = i; j < count; ++j)
{
... | true |
8f645c64ac70df775d4dc71b9b95eca196382f19 | C++ | thallolang/thallo | /tests/shared/CudaArray.h | UTF-8 | 2,263 | 2.78125 | 3 | [] | no_license | #pragma once
#include <cuda_runtime.h>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
// Enable run time assertion checking in kernel code
#define cudaAssert(condition) if (!(condition)) { printf("ASSERT: %s %s\n", #condition, __FILE__); }
#define cudaSafeCall(err) _internal_cudaSafeCall(err,__FILE__,__LIN... | true |
bca883b3b119b0e67124e5a34c6f35286dbcb455 | C++ | TigerJr/Object-Oriented-Software-Development | /ReversiGame.h | UTF-8 | 1,155 | 2.734375 | 3 | [] | no_license | #ifndef REVERSIGAME_H
#define REVERSIGAME_H
#include <string>
#include "Game.h"
using namespace std;
const game_piece BLACK_PIECE = game_piece(black, "Black_Piece", "X");
const game_piece WHITE_PIECE = game_piece(white, "White_Piece", "O");
class ReversiGame : public Game {
friend ostream & operator<< (ost... | true |
9e9664c37bd7e025c832e8b3392991deef7e4020 | C++ | wyrover/Advanced-Process-Terminator---Suspender | /ProcessTerminator/main.cpp | UTF-8 | 1,885 | 2.625 | 3 | [] | no_license | #include <Windows.h>
#include <iostream>
#include <assert.h>
#include <string>
#include "../TerminatorCore/TerminatorCore.h"
#ifdef _DEBUG
#pragma comment( lib, "../Debug/TerminatorCore.lib" )
#else
#pragma comment( lib, "../Release/TerminatorCore.lib" )
#endif
using namespace TerminatorCore;
static CTerminatorCore te... | true |
82948fa5edb01cd866e4a8bc45bf1d5fd6573fbc | C++ | Martin-BG/SoftUni-CPP-Programming | /06.Full-Cpp-OOP/Demos/01.Class-Members-with-Static-and-Const/SmartArray.cpp | UTF-8 | 2,125 | 3.65625 | 4 | [] | no_license | #include "SmartArray.h"
#include<sstream>
SmartArray::SmartArray() :
length(0),
data(new DataType[0]) {
}
SmartArray::SmartArray(int length) :
length(length),
data(new DataType[length]) {
}
SmartArray::SmartArray(const SmartArray & other) :
length(other.length),
data(new DataType[other.length]) {
copyData(ot... | true |
a376edfa5979b6d888b442319b7924eea7e9655a | C++ | xiaojianwu/QtQiNiuSDK | /libQiniu/libQiniu/putpolicy.cpp | GB18030 | 1,984 | 2.5625 | 3 | [] | no_license | #include "putpolicy.h"
#include <QJsonDocument>
#include <QJsonObject>
#include <QDateTime>
#include "auth.h"
PutPolicy::PutPolicy()
{
}
PutPolicy::~PutPolicy()
{
}
QString PutPolicy::token(QString ak, QString sk, QString scope)
{
QJsonDocument doc;
QJsonObject obj;
// ָϴĿԴռ(Buc... | true |
715f50e456d8f8199e4b5ae7a8a217b9808a64c3 | C++ | Monirul1/Heap-Sort | /Heap Sort/main.cpp | UTF-8 | 863 | 3.765625 | 4 | [] | no_license | #include <iostream>
using namespace std;
void heapify(int arr[], int n, int i) {
int larger = i;
int left = 2 * i + 1;
int right = 2 * i + 2;
if (left < n && arr[left] > arr[larger]) {
larger = left;
}
if (right < n && arr[right] > arr[larger]) {
larger = right;
}
if (la... | true |
c9fc1c8a7fb4212e97794068cdecb130c3d1a844 | C++ | wenlongx/UCLA_CS | /CS 32 - Introduction to Computer Science (Data Structures and OOP)/Homework3/Homework 3/maze.cpp | UTF-8 | 1,007 | 3.28125 | 3 | [] | no_license | //
// maze.cpp
// Homework 3
//
// Created by Wenlong Xiong on 2/7/15.
// Copyright (c) 2015 Wenlong Xiong. All rights reserved.
//
bool pathExists(std::string maze[], int nRows, int nCols, int sr, int sc, int er, int ec)
{
// if start == end, maze is solved
if (sr == er && sc == ec)
return true;
... | true |
f783813bd043b382cb6c0e1cca877fa881e88b6f | C++ | moevm/oop | /8383/syrtsova/sourse/Landscape.cpp | UTF-8 | 1,536 | 3.296875 | 3 | [] | no_license | #include "pch.h"
#include "Landscape.h"
#include "Object.h"
#include "Map.h"
#include "ctime"
#include <Windows.h>
Land::Land(char N, int width, int height, int col) : name(N), width(width), height(height){
object = name;
max_size = width*height;
color = col;
if (name == '~') max_water = max_size * 0.2;
els... | true |
353a64e7b471d25663550fe36eea9a840124c3c5 | C++ | OstapHEP/ostap | /source/include/Ostap/Polynomials.h | UTF-8 | 110,738 | 3.15625 | 3 | [
"BSD-3-Clause"
] | permissive | // ============================================================================
#ifndef OSTAP_POLYNOMIALS_H
#define OSTAP_POLYNOMIALS_H 1
// ============================================================================
// Include files
// ============================================================================
// S... | true |
a72098a79de626f902550dea519e953292d401da | C++ | senshishiro/Mentoring | /linkedList/linkedList/list.cpp | UTF-8 | 9,277 | 3.6875 | 4 | [] | no_license |
#include "stdafx.h"
#include "list.h"
using namespace std;
//==========================================================================
//Singly Linked List
//==========================================================================
//--------------------------------------------------------
//Constructor
SinglyLi... | true |
edfbb8d896dd6e1cf7983f305e8de01b991e39d1 | C++ | ThomasCol/MathLibrary | /MathLib/MathLib/Src/Geometry/Cylinder.cpp | UTF-8 | 1,028 | 2.96875 | 3 | [] | no_license | #include "Cylinder.h"
namespace Math::Geometry
{
#pragma region Constructors
QXcylinder::QXcylinder(const QXsegment& segment, const QXfloat& radius) noexcept:
_segment(segment),
_radius{radius}
{}
QXcylinder::QXcylinder(const QXcylinder& cylinder) noexcept:
_segment(cylinder._segment),
_radius{cylinder._r... | true |
3752ffe94580e125ee4b563ab0ef14fe3c669d43 | C++ | tupieurods/SportProgramming | /CR251/CR251_B/main.cpp | UTF-8 | 704 | 2.578125 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#pragma warning(disable: 4996)
using namespace std;
int n, x;
__int64 c[100009];
void ReadData()
{
scanf("%d %d", &n, &x);
for(int i = 0; i < n; i++)
{
scanf("%I64d", &c[i]);
}
}
__int64 answer;
void Solve()
{
answer = 0... | true |
3d3609c21d5ec559f3fe8b30aee7e2f1f3d2ab9a | C++ | xunzhang/lcode | /lintcode/binary-tree-serialization.cc | UTF-8 | 1,686 | 3.5625 | 4 | [] | no_license | /**
* Definition of TreeNode:
* class TreeNode {
* public:
* int val;
* TreeNode *left, *right;
* TreeNode(int val) {
* this->val = val;
* this->left = this->right = NULL;
* }
* }
*/
class Solution {
public:
/**
* This method will be invoked first, you should design you... | true |
9f293cc153076ccaef1bd2e88e5857c127db0ee8 | C++ | NewYaroslav/xtechnical_analysis | /include/xtechnical_streaming_min_max.hpp | UTF-8 | 5,511 | 2.9375 | 3 | [
"MIT"
] | permissive | #ifndef XTECHNICAL_STREAMING_MIN_MAX_HPP_INCLUDED
#define XTECHNICAL_STREAMING_MIN_MAX_HPP_INCLUDED
#include <deque>
namespace xtechnical {
/** \brief Streaming Maximum-Minimum Filter Using No More than Three Comparsions per Element.
* URL: https://zelych.livejournal.com/2692.html
* URL: https://arxiv.... | true |
6b8b3b19af318add71dd74e4bedd5ec81a65755e | C++ | Rajanarender/Hanuman | /Study/StandardTemplateLibrary_STL/setmultisetunorderedsetDiff.cpp | UTF-8 | 2,132 | 3.59375 | 4 | [] | no_license | #include<iostream>
using namespace std;
#include<set> //set,multiset
#include<unordered_set> //unordered_set,supported only in C++11
#include<algorithm> //find(),count() are not members of set
/***********************************************************************
Example:
1
4
1
6
set:
unique sorted elements
Header:#... | true |
d0025d2db75bd18178aea3cd6384929b859ea274 | C++ | acmol/toft | /net/uri/uri.h | UTF-8 | 8,564 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | // Copyright (c) 2011, The Toft Authors.
// All rights reserved.
//
// Author: CHEN Feng <chen3feng@gmail.com>
// Created: 05/11/11
// Description: URI class, based on RFC 3986
#ifndef TOFT_NET_URI_URI_H
#define TOFT_NET_URI_URI_H
#include <cassert>
#include <string>
#include <utility>
#include "toft/base/string/stri... | true |
452b65d4507067654e1b16eb875e2dca38f1d8bc | C++ | marcob90/CPP-Projects | /H/DeckOfCards.h | UTF-8 | 398 | 2.9375 | 3 | [] | no_license | #ifndef DECK
#define DECK
#include "Card.h"
#include <vector>
#include <algorithm>
class DeckOfCards
{
public:
static const int SIZE = 52;
DeckOfCards();
void shuffle();
Card &dealCard();
bool moreCards() const;
private:
typedef std::vector< Card > deck_t;
deck_t deck;
de... | true |
5befe813e8a93060ce69d418f6053c6051ec853a | C++ | realfirst/ffcpp | /Matrix.cpp | UTF-8 | 3,524 | 3.84375 | 4 | [] | no_license | #include <iostream>
#include <cstdlib>
class Matrix {
int width, height;
double *data;
public:
Matrix();
Matrix(int w, int h);
Matrix(const Matrix &m);
~Matrix();
bool operator == (const Matrix &m) const;
Matrix &operator = (const Matrix &m);
Matrix operator + (const Matrix &m) const;
Matrix operat... | true |
94e158b47e1622daf77c5522b82b80fc3630b1d3 | C++ | ishsum/cpp-oops | /q7.cpp | UTF-8 | 914 | 3.34375 | 3 | [] | no_license |
#include <iostream>
using namespace std;
class emp
{
protected:
int eno;
char name[20],des[20];
public:
void get();
};
void emp::get()
{
cout<<"enter eno,name and des"<<endl;
cin>>eno;
cin.ignore();
cin.getline(name,20);
cin.getline(des,20);
}
class salary:protected emp
{... | true |
d144d3aab2e9c24d3d5e300384652d35bddeb653 | C++ | caohong/practice | /leetcode/c++/lintcode-064-merge-sorted-array/merge-sorted-array.cpp | UTF-8 | 728 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | /*
* http://www.lintcode.com/en/problem/merge-sorted-array/
*/
class Solution {
public:
/*
* @param A: sorted integer array A which has m elements, but size of A is m+n
* @param m: An integer
* @param B: sorted integer array B which has n elements
* @param n: An integer
* @return: nothi... | true |
05d5569a1c956967b44941b50ef1b0d34f96448a | C++ | lsa-src/ArduinoBible | /본문소스/CH_68_03/CH_68_03.ino | UTF-8 | 1,773 | 2.859375 | 3 | [] | no_license | #include <WiFiEsp.h>
#include <SoftwareSerial.h>
SoftwareSerial ESPSerial(2, 3); // ESP-01 모듈 연결 포트
char AP[] = "your_AP_name_here";
char PW[] = "your_AP_password_here";
int status = WL_IDLE_STATUS;
void setup() {
Serial.begin(9600); // 컴퓨터와의 UART 시리얼 연결
ESPSerial.begin(9600); // ESP-01 모듈과의 UART... | true |
91262410131c458a622f58a61689d937dda3ffcc | C++ | kotmasha/kodlab-uma-encapsulated | /slhc/src/logging.cpp | UTF-8 | 626 | 2.953125 | 3 | [
"MIT"
] | permissive | #include "logging.h"
logging::logging(){}
logging::logging(const logging &l){}
logging::logging(string filename, string classname){
_filename = filename;
_classname = parse_class_name(classname);
_output = new ofstream(filename);
}
string logging::parse_class_name(string classname){
classname = classname.substr... | true |
433b03ea8f4702a6cd515abe4b78eecc4db623be | C++ | kyang35/x07-KhangYang | /TicTacToeBoardTest.cpp | UTF-8 | 1,327 | 3.484375 | 3 | [
"MIT"
] | permissive | /**
* Unit Tests for TicTacToeBoard
**/
#include <gtest/gtest.h>
#include "TicTacToeBoard.h"
class TicTacToeBoardTest : public ::testing::Test
{
protected:
TicTacToeBoardTest(){} //constructor runs before each test
virtual ~TicTacToeBoardTest(){} //destructor cleans up after tests
virtual void SetUp(){} //se... | true |
ca0fdcffed54aadd40ae467543798bf14888631d | C++ | ShaneCoates/OpenGL | /OpenGL/inc/GameStateManager.h | UTF-8 | 850 | 3.15625 | 3 | [] | no_license | #ifndef GAMESTATE_MANAGER_H
#define GAMESTATE_MANAGER_H
#include <map>
#include <list>
#include <string>
class IGameState;
class GameStateManager
{
public:
GameStateManager();
~GameStateManager();
void Update(double dt);
void Draw();
void RegisterState(std::string _name, IGameState* _state);
void Push(std::st... | true |
3ed2d20fe16de82f36c0c47cd01b4692fe356f46 | C++ | Neconspictor/Euclid | /projects/engine_opengl/nex/opengl/buffer/GpuBufferGL.cpp | UTF-8 | 4,493 | 2.75 | 3 | [] | no_license | #include <nex/buffer/GpuBuffer.hpp>
#include <nex/opengl/buffer/GpuBufferGL.hpp>
#include <nex/opengl/opengl.hpp>
nex::UsageHintGL nex::translate(nex::GpuBuffer::UsageHint hint)
{
static UsageHintGL const table[] =
{
DYNAMIC_COPY,
DYNAMIC_DRAW,
DYNAMIC_READ,
STATIC_COPY,
STATIC_READ,
STATIC_DRAW,... | true |
b387902657bee657ee5c5f44ccd72c3c308f6dc5 | C++ | JDNdeveloper/2048-Smart-Players | /src/ExpectiMaxPlayer.cpp | UTF-8 | 17,027 | 3.234375 | 3 | [
"MIT"
] | permissive | #include <cmath>
#include <sstream>
#include <iostream>
#include <memory.h>
#include <bits/stdc++.h>
#include "ExpectiMaxPlayer.h"
/* ExpectiMaxPlayer interface */
extern "C" {
ExpectiMaxPlayer* ExpectiMaxPlayer_new(bool debug, int depth,
double probCutoff) {
return ... | true |
008a615130c64e4607fa5902a3aa4b99da5eb13b | C++ | aazucena/Portfolio | /University/Introduction To Sofware Engineering/Lectures/playlist/src/main.cpp | UTF-8 | 476 | 3 | 3 | [] | no_license | #include "Playlist.h"
#include <iostream>
void list(Playlist* pl) {
for(int i = 0; i < 10; i++) {
const Song* s = pl->getSong();
std::cout << s->name << std::endl;
}
}
int main(int argc, char const *argv[]) {
Playlist* pl = Playlist::greatest();
std::cout << " ===== Default Ordering =====" << std::en... | true |
d54083b1ff6b859e939b2159460ae482cdb66c27 | C++ | hpurba/CS236 | /HP_Project4/main.cpp | UTF-8 | 4,460 | 2.515625 | 3 | [] | no_license | // HP_Project1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "parser.h"
#include "scanner.h"
#include "interpreter.h"
#include "database.h"
using namespace std;
int main(int a... | true |
c223c0a05a4189a61088a83bfecf1a6dbeb6b4fb | C++ | dwrrehman/sput | /testing/finished/opticnerve_test(failed)/source/r.cpp | UTF-8 | 2,116 | 2.78125 | 3 | [] | no_license | /// ----------- sput -------------
/*
* project : opticnerve_test
* file : r.cpp
*
* creator : dwrr
* created : 1705033.102142
*
* version : 0.1
* touched : 1707123.172242
*
*/
/// -------------------------------
// description:
// the retina of sput. this is a set of functions used to retreiv... | true |
bfedcbaa862826e67d3d70120aa545c9a2d9893f | C++ | jacek143/kata | /sources/range_extraction/range_extraction.cpp | UTF-8 | 1,008 | 3.03125 | 3 | [
"MIT"
] | permissive | #include "range_extraction.h"
#include <sstream>
void range_extraction::remove_last_comma(std::string &str) {
if (not str.empty()) {
str.pop_back();
}
}
void range_extraction::format_ranges(std::string &str) {
for (auto pos = str.find(",_"); pos != std::string::npos;
pos = str.find(",_")) {
str.r... | true |
c473e0eff7b26e5d483528939c3c4f527dfd78c6 | C++ | theunknowner/WebDerm | /WebDerm/src/Shape/shapecolor.cpp | UTF-8 | 8,350 | 2.609375 | 3 | [] | no_license | /*
* shapecolor.cpp
*
* Created on: Mar 16, 2015
* Author: jason
*/
#include "shapecolor.h"
#include "../functions.h"
#include "../KneeCurve/kneecurve.h"
#include "../Shades/shades.h"
void ShapeColor::setDebugLevel(int level) {
this->debugLevel = level;
}
//use in conjunction with setDebugLevel;
void Sha... | true |
d3df741279740340ff519a15b5609940dd08a303 | C++ | AlexAUT/SFML-Gamejam2 | /include/game/misc/introMessage.hpp | UTF-8 | 443 | 2.703125 | 3 | [] | no_license | #ifndef INTROMESSAGE_HPP
#define INTORMESSAGE_HPP
#include <vector>
#include <SFML/Graphics/Text.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
namespace aw
{
class IntroMessage
{
public:
IntroMessage();
void setMessage(std::vector<std::string> &message, const std::string &instruction);
void render(sf::Re... | true |
2448e0a7fb86ae668671fc08dcbe43e743e10288 | C++ | zaman-projectxix/C-plus-plus | /All About C++/chap3drill/main.cpp | UTF-8 | 1,510 | 3.25 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
int main () {
string first_name = "";
cout << "Enter the name of the person you want to write to\n";
cin >> first_name;
string another_name;
cout << "Enter the name of another friend... | true |
89f7190580c5ac1a6e3e0398ae3756e551502a51 | C++ | lxj434368832/Framework | /projects/Test/LogTest.h | GB18030 | 2,535 | 2.578125 | 3 | [] | no_license | #pragma once
#include <windows.h>
#include <atlconv.h>
/*#include "..\..\include\LogFile.h"
int TestAppLog()
{
char szFullPath[MAX_PATH];
::GetModuleFileNameA(nullptr, szFullPath, MAX_PATH);
DWORD dwCount = GetTickCount();
for (int i = 0; i < 1000; i++)
{
LOGM("ǰ·Ϊ:%s", szFullPath);
}
DWORD dwCount1 = GetTi... | true |
82143c73d5897977f4900ef50d07055132edd418 | C++ | tac2155/rgb | /firmware/Effects.h | UTF-8 | 1,648 | 2.9375 | 3 | [
"MIT"
] | permissive | // rgb
// daisy-chainable lighting module
// http://github.com/mcous/rgb
//
// copyright 2013 michael cousins and authors listed in http://github.com/mcous/rgb/AUTHORS.md
// shared under the terms of the mit licence
// header file for light effects class using a tlc5940
#ifndef EFFECTS_H
#define EFFECTS_H
// include... | true |
621d46a36a894861f228b7f14ab0a5694ad89b19 | C++ | timofteciprian/uni | /oop/finalExam/finalExam/Ui.cpp | UTF-8 | 1,885 | 2.84375 | 3 | [] | no_license | //
// Ui.cpp
// finalExam
//
// Created by Timofte Ciprian Andrei on 08/06/2018.
// Copyright © 2018 Timofte Ciprian Andrei. All rights reserved.
//
#include "Ui.hpp"
Ui::Ui(Controller &ctrl): ctrl(ctrl) {
//ctor
}
void Ui::mainSupport(){
cout<<endl;
cout<<" --------------------------------------- ... | true |
341d28cfedbecdd8ba1c02dffe1eee7dc736af71 | C++ | FOOZBY/2ndlaba | /2ndlaba.cpp | UTF-8 | 407 | 2.640625 | 3 | [] | no_license | #include <iostream>
#include <cmath>
using namespace std;
#define PI 3.14159265
int main()
{
setlocale(0, "");
double x,y,g;
cout << "Введите x, y: " << endl;
cout << "x: "; cin >> x;
cout << "y: "; cin >> y;
g = 5 * atan(x) - atan(y) / 4;
... | true |
255f3cd4924fc1360939f9d6a0bdb77484476d6e | C++ | gabkk/Gbemulator | /srcs/main.cpp | UTF-8 | 669 | 2.609375 | 3 | [] | no_license | # include "../includes/Gbmu.class.hpp"
# include "../includes/Registers.class.hpp"
# include <iostream>
//int main()
int main(int argc, char *argv[])
{
//Registers reg;
//uint8_t t = 8;
//t = reg.getA();
//std::cout << reg;
//reg.setAF(0x1234);
//reg.setBC(0x1234);
//reg.setDE(0x1234);
//reg.setHL(... | true |
e46ea29f66599f786f55ef5592c38ab8a1422b79 | C++ | aeremenok/a-team-777 | /09/oot/eav_labs/lab3/src/Sketcher/Elements.cpp | UTF-8 | 4,044 | 2.734375 | 3 | [] | no_license | // Implementations of the element classes
#include "stdafx.h"
//////////////////////////////////////////////////////////////////////////
#include "OurConstants.h"
#include "Elements.h"
#include <math.h>
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CElement, CObject, VERSI... | true |
b754ef14670e8d30bc7ae75a0845f9f5303b8851 | C++ | PasserByJia/algorithm-train | /EC/PAT1033/src/PAT1033.cpp | UTF-8 | 1,155 | 2.765625 | 3 | [] | no_license | //============================================================================
// Name : PAT1033.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <... | true |
b981f19632da84c5fa2e8b218d6795cfc53b4565 | C++ | Jawshouamoua/AdvPgm | /ds/midterm/fallMidterm.cpp | UTF-8 | 1,113 | 3.6875 | 4 | [] | no_license | #include <iostream>
#include "List.h"
using namespace std;
/*
* Question 1
*
* The big-O of:
* non-member function = 18*N + 3
* There are 3 initial steps for setting up variables and 18 steps
* for each iteration of the while loop which iterates N times.
*
* member function = 10*(N/2) + 8
* There are 8 ... | true |
0bdccddd12d846c7e62779f0122182417c72decf | C++ | blockspacer/Kaboom | /KaboomServer/src/messaging/MessageHandlerChain.cpp | UTF-8 | 377 | 2.6875 | 3 | [] | no_license | #include "MessageHandlerChain.h"
#include "MessageHandler.h"
void MessageHandlerChain::addHandler(MessageHandler *handler) {
handlers.push_back(handler);
}
bool MessageHandlerChain::handle(const Message &message) const {
for (MessageHandler *handler : handlers) {
if (handler->handle(message)) {
... | true |
41a72b97cba3c90e3dca59e80716e8c1cf6cd640 | C++ | syedfairozpasha/refresh_CplusPlus | /FifthFile.cpp | UTF-8 | 382 | 2.875 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main()
{
int *intptr;
float *fltptr;
int p[3] = {1,2,3};
float f[3] = {11.11,22.22,33.33};
cout<<sizeof(intptr)<<endl;
cout<<sizeof(fltptr)<<endl;
intptr = (int*)f;
fltptr = (float*)p;
//cout<<intptr[1]<<endl<<fltptr[1];
cout<<sizeof(... | true |
795bf3d4c0860d434d0bcef65188c50f17ab7f01 | C++ | BullynckVictor/VulkanRave | /VulkanRave/Engine/Utilities/source/Timer.cpp | UTF-8 | 434 | 2.5625 | 3 | [] | no_license | #include "Engine/Utilities/Timer.h"
rv::Timer::Timer()
:
last(now())
{
}
float rv::Timer::Peek() const
{
return std::chrono::duration<float>(now() - last).count();
}
float rv::Timer::Mark()
{
auto temp = last;
return std::chrono::duration<float>((last = now()) - temp).count();
}
void rv::Timer::Reset()
{
last... | true |
874c448cfb243acc8460f8dc30f422449dc1c991 | C++ | etienne-p/MecanicTree | /src/RingBuffer.cpp | UTF-8 | 2,898 | 3.453125 | 3 | [] | no_license | //
// RingBuffer.cpp
// ofForest
//
// Created by Etienne on 2014-12-15.
//
//
#include "RingBuffer.h"
template <typename T>
RingBuffer<T>::RingBuffer(int size) {
_data = new T[size];
memset( _data, 0, size * sizeof(T));
_size = size;
_readPtr = 0;
_writePtr = 0;
_writeSamplesAvail = size;
... | true |
0770018bbe391781cc475b869b0f9e262e178e36 | C++ | ideechaniz/repasoQt | /SignalSlots/persona.h | UTF-8 | 528 | 2.75 | 3 | [
"BSD-2-Clause"
] | permissive | #ifndef PERSONA_H
#define PERSONA_H
#include <QObject>
class Persona : public QObject
{
Q_OBJECT
public:
explicit Persona(QObject *parent = nullptr);
void setNombre(const QString &nombre)
{
m_nombre=nombre;
}
void habla(const QString &palabras);
signals:
void hablo(QString);// tod... | true |
c7d15742c1ff9b677294c07aca4936f1b13596ed | C++ | ardasdasdas/youtube-cpp | /Ders-12/04.cpp | UTF-8 | 233 | 2.546875 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main() {
char sehir[] = "ESKISEHIR";
cout << sehir << endl;
cout << "*******************" << endl;
for (int i = 0; i < 10; i++)
{
cout << sehir[i] << endl;
}
system("pause");
} | true |
77b6ede095e6a0940d08e3f29c0cf560290b397b | C++ | SJ0000/PS | /BOJ/BOJ_2583.cpp | UTF-8 | 1,155 | 2.53125 | 3 | [] | no_license | #include cstdio
#include iostream
#include algorithm
#include string
#include vector
#include queue
#include map
#include string.h
using namespace std;
int a[101][101];
bool check[101][101];
int dx[4] = { 0,0,1,-1 };
int dy[4] = { 1,-1,0,0 };
int m, n;
int sz = 0;
void set(int x1, int y1, int x2, int y2) {
for (int i... | true |
0c36326f6a10c45a200cbadcfc9bcb53766e91d4 | C++ | ldtg/tallerSIU | /src/server_SIUGuaramini.h | UTF-8 | 1,110 | 2.84375 | 3 | [] | no_license | #ifndef TP3_APP_SIUGUARAMINI_H
#define TP3_APP_SIUGUARAMINI_H
#include <string>
#include "server_IdUsuario.h"
#include "server_IdMateria.h"
class SIUGuaramini { //Interfaz compartida entre monitorSIU y realSIU
public:
// El usuario inscribidor, inscribe al alumno idALumno en la materia idMateria
// retorna la resp... | true |
602ec113bb1008f673566485b38a6547b0b7e8e9 | C++ | root-a/LTU-labs | /qt_ai_network/ai1_statemachine/code/StateMachine.h | WINDOWS-1258 | 2,867 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | #pragma once
#include <cassert>
#include <string>
#include "State.h"
#include "Telegram.h"
template <class entity_type>
class StateMachine
{
public:
StateMachine(entity_type* owner) :owner(owner),
currentState(NULL),
previousState(NULL),
globalState(NULL)
{}
virtual ~StateMachine(){}
//use these methods to... | true |
5dfba7918aca6614f2f5734f41c75ccc517fca0f | C++ | GuoHuanyu/Introduction-of-algorithm | /Introdution to algorithm/Graphl.h | UTF-8 | 2,269 | 3.515625 | 4 | [] | no_license | #pragma once
#include"Graph.h"
#include<list>
#include<limits>
class Graphl : public Graph {
private:
std::list<Edge>** vertex; // List headers
int numVertex, numEdge; // Number of vertices, edges
int *mark; // Pointer to mark array
std::list<Edge>::iterator it;
public:
Graphl(int numVert)
{
Init(numVert);
}
... | true |
f017a6aed413e9a67334d780584baf66896181b6 | C++ | notwatermango/Kattis-Problem-Archive | /below2.1/dicegame.cc | UTF-8 | 289 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | #include <iostream>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h;
cin>>a>>b>>c>>d>>e>>f>>g>>h;
if(a+b+c+d>e+f+g+h){
cout<<"Gunnar";
}
else if (a+b+c+d==e+f+g+h)
{
cout<<"Tie";
}
else{
cout<<"Emma";
}
return 0;
} | true |
eb3fbc4359b519f3d0f22464f52675e4a587d381 | C++ | MSC-CQU/AnEngine | /AEngine/DTimer.h | UTF-8 | 1,563 | 2.5625 | 3 | [
"MIT"
] | permissive | #pragma once
#ifndef __DTIMER_H__
#define __DTIMER_H__
#include"onwind.h"
using namespace std;
class DTimer : public NonCopyable
{
LARGE_INTEGER qpcFrequency;
LARGE_INTEGER qpcLastTime;
UINT64 qpcMaxDelta;
// 时间数据源使用QPC单元
UINT64 elapsedTicks;
UINT64 totalTicks;
UINT64 leftOverTicks; // ???
UINT64 qpcSecondC... | true |
78b5e7d903379006b2fa5115561b018b3726221a | C++ | matt-hoiland/CS360 | /labs/3_Threaded_Web_Server/Server.h | UTF-8 | 2,062 | 2.765625 | 3 | [] | no_license | /*
* Server.h
*
* Created on: Jan 26, 2016
* Author: matt
*/
#ifndef SERVER_H_
#define SERVER_H_
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include "ClientHandler.h"
#include "ClientQueue.h"
using ... | true |
d4102673250c6db1ad316f880af8db9fa218cf48 | C++ | sdimosik/spbspu-labs-2020-904-4 | /vasilevskaya.katya/A1/triangle.hpp | UTF-8 | 531 | 2.875 | 3 | [] | no_license | #ifndef A1_TRIANGLE_H
#define A1_TRIANGLE_H
#include "shape.hpp"
#include "base-types.hpp"
class Triangle : public Shape
{
public:
Triangle(const point_t & vertex_1, const point_t & vertex_2, const point_t & vertex_3);
double getArea() const override;
rectangle_t getFrameRect() const override;
point_t getPosi... | true |
cd6258cc1e7d3090e6318ea39437ec7772ad87d0 | C++ | mevoroth/meet-minecraft-bots | /_minecraft/src/actors/GroupActor.cpp | UTF-8 | 674 | 2.828125 | 3 | [] | no_license | #include "GroupActor.hpp"
using namespace DatNS;
bool GroupActor::add(GroupElement* actor)
{
if (full())
{
return false;
}
_actors.push_back(actor);
return true;
}
bool GroupActor::remove(GroupElement* actor)
{
if (one())
{
return false;
}
_actors.remove(actor);
return true;
}
inline bool GroupActor::... | true |
c548f3dd19491d986d6c481d5f549a3a0c8858ec | C++ | nathanrw/ld-shared | /include/filesystem/Path.hpp | UTF-8 | 247 | 3.015625 | 3 | [] | no_license | #pragma once
#include <string>
namespace filesystem {
/**
* Type safe representation of a path.
*/
class Path {
public:
explicit Path(std::string path);
std::string path() const;
private:
std::string m_path;
};
}
| true |
0994913b685a26f80253406ffa834e03d5086d22 | C++ | syordya/lab_ADA | /practica_09/fibonnaci_recursivo.cpp | UTF-8 | 207 | 2.859375 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int fibonnacci(int n)
{
if (n == 0) return 0;
if (n == 1) return 1;
return (fibonnacci(n-1)+ fibonnacci(n-2));
}
int main()
{
cout<<fibonnacci(50)<<endl;
} | true |
e1b8d83f8ae094eb08eaa14fd4a98679f54cb7fc | C++ | joe-stifler/uHunt | /Problem Solving Paradigm/Complete Search/Iterative (Three or more Loops, Easier)/154.cpp | UTF-8 | 1,972 | 2.6875 | 3 | [
"MIT"
] | permissive | /*------------------------------------------------*/
// Uva Problem No: 154
// Problem Name: Recycling
// Type: Iterative (Three or More Nested Loops, Easier) (Complete Search)
// Autor: Joe Stifler
// Data: 2017-12-10 01:12:34
// Runtime: 0.020s
// Universidade: Unicamp
/*----------------------------------------------... | true |
3ad677acb0af6c27fd14b79c48f77b1592b0fc07 | C++ | Andrewpqc/pat_basic | /1035.cpp | UTF-8 | 2,444 | 3.734375 | 4 | [
"MIT"
] | permissive | /**
* 归并还是插入 暂时没有搞定
**/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
void print(int *a, size_t size){
for (int i = 0; i < size; i++)
cout << a[i] << " ";
}
bool is_eq(int *a, int *b, size_t size){
int flag = true;
for (int i = 0; i < size; i++... | true |