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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
10059c3da381866a71882a3dcc9cd962bf96820f | C++ | DVDVideoSoft/free3dphotomaker | /Free3DPhotoMaker/Components/3DAnaglyph/src/3dmakeanaglyph.cpp | WINDOWS-1251 | 17,587 | 2.546875 | 3 | [] | no_license | #include "_3DAnaglyph.h"
double cnMaxSize = 8192;
const double cnMaxSparse = 800*600;
const int cnMaxShift = 50;
const int cShift = 20;
#define _SAFE_RELEASE_(v) if (v) cvReleaseImage(&v);
/*
[pDst] [pSrc].
.
:
IPL_DEPTH_8U,
.
IPL_DEPTH_8U
, .
NOERROR ... | true |
af8b5a706b9d53e584b21c9373b09c00ffedd979 | C++ | MughalUsama/Object-Oriented-Programming | /Lab 3 Mor+Eve/Project1/Project1/Source.cpp | UTF-8 | 1,844 | 3.578125 | 4 | [] | no_license | #include <iostream>
using namespace std;
class Information
{
private:
char name[50];
char address[50];
int age;
long int phNo;
public:
void setName(char * enteredName);
void setAddress(char * enteredAddress);
void setAge(int enteredAge);
void setPhNo(long int phoneNo);
char* getName();
char * getAddress();
... | true |
e3e875af8bf1c8b6ecbb1a591cbf972266b530c3 | C++ | jackthgu/K-AR_HYU_Deform_Simulation | /src/taesooLib/BaseLib/utility/TArray.h | UTF-8 | 12,045 | 3.078125 | 3 | [
"MIT"
] | permissive | #ifndef _TARRAY_H_
#define _TARRAY_H_
#if _MSC_VER>1000
#pragma once
#endif
#include "stdtemplate.h"
#if _MSC_VER > 1000
#pragma warning (disable: 4786)
#endif
#include "stdlib.h"
// factory 를 어떤거를 쓰는가에 따라 메모리 관리 방식이 달라진다. 메모리 관리는 스스로 책임지기 바람.
// deprecated. std::vector<boost::shared_ptr<...>> 조합 또는 TVector를 사용할 것... | true |
4fecc4c9a5d50e88728547302d3266c6c991b59f | C++ | eduhirt/CG | /t1/SCV 4.2.2 CodeBlocks/include/SCV/Mathematic.h | UTF-8 | 2,171 | 3.28125 | 3 | [
"BSD-2-Clause"
] | permissive | /*!
\file Mathematic.h
\brief Basic operations of mathematics.
\author SCV Team
*/
#ifndef __SCV_MATHEMATICS_H__
#define __SCV_MATHEMATICS_H__
#ifndef DOXYGEN_SKIP_THIS
#include "Point.h"
#endif // DOXYGEN_SKIP_THIS
namespace scv {
/*! Mathematic functions
* \ingroup util
*/
namespace math {
/*!
... | true |
bd7bb2ca94d20826e46e584ab0f8e00c11892fbf | C++ | zwondd/Algorithm | /codility/lesson/5_CountDiv.cpp | UTF-8 | 893 | 3.109375 | 3 | [] | no_license | // 21-02-21
// 5_PrefixSums_CountDiv
#include <vector>
#include <algorithm>
#include <cstring>
#include <limits>
using namespace std;
// My Solution 1 4min (50%) O(B-A)
// timeout error
int solution(int A, int B, int K) {
// write your code in C++14 (g++ 6.2.0)
int divisible=0;
for(int i=A; i<=B; i++) {
... | true |
a170e8e64743b0cb6c11d80c7a2573f901156603 | C++ | codemonkey-uk/pentago | /pentago.h | UTF-8 | 9,115 | 3.15625 | 3 | [
"MIT"
] | permissive | #ifndef PENTAGO_H_INCLUDED
#define PENTAGO_H_INCLUDED
#include <cstdint>
#include <cstring>
#include <string>
namespace pentago
{
enum state {
empty = 0,
white = 1,
black = 2,
invalid = 3
};
state fromchar( char c );
char tochar( state s );
inline state t... | true |
f7ba5ddddde212c8744d8c3d219359d54c25bb02 | C++ | thijse/Lightuino-Code-and-Libraries | /lightuino5/lightuinoSourceDriver.h | UTF-8 | 1,985 | 2.546875 | 3 | [] | no_license | /*? <section name="lightuino">
*/
#include "lightuino.h"
#ifndef lightuinoSourceDriverH
#define lightuinoSourceDriverH
//?? The number of source driver lines available to you.
#define Lightuino_NUMSRCDRVR 16
//?<class name="LightuinoSourceDriver">
// This class controls the source drivers on the Lightuino board. ... | true |
f542fc257d89c2de85fd4020d9f063dfd8c10fda | C++ | Charptr0/Escape-the-Maze | /main.cpp | UTF-8 | 2,901 | 3.59375 | 4 | [
"Apache-2.0"
] | permissive | #include <iostream> //cout, cin
#include <vector> //std::vector
#include "setup/player.cpp"
#include "setup/enemy.cpp"
#include "setup/operators.cpp"
using std::cout;
using std::cin;
//global variables-----------------------------------
Player player;
std::vector<Enemy>enemies;
std::vector<std::vector<int>>deathPosit... | true |
0cbdadf95d836880d7336d0bbcc250f0f8efc574 | C++ | msclar/tc-chaco-2016 | /dia9/1610_DuduServiceMaker.cpp | UTF-8 | 917 | 3.265625 | 3 | [] | no_license | #include <iostream>
#include <set>
#include <queue>
using namespace std;
int main () {
// Esta implementación es un Topological Sort del grafo
// Otra opción sería hacer un DFS
int t, a, b, n, m;
cin >> t;
for (int tc = 0; tc < t; tc++) {
cin >> n >> m;
vector<set<int> > out(n);
vector<set<int> > in(n);
... | true |
754eb8cab081077dd1e4281f7e120c95aaa1ed20 | C++ | tianlang0704/UO2016WCIS422AddressBook | /Database_Prototype1/Driver.cpp | UTF-8 | 2,643 | 3.234375 | 3 | [] | no_license | #include <iostream>
#include "Database.h"
#include "Util.h"
#define ADDRESSBOOK_NAME "ADDRESSBOOK5"
using namespace std;
int main()
{
Database db("test.db");
vector<string> colNames = { "FIRSTNAME", "LASTNAME", "ADDRESS", "ZIPCODE", "PHONENUMBER" };
db.AddTable(ADDRESSBOOK_NAME, colNames);
map<string, string>... | true |
e87cb937126829a7b14e22cb8e6c64cfe1f89ef3 | C++ | thecodingwizard/competitive-programming | /alphastar/alphastar-cs501ab-usaco-platinum-summer-2018-s2/12-advanced-greedy-methods/01 - Gangs of Istanbull-Cowstantinople.cpp | UTF-8 | 6,097 | 3.015625 | 3 | [] | no_license | /*
Gangs of Istanbull/Cowstantinople
=================================
Life is tough on the farm, and when life is tough you have to get
tough. The cows have formed gangs (conveniently numbered 1 to M).
The gangs coexisted in peace for a while, but now things are really
getting out of control!
The cows are competing ... | true |
04e0bc2cc3d87dece494e5ffee2b0881230ba5b7 | C++ | tsutaj/cpp_library | /graph/graph_005_kruskal.cpp | UTF-8 | 794 | 3.4375 | 3 | [] | no_license | // クラスカル法 (最小全域木問題)
// Edgeには from, to, cost の情報が必須。計算量( |E| log|V| )
// Union-find木を使うので、それも忘れずに組み込むこと。
template <typename T>
T kruskal(vector< vector< Edge<T> > > &G) {
int V = G.size();
vector< Edge<T> > es;
for(size_t i=0; i<V; i++) {
for(size_t j=0; j<G[i].size(); j++) {
... | true |
8e825fea5bb096c74b63a7bc89dacab17f236527 | C++ | FantasyAlpha/Phase-1 | /playground/playground game/Game.cpp | UTF-8 | 11,035 | 2.546875 | 3 | [] | no_license | #include "Game.h"
global_variable Game_Resources Resources;
float screenWidth;
float screenHeight;
global_variable SceneManager Game_Scene;
//Movement
AutomaticDirections dir;
void AutomaticMove(char *ActorName, float velocity, float delta)
{
// if collide change your direction
if (dir.Rigth)
{
if (!Game_... | true |
1215da8c7176021d508885584743bb092ce83194 | C++ | theisen1337/LogicCapStone | /DevSprint1/World.h | UTF-8 | 888 | 3.28125 | 3 | [] | no_license | //! World Class
/*!
Manages multiple chunks that make up the entire world.
*/
#pragma once
#include <vector>
#include "Chunk.h"
class World
{
private:
int worldSize = 2; /*!< World Size*/
int offset = 3/2; /*!< (Not Used) Offset of the world*/
public:
//! 2D vector of the chunks in the world
std::vector<std::v... | true |
d77a80d5d75a211343b8a341a05d516a4111b398 | C++ | Sunshine-Rain/trees | /BinaryTree/BinaryTree/BST/BinarySearchTree.hpp | UTF-8 | 2,378 | 2.75 | 3 | [] | no_license | //
// BinarySearchTree.hpp
// BinaryTree
//
// Created by quan on 2019/1/28.
// Copyright © 2019 quan. All rights reserved.
//
#ifndef BinarySearchTree_hpp
#define BinarySearchTree_hpp
#include <stdio.h>
#include "BinaryTree.hpp"
template <typename T>
class BinarySearchTree: public BinaryTree<T> {
BinaryNode... | true |
8ff542843ee5afb14fa45e78642c44494b5aa8a7 | C++ | tamamu/algonote | /atcoder-abc047b.cpp | UTF-8 | 657 | 2.890625 | 3 | [] | no_license | #include <iostream>
int main()
{
using namespace std;
int32_t W, H, N;
cin >> W >> H >> N;
int32_t xl = 0, xr = W, yt = 0, yb = H;
for (auto j = 0; j < N; ++j) {
int32_t x, y, a;
cin >> x >> y >> a;
switch(a) {
case 1:
xl = max(xl, x);
... | true |
353b9d8a96315411496cdb889dd170f21d861300 | C++ | LuckyGrx/PAT_Basic_Level | /C++/1054.cpp | UTF-8 | 2,247 | 3.171875 | 3 | [] | no_license | #include<iostream>
#include<string>
#include<sstream>
#include<stdio.h>
using namespace std;
stringstream ss;
bool isLegalNumber(string a);
bool isThreePoint(string a);
int getPointNumber(string a);
bool isAllNumber(string a);
bool isContainNumber(string a);
int main() {
int n;
cin >> n;
string* a = ... | true |
4ab37feb553a5d34dd52a12ddbbc8ff3f75c2d26 | C++ | 3l-d1abl0/DS-Algo | /cpp/practise/turtles_path_he.cpp | UTF-8 | 2,690 | 2.53125 | 3 | [] | no_license | #include <iostream>
using namespace std;
#define MOD 1000000007
bool isPrime[1000000];
int valid[2000][2000];
int ar[2000][2000];
int F[2000][2000];
int n, m;
void seive () {
for ( int i = 2; i <= 200000; i ++ ) {
if ( ! isPrime[i] ) {
for ( int j = i + i; j <= 200000; j += i) {
... | true |
af99703c1273e78a3f76edb7928701d312284f65 | C++ | xupeiwust/pv-meshless | /sph/KernelCusp.h | UTF-8 | 2,440 | 3.03125 | 3 | [] | no_license | // filename:
// KernelCusp.hpp
// description:
// A concrete kernel class.
// authors:
// Sven Ganzenmueller <ganzenmu@informatik.uni-tuebingen.de>
// Frank Heuser <heuserf@informatik.uni-tuebingen.de>
// last modified:
// $Date: 2005/03/08 08:28:41 $
// project:
// sph2000
// filetype:
// c++-clas... | true |
75a5622f8c3243a391aa7327bd2eec9b00198292 | C++ | gmc1322/FreeTime | /2017/BehaviorTree/BehaviorTreeDLL/Source/BehaviorTree_MultiBranch.h | UTF-8 | 1,621 | 2.921875 | 3 | [] | no_license | #pragma once
#include "BehaviorTree_Stack.h"
namespace BehaviorTreeSpace
{
class MultiBranch
{
public:
/**
* \brief The constructor for the Multi Branch
*
* \param FunctionPtr - The function for the Branch to run
* \param DataStorageKey - The Key to the Data Stor... | true |
fc6150f9dafc09335d39bd2f18a709f803ac5d17 | C++ | IshwarKulkarni/ToyTracer | /vec2.h | UTF-8 | 3,669 | 3.421875 | 3 | [] | no_license | /***************************************************************************
* Vec2.h *
* *
* Vec2 is a trivial encapsulation of 2D floating-point coordinates. *
* It has... | true |
94cf032f23d72f93a3139a27570970f8ee4a9fa2 | C++ | MarnickHuysmans/Minigin | /Minigin/SceneManager.cpp | UTF-8 | 1,662 | 2.859375 | 3 | [] | no_license | #include "MiniginPCH.h"
#include "SceneManager.h"
#include "Scene.h"
void dae::SceneManager::CreateScene(const std::string& name, const std::function<void(Scene&)>& sceneFunction)
{
auto it = std::find_if(std::begin(m_Scenes), std::end(m_Scenes), [&name](const std::pair<std::string, std::function<void(Scene&)>>& scen... | true |
a0718548f9e8e07d2cf9c485dd59e445b571cda2 | C++ | Lanysc/UVA-CODES | /UVA - 11286.cpp | UTF-8 | 683 | 2.8125 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int r, aux, maior;
while(scanf("%d",&r) && r != 0)
{
map<vector<int>,int> mp;
aux = 0;
maior = 0;
while(r--)
{
vector<int> vec;
int x[5];
scanf("%d %d %d %d %d",&x[0],&x[1],&x[2],&x[3],&x[4]);
for(int i = 0; i < 5; i+... | true |
cd96e03e675c2302ec84c8b94eb98b72e3d1c43a | C++ | GobySoft/goby3-clang | /pubsub_entry.h | UTF-8 | 4,684 | 2.65625 | 3 | [] | no_license | #ifndef PUBSUB_ENTRY_20190801H
#define PUBSUB_ENTRY_20190801H
#include <string>
#include "yaml_raii.h"
namespace viz
{
class Thread;
}
namespace goby
{
namespace clang
{
enum class Layer
{
UNKNOWN = -1,
INTERTHREAD = 0,
INTERPROCESS = 1,
INTERVEHICLE = 2
};
struct PubSubEntry
{
PubSubEntry(Laye... | true |
72c522ce491049b56bbb3d2b907523080a3a0239 | C++ | llkrakerll/teamwork | /OurProject/OurProject/MethodsDriverList.cpp | WINDOWS-1251 | 9,954 | 3.046875 | 3 | [] | no_license | #include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <iomanip>
#include "ClassDriverList.h"
#include "GlobalMethods.h"
using namespace std;
// DriverList
DriverList::~DriverList() //
{
while (!setPtrsDrivers.empty()) // ,
{ //
iter = setPtrsDrivers.begin();
delete *it... | true |
1c4399e260385bdd8ff3efc18803cd1c3e2769d4 | C++ | berkAktug/OpenGL_FishSimilator | /CS405-OpenGL-v0.5/ResourceManager.h | UTF-8 | 5,001 | 3 | 3 | [] | no_license | #ifndef RESOURCE_MANAGER_H
#define RESOURCE_MANAGER_H
#include <map>
#include "shader.h"
#include "texture.h"
//#include <SOIL.h>
class ResourceManager {
public:
// Resource storage
static std::map<std::string, Shader> Shaders;
static std::map<std::string, Texture3D> Textures;
// Loads (and generates) a shad... | true |
a3e3fb0247eb1dc551b891b3e27a77df23328c86 | C++ | sahmed19/PokemonCPlusPlus | /PokemonProject/PokemonProject/Pokemon.cpp | UTF-8 | 7,759 | 2.671875 | 3 | [] | no_license | #include "Pokemon.h"
#include "Pokedex.h"
#include "TypeData.h"
using namespace std;
const float NatureData::natureMultiplierLookupTable[25][6] = {
{ 0, 1, 1, 1, 1, 1 },
{ 0, 1.1f, 0.9f, 1, 1, 1 },
{ 0, 1.1f, 1, 1, 1, 0.9f },
{ 0, 1.1f, 1, 0.9f, 1, 1 },
{ 0, 1.1f, 1, 1, 0.9f, 1 },
{ 0, 0.9f, 1.1f, 1... | true |
b21fdbb09090b88e6340f69f21de2bd067851c1b | C++ | JasenRatnam/vehicleRentalManagement | /Assignment_2/CashPayment.h | UTF-8 | 622 | 2.796875 | 3 | [] | no_license | /*
* Author: Jasen Ratnam 40094237
* Date: 2/2/2019
* Due date: 11/2/2019
* Assignment 2
* CashPayment class, inheritance from payment
* File that contains the specification of the class CashPayment.
* Initializes the functions and variables used in the class CashPayment.
*/
#ifndef CASHPAYMENT_H
#define CASHP... | true |
c208f38a400905612dfcdb52ac7050c0a81273c4 | C++ | Viral-Doshi/DSA | /016_Count_Inversions.cpp | UTF-8 | 1,312 | 2.984375 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int cnt = 0;
void Merge(int arr[], int l, int m, int r){
int n1 = m-l+1, n2 = r-m;
int* left = new int[n1];
int* right = new int[n2];
for(int i =0; i<n1; i++)
left[i] = arr[l+i];
for(int j=0; j<n2; j++)
right[j] = arr[m+1+j];
int i=0... | true |
eb0c0623821dc2a06c81a1723849e15d22850a89 | C++ | arceciemat/GAMOS | /source/SEAL_Foundation/SealBase/tests/Time02.cpp | UTF-8 | 911 | 2.578125 | 3 | [] | no_license | #include "SealTest/SealTest.h"
#include "SealBase/Time.h"
#include "SealBase/Signal.h"
#include <iostream>
#include <iomanip>
using namespace seal;
int seal_test::Time02(int, char **argv)
{
Signal::handleFatal (argv[0]);
Time t = Time::current ();
unsigned d = Time::toDosDate (t);
Time t2 = T... | true |
82c287f504503a0fbd390c71411a40575be29be4 | C++ | ankurkamthe/arduino-nano33-ble | /toggle_rgb_1/toggle_rgb_1.ino | UTF-8 | 1,778 | 3.234375 | 3 | [
"MIT"
] | permissive |
/*
This sketch changes led colors on the board.
The sketch only uses the loop() and delay() to keep
led in a particular state (color).
Note:
Using the pinMode and digitalWrite function in an unconventional way.
Typically, setting HIGH should turn on the led, but my I played around
with this the opposite worked.... | true |
8c17fa497d433ff80010f775562eaf7d0ca9378d | C++ | glareprotector/active_site | /src/cpp_caller.h | UTF-8 | 15,560 | 2.84375 | 3 | [] | no_license | #ifndef CPP_CALLER_H
#define CPP_CALLER_H
#include <Python.h>
//#include <cstring>
#include <string>
//#include <string.h>
//#include "nums.h"
#include <set>
#include "globals.h"
typedef double num;
using namespace std;
// this function will allow one to call module functions(not member functions of any object)
// w... | true |
75e93d855594e20e39a510e4e1bf070894225c56 | C++ | nihk/SDL2-Pong | /Pong/Messageable.h | UTF-8 | 672 | 2.578125 | 3 | [] | no_license | #pragma once
// data types passed with Messageable::message() can vary
// depending on which class receives the message. See comments
// within each classes implementation of message() for clarification
enum class MessageId {
NONE = -1,
SET_Y_VELOCITY,
HANDLE_COLLISION,
PADDLE_BOUNCE,
X_OUT_OF_SCREEN_BOUNDS,
Y_O... | true |
498401d476984fe4b94fe27c26831e9971f1b45f | C++ | AjayThakur12/opendatastructures | /spec/src/helpers/lists/deque_check.cpp | UTF-8 | 692 | 3.421875 | 3 | [] | no_license | void dequeCheck(IDeque<int> &deque){
cout << "Testing deque interface:" << endl;
for (int i = 0; i < 3; i++){
cout << " adding value " << i << "to end" << endl;
deque.addLast(i);
}
// 0
// 0 1
// 0 1 2
for (int i = 3; i < 6; i++){
cout << " adding value " << i << "to front" << endl;
deque.addFirst(i)... | true |
c75cb358287f43ed5d2742de0dc2fd8581fae15c | C++ | Jas03x/GKit | /src/core/src/io/filesystem.cpp | UTF-8 | 345 | 2.703125 | 3 | [] | no_license | #include <gk/core/io/filesystem.hpp>
Filesystem::Path::Path(const std::string& path)
{
size_t index = path.find_last_of('/');
if (index == std::string::npos)
{
this->filename = path;
}
else
{
index++;
this->directory = path.substr(0, index);
this->filename = pat... | true |
f654e1614e16b72fc384c6d4aae7dc72e3d948f8 | C++ | BornIncompetence/fast_io | /include/fast_io_core_impl/ospan.h | UTF-8 | 3,028 | 2.859375 | 3 | [
"MIT"
] | permissive | #pragma once
namespace fast_io
{
template<std::integral ch_type,std::size_t extent=std::dynamic_extent,bool override_not_overflow=false>
class ospan
{
public:
using char_type = ch_type;
using span_type = std::span<char_type,extent>;
span_type span;
using pointer = typename span_type::pointer;
poin... | true |
7cd549377680a983cc5abcc2f5fb3af7b1453cc2 | C++ | guili116345/MyTestCode2021 | /Qml/TestQml_20210717_IpInput/Clipboard.cpp | UTF-8 | 2,957 | 2.96875 | 3 | [] | no_license | #include "Clipboard.h"
#include <QGuiApplication>
#include <QClipboard>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#include <QRegExp>
#include <QDebug>
void Clipboard::copyIp(QStringList ip)
{
QStringList item_list;
QString ip_text;
if(ip.size()==4){
//空文本直接作为0处理
for(Q... | true |
0ea978c22a2b1a66da7b6935eac5f94338d4174a | C++ | hbsun2113/LeetCodeCrawler | /0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters.cpp | UTF-8 | 537 | 2.796875 | 3 | [] | no_license | class Solution {
public:
//自己没有想出来,因此看了hint。这个问题可能不值得一做?
bool isOneBitCharacter(vector<int>& bits) {
if(bits[bits.size()-1]==1) return false;
return isvalid(bits,0);
}
bool isvalid(vector<int>& bits,int pos){
//cout<<pos<<endl;
if(pos==bits.size()-1 && bits[pos]==0) ... | true |
9a7a1d1207fd315c327956a8993f56a56e1ad8a8 | C++ | ckong2001/jungleChess | /direction.cpp | UTF-8 | 908 | 2.78125 | 3 | [] | no_license | /*
CCCU 21105
Object-Oriented Programming Assignment : Jungle Chess Game
Team Number : 39
Team member : Lo Ka Ming 54063815
Tse Shing Kung 54049126
Michael Romano 54073009
Tung Ka Lok... | true |
7ae163c599143167dd0e936c3f26f98666a572d6 | C++ | georgerapeanu/c-sources | /petresq_simulare_izho1/dragonball/dragonball.cpp | UTF-8 | 4,412 | 2.515625 | 3 | [] | no_license | #include <cstdio>
#include <algorithm>
using namespace std;
FILE *f = fopen("dragonball.in","r");
FILE *g = fopen("dragonball.out","w");
typedef long long ll;
const ll BASE = 1e14;
const int LGMAX = 800;
class Bignum {
public:
ll cf[LGMAX];
int lst_cf;
Bignum() {
lst_cf = 0;
}
void bui... | true |
5882b2cb8823e084d79f0beb10a298f4759a6edb | C++ | rebo95/Portfolio | /UCM Projects/Data Structures and Algorithms/VIP_Queue.cpp | ISO-8859-1 | 6,337 | 3.453125 | 3 | [] | no_license | //Grupo VJ01, Aaron Reboredo Vzquez
//Grupo VJ01, Pablo Martn Garca
//Este ejercicio nos permite gestionar la cola de una discoteca en funcin de las prioridades de los asistentes. Para ello hacemos uso de la clase ColaVip.
//todas aquellas llegadas tales que exista espacio en la discoteca entran directamente aumenando... | true |
4b7cc3a34e1aecc22bdfec6c8e87a55271396454 | C++ | Stereogram/test.rpg | /test.rpg/gui/TextBox.cpp | UTF-8 | 1,064 | 2.5625 | 3 | [] | no_license | #include <Thor\Resources\SfmlLoaders.hpp>
#include "SFML\Graphics\Font.hpp"
#include "TextBox.hpp"
#include "Label.hpp"
#include "..\Game.hpp"
gui::TextBox::TextBox(const unsigned int maxLines)
: _font(Game::Cache->acquire(thor::Resources::fromFile<sf::Font>("assets/fonts/kenpixel_high_square.ttf")))
, _max(maxLines)... | true |
11eb5487115e3e5d8e5f6cff29e31ff378452612 | C++ | lakrias/AntivirusMTUCI | /Antivirus(23.04.2020)/Base.h | WINDOWS-1251 | 333 | 2.578125 | 3 | [] | no_license | #pragma once
#include "Record.h"
/*
2. ( )
*/
class Base
{
DWORD recordcount;
public:
Record _Record;
Base();
Base(DWORD RecordCount);
};
| true |
0afc86bb9b5889bc126a5e599b02d157c01821f3 | C++ | dskleviathan/contest | /AOJ0033.cpp | UTF-8 | 532 | 2.859375 | 3 | [] | no_license | #include <iostream>
using namespace std;
int N, H[10];
void solve()
{
int big=0, small=0;
bool flag = true;
for (int i = 0; i < 10; i++)
{
if (H[i] > big) big = H[i];
else if (H[i] > small) small = H[i];
else
{
flag = false;
break;
}
}
if... | true |
7edf1bbe68109ff6b3364eee42d291dc748ec5bf | C++ | keigezellig/fruitHAP | /clientapps/SensorTest/statemachine/door.cpp | UTF-8 | 1,552 | 2.6875 | 3 | [] | no_license | #include "door.h"
#include <QDebug>
Door::Door(QObject *parent): QObject(parent), m_doorMachine(*this)
{
m_approvalTimer = new QTimer(this);
m_unlockedTimer = new QTimer(this);
m_approvalTimer->setInterval(20000);
m_unlockedTimer->setInterval(25000);
connect(m_approvalTimer, &QTimer::timeout, ... | true |
1bc89c2251c82b5324ead4690efa78c746c0b9f1 | C++ | lmw40/mpMap | /src/sharedArray.hpp | UTF-8 | 466 | 3.140625 | 3 | [] | no_license | #ifndef _SHARED_ARRAY_H
#define _SHARED_ARRAY_H
#include <memory>
//helper struct for a reference-counter array
template<typename T> struct arrayDeleter
{
void operator()(T* p)
{
delete [] p;
}
};
template<typename T> class sharedArray : public std::shared_ptr<T>
{
public:
sharedArray(T* t)
: std::sh... | true |
8237084fc573dbf11e3aa7d0ae03d52d03276956 | C++ | piggy2303/int1008_40 | /chusolonnhat.cpp | UTF-8 | 702 | 3.21875 | 3 | [] | no_license | #include <cmath>
#include <iostream>
using namespace std;
int main()
{
// int n, count_uoc = 0;
// cin >> n;
// for (int i = 1; i <= n/2; i++)
// {
// if (n % i == 0)
// {
// count_uoc++;
// }
// }
// if (count_uoc == 2)
// {
// cout << "yes" <<... | true |
8e65b7a95d948b742f86ce589f39353dc0e70c5e | C++ | danwsong/programming-contests | /CCC/2006/J3.cpp | UTF-8 | 1,326 | 2.828125 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
int presses(char c) {
if (c >= 'a' && c <= 'c')
return c - 'a' + 1;
if (c >= 'd' && c <= 'f')
return c - 'd' + 1;
if (c >= 'g' && c <= 'i')
return c - 'g' + 1;
if (c >= 'j' && c <= 'l')
return c - 'j' + 1;
if (c >= 'm' &... | true |
5fe5bddeedb4c7e51839566cd894c890ee20da90 | C++ | ecodespace/EE361-Work | /HW_4/HW_4_Roulette/HW_4_Roulette/NumGroup.cpp | UTF-8 | 339 | 2.984375 | 3 | [] | no_license |
#include "NumGroup.h"
NumGroup::NumGroup() {
num_size = 0;
nums[num_size] = { };
}
NumGroup::NumGroup(int num_arr[]) {
num_size = sizeof(num_arr) / sizeof(int);
nums[num_size] = num_arr[num_size];
}
bool NumGroup::contains(int num) {
for (int i = 0; i < num_size; ++i) {
if (nums[i] == num) return true;
}... | true |
c3826f1ce830ff045399b8e791473d1bbbf828ba | C++ | chensguo8099/practice | /cppPrimer/firstStep/test14.cpp | UTF-8 | 1,464 | 3.71875 | 4 | [] | no_license | /*
> File Name: test14.cpp
> Author: JerryChen
> Created Time: 2019年02月23日 星期六 22时49分56秒
*/
#include <iostream>
using namespace std;
//图形类 称之为抽象类
//不管这个类中有无成员属性,只要这个类有纯虚函数,就是一个抽象类。
//抽象类是不能实例化对象的
class Shape{
public:
//求图形面积的方法
//表示图形类声明一个方法getArea(),它是一个纯虚函数,没有函数的实现。
virtual double getArea() =... | true |
9f68eb5d2388b57190f72d68caf18009ff8c71a4 | C++ | groverjeenu/RTLP | /13CS30042_13CS30043_server.cpp | UTF-8 | 17,353 | 2.703125 | 3 | [] | no_license | // Assignment 3
// Developing a Reliable Transport Layer Protocol using Raw Sockets
// Objective
// The objective of this assignment is to develop a reliable transport layer protocol on the top of the IP layer.
// Group Details
// Member 1: Jeenu Grover (13CS30042)
// Member 2: Ashish Sharma (13CS30043)
//... | true |
3e2e02b913dbc721776d8a64342df91c94608e67 | C++ | meishaoming/cpp_primer_5th_answer | /ch03/ex3_22.cc | UTF-8 | 472 | 3.15625 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <string>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
int main() {
vector<string> text;
string str;
while (getline(cin, str)) {
text.push_back(str);
}
for (auto it = text.begin(); it != text.end() && !it->empty();... | true |
8c7fdff32d54843c0b7c6526650eb7c80d564500 | C++ | paulolemus/sandwich-social | /guiTests/MenuV1.h | UTF-8 | 899 | 2.734375 | 3 | [] | no_license | //intro stuff
//
#ifndef _MENU_H
#define _MENU_H
#define NUM_C 5
#include<ncurses.h>
#include<string>
using namespace std;
class myMenus{
private:
int yMax;
int xMax;
int yBeg;
int xBeg;
int Depth;
int Width;
int Fraction;
int num_choices;
string choices [NUM_C];
WINDOW * menuTemplate;
... | true |
26d4833d406ee36b47f5865f83d74a2e3a865530 | C++ | onlyonename/algo | /floodfill.cpp | UTF-8 | 1,086 | 3.5 | 4 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
//是否在二维数组里
bool in_area(int hor, int col, int x, int y)
{
if((x >= 0 && x <= hor) && (y >= 0 && y <= col))
{
return true;
}
return false;
}
int fill(int (&src)[3][3], int x, int y, int ori_color, int dst_color)
{
if(!in_area(3, 3, x, y)) return -1... | true |
8f08e852696627075f0c0d434eddc7dcc56933d7 | C++ | mmer547/delfem2 | /include/delfem2/points.h | UTF-8 | 4,646 | 2.59375 | 3 | [
"MIT"
] | permissive | /*
* Copyright (c) 2020 Nobuyuki Umetani
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @file interfaces for functions that handle coordinates of points stored in a flat vector.
* @brief interfaces for functions that handle ... | true |
c02a68c2518fa0e28d9c6fc7ffeb7ee360c3952b | C++ | larreguin1/Cs256 | /Desktop/cs 256/Homework/project2.cpp | UTF-8 | 7,676 | 3.515625 | 4 | [] | no_license | #include <iostream>
#include <fstream>
using namespace std;
/*Bank Account Class*/
class bankAccount {
public:
bankAccount(double, double);
virtual void deposit(double&, double&, int);
virtual void withdraw(double&, double&, int);
virtual void calcInt(double, double);
virtual void monthlyProc(double,... | true |
49187542baf9ce8d72e043f88b11a63610f8f5a6 | C++ | danon360/Risque-le-game | /Player.cpp | UTF-8 | 37,237 | 3.15625 | 3 | [] | no_license | #include "Player.h"
//local
using namespace std;
using std::vector;
// Default Constructor
Player::Player() {
ID = new int(-1);
countriesOwned = new vector<Country*>;
playerHand = new Hand;
name = new string();
myDice = new Dice();
myCountry = new Country();
hasConqueredThisTurn = new bool(false);
}
Player::Pl... | true |
b85be1c2e3b3684c71b98127e175f95ebfeb8b7c | C++ | mpdivecha/Particle-Filter-Vehicle-Localization | /src/particle_filter.cpp | UTF-8 | 10,455 | 2.96875 | 3 | [
"MIT"
] | permissive | /*
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: Tiffany Huang
*/
#include <random>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <math.h>
#include <iostream>
#include <sstream>
#include <string>
#include <iterator>
#include "particle_filter.h"
using namespace std;
... | true |
3499018d7fb5226b81b477a63011c67de5d08070 | C++ | kalleand/id1217 | /lab4/uppg8/unisex.cpp | UTF-8 | 5,315 | 3.640625 | 4 | [] | no_license | /**
* Simulation of a unisex bathroom using monitor to
* provide synchronization.
*
* To run the program use the make file using default rule.
* Number of men and women can be specified using NRW and NRM.
* This will compile the program as well. To compile the program
* without running it use the rule unisex in ... | true |
40667b72d1c7b9d633eec6791ed21ba1471509b8 | C++ | fjrp1412/algorithm_and_dataStructures | /toolkit_algoritms/week2/c_code/fibonacci_again.cpp | UTF-8 | 766 | 3.46875 | 3 | [] | no_license | #include <iostream>
long long Pisano_period(long long m){
long long prev = 0;
long long curr = 1;
long long result = 0;
for(int i = 0; i < m*m; i++){
long long temp = 0;
temp = curr;
curr = (prev + curr) % m;
prev = temp;
if(prev == 0 && curr == 1){
result = i+1;
}
}
return result;
}
long l... | true |
b78b07e66dd05969d19dad0556e1121a9d46872c | C++ | kit234/MATHF | /operation_string.cpp | GB18030 | 1,861 | 3.390625 | 3 | [] | no_license | //operation_string.cppַйصĺ
#include "operation.h"
#include "common.h"
using std::string;
typedef string String_Type; //ַ
static bool IsOperator(char); //жַǷ
static void check(string) throw(string,const char*); //ַǷϷ
bool IsOperator(char c){
if(c == '+') return true;
return false;
}
string operati... | true |
852e2ed1ce8a569ed35502492a7d0cf0b76fff6e | C++ | dan64ml/cracking_coding_interview | /src/10_sort_search/problem_8.cpp | UTF-8 | 1,485 | 3.40625 | 3 | [] | no_license | /*********************************************************************************
* Дан массив с числами от 1 до не более 32000. Массив может содержать дубликаты.
* Вывести все дубликаты используя не более 4К памяти.
********************************************************************************/
#include "chapte... | true |
4105bb8cb1959d99dcef4db725c068d99ebdfd8e | C++ | ViniciusTM/ai_class_tp1 | /cLib/structures.cpp | UTF-8 | 17,088 | 2.8125 | 3 | [] | no_license | #include <vector>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <ctime>
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstring>
#include "structures.h"
// Internal functions
int simple_dist(const State& s) {
int side = static_cast<int>(std::sqrt(s.config.size())... | true |
7f99b0f07ca0211ce4e654d385b0070686c97131 | C++ | PrachiSinghal86/Leetcode | /Math/numers atmost n given digits .cpp | UTF-8 | 670 | 2.609375 | 3 | [] | no_license | class Solution {
public:
int atMostNGivenDigitSet(vector<string>& digits, int n) {
string s=to_string(n);
int c=0;
int x=digits.size();
sort(digits.begin(),digits.end());
for(int i=1;i<s.size();i++)
{
c=c+x;
x=x*digits.size();
... | true |
7a3bb7789903eac5d2aa8ff842f5ff972df42ef9 | C++ | mstfknn/malware-sample-library | /Carbanak/Carbanak - part 1/botep/core/source/ThroughTunnel.cpp | WINDOWS-1251 | 1,110 | 2.796875 | 3 | [] | no_license | #include "core\ThroughTunnel.h"
#include "core\socket.h"
#include "core\debug.h"
ThroughTunnel::ThroughTunnel( int _portIn, const char* _ipOut, int _portOut ) : portIn(_portIn), portOut(_portOut)
{
Str::Copy( ipOut, sizeof(ipOut), _ipOut );
}
ThroughTunnel::~ThroughTunnel()
{
}
static DWORD WINAPI ThroughTunnelThre... | true |
7acc5ff259fcadb3a277c30dd81644a16d7c5a25 | C++ | folguera/DTTrigger | /doc/referece_code/analyzer/mpredundantfilter.h | UTF-8 | 2,040 | 2.703125 | 3 | [] | no_license | /**
* Project:
* Subproject: tracrecons
* File name: mpredundantfilter.h
* Language: C++
*
* *********************************************************************
* Description:
*
*
* To Do:
*
* Author: Jose Manuel Cela <josemanuel.cela@ciemat.es>
*
* *************************************... | true |
3c5d6eef3215681c8a8bc1bd91374f1755dba42f | C++ | camhellstern/Chapter6HW | /router.cpp | UTF-8 | 3,424 | 2.65625 | 3 | [] | no_license | #include "router.h"
Router::Router(QObject *parent, int dramSize, int storageParam) : QObject(parent)
{
cost = 0;
if(dramSize == 1)
{
if(storageParam == 1)
{
LoadBalancer *loadb1 = new LoadBalancer(this, 4, false);
lb1 = loadb1;
LoadBalancer *l... | true |
c0ef45f573124310eda4b918152357205bcce5cc | C++ | RobotElliot/C--primerplus-answer | /ch06/6-3.cpp | UTF-8 | 688 | 3.609375 | 4 | [] | no_license | #include <iostream>
using namespace std;
int main()
{
cout << "Please enter one of the following choices: "<<endl;
cout << "c) carnivore"<<" "<< "p) pianist"<<endl;
cout << "t) tree"<<" "<< "g) game"<<endl;
char ch,flag = 1;
cin>> ch;
while(flag)
{
switch(ch)... | true |
3d1849200f7cebffc0e6b117531e1820541c2f54 | C++ | technoligest/kmeansII | /lib/runners/kmeans.cc | UTF-8 | 2,874 | 2.859375 | 3 | [
"MIT"
] | permissive | //
// Created by Yaser Alkayale on 2017-08-28.
//
/*
* Run a single kmeans instance with any given commandLine args. To know the args needed,
* just run the program without any args.
*/
#include <iostream>
#include <cassert>
#include "../algorithm/kmeans.h"
using std::endl;
using std::cout;
int main(int argc, cha... | true |
a961cdc24fc19b80909ddd06cf865e578fb5c885 | C++ | RogerYong/leetcode | /数据结构/线性表/链表/24.两两交换链表中的节点.cpp | UTF-8 | 1,113 | 3.28125 | 3 | [] | no_license | #include <bits/stdc++.h>
using namespace std;
class ListNode
{
public:
int val;
ListNode *next;
// ListNode() : val(0), next(nullptr) {}
// ListNode(int x) : val(x), next(nullptr) {}
// ListNode(int x, ListNode *next) : val(x), next(next) {}
};
class Solution
{
public:
ListNode *swapPairs(ListNo... | true |
d95562115b964fb6db7918de49deb82501455005 | C++ | AshMagorian/GA-AStar-Pathfinding | /AI Genetic alogrithm/AStar.cpp | UTF-8 | 6,624 | 3.109375 | 3 | [] | no_license | #include "AStar.h"
#include "Node.h"
AStar::AStar()
{
dx[0] = 1; dy[0] = 0;
dx[1] = 1; dy[1] = 1;
dx[2] = 0; dy[2] = 1;
dx[3] =-1; dy[3] = 1;
dx[4] =-1; dy[4] = 0;
dx[5] =-1; dy[5] = -1;
dx[6] = 0; dy[6] = -1;
dx[7] = 1; dy[7] = -1;
}
AStar::~AStar()
{
}
void AStar::RunProgram(int _w, int _h, std::vector<i... | true |
758eef9f13834ae2398becdf1858b48c908e8416 | C++ | shivam-tripathi/code | /practice/threading/test.cpp | UTF-8 | 449 | 2.78125 | 3 | [] | no_license | // Compile as g++ test.cpp p_threads_class.cpp -std=c++11 -lpthreads -o3
#include "p_threads_class.h"
#include <bits/stdc++.h>
using namespace std;
class TestThread : public PThreadsClass{
public:
void run(){
cout << " Test thread Running " << endl;
}
};
int main(){
PThreadsClass *thread = new Te... | true |
179f7538340889dd360945265e0b68aea25d0889 | C++ | fullsaildevelopment/FSGDEngine | /EDSolutions/sphereSolutions.cpp | UTF-8 | 6,411 | 2.515625 | 3 | [] | no_license | #include "precompiled.h"
#include "../EDUtilities/PrintConsole.h"
#include "../EDMath/sphere.h"
#include "../EDCollision/EDCollision.h"
#include "../EDCollision/segment.h"
#include "../EDCollision/triangle.h"
using EDUtilities::PrintConsole;
using EDMath::Float3;
namespace EDCollision
{
float ClosestPtSphereSoluti... | true |
5608504c8495c1f4d64090ba8eb1a860d87d1f58 | C++ | valdirSalgueiro/puzzleGame | /GreenJuiceTeam/GreenJuiceTeam.Shared/game/font/TreeNode.h | UTF-8 | 715 | 2.640625 | 3 | [] | no_license | #ifndef _TREENODE_H_INCLUDED_
#define _TREENODE_H_INCLUDED_
#include "Allocator.h"
class FTBitmapChar;
class TreeNode
{
public:
TreeNode();
TreeNode(int x, int y, int width, int height);
~TreeNode();
void Set(int x, int y, int width, int height);
bool Add(FTBitmapChar* pFTBitmapChar);
bool IsEmpty() const
{
... | true |
b0a9d706fcdc2f5ebbd2762c562eede100ba3869 | C++ | Eternity-AIBN/NJU-Practice-of-Fundamental-Programming | /PlaneWar/PlaneWar/Bullet.h | GB18030 | 910 | 2.765625 | 3 | [] | no_license | #pragma once
#include<atlimage.h>
#include<vector>
using namespace std;
extern void transparent(CImage &img);
class Bullet
{
int positionX, positionY; //ӵ
int height, width;
bool direction; //ӵķ,1,0
public:
static CImage image; //ӵͼƬ
bool whoShoot; //˭ӵ0һ1л
int getX() con... | true |
560202362fd72f2cbca179ec651d0929b026522f | C++ | KyungminYu/Algorithm | /BOJ/4343 Arctic Network.cpp | UTF-8 | 1,159 | 2.875 | 3 | [] | no_license | #include <stdio.h>
#include <algorithm>
#include <math.h>
using namespace std;
struct edge {
int s1, s2;
double len;
edge() {};
edge(int s1, int s2, double len) {
this->s1 = s1;
this->s2 = s2;
this->len = len;
}
int operator < (edge e) const {
return len < e.len;
}
}E[124751];
struct pos {
double x, y;... | true |
ececff995ff005717912023801e5a961f738ac1e | C++ | KunalWasHere/GeekForGeeks-solutions | /greedy problems/page faults in lru.cpp | UTF-8 | 3,038 | 2.640625 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
struct newnode
{
struct newnode *next,*prev;
int data;
};
int main()
{
int t,n,i,arr[1000],cap,freq,set;
cin>>t;
while(t--)
{
struct newnode *head,*tail,*node,*p;
freq=0;
head=NULL;
tail=NULL;
c... | true |
f46070f28e7df6ca18d5a16370ead65e46fe2492 | C++ | tixsys/esteid | /minidriver/tags/initial_import/cardlib/ManagerInterface.h | UTF-8 | 4,540 | 2.90625 | 3 | [] | no_license | /*!
\file ManagerInterface.h
\copyright (c) Kaido Kert ( kaidokert@gmail.com )
\licence BSD
\author $Author: kaidokert $
\date $Date: 2008-10-30 18:16:34 +0200 (N, 30 okt 2008) $
*/
// Revision $Revision: 134 $
#pragma once
typedef unsigned int uint;
typedef unsigned char byte;
typedef unsigned... | true |
497f2a1e5fc8705879585e6efab239c8f084f437 | C++ | MohamadIsmail/Online-Judges-solutions | /Level3/string to palindrome.cpp | UTF-8 | 899 | 2.734375 | 3 | [] | no_license | //#include<iostream>
//#include<cstring>
//#include<string>
//#include<cctype>
//#include<vector>
//using namespace std;
//
//int DP[1003][1003];
//string arr;
//
//int min(int x, int y, int z)
//{
// int t = x < y ? x : y;
// return t = z < t ? z : t;
//}
//
//int Edit_distance(int i ,int j, int mid)
//{
// if(i... | true |
b316d3fbbdedebbe830d977956a83f0113cd2b48 | C++ | dfm066/Programming | /Codility/fib_frog.cpp | UTF-8 | 3,789 | 3.546875 | 4 | [
"MIT"
] | permissive | // The Fibonacci sequence is defined using the following recursive formula:
// F(0) = 0
// F(1) = 1
// F(M) = F(M - 1) + F(M - 2) if M >= 2
// A small frog wants to get to the other side of a river. The frog is initially located at one bank of the river (position −1) and wants to get to the other bank ... | true |
81de3d1fa9753f5188f5b7832adb6e95759fd258 | C++ | Thuney/Jotunn | /Jotunn/Engine/src/Graphics/Mesh.cpp | UTF-8 | 1,727 | 2.53125 | 3 | [] | no_license | #include "Graphics/Mesh.h"
#include "Graphics/Shader.h"
namespace Jotunn
{
MeshGeometry::MeshGeometry(std::unique_ptr<VertexArray>& vao, std::shared_ptr<VertexBuffer> vbo, const BufferLayout& vbo_layout, std::shared_ptr<IndexBuffer> ibo)
{
this->vao.reset(nullptr);
this->vao.swap(vao);
this->vbo = vbo;
this... | true |
6f45d96b616ac190a10f64a09caf2cf2f980c9b8 | C++ | tomwillow/Credible-Spider | /src/Control/TRadioButtonGroup.cpp | UTF-8 | 1,011 | 2.546875 | 3 | [] | no_license | #include "TRadioButtonGroup.h"
void TRadioButtonGroup::LinkControl(HWND hDlg, std::vector<int> id_group, std::vector<int> values)
{
assert(uSet.empty());
assert(id_group.size() == values.size());
for (size_t i = 0; i < id_group.size(); ++i)
{
TCheckBox rb;
uMap[id_group[i]] = { rb,values[i] };
uMap[id_grou... | true |
c5205c86306dad9cadc4ae4b721a51fc76d7b0fb | C++ | oklodhi/CS200 | /Labs/Lab8/Part4.cpp | UTF-8 | 857 | 3.578125 | 4 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
void displayStudents(string students[3]);
void updateNames(string students[3]);
int main() {
string students[3];
int choice;
bool done = false;
while (!done) {
displayStudents(students);
cout << "\n\n1. UPDATE NAME \t 2. QUIT\n";
cin >> choi... | true |
967655dc40fc95263e79055ebede9f46f902b9f9 | C++ | CSPshala/dangerzone | /DX11/source/messaging/IMessageListener.h | UTF-8 | 1,262 | 2.84375 | 3 | [] | no_license | ///////////////////////////////////////////////////////////////////////////
// File Name : "IMessageListener.h"
//
// Author Name : JC Ricks
//
// Purpose : Defines an interface for message listeners to recieve messages
///////////////////////////////////////////////////////////////////////////
#ifndef _IMESSAGELIST... | true |
8fe684f47b1726c9531cc13823eea23ea25cb2be | C++ | softwaytostars/LearnChess | /infosconfiguration.h | UTF-8 | 2,706 | 2.625 | 3 | [] | no_license | #ifndef INFOSCONFIGURATION_H
#define INFOSCONFIGURATION_H
#include <QString>
#include "TypeDemo.hpp"
#include "Types/TypePreferences.h"
#include "Types/TypeLangage.h"
class InfosConfiguration
{
public:
static InfosConfiguration* instance ();
static void kill ();
void setLastFileNameForDemo (const QString... | true |
07b8cf911112bd62078d71ec916260a86775c873 | C++ | saifpathan/cpp-programs | /src/10_cout_cin/6_bankdetails.cpp | UTF-8 | 1,339 | 3.40625 | 3 | [] | no_license | using namespace std;
#include<iostream>
#include<string.h>
class bankdetails
{
int accountno;
char name[20];
double deposit;
char branch[20];
public:
bankdetails()
{
this->accountno = 100;
strcpy(this->name, "not given");
this->deposit = 15454.55;
strcpy(this->branch, "Pune");
}
bankdetails(int ac, char... | true |
5ac576dbf1723ad8838572fdb77b0279e479cb1b | C++ | rypcer/OpenglFootballGame | /ball.cpp | UTF-8 | 2,991 | 2.515625 | 3 | [] | no_license | #include "ball.h"
//---------This is used for the football ball-------//
GLUquadricObj* quadricFootball;
void ball::drawBall()
{
glPushMatrix();
glFrontFace(GL_CCW);
glTranslatef(x, y, z);
glRotatef(angle,1, 0, 0);
// Create and texture the ball
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE... | true |
6f97072f5734741c35d57bb1622b1a66764df29b | C++ | mornydew/thor | /src/slam.cpp | UTF-8 | 2,308 | 2.5625 | 3 | [
"MIT",
"Apache-2.0",
"curl"
] | permissive | // ************************************
// Copyrights by Jin Fagang
// 1/15/19-15-11
// slam
// jinfagang19@gmail.com
// CTI Robotics
// ************************************
//
// Created by jintain on 1/15/19.
//
#ifdef USE_OPENCV
#include "include/slam.h"
using namespace thor;
void slam::getKeyPointsColor(const ... | true |
df63b0d599bd1b04de3b0965ec4b4c9fa190752a | C++ | MateusAvilla/Meus-Projetos-Tecnico | /2º Semestre/Programação de Sistemas/Dev C++ Projects/Estrutura Seletiva Múltipla (Switch)/3. Lanchonete.cpp | ISO-8859-1 | 1,261 | 2.6875 | 3 | [
"MIT"
] | permissive | #include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string.h>
#include <locale.h>
using namespace std;
int main()
{
setlocale(LC_ALL,"Portuguese");
int codigo, quantidade;
double preco;
cout<<"\n Digite o cdigo do lanche desejado: ";
cin>> codigo;
cout<<"... | true |
2a15df03a5795dc79058f701d268a535774714d6 | C++ | musou1500/tt | /ford_folkerson.hh | UTF-8 | 1,284 | 2.953125 | 3 | [] | no_license | #ifndef FORD_FOLKERSON_HH
#define FORD_FOLKERSON_HH
#include <vector>
namespace tt {
struct MinCostEdge {
int to, cap, rev;
MinCostEdge(int to, int cap, int rev) : to(to), cap(cap), rev(rev) {}
};
void AddEdge(std::vector<std::vector<MinCostEdge>> &g, int from, int to,
int cap) {
int idx = g[to].... | true |
19ca25dc58f1124e266e8f3079ebf0545cc99c98 | C++ | ezefranca/estudos-cpp | /Fibonnaci/Fibonnaci/main.cpp | UTF-8 | 651 | 3.1875 | 3 | [] | no_license | //
// main.cpp
// Fibonnaci
//
// Created by Ezequiel on 14/04/17.
// Copyright © 2017 Ezequiel. All rights reserved.
//
#include <iostream>
int main(int argc, const char * argv[]) {
int i, input, first=0, second=1, next;
std::cout << "Fibonnaci C++ 🙃 \n";
f... | true |
2aeae92aa92a2561355b70537c375db161c8c728 | C++ | pepborrell/AP2 | /contenidors/easy.cc | UTF-8 | 1,218 | 3.265625 | 3 | [] | no_license | #include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
vector<string> settovec(const set<string>& s){
int n = s.size();
vector<string> v(n);
auto it = s.begin();
for (int i=0; i<n; ++i){
v[i] = *it;
++it;
}
return v;
}
bool comp(const string& a, con... | true |
12e9322b06e10c5a02dad29baeeb3366b8e2a957 | C++ | xfcherish/codeforces | /362/C.cpp | UTF-8 | 3,354 | 2.78125 | 3 | [] | no_license | #include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <vector>
#include <map>
using namespace std;
typedef long long LL;
map<pair<LL,LL>,LL> m;
vector<LL> get_root(LL u) {
vector<LL> res;
while( u != 1) {
// cout << "u = " << u << endl;
res.push_back(u);
u /... | true |
c358f2ef5b328397964dd358d509537b0cdaaeec | C++ | ttyang/sandbox | /sandbox/mp_math/libs/mp_math/test/unbounded/signed/random.cpp | UTF-8 | 2,157 | 2.71875 | 3 | [
"BSL-1.0"
] | permissive | // Copyright Kevin Sopp 2008 - 2009.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/test/unit_test.hpp>
#include "prerequisite.hpp"
BOOST_AUTO_TEST_CASE_TEMPLATE(uniform_integer1, int_type, In... | true |
24a84e0318d472723c46de796444fb5568dc900c | C++ | gerstle/LightWalker | /tests/controller/sketch_jan25a/sketch_jan25a.ino | UTF-8 | 1,709 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | #include <SPI.h>
#include <TCL.h>
const int STR_LENGTH = 25;
const int STR_COUNT = 2;
const int PIXEL_COUNT = STR_LENGTH * STR_COUNT;
unsigned long currentMillis;
long previousMillis = 0;
long interval = 30;
const int PATTERN_COUNT = 3;
int pattern_index = 0;
int pixel_index = 0;
byte colorpattern[PATTERN_COUNT][3]... | true |
0053c5426f4c4b2e87f53908fd706ca1999cb706 | C++ | DhaliwalX/grok | /src/vm/codegen.cc | UTF-8 | 779 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | #include "vm/codegen.h"
namespace grok {
namespace vm {
CodeGenerator::CodeGenerator()
: IR{}, Builder{}
{
Builder = InstructionBuilder::CreateBuilder();
}
void CodeGenerator::Generate(grok::parser::Expression *AST)
{
Builder->CreateBlock();
if (Builder->InsideFunction()) {
auto nop = Instruc... | true |
54d71303ca196f3a6e36cc87b504ee139170bf4f | C++ | MasterHoracio/COJ-Solutions | /2803-AnotherSimpleProblemII.cpp | UTF-8 | 954 | 3.140625 | 3 | [] | no_license | #include <iostream>
#include <string>
#define M 10
using namespace std;
char cuadrado[M][M];
bool check(int i, int j, int n){
bool bien = true;
if(j + 1 < n)//derecha
if(cuadrado[i][j] == cuadrado[i][j + 1])
return false;
if(j - 1 >= 0)//izquierda
if(cuadrado[i][j] == cuadrado[i][j - 1])
... | true |
1649a26fac81d2d4d761bb97a7c5e63688cf76e7 | C++ | AditiB007/final-project-tdang018_abehe002_jnaje010 | /abstractFactory/iEquipment.cpp | UTF-8 | 184 | 2.546875 | 3 | [] | no_license | #include "iEquipment.h"
IEquipment::IEquipment(){
this->name = "";
}
void IEquipment::setName(string str){
this->name = str;
}
string IEquipment::getName(){
return this->name;
}
| true |
1541c31b03461d1ca436ab1e29f8907548938f16 | C++ | truszkowski/studies | /inzynieria-algorytmiczna/punkty2.cpp | UTF-8 | 2,510 | 2.796875 | 3 | [] | no_license | #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
const long MAX = 100000l;
__inline__ long long mul(long long a, long long b) { return a*b; }
__inline__ long long sq(long long a) { return a*a; }
long ch[MAX+1];
pair<long,long> v[MAX];
long chn = 0, vn = 0;
long long d = 0;
// Kierunek
long... | true |
dab28cfd763b4ac8fee6a84d7bf2966cee8d39a2 | C++ | animeshkarmakarAK/Computer-Programming | /LightOj/Lightoj1113Discover_the_web.cpp | UTF-8 | 1,367 | 2.875 | 3 | [] | no_license | /* solved by myself -- solved complete */
#include<bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
int t;
cin>>t;
for(int tc = 1; tc <= t; tc++){
printf("Case %d:\n",tc);
string command;
stack<string>forward,back;
string curr_page = "htt... | true |