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
067dc5882aea66fe713ff425ec3e2f8af1d15b5f
9488eb47955d031e3c3f1bcb1846384321abbe23
aungan/DSA
/first.cpp
C++
cpp
305
no_license
#include<iostream> using namespace std; int firstocc(int arr[], int n , int i ,int key){ if(i == n) return -1; if (arr[i] == key) { return i; } return firstocc(arr, n, i+1 , key); } int main() { int arr[] = {4,3,4,6,7,2}; cout << firstocc(arr , 6 ,0 , 2); }
d86e1884372f9ec9a7e0ca730d79fb58bd6ba2c6
70f24b517ddc09a7f98fd81dd76238c99e9b296c
otcshare/chromium-src
/base/util/memory_pressure/system_memory_pressure_evaluator_mac_unittest.cc
C++
cc
4,629
permissive
// Copyright 2019 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 "base/util/memory_pressure/system_memory_pressure_evaluator_mac.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/mac/scop...
da53523f0bc4b30366c3dadf88d6e7fae2301c9a
70b4e8a30c62db90c0ce07c8560cb7afbe5b71fe
Geograph-us/BAS
/Engine/userresourcewidget.cpp
C++
cpp
11,202
permissive
#include "userresourcewidget.h" #include "ui_userresourcewidget.h" #include <QApplication> #include "classcomboboxfillpictures.h" #include "every_cpp.h" namespace BrowserAutomationStudioFramework { UserResourceWidget::UserResourceWidget(QWidget *parent) : QGroupBox(parent), ui(new Ui::UserResourceW...
cd6199c4d8c1b43a40841c87b35fca7b9c9af158
f7b82e8c428fbea14a52f8a94b3e9a5f624267e4
ngmq/CompetitiveProgramming
/COCI/06-07-Olympiad-POLICIJA.cpp
C++
cpp
6,784
no_license
//// ngmq //// AC on http://wcipeg.com/problem/coi06p2 //// Solution: LCA on DFS Tree #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <sstream> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <cstdlib> ...
e51b2d0ac205c0c238b86c9101c12370d71ec9b0
77e968eb761fc0e4808b5b0a48e40cfb173c7e7d
GuanyiLi-Craig/interview
/Array/q21.cpp
C++
cpp
1,906
no_license
/**************************************************************************************************** 21. Merge Two Sorted Lists ----------------------------------------------------------------------------------------------------- Merge two sorted linked lists and return i...
4b61a90fb90f707d8673fd86c79c72b111cab1d9
06fe30df6e22e03c2683a472199500f675943e86
martindubois/KmsBase
/KmsLib/NetworkAddress.cpp
C++
cpp
5,558
permissive
// Author / Auteur KMS - Martin Dubois, ing // Product / Produit KmsBase // File / Fichier KmsLib/NetworkAddress.cpp // Includes ///////////////////////////////////////////////////////////////////////////// #include <KmsBase.h> // ===== C ================================================================== #include...
50d2a57eee4fc6e9f3cd2638e2662bcbdb0e0ea6
60839dfa9a55bce54bc65158fa50ab3e19b0bf73
gianbelinche/TallerTP3
/server_Stadistics.cpp
C++
cpp
462
no_license
#include "server_Stadistics.h" #include <iostream> #define WIN_STADISTICS "Estadísticas:\n\tGanadores: " #define LOSE_STADISTICS "\n\tPerdedores: " void Stadistics::win(){ std::unique_lock<std::mutex> lk(m); wins++; } void Stadistics::lose(){ std::unique_lock<std::mutex> lk(m); loses++; } void Stadi...
10884344945a6ed1fe0a85ff8daaf25f398690c0
f2e5bc3d39c30e1fe8427eaf8f6b4579944c3a15
CadQuery/pywrap
/opencascade/IGESGeom_Boundary.hxx
C++
hxx
5,078
permissive
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen (Kiran) // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under /...
b1d5f584b9cfab93df1007825cafa30015756099
5b8b48c21af8905d637d19d33fb0475d71370d0a
HappyTiger1/Sparse-Grids
/sgpp-1.1.0/base/src/sgpp/base/operation/hash/OperationConvertPrewavelet.hpp
C++
hpp
1,601
no_license
// Copyright (C) 2008-today The SG++ project // This file is part of the SG++ project. For conditions of distribution and // use, please see the copyright notice provided with SG++ or at // sgpp.sparsegrids.org #ifndef OPERATIONCONVERTPREWAVELET_HPP #define OPERATIONCONVERTPREWAVELET_HPP #include <sgpp/base/operation...
e4a755db6f8b7d117c3c31c90537c24ae948061d
258663004fa49eeb02d719a892bce80890614cb5
canercandan/web-server
/api/src/Thread.cpp
C++
cpp
781
no_license
#include <iostream> #include "Thread.h" using namespace ziApi; Thread::Thread(IRunnable* obj) : _obj(obj) {} void Thread::start() { #ifdef WIN32 if (!(this->_thread = ::CreateThread(NULL, 0, Thread::_threadProc, this->_obj, 0, NULL))) std::cerr << "CreateThread() failed" << std::endl; #...
bb67cd9b4c2ec3f3564669f40c0b8facf8ce76fe
dfb4f392faa8e55e715c92b94d5153f3b6dbee21
ICB-DCM/lookahead-study
/tumor2d/src/SparseMatrix.cpp
C++
cpp
125,482
permissive
#include "SparseMatrix.h" #include "Mathematix.h" #include <stdlib.h> #include <stdio.h> #include <math.h> //#include <omp.h> #include "Substrate.h" #include "Agent.h" #define DX 13. #define ROW_EXTENSION_SIZE 10 #define NO_NEGATIVES //#define INIT_OXY 0.07 //#define INIT_GLU 0.8 // symmetric properties => CG // ...
894414a6521adca3766bd9650826d761bb40af0f
ceb68a21e1f08df32748ccd5e5cb7b134260daed
Lirone29/SDiZO_Projekt1
/Visual Studio 2017/Projects/SDiZO_P1/SDiZO_P1/RBTreeT.cpp
C++
cpp
7,885
no_license
#include "stdafx.h" #include "RBTreeT.h" #include "stdafx.h" #include "RBTreeT.h" #include <iomanip> #include <cmath> #include <queue> #include <iostream> #include <fstream> #include <windows.h> #include <cstdlib> #include <math.h> #include <string> #include <vector> using namespace std; RBTreeT::RBTreeT() { S.col...
ab7c848ae9f88e98a1e8296911367d9d8956f5b0
5e8e323e891c2a8d25baf6af4d84b6fae8db205c
ankitwasankar/study-material-3
/01_NARESH C&C++/Kiran sir/Student Data/CPP/Friend/FRDCWC.CPP
C++
cpp
478
no_license
#include<iostream.h> #include<conio.h> class abc { friend class def; int x; public: void getdata(); }; class def { public: void display(class abc temp); }; inline void abc::getdata() { cout<<"Enter x value"; cin>>x; } inline void def::display(class abc temp) {...
61f59ea8910177603c0ede05c22d3888b456c6f6
76275069d3f3afdc6db620d7049f4917553186d2
bhhbazinga/leetcode
/动态规划/198. 打家劫舍/rob.cc
C++
cc
916
no_license
#include <algorithm> #include <vector> class Solution { public: int rob(std::vector<int>& nums) { // 容易想到的解法 // int n = nums.size(); // if (n == 0) { // return 0; // } else if (n == 1) { // return nums[0]; // } else if (n == 2) { // return std::max(nums[0], nums[1...
fcccc66cc44bee6ff46bcdbb16e2ce7c4dcfef3f
1b0ba7589192f5afa32b8aa206b179e953ea13e5
Smarking/skia
/src/sksl/SkSLVMGenerator.cpp
C++
cpp
69,917
permissive
/* * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/private/SkTArray.h" #include "include/private/SkTPin.h" #include "src/sksl/SkSLCodeGenerator.h" #include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLOper...
7357dbccc4785c0f12de56533f9063181839badd
0cbaf0bb5b60c935cdb70c39d289666223911eba
gem-sw/cmssw
/Fireworks/Calo/src/FWFromTEveCaloDataSelector.cc
C++
cc
3,404
no_license
// -*- C++ -*- // // Package: Calo // Class : FWFromTEveCaloDataSelector // // Implementation: // [Notes on implementation] // // Original Author: Chris Jones // Created: Fri Oct 23 14:44:33 CDT 2009 // $Id: FWFromTEveCaloDataSelector.cc,v 1.13 2012/09/20 20:09:10 eulisse Exp $ // // system inc...
e48d9f4edbf70ed10ae392bf1ade8ee284fb3ec0
09137ffb89d9ab92cece279d1f827d94e73dbca8
CaseySingleton/42-cpp-piscine
/rush00/includes/Logic.hpp
C++
hpp
2,251
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Logic.hpp :+: :+: :+: ...
98c446f342f23bb81e4dd075fb6e7bc5cb414642
0838248df7449bf7894425bcdc3077f4a9eb89c5
Tkd-Alex/Cpp-Exercise-2012
/Assegno/Assegno Ita/Assegno.cpp
C++
cpp
4,834
no_license
#include <iostream> using namespace std; int main(){ float n; int n1,n2,n3,n4,n5,n6,n7; cout<<"Inserisci un numero di 5 cifre\n"; cin>>n; n*=100; int nn; nn=n; n1=nn/1000000; nn=nn%1000000; n2=nn/100000; nn=nn%100000; n3=nn/10000; nn=nn%10000; n4=n...
4cbdffb0cc3159220d3a026ee97029c56de2e5b5
560ee553e621c15ac781916e55d2aa0c53465827
micro-os-plus/micro-os-plus-ii
/packages/hal/architecture/arm/cortexm/qemu/infrastructure/src/TestSuiteImplementation.cpp
C++
cpp
5,881
no_license
// // This file is part of the µOS++ SE distribution. // Copyright (c) 2013 Liviu Ionescu. // /// \file /// \brief POSIX definitions of the test suite implementation class. #include "portable/core/include/ConfigDefines.h" #if defined(OS_INCLUDE_HAL_ARCHITECTURE_ARM_CORTEXM_QEMU_INFRASTRUCTURE_TESTSUITEIMPLEMENTATION...
f4621ff56543582b5507a23aa0baecaa356db4c8
6354fc79680f82d52fc794342532ef2edac07cfb
Joreeser/Microphone_Nexys4ddr
/Code/mic_core.cpp
C++
cpp
375
no_license
/*****************************************************************//** * @file mic_core.cpp * * @brief implementation of MicCore class ********************************************************************/ #include "mic_core.h" MicCore::MicCore(uint32_t core_base_addr) { base_addr = core_base_addr; } MicCore::...
4751aab2c138ca2621a5125c27a0623f9acc5592
89143e45e0315632829d08b2795f460d13c20f3d
marcos-perso/DIY
/ArduinoLibs/MyThermistor/MyThermistor.cpp
C++
cpp
2,126
no_license
/* MyThermistor.h - My own library to control a thermistor (KY-013) NTC Resistance to Kelvin conversion: 1/K = 1/K0 + 1/B * ln(R/R0) where: K0: Nominal temperature R0: Nominal Resistence KY-013 connections S pin --> To Arduino M pin --> VCC - pin --> GND ...
5ea3b28564d2b70a52b4e0b1fdea4c5dd8c3f42e
5ce1f0ba86b7ffca02980a5291f0ccc357ee2980
vonZuben/opengljff
/main.cpp
C++
cpp
5,013
no_license
#include<cstdlib> #include<utility> #include"glShader.h" #include"glWindow.h" #include"shaderSources.h" #include"matricies.h" #include"mat4.h" #include<iostream> //#include<string.h> #define PI 3.14159 #define GLM_FORCE_RADIANS #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> using namespace particleSi...
ab06a2af0a6fb78d8236e5c28ac4eec9bff62fb2
9f645b1c02edac204354d4189cf27ea890ba4b2e
reelrbtx/SMACC2
/smacc2_client_library/nav2z_client/nav2z_client/include/nav2z_client/client_behaviors/cb_navigate_next_waypoint.hpp
C++
hpp
1,348
permissive
// Copyright 2021 RobosoftAI 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 or agreed to...
dd56c3476bd6f1db0844b79570998938a0144da0
cdb58ae03a8a648b7374f6844aa2c61780ec9141
yuyilei/Daily-Notes
/C++/Dijkstra.cpp
C++
cpp
3,724
no_license
#include<iostream> #include<cstring> #include<cstdio> using namespace std ; // 用Dijkstra算法获取最短路径   // 用临界矩阵储存图 // 用于记录到每个点的最短路径 /* 测试数据: 6 8 0 4 30 0 5 100 1 2 5 2 3 50 3 5 10 4 5 60 4 3 20 0 2 10 0 */ struct Dis { stri...
fc24c990b8d1866c6d3c57fe7a55192372c85a06
ceeb2b5855b1b9917c9acc13c0f1c424d9d7a102
jod98/C-plusplus
/Object Oriented Programming - Programs/Lab 3/Exercise_3_4.cpp
C++
cpp
2,656
no_license
/* Author: Jordan O Donnell Student Number: 16371101 Date: 13/02/2018 Lab: 3 Exercise: 3.4 File: Exercise_3.4_cpp. Description: Write a function that receives as input two arrays of doubles of arbitrary length. The function should returns an array of doubles that is made up of a concatenation of the two input ...
91d89ae655033838226e2f2838247b1c3b3ad408
9c70f1c8f02c253e19974f79f95a4c032102d151
cxhaizxm/simdissdk
/SDK/simUtil/LineGraphic.cpp
C++
cpp
9,350
permissive
/* -*- mode: c++ -*- */ /**************************************************************************** ***** ***** ***** Classification: UNCLASSIFIED ***** ***** Classified By: ...
06823ab6dc0f011bece9e19691aa3111b82d00b6
f4ac2705baba0e534ae87cc06c66b4e97111b3ed
nekonomicon/WizardWars
/dlls/tf_globalinfo.cpp
C++
cpp
27,758
no_license
#include "extdll.h" #include "util.h" #include "cbase.h" #include "effects.h" #include "saverestore.h" #include "weapons.h" #include "nodes.h" #include "doors.h" #include "game.h" #include "gamerules.h" #include "items.h" #include "player.h" #include "tf_globals.h" #include "tf_globalinfo.h" #include "t...
1a912849e48cdb9578a3032932b3ba69ab60051b
66a50afcc2c9f5c34373779b7f3be1f2cfe9047f
Bachzart/PTA_Practice
/201909_MOOC_DS_ZhouQiang/P9_c++.cpp
C++
cpp
2,095
no_license
#include <iostream> #include <stack> using namespace std; template<class Elem> struct BinNode { Elem data; BinNode<Elem> *left; BinNode<Elem> *right; BinNode(Elem x) { data = x; left = right = NULL; } }; template<class Elem> class BinTree { protected: BinNode<Elem> *root; BinNode<Elem> *rfindx(Elem x, Bin...
ac9faff946a460cc9213daa9bb35283d6ffc78a2
b08fecb15d5dc41b3f8bcf9bc02e83e9fac8cf7f
junkiyoshi/Insta20210303
/ofApp.cpp
C++
cpp
4,383
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup() { ofSetFrameRate(60); ofSetWindowTitle("openFrameworks"); ofBackground(239); ofSetLineWidth(3); ofEnableDepthTest(); this->frame.setMode(ofPrimitiveMode::OF_PRIMITIVE_LINES); } //-----------...
e3988b1c344fa701e06fb0a27adb3e82934e209e
dbc22cb16ffbb2fce1c210ebd808f935090a77cf
sadrulhc/chromium
/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
C++
cc
25,332
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 "extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.h" #include <stddef.h> #include <memory> #include <utility> ...
e7891765f7099ebd00b607c68dbe9034ae7bf7cb
c432b323ad53427cbb8ae61809bcdf3ef1f4820c
Q10Viking/ACM_ICPC
/Online_judge/HDU/hdoj_1789.cpp
C++
cpp
1,158
no_license
#include<iostream> #include<iomanip> #include<cstdio> #include<cstring> #include<algorithm> #include<cstdlib> #include<cmath> #include<map> #include<stack> #include<set> #include<queue> #include<string> #include<vector> #define eps 1e-10 #define LL long long #define LD long double #defin...
9ec79f6eb0c0f7455ffef4bed5480feba1324df5
faf544911a09d51b5af8c4cb237f92a74c071838
lachvoj/pugcpp
/src/lib/parser/node/ExpressionNode.cpp
C++
cpp
1,684
permissive
#include "./ExpressionNode.hpp" #include "../../expression/IExpressionHandler.hpp" #include "../../template/PugTemplate.hpp" #include "../../util/StringUtils.hpp" namespace pugcpp { namespace parser { namespace node { ExpressionNode::ExpressionNode() : Node(e_ExpressionNode) { } void ExpressionNode::setEscape(bool ...
27153e655d76ea92a06f1fd4312eaac2b0a0f89b
2be753545c4e878f128b39be4a00aa25b8deb90e
OpenHero/gblastn
/c++/src/corelib/ncbi_stack_solaris.cpp
C++
cpp
2,798
permissive
/* $Id: ncbi_stack_solaris.cpp 104013 2007-05-15 19:27:33Z grichenk $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Gov...
2e39558317066a67183ad6b9b3abc36f25137282
7125dab73bf981ce23f52b2a8157ff219e97dbc2
alexandraback/datacollection
/solutions_5634697451274240_1/C++/donogo/b.cpp
C++
cpp
687
no_license
#include <string> #include <vector> #include <iostream> #include <set> #include <map> #include <cstdio> using namespace std; int count(string s) { vector <int> t; int i, n; int chg; int num; n = s.length(); for (i = 0; i < n; i++) { chg = ((i == 0) || (s[i-1] != s[i])); if (chg) { t.push_...
09d9162985a34366e1a2bc7e287b00ba8e79f090
81046744cb8894d2da9cea359c4f40795575968b
wildparky/appleseed
/src/appleseed/renderer/modeling/bssrdf/bssrdf.cpp
C++
cpp
4,839
permissive
// // This source file is part of appleseed. // Visit http://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2015-2017 Francois Beaune, The appleseedhq Organization // // Permission is hereby granted, free of charge, to any person ob...
26d568823bb98885d5b02574c24bec3d3967bfd4
528bfc631c8bc7964ed1e255f8a818b6588386af
ParkHanbum/dex2ir
/art/runtime/image.cc
C++
cc
2,902
no_license
/* * Copyright (C) 2011 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...
db53b7ba351da07978fe2e48663074fb3bab2089
33e64d95dc16c1c962d39b307a51f60b90dd40c9
eataix/algorithms
/leetcode/302.smallest-rectangle-enclosing-black-pixels.cpp
C++
cpp
2,071
no_license
#include <vector> using namespace std; /* * [302] Smallest Rectangle Enclosing Black Pixels * * https://leetcode.com/problems/smallest-rectangle-enclosing-black-pixels/description/ * * algorithms * Hard (47.18%) * Total Accepted: 18.6K * Total Submissions: 39.5K * Testcase Example: * '[["0","0","1","0"],["...
24c1e8cfab020846290cc511d2db02ad0b5261cb
671f53e90ab412c31c79732d6f0fda4352eeaf85
jun1ro1/TinyTimerBin
/J1ClockKit.cpp
C++
cpp
6,160
no_license
// // J1ClockKit.cpp // // // Created by OKU Junichirou on 2015/10/18. // // #include <Arduino.h> #include "J1ClockKit.h" static unsigned char _days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; bool J1ClockKit::Crown::isLeap( int year ) { year = year + 2000; return ( year % 400 == 0 ) || ...
7393aa019a4229b6c3fec55225d2f038a857d154
d0d8ed602949fdd90d6739e6c80471e63974c902
RB-Develop/Fancy
/source/Engine/PacketHandler.cpp
C++
cpp
478
no_license
#include <Engine/PacketHandler.h> using namespace sf; using namespace std; using namespace fancy; using namespace fancy::network; PacketHandler::PacketHandler(string hostAdress) { _hostAddress = hostAdress; // bind the socket to a port if (_socket.bind(54001) != Socket::Done) { printf("Error binding the spe...
22fa4063fee29a41aac7e2b6143bdb63dec1912a
66ce7271c4e477b19961125a3e1e6f0e19168049
jimgao1/competitive-programming
/USACO/dualpal.cpp
C++
cpp
1,101
no_license
/* ID: jim_yub1 LANG: C++11 TASK: dualpal */ #include <iostream> #include <string> #include <cmath> #include <algorithm> using namespace std; #define USACO #define FILEIN "dualpal.in" #define FILEOUT "dualpal.out" char toLetter(int n){ if (n < 10) return (char)(n + '0'); return (char)(n - 10 + 'A'); } string ...
138d6733acf55ee466f977f968b09eaa7a87fd51
803c9cdc8e5743df308cc22edee8f6725f6b198a
devinupreti/Leetcode
/Remove Nth Node From End of List.cc
C++
cc
912
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { ListNode * pointer; pointer = head; int node_count = 0; ...
503578c283c7e64e0e5a93b899936e40c23af229
f49ccabc788937f3486171505ec25e6de6bef69e
Mingrui-Zou/DungeonCrawler
/dragon.cc
C++
cc
1,259
no_license
#include <cstdlib> #include <iostream> #include <sstream> #include <string> #include "map.h" #include "cell.h" #include "treasure.h" #include "character.h" #include "dragon.h" using namespace std; Dragon::Dragon(int row, int col, Map *mp, Player *pc, Treasure *hoard): NPC(row, col, mp, 'D', "Dragon", 150, 150, 20,...
0026d588feb54f05785701eca3d9ee8d2d3bd4b5
cebbbe5211d2b23297d005ff2ebeab54be765f09
GISjingjie/DataStruct
/DataStruct/181003shell.cpp
C++
cpp
470
no_license
#include <Stdio.h> #define MAXSIZE 100 void shell(int data[],int len) { int tmp,i,d,p; for(d=5;d>0;d/=2) { for(p=d;p<len;p+=d) { tmp=data[p]; for(i=p;i>0&&data[i-d]>tmp;i-=d) { data[i]=data[i-d]; } data[i]=tmp; } } } void print(int data[],int len) { for(int i=0;i<len;i++) { printf("%d\...
021d8e11dcf046480cb79e2ad9103c58a906b867
09891383e29fb00cd3a4eeaa209e73c66dec1039
anushhka/data-structures
/1.Linked Lists/2.Circular Linked List/2.Insert New Node At The Begining.cpp
C++
cpp
1,460
no_license
#include <iostream> #include <cstdlib> using namespace std; class Node{ public: int data; Node *next; } *head=NULL,*lastNode=NULL; Node *insertNewNodeAtTheBeg(int n){ Node *newNode = (Node *)malloc(sizeof(Node)); newNode->data = n; newNode->next = head; lastNode->next = newNode; return new...
afd71dc5752a3f68f586136267ccf58a95599747
43637e60ff3b66d5f8d6917501f0d9c21eb17554
svn2github/angelscript
/tags/2.18.2/sdk/tests/test_feature/source/test_destructor.cpp
C++
cpp
4,435
no_license
#include "utils.h" using namespace std; namespace TestDestructor { const char *script1 = "class T \n" "{ \n" " ~T() {Print(\"destruct\");} \n" "} \n" "T glob; \n" "void Test() \n" "{ ...
5fe04436e68873c9ba1f6875d2cf14f78ee670e6
7630871bd558389f3b21c28f814f493287727792
moritzpeter/TweedeFrameworkRedux
/Source/Examples/HelloWorld/Main.cpp
C++
cpp
953
permissive
#include "TeApplication.h" #include "RenderAPI/TeVideoMode.h" #if TE_PLATFORM == TE_PLATFORM_WIN32 #include <windows.h> int CALLBACK WinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow ) #else int main() #endif { te::START_UP_DESC desc; ...
10d93c4c69c2a21fa256d09dfb1cd8af5d0db48f
d2f5a9abb8f0d2698de8510f11206b6cbb317fbd
imsashwat/Competitive-coding-handbook
/push zeroes to end.cpp
C++
cpp
441
no_license
#include<iostream> using namespace std; int main() { int arr[100]; int i; int size; cin>>size; for(i=0;i<size;i++) { cin>>arr[i]; } int count = 0; for(i=0;i<size;i++) { if(arr[i]!= 0) { arr[count]=arr[i]; count++ ; } } while (count<...
f5fb7e1dd6f4509b47a2c8c9c877c8c2023cad02
439a9c56391410f83c06eda0b1a372bb00136fb3
denerslemos/CHESS
/codes/vhlle/src/hdo.cpp
C++
cpp
41,055
no_license
/****************************************************************************** * * * vHLLE : a 3D viscous hydrodynamic code * * version 1.1, October 2014 * *...
632fe459beede2d127cb5d86ddd075e10ece874a
da72def07c1da12b5232071da3799906e8983572
MetaRabbit/LuxCore
/src/slg/textures/mapping/mapping.cpp
C++
cpp
4,467
permissive
/*************************************************************************** * Copyright 1998-2018 by authors (see AUTHORS.txt) * * * * This file is part of LuxCoreRender. * * ...
54cebb4d6f0feadce8aaf88fadf3d769ff14a86d
fd2e4d358b83d8e761debcddb96e94521b3f17f9
baskard/arangodb
/3rdParty/iresearch/tests/utils/async_utils_tests.cpp
C++
cpp
25,064
permissive
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2016 by EMC Corporation, 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. /// You may obtain a...
e2b592804e3e2a510a5cf11b6fdeec5dd5e2cbed
dcbf1d874022c7fd134d95c52bfb1ba19cc98510
windcry1/My-ACM-ICPC
/CodeForces/1337 B.cpp
C++
cpp
2,014
permissive
/************************************************************************* >>> Author: WindCry1 >>> Mail: lanceyu120@gmail.com >>> Website: https://windcry1.com >>> Date: 12/30/2019 11:03:37 PM *************************************************************************/ //#pragma GCC optimize(2) //#pragma GCC diagnostic ...
1a8dcc36bad9b1f2b5474c65b3872ab5fc3741d6
b7c51855aaa1312b1788cb610e24c9a41d5709d2
0ashu0/CProgramming
/IMPORTANT PROGRAM/CWP26.CPP
C++
cpp
620
no_license
#include<iostream.h> #include<conio.h> void main() { float p,r,amount; int n,age; char gender,member; clrscr(); cout<<"Enter principal amount, age, member, period and gender="; cin>>p>>age>>member>>n>>gender; if(gender=='m'||gender=='M') if(age<60) if(member=='n'||member=='N') r=9.25; else r=9.5...
7adabaacad3ed2e5cd9312c05aca6fe4ee0d427c
ec7ea27387fdfd3b1baa895b405e52a9d5d8ed01
ZigRazor/neoml
/NeoML/Python/src/PyWrapper.cpp
C++
cpp
5,190
permissive
/* Copyright © 2017-2021 ABBYY Production LLC 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 to in ...
543b4930719026843c45d4628faedeea22b6a620
72ced0386786160fb8f58c77b620c2f8d2f59161
robertsj/libdetran
/src/solvers/eigen/Eigensolver.cc
C++
cc
2,067
permissive
//----------------------------------*-C++-*-----------------------------------// /** * @file Eigensolver.cc * @brief Eigensolver member definitions * @note Copyright(C) 2012-2013 Jeremy Roberts */ //----------------------------------------------------------------------------// #include "Eigensolver.hh" names...
1560e0990bc39c19ac4bb100fb979743d9998db4
ed4e8e7c8d45aa4904573e3f6a55afae878d34d1
htcondor/htcondor
/src/condor_utils/condor_sockaddr.cpp
C++
cpp
18,623
permissive
#include "condor_common.h" #include "condor_sockaddr.h" #include "condor_netaddr.h" #include "ipv6_hostname.h" #include "condor_debug.h" #include "stl_string_utils.h" // // We could use the parse table defaults look-up code instead, if // we ever add enough protocols for the linear search time to matter. // // CP_PRI...
24e4f38792b44287f2b63d6d65ab3c2cabdb2888
ed0fe70e9b1fa5db4df576b15e97c86b96d2ad6a
seronet-project/SeRoNet-examples
/SeRoNet-Tooling-ROS-Mixed-Port/DomainRosModelsRepositories/ROSCommon_msgs/smartsoft/src-gen/ROSCommon_msgs/Sensor_msgs_TemperatureCore.cc
C++
cc
6,377
no_license
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
701827b1c2171fdba601ee9f560fa3808bef166e
c6887b48a6ea457a04279817eed06e8041db31cd
malaifa/source
/src/protocols/scoring/methods/pcsTs2/GridSearchIterator.fwd.hh
C++
hh
1,338
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
33c5511ead99f36951ed9717803cd51549d7df08
1820db87adb22bda0d88a85f365bd1b640d2fa91
crmaykish/project-rogue
/src/game/actions/cm_useaction.cpp
C++
cpp
1,432
permissive
#include "cm_useaction.h" #include "cm_equipaction.h" #include "cm_actor.h" namespace cm { UseAction::UseAction(int itemSlot, GameWorld &world) : ItemSlot(itemSlot), World(world) {} ActionResult UseAction::Execute(Actor &executor) { auto item = executor.InventoryComp->ItemAt(ItemSlot - 1);...
0a14d2afe896f75487ab668cc0102523f42db18e
cb351ca8d6ae5462df1e37bab995feb4384ba662
CodingTrader/muparser
/src/muParserInt.cpp
C++
cpp
9,913
permissive
/* _____ __ _____________ _______ ______ ___________ / \| | \____ \__ \\_ __ \/ ___// __ \_ __ \ | Y Y \ | / |_> > __ \| | \/\___ \\ ___/| | \/ |__|_| /____/| __(____ /__| /____ >\___ >__| \/ |__| \/ \/ \/ Copyright (C) 2004 - 2020 Ingo Berg Red...
580479b892a734ce6bc95ef02a1c23c118d953c7
dfbc02cf82234b58985c3751c4fb62dae51ef0e3
diyaselis/SusyAnaTools
/Tools/NTupleReader.cc
C++
cc
21,428
no_license
#include "NTupleReader.h" #include "TFile.h" #include "TObjArray.h" NTupleReaderIterator::NTupleReaderIterator(NTupleReader& tr, int begin) : tr_(tr), current_(begin) { //read first event if(!tr_.goToEvent(current_)) { current_ = -1; } } NTupleReaderIterator& NTupleReaderIterator::operator++(...
3f0531466df91462a6da160f9f1dc512e8113445
f9d906f17a05d6b8c2ada11a7629c3a412d63df5
prasadthx/OpenGL_C-_SnakeGame
/main.cpp
C++
cpp
2,039
no_license
#include <iostream> #include <GL/gl.h> #include <GL/glut.h> #include "game.h" #define COLUMNS 40 #define ROWS 40 #define FPS 5 using namespace std; extern short snakeDirection; bool gameOver = false; int score = 0; void displayCallback(); void reshapeCallback(int width, int height); void timerCallback(int); vo...
e856eebdaa51ebb48816abf14478ccc7ec54a9b9
193a28a473bc9caa80dc621bede3d1ef857d03c3
chaishi/problems
/leetcode/src/removeNthFromEnd.cpp
C++
cpp
2,054
no_license
/* * given a SLL, remove the Nth node from the end of list and return its head. * * test data: * 1->2->3->4->5, n=2, after the removal, the SLL becomes 1->2->3->5 * 1, 1, * 1->2, 2 * 1->2, 1 * */ #include "../include/preliminary.h" ListNode* removeNth2End(ListNode *head, int n){ if(!head) return NULL; ...
898b0aa26d00467e71b622a875ca9b80742eb3bf
b449388ea80548201f1a8bc0c6f5480d2e4190c8
fengxiaoyun98/MyTest
/SolarCellTester/ChartView/ChartScrollBar.cpp
C++
cpp
5,819
no_license
/* * * ChartScrollBar.h * * Written by CÚdric Moonen (cedric_moonen@hotmail.com) * * * * This code may be used for any non-commercial and commercial purposes in a compiled form. * The code may be redistributed as long as it remains unmodified and providing that the * author name and this disclaimer remain in...
079a17dd233ab45e6fe362cc2071ab3c35973bf2
351686889973a1a18c1739447842da36c06bca43
animating-dino/opentoonz
/toonz/sources/toonz/sceneviewer.cpp
C++
cpp
84,803
permissive
#ifdef LINUX #define GL_GLEXT_PROTOTYPES #endif // Toonz includes #include "tapp.h" #include "viewerpane.h" #include "onionskinmaskgui.h" #include "viewerdraw.h" #include "menubarcommandids.h" #include "ruler.h" #include "locatorpopup.h" // TnzTools includes #include "tools/cursors.h" #include "tools/cursormanager.h...
75e6b7351b2b89e0057c37cb1c82c2a4fa569d7d
84858c92c69a18844e5f2322382ce85b52ee073a
frank2679/rocBLAS
/library/src/blas2/rocblas_hpmv.hpp
C++
hpp
12,041
permissive
/* ************************************************************************ * Copyright 2019-2021 Advanced Micro Devices, Inc. * ************************************************************************ */ #pragma once #include "../blas1/rocblas_copy.hpp" #include "check_numerics_vector.hpp" /** * A combined ker...
c6879a9eafabcbdb8e1ea50d1865541153bc3abb
083b90e6469bc6726a507c8a72821d8ca9fd1dc0
lightyears1998/resizablelib
/ResizableLib/ResizableSheetEx.cpp
C++
cpp
16,717
permissive
// ResizableSheetEx.cpp : implementation file // ///////////////////////////////////////////////////////////////////////////// // // This file is part of ResizableLib // https://github.com/ppescher/resizablelib // // Copyright (C) 2000-2015 by Paolo Messina // mailto:ppescher@hotmail.com // // The contents of this file...
75a3da52e9ca48f89349fd161519612fc01ca59d
fc9faa66aaafbfb685ebf5a3cc9e3980e18ba14b
yichangliao/DrawSquares
/Eraser.hpp
C++
hpp
709
no_license
/******************************************************************************* ** Author: Yi Chang Liao ** Date: 12/08/2019 ** Description: Eraser.hpp is the Eraser object header file ** It contains: ** (1). member initialized constructor ** (2). virtual function for object to i...
a6fe34d9276893693f28f658e7acba1d76cdd67b
98012ed297b7b7b5214f18a4b5db007101050a76
tpurtell/android-cpp-sdk
/android-cpp-sdk/platforms/android-8/android/graphics/PointF.hpp
C++
hpp
6,247
permissive
/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: android.graphics.PointF ================================================================================*/ #ifndef J2CPP_INCLUDE_IMPLEMEN...
da4294aa17b7d41e15d24dffcba243971c5a113f
d5583601ef8f582b6ebc1cb5065b5521c2f9d960
sky94520/old-code
/SDL_EngineProject/以前的代码/PvZ1.0/Classses/main.cpp
C++
cpp
1,255
no_license
#include<vld.h> #include "SDL_Engine/SDL_Engine.h" #include "GameScene.h" #define SDL_ENGINE_DEBUG using namespace std; using namespace SDL; int main(int argv,char**argc) { //窗口创建成功 if(TheDirector::getInstance()->init("Fishing",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,800,480,SDL_WINDOW_SHOWN)) { //添加资源路径 在...
d574fb4d0833b68cbc967bc4eb1c476fed0430a3
b3283d5c0de0bc411692dc4c9eec63089c431e5f
unreal-engine-projects/Simple-Tanks-game
/Battle_tank/Source/Battle_tank/Projectile.cpp
C++
cpp
813
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Projectile.h" // Sets default values AProjectile::AProjectile() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; movemen...
c83565bdc86c2b6ae663b02536174cd1550ab72d
1871fcfe4257e2e2a0dcee27ce66025510c44615
ozakiryota/clustering_pcl
/src/euclidean_clustering_flexible_tolerance.cpp
C++
cpp
6,534
no_license
#include <ros/ros.h> #include <sensor_msgs/PointCloud2.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/kdtree/kdtree_flann.h> /* #include <pcl/segmentation/extract_clusters.h> */ #include <pcl/filters/extract_indices.h> #include <pcl/visualization/...
1fa411acbfb01618433534337937146fd5c761db
29d601dd91582c4a93240e54bf08af4195deaee0
stedsome/cel-cpp
/eval/eval/evaluator_core.cc
C++
cc
5,438
permissive
#include "eval/eval/evaluator_core.h" #include "absl/status/status.h" #include "absl/types/optional.h" #include "eval/public/cel_value.h" #include "base/status_macros.h" #include "base/statusor.h" namespace google { namespace api { namespace expr { namespace runtime { namespace { absl::Status CheckIterAccess(CelExpr...
e3354870c953192e780dd6758c0fb2520aa5e433
042462cfc163d2e14a5414b7970fd219e7c65fd0
Tadinu/gpd2
/src/gpd/candidate/hand_set.cpp
C++
cpp
10,444
permissive
#include <gpd/candidate/hand_set.h> #include <random> namespace gpd { namespace candidate { const Eigen::Vector3d HandSet::AXES[3] = {Eigen::Vector3d::UnitX(), Eigen::Vector3d::UnitY(), Eigen::Vector3d::UnitZ()}; const bool HandSet:...
69b693b39c261c18c1585fc7237c2c39838c0614
c6e4fb9a41ac8977f8c00fd6715e498ac8ee5b63
apple-open-source/macos
/WebKit/Source/WebKit/WebProcess/WebCoreSupport/WebPermissionController.cpp
C++
cpp
4,219
no_license
/* * Copyright (C) 2021 Apple Inc. 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 of source code must retain the above copyright * notice, this list of conditions a...
f4e96278c54eeddd2b4c57b14bd405b59d623cb0
ed2916e5605348975e8777374e2f871b5ded44da
luucasv/Competitive-Programming
/contests/codeforces/827/a.cpp
C++
cpp
941
no_license
#include <bits/stdc++.h> #define fr(a, b, c) for(int a = b, __ = c; a < __; a++) #define dbg(x) cerr << ">>>> " << x << endl; #define _ << " , " << using namespace std; const int ma = int(1e7); typedef pair<int, int> ii; string t[1111111]; int main(){ ios::sync_with_stdio(0); int n; cin >> n; std::vector<ii> v; ...
4e0e19e24dc89d9a3ae7348bd2b6c91448a412af
908b70ef5734860eb8e04ce072b789b809e8c6c0
GreatAS/puyoai
/src/capture/ac_analyzer_test.cc
C++
cc
20,357
permissive
#include "capture/ac_analyzer.h" #include <algorithm> #include <iostream> #include <gflags/gflags.h> #include <gtest/gtest.h> #include <SDL_image.h> #include "capture/color.h" #include "core/next_puyo.h" #include "core/real_color.h" #include "gui/unique_sdl_surface.h" using namespace std; DECLARE_string(testdata_d...
2f00d3b555ff1264020701f075bfe45d26a735f1
304ae3582fbeec6e6aebe3d83802b5ad65a5b1c8
dgulhan/cmssw
/SimG4Core/Application/src/StackingAction.cc
C++
cc
20,751
no_license
#include "SimG4Core/Application/interface/StackingAction.h" #include "SimG4Core/Notification/interface/CurrentG4Track.h" #include "SimG4Core/Notification/interface/NewTrackAction.h" #include "SimG4Core/Notification/interface/TrackInformation.h" #include "SimG4Core/Notification/interface/TrackInformationExtractor.h" #i...
f021ebc84b6ac9b28ad06717f2ae4352b47e9178
fff5ae2f98e20eca9a0d67df3eec22374723d9a3
ronaldo8210/cyclone
/sample/main.cpp
C++
cpp
571
no_license
/*********************************************************************** # > File Name : server/server.cpp # > Author : ronaldo # > Description : # > Create Time : 2019-04-15 20:49:14 ***********************************************************************/ #include <event_loop.hpp> #include <iostream>...
f940cffe706371293392f562c74b05343adc73d8
c6a1226ab95bce9d66a191c0ccb85d79550d5b8e
cztqwan/Algorithm
/049_minimum_spanning_tree.cpp
C++
cpp
2,136
no_license
/* 最小生成树 */ #include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; static const int MAX = 100000; static const int INFTY = 1 << 29; class DisjointSet { public: // rank记录树的高度 vector<int> rank, p; DisjointSet() {}; DisjointSet(int size) { rank.resize(size...
9894bd4e4598c07e3c36ccc23595650a96f811b7
36f1abb2df0dda1071b4dcad15c654d8f5b09a6d
ebovio/programming-languages
/talleres/taller03/Ejercicio02/Ejercicio2.cpp
C++
cpp
1,144
no_license
#include <iostream> using namespace std; int main() { cout << "Size of char: " << sizeof(char*) << " byte" << endl; cout << "Size of unsigned char: " << sizeof(unsigned char*) << " byte" << endl; cout << "Size of boolean: " << sizeof(bool*) << " byte" << endl; cout << "Size of int: " << sizeof(int...
dd53d1aab264d8519f931b6ee74c0801e5288f22
91660d252c20c80968f149b5b73e3e299cc2649c
rupalisingh/ProjectMRU
/2020/Scripts/C++/numberpalindrome.cpp
C++
cpp
408
permissive
#include<iostream.h> #include<string.h> void main() { int num, rev_num=0, c_num, ld; cout<<"Enter a number : "; cin>>num; c_num=num; while(num>0) { ld=num%10; rev_num=(rev_num*10)+ld; num /= 10; } if(rev_num == c_num) { cout<<endl<<c_num<<" is a palin...
a04121e9750159ed391b310509c157ee4f88c720
1d2f3239ab25da6b4578576c0e229b59cbaaec1e
quincinia/school
/cs202/projects/CS202_Project_9/src/DataType/DataType.cpp
C++
cpp
1,413
no_license
/** * @brief CS-202 DataType class Implementation * @author Christos Papachristos (cpapachristos@unr.edu) * * This file is the the implementation of the general DataType class for the purposes of CS-202. */ #include <DataType/DataType.h> #include <cstdlib> DataType::DataType() : m_intVal(0), m_doubleVal(0...
aaf3db5a52127e33e04b779283574a0acac93801
11dffb9857c8b17eaee747c6ed29f5a8ad7e84e8
gatzsche/oboe
/apps/OboeTester/app/src/main/cpp/jni-bridge.cpp
C++
cpp
25,862
permissive
/* * Copyright 2015 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 applica...
b99916be55e4cdd4dda8bc8fb6e8784a72284d94
81a2d48ffd72abb454d2fdc462a9f0f661e7905f
timblechmann/nt2
/modules/boost/simd/boolean/include/boost/simd/toolbox/boolean/functions/scalar/selsub.hpp
C++
hpp
1,263
permissive
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // Se...
0fd0b6491d24d494479e629e48ea4477d8721ab6
136849e491f6b1017c99075e8f5d5e9539091bb4
wingren013/d05
/d06/ex00/literal.cpp
C++
cpp
706
no_license
#include "literal.hpp" #include <iostream> #include <cstdlib> std::string literal::getval() { std::cout << val; } literal::literal(void *v): val(v) { } literal::literal(std::string str): val(NULL), stringval(str) { //convert str to val this->val = produceval(str); } literal::literal(literal &l...
2d7335aaaf6df18738d989d4c9da68945ad2c856
2e148f8691da4c5f14fb8fadfdbc0cf81b2bff7b
pavel-lebedev96/Windows-API
/program.cpp
C++
cpp
4,176
no_license
#define _CRT_SECURE_NO_WARNINGS #include <Windows.h> #include <stdio.h> LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); /*функция потока*/ DWORD WINAPI ThreadProc(LPVOID lpParameter) { char screenInfo[100], mmxInfo[100], * s; s = (char*)lpParameter; typedef int(*importFunction)(char*); importFunctio...
a7e4879cf7c973bc192500b5f2ea858b05736813
395d2af56b53b7601e81e847e986a90c1a2248c4
damageboy/llvm-project
/llvm/lib/Transforms/Utils/LoopUnroll.cpp
C++
cpp
39,665
permissive
//===-- UnrollLoop.cpp - Loop unrolling utilities -------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
da025d80f258de241f01583250c7ac4d6fc4cb1e
35adf0358d4dae1a81ab506dd4bbb45354d91135
happyboyma/project1
/cpp/新建文件夹/code/素数1.cpp
C++
cpp
315
no_license
#include <iostream> using namespace std; bool isPrime(int); int main() { for(int i = 1;i <= 100;i++) { if(isPrime(i)) cout << i << endl; } return 0; } bool isPrime(int n) { bool bPrime = true; for(int i = 2;i * i <= n;i++) { if(n % i ==0) { bPrime = false; break; } } return bPrime; }
b693a0027ce2def40f490fbb08a6a5e9bfe4c346
9b7096e8a8c659558f19e99e0be9f3ba34800e42
JC118/111
/Linux/src/UdpClient.cpp
C++
cpp
14,375
permissive
/* * Copyright: JessMA Open Source (ldcsaa@gmail.com) * * Author : Bruce Liang * Website : http://www.jessma.org * Project : https://github.com/ldcsaa * Blog : http://www.cnblogs.com/ldcsaa * Wiki : http://www.oschina.net/p/hp-socket * QQ Group : 75375912, 44636872 * * Licensed under the Apache License, Ver...
3e80cf88173b1d46a65af9554e7e2b7b26c93093
9effa739de8705f3a461bc53f328ea3b23f6f824
GavinReidJones/Portfolio
/Assessed Coursework 3/Q1/LinearODE.hpp
C++
hpp
940
no_license
/* LinearODE.hpp Written by Gavin Reid-Jones. Last edited 8/1/18. This Class is an interface to allow the the solver to calculate a Linear ODE The class contains a specialised constructor, A method to solve the RHS of the ODE Problem and a method to calculate the analytical solution to an ODE Problem. */ #if...
d64558ad5d3f490c84ce6592518d576b25379dd1
b35d2b227c8e9cda642defa6bb8b462b456d0f03
divmohan/HomeAutomation
/Source/Applications/NotificationApp/test/TestClient.cc
C++
cc
1,454
permissive
/* * TestClient.cc * * Created on: 11-Nov-2017 * Author: div */ // Client side C/C++ program to demonstrate Socket programming #include <stdio.h> #include <sys/socket.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> #include <unistd.h> #define PORT 50013 int main(...
80cd639d99ff635b7674a042922536ad8af5e9f0
3bd717a8ab81cd131d7f47a36f752c44623a54d9
MikeArt91/CyberBall
/app/src/main/cpp/Core/JniSetup.cpp
C++
cpp
1,033
no_license
/* * Copyright (C) Google 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 or agreed to ...
c1d7ebb7f00d025c3256e77cae5531099ec9cb09
8a2dc38706d7145ded79d4a8e5687d167ee863bb
MarkRibeiro/TimeCPTI
/build-IPlant-Desktop_Qt_5_13_0_MSVC2017_32bit-Debug/debug/moc_adiciona.cpp
C++
cpp
2,631
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'adiciona.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.0) ** ** WARNING! All changes made in this file will be lost! ***********************************************************...
046da71701d54fc88828ff51c24a5abc158a598f
66da7b72fa0f7f3ed48ed2b5c35444aa978510a4
Kehczar/scum_sdk
/SCUM_School_Backpack_Girl_03_classes.hpp
C++
hpp
841
no_license
#pragma once // Scum 3.79.22573 (UE 4.24) #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace Classes { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass School_Backpa...
7f9f697233822fda38c73b6733da6d8bb738d03d
217475949e5eb48b10eb908fb34f3ed5ea57fb50
GourishVashisht/Codechef-Submissions
/atm.cpp
C++
cpp
336
no_license
#include<iostream> #include<stdio.h> using namespace std; int main() { int withdraw=0; float balance=0; cin>>withdraw>>balance; if((withdraw%5==0) && (withdraw<=(balance-0.5))) { balance=balance-withdraw-0.50; printf("%f",balance); } else { printf("%f",balance); } ...
c3514b0a58b0afa1e1d8fa55e100fb8f31a43e75
006371113915c757611d84eeaf99cda5453b573f
motonobu-t/algorithm
/VisualC++/Chap1/code/code/code.cpp
C++
cpp
680
no_license
// code.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" /* * -------------------------- * 暗号化プログラム * * -------------------------- */ #include <stdio.h> void main(void) { char table[]={'Q','W','E','R','T','Y','U','I','O','P', 'A','S','D','F','G','H','J','K','L','Z', ...
9759586fb45d913cf4a3481aa7e6f4ed3f2bd93f
f0c69f92cc019733612ca717376924bef6fc4af2
suchitj2702/armnn
/src/backends/reference/test/RefLayerSupportTests.cpp
C++
cpp
8,061
permissive
// // Copyright © 2017 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include <layers/ConvertFp16ToFp32Layer.hpp> #include <layers/ConvertFp32ToFp16Layer.hpp> #include <test/TensorHelpers.hpp> #include <backendsCommon/CpuTensorHandle.hpp> #include <reference/RefWorkloadFactory.hpp> #include <refere...
7625411dd632c019a3ed909f851bb8832f2a78f0
d6151e9730c243edb7e90fa44ddbeb14ce2e31be
schwehr/gdal-autotest2
/cpp/frmts/jpeg/jpgdataset_test.cc
C++
cc
6,873
permissive
// Copyright 2017 Google Inc. 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. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
23af7b4a6d9fb0546b4bd8aef6bdbcf3c5b18e0d
afef3b06ec33a8c2df8896250001959e1d842715
leleliu008/luau
/tests/StringUtils.test.cpp
C++
cpp
3,435
permissive
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details #include "Luau/StringUtils.h" #include "doctest.h" #include <iostream> namespace { using LevenshteinMatrix = std::vector<std::vector<size_t>>; std::string format(std::string_view a, std::string_view ...
3e56523056b1f366138b4a278ffdfeec4edcafcd
009770a4a3172d82b4f60ad2135670b7c4569605
bailitusu/LeaderLegend
/Classes/TaoTieCard.cpp
C++
cpp
12,337
no_license
// // TaoTieCard.cpp // OctLegend // // Created by zc on 16/8/20. // // #include "TaoTieCard.h" #include "FightPlayer.h" #include "AttackRule.h" #include "Setting.h" #include "OneRecord.h" #include "RecordFight.h" #include "ReadRecordFight.h" #include "ActionWait.h" #include "CommonFunc.h" #include "FightProgress.h...