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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
80a3438c0fd77ed4ddbff8030ba7f4ff554e7450 | C++ | yuktajuneja/Data-Structure-Coding-ninjas | /Graphs/Get_DFS.cpp | UTF-8 | 1,086 | 3.03125 | 3 | [] | no_license | #include<iostream>
#include<vector>
using namespace std;
bool GetPathDFS(int** edges,int n,int a,int b,bool* visited,vector<int> &v){
if(a==b){
v.push_back(a);
visited[a]=true;
return true;
}
visited[a]=true;
for(int i=0;i<n;i++){
if(i==a){
continue;
}
if(edges[a][i]==1&&!visited[... | true |
bead2c59e43f4f6a416e8c63aafe8adce9b85b0b | C++ | ssynn/PAT_advanced | /1070. Mooncake.cpp | UTF-8 | 818 | 2.859375 | 3 | [] | no_license | #include"stdafx.h"
#include<iostream>
#include<vector>
#include<string>
#include<iomanip>
#include<algorithm>
using namespace std;
struct good
{
double stock;
double total;
double price;
};
bool cmp(good &a,good &b)
{
return a.price > b.price;
}
int main()
{
int n, sum, k = 0, haha = 0, yu = 0, yu2 = 0, yu1 = 0;
... | true |
ce4eb6c3957fe38d72d25e6fa76362e28d188469 | C++ | keewon/winter-source-beta-3 | /card.cpp | UTF-8 | 2,651 | 2.984375 | 3 | [] | no_license | #include "card.h"
#include "random.h"
#include <fstream>
Card::Card(int no) {
set(no);
}
Card::
Card()
{
num=0; atr=0; mon=0; rmn=4;
}
void Card::set(int no)
{
if(no >0 && no <= 50)
{
num=no;
mon=(num-1)/4+1; //고유 번호로 달을 정한다.
rmn=num%4;
// atr
//NULL:0 광:1 비광:2
//열(일반):3 열(쌍피):... | true |
22bc0e9436dc883eb5925c62dee649bb6c5127f6 | C++ | denocris/Object-Oriented-Programming | /D2/Vect2D_class/vect2D.hh | UTF-8 | 930 | 3.046875 | 3 | [] | no_license | #include <iostream>
#include <cmath>
class Vec_2D{
private:
double x_;
double y_;
double r_;
double phi_;
public:
Vec_2D();
Vec_2D(double x1, double y1 );
double length() const;
double r() const {return r_;};
double phi() const {return phi_;};
int x() const {return x_; };
int y() const {r... | true |
6585ab68a04c26c53031375dbf65c916e2b6fcc5 | C++ | MultivacX/leetcode2020 | /algorithms/medium/0640. Solve the Equation.h | UTF-8 | 1,629 | 3.390625 | 3 | [
"MIT"
] | permissive | // 640. Solve the Equation
// Runtime: 0 ms, faster than 100.00% of C++ online submissions for Solve the Equation.
// Memory Usage: 6.1 MB, less than 100.00% of C++ online submissions for Solve the Equation.
class Solution {
public:
string solveEquation(string equation) {
const int N = equation.length();
... | true |
81302b7f3b0c1b259c408151242555a0fb32c5f5 | C++ | naturalatlas/node-gdal | /src/gdal_point.cpp | UTF-8 | 4,772 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | #include "gdal_common.hpp"
#include "gdal_geometry.hpp"
#include "gdal_point.hpp"
#include <stdlib.h>
namespace node_gdal {
Nan::Persistent<FunctionTemplate> Point::constructor;
void Point::Initialize(Local<Object> target)
{
Nan::HandleScope scope;
Local<FunctionTemplate> lcons = Nan::New<FunctionTemplate>(Point... | true |
1306c8808bbd697c4146479b48d5d010fb1aa88a | C++ | Redleaf23477/ojcodes | /codejam/2008-1A-C.cpp | UTF-8 | 1,300 | 2.671875 | 3 | [] | no_license | //
#include <bits/stdc++.h>
#define endl '\n'
#define int ll
using namespace std;
typedef long long ll;
typedef vector<vector<ll>> Mat;
ll n;
void init();
void process();
int32_t main()
{
ios::sync_with_stdio(false); cin.tie(0);
int T, caseN = 0; cin >> T;
while(T--)
{
cout << "Case #" << ++... | true |
5432c997c4d1387efdea5043631689133431d41e | C++ | winlp4ever/cpp_exs | /codejam/roundingerr/main.cpp | UTF-8 | 2,150 | 3.140625 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
typedef std::pair<int, double> p;
class Solution {
public:
int largest_possible(const int &N, const int &L, const std::vector<int> &vec) const{
std::vector<p> residuals;
double coef = 100.0 / N;
double rd = coef ... | true |
69ffc2f373b9b3a63d9e43c221cdfc15eb51b092 | C++ | madhav-bits/Coding_Practice | /leetDiagTraverseII.cpp | UTF-8 | 3,646 | 3.484375 | 3 | [] | no_license | /*
*
//******************************************************1424. Diagonal Traverse II.***********************************************
https://leetcode.com/problems/diagonal-traverse-ii/description/
Given a list of lists of integers, nums, return all elements of nums in diagonal order as shown in the below images.
... | true |
c6c5c747c517a67a81ae47907e45ee8b6dbe1ff8 | C++ | matthewlouis/OneHorseTown | /OdinEngine/includes/Odin/PhysicalComponent.hpp | UTF-8 | 4,911 | 2.78125 | 3 | [] | no_license | #pragma once
#include <Box2D/Box2D.h>
#include "Math.hpp"
namespace odin
{
inline b2Vec2 getShapePosition( const b2Shape* shape )
{
if ( shape->m_type == b2Shape::e_circle )
{
return static_cast< const b2CircleShape* >( shape )->m_p;
}
else if ( shape->m_type == b... | true |
5ec1c513f9b1f34c1832416a64f0d1a870d1f5d0 | C++ | gybing/RobertC | /Temporary_File/Temporary_File/Temporary_File.cpp | UTF-8 | 1,577 | 2.71875 | 3 | [] | no_license | // Temporary_File.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <Windows.h>
#include <iostream>
#define BUFFSIZE 1024
int main()
{
TCHAR wPath[MAX_PATH];
LPWSTR fullName = new TCHAR[MAX_PATH];
TCHAR buf[BUFFSIZE];
DWORD dwAlreadySize = 0;
BOO... | true |
349ff8c5786affe1cb0d34742729564c3bcc755c | C++ | jebreimo/DemReader | /extras/deminfo/src/deminfo.cpp | UTF-8 | 1,949 | 2.765625 | 3 | [
"BSD-2-Clause"
] | permissive | //****************************************************************************
// Copyright © 2020 Jan Erik Breimo. All rights reserved.
// Created by Jan Erik Breimo on 2020-09-18.
//
// This file is distributed under the BSD License.
// License text is included with the source distribution.
//************************... | true |
9481f4acaf434e1e298329c6f15e37e7821f2093 | C++ | 64octets/rfirstraytracer | /src/Trimesh.cpp | UTF-8 | 1,131 | 2.8125 | 3 | [] | no_license | #include "trimesh.h"
Trimesh::Trimesh(const std::vector<vec3> &verts) : verts(verts)
{
calcBounds();
}
void Trimesh::calcBounds()
{
bounds_min = vec3(FLT_MAX, FLT_MAX, FLT_MAX);
bounds_max = vec3(FLT_MIN, FLT_MIN, FLT_MIN);
for (size_t i=0; i<verts.size(); i++){
const vec3 &v = verts[i];
bounds_min = min(bou... | true |
065dccbe92437204c6924813c8fa54b714d733bf | C++ | kyduke/Coding | /LeetCode/739_DailyTemperatures.cpp | UTF-8 | 1,161 | 3.109375 | 3 | [] | no_license | // https://leetcode.com/problems/daily-temperatures/description/
class Solution {
public:
vector<int> dailyTemperatures(vector<int>& temperatures) {
map<int, vector<int>> history;
map<int, vector<int>>::iterator it;
vector<int> arr;
vector<int> ans;
int i, j;
... | true |
a6fbf9e36008bfd0bd54e9efd28fe02c3cc82fc6 | C++ | Alex-Shahane/stepik-cpp-basic | /module-3/step-3-10.cpp | UTF-8 | 868 | 3.5625 | 4 | [] | no_license | #include <iostream>
#include <cstddef> // size_t
#include <cstring> // strlen, strcpy
#include <algorithm> // std::swap
struct String {
String(const char* str = "")
: size(strlen(str))
, str(new char [size + 1]) {
strcpy(this->str, str);
}
String(size_t n, char c)
: size(... | true |
6fbb26193c087972acfc736c48fd23c5dd69693f | C++ | fpdjsns/Algorithm | /programmers/Dev-matching/다단계 칫솔 판매.cpp | UTF-8 | 1,300 | 3.375 | 3 | [
"MIT"
] | permissive | /**
* problem : https://programmers.co.kr/learn/courses/30/lessons/77486
* time complexity : O(N + M) // N = |enroll|, M = |seller|
*/
#include <string>
#include <vector>
#include <unordered_map>
using namespace std;
/**
* enroll : 판매원 이름
* referral : 다단계 조직에 참여시킨 판매원 이름
* seller : 판매원 이름
* amount : 판매량 집계 데이... | true |
83caa94ec6f42b2a4f0dcbca7c2fbd95a183a97d | C++ | ljt12138/Hyper-OS | /src/syscall/syscalls/sys_parent.cpp | UTF-8 | 453 | 2.59375 | 3 | [] | no_license | /**
* syscall/syscalls/sys_parent.cpp
* get process id of parent
*/
#include "sys_parent.h"
#include "../../process/process.h"
#include "../../logging/logging.h"
#include "../../status/status.h"
#include "../../core/core.h"
sys_parent::sys_parent()
:syscall_t(syscall_id_t::PARENT)
{
}
int sys_parent::process()
{... | true |
04290fe2a258fb91022a38ebe20baf076eb2ff2c | C++ | kkubunge/Common | /CTC_PE_ALD/Function/Function_Maint_Run/Source/TransferArea.cpp | UTF-8 | 7,842 | 2.765625 | 3 | [] | no_license | // TransferArea.cpp: implementation of the CTransferArea class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "TransferArea.h"
#include "Area.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
/////////////////... | true |
2e6165e20464ff2b6045bc4ec71533f44aff56c5 | C++ | wadong100/System-Software-Experiment-3 | /lab3/Space.cpp | UTF-8 | 2,029 | 2.875 | 3 | [] | no_license | #include "Space.h"
using namespace std;
Space::Space(){
int i;
state = 'N';
for(i=0;i<4;i++){
emptytime[i] = 0;
returntime[i] = 0;
}
}
string Space::getusername(){
return username;
}
char Space::getstate(){
return state;
}
void Space::setuserborrow(string mem_name, int* nowd,... | true |
9001fefccb7f86ece147c807d5bc3705ec7b1338 | C++ | bence7999/InterQiew | /Tests/Excercise_19.cpp | ISO-8859-2 | 6,649 | 3.625 | 4 | [] | no_license | #include "Excercices.h"
#include <functional>
#include <vector>
#include <algorithm>
#include <string>
#include <cassert>
namespace Ex19 {
class A
{
public:
A() : m_size(sizeof(A)) { // 8 byte -> virtual table (4), variable (4)
std::cout << "A: " << m_size << std::endl;
}
public:
virtual void f() const... | true |
d10534ace2f7665c428899ac7a186184fc5b81e6 | C++ | longxiangbaby/FlagGame | /Classes/control/GameControl.cpp | UTF-8 | 1,393 | 2.921875 | 3 | [] | no_license | #include "GameControl.h"
#include "global.h"
static GameControl* p_gameControl=nullptr;
GameControl::GameControl(void):
player(nullptr),
isPause(true)
{
}
GameControl::~GameControl(void)
{
CC_SAFE_DELETE(player);
CCLOG("GameControl is destroy!");
m_camps.clear();
}
GameControl* GameControl::getInstance()
{
i... | true |
d4e7a53b975382c8ac1c9fcb53375e357881ec9f | C++ | almoreir/algorithm | /cd4/PDS/soop/HANOITOW.CPP | UTF-8 | 225 | 2.640625 | 3 | [] | no_license | #include<stdio.h>
#include<conio.h>
void hanoi(int n,char a,char b,char c)
{
if(n>0)
{
hanoi(n-1,a,c,b);
printf("%dth plate %c to %c\n",n,a,b);
hanoi(n-1,c,b,a);
}
}
void main()
{
clrscr();
hanoi(4,'a','b','c');
}
| true |
11b461f9db22b5d8e463ebd680f02772308d6728 | C++ | overnew/CodeSaving | /블랙잭.cpp | UTF-8 | 872 | 3.234375 | 3 | [] | no_license | // 쉬운 부스트포스트
// https://www.acmicpc.net/problem/2798
#include <iostream>
#include <algorithm>
using namespace std;
int N; //카드개수
int M;
int number[100];
int BlackJack(){
int sum=0;
int answer=0;
int answer_temp=0;
for(int i=0; i<(N-2) ;++i){
sum += number[i];
for(int j= i+1 ; j<(N-1) ;++j){
... | true |
ecbe0de52a9410bbb5153beaf91a260f8c823fe0 | C++ | ananda1066/ECS60Programs | /BTreeImplementation/LeafNode.h | UTF-8 | 533 | 2.828125 | 3 | [] | no_license | #ifndef LeafNodeH
#define LeafNodeH
#include "BTreeNode.h"
class LeafNode:public BTreeNode
{
int *values;
int leafSize;
public:
LeafNode(int LSize, InternalNode *p, BTreeNode *left,
BTreeNode *right);
int getMinimum() const;
LeafNode* insert(int value); // returns pointer to new Leaf if splits
// else... | true |
79881a4c2758e845d2486c47aaec3e3ec55f43fe | C++ | sagar-viradiya/DS-Algo-C | /Leetcode/MostFrequentElements.cpp | UTF-8 | 1,045 | 3.453125 | 3 | [] | no_license | #include<iostream>
#include<queue>
#include<vector>
#include<unordered_map>
using namespace std;
// Inputs
vector<int> nums {1, 1, 2, 2, 2, 3, 3, 3, 3, 3};
int k = 2;
unordered_map<int, int> freq;
auto compare = [](int a, int b) { return freq[a] < freq[b]; };
int main(int argc, char const *argv[]) {
// PQ... | true |
31a1de72adb7af1ce1028b43a47f6266a24f3f84 | C++ | Efore/BaldLionEngine | /BaldLionEngine/src/BaldLion/SceneManagement/SceneManager.cpp | UTF-8 | 2,255 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | #include "blpch.h"
#include "SceneManager.h"
#include "Serialization/SceneSerializer.h"
namespace BaldLion
{
namespace SceneManagement {
HashMap<StringId, Scene*> SceneManager::m_activeScenes;
Scene* SceneManager::m_mainScene;
void SceneManager::Init()
{
m_activeScenes = HashMap<StringId, Scene*>(Alloc... | true |
c060fd05312f825dbf64f49e251d6a1cf0943b91 | C++ | rodrigobedoya/vli2_modelo_contagio_enfermedades | /cell_grid.cpp | UTF-8 | 3,269 | 3.25 | 3 | [] | no_license | #include "cell_grid.h"
#include <iostream>
#include <stdlib.h>
CellGrid::CellGrid(float numberX, float numberY):
number_of_cellsX(numberX),
number_of_cellsY(numberY),
dead(false),
death_count(0)
{
grid.reserve(number_of_cellsY);
for(int i = 0;i < number_of_cellsX;i++)
{
std::vector<Cell*> newV;
new... | true |
6ac12f5a2441e4b200c1e6bd3a13712272688815 | C++ | thrs79136/CPP-Templates | /hashtable.hpp | UTF-8 | 1,151 | 3.5625 | 4 | [] | no_license | #include <iostream>
#include <vector>
using namespace std;
template<class K>
using hashfunc = long(*)(K);
template<class T, class K>
using getKey = K(*)(T);
template<class T, class K>
class HashTable{
public:
HashTable(long size, hashfunc<K> pf, getKey<T,K> gK);
void addEntry(T data);
T getEntry(K key);
templat... | true |
0d9e628e13ac32e9624553c674cd93c953d3125a | C++ | whitychen/myPT | /include/camera.hpp | UTF-8 | 2,583 | 3.171875 | 3 | [] | no_license | #ifndef CAMERA_H
#define CAMERA_H
#include "ray.hpp"
#include <vecmath.h>
#include <float.h>
#include <cmath>
class Camera
{
public:
Camera(const Vector3f ¢er, const Vector3f &direction, const Vector3f &up, int imgW, int imgH)
{
this->center = center;
this->direction = direct... | true |
8a03f87ff771442ca1cbbf92be7617314336512c | C++ | shadmansaleh/CharScreen | /src/charScreen/CharScreen.cpp | UTF-8 | 3,904 | 3.609375 | 4 | [] | no_license | #include "CharScreen.h"
#include <cstdlib>
//initiates screan by allocating requiared mwmory and cleaning terminal
void CharScreen::init(int W,int H)
{
if( H > 0 && W > 0 )
{
height = H;
width = W;
scr = (char*)std::malloc(H * W * sizeof(char));
if(scr){
std::memset(scr,' ',height*width);
... | true |
092c0b48db962c5015695c12e4a94cd178773a0d | C++ | Majroch/cppev3dev-code-examples | /menu.cpp | UTF-8 | 1,811 | 3.421875 | 3 | [] | no_license | #include <iostream>
#include "ev3dev.h"
#include <unistd.h>
/**
* Returns:
* U - Up
* D - Down
* L - Left
* R - Right
* B - Back
* E - Enter
*/
char getch() {
ev3dev::button up(ev3dev::button::up);
ev3dev::button down(ev3dev::button::down);
ev3dev::button left(ev3dev::button::left);
ev3... | true |
40e4b4583c588d65945db87007f93d5a678b37f9 | C++ | dot-Sean/src | /cc/impsep/impsep.cpp | UTF-8 | 1,278 | 3.09375 | 3 | [] | no_license | #include "impsep.h"
// -------------------------------------------------------------------
#undef i
#define i(member) pimp->member
class ImpSepImp {
public:
ImpSepImp(float, float);
float fReal;
float fImag;
};
ImpSepImp::ImpSepImp (
float fRealArg,
float fImagArg ) : fReal(fRealArg), fImag(fImagArg... | true |
40ae290045537f8b8839b034bcd20456c531b7ef | C++ | lemonacy/QtPractice | /FileDialog/mainwindow.cpp | UTF-8 | 1,989 | 2.8125 | 3 | [] | no_license | #include <QTextEdit>
#include <QFileDialog>
#include <QFile>
#include <QMessageBox>
#include <QTextStream>
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->actionOpen->setShortc... | true |
b0cc39f8b4cc4e9594e1ddc1e4d47948e87dd361 | C++ | mohamedsamir1495/Duck-Duck-Go-Tested-Version | /Duck Duck Go Tested Version/app/src/main/cpp/third-party/bloom_cpp/src/BloomFilter.cpp | UTF-8 | 6,548 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | /*
* Copyright (c) 2018 DuckDuckGo
*
* 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 agreed ... | true |
3d454bda7766b9afb9679e3d3799c800ab4c8aaf | C++ | jacobfrank96/muffinman | /lab3/FiveCardDraw.cpp | UTF-8 | 1,942 | 2.859375 | 3 | [] | no_license | #include "stdafx.h"
#include "deck.h"
#include "functions.h"
#include "game.h"
#include "FiveCardDraw.h"
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <random>
#include <chrono>
#include <memory>
#include "stdafx.h"
#include "deck.h"
#incl... | true |
4df1e106abb81268592fae23dd01a7c2aee25513 | C++ | tgibbons95/Source | /DataStructure/test/test_Stack.cpp | UTF-8 | 423 | 3.265625 | 3 | [] | no_license | #include "gtest/gtest.h"
#include "DataStructure/Stack.h"
TEST(Stack, PushPop)
{
const int TEST_ARRAY_LENGTH = 20;
int testArray[TEST_ARRAY_LENGTH] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };
DataStructureT::Stack<int> stack;
for (int i = 0; i < TEST_ARRAY_LENGTH; i++)
{
stack.Push(testArray[i]... | true |
445eee847946d6b0cc3eecae0de88e135ac5fb08 | C++ | wangyunfeifeifei/AlgorithmNote | /ch3/pat_b1006.cpp | UTF-8 | 267 | 2.546875 | 3 | [] | no_license | #include<stdio.h>
int main() {
int n;
scanf("%d", &n);
int b=n/100;
int s=(n/10)%10;
int x=n%10;
for(int i=0;i<b;i++)printf("B");
for(int i=0;i<s;i++)printf("S");
for(int i=1;i<=x;i++)printf("%d",i);
printf("\n");
return 0;
} | true |
4f719937070f8e4a74a08b65f11cd741c571e0e4 | C++ | AyushP90/dalhurst_valley | /Dalhurst Valley/Dalhurst Valley/Menu2.cpp | UTF-8 | 2,986 | 2.890625 | 3 | [] | no_license | #include "Menu2.h"
Menu2::Menu2(float x, float y, float height, char *menu1, char *menu2)
{
soundBufferSwing.loadFromFile("assets/sounds/sword_swing.wav");
soundSwing.setBuffer(soundBufferSwing);
soundBufferHit.loadFromFile("assets/sounds/sword_metal_hit.wav");
soundHit.setBuffer(soundBufferHit);
soundSwing.set... | true |
a38eb5b211207e2abd6ccc11704206b96ba5494c | C++ | atrimuhammad/Assignment | /CSE 102/loop assignment 12.cpp | UTF-8 | 729 | 2.796875 | 3 | [] | no_license | /**
Tanvir Hasan
Uap, 31st Batch
email: tanvir002700@gmail.com
**/
#include<stdio.h>
int main()
{
printf("enter the line num that contain maximum blanks:");
int b;
scanf("%d",&b);
int a=b-1;
for(int t=1;t<=(b*2-1);t++)
{
printf("*");
}
printf("\n");
for(int i=1;i<=a;i++)
{
for(int j=1;j<=(a+1)... | true |
d722b257f21476ae723b98d6f4ce864b1e1e37d6 | C++ | olnayoung/coding | /2751.cpp | UTF-8 | 896 | 3.125 | 3 | [] | no_license | #include<cstdio>
int N;
int map[1000000], ans[1000000];
int merge(int left, int mid, int right) {
int i, j, k;
i = left; j = mid + 1; k = left;
while ((i <= mid) && (j <= right)) {
if (map[i] <= map[j]) {
ans[k++] = map[i++];
}
else {
ans[k++] = map[j++];
}
}
if (i > mid) {
for (int t = j; t <=... | true |
fb14128fc6e896433cabee4efffe1bb2ce3826f8 | C++ | melival/cppjun | /cpp/test_task_cpp/TZinfo.cpp | UTF-8 | 535 | 2.65625 | 3 | [] | no_license | #include "TZinfo.hpp"
int TZinfo::load_base(std::string fname){
std::string tzname;
int tzhours = 0;
int tzmins = 0;
std::ifstream tz_file(fname);
if (!tz_file.is_open()){
return -1;
}else {
while (!tz_file.eof()){
tz_file >> tzname >> tzhours >> tzmins;
if ((tzname == "")||(tzname ... | true |
c6f2e705bf5692246749d9b18e6ac84fea2bec68 | C++ | arangodb/arangodb | /3rdParty/boost/1.78.0/boost/dll/detail/demangling/demangle_symbol.hpp | UTF-8 | 2,222 | 2.703125 | 3 | [
"BSL-1.0",
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode... | permissive | // Copyright 2015 Klemens Morgenstern
//
// This file provides a demangling for function names, i.e. entry points of a dll.
//
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DLL_DEMANGLE_SYMBOL_HPP_
#define BOOST_DLL_DEMANGLE_SYMBOL_HPP_
#inc... | true |
a52a2485e209faced7fbb0c713e072a66eeb4e4d | C++ | thejosess/Informatica-UGR | /1º AÑO/1ºCuatrimestre/FP/Practicas/Practica 5 Matrices/ejercicio 2.cpp | UTF-8 | 1,000 | 3.15625 | 3 | [] | no_license | #include <iostream>
using namespace std ;
int main (){
const int MAX_FIL = 100, MAX_COL = 100;
bool colrep , colunica;
int i, j, k , cu , FilEncontrado, ColEncontrado;
double m[MAX_FIL][MAX_COL];
int f, c;
cu=0;
do{
cout << "Introducir el numero de filas: ";
... | true |
95b5197cef478761a74f423407f0446c94ba56ac | C++ | ShahidAkhtar777/HACKTOBERFEST2020 | /C++/NewtonRapshon/newtonRaphson.cpp | UTF-8 | 833 | 2.96875 | 3 | [] | no_license | #include <stdio.h>
#include <conio.h>
#include <math.h>
#define f(x) (5*x*x*x*x*x-3*x*x-100)
#define g(x) (25*x*x*x*x-6*x)
#define E 0.00001
int main()
{
float ecal,xi,x0,count;
printf("\n************************Newton Raphson Method**********************************\n");
printf("\n Enter initial value x0 = ");
... | true |
0dd3a897fcc592fb2b43b6b281cbf63c31b6042c | C++ | bkmiecik12/List1 | /OtherNumber.h | UTF-8 | 444 | 2.609375 | 3 | [] | no_license | #include <iostream>
#include "RealNumber.h"
using namespace std;
class OtherNumber
{
public:
RealNumber number1; //
OtherNumber(RealNumber);
~OtherNumber();
OtherNumber add1(OtherNumber&);//dodawanie
OtherNumber multiply1(OtherNumber&);//mnozenie
//void separate(); //kropka [.] oddziela
void display1(); //w... | true |
d1f8988124b07be350e5770d56e8aaefde9ebe2b | C++ | misakamijou/AirCombatGameDemo | /huge_plane/huge_plane/diablo.cpp | GB18030 | 9,233 | 2.515625 | 3 | [] | no_license | #include"definition.h"
#include<math.h>
#include<cmath>
#define pi 3.14159265358979323846
Boss1::Boss1()
{
int hitbox_[2] = { 360,360 };
x = 1800;
y = 360;
hitbox[0] = hitbox_[0];
hitbox[1] = hitbox_[1];
hp = 0;
speed = 5; //лٶ
loadimage(&img, _T("IMAGE2"), _T("Boss1"), 480, 480, true);
loadimage(&maskbitmap... | true |
2ca899512d78706106b648d915c4a86333b43506 | C++ | gagan86nagpal/SPOJ-200 | /CATM/main.cpp | UTF-8 | 2,018 | 2.671875 | 3 | [] | no_license | #include <iostream>
#include <cmath>
#include <queue>
using namespace std;
int mouse[101][101],cat1[101][101],cat2[101][101];
int vis[101][101];
queue < pair <int, pair <int,int > > > q;
void bfs(int x[101][101],int sx,int sy,int n,int m)
{
int i,j;
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
vis[i][j]... | true |
87b88f4871a7e8bc0dc56c3d772bafc1a5c12f4d | C++ | truong02bp/C- | /ctdl/bai52.cpp | UTF-8 | 731 | 2.71875 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
string s;
vector<int> cnt;
int temp;
bool result()
{
int size = s.length();
if (size%2==0)
{
if (temp > size/2)
return false;
return true;
}
else
if (temp > size/2+1)
return false;
return true... | true |
93451c969e330be8905f6f01ad9b2fbc56047ae2 | C++ | AlMamun-CSE/competitive_programming | /Codeforces/1579C - Ticks/c.cpp | UTF-8 | 2,794 | 2.65625 | 3 | [] | no_license | #include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <bitset>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
#in... | true |
5093324209fd0b7a3ccf06fcadae520eb1d92ca1 | C++ | PSDent/DX11_2D-Game-Engine | /DX2DGame/Timer.cpp | UTF-8 | 1,266 | 2.78125 | 3 | [] | no_license | #include "Timer.h"
#include <Windows.h>
Timer::Timer()
{
}
Timer::~Timer()
{
}
void Timer::Initialize()
{
QueryPerformanceFrequency((LARGE_INTEGER*)&m_frequency);
if (m_frequency == 0)
return;
m_ticksPerMs = (float)(m_frequency / 1000);
QueryPerformanceCounter((LARGE_INTEGER*)&m_startTime);
m_timeStoragy ... | true |
5bf3275d95c4a4f4da7c364b1a5e577a7ecfed14 | C++ | 3l-d1abl0/DS-Algo | /cpp/practise/max_build_speed_prac.cpp | UTF-8 | 387 | 2.546875 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int arr[2*N];
for(int i=0; i<2*N; i++)
cin>>arr[i];
sort(arr, arr+2*N);
long long int sum=0;
for(int i=0; i<2*N;i++)
cout<<arr[i];
cout<<endl;
for(int i=0; i<2*N; ... | true |
f72a1e8152bf24e1302e10f1fec9c52a87eb559f | C++ | cjhgo/leetcode | /518_Coin_Change_2.cpp | UTF-8 | 1,853 | 2.6875 | 3 | [] | no_license | #include"struct_define.h"
#include<iostream>
#include<vector>
#include<string>
#include<map>
using namespace std;
static const auto x=[](){
std::ios::sync_with_stdio(false);
std:cin.tie(nullptr);
return nullptr;
}();
class Solution
{
public:
int change(int amount, vector<int>& coins)
{
int n = c... | true |
c4718fad256c9466f9b95dbf009f1e830c70fecb | C++ | andalevor/resampline | /src/main.cpp | UTF-8 | 6,792 | 2.8125 | 3 | [
"MIT"
] | permissive | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
#include <cassert>
#include "params.hpp"
#include "error.hpp"
using namespace std;
vector<pair<double, double>> get_data(params &p);
vector<pair<double, double>> parse_input(istream &input);
vector<pair<doub... | true |
d27fe9d604ab12b6bba9b06c49edac8a6cb428b6 | C++ | ChristianReifberger/skip-set | /main.cpp | UTF-8 | 1,846 | 3.296875 | 3 | [] | no_license | #include "skip_set.h"
#include <iostream>
#include <string>
#define RUN(X) std::cout << "================================" << std::endl \
<< "---- " << (#X) << " ----" << std::endl; \
(X); \
std::cout << "================================" << std::endl << std::endl
#define LOG(X) std::cout << (#X) << std::endl;... | true |
9201d7fb74a8c313425e08adea9b39a526897e93 | C++ | Wahabmughal077/OOP-lab-1 | /7.cpp | UTF-8 | 197 | 2.9375 | 3 | [] | no_license | #include<iostream>
using namespace std;
int main()
{
char c;
cout<<"Enter character for which you wants to find the ascci code ";
cin>>c;
cout<<"Assci code of "<<c<<" is "<<int(c);
}
| true |
d9d03361c9de6807913a02155065f95b8880191c | C++ | Hopson97/SFML-Imgui-OpenGL-Example | /src/Maths.cpp | UTF-8 | 1,666 | 3.09375 | 3 | [] | no_license | #include "Maths.h"
glm::mat4 createModelMatrix(const Transform& transform)
{
glm::mat4 matrix{1.0f};
matrix = glm::translate(matrix, transform.position);
matrix = glm::rotate(matrix, glm::radians(transform.rotation.x), {1, 0, 0});
matrix = glm::rotate(matrix, glm::radians(transform.rotation.y), {0, 1... | true |
c1a72b97abcbab07dc4209158ab5b9a73ba56860 | C++ | ChrisKru/bOS | /Memory/PageTable.h | WINDOWS-1250 | 942 | 3.171875 | 3 | [] | no_license | #pragma once
#include <vector>
#include <iostream>
class PageTable {
private:
int ID; // ID przechwyconego procesu do tablicy stronic
int pages; // ilo stronic zalena od rozmiaru procesu
public:
std::vector<int> FrameNumber; // tablica, zawierajca w sobie numer ramki dla kadej ze stronic
std::... | true |
9542a01e0f16e794ee74c4271925d243aac48c79 | C++ | InsaDams/Qualite_Logicielle | /Qualite_Logicielle/CCompas.cpp | ISO-8859-1 | 825 | 3.109375 | 3 | [] | no_license | #include "CCompas.h"
//Affecte les positions de dparts x et y
void CCompas::SetStart(Pos start)
{
pos_x = start.x;
pos_y = start.y;
}
//Dplace le robot d'une case vers la droite
void CCompas::MoveRight()
{
pos_x = pos_x + 1;
}
//Dplace le robot d'une case vers la gauche
void CCompas::MoveLeft()
{
pos_x = pos_x -... | true |
fbbe55b344f262fbef3518a7e3306fc09d00bea2 | C++ | hmnt007/CPP-Pogramming | /Leetcode/Leetcode Daily/May/19thMay21.cpp | UTF-8 | 953 | 3.375 | 3 | [] | no_license | // https://leetcode.com/explore/challenge/card/may-leetcoding-challenge-2021/600/week-3-may-15th-may-21st/3748/
/**
Minimum Moves to Equal Array Elements II
Solution
Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal.
In one move, you can increment o... | true |
f314f79ed4425d2f4d2f0ad2d708a01a117ff17f | C++ | Jay-Ppark/Algorithm | /10828_스택.cpp | UTF-8 | 938 | 3.421875 | 3 | [] | no_license | #include<iostream>
#include<vector>
#include<string>
using namespace std;
vector <int> v;
string command;
void push(int num){
v.push_back(num);
}
int pop(){
if (v.empty())
{
return -1;
}
else
{
int temp = v.at(v.size() - 1);
v.pop_back();
return temp;
}
}
int size(){
return v.size();
}
bool empty(){
if... | true |
4a51522ae17adeb4d5d4018aad4179198750beb5 | C++ | srandonova18/deistviq-s-mnojestva | /deistviq-s-mnojestva/Presentation.cpp | UTF-8 | 8,015 | 3.375 | 3 | [] | no_license | #include <iostream>
#include "Data.h"
#include "Presentation.h"
using namespace std;
//function that graphically displays the union of two sets
void unionGraphic() {
cout << endl;
cout << " * * * * * *" << endl;
cout << " ********** **********" << endl;
cout << " *********** ** ***********" << endl;
... | true |
d64ea0de5c22af94c22fffe6892f67173508cb4f | C++ | sperrys/comp117_rpc | /tcp.cpp | UTF-8 | 2,036 | 2.984375 | 3 | [] | no_license | #include "tcp.h"
using namespace std;
using namespace C150NETWORK;
size_t read_message_size(C150StreamSocket *socket) {
char buffer[30];
char *buff_ptr = buffer; // next char to read
ssize_t readlen; // amount of data read from socket
for (unsigned int i = 0; i < sizeof(buffer); i++) {
readlen ... | true |
0fac656c3a0edda60b43a89973cf25d297262c8e | C++ | NLGRF/Workshop-Arduino-SUT | /Code/EXERCISES/Interruptor_Ex1/Interruptor_Ex1.ino | UTF-8 | 285 | 2.71875 | 3 | [] | no_license | // Interrupter Test by polling
int pin_Counter = 3;
int counter = 0;
void setup() {
pinMode(pin_Counter,INPUT);
Serial.begin(9600);
}
void loop() {
int isCount = digitalRead(pin_Counter);
if (isCount == 1) {
counter++;
Serial.println(counter);
delay(500);
}
}
| true |
d563bc1a33ec0f0556b3e8c4015a5360d5490962 | C++ | ForPertP/HackerRank-in-a-String- | /HackerRank-in-a-String-.cpp | UTF-8 | 340 | 2.703125 | 3 | [] | no_license | string hackerrankInString(string s)
{
std::deque<char> dq = {'h', 'a', 'c', 'k', 'e', 'r', 'r', 'a', 'n', 'k'};
for (const auto & c : s)
{
if (c == dq[0])
{
dq.pop_front();
if (dq.empty())
{
return "YES";
}
}
}
... | true |
b2bfd163a2cb4304d62f3d9042fc72c3ab30c770 | C++ | mosemb/C- | /MyCodeSchool/LinkedList/main.cpp | UTF-8 | 316 | 3.015625 | 3 | [] | no_license | #include <iostream>
#include "Link.h"
using namespace std;
int main() {
Link *temp ;
std::cout << "How many numbers " << std::endl;
int n , x;
cin>> n;
for(int i = 0; i<n; i++){
cout << "Enter number ";
cin>> x;
temp->insert(x);
}
temp->print();
return 0;
} | true |
f6c37fec502698ab5deee43bebc4d85e4cd3671c | C++ | kedebug/AlgoTraining | /poj/1178/10931454_AC_47MS_416K.cc | UTF-8 | 2,526 | 2.96875 | 3 | [] | no_license |
//
// http://blog.csdn.net/lijiecsu/article/details/7579855
//
#include <cstdio>
#include <cstdlib>
#include <cstring>
const int INF = 0x7FFF;
int king_move[8][2] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
int knight_move[8][2] = {{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}};
int king_m... | true |
b34f3fb15c839ab57878ed366f820b2c3fc54375 | C++ | timruning/leecode | /IntersectionofTwoLinkedLists1/IntersectionofTwoLinkedLists1/IntersectionofTwoLinkedLists1.cpp | GB18030 | 1,625 | 3.546875 | 4 | [] | no_license | // IntersectionofTwoLinkedLists1.cpp : ̨Ӧóڵ㡣
//
#include "stdafx.h"
#include<iostream>
#include<vector>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) ... | true |
2972de5b2f9c97b769b26628050656247cadb197 | C++ | jayirum/ChartProjSvr | /Source/FBI/HashMap/SimpleMapSKey.h | UHC | 1,157 | 2.515625 | 3 | [] | no_license | #pragma once
#include "MapClassSimpleBase.h"
class CSimpleMapSKey
{
public:
CSimpleMapSKey();
~CSimpleMapSKey();
bool Initialize(VAL_TYPE valType);
void DeInitialize();
bool AddValue(char* key, char* val, int nValLen, bool bUpdate = true);
bool AddValue(char* key, long* val, int nValLen, bool bUpdate = tr... | true |
7d4625e190a1a85a44fb6fe18e400a57db2b0700 | C++ | rahulsa123/Programming | /Sorting/insertionSort.cpp | UTF-8 | 473 | 2.890625 | 3 | [] | no_license | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
vector<int> InsertionSort(vector<int> a){
for(int i=1;i<a.size();i++){
for(int j=i;j>-1 && a[j-1]>a[j];j--){
int temp =a[j-1];
a[j-1]=a[j];
a[j]=temp;
}
}
return a;
}
int main(){
ios_base::sync_with_stdio(f... | true |
c19614fa57b7583dc08757905d07615112917222 | C++ | 1124418652/data_structure_and_algrithom | /SVD/main.cpp | UTF-8 | 438 | 3.078125 | 3 | [] | no_license | #include <iostream>
using namespace std;
int **createArray();
void main()
{
int **b = createArray();
for (int i=0; i<5; i++)
{
// for (int j=0; j<5; j++)
//cout<<b[i][j]<<endl;
}
string a="adfagargha";
cout<<a.length()<<int(1.2)<<endl;
}
int **createArray()
{
int **a;
a = new int*[5];
for (int i=0; i<5... | true |
bc26e1cd7b9a28740eda308922849d27dd0e877c | C++ | thorout/ConsoleApplication4 | /ConsolePatterns/Proxy.cpp | UTF-8 | 1,504 | 3.28125 | 3 | [] | no_license | #include "Proxy.h"
class Subject
{
public:
virtual ~Subject() { }
virtual void RequestComplexData() = 0;
virtual void RequestSimpleData() = 0;
};
class RealSubject : public Subject
{
public:
void RequestComplexData() override { std::cout << "Real object with big comlex data!" << std::endl; }
void RequestSimple... | true |
03958fcf7fee3f38e338a23b9cc3ab5f7bb16350 | C++ | HaikuArchives/DockBert | /source/OffscreenView.h | UTF-8 | 1,316 | 2.71875 | 3 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | #ifndef OFFSCREEN_VIEW_H
#define OFFSCREEN_VIEW_H
#include <View.h>
#include <Bitmap.h>
#include <Locker.h>
class TOffscreenView : public BView
{
public:
TOffscreenView( BRect rect )
: BView( rect, "TOffscreenView", B_FOLLOW_ALL, B_WILL_DRAW )
{
fBitmapBuffer = new BBitmap( rect, B_RGBA32, true );
fBitmapBuff... | true |
d7c5aa85b2d9fa3e2f79af8162476f02b4109a75 | C++ | tkemmer/badhron | /src/cpp/reports.cpp | UTF-8 | 2,013 | 2.875 | 3 | [
"MIT"
] | permissive | #include "reports.h"
#include <iomanip>
#include <string>
namespace badhron {
using std::ostream;
using std::string;
// ================================================================================================================
// report::impl
class report::impl {
public:
explicit impl(
string functi... | true |
c94692eef5c298602b8c7e02c1008240bbb201dd | C++ | DustinCraggs/SpaceBoat | /Physics/Particles/Graphics.cpp | UTF-8 | 2,237 | 2.578125 | 3 | [] | no_license | #include "Graphics.hpp"
#include <iostream>
#include <unistd.h>
#include <math.h>
#include "shader.hpp"
Graphics::Graphics() : physics(1, 300){
initWindow();
particleShader = compileShader("particle");
particleRenderer.initialise(1000);
// TESTING
prev = std::chrono::high_resolution_clock::now();
}
unsigne... | true |
fa270d971e752ca492ec0e0292fbb852f0ace5d2 | C++ | reclaimingmytime/lillabeler | /Lillabeler.cpp | UTF-8 | 848 | 2.765625 | 3 | [
"MIT"
] | permissive | /*
Lillabeler.cpp
Dependency: OpenCV 4.5.2
A piece of software which can automagicly label your pictures via the use of a digital twin.
*/
#include "Import.hpp"
#include "BBFinder.hpp"
#include "Formatter.hpp"
#include "Export.hpp"
#include <filesystem>
Import Im;
BBFinder Find;
Formatter Format;
Export Ex;
std... | true |
ae0f7a70bed0de075e6d7863836f642ade92fde9 | C++ | kushalarora/codes | /codesprint/isFibbo.cpp | UTF-8 | 442 | 2.78125 | 3 | [] | no_license | #include<iostream>
#include<set>
const long long MAX = 10000000000;
using namespace std;
int main() {
long long T, n1 = 0, n2 = 1, n;
cin >> T;
set<long long> s;
s.insert(n1);
//init
while (n2 <= MAX) {
s.insert(n2);
long long tmp = n2;
n2 = n1 + n2;
n1 = tmp;
... | true |
a55361c352f93948c9c228697d09f068b5b3b16c | C++ | Aestheticism1/Leetcode-PAT-CCF | /PAT/Advanced/A081_gcd.cpp | UTF-8 | 643 | 2.5625 | 3 | [] | no_license | #include <iostream>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b){
return b==0 ? a : gcd(b, a%b);
}
int main()
{
int N;
cin >> N;
ll rn, rd;
scanf("%lld/%lld", &rn, &rd);
for(int i = 0; i < N-1; ++i){
int n, d;
scanf("%d/%d", &n, &d);
rn = rn * d + n *... | true |
94945301502b85b1ea362b54b474f2f509948834 | C++ | luisa-maria1111/Hacker_Blocks_CPP | /count_digits_decimal.cpp | UTF-8 | 1,003 | 3.890625 | 4 | [] | no_license | /*
HACKER BLOCKS : COUNT DIGITS (accepts decimal numbers)
@author: Luísa Maria Mesquita
*/
#include <iostream>
#include <string>
using namespace std;
int countDigit(const string &num, const string &digit)
{
int count = 0, remainder;
string testingDigit;
for(int i = 0; i <= num.length(); i++)
... | true |
74a7b3c89a7738287faaa7df548694cdd3ec7adc | C++ | MatMarkiewicz/University | /Term 6/SK (Computer networks)/P1/mateusz_markiewicz/main.cpp | UTF-8 | 1,995 | 2.6875 | 3 | [] | no_license | // autor: Mateusz Markiewicz 298653
#include "sender.h"
#include "receive.h"
bool isIpAddr(char *str)
{
struct sockaddr_in sai;
int res = inet_pton(AF_INET, str, &(sai.sin_addr));
return res != 0;
}
int main(int argc, char *argv[])
{
if (argc != 2){
fprintf(stderr,"Wrong number of arguments\n");... | true |
982b8520dc8df5830abf2528b654125e34c8c713 | C++ | Art17/Kpi-1 | /courses/prog_base/labs/lab2/arrays/main.cpp | UTF-8 | 3,193 | 3.265625 | 3 | [] | no_license | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
const int n0 = 4;
const int n1 = 1;
const int nMax = 511;
int counts[nMax];
int max (int x, int y)
{
return (x > y) ? x : y;
}
int min (int x, int y)
{
return x < y ? x : y;
}
void fillRand2 (int arr[], int size)
{
for (int i = 0... | true |
fbea2d9fc31133ca9b80bdeca5b63b5ecc22ebad | C++ | derlistigelurch/RobotCommander | /MapDisplay/src/MapDisplay.cpp | UTF-8 | 2,666 | 2.71875 | 3 | [] | no_license | #include <iostream>
#include <fstream>
#include "../include/TileTypes.h"
#include "../include/Colors.h"
#include "../../MessageManager/include/ConfigManager.h"
int main()
{
while(true)
{
std::string line;
std::ifstream pipe(ConfigManager().mapPipe);
std::cout << CLEAR;
if(!pi... | true |
798f0c316cc8d9958de1038f78a7540bf07ac2f2 | C++ | manalikale/Linked-List | /IterativeReversal.cpp | UTF-8 | 2,047 | 4.34375 | 4 | [] | no_license | /*Iterative reversal of a linked list
Time comlexity:O(n) where n is th enumber of elements in the linked list
eg: 1-2-3-4-5->NULL
current=1
next=current->next i.e. next=2
current->next=prev i.e. current->next=NULL;
prev=current i.e. prev=1
current=next i.e. current=2
Lastly after all the elements are r... | true |
346ede55236d179d37c84ac00839e7fae2731127 | C++ | 0ashu0/CProgramming | /IMPORTANT PROGRAM/CWP117.CPP | UTF-8 | 537 | 3.25 | 3 | [] | no_license | #include<iostream.h>
#include<conio.h>
void main()
{
int a[100];
int i,j,n,x,count=0;
clrscr();
cout<<"How many elements(not more than 100)=";
cin>>n;
cout<<"Enter elements=";
for(i=0;i<n;i++)
cin>>a[i];
cout<<"Enter the elemnt to be deleted=";
cin>>x;
i=0;
while(i<n)
{
while(i<n&&a[i]!=x)
i++;
... | true |
a3e54cc5a5f57fecb15803d5bc1e0c9e0c81635d | C++ | JoeriR/comboboy | /src/hitbox.cpp | UTF-8 | 1,543 | 3.15625 | 3 | [] | no_license | #ifndef HITBOX_CPP
#define HITBOX_CPP
#include "hitbox.h"
// Doesn't detect collision between attacks and the dummy when the dummy is in the left corner
bool collisionUsingOverlap(Hitbox *hitbox1, Hitbox *hitbox2) {
bool doesWidthOverlap = (hitbox1->x <= (hitbox2->x + hitbox2->width)) && ((hitbox1->x + hitbox1->... | true |
5d8dfab0f61822842a7fa3a42ec6ca7530c943ac | C++ | Westblat/Settlers | /src/gamewindow.h | UTF-8 | 2,341 | 2.578125 | 3 | [] | no_license | #ifndef GAMEWINDOW_H
#define GAMEWINDOW_H
#include <QWidget>
#include <QPushButton>
#include <QtWidgets>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QTimer>
#include <QLabel>
#include <QString>
#include <QGraphicsPixmapItem>
#include <QMouseEvent>
#include "game.h"
#include "map.h"
#include "terraini... | true |
b539d3ec08f7fbb4e805a0ba890e71024dace28c | C++ | sfox33/ITCS-6114---Algorithms-and-Data-Structures | /Prime Factorizer/PrimeFactorizer.h | UTF-8 | 328 | 2.703125 | 3 | [] | no_license | #ifndef PRIMEFACTORIZER_H
#define PRIMEFACTORIZER_H
#include <vector>
class PrimeFactorizer
{
public:
PrimeFactorizer();
virtual ~PrimeFactorizer();
void factorize(int num);
bool isPrime(int num);
protected:
private:
std::vector<int> primes;
};
#endif // PRIMEFACTO... | true |
2fe7f2e58f4d4604630ba819b9f23f5a1bc9aa60 | C++ | skiry/Highschool | /latime-liste/main.cpp | UTF-8 | 841 | 2.578125 | 3 | [] | no_license | #include <fstream>
using namespace std;
ifstream f("date.in");
ofstream g("date.out");
struct nod{int nr;
nod *urm;};
int c[100],n,i,j,viz[100],u,p1,prim;
nod *l[100];
void parc()
{
nod *p;
if(prim<=u)
{
g<<prim<<" "<<u<<endl;
p=l[c[prim]];
while(p)
{
... | true |
46e28936135f64d6c467c403f6b24f56f73579c8 | C++ | Knothe/DungeonTextGame | /ProyectoFinal/DungeonGame/PlayerSaver.h | UTF-8 | 629 | 2.953125 | 3 | [] | no_license | #pragma once
#include <vector>
#include <array>
using std::vector;
using std::array;
struct PlayerSaver {
int room_id;
int sword;
int shield;
vector<int> key_list;
int life;
int rooms_passed;
int mana;
short bosses_defeated;
array<short, 4> loot_list;
void operator=(PlayerSaver other){
... | true |
5d64c49f8a3bd528cabfe21828431090fd1169ad | C++ | ThatBeanBag/Slimfish | /Robotron/Source/DirectX9Framework/Events/EventData_Collision.h | UTF-8 | 1,455 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | //
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2005 - 2015 Media Design School
//
// File Name : EventData_Collision.h
// Description : CEventData_Collision declaration file.
// Author : Hayden Asplet.
// Mail : hayden.asplet@mediadesignschool.com
//
#pragma once... | true |
832c8ece90b5a1eccb00fe9e873416fcccd104f6 | C++ | aayn/myNEAT | /crossover_test.cpp | UTF-8 | 1,687 | 2.6875 | 3 | [] | no_license | #include <iostream>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <cstdio>
#include "genome.h"
#include "organism.h"
#include "innovation.h"
using namespace std;
int MAX_NEURONS, INIT_NEURONS;
int main() {
srand(static_cast<unsigned> (time(0)));
MAX_NEURONS = 100;
INIT_NEURONS = 5;
Organism d... | true |
1d11f829ea35650168f1c28cea264271edc0cab4 | C++ | Kamil96/ProjektSokoban | /Sokoban2/Sokoban2/Sokoban2/Licznik.h | UTF-8 | 679 | 3 | 3 | [] | no_license | #pragma once
#include <SFML/Graphics.hpp>
class Licznik : public sf::Drawable
{
public:
Licznik(const std::string& prefixText, const sf::Vector2f& position, const sf::Font& font);
Licznik operator++(int);
Licznik operator--(int);
void reset();
std::string toString()
{
return std::to_string(liczba);
}
... | true |
f6f8a64047e5b7ec876ce29a6c305b26121f43f9 | C++ | morell5/HSE-Course | /seminars/seminar12/3.cpp | UTF-8 | 214 | 2.546875 | 3 | [] | no_license | #include <iostream>
#include <vector>
namespace std {
template<typename T, typename Arg>
unique_ptr<T> make_unique(Arg&& arg) {
return unique_ptr<T>(new T(std::forward<Arg>(arg)));
}
}
int main() {
} | true |
ef02d170a5ec8f5c158c21e0b40ce2821cd300f9 | C++ | karikera/ken | /KR3/util/serializer.h | UTF-8 | 6,931 | 2.734375 | 3 | [] | no_license | #pragma once
#include <KR3/main.h>
#include <KR3/math/coord.h>
#include <vector>
namespace kr
{
template <typename OS> class Serializer;
template <typename IS> class Deserializer;
namespace _pri_
{
template <typename T, bool is_class> struct BaseSerialize;
template <typename T> struct BaseSerialize<T, true>
... | true |
f6ce40bd5ce1ea3c42a6544efe23f22ea07d3236 | C++ | jaumeMA/CommAlg | /YTL/types/smartPtr/reference_counter.h | UTF-8 | 3,799 | 2.765625 | 3 | [] | no_license | #pragma once
#include "Utils/cMacroHelper.h"
#include <atomic>
#include <cstddef>
#ifdef _DEBUG
#define LENT_WITH_LOGIC
#endif
namespace yame
{
namespace ytl
{
enum class Policy
{
Shared,
Unique
};
class lent_reference_counter
{
#ifdef LENT_WITH_LOGIC
public:
lent_reference_counter()
: m_numWeakRefer... | true |
1a851afd6b67c1e4fc12f4f83fea20718c031c35 | C++ | sergiodrm/Trabajo-Informatica | /nave.cpp | UTF-8 | 1,469 | 3.34375 | 3 | [] | no_license | #include "nave.h"
Nave::nave()
{
vida = 50;
escudo = 20;
ataque = 4;
ataque_especial = 4;
pos.first = 0;
pos.second = 0;
}
Nave::Nave(int vid, int esc, int ataq, int ataq_es, pair<int, int> pos ){
vida = vid;
escudo = esc;
ataque = ataq;
ataque_especial = at... | true |
0a2f58e2c9fe7655fefa7d5505f2b5f56e620961 | C++ | qannoufoualid/HapticGolf | /wall.cpp | UTF-8 | 344 | 2.90625 | 3 | [] | no_license | #include "wall.h"
Wall::Wall(Point firstPt, Point secondPt, WallType type) :
m_firstPt(firstPt),
m_secondPt(secondPt),
m_wallType(type)
{
}
Wall::~Wall()
{
}
Point Wall::getFirstPoint()
{
return m_firstPt;
}
Point Wall::getSecondPoint()
{
return m_secondPt;
}
WallType Wall::getWallType()
{
... | true |
db8b0c37be67abff89027a7a68aa1bf1d45ce57f | C++ | gerald-guiony/ESPCoreExtension | /src/Tools/Delegate.h | UTF-8 | 1,944 | 2.875 | 3 | [
"MIT"
] | permissive | //************************************************************************************************************************
// Delegate.h
// Version 1.0 April, 2019
// Author Gerald Guiony
//************************************************************************************************************************
#p... | true |
9d1621bf61e4ac1bd16a2eb275eea7fff4620b99 | C++ | luckylove/first | /icpc5.cpp | UTF-8 | 1,659 | 2.6875 | 3 | [] | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int test,a,b,c,i,j,k,n,m;
cin>>test;
while(test--)
{
cin>>n>>k;
int arr[n];
for(i=0;i<n;i++)
{
cin>>arr[i];
}
sort(arr,arr+n);
int start=0;
int endd=0;
for(i=0;i<n... | true |
61167b957772a7b83d4c5a511f6457d526cd4049 | C++ | michaeljrosa/stewart-platform | /src/StewartPlatform/StewartPlatform.ino | UTF-8 | 3,023 | 2.828125 | 3 | [] | no_license | /**
* stewart-platform
*
* Authors: Leroy Sibanda, Michael Rosa
* Date: August 2018
*
* Program to test and calibrate an Stewart platform based on an Arduino Mega and motor drivers
*/
#include "configuration.h"
#include "Actuator.h"
#include "Platform.h"
#include "eeprom.h"
int count2 = 0;
#if DEMO > 0
fl... | true |
3dd3d3d6d026dbc70bc0f240ff8119b5449ef57c | C++ | RangooDu/LeetCode | /WordSearch.cpp | UTF-8 | 1,483 | 2.75 | 3 | [
"MIT"
] | permissive | class Solution {
public:
bool inBoard(const vector<vector<char>> &board, int x, int y) {
return x >= 0 && x < board.size() && y >= 0 && y < board[0].size();
}
bool search(const vector<vector<char>> &board, int x, int y, int now, const string &word, vector<vector<bool>> &used) {
if (now == wo... | true |