blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
b1e233cf856f85be2b424c6e85983d4374bb7461
34b9e03fd6e10b5623ef35ca57a0adce0126ffdd
tpurtell/android-cpp-sdk
/android-cpp-sdk/platforms/android-4/java/util/concurrent/RejectedExecutionHandler.hpp
C++
hpp
2,914
permissive
/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: java.util.concurrent.RejectedExecutionHandler ================================================================================*/ #ifndef ...
9a10b331d07d8a4a3505fd0826ec183717ecdfbd
f77d810ac4277f8189a439f9624ac52aafb90862
HazlerDaniel/Menyalin-Isi-Array
/MENYALIN ISI ARRAY.cpp
C++
cpp
464
no_license
#include<stdio.h> main(){ int R[2][3]={97,1,24,22,1,97}, T[2][3],r,t; printf("isi variabel R:\n\n"); for(r=0; r<2; r++){ for(t=0; t<3; t++){ printf("%5i",R[r][t]); } printf("\n"); } for(r=0; r<2; r++){ for(t=0; t<3; t++){ T[r][t]=R[r][t]; } } printf("\n\n\n\n\nHasi...
d1f7d5013e7e6d8d0d216b52e701535130724924
ec7fe2bed1efdc5017f229d205c91b12e26b0744
katrinechow/OSU-CS-162
/Lab9_Chow_Katrine/palindrome.hpp
C++
hpp
819
no_license
/******************************************************************************* ** Program Name - Stack and Queue STL Containers: palindrome.hpp ** Author: Katrine Chow ** Date: March 9, 2018 ** Description: This is the header file for class Palindrome, which contains a ** STL Stack container that will create a palin...
f2e0d1168dd85314c358ffc066e94d1add1a7b7f
da1ebca50b427d28748814bed78b2380a30acaef
esl000/RpgPortfolio
/cPlayerActionStand.cpp
C++
cpp
517
no_license
#include "stdafx.h" #include "cPlayerActionStand.h" cPlayerActionStand::cPlayerActionStand() : m_pOwnerMesh(NULL) , m_dwStandAnim(0) { } cPlayerActionStand::~cPlayerActionStand() { } void cPlayerActionStand::Start() { if (m_pOwner) m_pOwnerMesh = m_pOwner->GetMesh(); } void cPlayerActionStand::Update() { ...
703d263fb43b6269d2a568f9ce88931b33795867
5e68e00edd077eabcd81fe7c8b68295770fbe66b
singhashish-26/Leetcode
/Algorithms/Array/reshape-the-matrix.cpp
C++
cpp
690
no_license
#https://leetcode.com/problems/reshape-the-matrix/ class Solution { public: vector<vector<int>> matrixReshape(vector<vector<int>>& nums, int r, int c) { int x = nums.size(); int y = nums[0].size(); if(x*y != r*c) { return nums; } vector<vector<int>> mat(r...
5e3aa59b2818cd3bfa18a1c73482b0e326daf6b9
839c24330a6ae0329884405f24745a990d37696d
briancpark/deitel-cpp
/VCB600ENU1/MSDN_VCB/SAMPLES/VC98/SDK/GRAPHICS/DIRECTX/STRETCH3/STRETCH.CPP
C++
cpp
25,424
no_license
/*========================================================================== * * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. * * File: stretch.cpp * * stretch with multimonitor support * ***************************************************************************/ #def...
d60ea7eb3f76bca1fa8f2a219744508e45887bc8
543c7e9dcdfb177cd01728fb318053fb686454c9
ferdhiawanpp/Struk-Data-Buku
/Buble Short.cpp
C++
cpp
527
permissive
#include <iostream> #include <iomanip> using namespace std; int main () { int Nomor [8]={8,99,14,11,15,42,10,2}; int temp; cout<<"Data Sebelum Diurutkan : \n"; for (int a=0; a<8; a++) { cout<<setw(3)<<Nomor[a]; } cout<<"\n\n"; for(int i=0; i<7; i++) for(int j=0; j<7; j++) if (Nomor[j] >= No...
e887158650d27cee79ba428f5fd1e9ac45addad3
ade0232223f8106f61f38a9f9c71f0be35764ad4
shardul08/30-Day-LeetCoding-Challenge
/Week 2/543_Diameter_of_Binary_Tree.cpp
C++
cpp
1,333
no_license
/* Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. Example: Given a binary tree 1 / \ 2 3 / \ ...
4a495cf6fc3d54a0834b4e7fe25ced69351d6dd2
6e3043c0446fc02cf4a7769e35e780f2ed91f307
yotamgi/dgx-autopilot
/poc/orientation/compass.cc
C++
cc
2,219
no_license
#include <iostream> #include <linux/i2c-dev.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <string> #include <cstdlib> #include <stdint.h> const int COMPASS_I2C_ADD=0x1E; int main() { std::string filename = "/dev/i2c-2"; // OPENING int file = open(filen...
42224244810bd82298bb2b73565704ec7f82a9bc
bf8511b8eeefef225055ad7fa8da646f98385407
crawler-john/StudyNote
/1note/培训资料/第6部分C++/code/day10_morning/map/main.cpp
C++
cpp
6,017
no_license
#include <iostream> #include <string> #include <map> #include <set> using namespace std; int main() { //map容器存放的数据是一对数据(key,value) //map容器是有序的,并且是以key值的升序排列 //map容器的key值是唯一的 map<int,string> t_map1; cout << "map1 size : " << t_map1.size() << endl; pair<map<int,string>::iterator,bool> t_result...
43bb8d09b7a6768bc9404022dfad294b1db257f9
bd61ad679100728e22d046cca8e9b04872588bd5
514467952/bitekeji
/模拟三次密码输入/模拟三次密码输入/源.cpp
C++
cpp
467
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> #define N 10 int main(void){ char str1[N] = { '0' }; char str2[N] = { '1', '2',' 3', '4',' 5', '6', '7', '8', '9', '0' }; int cnt = 0; while (cnt<4){ printf("请输入密码:\n"); gets_s(str1); if (strcmp(str1, str2) == 0){ printf("成功解锁\n"); return 0; } else{ ...
fa6872a88d470ab2ed8db6969ddbe6e909686e04
995b5e954e23f716ccdd8bb15387d18b4246b5a4
BitRapture/sfot
/sfot/src/main.cpp
C++
cpp
1,455
no_license
#include "sfot/sfot.h" #include <iostream> #define op (u8)sfotops:: #define cmem (u16)sfotcmem:: #define STEPS 2 int main() { // Create 6502 system sfot processor; // Load some machine code u8* mem = new u8[65536]{ op LDA_IMM, 0xFF, op ASL_A, 0x01 }; sfotmem memory(mem, cmem M64K); // Debug variab...
2e688d73dd2093f6a57d2e1b12d2cd4e096a07f7
0522fbf974a25ad47354c915d13116cdc6f13fb5
DevinChang/cpp
/code_modified_20150323/10/37_1.cpp
C++
cpp
805
no_license
#include <iostream> #include <vector> #include <list> #include <iterator> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { ostream_iterator<int> out_iter(cout, " "); vector<int> vi = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; // 用流迭代器和copy输出int序列 copy(vi.begin(), vi.end(), out_iter);...
f5b18c115b7e1210c536b40e474653aca14f6830
14f4d32f4c299f11aaedd8c10cc4ba9b22030c69
AkiLotus/AkikazeCP
/Vault/Codeforces Problems/99A.cpp
C++
cpp
4,234
no_license
/********************************************************** * Code written by Akikaze * * Duy-Bach Le, #Team4T's Chief Executor * * #Team4T Tertiary Flagship - Oblivion * * * * Written by a ...
84ae9baeed4532bbf3e60323f0e700e158eb9938
0f463e6218b36982e23f28ca4d5777f333caeca4
levitatecore/Levitate20190714
/src/init.cpp
C++
cpp
36,517
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "init.h" #include "main.h" #include "chainparams.h" #include "script.h" #...
0d3c9f7ec7219427f205b8d52fa6fdcc3bed08bd
a15f44d5c97daab4117626647fe9ce5f789d72b7
adithyabhat99/competitive_coding
/hackerrank/hourglass.cpp
C++
cpp
838
no_license
// https://www.hackerrank.com/challenges/2d-array #include <bits/stdc++.h> using namespace std; // Complete the hourglassSum function below. int hourglassSum(vector<vector<int>> arr) { int sum=INT_MIN; for(int i=0;i<arr.size()-2;i++) { for(int j=0;j<arr[i].size()-2;j++) sum=max(sum,arr[i][...
3fc8e1d673a53f62d79ffc6608cc8b47bd4ebcb3
b6e42e826cc266ae8f4732ea36ec8b5294a76a66
mrzw/Algorithm
/替换空格/main.cpp
C++
cpp
1,012
no_license
#include <iostream> #include <vector> #include <cstring> using namespace std; class Solution { public: // 第一次遍历空格个数,然后从后往前赋值 void replaceSpace(char *str,int length) { char *p = str; int lengthOrigin = strlen(str); int numSpace = 0; while(*p!='\0') { if(*p==' ') ...
fe112e2503270a1a5d35170f91def7cb20aff940
defdcb3bd03b9dd6628459fa53aed3fff2370ec2
martinavit/my_majorana
/CR/plotCode_new copia.cc
C++
cc
5,988
no_license
//include c++ library classes #include <fstream> #include <set> //include Root classes #include "TCanvas.h" #include "TLatex.h" #include "TLine.h" #include "TF1.h" #include "TH2D.h" //Include other parts of the code //#include "MultilepSUSYfunc.h" #include "plotCode.h" #include "drawLumi.h" extern const double xPad; e...
8dcdf77ebe6a84249fb5e90d62ebf363ad7d0d4e
1e7c35a7f17c20e70bc937428ca73cd6b85c829c
cyjie/chromium
/extensions/browser/updater/update_service_unittest.cc
C++
cc
27,143
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stddef.h> #include <memory> #include <utility> #include <vector> #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/fi...
85b8abcfe25b98cf86fdd1515672b22156311b26
1c17c2e39b6111b52c1873c97d44e9ec592f61b3
enigma-dev/enigma-dev
/CompilerSource/settings-parse/parse_ide_settings.cpp
C++
cpp
10,341
no_license
/********************************************************************************\ ** ** ** Copyright (C) 2008 Josh Ventura ** ** Copyright (C) 2014 Seth N. Hetu ...
5840ef07d17194a7a7590533495e261ad2afd514
55f58b9f77d6778d34cf61490a6af609188b1db7
yeqiaojun/server_bench
/sync_frame/micro_thread/micro_thread.cpp
C++
cpp
36,676
no_license
/** * @filename micro_thread.cpp * @info micro thread manager */ #include "mt_version.h" #include "micro_thread.h" #include "mt_net.h" #include "mt_sys_hook.h" #include "valgrind.h" #include <assert.h> using namespace NS_MICRO_THREAD; #define ASSERT(statement) //#define ASSERT(statement) assert(statement) ...
edd468c7e5ce3fd3c9942af70b2b4acc27c128d2
abc5a74114a4578248aec4cca98cba55ae6921e2
ShaneTWilliams/bitlib
/src/gates/single_input_gate.cpp
C++
cpp
329
no_license
#include "bitlib/gates/single_input_gate.hpp" #include <string> namespace bl { bl::SingleInputGate::SingleInputGate(std::string name) : Primitive(name), input(InputNode::create_new(State::LOW, this, name + "::INPUT")), output(OutputNode::create_new(State::LOW, this, name + "::OUTPUT")) {} } // name...
30dcaf1b728ea05c678efa4eef1819df5c498ad5
bda1defda8356b191eabc3de1e8cc21c889ca38f
seanmaaa/2017_2_Data_Structure
/OOPDS_LAB_05_Console_Handling(Graphical)/LAB_05/ConsolePixelDrawing.hpp
C++
hpp
1,260
no_license
/* ConsolePixelDrawing.hpp */ #ifndef CONSOLE_PIXEL_DRAWING_HPP #define CONSOLE_PIXEL_DRAWING_HPP #include "Shape.hpp" using namespace std; #define MAX_NUM_SHAPES 100 /* PEN_Styles */ #define PS_SOLID 0 #define PS_DASH 1 // ------- #define PS_DOT 2 // ....... #define PS_DASHDOT 3 // _._._._ #define PS_DASHDOTDOT ...
72a0495e0d8ce608b63dd97fe40465820bbe5000
b1b5510340bbef55cdf4f52eb0a736afde2bdb4a
valentinvstoyanov/fmi
/daa-practice/spiral_walk.cc
C++
cc
934
no_license
#include <iostream> using namespace std; const int MAX_SIZE = 100; int main() { int n; cin >> n; int arr[MAX_SIZE][MAX_SIZE]; int counter = 0; int top = 0; int bottom = n - 1; int left = 0; int right = n - 1; int direction = 0; while (top <= bottom && left <= right) { if (direction == 0) { for (i...
cdcb6e2f747999123bc1de27e992b7d5aae24770
2152403325b9fdb15aa8d66a6105f5f1fc18fb52
biromiro/feup-cal
/TP6/ex2.cpp
C++
cpp
1,658
permissive
#include "Graph.h" #include "TestAux.h" // Complete the functions on the Graph.h file /// TESTS /// TEST(TP6_Ex2, test_dijkstra) { Graph<int> myGraph = CreateTestGraph(); myGraph.dijkstraShortestPath(3); checkAllPaths(myGraph, "1<-3|2<-1|3<-|4<-2|5<-4|6<-3|7<-5|"); myGraph.dijkstraShortestPath(1); ...
51b71dadeef47f06ca24ecb53a6cde6aaac86f1b
b76ef07f1834e07886722fd6b449f882ed7626f2
zeliard/aws-sdk-cpp
/aws-cpp-sdk-s3/source/model/Rule.cpp
C++
cpp
4,467
permissive
/* * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file...
6a7350ebc088e45cb7a8af6c1ae8bb9a888894dd
8ffba9cd69e7592c3effec4dfeb64572ff8909c9
yovnchine/zsearch
/src/Constants.hpp
C++
hpp
590
no_license
#ifndef CONSTANTS_HPP #define CONSTANTS_HPP #include <string> // #define QUERY_PARSER_DELIMITERS " \t\n\r.," // #define POST_DATA_KEY "data" namespace zsearch { const std::string QUERY_PARSER_DELIMITERS = " \t\n\r.,;"; //const char KEYWORD_SPLITTER = '/'; const std::string POST_DATA_KEY = "data"; const std::st...
4fa600e002e5a1445400dcf59fc1407e8038f830
519ed1979520956abca77c46055d1a3b121e8235
madMAx43v3r/mmx-node
/generated/contract/include/mmx/contract/Binary_find_method.hxx
C++
hxx
2,135
permissive
// AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_Binary_find_method_HXX_ #define INCLUDE_mmx_contract_Binary_find_method_HXX_ #include <mmx/contract/package.hxx> #include <vnx/Value.h> namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT Binary_find_method : public ::vnx::Value { public: ...
f7a612cd2ff44e09229b117c2a6b7f8da8c278f7
9e4d3829a592b1567afa7db0a792ede30bd47199
sillsdev/WorldPad
/Src/Graphite/GrCompiler/Grammar/Antlr/MismatchedTokenException.hpp
C++
hpp
4,184
no_license
#ifndef INC_MismatchedTokenException_hpp__ #define INC_MismatchedTokenException_hpp__ /** * <b>SOFTWARE RIGHTS</b> * <p> * ANTLR 2.6.0 MageLang Insitute, 1999 * <p> * We reserve no legal rights to the ANTLR--it is fully in the * public domain. An individual or company may do whatever * they wish with source cod...
3f8a8f5bc518799b4b0dce31598b96b9360f7a51
dcda9f6c88bfd6bb6650f68a102ff46a5cb2f232
fsps60312/old-C-code
/C++ code/IOI Practice/2012/Parachute rings.cpp
C++
cpp
2,773
no_license
#include<cstdio> #include<cassert> #include<vector> using namespace std; int DJ[1000000]; int Find(int a){return DJ[a]==a?a:(DJ[a]=FInd(DJ[a]));} bool Merge(int a,int b) { if((a=Find(a))==(b=Find(b)))return false; DJ[a]=b; return true; } int N,M; vector<int>ET[1000000],TYPE[1000000]; void Walk(int u,const int depth)...
7c4ed9908dcc88c553edadecfd51b9b37acb3423
cdee0be82db1ebca6903c26692de4682d8a1cc6d
zjd1988/mindspore
/mindspore/ccsrc/utils/callbacks.cc
C++
cc
8,516
permissive
/** * Copyright 2019 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 applicable law...
de600aa0cd6ba3c383d1f424d33181d92fe32532
5e4f273dc3ee72872e887383f9d3e0d5585a4e92
wowoto9772/Hungry-Algorithm
/BOJ/5502/solution.cpp
C++
cpp
567
no_license
#include <stdio.h> #include <limits.h> #include <string.h> #include <algorithm> using namespace std; char str[5003]; int dp[5003][5003]; int dy(int l, int r) { if (l >= r)return 0; int &ret = dp[l][r]; if (ret != -1)return ret; ret = INT_MAX; if (str[l] == str[r])ret = min(ret, dy(l + 1, r - 1)); ret = m...
6f4d52b8736c0d4280220a60be059454f9584612
fd823ccea0758a93dc493ec3a8c0de0965ae94a9
UM-ARM-Lab/cdcpd
/external/sdf_tools/src/sdf_tools/bindings.cpp
C++
cpp
5,612
permissive
#include <cstdint> #include <pybind11/eigen.h> #include <pybind11/functional.h> #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include "arc_utilities/zlib_helpers.hpp" #include "sdf_tools/collision_map.hpp" namespace py = pybind11; using namespace Eigen; using namespace sdf_tools; PYBIND11_MODULE(pysdf_t...
16ce7c21326f41d02495f05ae74f61dd00ed6420
8a76f587ae99b0a2bd309006e16caf20b274b298
sapariduo/reindexer
/cpp_src/core/ft/ft_fast/dataprocessor.cc
C++
cc
10,956
permissive
 #include "dataprocessor.h" #include <chrono> #include <functional> #include <thread> #include "core/ft/numtotext.h" #include "core/ft/typos.h" #include "tools/logger.h" #include "tools/serializer.h" #include "tools/stringstools.h" using std::chrono::high_resolution_clock; using std::placeholders::_1; using std::chr...
f5f5622857ba8c7608915ae3ef794aac4678c046
d7244f325faf6d25817017e5bc9d7359c6b2f5eb
caotto/openbr
/sdk/plugins/svm.cpp
C++
cpp
5,198
permissive
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2012 The MITRE Corporation * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * y...
44dd9eca6ba7e90cdb70d1b942a3805fb3c7f4d2
3a341b48c979f2dc78e0990067e169d03b0de0c5
IidaTakuma/KPR_Library
/string_utility/rolling_hash.cpp
C++
cpp
1,586
no_license
#include <bits/stdc++.h> using namespace std; using ull = unsigned long long; /** Rolling Hash **/ // params start const int LENGTH = 5001; // 文字列の長さ // params end const ull MASK30 = (1UL << 30) - 1; const ull MASK31 = (1UL << 31) - 1; const ull MOD = (1UL << 61) - 1; const ull MASK61 = MOD; const ull POSITIVIZER = ...
d107560e2d6c98576344c10b32c8a00ac8c6515d
8439cfc1df8bdf424e70bc009c25e9b460d940ac
dlosag/SmartDoorRock
/Assets/SmartMaker/Arduino/GenericTone.cpp
C++
cpp
1,106
no_license
/* GenericTone.cpp - SmartMaker library Copyright (C) 2015 ojh6t3k. All rights reserved. */ //****************************************************************************** //* Includes //****************************************************************************** #include "UnityApp.h" #include "GenericTone.h" ...
dc4a3b0af37167b14f46d0b7a733927d980f8cdf
d4fb650ed0858acda4f62d8a9d82b9ee7830c71f
Subinsdev/src
/moveit/moveit_ros/planning/rdf_loader/src/rdf_loader.cpp
C++
cpp
7,230
permissive
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2011, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
8782bbe38c6f3c7bf8ff6e77446168e269d1eead
ea6c15bf29be1b88f34cda0709d83d7b6cac2cfb
DolbyLaboratories/mirror-aosp-platform-frameworks-av
/media/libstagefright/AwesomePlayer.cpp
C++
cpp
88,492
permissive
/* * Copyright (C) 2009 The Android Open Source Project * * 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 app...
bef48ef9386c31647b51d1dcb70a9d3411673b7e
ea3a18e3cb724de5c7e0586daaf73d274b297f10
JoeAltmaier/Odyssey
/Odyssey/IsmDriveMonitor/DmSCSI.cpp
C++
cpp
4,392
no_license
/*************************************************************************/ // This material is a confidential trade secret and proprietary // information of ConvergeNet Technologies, Inc. which may not be // reproduced, used, sold or transferred to any third party without the // prior written consent of Converg...
4511aff4540ce786530c25e62eb54f7e5211582b
4ac9799398d4c588328a6577a242b4038709d840
grighth12/algorithm
/HYJ/boj/Graph/boj10423.cpp
C++
cpp
1,413
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; vector<int> parent; struct Edge { int start; int end; int cost; Edge(int start, int end, int cost) { this->start = start; this->end = end; this->cost = cost; } }; struct compare { bool operator()(Edge a, Edge b) { return a.co...
d1fb3915642a52af261f2c32e56581206cf627e1
6f36db761ec27766973d24329d87c006160f44fa
djanuskaite/Cplus_darbai
/While_atsiskaitymas/while.cpp
C++
cpp
512
no_license
#include <iostream> using namespace std; int main() { long long digit, n , quantity=0, sum=0; // long long digit instead of int digit for ability to write more than 10 digits. cout<<"Enter a number: "; cin>>n; while(n > 0) { digit=n%10; if(digit%2!=0 && digit >3) ...
fb02a656f7c9821b319ae4b623d0db920399c81e
9e4bd4527d883447d58f292e5e4615295ad04247
bluespex/random-codes
/knapsack01.cpp
C++
cpp
829
no_license
#include<bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define P pair<int,int> #define F first #define S second int32_t main(){ ios_base:: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt",...
f58203ea42de60df34554b81731d3022cc4bea3e
896b66aa1dbb335670568cf9b8f69a17241cd9b5
henriyl/ZShadeSandboxOld
/Framework/Graphics/Terrain/Old/Heightmap.cpp
C++
cpp
14,449
no_license
#include "Heightmap.h" #include "BetterString.h" #include "CGlobal.h" #include "HeightErosion.h" #include "WaterErosion.h" #include <fstream> using namespace std; using ZShadeSandboxTerrain::Heightmap; //=================================================================================================================== ...
06d3bc947f184f27e08341e5fd3d6ce0d3e53418
dcd78bc8b8dbf761038b299a7fce861b98e9c965
InsightSoftwareConsortium/ITK
/Modules/Filtering/MathematicalMorphology/test/itkClosingByReconstructionImageFilterTest.cxx
C++
cxx
3,669
permissive
/*========================================================================= * * Copyright NumFOCUS * * 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 * * https://www.apache.o...
911163075d031cfc4e48617787d6908d8ceb0e07
5a6dc68c939723e2a426467adaf731d92e01ebfd
ktunya/ChasteMod
/ode/src/common/AbstractCvodeSystem.hpp
C++
hpp
19,051
permissive
/* Copyright (c) 2005-2015, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
ff52e8617dc28c316a513df4ee2a520d8a47b82e
7c1a09e242c5a5b6a116a15fdca5b300a03055ec
pho-rs/E20-PE2.-Mechanical-black-box
/input.cpp
C++
cpp
7,315
no_license
// EuPhO 2020 Experimental Round - CONFIDENTIAL #include "input.h" #include <iostream> #include <string> #include <sstream> #include <cmath> #include "output.h" using namespace std; enum InputLineStatus { OK, BEGIN, // Begin experiment QUIT, // Quit the program INVALID, ACC_OUT_OF_RANGE, D...
fb01529a08c16f2a598833a2a29b5b26233dc237
d9ed0f5e8926d4bdeb4cf90a6831406b9437d434
jscipione/Paladin
/PalEdit/Sources/Now.cpp
C++
cpp
2,011
permissive
/* $Id: Now.cpp,v 1.2 2009/12/31 14:48:41 darkwyrm Exp $ Copyright 1996, 1997, 1998, 2002 Hekkelman Programmatuur B.V. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions ...
8b6ee1503d15c0c6b2ca66e1440adb11a1d90e3d
470a98e4670978b86d12f429f28220a1f0a9c974
joerodd/praat
/fon/MovieWindow.cpp
C++
cpp
5,838
no_license
/* MovieWindow.cpp * * Copyright (C) 2011-2012,2013,2014 Paul Boersma * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later ve...
494037f545e0a2fce6ca1c1724c68f9d54bca071
b98a77fb77d490cc9b3ca9017b705321a47b860e
lmarent/m-nslp
/src/msg/ie_object_key.cpp
C++
cpp
1,592
no_license
/// ----------------------------------------*- mode: C++; -*-- /// @file ie_object_key.cpp /// Keys used to store NSIS metering objects. /// ---------------------------------------------------------- /// $Id: ie_object_key.cpp 2558 2014-12-26 $ /// $HeadURL: https://./src/msg/ie_object_key.cpp $ // ===================...
42cca2c0cba01193486d52862eedcf0a926b4d75
745c1c1d77f0b98f992bb72f5a5d554bf2e2ff25
baoluojian123/mapbox-gl-native
/src/mbgl/layout/symbol_projection.cpp
C++
cpp
22,484
permissive
#include <mbgl/layout/symbol_projection.hpp> #include <mbgl/map/transform_state.hpp> #include <mbgl/renderer/render_tile.hpp> #include <mbgl/renderer/buckets/symbol_bucket.hpp> #include <mbgl/renderer/layers/render_symbol_layer.hpp> #include <mbgl/util/optional.hpp> #include <mbgl/util/math.hpp> namespace mbgl { /* ...
f5400b98d6ef40ec24e2e5bb49ee0127feda54e3
5035eb7a081f0cc39f4a4cae527fca3d82b3b797
subnr01/subs-practice
/leet_code/Binary_Search_leet/medium/power_x.cpp
C++
cpp
489
no_license
/* Implement pow(x, n). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 */ class Solution { public: double myPow(double x, int n) { if(n<0){ return (1/x)*myPow(1/x,-(n+1)); } if(n==0)return 1; if(n%2==0){ ...
fb3c10f2d68fc495f4fbddf55739da9a8fdd3cc7
c1a508a10a2d0e9bf1f7a6e6436b801b8da4914f
OscarCaro/CompetitiveProgramming
/AceptaElReto/340_CuadradosConCerillas.cpp
C++
cpp
233
permissive
#include <iostream> using namespace std; int main() { int numOfCases, n1, n2; cin >> numOfCases; for (int i = 0; i < numOfCases; i++) { cin >> n1; cin >> n2; cout << ((n1 + 1) * n2 + (n2 + 1) * n1) << endl; } return 0; }
baaa1e46a7871e5c0c7b215016a4f6b152dd6b9f
8ce546f71a79eeda0c031cd5741fe6c2c049d39b
pgeissler/Kratos
/applications/FluidDynamicsApplication/custom_elements/fluid_element.cpp
C++
cpp
32,679
permissive
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #include "flu...
84af5db3844b7ab84c13de787f8ebbbaec61b8ea
41daf976a067d63f5bc4ba18ca922ea92aa5c65b
dpadgett/DemoTools
/JKDemoMetadata/cl_parse.cpp
C++
cpp
14,053
no_license
// skeletal version. populates snapshots and that's about it #include "qcommon/q_shared.h" #include "qcommon/qcommon.h" #include "client/client.h" #include "demo_common.h" extern cvar_t *cl_shownet; char *svc_strings[256] = { "svc_bad", "svc_nop", "svc_gamestate", "svc_configstring", "svc_baselin...
7d310c180cab5c75e70424671b11fb6bab3a4968
e2afefe6fd1952d08d0dfcc19fca393801289c5c
yixin-09/tr29124_test
/carlson_std.cpp
C++
cpp
5,480
no_license
// $HOME/bin_specfun/bin/g++ -g -std=c++14 -D__STDCPP_WANT_MATH_SPEC_FUNCS__ -o carlson_std carlson_std.cpp #include <ext/cmath> #include <iostream> #include <complex> #include <limits> int main() { using namespace std::literals::complex_literals; std::cout.precision(std::numeric_limits<double>::digits10); st...
93f3149d43c36b0d99879e2cdf5b9ca69523e3c6
a18aafe94477b93a9bd09a86adb3b9c75da35398
NickVoron/Stable
/Sources/Libraries/dx9/stats.cpp
C++
cpp
2,268
no_license
// Copyright (C) 2012-2017 Voronetskiy Nikolay <nikolay.voronetskiy@yandex.ru> // // This library is distributed under the MIT License. See notice at the end // of this file. // // This work is based on the RedStar project // #include "stats.h" #include "vertexBuffer.h" #include "indexBuffer.h" #include "vertexDeclara...
70c2a063b30be004e6c0c0d8ee5498268e08d4b6
fae7b12ac03efe4646b92d559132f0811af46130
bulletghost1/ccode
/ifelse_2d.cpp
C++
cpp
725
no_license
//ifelse_2d.cpp #include <iostream> #include <cmath> using namespace std; #include <stdio.h> int main() { int r,c;//row and column char ac = '*'; char bc = '#'; char cc = ' '; char dc = '|'; char thechar = ' '; char lst = ('*','<','>'); int val = 0; int m[8][8] = { {3,0,3,0,3,0,3,0} , {0,0,0...
828d5b102cf6e095ddba3ed2b27242c4f35f9fcb
0c1b47af1dc1d62ca1acba79c495afc9719c0a3f
burentop/DawsonCpp
/Ch2/designers_network/Designers Network/Designers Network/main.cpp
C++
cpp
1,239
no_license
// // main.cpp // Designers Network // // Created by Brent Perry on 8/31/16. // Copyright © 2016 Brent Perry. All rights reserved. // #include <iostream> #include <string> using namespace std; int main() { string username; string password; bool success; cout << "\tGame Designer's Network\n"; ...
f11a3e444173dca14ae81f9534dc8faf4f7a5ac7
16cca2efaef64d0a0562d31504927dba3af76f5b
dguyot/paraload
/Conf.cpp
C++
cpp
4,118
no_license
/* Copyright or © or Copr. Dominique GUYOT 2016 dominique.guyot@univ-lyon1.fr This software is a computer program whose purpose is to make load balancing for very large data parallel computing. This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free softwar...
22a32f6166701b60fb57a3b71fe6d59d6dd14f95
e35babaae19b0629cebc114a96bf86bf0b0cd886
tesch1/color
/example/less-than-1k/assign/xyy/xyy2yuv.cpp
C++
cpp
746
permissive
#include <iostream> #include <iomanip> #include "color/color.hpp" int main( int argc, char *argv[] ) { ::color::cmy< float > c0; //!< Instead of float you may put std::uint8_t,std::uint16_t, std::uint32_t, std::uint64_t, double, long double ::color::yuv< std::uint8_t > c1; //!< Instea...
aca40c3d1ee031d235700f97a1407e23d4d18e74
7a4bd84343395253be10cc9ca659a2c74ffb8869
Uchuujin01/repos
/Project1/Project1/Source.cpp
C++
cpp
668
no_license
#include <iostream> #include <vector> #include <map> #include <string> using namespace std; struct Person { string name; string surname; int age; }; int main() { vector<int> nums = { 1, 3, 5, 7 }; cout << "Hello World!" << endl; cout << nums.size() << endl; map<string, int> n_to_v; n_to_v["one"] = 1; n_to_...
af8c5affabe3752ec617c6bf673ae11e0e7ac71d
82c7338d53b4205614fb96d7270d2853dac035b9
SeqviriouM/GraFix3D
/Grafix3D/interface-build-desktop/release/moc_spravka.cpp
C++
cpp
2,356
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'spravka.h' ** ** Created: Sun 16. Oct 13:09:30 2011 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.0) ** ** WARNING! All changes made in this file will be lost! *******************...
cf564e5f16b0a5404aa22546c56e700c61d90686
a10f961d2832ce16cef91700b64c3c3d48d7c055
StevensL/Dawn-of-the-living
/gamev0.1.4/Acid.cpp
C++
cpp
3,482
no_license
#include <windows.h> #include <gl/gl.h> #include <math.h> #include "Acid.h" #include "worldCoord.h" #include "lcglmath.h" #include "ogro.h" #include "world.h" using namespace lcgl; class MS3DMonster; #define ACID_SPEED 75.0f const float SMALL_DROP = .01; const float POS_DROP = .9879; const float NEG_DROP = 1.0121; ...
ef3dbea80e76a4c74a495ac521add33873c915c0
a00763c608a010ad884c2de93427289498a68b0c
luanquanghuy/NhapMonLapTrinh
/Cau 1(a,b)/bai 30-37.cpp
C++
cpp
1,743
no_license
#include <stdio.h> // bai 30 int isDoiXung(int a[], int n){ int i; for(i=0; i<n/2; i++) if(a[i]!=a[n-1-i]) return 0; return 1; } // bai 31 int isAllNguyenTo(int a[], int n){ int i, j, nUoc; for(i=0; i<n; i++){ nUoc = 0; for(j=1; j<=a[i]; j++) if(a[i]%j==0) nUoc++; ...
4f681aec2303e4deac0fedcb56485ff3decf4ca4
3c59f0180a65429087bc1de2063c1a829b3a63bf
zhh2005757/slambook2_in_Docker
/cmake-3.17.5/Source/cmInstallFilesCommand.cxx
C++
cxx
5,420
permissive
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmInstallFilesCommand.h" #include <cm/memory> #include "cmExecutionStatus.h" #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmInsta...
78600f386a2c64b9cb2374538560e5192305b036
ed422462aaae1c8768ac4f1cd60b7d4e7ebf4ee9
ydiz/decays
/kaon/typeIV_a/typeIV_a.cc
C++
cc
4,856
no_license
#include "kaon/kaon.h" #include "typeIV_a_diagrams.h" #include "../table3d_utils.h" using namespace std; using namespace Grid; int main(int argc, char* argv[]) { Grid_init(&argc, &argv); #ifdef CUTH_FREE_FIELD int max_uv_sep = 3; Env env("FreeField_8nt8"); #else int max_uv_sep = 16; Env env("24ID"); #endi...
24805f1ca0153821dd116963c5482d3fb0dd832c
7e6fb657b91dfb439e06f346ca074bc39834e9c0
alwynwan/HackerRank
/algorithms/grading_students.cpp
C++
cpp
2,112
permissive
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'gradingStudents' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts INTEGER_ARRAY grades as parameter. */ vector<int> gradingStudents(vector<...
f3ae9d610125211fecb80f2d5167221543e7df74
a9c5da53caa324bafe307fd560c1ffc8f96c1e0e
jmnel/math4171
/src/arcplot/Figure.cpp
C++
cpp
1,385
permissive
#include <PythonFunction.hpp> #include <PythonModule.hpp> #include <PythonString.hpp> #include <PythonTuple.hpp> #include "Figure.hpp" namespace arc::plot { // -- Constructor -- Figure::Figure() { // Load plotting module module = PythonModule("arcplots"); PythonFunction createFigureFu...
1eab627bf661111a45047f874e1c24ce7439240d
0a04e9cc0d444b8fec4135e99daa284dbe2a5f5e
luk036/vtr-verilog-to-routing
/vpr/src/base/read_blif.cpp
C++
cpp
27,520
permissive
/* * BLIF Netlist Loader * =================== * * This loader handles loading a post-technology mapping fully flattened (i.e not * hierarchical) netlist in Berkely Logic Interchange Format (BLIF) file, and * builds a netlist data structure (AtomNetlist) from it. * * BLIF text parsing is handled by the blifpars...
d6688f1acf305a2494bff176c6a4bdcb4a669bf8
00b031400eecaa17f188e8280f58ff5ba19b6960
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-5435.cpp
C++
cpp
2,382
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 { bool ac...
5d86845784a5dc9111ebec43738d2f0d8670ae4a
e7bd1be7124b8565b2abed878bf6e57dc34490c4
hmofrad/CodingPractice
/skinnyleetcode/sumOfLeftLeaves1.cpp
C++
cpp
1,934
no_license
/* * https://leetcode.com/problems/sum-of-left-leaves/submissions/ * (c) Mohammad Hasanzadeh Mofrad, 2020 * (e) m.hasanzadeh.mofrad@gmail.com */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x),...
d23ec9acd4c796e19a201df3b5dfeb999bf4656d
1b196e812b7b200dedcfd359a9333529e41d8b90
BarryOConnor/CPP_ImageAnnotation
/Unit Tests/bubblesort.cpp
C++
cpp
2,273
no_license
#include "bubblesort.h" #include <QDateTime> #include <QDebug> void bubbleSort(QVector<QPair<QString, QString>>& varContents, bool varDirection, int varColumn){ /**************************************************** * perform a bubblesort on a given table ***************************************************/ //che...
976080e88097b49f1b8a6aa3a3a6a84e608368e5
1b510d2ff7b2b590b62a5a0f40d4bf7cd86c0553
djg/llvm-project-20170507
/lldb/source/Core/Module.cpp
C++
cpp
63,919
permissive
//===-- Module.cpp ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
5b0c59291e0450523023b5d28f3d3686145a94ed
d429710f0fb7355c0a083c9e8da9509cbc7178bc
robclark/chromium
/chrome/browser/extensions/api/app/app_api.cc
C++
cc
4,022
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/api/app/app_api.h" #include "base/values.h" #include "base/time.h" #include "chrome/browser/extensions/app_notifi...
94e8a5806bd3f26f3f0b75efd011455201ffa9c6
d5d2538a1ccdc5b85c0772187321e97741017e17
flutter/engine
/shell/platform/embedder/platform_view_embedder_unittests.cc
C++
cc
7,987
permissive
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/shell/platform/embedder/platform_view_embedder.h" #include "flutter/shell/common/thread_host.h" #include "flutter/testing/testing.h" #i...
6e0d9ca4117d60e6c80ce70b9d7b9de505ca7642
42afd340622b3188b151f3fbe76817403e433ebe
Hsekiu/Leetcode
/75.Sort-colors.cpp
C++
cpp
543
no_license
class Solution { public: void sortColors(vector<int>& nums) { map <int, int> map; //value key //Create hash map for (auto & element : nums) map[element]++; int pos = 0; int loc = 0; //Go through nums and replace each value with the occurences in the...
d091efc9bfe299fd365fe7d299e72e0f529a30de
f0e98d66249926d4bacbeda1c5b2bd02c54ceca4
debojyoti-majumder/Simpleator
/monitor/monitor.cpp
C++
cpp
15,178
permissive
/*++ Copyright (c) Alex Ionescu. All rights reserved. Header Name: monitor.cpp Abstract: This module handles the processing loop for Simple Emulator Pipe Messages Author: Alex Ionescu (@aionescu) 12-Dec-2018 - Initial version Environment: Kernel mode only. --*/ #include "mon.h" VOID Trace (...
127d5b2269fcc27bcde93e3bc5933583f13eb08c
24b7d8e2bc6e58fabe24eeb5f554982fa741dfdc
xczhang07/leetcode
/cpp/hard/jump_game_ii.cpp
C++
cpp
521
no_license
class Solution { public: int jump(vector<int>& nums) { int curr = 0; int last = 0; int n = nums.size(); int ret = 0; for(int i = 0; i < n-1; ++i) { curr = max(curr, i+nums[i]); if(last == i) { last = curr; ...
fc8c648f0b036878182e519988bf6cb9f6d30b3c
9998a6ae512f4cfa8b16a2cd762bc2083ccfb72c
apache/openoffice
/main/unoxml/source/events/mutationevent.cxx
C++
cxx
4,227
permissive
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
124b03221283b3302e1a50650afb5ec72da5beab
f699cc5c2e27752f619d2982de3456955d4687bf
mmv456/CS4800-Algorithms
/Programming Assignments/3_3.cpp
C++
cpp
2,476
no_license
#include <stdio.h> #include <vector> #include <algorithm> using namespace std; int V, E; vector<vector<int> > G; vector<vector<int> > GD; vector<vector<int> > res; vector<vector<int> > SCCconn; vector<int> sortOrder; bool *marked; int *reg; int groupNo; void dfs(int vertex) { if (marked[vertex]...
52f5fc8d325a9717ab94207732a3e94f327f3a71
d1762e31ec971dd499f77d6cd009e5ac8ace6773
TheBestTvarynka/DataStructure
/stack_resize.cpp
C++
cpp
2,052
no_license
#include <iostream> using namespace std; template <typename T> class Stack { T *ArrayStack; int Capasity; int Size; public: Stack(); void push(T ); bool pop(T &); bool top(T &); bool is_empty(); void print(); int size(); void resize(int ); ~Stack(); ...
27a0864644a4039e6f200ff42cc59f9629d119db
0d6b0189aa3a6f1693686dbb10ee69cb90ec751c
jball2020/Project2
/main.cpp
C++
cpp
1,305
no_license
/* * Author: Jordan Ball * Assignment: Project 2 * Class: CS3610 * Date: 2/25/2018 * * Description: MinHeap class that is templated to be used with any data type * */ /* Time Complexity of Building HuffmanTree: With MinHeap: -A minheap takes log n time to insert -if we have n characters, we have 2n-1 nodes in the...
7b4748ca438608a5b08b1b3da41ac1cbcaeeba0a
7a56b30e10891425a971e1232acf13441c569a4f
Seshpenguin/chromium
/device/vr/android/gvr/gvr_device.cc
C++
cc
13,218
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "device/vr/android/gvr/gvr_device.h" #include <math.h> #include <algorithm> #include <string> #include <utility> #include "base/android/android...
42ccb9f1c3b77cfbfb91180e2b263124add4035a
76c5b724def62427f958fdbb78df1a7cebe53ded
yyhhrr/mangospriv
/src/game/ScriptMgr.cpp
C++
cpp
55,007
no_license
/* * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * Copyright (C) 2009-2011 MaNGOSZero <https://github.com/mangos-zero> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either v...
1ead15b51ba0c67f327b43884b986dc332065cb8
41cfa7fedaddece135b61938358dccb423030925
chromium/chromium
/components/cast_streaming/browser/control/remoting/remoting_decoder_buffer_factory.cc
C++
cc
1,675
permissive
// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/cast_streaming/browser/control/remoting/remoting_decoder_buffer_factory.h" #include <algorithm> #include "base/logging.h" #include "media/base/decoder_bu...
ad066be524861012d2b2ca1a321152c5e27a5429
09ca5d6f16ccbf2aeaaaadc89b60ae3c622f69a0
uel-dataexchange/Opencascade_uel
/inc/StepElement_SurfaceElementPurpose.hxx
C++
hxx
3,298
no_license
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _StepElement_SurfaceElementPurpose_Hea...
7838e19f125c98257b057c7598d76338a14613d8
77ab4c1a796aabdfa2f53be739973f617e1fac21
muhammadadeelinfo/Distributed_Control_System_OPCUA_4Diac
/forteMudules/forteModulesLocalCompiled/EXAMPLE_TEST/CRANE_SELECTOR.cpp
C++
cpp
4,225
no_license
/************************************************************************* *** FORTE Library Element *** *** This file was generated using the 4DIAC FORTE Export Filter V1.0.x! *** *** Name: CRANE_SELECTOR *** Description: Service Interface Function Block Type *** Version: *** 1.0: 2019-04-04/adeel - null ...
4ef3de804556efa5f067ce1380acd22dfd480ac7
1a080449ad2fb1aee4e2e2841f6f8027815f9fab
musicakc/TechInterviewPractice
/tech-interview-handbook/algorithms/strings/palindromepair.cpp
C++
cpp
853
no_license
//Given a list of words, find the word pairs that when //concatenated form a palindrome. #include<iostream> #include <algorithm> #include <vector> #include<string> using namespace std; bool checkPal(string str) { int len = str.length(); for(int i=0; i <= len/2; i++) if(str[i] != str[len-i-1]) return false; ...
58745d47303600411a499aa6a891bf6cd3ca6be6
06c993863ef3e5b2632ebf485806c16e19194fd9
AprilAndFriends/aprilui
/src/images/BaseImage.cpp
C++
cpp
9,535
permissive
/// @file /// @version 5.1 /// /// @section LICENSE /// /// This program is free software; you can redistribute it and/or modify it under /// the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause #include "Dataset.h" #include "Images.h" namespace aprilui { hmap<hstr, PropertyDescription> BaseIm...
3617944c87e433e816dc1a82cc1bf6c0844e68a0
b19065245dd2f64c128c94e7a19aed75d39ef08c
ninaccl/algorithm_2
/环形单链表约瑟夫问题.cpp
C++
cpp
1,719
no_license
// 【题目】 // 据说著名犹太历史学家Josephus有过如下故事:在罗马人占领乔塔帕特后, // 39个犹太人和Josephus及他的朋友躲进一个洞里,39个犹太人决定宁愿死也不要被敌人抓到, // 于是决定了一个自杀方式,41个人排成一个圆圈,由第一个人开始报数,报数到3的人就自杀, // 再由下一个人重新报1,报数到3的人就自杀,这样依次下去,知道剩下最后一个人时, // 那个人可以自由选择自己的命运。这就是著名的约瑟夫问题。现在请用单向链表描述该结构并呈现整个自杀过程。 // 输入:一个环形单向链表的头节点head和报数的值m // 返回:最后生存下来的节点,且这个节点自己组成环形单向链表,其他节点都删掉。 // 进阶:...
9b5352e3dc62ce83f79ce57b19189c847fbcbba7
d76467f9a06537e1ef4011720dd1e3cdb82990a1
arangodb/arangodb
/3rdParty/boost/1.78.0/libs/fiber/examples/asio/yield.hpp
C++
hpp
1,522
permissive
// Copyright 2003-2013 Christopher M. Kohlhoff // Copyright Oliver Kowalke, Nat Goodspeed 2015. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FIBERS_ASIO_YIELD_HPP ...
36795cfe215af409191cb219e384fa070c7bd248
60eddf3a703e86b5477b673721de1057fd2485d6
nalinimsingh/ITK_4D
/Modules/ThirdParty/GDCM/src/gdcm/Source/MessageExchangeDefinition/gdcmModalityPerformedProcedureStepSetQuery.cxx
C++
cxx
2,273
permissive
/*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WA...
fa375badeb4c440e365b2deff874a586c25a6192
c77413a569c5cc9ca6071c183f9ccf009f7287a3
Servicerobotics-Ulm/SmartDG-Tutorials
/01_03_Check_Installed_Library/src/Main.cpp
C++
cpp
3,778
permissive
#include <SmartDG.h> #include "TESTENV.h" namespace SmartDG { namespace ComponentDevelopmentMode_TEST{ int Run(string mode, string displaymode){ cout << "Smart Dependency Graph "<< "DGTest" << endl; SmartDG::SmartDGGenerator DGG("DGTest", mode); DGG.Display(); DGG.Show(displaymode); return(Fl::run()); } } /* name...
0c477be696773d25d1434aba05278bfba409ed0d
3e77526da3d53ca1a851473311e7ca5a47ec107d
flash1117/Algorithm
/Dynamic Programming/Dynamic Programming/1932.cpp
C++
cpp
606
no_license
#include <iostream> #include <algorithm> using namespace std; int N; int dp[501][501]; int map[501][501]; int solve() { int maxNum = 0; for (int i = 1; i <= N; i++) { for (int j = 1; j <= i; j++) { if (j == 1) dp[i][j] = dp[i - 1][j] + map[i][j]; else if (j == i) dp[i][j] = dp[i-1][j-1] + map[i][j]; ...
da36abcb7b02a209a89fbfaf824d2e1f9a91097b
335c94951a2bd249e17ad9d9545fe5bf8d51910f
pantelic-dusan/MATF
/RS/Vezbe_4/generic_functions/point.hpp
C++
hpp
1,293
no_license
#ifndef POINT_HPP #define POINT_HPP #include <iostream> #include <string> class Point { public: Point(double x, double y) :x(x), y(y) { std::cout << "ctor: x=" << x << ", y=" << y << std::endl; } Point(const Point& p) :x(p.x), y(p.y) { std::...
1be7dfc53f9b66cce84f3ede9a0b5ca672a844ca
1621c93fbe6de9f6569ebb76212bab38f252ea38
zjh19861014/chromium
/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
C++
cc
120,517
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/login/wizard_controller.h" #include "base/bind.h" #include "base/command_line.h" #include "base/compiler_specific.h...
6081006f8abc3420ea29f1afebd8cff14ad1d371
c02b2d56b77173989f998d05d2536ec75cff72c4
jony27003/ProgramingWorkshopInCAndCpp
/Cpp_Ex1/IntegerFactorization.cpp
C++
cpp
584
no_license
#include <iostream> #include "GField.h" using std::cin; using std::cout; using std::endl; /** number of Arguments */ const int gNumberOfArguments = 2; /** * @brief the main method; */ int main() { GFNumber numbers[gNumberOfArguments]; for(GFNumber &number : numbers) { cin >> number; } ...
6fd1590f66f100d1d67460eb7f02b43937ef7c3b
00c8adb20dcb57eaba163ede622fab18c288841e
Kiritow/OJ-Problems-Source
/HDOJ/2122_autoAC.cpp
C++
cpp
1,524
no_license
#include<stdio.h> #include<string.h> #include<algorithm> #define max 10000+10 using namespace std; int set[1010]; int city,road; struct line { int start; int end; int money; }num[max]; bool cmp(line a,line b) { return a.money<b.money; } int find(int p) { int child=p; int t; ...
44c87155cd210a63d6b60971ab9731133de9f107
4a8b576e12b789abff175744f6220d2beb704666
Nicolas-Constanty/Dnai.SubModules.Libs.QtPlugins.Controls
/searchablemenu.cpp
C++
cpp
8,012
no_license
#include <QQmlApplicationEngine> #include <QMetaObject> #include <QQmlContext> #include "searchablemenu.h" #include "callbackincubator.h" #define FTS_FUZZY_MATCH_IMPLEMENTATION #include "fuzzymatch.h" namespace dnai { namespace controls { SearchableMenu::SearchableMenu(QQuickItem *parent) : QQuickItem(parent), m_men...