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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e40c3c0d402f994feb1d94b775a544091edf7863 | C++ | donRumata03/Literature | /src/Vocab_research.cpp | UTF-8 | 1,726 | 2.890625 | 3 | [
"MIT"
] | permissive | #include "pch.h"
#include "Vocab_research.h"
vector<pair<double, double>> make_author_vocab(author_books* author)
{
common_word_top author_top;
for (auto& artwork : author->artworks) author_top.merge(artwork.top);
cout << "Got merged top!" << endl;
size_t all_diff_words = author_top.different_words();
auto max... | true |
3dd1ea4080210baffddb9d82ca51affa45537cba | C++ | paulojuniore/advanced-algorithms | /LISTA 3/05 - Teclado quebrado.cpp | UTF-8 | 584 | 3.265625 | 3 | [] | no_license | // 1451 - Teclado Quebrado. 25/04/2018
#include <iostream>
#include <list>
using namespace std;
int main()
{
int i;
string frase;
list<char> restos;
list<char>::iterator it;
while(cin >> frase)
{
restos.clear();
it = restos.begin();
for(i = 0; i < frase.length(); i++)
{
if(frase[i] == ']')
... | true |
1e63ca0725f05f44a8d97c37e31beb129ac99512 | C++ | LukeMaher98/ZorkGUI | /hero.h | UTF-8 | 1,248 | 3.09375 | 3 | [] | no_license | #ifndef HERO_H
#define HERO_H
#include "item.h"
#include "Character.h"
#include <string>
#include <vector>
using namespace std;
class Hero : public Character
{
friend class MainWindow;
friend void setStamina(Hero &c, int stam){
c.stamina = stam;
}
private:
bool Sword;
ve... | true |
58ea2e325daba55dba6c0b2ff9ed05934f589518 | C++ | sasqwatch/ANBU | /importer.h | UTF-8 | 2,759 | 2.75 | 3 | [] | no_license | #pragma once
#ifndef IMPORTER_H
#define IMPORTER_H
#include "common.h"
#include "dos_header.h"
#include "nt_header.h"
#include "optional_header.h"
#include "data_directory_header.h"
#include "section_header.h"
class Importer
/***
* Class used to fix the import address table of an
* unpacked file, with this class wil... | true |
5e950cfba064875377eff7bea8b9ca5d3187c245 | C++ | JureHudoklin/AGV_warehouse | /catkin_ws/src/robot/include/robot.h | UTF-8 | 601 | 3.328125 | 3 | [] | no_license |
template <class T>
T getSign(T number) {
if (number < 0) {
return -1;
} else if(number > 0){
return 1;
} else {
return 0;
}
}
template <class T>
T limitNumber(T number, T max) {
if (number > max) {
return max;
} else if (number < -max) {
return -max;
} else... | true |
479edc2c2385595e82b97e689f344d57e7175b09 | C++ | a-gavriel/Remote-Memory | /rmlibserver/encryption/encryption.cpp | UTF-8 | 548 | 3.234375 | 3 | [] | no_license | #include "encryption.h"
std::string encrypt(std::string text)
{
char key = 'x';
std::string encrypted;
std::string original = text;
for (int i = 0; i < original.size(); i++)
{
encrypted += original[i] ^ (int(key) + i) % 20;
}
return encrypted;
}
std::string decrypt(std::string te... | true |
5e5a5e5c6a9b2d941d3d0823dc859b68e7ebcfa8 | C++ | FelixOON/MeteoFMClock | /setupMode.ino | UTF-8 | 6,115 | 2.53125 | 3 | [] | no_license | SetupMode::SetupMode(uint32_t timeInterval) : Mode()
{
timer.setInterval(timeInterval);
}
void SetupMode::init(uint8_t param)
{
_param = param;
if (_param == 0) // time set mode
{
_changeHrs = hrs;
_changeMins = mins;
DateTime now = rtc.getTime();
_changeDay = now.day;... | true |
f2cf6c0e962607e67529eb6e82b7594e913c13a4 | C++ | joastbg/art-raytracer | /matrix.h | UTF-8 | 1,581 | 2.75 | 3 | [] | no_license | /*
* =====================================================================================
*
* Filename: matrix.h
*
* Description:
*
* Version: 1.0
* Created: 01/11/2012 18:36:30
* Revision: none
* Compiler: g++
*
* Author: Johan Astborg (ja), into@avantime... | true |
3726726cb26aa3143d9bccfcd53aacc332bc3e25 | C++ | btobrien/chessworm | /src/cpp/chess/graph/Parse.h | UTF-8 | 1,460 | 2.578125 | 3 | [] | no_license |
#pragma once
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <vector>
#include <fstream>
#include <cassert>
#include <algorithm>
#include "Glyph.h"
#include "Log.h"
//class Parser {
// Game* CreateGame(std::ifstream& pgn);
//
//private:
// std::string pgn;
// int index;
// static void next(std::... | true |
17bda4211cfce214cb1ddbc0309b60433594425c | C++ | chen0040/cpp-ogre-mllab | /paginglandscape/PlugIns/PagingLandScape2/include/OgrePagingLandScapeQueue.h | UTF-8 | 8,263 | 2.671875 | 3 | [
"MIT"
] | permissive | /***************************************************************************
OgrePagingLandScapeQueue.h - description
-------------------
begin : Mon Aug 04 2003
copyright : (C) 2003 by Jose A. Milan
email : spoke2@supercable.es
***************************************... | true |
a6490ae9389605edf0113937e78d54c38dbeeb69 | C++ | CrazyIEEE/algorithm | /OnlineJudge/蓝桥杯/算法训练/字串统计.cpp | UTF-8 | 2,893 | 3.765625 | 4 | [] | no_license | /*
问题描述
给定一个长度为n的字符串S,还有一个数字L,统计长度大于等于L的出现次数最多的子串(不同的出现可以相交),如果有多个,输出最长的,如果仍然有多个,输出第一次出现最早的。
输入格式
第一行一个数字L。
第二行是字符串S。
L大于0,且不超过S的长度。
输出格式
一行,题目要求的字符串。
输入样例1:
4
bbaabbaaaaa
输出样例1:
bbaa
输入样例2:
2
bbaabbaaaaa
输出样例2:
aa
数据规模和约定
n<=60
S中所有字符都是小写英文字母。
提示
枚举所有可能的子串,统计出现次数,找出符合条件的那个
*/
#... | true |
1c73c136406e78d2963cb6e379d0a6f372a6264a | C++ | fezrestia/hello-world | /windows-game-program/PuzzleGame/PuzzleGame/util.h | UTF-8 | 1,413 | 3.109375 | 3 | [] | no_license | #ifndef FEZRESTIA_UTIL
#define FEZRESTIA_UTIL
using namespace std;
namespace fezrestia {
/**
* File buffer class.
*/
class FileBuffer {
private:
const int mSize;
const char* mBuffer;
public:
/**
* CONSTRUCTOR.
*
* @param size
... | true |
db9678649b4dadb3e803c7467a56005a2cf1893d | C++ | amraboelkher/CompetitiveProgramming | /CodeForces/Codeforces Round #451/C.cpp | UTF-8 | 1,019 | 2.59375 | 3 | [
"MIT"
] | permissive | #include<bits/stdc++.h>
using namespace std;
int main(){
freopen("in.in" , "r" , stdin);
int n ;
cin >> n;
map<string , set< string > > mp;
map<string , vector< string > > ret;
for(int i = 0 ;i < n ;i ++){
int no;
string per;
cin >> per >> no;
while(no --){
string ss;
cin >> ss;
mp[per].inser... | true |
c625df61bae16fc4647cb96e89dab914ddb5c5f9 | C++ | jacketsj/numcal | /vec.h | UTF-8 | 1,324 | 3.171875 | 3 | [] | no_license | #ifndef vec_h
#define vec_h
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define num double
struct vec
{
vec();
vec(int d);
vec(vector<num> vals);
vec(const vec &oth);
void operator=(const vec &oth);
bool operator==(const vec &oth) const;
vec operator+(num oth) const;
vec oper... | true |
7cbff2bf2fc2d372aa84efad4060e94c8f690287 | C++ | SFMLCoBra/CBLib | /src/TextDocument.cpp | UTF-8 | 12,439 | 2.84375 | 3 | [] | no_license | #include "TextDocument.hpp"
#include <sys/stat.h>
#include <boost/filesystem.hpp>
#include "Data.hpp"
namespace cb
{
TextDocument::TextDocument()
: lines(0), sect(0), writetosection(false)
{
}
TextDocument::TextDocument(const std::string& currentFilePath)
: currentFilePath(currentFilePath), lines(0), sect(0), w... | true |
6e163cf627020d950c03e23bfbbfd488cb954fa0 | C++ | JonathanStine/Programming-Practice | /C++/JCPSRational.h | UTF-8 | 3,002 | 3.59375 | 4 | [] | no_license | /* The header file for assignment 11
* Edward G. Kovach
* December 6, 2014
* defines the class JCPSRational which models fractions.
*/
#ifndef JCPSRATIONAL
#define JCPSRATIONAL
using namespace std;
#include <iostream>
#include <string>
class JCPSRational
{
public:
// The instructions for assignm... | true |
ba0eb13900996b8bd1b927830759fc97c90dbda9 | C++ | zhangxin8105/EVO | /EVOMotor/Platform/Include/Platform/Leak.h | UTF-8 | 483 | 2.75 | 3 | [] | no_license | #ifndef LEAK_H_
#define LEAK_H_
//fix name later
#include <map>
class Leak
{
public:
Leak();
~Leak();
static void addPointer(void* pointer, const char* file, const unsigned int line);
static void removePointer(void* pointer);
private:
struct PointerInfo
{
const char* file;
unsigned int line;
};
typedef... | true |
ac7b8b5473cfecde9cbdb8f02ef1661a7036825c | C++ | haoboxuxu/leetcode-algorithm | /c++/120_Triangle.cpp | UTF-8 | 277 | 2.546875 | 3 | [] | no_license | class Solution {
public:
int minimumTotal(vector<vector<int>>& f) {
for (int i = f.size() - 2; i >= 0; i--) {
for (int j = 0; j <= i; j++) {
f[i][j] += min(f[i+1][j], f[i+1][j+1]);
}
}
return f[0][0];
}
}; | true |
63b6cd48aa1dac9144aeaa0589ab24a539d21e0c | C++ | ltcltc/COMP2123PROJECT | /printboard.cpp | UTF-8 | 457 | 3.640625 | 4 | [] | no_license | // printboard.cpp
// print the game board
#include <iostream>
#include <string>
using namespace std;
void printboard(int size, string ** map)
{
cout << " ";
for (int i = 0; i < size; i++)
{
cout << i << " ";
}
cout << endl;
// output gameboard in formate
for (int row = 0; row < size; row++)
{
... | true |
fea3dbc3a5b5418e5145a2cb41de66dfa21f8e6f | C++ | mayank93/Moving-in-3D-World | /camera.h | UTF-8 | 518 | 2.65625 | 3 | [] | no_license | #ifndef camera_H
#define camera_H
#include "headerFiles.h"
class GLCamera{
public:
float eyeX;
float eyeY;
float eyeZ;
float refX;
float refY;
float refZ;
float upX;
float upY;
float upZ;
GLCamera(){
}
void set(float eX,float eY,float eZ,float rX,float rY,float rZ,float uX,float uY,float uZ){
eyeX=e... | true |
4b58247fb318fff6e1b525f0758decab4260702e | C++ | thverney-dozo/Piscine-CPP | /C08/ex02/mutantstack.hpp | UTF-8 | 1,550 | 2.796875 | 3 | [] | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* mutantstack.hpp :+: :+: :+: ... | true |
0aadb41abc1b67c30a5a5c41cd8a9f8c682ad112 | C++ | PlenkinAv/LeetCode | /133. Clone Graph.cpp | UTF-8 | 709 | 3.375 | 3 | [] | no_license | //https://leetcode.com/problems/clone-graph/
/*
// Definition for a Node.
class Node {
public:
int val;
vector<Node*> neighbors;
Node() {}
Node(int _val, vector<Node*> _neighbors) {
val = _val;
neighbors = _neighbors;
}
};
*/
class Solution {
public:
u... | true |
f64dfcf08b6002b08c55d29cfee75df3047627c2 | C++ | semihsahin1990/StreamWithCoroutines | /code/StreamWithCoroutines/core/src/streamc/topology/ReverseTree.cpp | UTF-8 | 3,445 | 2.5625 | 3 | [] | no_license | #include <string>
#include "streamc/topology/ReverseTree.h"
#include "streamc/operators/FileSource.h"
#include "streamc/operators/TupleGenerator.h"
#include "streamc/operators/Timestamper.h"
#include "streamc/operators/Selective.h"
#include "streamc/operators/Busy.h"
#include "streamc/operators/Union.h"
#include "strea... | true |
5ae3345ed6e2cfa82cc740ee93cacd1c8d19126a | C++ | azabrod1/CStuff3 | /C_Random/C_Random/blockedList.hpp | UTF-8 | 3,853 | 2.984375 | 3 | [] | no_license | //
// blockedList.hpp
// Tarjan
//
// Created by Alex Zabrodskiy on 5/28/17.
// Copyright © 2017 Alex Zabrodskiy. All rights reserved.
//
#ifndef blockedList_hpp
#define blockedList_hpp
#include <stdio.h>
#include <atomic>
template <class S, int P = 3, int L = 8>
class BlockedListIt;
template <class S, int P =... | true |
7ba711c8f3d2ea8ac4dc951e63a53eea611d9ef8 | C++ | akashc110/Cplusplus | /3_Exercises_1.cpp | UTF-8 | 2,667 | 3.40625 | 3 | [] | no_license | #include<algorithm>
#include<vector>
#include<iostream>
#include<string>
#include<iomanip>
#include<ios>
using std::cin;
using std::cout;
using std::endl;
using std::setprecision;
using std::string;
using std::streamsize;
using std::sort;
using std::vector;
double getMedian();
int main()
{
cout << "Enter the integ... | true |
5fca0594e457dee4dca0c191b1bd7b17d12edae5 | C++ | NotBjoggisAtAll/Tomato-Engine | /src/app.h | UTF-8 | 5,820 | 2.71875 | 3 | [
"MIT"
] | permissive | #ifndef APP_H
#define APP_H
#include <memory>
#include <QObject>
#include <QTimer>
#include <QElapsedTimer>
#include "types.h"
#include "mainwindow.h"
#include "GSL/vector3d.h"
#include "GSL/vector2d.h"
class RenderWindow;
class EventHandler;
/** \mainpage Welcome to the Tomato Engine documentation!
* This engine ... | true |
a49c070d64154f2524cc4347eacda52580bd27d2 | C++ | ed765super/Simulation-of-an-OS | /ncogbonnafilesystemsrepository/startShell.cc | UTF-8 | 19,143 | 3.671875 | 4 | [] | no_license | #include "startShell.h"
#include "evaluate.h"
#include <iostream>
#include <fstream>
using namespace std;
//PRE:
//POST: RV = what the user typed into the terminal in
//LinkeList<MyString> form where every relevant piece of the user's
//input is broken up into nodes
LinkedList<MyString> tokenize(char* userinput){
Lin... | true |
826c83df9449c0008832b0f7f44e1ce0267fd742 | C++ | wolfjagger/coopnet | /src/coopnet/graph/mutable/reversable_graph.inl | UTF-8 | 6,068 | 2.59375 | 3 | [
"MIT"
] | permissive |
template<typename SatProp>
ReversableSatGraph<SatProp>::ReversableSatGraph(
const BaseSatGraph& original, const SatGraphTranslator& origTranslator) :
graph(graph_util::create_default_concrete_graph<SatProp>(
original, origTranslator)),
reverseStack() {
connectedComponentEntryPts
= graph_util::calculate_conn... | true |
69927371db458333220cda4b97fd9c04ada469ff | C++ | 2416390994/helloword- | /4_6.cpp | UTF-8 | 1,636 | 3.359375 | 3 | [] | no_license | #include<iostream>
#include<string>
#include<vector>
using namespace std;
/*
class Solution {
public:
vector<int> printMatrix(vector<vector<int> > matrix) {
size_t size = matrix.size();
int row = size;
int col = matrix[0].size();
int top = 0,left = 0,bottom = row - 1,right = col - 1;... | true |
035877cac827dffc41820990d0f75f58c909f62f | C++ | Shossain97/School | /Data Structures/Lab12/eecs_560_fall_2017_lab12_avl.tar/avl-lab-12/catalog.cpp | UTF-8 | 1,476 | 3.28125 | 3 | [] | no_license | #include "catalog.hpp"
#include "util.hpp"
#include <iostream>
Catalog::Catalog(){
tree=new AVL();
}
Catalog::~Catalog(){
delete tree;
}
void print(Book* aBook){
std::cout<<"id: "<<aBook->getId();
std::cout<<" name: "<<aBook->getName();
std::cout<<" count: "<<aBook->getCurrentCount();
std::cout<<" / "<<a... | true |
da3b907373e4e9d32c4b2228b2db5a4c47e2dddd | C++ | juanpablocruz/adventure_game | /adventureshire/character.cpp | UTF-8 | 2,217 | 2.640625 | 3 | [] | no_license | #include "adventureshire.h"
#include "objects.h"
void initCharacter(Character &ch, ALLEGRO_BITMAP *tile) {
ch.x = 185;
ch.y = 218;
ch.imgx = 0;
ch.imgy = 0;
ch.sizex = 32;
ch.sizey = 64;
ch.sizex2 = 70;
ch.sizey2 = 152;
ch.npc_id = 0;
ch.speed = 2;
ch.maxFrame = 7;
ch.currFrame = 0;
ch.frameCount = 0;
c... | true |
3bcf72f115998efaea9e82ea1fd37cbc7b2fce27 | C++ | srkprasad1995/files | /palindrome_2000.cpp | UTF-8 | 728 | 2.734375 | 3 | [] | no_license | #include<cstdio>
#include<iostream>
#include<cmath>
#include<cstdlib>
#include<cstring>
using namespace std;
int dp[5001][5001];
int min(int a,int b,int c)
{
return ((a<b)? (a<c?a:c) : (b<c?b:c));
}
int check(char str[],int n)
{
for(int i=0;i<n;i++)
dp[i][i] = 0;
for(int len = 2;len<=n;len++)
{
for(int i=0;... | true |
8708d43c4a1a816e5c2202db991228b075c9de79 | C++ | arthuuuur/L3_Projet_PPIL_Client_Cpp | /PPIL_v1.0/Test_Circle.cpp | UTF-8 | 230 | 2.828125 | 3 | [] | no_license | #include "Circle.h"
int main() {
Vector2D v1(3, 9);
Shape * s1 = new Circle(Color::BLUE, v1, 4.5);
cout << *s1 << endl;
cout << s1->getGravity() << endl; // (3,9)
cout << s1->getArea() << endl; // 63.62 find with geogebra
} | true |
d3a8020e46e9bc84db14d04703053b44e0895d05 | C++ | praveensonare/Leetcode | /source/239_SlidingWindowMaximum.cpp | UTF-8 | 2,015 | 3.46875 | 3 | [] | no_license | #include "Header.h"
// 239. Sliding Window Maximum
// Level - Hard
// You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.
/... | true |
9b4b8bd26945d19ef69d7ae48088f4ad1cb99544 | C++ | JacobRBlomquist/MinUnit | /example.cpp | UTF-8 | 618 | 2.71875 | 3 | [] | no_license | #include <stdio.h>
#include "minunit.h"
int tests_run = 0;
int foo = 7;
int bar = 4;
static char *test_foo()
{
mu_assert("error, foo != 7", foo == 7);
return 0;
}
static char *test_bar()
{
mu_assert("error, bar != 5", bar == 5);
return 0;
}
static char *all_tests()
{
mu_run_test(test_foo);
... | true |
87ef89009b92884965cd919fa30f67d03005c883 | C++ | Natalia9Ramirez/Poo | /Buscar.cpp | UTF-8 | 760 | 3.046875 | 3 | [] | no_license | #include <conio.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
class buscarCar{
private:
string datos;
string car;
public:
buscarCar(string datos, string car){
this->car= car;
this->datos=datos;
}
... | true |
e5238e1810b154a04f04b9a86c2e338a107e7041 | C++ | gxmc/book-Generative_Programming | /GMCL/dictionaries.h | ISO-8859-1 | 10,758 | 2.5625 | 3 | [] | no_license | /******************************************************************************/
/* */
/* Generative Matrix Package - File "Dictionaries.h" */
/* ... | true |
169bb73d80bfd77e579d09ae5d73d44368e6ebbd | C++ | takapamu/-playing-cards-game | /playing card game/playing_card_game.cc | UTF-8 | 1,368 | 3.46875 | 3 | [] | no_license | #include<iostream> //標準出力
#include<random> //乱数生成
#define DECK 52
#define MIN_DECK 1
#define MAX_DECK 10
class Deck_Pcard
{
private:
int deck_num; //デッキ数
int card_num; //カード枚数
int *deck; //格納配列
int *p_deck;//配列戦闘ポインタ
public:
Deck_Pcard(int input_deck_num = MIN_DECK)
{
if(input_deck_num <... | true |
e23ebfa70daa492fae9144c4057f301fd20cd87f | C++ | MohamedKharaev/UCI | /ICS 45C/hw/hw2/coins_main.cpp | UTF-8 | 908 | 3.28125 | 3 | [] | no_license | #include <iostream>
using namespace std;
#include "Coins.h"
int main()
{
Coins pocket(5, 3, 6, 8);
Coins piggyBank(50, 50, 50, 50);
cout << "I have " << pocket << " in my pocket." << endl;
pocket = pocket.extract_exact_change( coins_required_for_cents( 68 ) );
cout << "I bought chips for 68 cents and now I hav... | true |
252a2b4f904b997e149f5fc0345c89cc89f3765c | C++ | EtBLh/hw_dungeon | /src/util.hpp | UTF-8 | 2,130 | 2.859375 | 3 | [] | no_license | #ifndef UTIL_H
#define UTIL_H
#include <nlohmann/json.hpp>
#include <fstream>
#include <streambuf>
#include <cstring>
#include <functional>
#include "const.h"
#include <cmath>
using namespace nlohmann;
using namespace std;
namespace Dungeon{
typedef struct _vector_d
{
float x = 0, y = 0;
_vect... | true |
4aaebca155473e78a87f367b4467d7d664b2e2f5 | C++ | zhangmneg/zhangmeng | /作业/6-20/main.cpp | GB18030 | 227 | 2.640625 | 3 | [] | no_license | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
cout<<"һ";
int x=0;
int y=0;
cin>>x>>y;
if(fmod(y,x)==0)
cout<<"ture";
else
cout<<"false";
}
| true |
060f439087ac333163c45ae97163e03014e87a07 | C++ | CMMayer/Toolkit-for-Ring-LWE-v1.0 | /include/Efficient DFT.h | UTF-8 | 3,339 | 2.65625 | 3 | [] | no_license | #pragma once
#ifndef EDFT_H
#define EDFT_H
#include <complex>
#include <vector>
#include "Data_Type_Settings.h"
typedef std::complex<real_type> complex_type;
typedef std::vector<complex_type> complex_vec;
namespace RLWE_Toolkit {
namespace DFT {
/*
Cooley-Tukey FFT for power of two input.size() = N = 2^k.
... | true |
ca263714c4cceac7c849f47c7911da3bb1a78d21 | C++ | nisiscau/Object-Oriented-Programming-C- | /C++ Object Oriented Programming/W2/puzzle.cpp | UTF-8 | 380 | 3.296875 | 3 | [] | no_license | #include <iostream>
int main() {
using std::cout,std::endl;
/* code */
int num = 7;
cout<<"num: "<<num<<endl;
cout<<"&num: "<<&num<<endl;
int *p = #
cout<<"p: "<<p<<endl;
cout<<"*p: "<<*p<<endl;
cout<<"&p: "<<&p<<endl;
*p = 42;
cout<<"*p changed to 42"<<... | true |
15d56fee3d4a0627d16a8bc8e2a3ca68baadf4d9 | C++ | elaxcc/Formulas | /Formulas/Errors.cpp | UTF-8 | 557 | 2.53125 | 3 | [] | no_license | #include "stdafx.h"
#include "Errors.h"
namespace Formula
{
const std::string ErrorList::c_err_invalid_operator_ = "Error A1: Unknown operator ";
ErrorList::ErrorList()
{
}
ErrorList::~ErrorList()
{
errors_.clear();
}
void ErrorList::add(const std::string& err, unsigned line, unsigned column)
{
error... | true |
79586c628abc8625510d27d3e63ddca9a9c58003 | C++ | jordanbonaldi/Nanotekspice | /src/Component/Clock.cpp | UTF-8 | 813 | 3.09375 | 3 | [] | no_license | /*
** EPITECH PROJECT, 2018
** Clock
** File description:
** Implementation of Clock
*/
#include "Clock.hpp"
Clock::Clock(const std::string &s) : AComponent(s, 1, "clock")
{
}
nts::Tristate Clock::compute(std::size_t pin)
{
if (pin - 1 > 0)
throw nts::PinUnknown("error");
return this->value;
}
void Clock::setLi... | true |
5cc88a9a0f3ffb30acbf9cadd5b77e40ac8157e9 | C++ | alvinalvord/CPL | /codeforces/div3/494/A/a.cpp | UTF-8 | 351 | 2.890625 | 3 | [] | no_license | #include <iostream>
#include <cstdio>
int
main ()
{
int arr[101];
for (int i = 0; i < 101; i++)
arr[i] = 0;
int n, temp;
scanf ("%d", &n);
for (int i = 0; i < n; i++) {
scanf ("%d", &temp);
arr[temp] ++;
}
int max = 1;
for (int i = 0; i < 101; i++)
if (arr[i] > max)
max = arr[i];
prin... | true |
ce2a916d31c35b31163f8c5d565f9da437f058eb | C++ | Hitoshy/Maratona-de-Programacao | /URI-Exercicios/1020/1020.cpp | UTF-8 | 237 | 2.6875 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, ano, mes, dia;
scanf("%d", &n);
ano = n/365;
mes = (n-ano*365)/30;
dia = n-ano*365-mes*30;
printf("%d ano(s)\n%d mes(es)\n%d dia(s)\n", ano, mes, dia);
return 0;
} | true |
f29cc4440c812a93073d672083832bd1146a2d76 | C++ | mir-group/flare | /src/flare_pp/descriptors/wigner3j.cpp | UTF-8 | 87,017 | 2.5625 | 3 | [
"MIT"
] | permissive | #include "wigner3j.h"
#include <iostream>
// See compute_wigner.py for the calculation of these coefficients.
Eigen::VectorXd compute_coeffs(int lmax) {
Eigen::VectorXd wigner3j_coeffs = Eigen::VectorXd::Zero(pow((lmax + 1), 6));
if (lmax == 0) {
wigner3j_coeffs(0) = 1;
} else if (lmax == 1) {
wigner3j_c... | true |
de85d86f6be38c674d2d76574d570a492c953754 | C++ | yuriyoung/xbattle | /src/actor/Actor.h | UTF-8 | 859 | 2.65625 | 3 | [] | no_license | /**
* @date 2017
* @filename Actor.h
* @class Actor
* @author Yuri Young<yuri.young@qq.com>
* @qq 12319597
* Copyright (c) 2017 Yuri Young, All rights reserved.
* @description Project created by QtCreator.
*/
#ifndef ACTOR_H
#define ACTOR_H
#include <cocos2d.h>
#include "ActorBreed.h"
class... | true |
2aa65a898e142484a3c2b01691fef2dbe5338300 | C++ | uchile-robotics-graveyard/code_graveyard | /bender_vision/src/nite/src/tracking/laser_tracker/PersonTracker.cpp | UTF-8 | 18,193 | 2.859375 | 3 | [] | no_license | #include "tracking/laser_tracker/PersonTracker.h"
#include <algorithm>ersonTracker::PersonTracker(int numData, float resolution) : numData(numData),resolution(resolution)
{
cycles = 0;
state = ST_CALIBRATING;
trackedIndex = -1;
//scheduled = false;
}
PersonTracker::~PersonTracker(void)
{
}
void PersonTracker::pro... | true |
9bfd4d83271836b39d2b033b0a970b5e84373538 | C++ | gky360/contests | /atcoder/past202012-open/e/Main.cpp | UTF-8 | 1,231 | 2.640625 | 3 | [] | no_license | /*
[past202012-open] E - Stamp
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double DD;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(c) (c).begin(), (c).end()
const int MAX_H ... | true |
c4ee11b06668fa80c07ff5d55ada9480d7f08257 | C++ | maedhros777/opengl-game | /source/Mesh.h | UTF-8 | 751 | 2.75 | 3 | [] | no_license | #ifndef MESH_H
#define MESH_H
#include "Animation.h"
const int MAX_INFLUENCES = 4;
const int SKEL_NAME_MAX_LEN = 32;
const float WEIGHT_OFFSET = 0.00001;
struct Vertex
{
float x, y, z, anim_x, anim_y, anim_z;
unsigned int boneIDs[MAX_INFLUENCES];
float weights[MAX_INFLUENCES];
};
struct Face
{
unsigned int v1, ... | true |
9605d74322f11037820764087adcaec8cfa9d685 | C++ | zhucebuliaopx/algorithm009-class02 | /Week_08/practice/190.颠倒二进制位.cpp | UTF-8 | 371 | 2.828125 | 3 | [] | no_license | /*
* @lc app=leetcode.cn id=190 lang=cpp
*
* [190] 颠倒二进制位
*/
// @lc code=start
class Solution {
public:
uint32_t reverseBits(uint32_t n) {
uint32_t ans = 0;
uint32_t MASK = 1;
for (int i=0;i<32;i++){
if (n & MASK) ans |= 1 << (31-i);
MASK <<= 1;
}
... | true |
715c8da5a87564746b5dd712e1042bff1e0d0b8c | C++ | t-highfill/cs430 | /geom.h | UTF-8 | 1,248 | 3.3125 | 3 | [] | no_license |
#ifndef __GEOM_H__
#define __GEOM_H__
#include <ostream>
#include <vector>
#include "linear.h"
template<class T>
class Point2D : public Matrix<T, 2, 1>
{
public:
Point2D() {
}
Point2D(const T x, const T y){
setX(x);
setY(y);
}
Point2D(const Point2D<T>& copy) : Point2D(){
setX(copy.getX());
... | true |
8775d1fc802d278aae044f548370ce21dd41b44e | C++ | rwarnking/pointy | /source/instance_generator.cpp | UTF-8 | 3,207 | 3.265625 | 3 | [
"MIT"
] | permissive | #include "../header/instance_generator.h"
#include "../header/logger.h"
using namespace std;
using namespace logger;
int main(int argc, char **argv)
{
if (argc == 3)
{
try
{
int points = stoi(argv[2]);
GenerateInstance(argv[1], points);
}
catch(...)
... | true |
1d3700226a9690480a8f6145dd453051225541fd | C++ | kirtivr/leetcode | /Leetcode/1115.cc | UTF-8 | 1,948 | 3.5 | 4 | [] | no_license | #include <functional>
#include <chrono>
#include <thread>
#include <iostream>
#include <deque>
#include <mutex>
#include <vector>
class FooBar {
public:
FooBar(int n) {
this->n = n;
}
void foo(std::function<void()> printFoo) {
for (int i = 0; i < n; i++) {
{
... | true |
34be8c9611479ed2ddeb713a4456691c4d55c27e | C++ | GuessEver/ACMICPCSolutions | /UESTC/1077/B.cpp | UTF-8 | 1,215 | 2.734375 | 3 | [] | no_license | #include <cstdio>
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
int n, m;
char cap[100][100];
int sx, sy, sk;
bool found;
void dfs(int x, int y, int dir)
{
if(found) return;
if(cap[x][y] == 'x')
{
cap[x][y] = '&';
found = 1;
return;
}
int nx = x + dx[dir], ny = y + dy[dir], ndir = dir;
... | true |
de5262a44400ad593a61379bd83d309597435ab4 | C++ | milkymay/algo_labs | /H.cpp | UTF-8 | 1,694 | 2.53125 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int const inf = 1e9 + 7;
vector<int> used, used1, ord, comp;
int n, l, r, cnt, col;
vector<vector<pair<int, int>>> g, h;
int max_color;
void dfs1(int v, int d) {
used[v] = 1;
cnt++;
for (auto to : g[v]) {
int u = to.first;
int w = to.second;
... | true |
d6d6a4a4f446afe0a4414f7e2b21f2aee66d3897 | C++ | davisking/dlib | /dlib/geometry/border_enumerator.h | UTF-8 | 5,032 | 2.8125 | 3 | [
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | // Copyright (C) 2011 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_BORDER_EnUMERATOR_H_
#define DLIB_BORDER_EnUMERATOR_H_
#include "border_enumerator_abstract.h"
#include "rectangle.h"
namespace dlib
{
// -------------------------------------... | true |
2d1dfff9e4fb83185d808f69f08ae2d1b60217fd | C++ | ciscoruiz/dns_server | /include/dns.server.functions.h | UTF-8 | 10,145 | 3.203125 | 3 | [] | no_license | #ifndef _dns_server_functions_h
#define _dns_server_functions_h
#include <stdlib.h>
#include <string>
#include <dns.server.defines.h>
#include <dns.server.Exception.h>
#include <time.h>
#include <sys/time.h>
namespace dns {
namespace server {
class DataBlock;
/**
functions - Métodos básicos de conversión de ... | true |
597643c2f5962d77ca9489ed5ccd69ff6e9d711f | C++ | ijh165/StreamlinedGradingSystem | /src/Model/CLASSES/account.cpp | UTF-8 | 8,685 | 2.71875 | 3 | [] | no_license | /************************************
*
* File Name: account.cpp
* Purpose : This class handles account model and account related action (when user is logged in)
*
* Authors:
* ihoo
* rca71
* cyrusc
* jhoi
* ftran
*
* Revision: 1.0
*
***********************************/
#include... | true |
71a5c979a0c2efaef591fffe85e6ddfbcf169e44 | C++ | rajibkumardas/vor | /vor-arduino/vor_led.cpp | UTF-8 | 357 | 2.796875 | 3 | [
"MIT"
] | permissive | /*
Arduino on-board LED actuator for testing.
*/
#include "vor_led.h"
VorLed::VorLed() :
VorActuator(LED_PIN, DIGITAL_OUTPUT) {
turnOff();
}
void VorLed::turnOn() {
VorActuator::write(HIGH);
_on = true;
}
void VorLed::turnOff() {
VorActuator::write(LOW);
_on = false;
}
void VorLed::toggle()... | true |
a973f5704f45ab4ef44fd336213ba73948ceb86f | C++ | kaiwang19/Data_Structures_and_Algorithms | /arrays/array.cpp | UTF-8 | 487 | 3.46875 | 3 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
using std::string;
int main()
{
int myNum[3] = {10, 20, 30};
string myArray[4];
string cars[4] = {"Volvo", "BMW", "Ford", "Mazda"};
for (int i = 0; i < 4; i++)
{
cout << cars[i] << "\n";
}
string myCars[] = {"Volvo", "B... | true |
2aaa606a403859edbdb69001874318d8cba2fa46 | C++ | seleznevaksenia/algorithms | /lab_05.cpp | WINDOWS-1251 | 596 | 2.625 | 3 | [] | no_license | /*6. n: */
#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
void main()
{
int i, m, n;
cout << "i=";
cin >> i;
cout << "\n";
for (n = 1; n <= i; n++) {
for (m = 1; m <= i; m++) {
if (m >= 10 && n >= 10 || n<10)
cout << "1/" << m << "!^" << n << " ";
if (m < 10 && n >= 10... | true |
b0894de9cf31184144e86e4339c598f71b6a3bf8 | C++ | 0xflotus/Acid | /Sources/Scenes/ISpatialStructure.hpp | UTF-8 | 3,419 | 3.03125 | 3 | [
"MIT"
] | permissive | #pragma once
#include <memory>
#include <vector>
#include "Physics/Frustum.hpp"
namespace acid
{
class GameObject;
class IComponent;
class Collider;
/// <summary>
/// A data structure that stores objects with a notion of space.
/// </summary>
class ACID_EXPORT ISpatialStructure
{
public:
/// <summary>
... | true |
1350e9d45e393894918da18a36f0083aa79b858a | C++ | octavianpetru/rfio | /rfio.cpp | UTF-8 | 3,705 | 2.828125 | 3 | [] | no_license | #include "rfio.h"
#include <cstdio>
#include "RCSwitch.h"
#include "wiringPi.h"
unsigned long before;
unsigned int indexReceive = 0;
RCSwitch mySwitch = RCSwitch();
int main(int argc, char **argv) {
// setup wiringPi
if (wiringPiSetup() == -1) {
return -1;
}
// TX_POWER_PIN
pinMode(TX_POWER_PIN, OUTPUT... | true |
5195580d62ad788e979a5d0c31cd80639b1ffdc0 | C++ | HOSHICHEN7267/1092CP2 | /homework/bus.cpp | UTF-8 | 1,715 | 2.84375 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
using namespace std;
int main(){
int start = 0, target = 0;
int busnum = 0;
int stopnum = 0;
unordered_map< int, vector<int> > stops;
vector< vector<int> > route;
queue<int> bfs;
int ans = 0;
cin >> start... | true |
d877c0a2bdc3ab5d4275f8672a797146b255e4f1 | C++ | PraiseHelix/PocketAnimals | /LevelOpenWorldPocketAnimals.hpp | UTF-8 | 742 | 2.5625 | 3 | [
"MIT"
] | permissive | #pragma once
#include "..\SGPE\Level.hpp"
#include "GraphicsSFMLGrid.hpp"
class LevelOpenWorldPocketAnimals : public Level
{
private:
std::vector<GameObject*> gameObjects;
std::shared_ptr<GraphicsSFMLGrid> graphics;
public:
LevelOpenWorldPocketAnimals(std::vector<GameObject*> gameObjects, std::shared_ptr<GraphicsS... | true |
0772fd78926580822157ed358be8bd6d1d2ed302 | C++ | meteorsnows/QuickCut | /src/QuickCutShared/Action.h | UTF-8 | 1,608 | 2.828125 | 3 | [
"MIT"
] | permissive |
#pragma once
#include <string>
enum eActionType { ActionKeyMap = 0x00, ActionAppStart = 0x01, ActionUnknown = 0xFF };
class Action
{
public:
Action();
Action(std::string name, const eActionType & type,
std::string srcKey, std::string dstKey,
std::string appPath, std::string appArgs);
... | true |
4f0e22f481aca922dad8fc23dbabe6277d0dea26 | C++ | csheare/2D | /bb/lists.cpp | UTF-8 | 399 | 2.75 | 3 | [] | no_license | #include<iostream>
#include<cstring>
#include<list>
#include<map>
#include<vector>
int main(){
std::map<std::string,int> map;
std::list<int> list;
map["A"] = 1;
std::vector<int> vec;
vec.reserve(2);
std::vector<int> vec2(2);
std::cout<< vec.capacity() <<std::endl;
std::cout<< vec2.capacity() <<std::endl;
std::cou... | true |
a03cecc3be708ab09aaf95df59ff4deef62d6e4e | C++ | fanfeilong/dcel | /src/stlpache.string.h | UTF-8 | 3,331 | 3.21875 | 3 | [
"MIT"
] | permissive | #ifndef DCEL_STLPACHE_STRING_H
#define DCEL_STLPACHE_STRING_H
#include <string>
#include <iterator>
#include <sstream>
using namespace std;
namespace stlpache
{
inline string& left_trim(string &ss)
{
string::iterator p=find_if(ss.begin(),ss.end(),not1(ptr_fun(isspace)));
ss.erase(ss.begin(),p); ... | true |
f8d14aa143994f6efa385ea70ff227bd9235d683 | C++ | qfu/LeetCode_1 | /M_3_Longest_Substring_Without_Repeating_Characters.cpp | UTF-8 | 1,509 | 3.203125 | 3 | [] | no_license | #include <unordered_map>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
int lengthOfLongestSubstring(string s) {
int size = s.size();
if(!size) return 0;
vector<int> dp(size,0);
unordered_map<char,int> map;
int p = 1;
... | true |
0e2f3fb044c9dd0b52d3700ab527a3a8c86c28be | C++ | youkuxiaobin/algorithm | /quick/main.cpp | UTF-8 | 1,499 | 3.328125 | 3 | [] | no_license | /*
* =====================================================================================
*
* Filename: main.cpp
*
* Description: 快排函数
*
* Version: 1.0
* Created: 2015年03月01日 19时37分06秒
* Revision: none
* Compiler: gcc
*
* Author: liyankun (), liyankun@baidu... | true |
e342fc32433068e70abbdcd0ce0c59871d8c6c87 | C++ | Yoriyakd/SnowFight | /就職作品/UI/TimePenaltyUI.cpp | SHIFT_JIS | 2,383 | 2.734375 | 3 | [] | no_license | #include "TimePenaltyUI.h"
#include"../DirectX/Sprite.h"
TimePenaltyUI::TimePenaltyUI(int _MinusTime) : effectDisplayFlag(-1), flashIntervalCnt(0) , penaltyTime_s(_MinusTime), displayTime_frame(90)
{
minusTex = GetResource.GetTexture(TimePenalty_Tex);
numberTex = GetResource.GetTexture(TimeNumber_Tex);
effectTex = ... | true |
2019ff9f95a0223e49c0cc6d55872fafaf67c973 | C++ | AJaySi/Arduino-HCSR04 | /multi_hcrs04.ino | UTF-8 | 3,680 | 2.8125 | 3 | [] | no_license | #include <NewPing.h>
/*
The NewPing library written by Tim Eckel provides :
1. Works with many ultrasonic sensor models: SR04, SRF05, SRF06, DYP-ME007 & Parallax PING
2. Doesn't lag for a full second if no ping echo is received like all other ultrasonic libraries
3. Ping sensors consistently and reliably at up... | true |
20f6f1bae24fd20090cc5d4fafe0b6b0178de6bb | C++ | colinporth/gpio | /sharp/sharpLcdTest.cpp | UTF-8 | 5,042 | 2.859375 | 3 | [] | no_license | #include "cSharpLcd.h"
#include <unistd.h>
#include <cstdio>
#include <cmath>
using namespace std;
int main() {
bool toggle = true;
int numRepetitions = 4;
cSharpLcd sharpLcd;
int lcdWidth = sharpLcd.getDisplayWidth();
int lcdHeight = sharpLcd.getDisplayHeight();
sharpLcd.clearDisplay();
while(1) {... | true |
abd9ab954231a6a7aad11782e04e9ceae586e04a | C++ | XI-E/LHospital | /UI/test.cpp | UTF-8 | 5,815 | 3 | 3 | [] | no_license | //No need to use ui::init() explicitly
#include "ui/ui.hpp"
#include "ui/test.hpp"
void test_weird_error()
{
int shit = 14;
box menu2(coord(2, 4), 40, 10 );
menu2 << "Enter your shit: ";
menu2 >> shit;
menu2.setexit_button("Submit my shit");
menu2.loop();
menu2.clear();
menu2 << "Your shit's c... | true |
054b08f334a65ba3e2c8bd60dcb9ab40c4b89e11 | C++ | roshanajicherian/Coding-Challenges | /CodeChef/January Long 2019/Breaking Bricks.cpp | UTF-8 | 1,110 | 2.65625 | 3 | [] | no_license | #include <iostream>
using namespace std;
int countnot(int A[])
{ int zer=0;
for(int i=0;i<3;i++)
{
if(A[i]!=0)
zer++;
}
return zer;
}
int main()
{
int t=0;
cin>>t;
while(t--)
{
int s=0,inisum=0;
cin>>s;
int A[3];
for(int i=0;i<3;i++)
{
... | true |
0384f746c425c8caa617ff691178ee9f12e2ac2c | C++ | Yeeunbb/Lecture_Algorithm | /algo3/main3.cpp | UHC | 3,019 | 3.671875 | 4 | [] | no_license | #include <iostream>
#include <iomanip>
using namespace std;
struct People{ //մ ü
int Arrive_time; // ð
int Consult_time; //˻ ð
int Real_Arrive; // ð
int End_Time; //˻簡 ð
};
void arrayToHeap(People arr[], int n); //迭 Լ
void rebuildHeap(People arr[], int root, int n); //ּ Լ
int main(){
int k, n; //ɻ ... | true |
4ca32ab8dd4509260163a2ec60945dc449e09bfc | C++ | oykukapcak/oykukapcak_termproject_3 | /Source.cpp | UTF-8 | 6,683 | 2.71875 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <pthread.h>
#include <semaphore.h>
#include <Windows.h>
#include <fstream>
#include "Memory.h"
#include "CPU.h"
#include "Assembler.cpp"
#include "ProcessImage.h"
#include "ProcessInfo.h"
#include "BoundedBuffer.h"
#include "LinkedList.h"
using namespace std... | true |
547189e272bbdfdbcce57738dbe9954cc8302ed5 | C++ | twentylemon/euchre | /euchre/Hybrid2Player.h | UTF-8 | 729 | 2.609375 | 3 | [] | no_license |
#pragma once
#include "HybridPlayer.h"
class Hybrid2Player : public HybridPlayer
{
public:
Hybrid2Player();
Hybrid2Player(double threshold);
Hybrid2Player(std::string name);
Hybrid2Player(std::string name, double threshold);
const static double DEFAULT_THRESHOLD;
/*
virtual std::pa... | true |
a06edd4ded77018c369eb576185c6b2b4098a3a2 | C++ | jakewandro/WandroJake_SummerClass | /HW/Assignment 4/Gaddis_7thEd_Chap5_Prob5_MembershipFee/main.cpp | UTF-8 | 834 | 3.375 | 3 | [] | no_license | /*
* File: main.cpp
* Author: Jake T Wandro
* Created on July 7, 2016, 9:37 PM
* Purpose: Membership Fees Increase
*/
//System Libraries
#include <iostream> //Input/Output Stream Library
using namespace std; //iostream uses the strand namespace
//user libraries
//Global Constants
//Function Prototypes
//Ex... | true |
8a0c2b5e7c1bef51c4a2ff7aafa72cbf84770ce3 | C++ | indkumar8999/DSAlgo-Preparation | /disjoint-sets.cpp | UTF-8 | 1,188 | 3.234375 | 3 | [
"MIT"
] | permissive |
#include <bits/stdc++.h>
using namespace std;
int root(int parent[], int x){
while(x != parent[x]){
parent[x] = parent[parent[x]];
x = parent[x];
}
return x;
}
void union_1(int parent[], int rank[], int x, int y){
int r_x = root(parent, x);
int r_y = root(parent, y);
if(r_x ==... | true |
b4b525a3fbd9eece5f58bc47e01a2ebf21d8da8e | C++ | tomhrr/dale | /src/dale/TypeMap/TypeMap.cpp | UTF-8 | 666 | 2.765625 | 3 | [
"LicenseRef-scancode-unknown-license-reference"
] | permissive | #include "TypeMap.h"
#include <cstdio>
#include <cstring>
#include <map>
#include <string>
#include <utility>
#include "../STL/STL.h"
#include "../Utils/Utils.h"
namespace dale {
std::map<std::string, std::string> dale_typemap;
bool addTypeMapEntry(const char *from, const char *to) {
dale_typemap.insert(std::pa... | true |
9beea40d801fff081fc05092c4f5ccc37c26d60d | C++ | bigplik/Arduino_mac | /ESP8266/Blynk/sensor_read_float_value/sensor_read_float_value.ino | UTF-8 | 2,596 | 2.703125 | 3 | [] | no_license | /**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tuto... | true |
98cc279640f3f2781a7df28a939dad0f1bea6a31 | C++ | levuoj/arcade | /includes/State.hpp | UTF-8 | 1,394 | 2.734375 | 3 | [] | no_license | //
// State.hpp for arcade in /home/zawadi_p/rendu/CPP/cpp_arcade/header
//
// Made by Pierre Zawadil
// Login <pierre.zawadil@epitech.eu>
//
// Started on Thu Mar 23 15:35:22 2017 Pierre Zawadil
// Last update Sun Apr 9 13:15:45 2017 thomas vigier
//
#ifndef STATE_HPP
# define STATE_HPP
#include <unordered_map>
... | true |
70473b1d6b7e38edce87f82269cdb00631d81c6c | C++ | IndieLightAndMagic/sorter-hexa-bassoon | /merge/merge.h | UTF-8 | 2,341 | 3.28125 | 3 | [] | no_license | #ifndef __MERGE_H__
#define __MERGE_H__
#include <iostream>
#include <vector>
#include <sort/sort.h>
template <typename T>
class MergeSorter : public Sorter<T> {
unsigned int m_pivotalIndex = 0;
void PrintPartitions(const std::vector<T>& u, unsigned int pivotIndex, unsigned int depth = 0) {
while (de... | true |
98ca4b073f35beea654080283a84ce91e84572bb | C++ | RuslanShugaipov/Lab_2-4-term | /Shannon-Fano/Shannon-Fano/Encode_N_Decode.h | UTF-8 | 5,718 | 3.234375 | 3 | [] | no_license | #pragma once
#include <iostream>
#include "LinkedList.h"
#include "RB-TREE(DEF).h"
#include <string>
#include <iomanip>
using namespace std;
//a template function that sorts two arrays at once
template<class ARRAY_TYPE_1, class ARRAY_TYPE_2>
void Bubble_Sort(ARRAY_TYPE_1* array_1, ARRAY_TYPE_2* array_2, in... | true |
af15fd7305fc9a587836997f9821744236c7fb66 | C++ | AThilenius/thilenius | /base/regex.cc | UTF-8 | 1,231 | 2.53125 | 3 | [] | no_license | // Copyright 2015 Alec Thilenius
// All rights reserved.
#include "base/regex.h"
#include <boost/regex.hpp>
namespace thilenius {
namespace base {
ValueOf<std::string> Regex::FindFirstMatch(const std::string& content,
const std::string& regex) {
std::vector<std::string> ... | true |
2ca6ea38296e42394f1054caf86063c72eb6931c | C++ | PedchenkoL/Cpp_OOP | /Однорукий бандит.cpp | UTF-8 | 2,587 | 3.015625 | 3 | [] | no_license | #include <cstdlib>
#include <Time.h>
#include <iostream>
#include <fstream>
#include <string>
#include <conio.h>
#include <queue>
#include <windows.h>
using namespace std;
class Line {
public:
int val_1;
int val_2;
int val_3;
int changeValue, changeValue_2, changeValue_3, changeValue_4;
void R... | true |
97309f791e215f5ecf859907dcd0ca0aac31d419 | C++ | Saurav-Paul/Codeforces-Problem-Solution-By-Saurav-Paul | /C - Labs .cpp | UTF-8 | 672 | 2.90625 | 3 | [] | no_license | /*Saurav Paul*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n ; scanf("%d",&n) ;
vector< vector<int > > grid(n,vector<int> (n));
int temp = n ;
bool ok = true ;
int x = 1;
int y = 0 ;
while(temp --){
if(ok)
for(int i = 0 ; i < n ; i++){
... | true |
d5d02cbcb90943ba40422826a735c0e0fc20b9a3 | C++ | nowhh01/designPatterns | /structural/adapter.cpp | UTF-8 | 2,348 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | #include <iostream>
#include <memory>
#include <string>
class LightningPhone
{
public:
virtual void Recharge() = 0;
virtual void UseLightning() = 0;
virtual void Display() = 0;
};
class MicroUsbPhone
{
public:
virtual void Recharge() = 0;
virtual void UseMicroUsb() = 0;
virtual void Display() = 0;
};
class Iph... | true |
03352c0227e4391fa439b1f5317df9a16c15f1dc | C++ | jtlai0921/PG20048_example | /ch03/to_number.cpp | GB18030 | 427 | 2.84375 | 3 | [] | no_license | //To_Number.cpp
#include <iostream.h>
#include <conio.h>
void main()
{ int i,number,n;
char ch;
cout <<"J5ӼƦrr('0'..'9'):";
for (i=0,number=0;i<5;i++)
{ cin >> ch; //Ūr
n = ch - '0'; //ରƦr'1'=>1
number = number * 10 + n; //ରƭ
}
cout <<"ƭȬ:"
<< number << endl;
cout <<"ƼƭȬ:"
... | true |
9570eee31e8662048865355ba67e07463e806cbe | C++ | kmjp/procon | /leetcode/251-300/270/2096.cpp | UTF-8 | 1,501 | 2.640625 | 3 | [] | no_license | typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MI... | true |
479fbda203f76704c8552433eb99b4ed24d7b846 | C++ | sid1980/ChessGame_OSG | /ZGK_OSG/Board.cpp | UTF-8 | 6,048 | 2.75 | 3 | [] | no_license | #include "Board.h"
#include <iostream>
#include "Figures.h"
#include <iomanip>
#include "Colours.h"
#include <osg/Group>
#include <osg/ShapeDrawable>
#include <osg/MatrixTransform>
#include <osg/Geode>
#include <osg/ref_ptr>
using namespace std;
using namespace osg;
Board::BoardField::BoardField(Colours colour) {
... | true |
32ceb9ed832c237d7535fb43a07ddae143f29c68 | C++ | Lcoderfit/Introduction-to-algotithms | /Chapter 4-FindMaximumSubarray/4-1.FindMaximumSubarry.cpp | UTF-8 | 2,302 | 3.25 | 3 | [
"MIT"
] | permissive | #include<iostream>
#include<vector>
#include<tuple>
#include<iomanip>
using namespace std;
class Solution{
public:
const int MIN_INT=-0x7ffffffe;
typedef tuple<int,int,int> TupleType;
//求跨分隔点的最大子数组
TupleType findMaxCrossingSubarray(vector<int>&a, int low, int mid, int high)
{
int leftsum=... | true |
5b3ebcef8e9a28e24ef221dde6ddf780a9527961 | C++ | ahmedsalemas/Problem-solving | /A. Vitya in the Countryside/main.cpp | UTF-8 | 616 | 2.84375 | 3 | [] | no_license | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,x;
cin>>n;
vector<int>v1;
for(int i=0;i<n;i++){
cin>>x;
v1.push_back(x);
}
if(v1.back()==15){
cout<<"DOWN"<<endl;
}
else if(v1.back()==0){
cout<<"UP"<<endl;
}
else if(v1.size()==1 && ... | true |
b66adbcb97a30f326999b32495d05738860c69a8 | C++ | andry-dervy/less_03 | /src/less_03.cpp | UTF-8 | 1,123 | 3.5625 | 4 | [] | no_license | //============================================================================
// Name : less_03.cpp
// Author : andry antonenko
// IDE : Eclipse IDE
// Copyright : Your copyright notice
// Description : Simple Numbers in C++, Ansi-style
//==========================================================... | true |
d6df55343d6ed88d7c7461643b4a585bc5ab6924 | C++ | ZdravkoHvarlingov/binary-huffman-codding | /HuffmanCoding.h | UTF-8 | 876 | 2.8125 | 3 | [] | no_license | #pragma once
#include <string>
#include <map>
#define TABLE_SIZE 256
class HuffmanCoding
{
public:
HuffmanCoding();
void Encode(const char*, const char*, const char*);
void Decode(const char*, const char*, const char*);
struct TreeNode
{
unsigned long long weight;
char symbol;
TreeNode ... | true |
72a54fedabd71883c6ba0a7bfc196c4a47a4a0ff | C++ | sak9188/SoftRendering | /Softrendering/Base/Canvas.h | GB18030 | 1,420 | 2.53125 | 3 | [
"MIT"
] | permissive | #pragma once
#include "SFRSetting.h"
#include <glm\glm.hpp>
#include <graphics.h>
namespace SFR
{
class Canvas
{
SINGLETON(Canvas)
public:
void Init(glm::vec2 size);
void Init(int width, int height);
void Init(float width, float height);
// Ⱦ
// void SetRenderFunc(func*);
// void RenderLoop();
// v... | true |