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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c342a89276358d720896daab9845ab7903f0d4a0 | C++ | ehan69rus/FlightAssign | /FlightAssignCoreLib/src/FlightAssignBaseItem.h | UTF-8 | 508 | 2.765625 | 3 | [] | no_license | #ifndef FLIGHTASSIGNBASEITEM_H
#define FLIGHTASSIGNBASEITEM_H
//! Базовый класс
class FlightAssignBaseItem {
public:
//! Конструктор.
FlightAssignBaseItem(long long _id);
//! Возвращает идентификатор аэродрома.
long long id() const;
//! Задает идентификатор аэродрома.
void setId(long long _id)... | true |
c02151e236ce784d7e01472bf605288a139855bd | C++ | PonchoCeniceros/Arduino-Matlab-legacy-projects | /projects/PID-Controller-for-Arduino/testing/Printer.h | UTF-8 | 197 | 2.859375 | 3 | [
"MIT"
] | permissive | /**
* @file Printer.h
* @date Abr 22, 2019
*/
#define endl "\n"
#define tab "\t"
template<class T> inline Print &operator <<(Print &obj, T arg)
{
obj.print(arg); return obj;
}
/* EOF */
| true |
0801d071ddc7eb6ec2807ce32ecf414185e3cddd | C++ | rofernan42/Modules_CPP | /CPP04/ex03/MateriaSource.cpp | UTF-8 | 1,519 | 3.21875 | 3 | [] | no_license | #include "MateriaSource.hpp"
MateriaSource::MateriaSource():
_nbmat(0)
{
for (int i = 0; i < 4; i++)
_materia[i] = NULL;
}
MateriaSource::MateriaSource(const MateriaSource ©):
_nbmat(copy._nbmat)
{
for (int i = 0; i < 4; i++)
{
if (copy._materia[i])
this->_materia[i] = copy._materia[i]->clone();
els... | true |
3ebedb44c9afe77cfc6685fe871fa3a44fb8fbe5 | C++ | qiubit/lattec | /src/IdEnvEntry.h | UTF-8 | 1,251 | 2.859375 | 3 | [] | no_license | //
// Created by Pawel Golinski on 20.01.2018.
//
#ifndef TESTLLVM_ENVENTRY_H
#define TESTLLVM_ENVENTRY_H
#include <string>
#include "types/Type.h"
class IdEnvEntry {
private:
std::string entryId;
Type *entryType;
llvm::Value *entryAlloca = nullptr;
llvm::Function *entryFunction = nullptr;
llvm:... | true |
8b590fd4f4cddacca05fe687359d61049b9889f0 | C++ | Kullsno2/C-Cpp-Programs | /CartesianTree.cpp | UTF-8 | 1,274 | 3.28125 | 3 | [] | no_license | #include<utility>
#include<windows.h>
#include<map>
#include<vector>
#include<iostream>
#include<limits.h>
using namespace std ;
struct node{
int val ;
struct node * left ;
struct node * right ;
node(int x) : val(x) , left(NULL) , right(NULL) {}
};
int findMax(vector<int> v,int st,int ed,int &m)
{
int maxi = I... | true |
10b98a1ca52e21d3b5508d0ace815004cb6253e0 | C++ | gabrielhpr/symbol-table-comparator | /estruturas.hpp | UTF-8 | 1,392 | 2.625 | 3 | [] | no_license | #ifndef ESTRUTURAS_H
#define ESTRUTURAS_H
#include <string>
using namespace std;
typedef string Chave;
typedef int Item;
class Celula {
public:
Chave chave;
Item valor;
Celula* prox;
};
class NoABB {
public:
Chave chave;
Item valor;
int quantNosSubArvEsq;
... | true |
81dd5656abebf5bbc43cd3c5ec16e7582c9b9a55 | C++ | alvarosg/JetProcessing | /SourceCode/headers/imagesequencecontroller.h | ISO-8859-1 | 7,030 | 2.6875 | 3 | [] | no_license | /**
* @file imagesequencecontroller.h
* @author lvaro Snchez Gonzlez <alvarosg@usal.es>
* @date Mon Jul 23 2012
*
* Copyright (c) 2012 lvaro Snchez Gonzlez
*
* @brief Fichero que define la clase que controla y gestiona la lista de imagenes de la fase guardadas en el programa.
*
*/
#ifndef IMAGE... | true |
d3e0452e7aff250c966fb5c220e5899a9592c7e7 | C++ | k2font/atcoder | /test/kyokasyo.cpp | UTF-8 | 192 | 2.671875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int a = 12345;
int b = 98765;
cout << a + b << endl;
cout << a - b << endl;
cout << numeric_limits<int>::max() << endl;
} | true |
17fd7a499610a84844ff08812e0fa356616618d1 | C++ | Akapulk/KURS_GRAF | /Source.cpp | WINDOWS-1251 | 4,233 | 2.609375 | 3 | [] | no_license | #include <conio.h>
#include <iostream>
#include "pyramid_4.h"
#include "pyramid.h"
using namespace::std;
void cur();
void mainmu();
int q = 1,p=0;
int main() {
setlocale(0, "Russian");
mainmu();
if (p == 1) {
cur();
}
return 0;
}
void mainmu() {
int c, tr = 1;
while (tr)
{
cout << "... | true |
37b51653d263ab362ea136bf1968d42fb56007f6 | C++ | Odenysyuk/Learning | /WinApi/2016.04.03/Project1/Project1/Source.cpp | UTF-8 | 3,727 | 2.640625 | 3 | [] | no_license | #include <Windows.h>
//#include <tchar.h>
#include <wchar.h>
#include <vector>
#include <iostream>
#include "resource.h"
#include <stdio.h>
float GetDer(std::vector<char*> algoritm) {
float res= 0;
for (int i = 0; i < algoritm.size(); i++)
{
if (algoritm[i] == "+")
{
res = +atoi(algoritm[++i]);
}
else... | true |
0ac1795314b4f049e6666a6db2517d636e18cc5b | C++ | yinyinyin123/LintCode | /0497-Shape Factory/0497-Shape Factory.cpp | UTF-8 | 1,318 | 3.734375 | 4 | [
"MIT"
] | permissive | /**
* Your object will be instantiated and called as such:
* ShapeFactory* sf = new ShapeFactory();
* Shape* shape = sf->getShape(shapeType);
* shape->draw();
*/
class Shape {
public:
virtual void draw() const=0;
};
class Rectangle: public Shape {
// Write your code here
public:
void draw() const {
... | true |
eff2824839e72b3977d99e8eb9f32cee7aeef598 | C++ | josh-windsor/DirectX-VR-Instanced-Renderer | /Framework/VertexFormats.h | UTF-8 | 3,869 | 2.78125 | 3 | [] | no_license | #pragma once
//////////////////////////////////////////////////////////////////////
// Vertex Formats.
//////////////////////////////////////////////////////////////////////
using VertexColour = u32;
//////////////////////////////////////////////////////////////////////////
// vertex descriptors are described using ... | true |
7dd63734e6f963ef06bc6c57eb2bf9f49f86df40 | C++ | Fol4/algo-semester1-2020-master | /task_2/section_2/2_3/2_3.cpp | UTF-8 | 1,619 | 3.8125 | 4 | [] | no_license | #include <iostream>
#include <vector>
void quickSort(std::vector<std::pair<int, int>>& array, int low, int high){
int i = low;
int j = high;
int pivot = array[(i + j) / 2].first;
int temp;
while (i <= j){
while (array[i].first < pivot)
i++;
while (array[j].first > pivot... | true |
75f044a27e342c16bc38810c8aaff4afd0074da3 | C++ | xznxzy/Data_Structure | /Stack/MyStack.hpp | UTF-8 | 936 | 3.328125 | 3 | [] | no_license | //
// MyStack.hpp
// Stack
//
// Created by zhangying on 10/2/17.
// Copyright © 2017 zhangying. All rights reserved.
//
#ifndef MyStack_hpp
#define MyStack_hpp
#include <stdio.h>
#include <iostream>
using namespace std;
template <typename T>
class MyStack{
public:
//分配内存初始化栈空间,设定栈容量,栈顶
MyStack(int size);
//回... | true |
94030027a81347bc9f378967ae62cb647cb18b29 | C++ | wonder-alt/- | /2020-11-29/2020-11-29/源.cpp | GB18030 | 1,964 | 3.9375 | 4 | [] | no_license | //ָ018ַ
//Ӽnn<100ַ(ÿַȲ19)ַеĻַ
//жһַǷΪַúʵַ֣ܹ±ַָʽʵ֡
//νĴָ˳͵һһַ硱levelabccbaǻĴ
//ʽһΪnΪnַ
//#include<iostream>
//using namespace std;
//int main()
//{
// char s[20];
// int n;
// int count = 0;
// cin >> n;
// int i = 0;
// int j = 0;
// int k = 0;
// int len = 0;
// for (k = 0; k < n; k++)
// {
// cin >> s;
// i = 0;
/... | true |
4ae95d743dda3b18fe775454fc63c190f2f68a5b | C++ | Fernand0D/Calculadora | /Proyecto calculadora.cpp | UTF-8 | 2,244 | 4.125 | 4 | [] | no_license | #include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main() {
int pos, num1, num2, resultado;
cout << "Ingrese la opcion deseada :3" << endl;
cout << "1-. Suma" << endl;
cout << "2-. Resta" << endl;
cout << "3.- Multiplicacoin" << endl;
cout << "4.- Division" << endl;
cout << "5.-... | true |
af2dcd2683b825a86d0758fbcf69bd82cb3c2a76 | C++ | mopack/OnlineJudgeCode | /OnlineJudgeCode/LC328. Odd Even Linked List.cpp | UTF-8 | 1,965 | 2.5625 | 3 | [] | no_license | //#include <iostream>
//#include <cstdlib>
//#include <vector>
//#include <string>
//#include <algorithm>
//#define max(a,b) (((a) > (b)) ? (a) : (b))
//using namespace std;
////Sol: Coding: min. Present: AC: Lines/ms/PR
////Sol: . Present: AC: Lines/ms/PR
//struct ListNode {
// int val;
// ListNode *next;
// ListNode(... | true |
92147f82ec3ffcd7f47add4c75db7aee795cfa81 | C++ | Saborit/Competitive-Programming | /SNIPPET ZONE/IMP. AJENAS/2-Algorithms Implementations/Fibonacci Sequence.cpp | ISO-8859-1 | 474 | 3 | 3 | [] | no_license | /*
Luis Enrique Bernal Fuentes
Algorithm: Fibomacci Sequence
Description: Halla el nmero de la Secuencia Fibonaci que cae en tal posicin.
*/
#include <cstdio>
#include <algorithm>
using namespace std;
int n;
long long a = 0, b = 1, fib;
int main() {
scanf ("%d", &n);
if (n <= 2)
printf ("1\n"... | true |
13fa8f1e696d4768446d68fe343eba5017ce9f30 | C++ | Deepanshu2017/boost.python_practise | /cpp_revision/advance C++/rvalue_lvalue.cpp | UTF-8 | 1,053 | 3.40625 | 3 | [] | no_license | //lvalue is something that has address and modifiable and we can
//store some data in that memory
//int i = 5;
// ^--------->i is lvalue
// ^----->5 is rvalue
//because we can get address of i but we cannot get the address of 5
//
//int i = 5;
//int var = i;
// ^---> i is lvalue but in the above cont... | true |
cd0ac1fdcdea1a4e1fe98130b0795d69209ba970 | C++ | derbess/PP1-assist | /quiz3/bonapity.cpp | UTF-8 | 1,401 | 3.09375 | 3 | [] | no_license | #include<iostream>
using namespace std;
bool ponapity(string s1, string s2){
int cnt = 0;
if(s1.size()==s2.size())
{
for(int i=0;i<s1.size();i++)
{
s1[i] = tolower(s1[i]);
s2[i] = tolower(s2[i]);
if(s1[i]==s2[i])
{
cnt++;
}
else if((s1[i]=='B'&&s2[i]=='p')||(s1[i]=='b'&&s2[i]=='P')||(s1[i]=... | true |
27dfe63f78c2f56ee7e723fb54931dd459c82e47 | C++ | walekkk/search_system | /search_client/common/log.h | UTF-8 | 835 | 2.796875 | 3 | [] | no_license | #ifndef LOG_H
#define LOG_H
#include <iostream>
#include <string>
#include <sys/time.h>
#include "./common.h"
#define INFO 0
#define ERROR 1
#define DEBUG 2
int64_t GetTimeStamp() {
struct timeval mTime;
gettimeofday(&mTime, NULL);
return mTime.tv_sec;
}
std::string GetLogLevel(int32_t level) {
swit... | true |
ea2e6bb3f314ed9ba95b6851d4cb816ed9e126d2 | C++ | flameshimmer/leet2019.io | /Leet2019/MaximumDistanceinArrays.cpp | UTF-8 | 2,166 | 3.53125 | 4 | [] | no_license | #include "stdafx.h"
//Given m arrays, and each array is sorted in ascending order.
//Now you can pick up two integers from two different arrays
//(each array picks one) and calculate the distance. We define
//the distance between two integers a and b to be their absolute
//difference |a-b|. Your task is to find the... | true |
ab10fcdff4f958653db45f04509927b3c65ac151 | C++ | lvirgili/programming_challenges | /uri/uri1393.cpp | UTF-8 | 273 | 2.84375 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main() {
long long fib[41];
fib[0] = fib[1] = 1;
fib[2] = 2;
for (int i = 3; i < 41; ++i) fib[i] = fib[i-1] + fib[i-2];
int n;
while (cin >> n, n) {
cout << fib[n] << endl;
}
return 0;
}
| true |
457b70795b52718ee36550cd7137345882cf6d52 | C++ | shoaibrayeen/Programmers-Community | /Basic/Reverse A Given Number/solutionByPooja.cpp | UTF-8 | 461 | 4.28125 | 4 | [
"MIT"
] | permissive | /*
A Number is given and You need to reverse it.
Input :
An Integer ( Positive )
*/
#include <iostream>
using namespace std;
int reverse(int num)
{
int rev = 0;
for (int i = 1; num > 0; i++) {
rev = rev * 10 + num % 10;
num /= 10;
}
return rev;
}
int main()
{
in... | true |
7024e8c932bdc10e0df746258f6031a7ff31f701 | C++ | 3DPIT/algorithmTest | /Algorithm(2020.05.06)/SWTEST/SWTEST/17143 낚시왕(프린트).cpp | UHC | 2,473 | 2.671875 | 3 | [] | no_license | #include<stdio.h>
#include<iostream>
#include<vector>
#include<string.h>
#include<string>
#include<algorithm>
using namespace std;
#define NS 101
#define MS 101
int N, M, K;
int ret;
struct Data {
int y, x, s, d, z;
};
vector<Data>v;
void init() {
N = M = K = ret = 0;
v.clear();
scanf("%d %d %d", &N, &M, &K);
for ... | true |
19918ae9b76cc4ddb651a118f16aa6da3b5db250 | C++ | darkoppressor/escape-from-the-masters-lair | /grammar.cpp | UTF-8 | 804 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /* Copyright (c) 2011 Kevin Wells */
/* Escape from the Master's Lair may be freely redistributed. See license for details. */
#include "grammar.h"
#include "world.h"
using namespace std;
string a_vs_an(Item* item){
string a_or_an="";
//If the item is a corpse or skeleton.
if(item->is_corpse || item->i... | true |
455ab46a0ca9376bea18ab25bdc9cde1d5202291 | C++ | jgcazares/Badlands | /explosion.h | UTF-8 | 1,267 | 2.609375 | 3 | [] | no_license | //needed includes for cross platform developement
#if defined (_WIN32) || (WIN64)
#include "SDL.h"
#include "SDL_image.h"
#endif
#if defined (__APPLE__)
#include <SDL2/SDL.h>
#include <SDL2_image/SDL_image.h>
#include <SDL2_mixer/SDL_mixer.h>
#endif
#if defined (__linux__)
#include SDL2/SDL2.h
#include SDL2/SDL_imag... | true |
600ace444fd2161aea896f93fbdb9296fd2b9e72 | C++ | lucifercr07/GFG | /HE/HE/prateekndquery.cpp | UTF-8 | 617 | 2.65625 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int> vec(n);
for(int i=0;i<n;i++)
cin>>vec[i];
sort(vec.begin(),vec.end());
//for(int i=0;i<n;i++)
// cout<<vec[i]<<" ";
//cout<<endl;
int q;
cin>>q;
while(q--)
{
int a,b;
cin>>a>>b;
vector<int>::iterator low,up,it;
... | true |
1c6eba39a7ad3472be068732214e08bae2a14fb0 | C++ | mom4ilakis/DSA-Homework-task-4 | /TripleTree/TripleTree.cpp | UTF-8 | 3,105 | 3.28125 | 3 | [] | no_license | #include "TripleTree.h"
//TripleTree::TripleTree()
//{
//}
TripleTree::TripleTree(const std::string & filename):root(nullptr)
{
loadFromFile(filename);
}
TripleTree::~TripleTree()
{
clear(root);
}
void TripleTree::loadFromFile(const std::string & Filename)
{
std::ifstream inputFile;... | true |
f528f35d73946d7cd69651211a904bcf45ef9ad3 | C++ | karan109/Traffic-Density-Estimation | /Code/method2.cpp | UTF-8 | 2,418 | 2.96875 | 3 | [] | no_license | #include "helpers.hpp"
string file_name = "trafficvideo.mp4";
int X;
int Y;
int original_X;
int original_Y;
string output_file;
vector<vector<double>> result;
void method2();
int main(int argc, char* argv[]){
if (argc >= 2) file_name = argv[1];
VideoCapture getres;
getres.open("../Data/Videos/"+file_n... | true |
a407739513f2323768e7c03a68bde88220bb182b | C++ | mcwall/skylark | /src/loader.cpp | UTF-8 | 774 | 2.96875 | 3 | [] | no_license | #include "loader.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <stdexcept>
using namespace std;
RomLoader::RomLoader()
{
}
RomLoader::~RomLoader()
{
}
void RomLoader::load_rom(string fileName, Memory *memory, uint16_t offset)
{
// TODO: Protect against buffer overflow, odd filesize, etc.
... | true |
79c640ef1a226e2758e1fff6d2e598ba7b32fe76 | C++ | leejaeseung/Algorithm | /CodeForce/C++/1360C_Similar Pairs.cpp | UTF-8 | 3,062 | 2.96875 | 3 | [] | no_license | /*
C. Similar Pairs
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
We call two numbers x and y similar if they have the same parity (the same remainder when divided by 2), or if |x−y|=1. For example, in each of the pairs (2,6), (4,3), (11,7), the numbers are s... | true |
762f5f89ab4f4bce83780dd37d1a861e7e173040 | C++ | ahnyeji/C_Algorithm | /BOJ/DFS_BFS/7562.cpp | UTF-8 | 1,394 | 3.125 | 3 | [] | no_license | /* BOJ - 7562 : 나이트의 이동
28.February.2021
(28.February.2021 Live Problem Solving)
*/
/* [BFS]
# 8방 탐색
# visit[i][j] : 해당 위치에 오기까지 이동한 횟수
# 목표 지점 좌표가 최초 등장할 경우가 최소 이동 횟수 (BFS)
*/
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
int I, dest_x, dest_y;
int dir[8][2] = {{... | true |
8c17940e1391d5327843e71eed7115b8d22292fa | C++ | leo2105/Algoritmos-Paralelos | /MPI/Section7/MonteCarlo_PI.cpp | UTF-8 | 1,598 | 2.90625 | 3 | [] | no_license | #include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
static long MULTIPLIER = 1366;
static long ADDEND = 150889;
static long PMOD = 714025;
double random_low,random_hi;
long random_last;
double drandom()
{
long random_next;
double ret_val;
// compute an integer number from zero to mod
ra... | true |
4f42e511d0eb49bad3070c7d8de466a85f3bd59b | C++ | rcherrera/ProyRoboticaBasica | /SkEvasorObst01.ino | UTF-8 | 2,866 | 2.78125 | 3 | [] | no_license | //Roberto Herrera
#include <Servo.h>
#include <AFMotor.h> //libreria para motores
#define trigPin 8 // definir pin 8 para Trigger
#define echoPin 13 //definir pin 13 para Echo
AF_DCMotor motor1(3,MOTOR12_64KHZ); // setear motores.
AF_DCMotor motor2(4, MOTOR12_8KHZ);
Servo myservo; // create servo object to control a s... | true |
11481cc146cfd7dcdca1bd5690aad3f12b7a73e4 | C++ | edrixon/net-relay | /netvars.cpp | UTF-8 | 1,142 | 2.875 | 3 | [] | no_license | #include "types.h"
#include "globals.h"
void readNetVars()
{
int eepromAddr;
byte *bPtr;
eepromAddr = 0;
bPtr = (byte *)&netVars;
while (eepromAddr < sizeof(netVars_t))
{
*bPtr = EEPROM.read(eepromAddr);
bPtr++;
eepromAddr++;
}
}
// Save network variables in EEPROM
void saveNetVars()
{... | true |
94d33eabb6bef532a19576bea7b565da022ebd53 | C++ | TeoPaius/Projects | /c++/Diverse problems and algorithms/Problems/bile/main.cpp | UTF-8 | 1,978 | 2.5625 | 3 | [] | no_license | #include <fstream>
using namespace std;
ifstream is ("bile.in");
ofstream os ("bile.out");
int t[64000];
int a[251][251];
int sol[64000];
struct Bila{
int col;
int lin;
};
Bila b[64000];
int n;
int H;
int h[64000];
int hmax;
int cnt = 1;
int Find(int x);
int main()
{
is >> n;
for(int i = 1; i <= n * ... | true |
88a776701dd132a7ab173497a5e42cebf8e2e6d6 | C++ | ajaakman/cpp-audio-library | /src/Components/MasterMixer.cpp | UTF-8 | 1,716 | 2.65625 | 3 | [
"MIT"
] | permissive | #include "./MasterMixer.h"
#include "../Utilities.h"
#include "../API.h"
namespace audio
{
MasterMixer::MasterMixer(const double& time)
: Component(*this), m_globalTime(time), m_amp_target(0.0f), m_amplitude(0.0f), m_channel_clip{ 0 }, m_clip_timer{ 0 }
{
}
void MasterMixer::writeSamples(std::array<float, CHAN... | true |
fe839821ec7a8becb0d6cec9f57c65d70e67d7f7 | C++ | diepdao1708/CPP | /T1.cpp | UTF-8 | 798 | 2.6875 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
vector<int> res;
vector<int> a;
bool check(){
for(int i = 1; i < res.size(); i++)
{
if (res[i] < res[i-1]) return 0;
}
return 1;
}
void sinhth (int n, int k, int spt){
if (res.size() == k) {
if (check())
{
for(int i =... | true |
cf4be9b1176f1b62960fc6c813faf5c71d3d8bd9 | C++ | djyt/cannonball | /src/main/romloader.cpp | UTF-8 | 7,050 | 3.015625 | 3 | [] | no_license | /***************************************************************************
Binary File Loader.
Handles loading an individual binary file to memory.
Supports reading bytes, words and longs from this area of memory.
Copyright Chris White.
See license.txt for more details.
********************... | true |
fe286a67d9fadfb3e2eee1fc92b9d6b0511bacd4 | C++ | Taeyeong201/RnD | /Network_Test/Security/FileEncrypt/FileCrypto.cpp | UHC | 6,114 | 2.578125 | 3 | [] | no_license | #include "FileCrypto.h"
//#include <Windows.h>
int fs_decrypt_aes(char *in_file, char *out_file)
{
const unsigned char key32[32] =
{
0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,
0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,
0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34,0x56
};
AES_KEY ae... | true |
c12aa5694c15f49c2534a66caee455775e31ef62 | C++ | lelong03/esp8266-host-client | /8266_host.cpp | UTF-8 | 1,685 | 2.78125 | 3 | [] | no_license | #include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
// Assign output variables to GPIO pins
const int output5 = 5;
// Wifi ssid and password
const char *ssid = "wifi_name";
const char *password = "wifi_password";
ESP8266WebServer server(80);
IPAddress localIP(192, 168, 1, 184);
IPAddress gateway(192, 168, 1, 1);
... | true |
dcf84bb6160627c3aef36d299369f19441de756f | C++ | Balraaj/Windows-Programming | /Visual C++/FileHandling/FileOUT.cpp | UTF-8 | 573 | 3.65625 | 4 | [] | no_license | #include<iostream>
#include<fstream>
using namespace std;
class student
{
public:
char name[20];
int roll;
student() = default;
student(char *n, int r)
{
strcpy(name, n);
roll = r;
}
void show()
{
cout << "\nName is : " << name;
cout << "\nRoll is : " << roll;
}
};
void main()
{
student arr[5];
o... | true |
8b81d1c91bde3026a776486f460da85363472699 | C++ | Jothapunkt/gdv-praktikum | /Menu.cpp | MacCentralEurope | 7,011 | 2.765625 | 3 | [] | no_license | /* ----------------------------------------------------------- */
/* OpenGL-Testprogramm (quick and dirty) */
/* ----------------------------------------------------------- */
/* Datei: Menu.cpp */
/* zusaetzlich benoetigt: Wuerfel_mit_Normalen.cpp und h... | true |
73db4f353be0ae9ff50adcac07cd46beb869a132 | C++ | JiangSir857/C-Plus-Plus-1 | /Object Oriented Programming(C++)/模仿练习参考代码/chapter10/ex4.cpp | GB18030 | 816 | 3.1875 | 3 | [] | no_license | /*
1. Fibonacciе30дļȻʾеÿʾ5
*/
#include "fstream.h"
#define N 18
void main()
{
int iData[N]={0},i,n;
iData[0]=iData[1] = 1;
for(i=2;i<N;i++)
iData[i]=iData[i-1]+iData[i-2];
ofstream outputfile("d:\\a9.dat"); //ù캯ļ
if(!outputfile)
{
cout<<"ļʧܣ"<<endl;
return;
}
outputfile.write ((char *)... | true |
ab14ef57baadc5fc36a9cc62a430038db4d674db | C++ | omarhosny206/Data-Structures-and-Algorithms-Specialization | /1- Algorithmic Toolbox/Week 1/Programming Assignments/1- Sum of Two Digits/Sum of Two Digits.cpp | UTF-8 | 153 | 2.765625 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main()
{
int Number1, Number2;
cin >> Number1 >> Number2;
cout << Number1 + Number2 << endl;
}
| true |
688c66742d3c009030c134939b5beb1299f3efa9 | C++ | cerminar/UserCode | /Tools/MyAnalysisTools/test/root_lib/LumiNormalization.h | UTF-8 | 3,754 | 2.625 | 3 | [] | no_license | #ifndef LumiNormalization_H
#define LumiNormalization_H
/** \class LumiNormalization
* Class to get the normalization of each sample.
* The relative normalization is get from MC xsections while the overall normalization
* can be derived from the number of events under the Z peak.
* The samples used in this lum... | true |
56ccaa0bf156b57eb68ef33bddc21b24ec217e22 | C++ | eunxeong/BOJ | /Floyd/1507_궁금한민호.cpp | WINDOWS-1256 | 789 | 2.984375 | 3 | [] | no_license | #include <iostream>
using namespace std;
// 1507 ñ ȣ
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int N; cin >> N;
int arr[21][21];
for(int i = 1; i <= N; i++){
for(int j = 1; j <= N; j++){
cin >> arr[i][j];
}
}
bool ans[21][21] = { false, };
int Answer;
for(int k = 1; k <= N; k++){
... | true |
d72ebaa19a2d2c6b92572fbdea544fc73615fc91 | C++ | AplusB/ACEveryDay | /ybai62868/CodeForces/div_2/Round-354/B.cpp | UTF-8 | 358 | 2.546875 | 3 | [] | no_license | #include <iostream>
using namespace std;
double dp[10][10];
int main(void)
{
int n,t,ans = 0;
cin >> n >> t;
dp[0][0] = t;
for( int i = 0; i < n; i++)
{
for( int j = 0; j <= i; j++ )
{
if( dp[i][j] >= 1 )
{
dp[i + 1][j] += (dp[i][j] - 1) * 0.5;
dp[i + 1][j + 1] += (dp[i][j] - 1) * 0.5;
ans++;... | true |
7edf686d1020f49d9bc743737675b5dbc0783056 | C++ | randoruf/cpp | /acm/template/stack.cpp | UTF-8 | 2,205 | 3.5 | 4 | [
"MIT"
] | permissive | #include <iostream>
#include <vector>
using namespace std;
void func(vector<char>kind,int count[],int n)
{
if(count[0]>=1)
{
kind.push_back('(');
count[0]--;
func(kind,count,n);
count[0]++;
kind.pop_back();
}
if((count[1]>=1) && (count[1]>count[0]))
{
... | true |
c18bc3539d830b8183c31fcd2a25c3d9145115af | C++ | thiagocferr/remote-checkers-raw-protocol | /client/include/Tictactoe.hpp | UTF-8 | 989 | 3.5 | 4 | [] | no_license | #ifndef TICTACTOE_HPP
#define TICTACTOE_HPP
#include <string>
enum class GamePiece {
Empty,
X,
O,
};
enum class GameStatus {
In_Progress,
X_Winner,
O_Winner,
Draw
};
class Tictactoe {
private:
GamePiece game[3][3];
public:
Tictactoe();
// Stringfy board (... | true |
1534475afc13dec755cf830ae78521b1bf2cc8f5 | C++ | hankel343/Lab-2 | /Lab 2/Lab2.cpp | UTF-8 | 4,153 | 4.03125 | 4 | [] | no_license | /*
Hankel Haldin
Lab 2 Exploring Output
Due: 9/14/2020
Printing class schedule and star pattern to console
*/
#include <iostream> //For cout and endl keywords
#include <string> //Allows use of strings
#include <iomanip> //Used for setprecision for this program to control spacing between output
//Eliminates the need t... | true |
fed103fd23ccfe5b889d557354d8abce8dca5bf4 | C++ | lbenc135/Cpp_codes | /Tables/main.cpp | UTF-8 | 346 | 2.71875 | 3 | [] | no_license | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n,k,s,result=0,boxes=0;
cin >> n >> k >> s;
int box[n];
for(int i=0;i<n;i++)
{
cin >> box[i];
}
sort(box,box+n);
for(int i=n-1;result<k*s;i--)
{
result+=box[i];
boxes++;
}
... | true |
f571b3de56b2b697780c21b34a8cf37521636850 | C++ | MarcoNadalin/Azul_BoardGame_Terminal_Based | /Menu.h | UTF-8 | 961 | 3.09375 | 3 | [] | no_license | #ifndef COSC_ASS_TWO_MENU
#define COSC_ASS_TWO_MENU
#include <iostream>
#include <string>
#include "Game.h"
class Menu {
public:
/*
* the menu constructor which instantiates the game.
*/
Menu();
~Menu();
/*
* Prints out the main menu and handles all user input. If the ... | true |
9cfa69a900e6575dd8261dcbca48f83dbcfd56ab | C++ | yanglin526000/Wu-Algorithm | /公司真题/滴滴17秋招_餐馆.cc | UTF-8 | 1,961 | 3.671875 | 4 | [] | no_license | /*
某餐馆有n张桌子,每张桌子有一个参数:a 可容纳的最大人数; 有m批客人,每批客人有两个参数:b人数,c预计消费金额。 在不允许拼桌的情况下,请实现一个算法选择其中一部分客人,使得总预计消费金额最大
输入描述:
输入包括m+2行。
第一行两个整数n(1 <= n <= 50000),m(1 <= m <= 50000)
第二行为n个参数a,即每个桌子可容纳的最大人数,以空格分隔,范围均在32位int范围内。
接下来m行,每行两个参数b,c。分别表示第i批客人的人数和预计消费金额,以空格分隔,范围均在32位int范围内。
输出描述:
输出一个整数,表示最大的总预计消费金额
输入例子:
3 5
2 4 2
1 3
3 5
... | true |
de830b158480cb3e6a4b0ef7ff02aec13a6e34fd | C++ | Analking228/cpp_piscine | /Module_04/ex03/Character.cpp | UTF-8 | 1,135 | 3.09375 | 3 | [] | no_license | #include "Character.hpp"
Character::Character(const std::string& name) : _Name(name) {}
Character::Character(const Character& other) : _Name(other._Name) {
for(int i = 0; i < 4; i++)
if(other._Inv[i] != nullptr)
_Inv[i] = other._Inv[i]->clone();
}
const std::string& Character::getName() const{
... | true |
bb9b47d079dfe6297bb97267df26294ac5f1d174 | C++ | hatlonely/leetcode | /cpp/leetcode/leetcode/120_triangle.cpp | UTF-8 | 1,779 | 3.71875 | 4 | [] | no_license | //
// 120_triangle.cpp
// leetcode
//
// Created by hatlonely on 16/1/25.
// Copyright © 2016年 hatlonely. All rights reserved.
//
// Given a triangle, find the minimum path sum from top to bottom.
// Each step you may move to adjacent numbers on the row below.
//
// For example, given the following triangle
// ... | true |
3371556e8aec54d34d044c091a6f05776f4efc66 | C++ | liuxuanhai/C-code | /The C++ Standard Library/The C++ Standard Library/P123 二元判断式.cpp | WINDOWS-1252 | 1,006 | 3.5 | 4 | [] | no_license | // : 2014-08-22 09:56:39
#include <iostream>
#include <string>
#include <deque>
#include <algorithm>
using namespace std;
class Person
{
private:
string f;
string l;
public:
Person(const string & ff, const string & ll): f(ff), l(ll) {}
string firstname() const { return f; }
string lastname() const { return l; }... | true |
9bdc9b0cbf4a549b6278cdaba2a67b01de1b9eb9 | C++ | chiragramani/SystemMonitor | /src/process.cpp | UTF-8 | 1,126 | 2.875 | 3 | [
"MIT"
] | permissive | #include <unistd.h>
#include <cctype>
#include <sstream>
#include <string>
#include <vector>
#include "process.h"
#include "linux_parser.h"
using std::string;
using std::to_string;
using std::vector;
// Constructor
Process::Process(int pid) : _pid(pid), _user(LinuxParser::User(pid)), _command(LinuxParser::Command(pi... | true |
4f633db82dfc64a312203bf5873739df158e16d8 | C++ | StephaneB1/POO2_Labo4_Buffy | /Action/Action.h | UTF-8 | 616 | 2.515625 | 3 | [] | no_license | /*
-----------------------------------------------------------------------------------
Laboratoire : 04
Fichier : Action.h
Auteur(s) : Stéphane Bottin & Chau Ying Kot
Date : 14.05.2020
-----------------------------------------------------------------------------------
*/
#ifndef POO2_LABO4_BUFFY_ACTION_H... | true |
069ec37724318a6942c31c3e48d83ee5fab47b89 | C++ | DhruvKumar/MDP-Power-Manager | /matrix_calc.cc | UTF-8 | 12,997 | 2.578125 | 3 | [] | no_license | /*
This program calculates the Transition Probability matrices for the MDP formulation.
Copyright (C) 2008 Dhruv Kumar dhruv21@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Fou... | true |
ddfb9e6f81452569158cbc4cefd574b09ad41dc2 | C++ | F0RTYS3V3N/Metin2-Advanced-Duel-Exchange- | /1.Svn/Server/game/src/pvp.h | UTF-8 | 1,660 | 2.65625 | 3 | [] | no_license | //Find
~CPVP();
///Change
#if defined(__BL_ADVANCED_DUEL__)
virtual ~CPVP();
#else
~CPVP();
#endif
//Find
void Win(DWORD dwPID);
///Change
#if defined(__BL_ADVANCED_DUEL__)
virtual void Win(DWORD dwPID);
#else
void Win(DWORD dwPID);
#endif
///Add after CPVP class
#if defined(__BL_ADVANCED_DUEL__)
c... | true |
3d66e61e53c280363dbc5919dbe0f524f0641b4f | C++ | huseyinoztrk/DataStructures | /Week5/CircularLinkedList/include/CircularLinkedList.hpp | UTF-8 | 3,276 | 3.765625 | 4 | [] | no_license | #ifndef CIRCULARLINKEDLIST_HPP
#define CIRCULARLINKEDLIST_HPP
#include "Iterator.hpp"
#include "NoSuchElement.hpp"
template <typename Object>
class CircularLinkedList{
private:
Node<Object> *head;
int size;
Iterator<Object> FindPrevByPosition(int position){
if(position < 0 || position > size) throw NoSuc... | true |
7439b152fe039abd6e04032a9c902faa997b4c5e | C++ | ferserc1/bg2e-cpp | /src/base/Image.cpp | UTF-8 | 2,070 | 3.0625 | 3 | [
"MIT"
] | permissive |
#include <bg2e/base/Image.hpp>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#include <iostream>
namespace bg2e {
namespace base {
std::unordered_map<std::string, std::shared_ptr<Image>> Image::g_imageCache;
void Image::ClearCache()
{
g_imageCache.clear();
}
void Image::ClearCacheFile(const std::s... | true |
00ae4bacdbda2e0bf02ea4c10b751035daf6d065 | C++ | mwthinker/CppSdl2 | /src/sdl/shaderprogram.h | UTF-8 | 2,468 | 2.90625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | #ifndef CPPSDL2_SDL_SHADERPROGRAM_H
#define CPPSDL2_SDL_SHADERPROGRAM_H
#include "opengl.h"
#include <string>
#include <map>
namespace sdl {
class ShaderProgram {
public:
// Create an empty non linked shader.
ShaderProgram() = default;
ShaderProgram(const ShaderProgram&) = delete;
ShaderProgram& operator... | true |
8df343b50a9e9a20b10129813c3dbafcd15650f0 | C++ | mattsan/divideInto | /cpp/divideInto.h | UTF-8 | 531 | 3.1875 | 3 | [] | no_license | #ifndef DVIDEINTO_H
#define DVIDEINTO_H
#include <vector>
#include <iterator>
template<typename Iterator>
std::vector<Iterator> divideInto(int n, Iterator begin, Iterator end)
{
std::vector<Iterator> result;
const int length = std::distance(begin, end);
const int partial_le... | true |
f78345c463894f19a062c3825661c6dbe56ff69b | C++ | Jojendersie/glhelper | /glhelper/samplerobject.hpp | UTF-8 | 3,647 | 2.84375 | 3 | [
"MIT"
] | permissive | #pragma once
#include "gl.hpp"
#include "texture.hpp"
#include <unordered_map>
namespace gl
{
/// \brief Easy to use OpenGL Sampler Object
///
/// Will store all runtime create sampler objects in a intern static list. List will be cleared on program shutdown or on explicit call.
/// Also binds sampler only if not... | true |
2f51e13b75760159d203459eec175d4b6d1ae576 | C++ | Ama-10669107/bubble-sort-and-selection-sort | /bubble sort.cpp | UTF-8 | 367 | 3.015625 | 3 | [] | no_license | #include<iostream>
#include<conio.h>
void main()
int i,int arr[],int j,int temp,int c;
cout<<"Enter array size:";
cin>>c;
for (i=0;i<c;i++)
{
cin>>arr[i]
}
for (i=0;i<c;i++)
{
for(j=0;j<(c-i-1);j++)
{if arr[j]>arr[j+1])
{temp=arr[j];
arr[j]= arr[j+1];
arr[j+1]=temp;}}}
cout<<"Elements successfully sorted in ascending ... | true |
7f5a41c117ca0d838d6b38ae5365eb66bca75ce6 | C++ | iamjhpark/BOJ | /2251.cpp | UTF-8 | 6,144 | 3 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
vector<int> answer;
void BFS(int A, int B, int C, vector<vector<bool>> &check) {
int sum = C;
queue<pair<int, int>> q;
q.push(make_pair(0, 0));
check[0][0] = false;
vector<int> from = { 0, 0, 1, 1, ... | true |
08e8250c6492bda21c4cea762753e1612376ee12 | C++ | sankarmanoj/thrust2D | /opencv/omp/sobel_filter.cpp | UTF-8 | 3,651 | 2.578125 | 3 | [] | no_license | #define THRUST_DEVICE_SYSTEM 2
#include <opencv2/opencv.hpp>
#include <thrust/window_2d.h>
#define PI 3.14159
#define ITER 25
using namespace cv;
class transFunctor
{
public:
__host__ uchar operator() (const uchar a,const uchar b) const
{
return (uchar) sqrt((float) a*a + b*b);
}
};
class convolutionFunctor... | true |
50606909457929d8d8f77b58a187ea6d4136b86e | C++ | JumpeiTerashita/PunyoPunyo | /PunyoPunyo/Program/Liblary/BitController.cpp | UTF-8 | 392 | 3 | 3 | [] | no_license | #include "BitController.h"
void BitAddition(unsigned char* _lookat, const unsigned char _plus)
{
*_lookat |= _plus;
}
void BitTakeaway(unsigned char* _lookat, const unsigned char _negative)
{
unsigned int mask = ~_negative;
*_lookat &= mask;
}
bool BitChecker(const unsigned char _lookat, const unsigned char _chec... | true |
23a37a9f11cb316a2d85ae0f4674a0b01004e725 | C++ | moevm/oop | /8304/Butko_Artem/lab6/SOURCE/Game/Objects/Object.cpp | UTF-8 | 635 | 2.859375 | 3 | [] | no_license | //
// Created by Artem Butko on 08/05/2020.
//
#include "Object.h"
void Object::death()
{
this->notice();
}
void Object::getInformation()
{
std::cout << "------- OBJECT INFO ---------" << std::endl;
std::cout << "Name of object : " << this->id << std::endl;
std::cout << "Health : " << this->... | true |
924d97f78e84f6c6bcea195f79c36d3305e45141 | C++ | Rhoban/gp | /include/rhoban_gp/core/gaussian_process.h | UTF-8 | 5,521 | 2.671875 | 3 | [] | no_license | #pragma once
#include "rhoban_gp/core/covariance_function.h"
#include "rhoban_gp/gradient_ascent/randomized_rprop.h"
#include <Eigen/Core>
#include <functional>
#include <memory>
#include <random>
namespace rhoban_gp
{
class GaussianProcess
{
public:
GaussianProcess();
GaussianProcess(const Eigen::MatrixXd& in... | true |
66fb8ddbf737a4ed5d94f177776731e4ae1e4790 | C++ | lucamono/NavigationPlanner_Robocup-atWork | /spqr_splines_navigation/voronoi_action/include/topological_nav_utils/astar.h | UTF-8 | 678 | 2.71875 | 3 | [] | no_license | #ifndef ASTAR_H
#define ASTAR_H
#include <iostream>
#include <vector>
#include <list>
#include "graph.h"
using namespace std;
struct node {
graphNode g_node;
node* parent;
double f, g, h;
node(){};
node(graphNode& n){
g_node = n;
f=0;
g=0;
h=0;
}
};
class Astar... | true |
fb352e521acf9c2bb22c0f3ea35f348f02976662 | C++ | Lvnszn/flink_ai | /package/whl_dependencies/proxima-tianchi-master-668a0a87cb2a4aa1c68443b1ab05ee5a80008cb4/plugin/deps/aitheta2/index_container.h | UTF-8 | 2,500 | 2.703125 | 3 | [] | no_license | /**
* Copyright (C) The Software Authors. All rights reserved.
* \file index_container.h
* \author Alibaba-tianchi
* \date July 2020
* \version 2.0.0
* \brief Interface of AiTheta Index Container
*/
#ifndef __AITHETA2_INDEX_CONTAINER_H__
#define __AITHETA2_INDEX_CONTAINER_H__
#includ... | true |
95a22a5a5d9957bcdcd7e81bc4a5e86a28ff5e63 | C++ | billpugh/Pyramid-of-Possibilities | /Arduino/Pachinko/StripLighting.cpp | UTF-8 | 1,439 | 2.921875 | 3 | [] | no_license | //
// StripLighting.cpp
//
// Created by Bill on 5/19/15.
//
//
#include "StripLighting.h"
#include "PachinkoMain.h"
#include <stdlib.h>
StripLighting::StripLighting(OctoWS2811 & lights, int firstPixel, int numPixels) : lights(lights), firstPixel(firstPixel), numPixels(numPixels) {};
bool changeColors() {
if... | true |
6c4fe4ec79fa34da1bbf4e191a40cd1176b243b3 | C++ | stephenmathieson/sophia.cc | /test.cc | UTF-8 | 8,541 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
#include "sophia-cc.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
using namespace sophia;
#define SUITE(title) \
printf("\n \e[36m%s\e[0m\n", title)
#define TEST(suite, name) \
static void Test##suite##name(void)
#define RUN_TEST(suite, test) \
Test##suite##test(); \
prin... | true |
168407f523197ebc15df172f304fcd435291938e | C++ | maurosch/Competitive-Programming | /CODEFORCES/Round #493/C/main.cpp | UTF-8 | 928 | 2.90625 | 3 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
#define forn(i,n) for(int i = 0; i < int(n); i++)
#define forsn(i,s,n) for(int i = int(s); i < int(n); i++)
#define rforn(i,n) for(int i = int(n)-1; i >= 0; i--)
int main()
{
int n;
long long reverse, change;
cin >> n >> reverse >> change;
char... | true |
ff7a87c34e746dd1d16b2d3027710169cff608da | C++ | pyomeca/biorbd | /include/Utils/Scalar.h | UTF-8 | 910 | 2.515625 | 3 | [
"MIT"
] | permissive | #ifndef BIORBD_UTILS_SCALAR_H
#define BIORBD_UTILS_SCALAR_H
#include "biorbdConfig.h"
#include "rbdl/rbdl_math.h"
namespace BIORBD_NAMESPACE
{
namespace utils
{
#ifdef BIORBD_USE_CASADI_MATH
///
/// \brief Wrapper of scalar
///
#ifdef SWIG
class Scalar
{
#else
class Scalar : public RigidBodyDynamics::Math::Scalar
... | true |
3849f896a2ecdf64e82fa61230ba75216292b6b3 | C++ | ethz-asl/kalibr | /Schweizer-Messer/sm_common/include/sm/round.hpp | UTF-8 | 786 | 3.015625 | 3 | [
"BSD-3-Clause"
] | permissive | #ifndef SM_ROUND_HPP
#define SM_ROUND_HPP
namespace sm {
inline double round (double number)
{
return (number < 0.0 ? ceil (number - 0.5) : floor (number + 0.5));
}
inline float round (float number)
{
return (number < 0.0f ? ceilf (number - 0.5f) : floorf (number + 0.5f));
... | true |
a057f5dd4ed917cbb9ad0c58f8a862ace10d9bfe | C++ | bryanbl/Proyecto_Aviones | /Jugador.cpp | UTF-8 | 1,243 | 2.8125 | 3 | [] | no_license | #include "Jugador.h"
#include <QKeyEvent>
#include "Balas.h"
#include "Enemigo.h"
#include <QGraphicsScene>
Jugador::Jugador(QGraphicsItem *causa): QGraphicsRectItem(causa){
}
//Configuracion del movimiento
void Jugador::keyPressEvent(QKeyEvent *event)
{
//cada vez que presiono una tecla el programa lo reconoce
... | true |
397aac2ff3168f71db38f9015df520c5ec367797 | C++ | alexhein189/code-plagiarism-detector | /data/open-Yellow/sources/000829-open-2015-322-Yellow.cpp | UTF-8 | 1,182 | 2.5625 | 3 | [] | no_license | #include <fstream>
#include <vector>
#include <iostream>
#include <string>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <cmath>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
//ifstream in("input.txt");
//ofstream out("output.txt");
int n, m;
ci... | true |
a02b392e11b530ac2b3be9457c758b65823ae07b | C++ | Alek96/TKOM-Interpreter | /tests/unitTest/ast/statement/WhileStatement_test.cpp | UTF-8 | 8,685 | 3.015625 | 3 | [] | no_license | #include <catch.hpp>
#include "modules/ast/statement/WhileStatement.hpp"
#include <memory>
#include "ast/Variable.hpp"
#include "ast/expression/BaseMathExpr.hpp"
#include "ast/Return.hpp"
#include "ast/statement/BlockStatement.hpp"
#include "ast/statement/AssignStatement.hpp"
#include "ast/statement/IfStatement.hpp"
#... | true |
7072e817d990eb40de65d58244f290e84e5d548d | C++ | DanielaSol/taller2015 | /src/Pantalla/Pantalla.cpp | UTF-8 | 5,034 | 2.65625 | 3 | [] | no_license | /*
* Pantalla.cpp
*
* Created on: 25/10/2015
* Author: daniela
*/
#include "Pantalla.h"
#include "../GameObject.h"
#include "../TextureManager.h"
#include <map>
#include <sstream>
#include <string>
#include "../Vector2D.h"
#include "SDL/SDL_ttf.h"
#include "../Game.h"
#include "stdlib.h"
using namespace ... | true |
942380e5c86cc6fba217afaf8f2d3d2c00b3bd7b | C++ | asteine8/CISC-192_MESA_SPRING_2020 | /Testing/IOTest/filter_file_test.cpp | UTF-8 | 166 | 2.671875 | 3 | [] | no_license | #include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
cout << "Your Input: " << input;
cerr << "I don't like you";
return 0;
}
| true |
9574474fd7ae0699e3c024ac93f1aca8ce4b809a | C++ | AndreyLatyshev/HelixAndFriends | /Ellipse.h | UTF-8 | 512 | 2.796875 | 3 | [] | no_license | #ifndef ELLIPSE_H
#define ELLIPSE_H
#include "Point.h"
#include "Curve.h"
class Ellipse : public Curve
{
public:
Ellipse();
Ellipse (Point thePoint, double theMajRad, double theMinRad);
double GetMajRad() const;
double GetMinRad() const;
Point GetPoint (double theParameter) const;
Vector Get... | true |
77859b30ae132655c37432ee6b7c6ba9c72795c9 | C++ | 1993LETICIA/LINGUAGEM-DE-PROGRAMA-O | /EX21.cpp | IBM852 | 335 | 2.796875 | 3 | [] | no_license | #include <stdio.h>
#include <stdlib.h>
#include<locale.h>
int main()
{
setlocale(LC_ALL, "Portuguese");
char *c;
int a = 1, b = 1,n, i;
printf("Digite o N-simo termo: ");
scanf("%d", &n);
printf("\n");
for(i=0;i<n;i++)
if(i % 2 == 0)
{
printf("%d ", a);
a += b;
}
else
{
printf("%d ", b);
b ... | true |
6774efd01aa6c1336a7188f34f0abc74ddd1dd96 | C++ | btbd/DOOM_Trainer | /memory.cpp | UTF-8 | 18,086 | 3 | 3 | [
"Apache-2.0"
] | permissive | #include "stdafx.h"
ARRAY ArrayNew(unsigned char element_size) {
ARRAY array;
array.element_size = element_size;
array.allocated = 0xFF;
array.buffer = malloc(element_size * 0xFF);
array.length = 0;
return array;
}
void *ArrayGet(ARRAY *array, DWORD index) {
return (void *)((SINT)array->buffer + (index * arr... | true |
ac63c8c15dc3fbd0b673761a5f6a38cfad7aa332 | C++ | lucafanselau/ovk | /ovk/ui/concept.cpp | UTF-8 | 1,554 | 2.578125 | 3 | [] | no_license | // Ok so this is how i would image the library to look like
// very very wip
int main() {
/* Create OVK RenderContext (atm ovk::Device and ovk::SwapChain?)*/
ovk::ui::UIManager ui(device, swapchain);
/* Build up UI */
// ui::Panel is a window
// ui::Panel is an ui::Element which is constrainable and... | true |
7eb3c6fabe49559c795de30b1defe8fea1e5c6ca | C++ | k-swis/CS1337 | /lab28.cpp | UTF-8 | 894 | 2.953125 | 3 | [] | no_license | //Your Name
//CS 1337
//Lab 28
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <bitset>
#include <climits>
#include <bits.h>
extern const int N;
using namespace std;
void printHexadecimal(int word, ostream& os)
{
int i;
for ( i = (N - 1) / 4 * 4; i >= 0; i -= 4)
{
if(getBits(word, i, 4) < 1... | true |
02f5b4565daadef1ad1dacef0784cdc8a9f0bd50 | C++ | OSSGames/GAME-SPORTS-BillardGL | /Kamera.cpp | UTF-8 | 14,921 | 2.78125 | 3 | [] | no_license | /****************************************************************************
**
** Kamera.cpp Stefan Disch, Tobias Nopper, Martina Welte 2001
**
*****************************************************************************/
#include <math.h>
#include <stdio.h> //2CHANGE wieder raus wenn kein printf mehr drin
#incl... | true |
07d07fc5d9bc94945cc5f1c4163cd55dbab967dd | C++ | ahawk66/priorityPrint | /simulation.h | UTF-8 | 3,416 | 3.046875 | 3 | [] | no_license | #include <fstream>
#include <string>
#include <queue>
using namespace std;
/////////////////////////////////////////
// PrintJob stores and/or modifies information about what needs to be printed, how much still needs to be printed, and what time it got to a printer,
//////////////////////////////////////... | true |
20601349a63133f843fe538be340887875ae62e4 | C++ | whztt07/acm | /zoj/3338/Sov_09_17_2012.cpp | UTF-8 | 2,655 | 2.9375 | 3 | [] | no_license | #include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdarg>
using namespace std;
const int MAX_L = 3;
struct Matrix {
int n, m;
double mat[MAX_L][MAX_L];
Matrix(){}
Matrix(int _n, int _m, ...) : n(_n), m(_m) {
va_list ap;
va_start(ap, _m);
for (... | true |
e95283a6996e3ee2c4ecdec1f4e744c952c12b0b | C++ | daniellba/SMatrix | /SMatrix.cpp | UTF-8 | 12,710 | 3.421875 | 3 | [] | no_license | /*Daniel Ben-Ami*/
#include "SMatrix.h"
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>;
using namespace std;
// MNode constructor
MNode::MNode(double data, int i, int j)
{
_data = data;
_indexI = i;
_indexJ = j;
_nextRow = NULL;
_nextCol = NULL;
}
// SMatrix const... | true |
55a20171ee0f30ca8d034468d54b2c35394a8529 | C++ | xiaoguosk/safeGeoRecommend | /util.h | GB18030 | 9,115 | 2.578125 | 3 | [] | no_license | #include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/legacy/legacy.hpp>
#include "opencv2/highgui/highgui.hpp"
#include<opencv2\opencv.hpp>
#include<iostream>
#include <stdio.h>
#include <gmp.h>
#include <windows.h>
using namespace std;
using namespace cv;
static float B[3][3] = { { 1, 2, 3 }, { 0, 1, 4 }... | true |
0e43b55644858550b5d6714add4aba83e408887d | C++ | michlord/kurs_c | /c4/zadanie1/test/testgenerator.cpp | UTF-8 | 1,872 | 2.734375 | 3 | [] | no_license | #include <fstream>
#include <set>
#include <cstdlib>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
template<class T>
std::string toString(const T& t){
std::ostringstream s;
s << t;
return s.str();
}
int main()
{
const int test_case_amt = 15;
int test_case_size[test_case_amt]... | true |
1d554c3a8d55613379506614e2a9ef81393ee974 | C++ | dykieu/Text-Based-Console-Game | /Game Objects/Character Objects/hunter.cpp | UTF-8 | 9,665 | 3.46875 | 3 | [] | no_license | /*************************************************************
* Programmer: Dylan Kieu
* Date: 11/25/19
* Purpose: Hunter class defines the player character 'Hunter'
* Introduces special skills and a level up system
* that improves character stats throughout the game.
*******... | true |
f3ddc70542b71b619a33abfb982a8af2046ba9ac | C++ | davezli/Coursework | /cs246/project/dragon.cc | UTF-8 | 488 | 2.703125 | 3 | [] | no_license | #include "dragon.h"
using namespace std;
void Dragon::print() {
cout << 'D';
}
DragonGold * Dragon:: getDragonGold()
{
return dg;
}
Dragon::Dragon(int a, int b) {
x = a;
y = b;
type = "dragon";
dg = NULL;
hp = 150;
atk = 20;
def = 20;
moved = false;
}
Dragon::Dragon(int a, i... | true |
3dab9f7fc822c7eb0ac6f9600edb1a35bcf36344 | C++ | kballard08/ThermalSolver | /ScriptReader.h | UTF-8 | 2,333 | 2.96875 | 3 | [] | no_license | /*
* ScriptReader.h
*
* Created on: Feb 27, 2013
* Author: kballard
*/
#ifndef SCRIPTREADER_H_
#define SCRIPTREADER_H_
#include <deal.II/base/exceptions.h>
#include <iterator>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
namespace FEASolverNS
{
using name... | true |
7bca9f3c5d0d6079fd1fa72b647c55357afa2c4d | C++ | mtszpater/Uniwersytet-Wroclawski | /Kurs C++/Zad2/prosta.h | UTF-8 | 832 | 2.546875 | 3 | [] | no_license | //
// Created by Mateusz Pater on 09.03.2016.
//
#ifndef ZADANIE2_PROSTA_H
#define ZADANIE2_PROSTA_H
#include "wektor.h"
#include "punkt.h"
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <stdexcept>
#define EPSILON 0.0000000000001
class prosta{
double A;
double B;
double C;
vo... | true |