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
85f9d0a829494ad68b648236105375ae1198a321
C++
i12orore/Practica2ED
/donante.cpp
UTF-8
617
2.859375
3
[]
no_license
//donante.cpp #ifndef __DONANTE_CPP__ #define __DONANTE_CPP__ #include <iostream> #include "donante.hpp" #include "donanteInterfaz.hpp" using namespace std; namespace ed{ istream & operator >>(istream &i, Donante &d) { cout<<"Introduce valores para Nombre, apellidos, grupo sanguineo y factor RH"<<endl; ...
true
f9c43c1f78f99ed23d18c57480f79a5681640546
C++
jcbellovargas/colisionador
/Colisiones/Colisiones/Fisica.h
UTF-8
624
2.8125
3
[]
no_license
#pragma once #include "Vector2.h" #include "Bola.h" //Clase "Estatica" para detectar y calcular colisiones class Fisica { public: static bool DetectarColisionBolas(Bola* bola1, Bola* bola2); static void CalcularColisionBolas(Bola* bola1, Bola* bola2); static Vector2 PuntoCercanoEnLinea( Vector2 posicion, Vector2 v...
true
4b919559675131bec666aa2423616962831f0c7e
C++
acorovic/operativni_sistemi
/w3/VREME-marfi/main.cpp
UTF-8
2,132
3.09375
3
[]
no_license
/* Napraviti program koji ispituje ispravnost jednog od Marfijevih zakona, koji glasi: "Vas red je uvek najsporiji.". Simulirati placanje robe na tri kase. Rad svake kase predstavljen je jednom niti. Svaka nit dobija parametar koji predstavlja broj kupaca koje kasa treba da opsluzi. Broj kupaca je ...
true
a68cdc6d1794d94be69a25bda4b655628eb9dcc1
C++
ry0u/CodoForces
/290-Div2/c.cpp
UTF-8
931
2.765625
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <map> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) using namespace std; int main() { int n; cin >> n; vector<string> v(n); rep(i,n) cin >> v[i]; map<char,int> table; map<...
true
98a3ce24563ebc5e38d5a8cef85da57011b8c451
C++
Diksha65/Programs
/C++/arrayPairSumDivisibility.cpp
UTF-8
822
2.984375
3
[]
no_license
#include<iostream> #include<vector> using namespace std; void checkPair(vector<int> vec, int k){ vector<bool> vb(vec.size(), false); for(int i=0; i<vec.size(); ++i){ for(int j=i+1; j<vec.size(); ++j){ if(!vb[i] && !vb[j]){ if((vec[i] + vec[j]) % k == 0){ ...
true
c86ad91b3d3a212574ba7abfe142acfd98418a53
C++
averbukh/omniscidb
/DataMgr/FileMgr/Page.h
UTF-8
4,771
2.578125
3
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
/* * Copyright 2017 MapD Technologies, Inc. * * 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 o...
true
29ff53943bb43ac8adb5461927b4aa47aa6b384b
C++
WarfareCode/mixr
/src/instruments/Instrument.cpp
UTF-8
5,292
2.59375
3
[]
no_license
#include "mixr/instruments/Instrument.hpp" #include "mixr/base/numeric/Boolean.hpp" #include "mixr/base/numeric/Number.hpp" #include "mixr/base/numeric/Float.hpp" #include "mixr/graphics/ColorRotary.hpp" #include "mixr/base/relations/Table1.hpp" #include "mixr/base/PairStream.hpp" #include "mixr/base/Pair.hpp"...
true
a755c8334113d1859d6d22c4c2f4d19af68d9fb5
C++
tanvieer/ProblemSolving
/DP/Fibonacci/timus 1009/dp fibo with col.cpp
UTF-8
497
2.9375
3
[]
no_license
// Fibonacci #include<bits/stdc++.h> int vi[100][3]; int dp[100][3]; using namespace std; int fib(int x , int col) { if(x<=1) { if(col==0) return 1; else if(col==1) return 2; else return 10; } if(vi[x][col]) { // cout<<dp[x]<<" "; ...
true
772b3fa23601946e11fc81b09c1540274136cf03
C++
ryancarr/Data-Structures
/Stack/Cpp/Stack.hpp
UTF-8
1,330
3.921875
4
[]
no_license
template <typename T> class Stack { private: struct Node { T data; // The payload for each element Node *prev; // A pointer to the previous element }; Node *top; int _size; public: Stack(); ~Stack(); bool is...
true
2ab9e2619c8c51718b2acee56b475c75d95d418c
C++
hpaucar/OOP-C-plus-plus-repo
/Material/CPP_Primer_Plus_Book/Ch.13/Ch.13 - Exercise 01 - CD/header.h
UTF-8
940
2.6875
3
[ "MIT" ]
permissive
//******************************* // // C++ Template - Header File // //******************************* //******************************* // // Definition Statements - Begin // //******************************* #ifndef HEADER_H_ #define HEADER_H_ //******************************* // // Code Body - Begin // //****...
true
0f596be64ce352d5e9261a5880f9c813d7f037c8
C++
mindspore-ai/mindspore
/mindspore/core/utils/any.h
UTF-8
5,988
2.609375
3
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license", "MPL-1.0", "OpenSSL", "LGPL-3.0-only", "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause-Open-MPI", "MIT", "MPL-2.0-no-copyleft-exception", "NTP", "BSD-3-Clause", "GPL-1.0-or-later", "0BSD", "MPL-2.0", "LicenseRef-scancode-f...
permissive
/** * Copyright 2019-2020 Huawei Technologies Co., Ltd * * 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 applicabl...
true
0ec219a16277a273b4b8e6890fc4fbeb339c59b6
C++
IdiosApps/isbe
/cxx/nailfold/vil_suppress_non_max_dir.cxx
UTF-8
4,782
2.71875
3
[]
no_license
#include "vil_suppress_non_max_dir.h" #include <vcl_cmath.h> #include <vil/vil_image_view.h> #include <vil/vil_bilin_interp.h> void vil_suppress_non_max_dir(const vil_image_view<double>& intensity, const vil_image_view<double>& orientation, vil_image_view<d...
true
ac1093af117dfeb91faa67c31023acdb8568b9ec
C++
Incipe-win/Games
/gobang/maze/MyMazeMap.cpp
GB18030
1,621
3.140625
3
[ "Apache-2.0" ]
permissive
/* * ļƣMyMazeMap.cpp * ļܣʵִMyMazeMap */ /* * ƣMyMazeMap * ܣĹ캯 */ #include "MazeMap.H" #include "MyMazeMap.H" MyMazeMap::MyMazeMap()//: mazeMap(new MazeMap) { mazeMap = new MazeMap; //empty } /* * ƣMyMazeMap * ܣĹ캯 * б * *myMazeMap: Թͼ׵ַ * row: Թ * column: Թ */ MyMazeMap::MyMazeMap(int *myMazeMap, i...
true
8b7b1f64f913fcdd4f8a4cc888a21f5b94b6c864
C++
Manishlalwani0001/Cpp_Codes
/Strings substring check.cpp
UTF-8
681
3.328125
3
[]
no_license
#include<iostream> using namespace std; int subset(char a[],char b[],int m,int n) { int i=0; int j=0; for(i=0;i<n;i++) { for(j=0;j<m;j++) { if(b[i]==a[j]) break; } if(j==m) return 0; } return 1; } int main() { char a[100]={0}; c...
true
296d1603b4d31cb50c19a6dd9e65d9e449a65c00
C++
hfz-Nick/nav-planner
/include/nav_planner/grid_path.h
UTF-8
482
2.53125
3
[]
no_license
//从潜力图中查找路径 #ifndef _GRID_PATH_H #define _GRID_PATH_H #include<vector> #include<nav_planner/traceback.h> namespace nav_planner { class GridPath : public Traceback { public: GridPath(PotentialCalculator* p_calc) : Traceback(p_calc){}; //get出来路径 bool getPath(float* potential, double start_x, double start...
true
636a138a3f83fedf33b6aa22d555fea5d19d4de9
C++
singhya/Algorithms
/Bits/201. Bitwise AND of Numbers Range.cpp
UTF-8
230
2.65625
3
[]
no_license
class Solution { public: int rangeBitwiseAnd(int m, int n) { int result = 1; while(m!=n){ m = m>>1; n = n>>1; result = result<<1; } return result*m; } };
true
5a60390b4ea91ecf78cc916b2e14be9fad3f883e
C++
dunjen-master/Leetcode30DayChallenge
/MaximumSubarray.cpp
UTF-8
358
2.734375
3
[]
no_license
class Solution { public: int maxSubArray(vector<int>& nums) { int n=nums.size(); if(n==0)return 0; int curr_sum=0; int max_sum=INT_MIN; for(int i=0;i<n;i++){ curr_sum=max(curr_sum+nums[i],nums[i]); max_sum=max(max_sum,curr_sum); } ...
true
b49646495727eb03366f600b2a2a7ee6ce8ba235
C++
fazhang/myLeetCode
/leetCode/linkListQuickSort/linkListQuickSort.cpp
UTF-8
3,504
2.921875
3
[]
no_license
#include <stdio.h> #include <string> #include <iostream> #include <vector> #include <iomanip> #include <memory> #include <sys/time.h> using namespace std; uint64_t Nowms() { timeval tvNow; gettimeofday(&tvNow, NULL); return tvNow.tv_sec* 1000 + tvNow.tv_usec/1000; } class ListNode { public: int val; ...
true
0e9b9375b0c5121e3597ba788d1bb74d50ce774e
C++
brettviren/fnal-cetlib
/cetlib/filepath_maker.h
UTF-8
2,102
2.546875
3
[]
no_license
#ifndef CETLIB_FILEPATH_MAKER_H #define CETLIB_FILEPATH_MAKER_H // ====================================================================== // // filepath_maker: A family of related policies governing the translation // of a filename into a fully-qualified filepath // // =================================...
true
c42ddbbf0e0c6802c43ae1538158ed6b4526c739
C++
ManhHuuNguyen/RTS
/Camera.cpp
UTF-8
3,196
3.046875
3
[]
no_license
#include "Camera.h" float Camera::cameraSpeed = 10*0.00005f; Camera::Camera():CallbackInterface(ID::CAMERA_ID) { // it will be a camera looking straight downward eyePosition = glm::vec4(0.0f, 80.0f, 0.0f, 1.0f); /*look = glm::vec3(0.0f, 0.0f, -1.0f); right = glm::vec3(1.0f, 0.0f, 0.0f); up = glm::vec3(0.0f, 1.0f,...
true
db67b0ee9a30d1bf22837cb7e9da94f1950aa2f4
C++
BAKFR/linpop
/Linpop/user.h
UTF-8
501
2.671875
3
[]
no_license
#ifndef USER_H #define USER_H #include <QMainWindow> class User { QString _userName; QString _password; int _idUser; public: User(); User(QString userName, QString password); ~User(); public: QString getUserName(); QString getPassword(); int getIdUser(); void setUs...
true
889b44005d5a3a3f2e3b14ac385ee851b14a7cb7
C++
ThereWillBeOneDaypyf/Summer_SolveSet
/codeforces/cf_439_c.cpp
UTF-8
1,840
2.6875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int main() { int n,k,p; while(cin >> n >> k >> p) { vector<int> v[2]; for(int i = 0;i < n;i ++) { int x; cin >> x; v[x % 2].push_back(x); } int odd_cnt = k - p; if(odd_cnt > v[1].size()) { cout << "NO" << endl; }...
true
ec3f574a471e324e589d9c56d5bf4bf331a80386
C++
liquanhai/cxm-hitech-matrix428
/端口监视器-开2个线程类_产生虚拟查询帧并对应答帧修改IP地址为虚拟设备IP_偏移量以74递增5/端口监视器/ThreadManage.cpp
GB18030
583
2.640625
3
[]
no_license
#include "StdAfx.h" #include "ThreadManage.h" CThreadManage::CThreadManage(void) { } CThreadManage::~CThreadManage(void) { } // ʼ void CThreadManage::Init() { m_RecThread.Init(); m_RecThread.CreateThread(); m_SendThread.Init(); m_SendThread.CreateThread(); } void CThreadManage::OnClos...
true
c4e5964cc1a1d893efef9fef46c9a242f3b6f31a
C++
lasiadhi/CT-Image-Reconstruction-Software
/TestCode/ImageVersion/main/main.cpp
UTF-8
2,565
3.015625
3
[]
no_license
#include <iostream> #include <string> #include "RectMDArray.H" #include "PPoint.H" #include "Image.H" #include "ImageReconstruct.H" #include "Filter.H" #include "Interpolator.H" using namespace std; int main( int argc, const char** argv ) { // Name of the file to be reconstructed. string filename; cout << "Pl...
true
cf05a011d1b7105513a8a906650329e36ee3ebf9
C++
hdelanno/titanmods
/TGameCtrl/ZListBox.h
UTF-8
1,467
2.703125
3
[]
no_license
#ifndef ZLISTBOX_H #define ZLISTBOX_H #include "TGameCtrl.h" #include "WinCtrl.h" #include "IScrollModel.h" #include <deque> //! A ListBox with CWinCtrl based items /*! This class implements a ListBox which uses CWinCtrl based items, if you are looking for a ListBox with text based items check out CTListB...
true
0e9cfaf227a8b307273a4ba0d0f3d2b4c36ec3d5
C++
strncat/competitive-programming
/uva/graphs/connected-components/572-oil-deposits.cpp
UTF-8
2,963
3.125
3
[]
no_license
// // 572 - Oil Deposits // https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=513 // // Created by Fatima Broom on 3/5/16. // Copyright © 2016 Fatima Broom. All rights reserved. // #include <iostream> #include <algorithm> #include <string> #define MAX 101 int a[MAX][...
true
96feaad895ea11355c03e50c4f9cb0fc9d666cd6
C++
nv-piyush/LeetCode
/July LeetCoding Challenge/hamming_dist.cpp
UTF-8
299
2.84375
3
[]
no_license
#include<bits/stdc++.h> class Solution { public: int hammingDistance(int x, int y) { int xr = x ^ y; int cnt = 0; while (xr) { if (xr%2==1) { cnt++; } xr=xr/2; } return cnt; } };
true
c40b19e0bda3dd0357f7be46505de18bcf16cc56
C++
BenchHPZ/UG-Compu
/GC/Tareas/T5/TheRaytracer/src/mesh.cpp
UTF-8
911
2.875
3
[ "MIT", "WTFPL" ]
permissive
#include "mesh.h" #include <iostream> Mesh::Mesh(const std::vector<Point3D>& verts, const std::vector< std::vector<int> >& faces) : m_verts(verts), m_faces(faces) { } std::ostream& operator<<(std::ostream& out, const Mesh& mesh) { std::cerr << "mesh({"; for (std::vector<Point3D>::const_iterator I...
true
ddf648e352373039f2c9e4798ee67666d10d094f
C++
galacticor/cpp
/TLX/Dasar/15/C. Permutasi Zig-Zag.cpp
UTF-8
1,067
2.640625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int n,a[100010]; bool p[100010],q; void permutasi(int deep){ if(deep>n){ q=false; for(int i=2;i<=n;i++){ if(i%2==0){ if(a[2]<a[1] && a[2]<a[3]){ if(a[i]>a[i-1] || a[i]>a[i+1]){ q=true; } } else{ if(a[i]<a[i-1] || ...
true
68d7299b7781076ee77ed3f5ec789c36142e7af7
C++
PetersonJeff/AzureTest
/Solver/cfg/CfgManager.cpp
UTF-8
2,390
2.515625
3
[]
no_license
#include "pch.h" #if defined (WIN32) || defined (WIN64) # pragma warning( disable : 4786 ) # pragma warning( disable : 4503 ) # pragma warning( disable : 4996 ) #endif #if defined (WIN32) || defined (WIN64) # define strcasecmp stricmp #else # define stricmp strcasecmp #endif #include "CfgManager.h" #include <u...
true
db4bf8849fd1eeefcd921cbe02dfa71312190922
C++
Zorcky-2C/Epitech_CPP_R-Type_2020
/client/src/States/WaitState.cpp
UTF-8
3,084
2.609375
3
[]
no_license
/* ** EPITECH PROJECT, 2023 ** B-CPP-501-BDX-5-1-rtype-philippe-jacques.tatel ** File description: ** Created by valentinbreiz, */ #include "WaitState.hpp" #include "../Engine/StateMachine.hpp" #include "LobbyState.hpp" #include <thread> WaitState::WaitState(StateMachine& machine, sf::RenderWindow &window, const bool...
true
ac2bd0e7c2bfba6c70b1144a5d3afd7f7b796fb3
C++
jonathanpraleigh/CS161
/comparisons/findMode.cpp
UTF-8
2,085
3.734375
4
[]
no_license
/**************************************************** ** Author: Jon Raleigh ** Date: 2/22/17 ** Description: Locates the modes in an array and ** returns them in ascending order. ****************************************************/ #include <vector> #include <iostream> #include <algorithm> using namespace std; /*v...
true
2e0a1aee5c88dee325f3a15728ea903127bc489b
C++
screws0ft/ubisoft
/main.cpp
UTF-8
2,383
3.203125
3
[]
no_license
#include "Player.h" #include "Game.h" #include "Point.h" #include "Map.h" #include "Store.h" #include "Blade.h" #include <iostream> #include <string> using namespace std; bool playerTurn(Game *vGame, Player *vPlayer) { int choice; cout<<vPlayer->getName()<<"'s "<<vGame->getPoint(vPlayer).print()<<" turn"<<endl; c...
true
2d54d73b0cd16116acb77cd776b04e7bbdbc3bcb
C++
zmaker/arduino_cookbook
/500-5blink/04-a-stati/04-a-stati.ino
UTF-8
459
2.8125
3
[]
no_license
int stato; void setup() { pinMode(13, OUTPUT); } void loop() { switch(stato) { case 0: ledon(); break; case 1: wait1(); break; case 2: ledoff(); break; case 3: wait2(); break; } } void ledon(){ digitalWrite(13, HIGH); stato = 1; } void wait1...
true
4349c64184ebb2431b1edfca52d14598c068bbb5
C++
huangxueqin/algorithm_exercise
/leetcode/24.cc
UTF-8
522
2.65625
3
[]
no_license
#include "leetc.h" using namespace std; class Solution { public: ListNode *swapPairs(ListNode *head) { return swapNextPairs(head); } private: ListNode *swapNextPairs(ListNode *head) { if(head == NULL || head->next == NULL) return head; ListNode *new_...
true
951cfbe6255e24d058b7af7ae803d8a6041e3b08
C++
DominicCabral/BankAccount
/src/BankAccount.cpp
UTF-8
2,545
3.515625
4
[]
no_license
// // BankAccount.cpp // HW8 // // Created by Dominic Cabral on 11/27/14. // Update by Dominic Cabral on 10/25/17 // Copyright (c) 2014 Umass Lowell. All rights reserved. // #include "BankAccount.h" // Base class for all types of Bank Accounts BankAccount::BankAccount() { name = ""; balance = 0.00; ...
true
954ea166b74b091af010d81ec180d7a6bd8bfe51
C++
a8a3/algorithms
/tests/include/shuffle.hpp
UTF-8
520
2.828125
3
[]
no_license
#pragma once #include <algorithm> #include <iterator> #include <random> // ------------------------------------------------------------------ template<typename T> void make_shuffle(T* what, size_t sz) { std::random_device randomDevice; std::mt19937 generator(randomDevice()); std::shuffle(what, what + sz, gen...
true
30c2f322f55c039abc528403123a7eb12792442a
C++
SoCXin/MEGA328P
/src/halibs/include/avr-halib/drivers/avr/not_ported/digitalout.h
UTF-8
2,666
3.09375
3
[]
no_license
/** \addtogroup avr */ /*@{*/ /** * \file include/avr-halib/avr/digitalout.h * \brief Defines class DigitalOut * \author Philipp Werner * * This file is part of avr-halib. See COPYING for copyright details. */ #pragma once #include "avr-halib/avr/portmap.h" #include <stdint.h> /** * \class DigitalOut digita...
true
36f90957c625f2a27a5bc9a9828f5f3c8aa29d7d
C++
dcohen25/CS123-Final
/scene/snowscene.h
UTF-8
1,940
2.765625
3
[]
no_license
#ifndef SNOWSCENE_H #define SNOWSCENE_H #include "scene/openglscene.h" #include <memory> #include <map> #include "snowscenetile.h" #include "camera/camera.h" namespace CS123 { namespace GL { class CS123Shader; class Texture2D; }} /** * * @class SceneviewScene * * A complex scene consisting of multiple ...
true
87631051d96d920b7325c79e260872d37e393efe
C++
dafer154/AproximacionFunciones
/AproximacionFunciones/funcionexacta.cpp
UTF-8
1,929
2.859375
3
[]
no_license
#include "funcionexacta.h" #include "interprete/exprtk.hpp" FuncionExacta::FuncionExacta() { } FuncionExacta::~FuncionExacta() { } void FuncionExacta::evaluarFuncionVariosPuntos(QString funcion, QVector<double> puntos) { resultadosFuncionExacta.clear(); double x; exprtk::symbol_table<double> symbol_ta...
true
3c3098b659922dd1811a1b36bc44d86ec0e5f2ae
C++
joaoc/STM32LIB
/stm32Lib/HAL/Include/EXTI/EXTI.hpp
UTF-8
1,803
2.671875
3
[]
no_license
#pragma once #ifndef EXTI_HPP_INCLUDED #define EXTI_HPP_INCLUDED #include "Config/config.h" #include "SYSCFG/SYSCFG.hpp" namespace STM32LIB{ class EXTI_CONTROLER{ public: typedef enum{ Interrupt = EXTI_Mode_Interrupt, Event = EXTI_Mode_Event }_Mode; typedef enum{ Rising = EXTI_Trigger_R...
true
e84480cbb46d865b5df109e2dcf6b856ce3f63a1
C++
mattfedd/testgame
/Project3/src/Graphics/SpriteSheet.cpp
UTF-8
691
2.890625
3
[]
no_license
#include "SpriteSheet.h" SpriteSheet::SpriteSheet(const char* filename) { texture_ = LoadTexture(filename); } SpriteSheet::~SpriteSheet(void) { } GLuint SpriteSheet::LoadTexture(const char* filename) { GLuint Texture; //variable for texture glGenTextures(1,&Texture); //allocate the memory for texture glBindTex...
true
3c950c3fb6073b496e7280a261ad360f02fae059
C++
Jiongyu/code_exercise
/29_IsPopOrderStack.cpp
UTF-8
2,886
3.875
4
[]
no_license
/** * @file 29_IsPopOrderStack.cpp * @author your name (you@domain.com) * @brief 输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否可能为该栈的弹出顺序。 * 假设压入栈的所有数字均不相等。例如序列1,2,3,4,5是某栈的压入顺序,序列4,5,3,2,1是该压 * 栈序列对应的一个弹出序列,但4,3,5,1,2就不可能是该压栈序列的弹出序列。(注意:这两个序 * 列的长度是相等的) * @version 0.1 * @date 2020-04-19 * * ...
true
ded3766f625e4f4a0174a089fcdb3b2d17daf85f
C++
yunruowu/LeetCode
/824.山羊拉丁文.cpp
UTF-8
2,670
3.03125
3
[]
no_license
/* * @Description: * @Version: 2.0 * @Author: yunruowu * @Date: 2020-03-09 11:20:43 * @LastEditors: yunruowu * @LastEditTime: 2020-03-09 11:30:53 */ /* * @lc app=leetcode.cn id=824 lang=cpp * * [824] 山羊拉丁文 * * https://leetcode-cn.com/problems/goat-latin/description/ * * algorithms * Easy (58.69%) * Lik...
true
4f37b6db06e47a0704e447874eeb65fe42a6ea48
C++
alekon28/programming-term-2
/laba_3_1_task_4/laba_3_1_task_4/laba_3_1_task_4.cpp
UTF-8
409
3.328125
3
[]
no_license
#include <iostream> using namespace std; int rev(int a, int m) { if (a == 1) return 1; return(1 - rev(m % a, a) * m) / a + m; } int main() { int c, d, m; cout << ">>> c * d = 1 (mod m) <<<"; cout << "\nInput c: "; cin >> c; cout << "\nInput m: "; cin >> m; cout << "\n-> " << c << " ...
true
0e2056261b306c141b29662d2c6c147e6a8b6137
C++
carlos114771/Carlos-Rivera-Examen2
/Jugadores.cpp
UTF-8
690
2.703125
3
[]
no_license
#include "Jugadores.h" Jugadores::Jugadores(string lugar_precedencia,string apodo,double dinero,string nombre,int edad,string id):Persona(nombre,edad,id){ this->lugar_precedencia=lugar_precedencia; this->apodo=apodo; this->dinero=dinero; } Jugadores::Jugadores(){ }void Jugadores::setLugar_precedencia(string lugar_...
true
8a3c6b5dd0d4f3812d39e54f4b6a207ed4c4ab59
C++
wo315/peercode
/hw2/mass_spring_1902.hpp
UTF-8
9,596
3.25
3
[]
no_license
/** * @file mass_spring.hpp * Implementation of mass-spring system using Graph */ #include <fstream> #include <chrono> #include <thread> #include <unordered_map> #include "CME212/Util.hpp" #include "CME212/Color.hpp" #include "CME212/Point.hpp" #include "Graph.hpp" // Gravity in meters/sec^2 static constexpr d...
true
a08e0a76ddf31b64f4e3c61d776c7c9a3195cba3
C++
b369rahul/Data-Structure-Algorithm-UCSD
/Data Structures/week3_hash_tables/2_hash_chains/hash.cpp
UTF-8
456
2.65625
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { string s; cin>>s; static const size_t multiplier = 263; static const size_t prime = 1000000007; unsigned long long hash = 0; for (int i = static_cast<int> (...
true
6e4c7bb2f36621cc5cbea8ef770fc41c981931e1
C++
wolflion/Code2019
/黑马程序员/02C++进阶STL/day01/day01_e05.cpp
GB18030
905
3.3125
3
[]
no_license
//05 ģ庯ʵԭ_rec. /* ģ----ܴ ģ-->Ҫĺܽе ģ塿--صģ壬T ģ庯--صǺǾfloatint */ #include <iostream> using namespace std; // ģ template<typename T> T MyAdd(T a, T b) { return a+b; } int main() { int a=10,b=20; double da=1.14,db = 2.14; MyAdd(a,b); MyAdd(da,db); //MyAdd(a,a)Ҳֻռԭ ģ庯 MyAdd(a,a); // 3Σ...
true
ee72f9f9d15b6a35be42c3b2b6da05e35c215176
C++
saggaf001/GardeningBot
/StaticGargeningBot/StaticGargeningBot.ino
UTF-8
1,241
2.875
3
[]
no_license
#include <LowPower.h> #define LED LED_BUILTIN #define PUMP 8 #define WATERING_TIME 40L // secs, do not remove the L suffix! See note below. void setup() { pinMode(LED, OUTPUT); digitalWrite(LED, LOW); pinMode(PUMP, OUTPUT); digitalWrite(PUMP, LOW); } void loop() { delay(1000); digit...
true
afdc0dca29ebfec3e3c02a789a6d637ca6053ed0
C++
ca2/app2018
/appseed/aura/primitive/primitive_bit.cpp
UTF-8
2,768
2.65625
3
[]
no_license
#include "framework.h" #define BYTE_ALIGN (8) #define INT_ALIGN (BYTE_ALIGN * sizeof(int32_t)) namespace core { namespace bit { void int_aligned_copy(int32_t * pDest, int32_t iDest, int32_t * pSrc, int32_t iSrc, int32_t iCount) { if((iDest % INT_ALIGN) != (iSrc %INT_ALIGN)) { ...
true
b8cdd70c70d32da62e61cb2f53f197f70b7dc23d
C++
Francoded/AFParser-Library
/parser/tokenizer.h
UTF-8
1,719
3.625
4
[ "BSD-3-Clause" ]
permissive
// tokenizer.h // // Base Tokenizer class defines Token and Tokens types #ifndef TOKENIZER #define TOKENIZER #include <iostream> #include <string> #include <vector> class Tokenizer { public: struct Token { Token() : code(0) { } Token(int code, const char *text, size_t leng, size...
true
e5e928b0f43b360adccfc60f2f4fc610293b2d61
C++
mohibul2000/MY_PROJECTS
/remove_character_ from_the_first_string.cpp
UTF-8
364
2.875
3
[]
no_license
#include<stdio.h> int main() { int i,j,k; char s[100],p[100]; printf("Enter 1st String: "); gets(s); printf("Enter 2nd String: "); gets(p); i=0; while(p[i]!='\0') { j=0; while(s[j]!='\0') { if(s[j]==p[i]) { k=j; while(s[k]!='\0') { s[k]=s[k+1]; k++; } break; } else { j++; } } i++; } pri...
true
7e73742f47631373e7f7d0cdd5ba2ba8675bf829
C++
ThorsteinSkaug/Project-2-FYS4150
/project2_problem4567.cpp
UTF-8
11,106
3.375
3
[]
no_license
#include <armadillo> #include <iostream> #include <fstream> #include <iomanip> #include <math.h> #include <vector> #include <chrono> #include <cmath> using namespace std; // Determine the the max off-diagonal element of a symmetric matrix A // - Takes as its inputs a symmetric matrix A, two indices k an...
true
abfb91309f1c9ac46b6ff6e18b9faacbb9182a04
C++
SeungWon-git/2020-works
/C++/2차 시험풀이/소스.cpp
UHC
2,372
3.53125
4
[]
no_license
#pragma warning(disable:4996) #include <iostream> #include <random> #include <thread> #include <chrono> using namespace std; default_random_engine dre; uniform_int_distribution<> uid{ 10,1000 }; class TimerMonster { int num; char* p; public: TimerMonster() :num{uid(dre)} { p = new char[num]; ...
true
37c27dd53a8ff6750959c255027673d92035f9e3
C++
thomaslorincz/CMPUT379
/assignment3/controller.cpp
UTF-8
10,062
2.625
3
[]
no_license
#include <arpa/inet.h> #include <errno.h> #include <fcntl.h> #include <poll.h> #include <signal.h> #include <string.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <algorithm> #include <map> #include <sstream> #include <string> #include <utility> #include <vector> #i...
true
0683615bcc6d713be0130a30a2b3ad97e5d588e3
C++
LalitPatidar/solid-propellant-combustion-model
/1atm/Species.cpp
UTF-8
2,834
2.640625
3
[]
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> #include <sstream> #include <stdlib.h> #include "Species.h" #include <map> #include <cmath> Species::Species(std::string &line1, std::string &line2, std::string &line3, std::string &line4) { std::stringstream ss(line1); std::vector <std...
true
b5ae319a0beffe7ac64a67ced4b1c41f58844136
C++
vespa-engine/vespa
/vespalib/src/vespa/vespalib/net/tls/verification_result.h
UTF-8
2,226
2.75
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "capability_set.h" #include <vespa/vespalib/stllike/string.h> #include <iosfwd> namespace vespalib { class asciistream; } namespace vespalib::net::tls { /** * The result of evaluating conf...
true
a562a4230a03a845dc5e2a072f80d7c13fa417b6
C++
kachihaha/F2Native
/core/graphics/shape/Rect.h
UTF-8
1,916
2.9375
3
[ "MIT" ]
permissive
#ifndef XG_GRAPHICS_SHAPE_RECT_H #define XG_GRAPHICS_SHAPE_RECT_H #include "graphics/shape/Shape.h" #include "graphics/util/BBox.h" namespace xg { namespace shape { class Rect : public Shape { public: Rect(const util::Point &point, const util::Size &size, const string &fillColor) : Shape(), size_(size) { ...
true
a6b977796779ea4dbe0fae7f0c01598b18a102ef
C++
yadamit/ESO207
/ESO207/PA3/q2.cpp
UTF-8
4,159
3.28125
3
[]
no_license
#include<iostream> using namespace std; struct node{ string str; int l_count; struct node* parent; struct node*left; struct node*right; }; typedef struct node Node; Node* createNode(string str){ Node* tmp=(Node*)calloc(1,sizeof(Node)); tmp->str=str; tmp->l_count=1; return tmp; } Node* insertNode(No...
true
2fe1d93b798f569ac62683bbb3f2763a06d966ae
C++
kostyamyasso2002/Mipt
/Algo/semestr1/session1/21.cpp
UTF-8
1,197
3.40625
3
[]
no_license
#include <iostream> #include <vector> /* LSD - Least Significant Digit MSD - Most Significant Digit Альтернативная реализация(чтобы не прибавлять/вычитать единичку) в 19/25 строках соотв: В 25ой строке идём сверху вниз и используем необходимый байт, а не значение на единицу меньше его И вычитаем, собственно из него 1...
true
ca06d5574d78d631bbabfc3462ee936d81878dd8
C++
knyazsergei/OOP
/lab3/calculator/calculator/Tree.h
UTF-8
309
2.53125
3
[]
no_license
#pragma once #include "INode.h" #include "Func.h" class CTree { public: CTree(); ~CTree(); void Push(double number); void Push(OperatorType operatorType); void print(); private: void printTree(std::shared_ptr<INode> p, int level); std::shared_ptr<INode> m_head; std::shared_ptr<INode> m_current; };
true
ad74268d4469243204c4eb96677d049460d919b9
C++
crespo2014/cpp-exam
/ch08/u8_1_12.cpp
UTF-8
2,018
3.0625
3
[]
no_license
/* * u8_1_12.cpp * * Created on: 25 Jan 2015 * Author: lester */ #include <iostream> using namespace std; int main() { double d1=123.455555; double d2=123.45; unsigned p = cout.precision(); cout<<"Mode: default\n"; cout<<"Precision: " << cout.precision()<<endl; cout<<"d1: "<<d1<<...
true
d46325683988d90692b9d9af7d5e8f5874cfcc76
C++
TicoHsueh/PAT
/Advanced Level/1152_Google Recruitment (20)【字符串】.cpp
UTF-8
482
3.046875
3
[]
no_license
#include<string> #include<iostream> using namespace std; bool isprime(int n){ if(n == 0 || n == 1) return false; for(int i = 2; i*i <= n; i++){ if(n % i == 0) return false; } return true; } int main(){ int L, k, i; string s; cin >> L >> k >> s; for(i = 0; i <= L-k; i++){ ...
true
fa32b75591222b458c9fc5fd791251c7bae4c47d
C++
yedidaharya/Library-CLI
/Member.cpp
UTF-8
1,476
2.921875
3
[]
no_license
#include <iostream> #include <stdlib.h> using namespace std; string code[50] = {"0001", "0002", "0003", "0004", "0005"}; string name[50] = {"Rifqi\t", "Aji\t", "Aziz\t", "Arifin", "Yedida"}; string nohp[50] = {"0822-8149-3953", "0812-1577-5601", "0899-0543-364", "0822-4514-7168", "0881-2609-226"}; int a, b=5, c; int ...
true
a189bd9746d937e9d0ce88d4a7bcfa8c12436d7c
C++
pukumar2/ds_interview_prep
/arrays/find_element_sorted_rotated_array.cpp
UTF-8
2,152
3.8125
4
[]
no_license
#include <vector> #include <iostream> #include <map> #include <unordered_map> #include <string> using namespace std; #define ELEM 5 #define MAX_ELEM 10 void print_array(const vector<int> arr){ int size = arr.size(); for(int i = 0; i < size; i++){ cout << arr[i] << "\t"; } cout << "\n"; } int binary_search...
true
e3d53a8c4c4b464533c0b393c3d4ebbc1ad3c96f
C++
DongPhung1996/lap_trinh_nhap_mon
/ve_tam_giac.cpp
UTF-8
565
2.515625
3
[]
no_license
#include <iostream> using namespace std; int main(){ int chieucao, chieurong, kichthuoc; int a = 1; cout << "Nhap vao kich thuoc: " << endl; cin >> kichthuoc; for(chieucao = kichthuoc; chieucao >= 0; chieucao--) { for(chieurong = kichthuoc - chieucao; chieurong > 0; chieurong--) { cout << a++; } cout...
true
26daf135b447ec97e00baf20ad16f3e0b19e966d
C++
romanperesypkin/cpluplus_patterns
/behavor/4.command/command.cpp
UTF-8
1,570
3.515625
4
[]
no_license
#include <iostream> #include <list> using namespace std; class Command { public: Command() {} virtual ~Command() {} virtual void execute() = 0; }; class Device { public: Device() {} ~Device() {} virtual void turnOn() = 0; virtual void turnOff() = 0; }; class TurnOnCommand : public Command { Device *devic...
true
4d74e16aa68c505dbe910fe5c726e9bceb4bd762
C++
arbaaz833/practice-c-programs
/calculator/CALCULATOR.cpp
UTF-8
5,234
3.359375
3
[]
no_license
#include <iostream> #include<windows.h> #include<conio.h> #include<math.h> using namespace std; int main() { int a; float num1,num2,num3,num4,num5,num6,num7,num8,base,power; char c; sos: system("cls"); cout<< "\n\n\t\t\t\t"<<"WELCOME TO THE CALCULATOR PROGRAM"<<endl; cout<<"\t\t\t\t\t1.ADDITION\n\t\t\t\t\t2.SUBST...
true
80591504165e76b1a2f633f13f0a93cdbcfabbdd
C++
leandrovianna/ppp_book_codes
/Chapter5/5.6.1_example1.cpp
UTF-8
1,182
3.625
4
[]
no_license
/* *********************************************************************** * Filename: example1_bad_arguments.cpp * Date: January 19, 2014 - 12:51 * Author (Programmer): Leandro Vianna <leandrovianna50@gmail.com> * Programming: Principles and Practices using C++ - Bjarne Stroustrup * Chapter 5: Erro...
true
c98949fca9bbab90a22447acd0d34fa0608d0880
C++
renzov/Red_Crown
/atCoder/ABC-160/D-up.cpp
UTF-8
441
2.546875
3
[]
no_license
#include<cstdio> #include<algorithm> #include<cstdlib> using namespace std; const int MAXN = 1 << 11; int N, X, Y; int res[MAXN]; int main(){ int d; scanf("%d %d %d", &N, &X, &Y); X--, Y--; for ( int i=0; i < N; ++i ) for ( int j=i + 1; j < N; ++j ){ d = min( abs(i - X) + abs(j - Y) + 1, abs(i - Y) + abs(j ...
true
56c80140b8452e463867ec122ead88b6c88f4f6a
C++
UZerbinati/Suite
/LA/sparse.hpp
UTF-8
790
2.59375
3
[]
no_license
#ifndef SPMATRIXHEADERDEF #define SPMATRIXHEADERDEF #include <cassert> #include <string> #include <vector> class spmat { private: int height; int width; double *value; int* P; int p; public: spmat(int n,int m); spmat(); ~spmat(); int getWidth(); int getHeight(); int getSize(); void empty(); ...
true
ff39c8dd039d01fadd53cf6f130e4f4668640de3
C++
Oh-kyung-tak/Algorithm
/Baekjoon/baekjoon_5363.cpp
UTF-8
563
2.8125
3
[]
no_license
#include <iostream> #include <algorithm> #include <string.h> #include <string> #include <math.h> #include <vector> using namespace std; int N; string word; string temp = ""; int main() { cin >> N; getchar(); while (N--) { vector<string> v; getline(cin, word); for (int i = 0; i < word.size(); i++) { ...
true
7f43b3038c6cf6973e4df3af305031caac18a158
C++
jariasf/Online-Judges-Solutions
/UVA/Volume 4 (400-499)/499 - What's The Frequency Kenneth.cpp
UTF-8
909
2.828125
3
[]
no_license
/***************************************** ***Problema: What's The Frequency, Kenneth? ***ID: 449 ***Juez: UVA ***Tipo: Ad hoc, Sorting ***Autor: Jhosimar George Arias Figueroa ******************************************/ #include <stdio.h> #include <algorithm> #include <cctype> #include <cmath> #include <cstdio>...
true
7056a0b5d29b241e4d62f2a7b5ab73389efbffbc
C++
thecherry94/BuzzerMusicESP
/ESPBuzzerMusicPlayer/test.cpp
UTF-8
558
3.140625
3
[]
no_license
#include <unistd.h> #include <stdio.h> #include <pthread.h> void* f(void*); int ourcounter = 0; int main() { pthread_t t1, t2; pthread_create(&t1, nullptr, &f, (void*)"Thread 1"); pthread_create(&t2, nullptr, &f, (void*)"Thread 2"); while(true) { printf("Main process(%d)\n", ourcounter)...
true
bd1028b97fad1157215a482722b149536ec99239
C++
TranHuuThuy-BKHN/PTTK-Thuat-Toan
/permutationlist.cpp
UTF-8
902
3.15625
3
[]
no_license
#include<iostream> using namespace std; struct Data{ int th; int r; }; Data* divide(int n, int k){ Data *d = new Data; double temp = k; int v = 1; for(int i = 0; i < n; i++){ temp /= (n - i); v *= (i + 1); } if(temp >= 1){ d->th = k / v; d->r = k % v; }else{ d->th = 0; d->r = k; } return d;...
true
a91a0cf9900abc662626cbffbb3ff70066df9420
C++
ldcjsw/vs_linux
/server/MyEventTimer.cpp
UTF-8
2,881
2.625
3
[]
no_license
#include "MyEventTimer.h" using namespace GG; MyEventTimer::MyEventTimer() { } MyEventTimer::~MyEventTimer() { } void MyEventTimer::MyEventInit() { m_event_base = event_base_new(); int fds[2]; if (pipe(fds)) { perror("Can't create notify pipe"); exit(1); } m_time_r_fd = fds[0]; m_time_w_fd = fds[1]; ...
true
03d09bcaa60e351b64f50afecf912e12c41678f3
C++
marci07iq/NGin
/Maths/BinTree.h
UTF-8
1,654
2.921875
3
[ "LicenseRef-scancode-happy-bunny", "MIT", "LicenseRef-scancode-warranty-disclaimer", "BSL-1.0", "LicenseRef-scancode-public-domain" ]
permissive
#pragma once #include "helperFunctions.h" template<typename _VAL> class BinTreeNode { public: BinTreeNode* _path[2]; BinTreeNode* _up; _VAL _val; void addOptions(BinTreeNode* lhs, BinTreeNode* rhs) { lhs->_up = this; rhs->_up = this; _path[0] = lhs; _path[1] = rhs; } }; template<typename _V...
true
30028d6202edd258a94e22d187d864d8e37eb83b
C++
pkaff/EDAN55lab4
/Pagerank/Pagerank_REMOTE_15720.cpp
UTF-8
2,930
3.125
3
[]
no_license
// Pagerank.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <fstream> #include <vector> #include <iostream> #include <sstream> #define METHOD_1 //#define METHOD_2 //#define METHOD_3 using namespace std; //adjacency matrix typedef vector<vector<size_t> > matrix; //P descri...
true
4c82a7c04fa1a05e88ed31d4f4e3e6f05a2901c6
C++
JonSeijo/algo3-tp1
/tiempos.cpp
UTF-8
3,113
3.140625
3
[]
no_license
#include "definiciones.cpp" #include "backtracking_naive.cpp" #include "backtracking_poda.cpp" #include "dp_topdown.cpp" #include "dp_bottomup.cpp" #include <stdlib.h> #include <chrono> #include <stdexcept> #define ya std::chrono::high_resolution_clock::now // NOTA: Si quiero muchas ejecuciones para la misma entrada,...
true
0a26e518faf66410426619cb836687254961a6ae
C++
Ewenwan/LeetCodeSolution-1
/150/solution.cpp
UTF-8
1,334
3.078125
3
[]
no_license
#include "../solution.h" class Solution{ public: int evalRPN(vector<string> &tokens){ // trivial case if(tokens.empty()) return 0; else if(tokens.size() == 1) return stoi(tokens[0]); stack<int> operands; operands.pu...
true
00941a0d8c3354257335dc1c5817cbb5577094e1
C++
DV1537/assignment-a2-krhk18
/Point.cpp
UTF-8
333
2.9375
3
[]
no_license
#include "Point.h" Point::Point(Position *pPos, int numPositions, std::string type) { this->type = type; nrOfPositions = numPositions; posPtr = new Position[numPositions]; for(int i = 0; i < numPositions; i++) { posPtr[i] = pPos[i]; } } Point::~Point() { delete[] posPtr; posPtr...
true
ca44f997f235cda90f4783624f89392dff76cee4
C++
salpieiev/LearnGL2
/LearnGL2/Renderer10.cpp
UTF-8
3,463
2.703125
3
[]
no_license
// // Renderer10.cpp // LearnGL2 // // Created by Sergey Alpeev on 4/9/13. // Copyright (c) 2013 Sergey Alpeev. All rights reserved. // #include "Renderer10.h" #include "Shaders/BlendingShader.vsh" #include "Shaders/BlendingShader.fsh" Renderer10::Renderer10(int width, int height): RenderingEngine(width, height...
true
369e7f331254d58ca333a4ae0e69100d1024c58e
C++
mendibil/P3
/src/get_pitch/get_pitch.cpp
UTF-8
2,619
3
3
[]
no_license
/// @file #include <iostream> #include <fstream> #include <string.h> #include <errno.h> #include "wavfile_mono.h" #include "pitch_analyzer.h" #include "docopt.h" #define FRAME_LEN 0.030 /* 30 ms. */ #define FRAME_SHIFT 0.015 /* 15 ms. */ using namespace std; using namespace upc; static const char USAGE[] = R"( ...
true
29bd1da393e2c3df9196220f19ef7be19e6951e8
C++
DUNE/fnal-art
/art/Persistency/Provenance/SubRunID.cc
UTF-8
327
2.5625
3
[]
no_license
#include "art/Persistency/Provenance/SubRunID.h" #include <ostream> std::ostream & art::operator<<(std::ostream & os, SubRunID const & iID) { os << iID.run_ << " subRun: "; if (iID.isFlush()) { os << "FLUSH"; } else if (iID.isValid()) { os << iID.subRun_; } else { os << "INVALID"; } return...
true
4bd5b30cf7bfa86b74af44d3f09a3f810aef9ca5
C++
SenonLi/OpenGL_4.0_FreeSpace
/SLInternalUtility/Memory/SLSharedMemoryObject.h
UTF-8
2,062
2.90625
3
[ "MIT" ]
permissive
#ifndef __SLSHAREDMEMORYOBJECT__ #define __SLSHAREDMEMORYOBJECT__ #pragma once #include <memory> namespace slutil { /// <summary>SSE aligned memory allocation/deallocation for Image Processing </summary> class SLAlignedMemoryBuffer { public: SLAlignedMemoryBuffer() {}; explicit SLAlignedMemoryBuffer(unsigned...
true
fb5efd0021581d8071ae6b7c247b50e3c96a230c
C++
bulatral42/msu_cpp_autumn_2020
/08/tests.cpp
UTF-8
2,400
3.390625
3
[]
no_license
#include <iostream> #include <exception> #include <cassert> #include <vector> #include <mutex> #include <thread> #include <chrono> #include<set> #include "thread_pool.hpp" void print_test_number() { static int n{1}; std::cout << "Test " << n << ": " << std::endl; ++n; } int sum(int a, int b) { retu...
true
c7e76a39026d2e19f0b83bf6ec73044340f6ccf9
C++
byronsandoval1998/binarytreenode
/source/repos/Binary Tree Node/Binary Tree Node/BinaryTree.h
UTF-8
1,295
3.046875
3
[]
no_license
#ifndef BINARYTREE_H #define BINARYTREE_H #include "NodeList.cpp" #include <cstdlib> template <typename E> class BinaryTree { public: class BinaryTreeNode; public: class Position { public: E operator*(); Position left() const; Position right() const; Position parent() const; bool isRoot() const; bool i...
true
515e168c9cf1e180a772582271fdd878c1d0c905
C++
evanberkowitz/isle
/src/isle/cpp/integrator.cpp
UTF-8
7,385
2.53125
3
[ "MIT" ]
permissive
#include "integrator.hpp" #include <cmath> using namespace std::complex_literals; namespace isle { std::tuple<CDVector, CDVector, std::complex<double>> leapfrog(const CDVector &phi, const CDVector &pi, const action::Action *const action, const double length, ...
true
66dd4657bbe91fe778ff6320de7aaf6c2ad3cb9e
C++
quantograph/QG_GUI
/src/CheckBox.cpp
UTF-8
1,717
2.59375
3
[]
no_license
#include <QG_Devices.h> #include <QG_Include.h> #include "Window.h" #include "Control.h" #include "CheckBox.h" //================================================================================================= CheckBox::CheckBox(TouchScreen* screen, Window* parent, uint16_t x, uint16_t y, uint16_t width, uint1...
true
9b6e56642f0665388470b31b57b8e22b832e2da3
C++
younger-1/C_Program_Base
/53.顺序表/53.顺序表/List.h
GB18030
835
3.171875
3
[]
no_license
#pragma once #ifndef LIST_H #define LIST_H #include<iostream> using namespace std; class List { public: List(int size);//ʼ˳ ~List();//ɾ˳ void ClearList();//˳ bool ListEmpty();//˳п int ListLength();//ȡ˳ bool GetElem(int i,int *e);//ȡָԪ int LocateElem(int *e);//ѰҵһeԪصλ bool PriorElem(int *currentElem, int *preEle...
true
cdba8c1c82488b8e76a11559cfd7346a8af7c5a1
C++
andreparker/spiralengine
/GameEngine/Gfx/VisualGameState.hpp
UTF-8
1,148
2.75
3
[]
no_license
/*! */ #ifndef VISUAL_GAME_STATE_HPP #define VISUAL_GAME_STATE_HPP #include <boost/noncopyable.hpp> #include <boost/cstdint.hpp> #include <boost/shared_ptr.hpp> #include "../Core/Sp_DataTypes.hpp" namespace Spiral { class GameState; class Engine; class VisualGameState : private boost::noncopyable...
true
3d4e1c98a2ef6b68ce635d377609363dc6db9696
C++
h-hkai/PAT_ADVANCED
/1139_First_Contact.cpp
UTF-8
2,273
2.828125
3
[]
no_license
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; bool cmp(pair<string, string> x, pair<string, string> y) { if (abs(stoi(x.first)) != abs(stoi(y.first))) return abs(stoi(x.first)) < abs(stoi(y.first)); else ...
true
af4419250c6c7959ef7f8bffef1e65af8bce1e3f
C++
jzrake/counter-plot
/CounterPlot/Source/Core/ConfigurableFileFilter.hpp
UTF-8
2,027
2.5625
3
[]
no_license
#pragma once #include "JuceHeader.h" //============================================================================= class ConfigurableFileFilter : public FileFilter { public: //========================================================================= ConfigurableFileFilter(); /** * Reset the fi...
true
6723c0cc17b8f5226ffecb5c3d0d153c09b35a61
C++
Plouc314/particulesSimulation
/include/physic.hpp
UTF-8
1,798
2.65625
3
[]
no_license
# pragma once # include <iostream> # include <math.h> # include "partcule.hpp" # include "math.hpp" class Particule; class Constants { public: double pi = 3.14159265358; double masseProton = 1.6726e-27; double masseNeutron = 1.6749e-27; double masseElectron = 9.1094e-31; do...
true
304b1f18bc66da8687f1e4c4877cc008f7e26753
C++
danielh1204/UVa
/10742 - Euphomia/a.cpp
UTF-8
1,060
2.546875
3
[]
no_license
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; typedef long long Long; int p[1000003], a[1000003]; int P, N; void sieve(){ P = 0; for(int i=0;i<=1000000;++i) a[i] = 1; for(int i=2;i*i<=1000000;++i){ for(int j=i;j*i<=1000000;++j){ a[i*j] = 0; } ...
true
321e65d44cd798fedad1a1a2b3a58949343deaab
C++
mmason930/kinslayer-mud
/src/guilds/GuildUtil.h
UTF-8
8,696
2.546875
3
[]
no_license
#ifndef GUILD_UTIL_H #define GUILD_UTIL_H #include <map> #include <vector> #include <mysql/sqlDatabase.h> class Guild; class GuildStatus; class GuildApplication; class GuildApplicationStatus; class GuildApplicationSignature; class GuildApplicationSignatureStatus; class UserGuild; class UserGuildStatus; ...
true
28f090937c7d6a04868c02ed3e85d4f6592807c6
C++
divakar54/JavaScript30
/Segment Trees/segment_trees.cpp
UTF-8
3,754
2.953125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int lazy[10000] = {0}; void buildTree(int *a, int s, int e, int *tree, int index) { if (s == e) { tree[index] = a[s]; return; } int mid = (s + e) / 2; buildTree(a, s, mid, tree, 2 * index) ; buildTree(a, mid + 1, e, tree, 2 * index + 1) ; tree[index] = min(tree...
true
91583255476c5d2eb3c4fbd3f08ec9e06c01a8f9
C++
tylercchase/cs202
/labs/lab04/main.cpp
UTF-8
1,420
3.203125
3
[]
no_license
#include <iostream> #include <fstream> #include <vector> #include <string.h> #include <iomanip> #include <algorithm> int main(){ std::ifstream readFile("text.txt"); std::string line; //Print out the file int charTracker{0}; int wordTracker{0}; int lineTracker{0}; int paraTracker{1}; whi...
true
e9990673dbc6b3ffdbdfc7840a91e2bf2f0628f9
C++
tarek99samy/Competitive-Programming
/Math/SolveQuadraticEqua.cpp
UTF-8
608
3.671875
4
[ "MIT" ]
permissive
// Function To Solve a Quadratic Equation // If The Returned Roots equal To INT_MIN So The Roots are complex vector<double> SolveQuadratic(double a , double b , double c){ vector<double> Roots(2) ; if(b*b-4*a*c<0){ Roots[0]=INT_MIN , Roots[1]=INT_MIN ; } else{ Roots[0] = (-b+sqrt(b*b...
true