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
77e128c332041bc9e71856936a0f7ec6c32b3928
C++
ymarion/geometry
/geometry/geometry/src/utils/CreateMap.hpp
UTF-8
2,606
3.109375
3
[]
no_license
/************************************************************************* CreateMap - Allows easy creation and initialization of a template map. ------------------- begin : Nov 13 2009 copyright : (C) 2009 by Vite Falcon on stackoverflow.com http://stackoverflow.com/questions/138600/in...
true
4b81ccfc0d19b04340a40a2c486bfdbc9d1dd737
C++
shortthirdman/code-eval-challenges
/quickstart/OverlappingRectangles.cc
UTF-8
1,205
3.609375
4
[ "MIT" ]
permissive
/* Overlapping Rectangles Share on LinkedIn Description: Given two axis aligned rectangles A and B, determine if the two overlap. Input sample: Your program should accept as its first argument a path to a filename. Each line in this file contains 8 comma separated co-ordinates. The co-ordinates are upper ...
true
8005c11186d6acf72be6efb3363ca00d17db9ad8
C++
huannd0101/KTLT_HaUI
/BTH6/Bai6.1.cpp
UTF-8
906
3.328125
3
[]
no_license
/*Bài 6.1. Viết chương trình cho phép nhập vào một xâu ký tự bất kỳ. Hãy cho biết xâu vừa nhập có bao nhiêu chữ cái thường? Xóa mọi ký tự ‘a’ ra khỏi xâu vừa nhập và in kết quả ra màn hình.*/ #include<bits/stdc++.h> using namespace std; int main(){ char *s = new char; cout << "Nhap xau: "; gets(s); in...
true
9102356a63beea5d50b8f30d09a826a87ecbf513
C++
Denisson001/TP-project-game
/source_files/modules/units.cpp
UTF-8
934
2.6875
3
[]
no_license
#include <units.h> #include <game_settings.h> void Unit::update(double time){ updateAttackModule(time); updateMovementModule(time); } sf::FloatRect Unit::getBounds(){ getShape()->setPosition(getPosition().x, getPosition().y); sf::FloatRect bounds = getShape()->getGlobalBounds(); bounds.left += bo...
true
578d86642c9a00fcf5098387ec79c850abd2310b
C++
lawesZhou/ccpp
/equity/static/static_data.cpp
UTF-8
473
2.71875
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include "static_data.h" std::vector<struct point> pointSet; StaticData::StaticData() { } void StaticData::print(MyPainterWidget *pw) { while (getnextdata()) { struct point p = getpointValue(); // printf("%d %lf\n", p.x, p.y); pointSet.push_back(p); } printf("point s...
true
4ee45ddc82ae483c467ae8f9a5aeba0ce9a1145d
C++
rKalb/MetroSwift
/Entertainment.cpp
UTF-8
2,671
2.578125
3
[]
no_license
#include "Entertainment.h" void Entertainment::play(QString filename){ _audio->stop(); _audio->setCurrentSource(Phonon::MediaSource("C:\\audio\\"+filename)); _audio->play(); _isPlaying = true; pauseChanged(); } void Entertainment::setVolume(double vol){ _out->setVolume(vol); } void Entertainmen...
true
4fb0ee12458f79df8e7b0845a7bdc8990039aae8
C++
zxymd5/miniBT
/TorrentParser.cpp
UTF-8
11,691
2.515625
3
[]
no_license
#include "TorrentParser.h" #include "deelx.h" #include <string.h> #include <assert.h> //#include <openssl/sha.h> #include "sha1.h" CTorrentParser::CTorrentParser(void) : m_lpContent(NULL) { } CTorrentParser::~CTorrentParser(void) { if (m_lpContent) { delete m_lpContent; m_lpContent = NULL; ...
true
5ff935c4481cd026f4a6346ce341ce747aa70a07
C++
brijrajk/DataStructuresCodeNCodeSeries
/NumberTheory/L21GCDSumEulerTotientCode/GCDSum.cpp
UTF-8
954
2.859375
3
[]
no_license
#include <iostream> using namespace std; int phi[1000001]; void initialize(int maxN) { for(int i = 0; i <= maxN; ++i) { phi[i] = i; } for(int i = 2; i <= maxN; ++i) { if(phi[i] == i) { // this is a prime no. for(int j = i; j <= maxN; j += i) { ...
true
cc02e495312d5c31459283b77436f7a355a42a0c
C++
michalsvagerka/competitive
/arch/rychlostne/ksp-t-sutaz-2/t2hvezdar.cpp
UTF-8
745
2.515625
3
[]
no_license
#include "../l/lib.h" // #include "../l/mod.h" class hvezdar { public: void solve(istream& cin, ostream& cout) { int T; cin >> T; for (int t = 0; t < T; ++t) { int x0,y0,x1,y1,x2,y2; cin >> x0 >> y0 >> x1 >> y1 >> x2 >> y2; bool detour = false; detour...
true
7e19f9e7929b92328b28cf3d99b30ec99701459b
C++
imac2018/project
/Between_Universe_Steeve/main.cpp
UTF-8
341
2.515625
3
[]
no_license
#include "mainwindow.h" #include <QApplication> #include <QMessageBox> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w(QPoint(0,0),QSize(500,500)); try{ w.show(); return a.exec(); } catch(std::exception e){ w.close(); QMessageBox::critical(NULL,"Error!", e.what(), QMessageBox::...
true
327feff27786ac8277d800f076912761b0cf8843
C++
bdurlock/Snow-Problem
/TreeLib/DerivedBasket.cpp
UTF-8
2,013
2.90625
3
[]
no_license
/** * \file DerivedBasket.cpp * * \author Brett Durlock */ #include "stdafx.h" #include "DerivedBasket.h" #include "Fruit.h" #include "FruitDrawable.h" #include <memory> using namespace Gdiplus; CDerivedBasket::CDerivedBasket() { } CDerivedBasket::~CDerivedBasket() { } /** * Set the position for the basket. *...
true
cd29c9b47ec1e7e601d3626d0d7964ad165c371d
C++
gnietoUOC/PLA9
/SmartHeat/Logger.cpp
UTF-8
886
2.71875
3
[ "Apache-2.0" ]
permissive
#include "Homie.h" int copy (char *in, char *out) { char bb[128]; int n; int rc=0; File fin = SD.open(in, FILE_READ); if (fin) { File fout = SD.open(out, FILE_WRITE); if (fout) { while ((n=fin.read(bb,sizeof(bb)))>0) { // Serial.println(n); fout.write(bb,n); } fout.c...
true
10b7725cdbdee8f686e7afd32ecbc5389ba7a718
C++
sty16/ship_detection_v2
/cuDevMat.h
UTF-8
1,655
2.640625
3
[]
no_license
#ifndef CUDEVMAT_H_ #define CUDEVMAT_H_ #include<cuda_runtime.h> #include<stdio.h> #include<cuComplex.h> #include<cublas_v2.h> #include"cuMacro.h" // write devmat because when in kernel dynamicly allocate 1kB space and the number of thread is 32x32 it will throw "out of memory" exception // so we allocate the memory in...
true
56e6c3579e439a158fd10fcd6436b6fbe8c0bb59
C++
abernalmac/FIB
/EDA/3-7.cc
UTF-8
1,107
3.09375
3
[]
no_license
#include <iostream> #include <vector> #include <list> #include <stack> #include <queue> using namespace std; typedef vector<vector<int>> graph; void topological_sort(graph &G, vector<int> &v) { int n = G.size(); priority_queue<int, vector<int>, greater<int>> s; for (int i = 0; i < n; ++i) if (v[...
true
b4861ccdb53e84fb4181362808a0f746d0ae9170
C++
Phanio/tp_c
/TP_C++/structures/structures.d/Map.h
UTF-8
3,247
3.34375
3
[]
no_license
/**************************************************************************** * * $Id: Map.h 1065 2007-03-29 15:38:54Z phil $ * ****************************************************************************/ #ifndef __MAP #define __MAP /******************************* * class role: simple (non-template) map implem...
true
fea8fcc32cb24c6d8aba71caa5065cb8e95ff44f
C++
liupeng625/DevBundle
/Dev/Segmentation/SegmentationCore/MRF/include/TRW-S.h
UTF-8
2,753
2.703125
3
[]
no_license
#ifndef __TRWS_H__ #define __TRWS_H__ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "mrf.h" class TRWS : public MRF{ public: typedef double REAL; TRWS(int width, int height, int nLabels, EnergyFunction *eng); TRWS(int nPixels, int nLabels,EnergyFunction *eng); ...
true
154e8d551bcc16db10c98ce6b0dbe1ece2be5eb2
C++
williamd4112/ProblemSolving
/nthu9018/nthu9018.cpp
UTF-8
989
3.125
3
[]
no_license
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <cstring> #define MAXID 1024 #define MAXN 1024 using namespace std; struct Compare { bool operator ()(const int& a, const int& b) { return a > b; } }; typedef struct Node { int id; priority_queue<int, ve...
true
023ae275d76465f4c8e38175448bf7de13cbdeda
C++
AoifePowders/BlindTransmission
/BlindTransButch/BlindTransButch/SoundEmitter.cpp
UTF-8
1,157
2.71875
3
[]
no_license
#include "SoundEmitter.h" double distance(sf::Vector2f v1, sf::Vector2f v2); SoundEmitter::SoundEmitter() { } SoundEmitter::~SoundEmitter() { } SoundEmitter::SoundEmitter(sf::Vector2f p, std::shared_ptr<Audio> a, int t, sf::Color c) { m_ttl = t; m_pos = p; m_circle.setOrigin(p); m_circle.setPosition(p); m_radiu...
true
41ae463b44eaea7748871e49d241967e5977f71c
C++
steinwurf/served-source
/src/examples/request_logger_plugin/main.cpp
UTF-8
2,442
2.6875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
/* * Copyright (C) 2014 MediaSift Ltd. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publ...
true
b99f00cc4e1d07832de867263a25d01bc47c4e64
C++
elijahlrc/WhatTheFlock
/Source/BoidStorm/BoidComponent.cpp
UTF-8
6,647
2.546875
3
[]
no_license
// Fill out your copyright notice in the Description page of Project Settings. #define print(text) if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 1.5, FColor::White,text) #include "BoidStorm.h" #include "BoidComponent.h" #include "FlockController.h" #include <cmath> //some constant coificents: float attractRange =...
true
b38ebfe4b6b1298cbc52729079147547bd67217b
C++
png85/dsnutil_cpp
/include/dsnutil/chrono/duration.hpp
UTF-8
1,017
2.546875
3
[ "BSD-3-Clause" ]
permissive
#pragma once #include <dsnutil/chrono/clock_type.hpp> #include <dsnutil/chrono/dsnutil_cpp_chrono_Export.h> namespace dsn { namespace chrono { class dsnutil_cpp_chrono_EXPORT time_point; class dsnutil_cpp_chrono_EXPORT duration : public clock_type::duration { public: duration() = default; ...
true
03f86c97d911cc82c9d02a8cdec572c0259e9d3d
C++
greenfox-zerda-sparta/juliabaki
/week_04/day_4_practice_inheritance/exercise_01/ex_03.1.cpp
UTF-8
1,655
3.75
4
[]
no_license
//============================================================================ // Name : 1.cpp // Author : juliabaki // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #includ...
true
6c2ba531d99fe6f9ed5f849589336ef8f0006e90
C++
Nickpofig/quick-hull
/source/algorithm/sequential.cpp
UTF-8
3,062
3.40625
3
[ "MIT" ]
permissive
// standard #include <iostream> #include <sstream> // external #include "omp.h" // internal #include "algorithm/sequential.hpp" namespace quick_hull { Algorithm_Sequential::~Algorithm_Sequential() { } std::vector<Vector2> * Algorithm_Sequential::run(const std::vector<Vector2> &points) { // Convex hull auto...
true
ae9c1bc7c605e7bf89887cfe5ea696fb8daf2e3f
C++
s87315teve/OOP_final_project
/Joker.cpp
UTF-8
4,070
2.953125
3
[]
no_license
#include"Joker.h" int choose=0; void throwCard (Player p1){ for(int i=0;i<14;i++){ for(int j=i+1;j<15;j++){ if((p1.hand[i]).face==(p1.hand[j]).face&&(p1.hand[i]).suit!=joker){ (p1.hand[i]).face=-1; (p1.hand[j]).face=-1; } } } sort_Card(p1); } void pickCard(Player p1,Player p2){ cho...
true
f7417403bbd868cca30ec1a0e09f08aa7dde1af4
C++
amoljore7/02-Logic-Building-Program-All
/06_Structure & Union/Assignment6.cpp
UTF-8
6,082
4.0625
4
[]
no_license
//////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // 6. Write a program which contains structures as car (name, type , price, color), // Sales_Person (name, designation, pointer to car structure), Car_Showroom(Name, address, Brand name, // pointer t...
true
ee7a9668bde37632264a4c2402cfedf5aa7972c2
C++
VardhanAditya123/Shell
/simpleCommand.cc
UTF-8
4,149
2.515625
3
[]
no_license
#include <cstdio> #include <cstdlib> #include "command.hh" #include "shell.hh" #include <unistd.h> #include <iostream> #include <string.h> #include <assert.h> #include <stdlib.h> #include <limits.h> #include <algorithm> #include <bits/stdc++.h> #include <string> #include <stdio.h> #include "string.h" #include <regex.h...
true
c2ec8fa4066ab9775e70f331318861131a754bab
C++
sacrex/leetcode
/LUOGU/Official/List111/P3743.cpp
UTF-8
2,184
2.53125
3
[]
no_license
// // Created by sacred on 20-8-29. // #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; //buf数组缓存数组(预读到buf数组) char Buf[1 << 16], *p = Buf, *q = Buf; #define Getchar() (p == q && (q = (p = Buf) + fread(Buf, 1, 1 << 16, stdin), p == q) ? EOF : *p++) inline int Read() ...
true
5d47a818c603429d491782f1d85f04c03ca23ceb
C++
zjhl2/ACM-template
/计算几何/pair.cpp
UTF-8
1,196
2.859375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef long double ld; typedef pair<ld,ld> P; #define X first #define Y second const ld eps=1e-6,pi=acos(-1); int sgn(ld x){ if (x<-eps) return -1; if (x>eps) return 1; return 0; } void read(ld &x){ static double d; scanf("%lf",&d); x=d; } P op...
true
9a482a2f911e7586f1f62dc9e0c216479b6e03eb
C++
bimalkant-lauhny/CP-Personal
/codeforces/424/Div2/B.cpp
UTF-8
743
2.59375
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s1, s2, t1; cin >> s1; cin >> s2; char charmap[26]; for (int i=0; i<s1.size(); ++i) { charmap[s1[i] - 'a'] = s2[i]; } cin >> t1; ...
true
f957a776a65916a300a5a92487dd541312161187
C++
thegamer1907/Code_Analysis
/CodesNew/349.cpp
UTF-8
830
2.84375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int sum[111111]; int binary_khoja(int num, int i, int n) { int lo, hi, mid, tm; lo = i, hi = n; while (lo <= hi) { mid = (lo + hi) / 2; tm = sum[mid] - sum[i - 1]; if (tm == num) return mid; else if (tm > num) ...
true
101fdb7cd588db24021663bd825565df27cb4f46
C++
Guillermo-Galdamez/Ejercicios-de-Cpp
/Colas/Colacircular2.cpp
UTF-8
1,934
4
4
[]
no_license
#include <stdio.h> #include <malloc.h> // Biblioteca para el manejo de memoria dinámica struct dato { // Se define la estructura a trabajr char info; struct dato *sig; // Se hace uso de apuntadores }; struct dato *inicio; // Se define el primer elemento void insertar (char car){ // push struct dato *temp, *aux; ...
true
ebc8cd54d8e9fd7e3f7a3cf05836d544e5be9b27
C++
bShaak/algos
/string_functions/strings.cpp
UTF-8
1,844
3.8125
4
[]
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; //ascii only bool allUniqueCharacters(string &s) { bool a[128];//128 ascii chars memset(a, false, 128); char tmp; for(auto it = s.begin(); it != s.end(); it++) { tmp = *it; if(a[tmp]) return false; a[tmp] = true; } return...
true
d2fc3d08905854720e31e36a92a135105c16a034
C++
Alienturnedhuman/UEA_YEAR2_PROG2_CW3_CPP
/MovieDatabase.h
UTF-8
2,803
3.25
3
[]
no_license
/* * File: MovieDatabase.h * Author: Benjamin Dickson * Info: A database for handling all of the movies * * My Movie.h and MovieDatabase files are quite integrated, as the Movie class * refers back to its parents to determine how the database wishes it to be * compared to another movie (eg, by title, year,...
true
f81dfa44c4f2620934b5087999d1f2fcda42eb13
C++
hosamk92/CompetitiveProgramming
/Codeforces/CF279-D2-C.cpp
UTF-8
1,554
3.09375
3
[]
no_license
/* make two arrays 1 for increasing the other for decrasing and put in every index the number of elements bigger or lower than this element and use both array to check the problem condtion */ #include <bits/stdc++.h> #include <fstream> typedef long long ll; typedef unsigned long long ull; typedef long double ld; ...
true
cdf0169bbc4fe291f410434f101b3d1d91561324
C++
annahung31/ADA2020
/hw2/towerDefense/main.cpp
UTF-8
1,836
2.65625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; long long int cell[100002]; long long int dp[2][100002]; long long int M1[100002]; long long int M2[100002]; void solu(long long int n, long long int k, long long int A, long long int B, long long int& defense_level){ long long int kk, i, j, temp, temp1, temp2; ...
true
062b7714e939e1c5061563c08fa3c90b5dc7d538
C++
EdgarFabiano/heroshima
/game/src/engine/Vec2.cpp
UTF-8
1,872
3.515625
4
[]
no_license
// // Created by edgar on 22/03/18. // #include "Vec2.h" Vec2::Vec2() : x(0), y(0) {} Vec2::Vec2(float x, float y) : x(x), y(y) {} Vec2 Vec2::Sum(Vec2 v) { return {x + v.x, y + v.y}; } Vec2 Vec2::Sub(Vec2 v) { return {x - v.x, y - v.y}; } Vec2 Vec2::Mul(const float escalar) { return {x * escalar, y * ...
true
72b8d67d69a4027df133c998e1efbcbae7ac9769
C++
rodrigmatrix/Estrutura_De_Dados_2019_1
/06_ordenacao/bubble_sort.cpp
UTF-8
527
3.265625
3
[]
no_license
#include <iostream> using namespace std; int main(){ int size; cin >> size; int array[size]; int maior = 0; for(int i = 0; i < size; i++){ cin >> array[i]; } for(int i = 0; i < size; i++){ maior = array[1]; for(int j = 0; j < size; j++){ if(array[i] < arr...
true
436ddb1407d5003d8eba8578ba5128708af5177d
C++
takami0223/Shooting_Game
/Score.h
SHIFT_JIS
1,284
2.734375
3
[]
no_license
#pragma once #include "define.h" enum ScoreData { HIGH_SCORE, CURRENT_SCORE, GRAZE_SCORE, STOCK_SCORE, LIFE_SCORE, POWER_SCORE, POWER_LIMIT_SCORE, SPEED_SCORE, SPEED_LIMIT_SCORE }; class Score { private: //OtBbNnh int g_board[6]; //p int g_number[10]; //p(ftHg) int g_hi_grazenumber[10]; //OCY̍ōBp int...
true
2a07519201f4e76fae9686574815339eb77b5174
C++
Rayzapper/HexStrategy
/Hex-Strategy/HexStrategy/Game.cpp
UTF-8
2,228
2.71875
3
[]
no_license
#include "Game.h" #include "GameStateManager.h" #include <iostream> #include <string> #include "DebugManager.h" static const string programName = "Hex Strategy"; static const int tileSize = 32; static int windowWidth = 800, windowHeight = 600; static bool focus = true; static sf::Vector2i mousePosition; static sf::...
true
7a7e425e2501c446ebb7df65ef87f34dcf09e67a
C++
Kiritow/OJ-Problems-Source
/HDOJ/1925_autoAC.cpp
UTF-8
1,273
2.796875
3
[]
no_license
#include<cstdio> #include<cstring> #include<iostream> #include<cmath> #include<vector> using namespace std; #define nMax 40 char s[nMax]; int m; class P { public: int x,y; P() {}; P(int x,int y):x(x),y(y) {}; void out() { printf("(%d,%d)\n",x,y); } }; P r...
true
006b29f86cf00c8a1d1f2e72fc54eba6482c8401
C++
seokwoongchoi/Astar
/App/App.h
UHC
774
2.8125
3
[]
no_license
#pragma once class App { public: App();// -> ʱȭ virtual ~App();//Ҹ -> ﶧ // ɼ ֱ⶧ Ҹ տ virtual //ӽÿ θ Ҹڿ virtual Ⱥپ ڽļҸڰ ȣ ȵ //츮 α׷ virtual WPARAM Run(); //Լ - ü //ڽŬ ǾѴ : ̵ virtual void Initialize() = 0; //ʱȭ virtual void Update() = 0; virtual void Render() = 0; virtual void PostRender() = 0; // ó ...
true
43aa1aa53f1d4f244cb2993f078056a8c65de83c
C++
clarkbains/wifi-clock
/src/lib/include/AlarmManager.hpp
UTF-8
5,819
2.78125
3
[]
no_license
#pragma once #include "time.h" #include "../../utilities/include/DelayedEvent.h" #define AlarmMaskDOW(dow, hh, mm) (uint32)((((hh)*60) + (mm)) + ((uint32)(dow) << 12)) #define AlarmMask(hh, mm) (AlarmMaskDOW((0b1111111), (hh), (mm))) enum DaysOfWeek { SATURDAY = 1 << 6, FRIDAY = 1 << 5, THURSDAY = 1 << 4, ...
true
8eb66d65a5f66d677e380aad05cd7602b6df8a7d
C++
jszuppe/camshift-opencl
/main.cpp
WINDOWS-1250
2,007
2.765625
3
[]
no_license
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #define __CL_ENABLE_EXCEPTIONS #include <CL\cl.hpp> #include "defines.hpp" #include "CamShift.hpp" using namespace cv; using namespace std; int main() { try { cvNamedWindow("main"...
true
44c203e648d832ac6cc6251fdbd467a613a1027f
C++
bsarvan/code_algorithms
/DecryptMessage.cpp
UTF-8
1,776
3.609375
4
[]
no_license
/* An infamous gang of cyber criminals named “The Gray Cyber Mob”, which is behind many hacking attacks and drug trafficking, has recently become a target for the FBI. After intercepting some of their messages, which looked like complete nonsense, the agency learned that they indeed encrypt their messages, and studied...
true
8d055a549d55f22a30880aece65f18645b372860
C++
ohjiwooo/c-algorithm-
/baekjoon/n3048.cpp
WINDOWS-1252
710
3
3
[]
no_license
#include<iostream> #include<vector> using namespace std; typedef struct s { char c; int d;//0-,1- }s; int n1, n2,t; int main() { cin >> n1 >> n2; vector<s>v(n1 + n2); for (int i = n1 - 1; i >= 0;i--) { cin >> v[i].c; v[i].d = 0; } for (int i = n1; i < n1+n2; i++) { cin >> v[i].c; v[i].d = 1; } cin...
true
d97c01c4ed2ca44194b5497dcfd10b402f3f7689
C++
fly8wo/Code----
/LyPAT/L1-012计算指数.cpp
UTF-8
150
2.59375
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int a,n; cin>>a; cout<<"2^"<<a<<" = "<<pow(2,a)<<endl; return 0; }
true
c6033d309ee0c880d54f7efdfc93b7142f14bfc1
C++
germanohn/competitive-programming
/tobi/dança_indigena.cpp
UTF-8
881
2.65625
3
[]
no_license
#include <cstdio> #include <algorithm> #include <set> #define MAXN 1005 #define MAX 1000005 using namespace std; int mod (int x, int y) { return ((x%y)+y)%y; } int main () { int n, e; pair<int, int> v[MAXN]; bool seq[MAX]; for (int i = 0; i < MAX; i++) seq[i] = false; scanf ("%d%d", &n, &e); int rta = n; ...
true
04e88d783e960b09c699bd3e6f7e019a7bb8ee16
C++
pcebollada/C
/Ficheros.5.cpp
ISO-8859-1
1,385
3.140625
3
[]
no_license
//Lectura hasta el final #include<iostream> #include<fstream> using namespace std; int main (){ int salir; string linea; ifstream fichero("wFichero6.txt"); //si queremos que funcione el nombre original es "Fichero6" /*ifstream es para declarar que vas a usar un fichero, y esa linea en el...
true
0be50f9bf646037e1c76e2609c1d2bf2d2264928
C++
strncat/competitive-programming
/uva/search/1260-sales.cpp
UTF-8
1,114
2.859375
3
[]
no_license
// // main.cpp // uHunt // // Created by FB on 7/01/19. // 1260 - Sales // #include <iostream> #include <vector> #include <set> #include <algorithm> #include <unordered_map> int main(int argc, const char * argv[]) { //clock_t begin, end; //double time_spent; //begin = clock(); //freopen("in.txt" ,...
true
d930e1019b3351c29a8ea841f983cc18aad98331
C++
irods/irods
/lib/core/include/irods/irods_environment_properties.hpp
UTF-8
3,064
2.796875
3
[ "BSD-3-Clause" ]
permissive
#ifndef IRODS_ENVIRONMENT_PROPERTIES_HPP_ #define IRODS_ENVIRONMENT_PROPERTIES_HPP_ #include "irods/irods_configuration_parser.hpp" #include "irods/irods_configuration_keywords.hpp" #include "irods/irods_exception.hpp" #include <map> namespace irods { static const std::string IRODS_JSON_ENV_FILE = "/.irods/iro...
true
eb016c51d6e25551e35d353800bd1d96cf20c259
C++
Kevinolinn8/Leetcode-
/C++/ConvertBinaryLinkedListToDec.cpp
UTF-8
1,459
3.625
4
[]
no_license
/* Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number. Return the decimal value of the number in the linked list. Example 1: Input: head = [1,0,1] Output: 5 Explanation: (101) in ba...
true
69dc905a7dbdbd60e8b579f11f140aedc5d4e71c
C++
try1117/Snake
/Snake/Game.cpp
UTF-8
3,101
2.796875
3
[]
no_license
#include <exception> #include <curses.h> #include <thread> #include <chrono> #include <algorithm> #include <fstream> #include "Game.h" #include "Utils.h" #include "Menu.h" GameParams::GameParams(std::string sp, std::string bp) : speed_param(sp), border_param(bp) { } Direction Controls::operator[](int key) { if (k...
true
994d32c1fd988e410cf017368967bf43649e8d2a
C++
isemciore/cal0
/calendarAndDate/bak/julian.hpp
UTF-8
5,139
3.03125
3
[]
no_license
// // Created by ezhang on 2015-10-18. // #ifndef CAL0_JULIAN_HPP #define CAL0_JULIAN_HPP #include "date.hpp" #include <string> #include <cmath> #include <stdexcept> #include <iostream> #include "kattistime.h" namespace lab2{ class Julian : public Date { public: Julian(); using Date::Date; ...
true
ac6b82e150a99913c08b2d8e5785f0459a17f219
C++
jungsu-kwon/ps-records
/leetcode/word-search/Wrong Answer/9-13-2020, 9:08:35 AM/Solution.cpp
UTF-8
1,167
3.21875
3
[]
no_license
// https://leetcode.com/problems/word-search class Solution { private : //std::vector<std::pair<int,int>> int nRows = 0 ; int nCols = 0 ; bool isWithinBound(int x , int y){ if (x < nRows && x >= 0 && y >= 0 && y < nCols) return true; return false; } bool search(std::vector<std::vector<char>>& board, st...
true
57ca1932bbd60c4725c42c3c6b63be6fbfbe29de
C++
jbrzusto/vamp-plugins
/lotek/testNarrowBandSpectralPulseFinder.cpp
UTF-8
2,251
2.703125
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdio> #include <stdint.h> #include <cmath> #include <vector> #include <stdlib.h> #include <time.h> #include "NarrowBandSpectralPulseFinder.h" int main (int argc, char *argv[]) { if (argc < 8 || argc > 9) { std::cout << "Usage: testSpectralPulseFinder RATE WIDTH...
true
455674acbf790c321d6b0326c1211b5b6f87047b
C++
immortalChensm/linux
/test/demo119.cpp
UTF-8
454
3.25
3
[]
no_license
// // Created by Administrator on 2020/6/1. // #include <iostream> #include <string.h> //数据类型转换 using namespace std; namespace test { int age=100; } int main() { cout<<test::age<<endl; using namespace test; cout<<age<<endl; float t = (float)age; cout<<t<<endl; printf("%lf\n",t); fl...
true
3d9364c4ae81471674297d889eeed40b2f4c349b
C++
HyoungHoKim/cpp_module_06
/ex00/Converter.hpp
UTF-8
579
3.03125
3
[]
no_license
#ifndef CONVERTER_HPP # define CONVERTER_HPP # include <string> # include <iostream> # include <cmath> # include <limits> class Converter { public: Converter(); ~Converter(); Converter(const Converter &_cv); Converter &operator=(const Converter &_cv); void toChar(char *str); void toInt(char *str); void toFloa...
true
69eef426346866c7827ef0637fd3211d72661b97
C++
imran1995/tiktok
/prime_seive.cpp
UTF-8
608
2.765625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; #define MAX 5000004 bool is_prime[MAX]; void f(int n) { is_prime[1]=false; is_prime[2]=true; for(int i=4;i<=n;i+=2){ is_prime[i]=0; } int k; for(int i=3;i<=(int)sqrt(n);i+=2){ k=i; if(is_prime[i]!=false){ ...
true
6b000be065ea6ff463d21cac42c2526b567b4b77
C++
DanielCuSanchez/vjudge-ejercicios-algoritmos
/EF_Algoritmos/Problem_2.cpp
UTF-8
1,152
2.90625
3
[]
no_license
/* Daniel Cu Sánchez - A01703613 ¿Cuál técnica de solución de problemas que emplearás? Explica el porqué de tu selección. (15%) R=Ocupe una solución iterativa, mediante el uso de ciclos y comparaciones. Desarrolla un algoritmo que dé solución al problema seleccionado. (70%) R=La solución se encuentra abajo docume...
true
18a492364e46ef74734689848a4b27255860b5c6
C++
dariuszlesiecki/OOP-1
/lab10/Data.h
UTF-8
454
2.796875
3
[]
no_license
#pragma once #include <iostream> #include <vector> #include <string> #include <algorithm> #include <functional> #include <initializer_list> #include <iomanip> #include <numeric> class Data{ public: Data(const std::string &s, std::initializer_list<double> v): _s(s),_v(v){} void print() const; ...
true
7be636c26c034593017cb6603d3a6c6da1969272
C++
DorukKantarcioglu/BankingSystem
/Person.cpp
UTF-8
1,316
3.578125
4
[]
no_license
/** * Implementation for the Person class. * Author: DorukKantarcioglu */ #include "Person.h" using namespace std; /// Parameterized constructor with default arguments Person::Person(string personName, int personCurrency, int personAccountNo) { name = personName; currency = personCurrency; accountNo = p...
true
f15dfa6efd0d8c020c397e217b5ac49b2ebb4566
C++
Akus0ni/expert-spoon-cpp
/C++_Practice/labwork/MyLab/Practice/002Player/Player.cpp
UTF-8
1,525
3.5625
4
[]
no_license
#include"Player.h" Player::Player()/*name("NULL"),age(0),country(NULL)*/ { strcpy(name,"NULL"); age = 0; strcpy(country,"NULL"); } Player::Player(char n[],int a , char c[])/*name(n),age(a),country(c)*/ { strcpy(name,n); age = a; strcpy(country,c); } Player::~Player() { } void Player::Accept() { //cin.ignor...
true
d82cab8a4663495902c3494a24612bbcf5df0640
C++
google/asylo
/asylo/platform/common/singleton_test.cc
UTF-8
3,449
2.71875
3
[ "Apache-2.0", "BSD-3-Clause", "BSD-4-Clause-UC", "BSD-2-Clause" ]
permissive
/* * * Copyright 2017 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
true
6e33db1cc9143bac353b5263ddec4cbbeea67864
C++
Krzywosz/Projekty-ZSK
/reku/fibbo reku.cpp
UTF-8
196
3.140625
3
[]
no_license
#include <iostream> using namespace std; int fibbo(int n){ if (n==2 || n==1) return 1; else return fibbo (n-1)+fibbo (n-2); } int main(){ int n; cin>>n; cout<<fibbo(n); }
true
5ab62d1e663ef4cfb9fd78c097e251038166dce7
C++
leo-gaorong/SE_Exercise
/main.cpp
UTF-8
2,604
3.9375
4
[]
no_license
#include<iostream> bool isWin(char game[3][3]){ bool win = false; if (game[0][0] == game[0][1] && game[0][1] == game[0][2] && (game[0][0] == 'X' || game[0][0] == 'O')) win = true; if (game[1][0] == game[1][1] && game[1][1] == game[1][2] && (game[1][0] == 'X' || game[1][0] == 'O')) win = true; if (g...
true
1b33428d14da9e76536320482286b666573a1121
C++
Andyt-Nguyen/c-basics
/looping/forLoop/main.cpp
UTF-8
1,087
3.765625
4
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { // for(int i {1}; i < 10; i++) { // cout << i << endl; // } // for(int i{0} i <= 10; i+=2) { // cout << i << endl; // } for(int i{1}, j{5}; i < 5; i++,j++) { cout << i << " + " << j << " = " << (i + j) << endl; } cout << "Vector examp...
true
af0691cbdada92456e5d30353349bad2a92f5278
C++
malul88/Data-Structures
/HW1/sales.cpp
UTF-8
1,094
2.921875
3
[]
no_license
// // Created by Michael Malul on 11/05/2021. // #include "sales.h" bool PriorityBySale::operator>(PriorityBySale p) const { if (num_of_sales > p.num_of_sales){ return true; } else if (num_of_sales < p.num_of_sales){ return false; } else { if (typeID < p.typeID){ return...
true
49335f71ab2f6857cfd8aebf44bdfa35f539491a
C++
jasper166/Competitive-Programming
/Biblioteca/Math/CRT.cpp
UTF-8
959
2.84375
3
[]
no_license
long long modinverse(long long a, long long b, long long s0 = 1, long long s1 = 0) { return b == 0 ? s0 : modinverse(b, a % b, s1, s0 - s1 * (a / b)); } long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); } long long mul(long long a, long long b, long long m) { long long q = (long double) a * ...
true
4768453a2b6524d84d004c2486c2b65dd0b44ae7
C++
tengfeizhilang/homework
/裴波数列.cpp
UTF-8
671
3.140625
3
[]
no_license
时间复杂度为O(n),空间复杂度为O(1) #include<iostream> #include<stdio.h> using namespace std; int pei(int n) { if(n==1||n==2){ return 1;} else{ return pei(n-1)+pei(n-2);} } int pei1(int n) { int a[n]; a[1]=1;a[2]=1; for(int i=3;i<=n;i++){ a[i]=a[i-1]+a[i-2]; } return a[n]; } int main() { ...
true
b67c3fcdddf4b471fe2f8b65b871f89df4721eb6
C++
bmkang-hi/Program-structure-proj2
/proj2ui.cpp
UTF-8
16,444
3.234375
3
[]
no_license
/********************************* // // Name: Brandon Kang // // Homework: Project 2 // // Class: ICS 212 // // Instructor: Ravi Narayan // // Date: 11/26/2016 // // File: proj2ui.cpp // // Description: Contains the UI functions and main method as well as any other helper f...
true
d435ebc52b48c7a188b4cd533ce1cf05a9bb1ef7
C++
Iliaromanov/Door-Detection
/robot_code_with_esp/robot_code_with_esp.ino
UTF-8
750
2.8125
3
[]
no_license
#include <Ultrasonic.h> #include <Servo.h> Servo scan_servo; Ultrasonic dist(6, 7); //ultrasonic sensor on pins 6 and 7 int start_of_range = 120; void setup() { scan_servo.attach(5); // servo on pin 5 scan_servo.write(start_of_range); Serial.begin(2400); pinMode (4, INPUT_PULLUP); } // to do: file making, f...
true
4d7d25cb96034f24a6a75c11372e5af8e45ecc62
C++
masimun/AMFBach
/source/AMFGraph.cpp
UTF-8
1,047
2.640625
3
[]
no_license
/* * AMFGraph.cpp * * Created on: 21-dec.-2013 * Author: Daan,Max */ #include "AMFGraph.h" AMFGraph::AMFGraph(const AMFunction & r1, const AMFunction & r2) { for (SmallBasicSet r : r2.getSets()) { set<SmallBasicSet> cr; for (SmallBasicSet s : r2.getSets()) { if (!r1.ge(r.setintersect(s...
true
53958ab8b1342d313ae01fa467bea13fbcc21f40
C++
GeorgiKatevski/Huffman-Compressing
/Huffman/Command.h
UTF-8
2,978
2.859375
3
[]
no_license
#pragma once #include "HuffmanAlg.h" #include "Implementations.h" //тук се взимат и изпълняват подадените команди //zip/unzip/info //за командите са използвани някои добри ООП-принцип -наследяване,полиморфизъм,абстракция,енкапсулация //от базиса на командата се наследява и от тази команда която е подадена c...
true
cef20271c1d2312a33cf4db630c9529fcf9ac18a
C++
bpass/cegis
/gctpdiff/gctpcpp/lambertazimuth.cpp
UTF-8
2,647
2.609375
3
[]
no_license
// $Id: lambertazimuth.cpp,v 1.1 2005/08/27 00:20:31 rbuehler Exp $ #include "lambertazimuth.h" LambertAzimuthal::LambertAzimuthal() : Projection(), m_sinCenterLat(0.0), m_cosCenterLat(0.0) { setNumber(LAMAZ); setName("Lambert Azimuthal"); } LambertAzimuthal::LambertAzimuthal(double gctpParams[], ProjUnit units, ...
true
5514a5a5ae3eb6364d8eb96858a53242b98d6608
C++
zhangqingqi/C_Practice
/Class_Practice/Cal/Cal.cpp
UTF-8
660
3.15625
3
[]
no_license
// Cal.cpp : 定义控制台应用程序的入口点。 //这个文件夹内的程序是我根据大话设计模式,用类的各种特性实现出的一个简单计算器 //简单工厂模式,用一个单独的类来做这个创造实例的过程,这就是工厂。在此程序中单独的类是指OperationFactory类 //通过测试,发现这个版本的GCC 对override不支持 #include <iostream> #include "OperationFactoryClass.h" int main(int argc, char * argv[]) { Operation *oper; oper=OperationFactory::createOperate...
true
0e2fce357891d8a164738f9ade77359b73e5d098
C++
seahorn/crab
/include/crab/domains/graphs/adapt_smap.hpp
UTF-8
8,091
2.875
3
[ "Apache-2.0" ]
permissive
#pragma once #include <crab/support/os.hpp> #include <memory> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsign-compare" /** * An adaptive sparse-map. * * Starts off as an unsorted vector, switching to a * sparse-set when |S| >= sparse_threshold * WARNING: Assumes Val is a basic type (so doesn'...
true
8fc85d4a257fdfa737389b2b28e408e6300b416b
C++
mcolula/CaribbeanOnlineJudge-Solutions
/frankzappa-p1096-Accepted-s816391.cc
UTF-8
1,192
3.28125
3
[]
no_license
#include <cstdio> #include <vector> #include <queue> #include <set> using namespace std; bool * marked; typedef struct { int ecount; int vcount; vector< set<int> >vertice; } graph; graph create(int n) { graph g; g.ecount = 0; g.vcount = n; g.vertice = vector< set<int> >(n); for (int i = 0; i < n; i+...
true
527ef74842d22762930d50f0e134299f98557e6a
C++
alpha74/iIB
/Programming/Backtracking/Gray_Code.cpp
UTF-8
1,561
3.234375
3
[]
no_license
// Start from list [0,1] // Follow steps in comments . // Solution is built from start bits. vector<int> Solution::grayCode(int A) { vector< vector<int> > list1, list2 ; vector<int> bit0, bit1 ; // Start with bits 0 and 1 bit0.push_back( 0 ) ; bit1.push_back( 1 ) ; list1.push_back( bit0 ) ; list1.push_...
true
46648af3612c26c01cdeb37bbb656bddda92546f
C++
saeedalsoufi/A-robot-game-in-c--
/Visits.h
UTF-8
282
2.734375
3
[]
no_license
#pragma once #include <string> using namespace std; class Visits { int entrytime; int exittime; string name; public: Visits(int x, int y, string z) : entrytime(x), exittime(y), name(z) {} int getEntryTime(); int getExitTime(); string getName(); };
true
ab661e74f0e6230d10bf63edc7ac919ca18b7ced
C++
qyearsley-zz/life
/board_unittest.cc
UTF-8
1,964
2.96875
3
[]
no_license
// Copyright 2017 Quinten Yearsley #include "./board.h" #include "gtest/gtest.h" TEST(EmptyConstructor, BoardIsEmpty) { Board b(2, 1); EXPECT_FALSE(b.at(0, 0)); EXPECT_FALSE(b.at(1, 0)); } TEST(StringConstructor, SmallBoard) { Board b("##\n.#\n"); EXPECT_TRUE(b.at(0, 0)); EXPECT_TRUE(b.at(0, 1)); EXPEC...
true
06146c98dc8541f7d9f4a2b3db46b869f9908b5e
C++
marrusian/CPP
/Programming Principles and Practices 2nd Ed/Chapter 20/Ex20.cpp
UTF-8
1,810
3.046875
3
[]
no_license
#include<iostream> #include<chrono> #include<list> #include<vector> #include<cstdlib> #include<fstream> #include<stdexcept> int main(void) { size_t N = 500; constexpr size_t limit = 1000000; srand(static_cast<size_t>(time(NULL))); std::vector<int> v; std::vector<int>::iterator iter; std::vecto...
true
6ba4a2f35435e44ded5e4c655b1b1b0777646fba
C++
losangler/C_project
/算法程序-用C++语言实现/ch8/变步长Witty方法.cpp
GB18030
2,289
3.125
3
[]
no_license
//䲽Witty.cpp #include <iostream> #include <cmath> using namespace std; //t ʼ㡣 //h ֲ //n һ΢ַз̸Ҳδ֪ //y[n] nδ֪ʼtĺֵ // nδ֪t+hĺֵ //eps ƾҪ //f ΢ַиҶ˺ֵĺ void witty(double t, double h, int n, double y[], double eps, void (*f)(double,d...
true
b960b4ad377decf79e100db0aa738a73a3b879eb
C++
ShadyF/Competitive-Programming-Problems
/UVa/10754 - Doves and Bombs.cpp
UTF-8
2,227
2.671875
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n, m; int dfs_num_counter; vector<int> dfs_num; vector<int> dfs_low; vector<int> dfs_parent; vector<int> articulation_vertex; vector<pair<int, int>> result; int dfs_root, root_children; vector<vector<int> > adj_list; void Articulatio...
true
7b86d009a2350f6048532b429ac33b8e362e1636
C++
m5knt/Pits
/Pits/String.hpp
UTF-8
4,911
2.765625
3
[ "MIT" ]
permissive
/** * @brief プログラムソース中の文字リテラルのエンコーディングを調べるユーティリティー * @author Yukio KANEDA * @file */ #ifndef PITS_STRING_HPP_ #define PITS_STRING_HPP_ #include <uchar.h> // __STDC_UTF_16__ __STDC_UTF_32__ #include <string> #if __cplusplus <= 201703L /// for C++17 char8_t enum char8_t : unsigned char; #endif /* * */ nam...
true
49e738c060837d597b9eb5f11012e04c7d6a787a
C++
danielarthurt/POO
/Project.cpp
UTF-8
2,461
3.234375
3
[]
no_license
#include <iostream> #include <string> #include <sstream> using namespace std; #ifndef Project_cpu1_file_cpp #define Project_cpu1_file_cpp //#ifndef Project_cpu2_file_cpp //#define Project_cpu2_file_cpp //#ifndef Project_bus_file_cpp //#define Project_bus_file_cpp //#ifndef Project_memory_file_cpp //#define Project_me...
true
e23edb1930cbd9e25fc28987b6034177519c6afa
C++
NisheethP/Bucking_Codes
/Buckling/Source.cpp
UTF-8
21,020
2.5625
3
[]
no_license
#include <boost\numeric\odeint.hpp> #include <SFML\Graphics.hpp> #include <iostream> #include <vector> #include <cmath> #include <string> #include <fstream> using ldouble = long double; using uint = unsigned short; using state_type = std::vector<ldouble>; const ldouble PI = acos(-1.0L); const double stepSize = 0.01; ...
true
38f2e69494dc1f385fa6918e09f74a9635a9d1de
C++
ShushGalstyan/Exercises-Chapter-6
/6_5_f.cpp
UTF-8
833
3.53125
4
[]
no_license
//Show the value of x after each of the following statements is performed: //a) x = fabs( 7.5 ) //b) x = floor( 7.5 ) //c) x = fabs( 0.0 ) //d) x = ceil( 0.0 ) //e) x = fabs( -6.4 ) //f) x = ceil( -6.4 ) //g) x = ceil( -fabs( -8 + floor( -5.5 ) ) ) #include <iostream> #include <cmath> using namespace std; int main() { ...
true
d53574360afc0f5a79e2aa2a4ec80195f0f10148
C++
simonlerpard/edaf30
/Labb2/Labb2U7/main.cpp
UTF-8
371
3.515625
4
[]
no_license
#include <iostream> using namespace std; int recursive(int n){ if(n==1) return 1; return n*n+recursive(n-1); } int iterative(int n){ int result = 0; for(int i=1;i<=n;++i){ result +=i*i; } return result; } int main(){ int n; cin >> n; cout << recursive(n) << endl; ...
true
16a077a0e2631ff6943b0421b8cb043b0fd2793f
C++
imvickykumar999/Early-Collections
/Calender 3 matrix.cpp
UTF-8
2,110
3.28125
3
[]
no_license
/* Wanna Find any day between year 2001 and 2100 ...Try to find Day on your next Birthday ;) Press < RUN > ...(at bottom right) --------------------------------- Write year as 19 (for example) Press Enter Write month as 12 Press Enter Write date as 27 Press Submit >>> You will get output as Friday ...
true
34e589347dc3a0b655d4cb49d9314f4a18f5a291
C++
dkgi/objects
/camera.h
UTF-8
2,233
3.15625
3
[]
no_license
#ifndef OBJECTS_CAMERA_H_ #define OBJECTS_CAMERA_H_ #include "config.h" #include "vector.h" #include "context.h" namespace objects { /** * TODO */ class Camera { public: // Default constructor places the camera at (0, 0, -5) facing down along the // positive z-axis. Camera() : position_(0.0, 0.0, -5...
true
d98b6553cb824b21dcf10f9bed0e1b252c8259ca
C++
tstivers/eXistenZ
/engine/render/old_frustrum.h
UTF-8
1,111
2.796875
3
[]
no_license
///////////////////////////////////////////////////////////////////////////// // render.h // rendering system interface // $Id$ // #pragma once namespace render { class CFrustum { public: // Call this every time the camera moves to update the frustum void CalculateFrustum(); // This takes a 3D point and r...
true
0aebc4fefdb74119e8e5ee6fa4fd3cb542f4ccda
C++
ylunalin/RMT3D
/Utilities/timer.hh
UTF-8
2,891
3.046875
3
[]
no_license
#ifndef TIMER #define TIMER #include <mpi.h> #include <vector> #include <cstdarg> enum unit{ second = 's', minute = 'm', hour = 'h', day = 'd' }; #define TIME_FUNC(TIMER_NAME, TIMER_NUM, FUNC_NAME){\ TIMER_NAME.tic(TIMER_NUM); \ FUNC_NAME(); \ TIMER_NAME.toc(TIMER_NUM);\ } #define TIME_FUNC_ARGS(TIM...
true
34116191e4efc0b74bb3f3681f767359e4269dbb
C++
Nrpickle/EECS162
/lab/3/search.cpp
UTF-8
634
3.375
3
[ "MIT" ]
permissive
/***************** * Buggy program #1 ****************/ #include <iostream> #include <string.h> int main(int argc, char** argv){ int i; char* str; char ch; bool found = false; if( argc != 3 ) { std::cout << "Usage: search <string> <character>" << std::endl; return(-1); } str = argv[1]; ...
true
3ad7e4105df642561a08f5341efa8ae59283779d
C++
10bulls/zumo1
/compass.cpp
UTF-8
1,829
2.59375
3
[]
no_license
#include <Arduino.h> #include <avr/EEPROM.h> #include "Robot.h" void dump_compass_config(LSM303 * compass, Stream * sout) { sout->print("compass.min(x,y,z) = "); sout->print(compass->m_min.x); sout->print(","); sout->print(compass->m_min.y); sout->print(","); sout->println(compass->m_min.z); sout->print...
true
59d230289e3200040183bf5f599a20399f0cfc65
C++
bitsbyte/data_structures_in_c
/graph/undirected/graph.h
UTF-8
498
2.953125
3
[]
no_license
#ifndef _GRAPH_H #define _GRAPH_H #include <istream> #include <ostream> #include <vector> class graph; std::ostream& operator<<(std::ostream &ost, const graph& g); class graph { public: graph(int V); graph(std::istream &ins); int v() const; int e() const; void add_edge(int v, int w); const std::vector<i...
true
3631468f81f81ee516c23a4f55ce089f598f05df
C++
ItaySharabi/Pandemic
/sources/Color.hpp
UTF-8
615
3.265625
3
[]
no_license
#pragma once namespace pandemic { enum Color{ Black, Blue, Red, Yellow }; static std::string getColor(const Color& color) { switch (color){ case 0: return "Black"; case 1: return "Blue"; case 2: ...
true
f0803ab509f9d324e555679c0493d6547e2c7e93
C++
fengqiang111/ce30_viz
/ce30_depthimage_viewer/image_manager.cpp
UTF-8
1,234
2.53125
3
[]
no_license
#include "image_manager.h" #include <QDebug> #include <iostream> using namespace std; using namespace ce30_driver; ImageManager::ImageManager() { } ImageManager::~ImageManager() {} unique_ptr<QPixmap> ImageManager::GetPixmap() { if (!image_) { return unique_ptr<QPixmap>(); } unique_lock<mutex> lock(image_...
true
b1d8f6e1928c681e5e6ebcf228f9250a29880676
C++
i-n-d-i/msu-practicum-5semestr
/home6/4.cpp
UTF-8
2,140
3.1875
3
[]
no_license
#include <iostream> #include <vector> class TTree { private: int32_t Size, l; int32_t Timer; std::vector<std::vector<int32_t>> Tree; std::vector<int32_t> Tin, Tout; std::vector<std::vector<int32_t>> Up; public: TTree(int32_t n); void ReadTree(std::istream& stream); void DFS(int32_t ver...
true
7ca8844085aad32f3f53f47f166b1e43647f6019
C++
FlandreZ/PAT-Basic
/1093_20.cpp
UTF-8
356
2.71875
3
[]
no_license
#include<iostream> #include<set> using namespace std; int main(){ set<char> s; int flag = 0; char ch = getchar(); while(flag != 2){ if(ch == '\n') flag++; else if(s.count(ch) == 0){ putchar(ch); s.insert(ch); } c...
true
a772b33b1610cd1ca395b6315c5828602a723912
C++
happyxgang/CodeExam
/data_stream.cpp
UTF-8
724
2.90625
3
[]
no_license
#include "data_stream.h" #include <iostream> #include <sstream> #include "utility.h" using std::string; using std::vector; using std::ifstream; namespace codemaster{ void DataStream::set_file(string filename){ this->_file.open(filename); if (this->_file.fail()){ // TODO: handle error properly exit(1); } } v...
true