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
a1fe9ef30c686c42f974db16bbad4a302f560292
58d0bbce3b166304099178942c16c351c4bdb31b
magnific0/tudat-svn-mirror
/Tudat/Mathematics/GeometricShapes/UnitTests/unitTestLawgsSurfaceGeometry.cpp
C++
cpp
5,006
no_license
/* Copyright (c) 2010-2015, Delft University of Technology * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright ...
1908f59e508a107ec53993a8c429c04353139aa2
4b3517d3cf3b33ccbe8f72245c2de109cd32efcd
bbarney7/Linked_List
/McAfeeTest/Node.cpp
C++
cpp
266
no_license
// // Node.cpp // McAfeeTest // // Created by Brennen Barney on 5/17/17. // Copyright © 2017 s. All rights reserved. // #include "Node.hpp" Node::Node(Node * nextNode, int data, Node * previous ){ next = nextNode; num = data; prev = previous; }
3627a74e2a401642b75b1fd714bb872cc333516b
811628daab3a7234afdee3dcf0a2e206b8953329
daftaupe/DPorts
/multimedia/kodi-devel/dragonfly/patch-xbmc_settings_Settings.cpp
C++
cpp
891
permissive
--- xbmc/settings/Settings.cpp.orig 2019-12-29 01:23:43 UTC +++ xbmc/settings/Settings.cpp @@ -537,6 +537,9 @@ bool CSettings::InitializeDefinitions() CLog::Log(LOGFATAL, "Unable to load rbp-specific settings definitions"); if (g_RBP.RaspberryPiVersion() > 1 && CFile::Exists(SETTINGS_XML_FOLDER "rbp2.xml") && !...
98dbac4cd66416ae8da77ed50acc20c25ee33f2f
9ec5d5b95ca661d3ec7535da58e445e28213482b
xunliu/guinsoodb
/src/include/guinsoodb/function/aggregate_function.hpp
C++
hpp
10,472
permissive
//===----------------------------------------------------------------------===// // GuinsooDB // // guinsoodb/function/aggregate_function.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "guinsoodb/common/vector_operations/aggrega...
0f0ba17a2b35eaf1344aa00d704371bd48840671
6e1956864c905e28dba946dbc10eab6ed1fbf975
PeterLeopold/hpr-blas
/applications/blas/linpack_unchained.cpp
C++
cpp
4,833
permissive
// linpack_unchained.cpp: system solver benchmark with exact solution // This program completes the design goal of LINPACK, that is, // create an idealized problem where both the input values and the correct answer // are expressible in the numerical vocabulary of the computing environment. // // Copyright (C) 2017-20...
fc08caf78e72c5d1358cf87cd2bb8c63e1ace9cb
c694ebe23a912429395fd9e213d3ff5ed9841b2f
TheFlyingPandaa/MP_Shooter
/Source/MPShooter/Private/PingBeaconHostObject.cpp
C++
cpp
1,728
no_license
#include "PingBeaconHostObject.h" #include "PingBeacon.h" APingBeaconHostObject::APingBeaconHostObject(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { /** Set our actual actor client class this host object will handle */ ClientBeaconActorClass = APingBeacon::StaticClass(); /** Set...
0cc0bdf460b905284befdd7a1d3ca018c36baaa0
4efaf9f85d47eeaab2ee19d255ea67d8ddf36ba8
PratikshaSh/My-DSA-Codes
/graph/GRAPH/dijksrasAlgorithm.cpp
C++
cpp
2,266
no_license
#include<bits/stdc++.h> #include<unordered_map> using namespace std; template<typename T> class Graph{ unordered_map<T, list<pair<T, int>>>m; public: void addEdge(T u,T v, int dist, bool bidir = true){ m[u].push_back(make_pair(v,dist)); if(bidir){ m[v].push_back(make_pair(u,dist)); }...
348125aa2bbf2a05d9a838d1a068d8e91c8c1701
056e852694db134e1263d91c4317bacf3b02c43d
samkumar/openthread
/tests/unit/test_spinel_decoder.cpp
C++
cpp
42,789
permissive
/* * Copyright (c) 2017, The OpenThread Authors. * 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 ...
d9dbeb40413b70488c869abbacf9c453e4e24b62
a4d9618a001acffd3d5d96f15e513a672ccfe737
SimVascular/SimVascular
/Code/Source/sv4gui/Plugins/org.sv.gui.qt.simulation/sv4gui_TableSolverDelegate.cxx
C++
cxx
5,082
permissive
/* Copyright (c) Stanford University, The Regents of the University of * California, and others. * * All Rights Reserved. * * See Copyright-SimVascular.txt for additional details. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated doc...
5fbf350c3905a42151d624c667ca235e9a09c4d5
833695c227eb6c8f6aa618dc49c7647750fd4bfa
jamesfowkes/indiboo-knock-puzzle
/game-ethernet.cpp
C++
cpp
1,224
no_license
#include <EtherCard.h> #include "fixed-length-accumulator.h" #include "very-tiny-http.h" static const uint16_t BUF_SIZE = 256; static const uint8_t MAC_ADDRESS[] = { 0xCA, 0xFE, 0xE5, 0xCA, 0xBE, 0x03 }; static const uint8_t IP_ADDRESS[] = {192, 168, 0, 103}; static const uint8_t GATEWAY[] = {255, 255, 255, 0}; byte...
80aae0d74da0c8f95caaf03e5eaf76473fdb2bce
a6e1c0c4ec7aee9f4c12046c944f6ce82ce92897
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/windows/advcore/gdiplus/engine/entry/geometry.hpp
C++
hpp
4,242
no_license
/************************************************************************** * * Copyright (c) 2000 Microsoft Corporation * * Module Name: * * Geometry: Some 2D geometry helper routines. * * Created: * * 08/26/2000 asecchia * Created it. * ************************************************************************...
10f8988a128cd3e6c66b6d217462aa30e7d1ca77
3138356698cfcd104b994fc5c43a4cc1d0e5c2a1
HaikuArchives/PhantomLimb
/source/PhantomApp.cpp
C++
cpp
623
permissive
/* PhantomApp.cpp */ /* Originally written by Ben Loftis. Modified by Jeremy Friesner. This source code is available freely for any use, and is provided without any warranty or support. If you use this source extensively in your project, I humbly request that you credit me in your program. */ #inc...
d1ce949f85e48d2ffc27fb6b32b7d05ccacda686
9397a42da45d591fb5d5c8fcfdc44c2d1cec9686
FlexibleSUSY/FlexibleSUSY-generated
/models/CE6SSM/CE6SSM_soft_beta_mHp2.cpp
C++
cpp
5,211
no_license
// ==================================================================== // This file is part of FlexibleSUSY. // // FlexibleSUSY 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 3 of the Licens...
ee1ca0732c4bcfca6223b1d70586872ac3ef2fc5
8a777d56083ade77d415ad7cc689ac36c9382482
shobhit-saini/IB
/Day39/Palindrome_List/code.cpp
C++
cpp
797
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ int Solution::lPalin(ListNode* A) { ListNode* ptr = A,*qtr = A,*head1,*head2,*rtr ; while(ptr!=NULL && ptr -> next != NULL) { ptr = ptr->next...
ec68f90abd00d180919b421cbac94352f01a7753
f07458582360ad290e398772a4ccedce9b2404b8
Kaustic/KLib
/Include/KLib/Time.hpp
C++
hpp
4,326
permissive
#pragma once #include <chrono> #include <KLib/Config.hpp> #include <KLib/Number.hpp> #include <KLib/String.hpp> namespace klib { namespace time { using namespace std::chrono; /////////////////////////////////////////////////////////////// /// \brief Format time into a string /// /// \param formatString String to u...
49ce789d9a34991e7f7ef67e596976380ee6a900
9830608da225a57bd8268039522226601c381566
NVIDIA-Omniverse/PhysX
/physx/snippets/snippetgyroscopic/SnippetGyroscopic.cpp
C++
cpp
6,238
permissive
// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary...
dea2dbb18ab058589cc8d77fbaaad7f92835c634
d6d17eb7236c88451eddeeb9ccded38d983908cf
ettocrut712/MFCDame3
/MFCDame3/CnewDialogChecker.cpp
C++
cpp
5,936
no_license
#include "stdafx.h" #include "MFCDame3Dlg.h" CnewDialogChecker::CnewDialogChecker() { m_origine_X = 0; m_origine_Y = 0; m_destination_X = 0; m_destination_Y = 0; } CnewDialogChecker::~CnewDialogChecker() { } BEGIN_MESSAGE_MAP(CnewDialogChecker, CDialog) ON_WM_PAINT() ON_WM_MOUSEMOVE() ON_WM_LBUTTONDOWN() ON...
066c35dbf7bd9e93c6d0fae899f79ee04b7bfd0c
85d868df3c3b7b0eadf8e8208065c70d9543f78e
amiryanj/cyrus_ssl
/LookupTableBuilder/Controller/filecontroller.cpp
C++
cpp
1,441
no_license
#include "filecontroller.h" #include <QFile> #include <QStringList> #include <QTextStream> FileController::FileController(QObject *parent) : QObject(parent) { myFile.setFileName(""); } void FileController::setFile(QString file_name) { myFile.setFileName(file_name); } QString FileCon...
534e5d6c9768c6d5058f57ff865607ccf858a9bf
ae706ae73b2860ded9dfd6df86a6a612be0e76eb
vaibhavijha/Hacktoberfest-2021
/C++/Equal_Sum_Partition.cpp
C++
cpp
1,427
no_license
/* Problem Statement - Given an array arr[] of size N, check if it can be partitioned into two parts such that the sum of elements in both parts is the same. */ #include <bits/stdc++.h> using namespace std; class Solution{ public: bool subsetSum(int arr[], int n, int sum){ bool t[n+1][sum+1]; ...
d8b04585cc3e09c7b14175a1cf7fcb305af0b232
3870c70dee1411ec1a88e3fc37d4f1ea5bd94ccf
wayfinder/Wayfinder-CppCore-v2
/cpp/Shared/h8300-unknown-hms/ArchFastMath.cpp
C++
cpp
5,264
permissive
/* Copyright (c) 1999 - 2010, Vodafone Group Services Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of co...
df0d2eec9539906627a548e5513611a08ab2e169
aa88f76fa8394a3dae10ecea26ac12d4a4067644
t-sumisaki/UE4Plugin_WebApi
/WebApiDemo/Plugins/WebApi/Source/WebApi/Private/WebApi.cpp
C++
cpp
6,205
permissive
#include "WebApi.h" #include "WebApiLog.h" #include "Request/WebApiRequestBodyUrlParam.h" #include "Response/WebApiResponseBodyString.h" #include "Response/WebApiResponseBodyBinary.h" #include "Filter/WebApiRequestFilterInterface.h" #include "Filter/WebApiResponseFilterInterface.h" UWebApi::UWebApi(const FObjectIniti...
97f1d90aea724e43239c7a7131d835514fc07171
b4ec5d0fb1607fca903c6da03d4d8a7a20211f39
AliOsm/CompetitiveProgramming
/CodeForces/168D. Wizards and Huge Prize.cpp
C++
cpp
1,233
no_license
/* idea: - We can solve this problem using dynamic programmin. - dp[idx][win][cnt] means the probability of winning `win` games till the `idx` day with `cnt` places in the bag for the prizes. - then in each day either we go to the next day with probability (1 - p[i]) or win the tour with probability (p[i])...
ee680375dd18e0ecf318bc7db3e06857d2e71578
00be36b9748fc30bfbb8f1d650802424fa9abb56
mayd/tcom
/src/TclScript.cpp
C++
cpp
5,727
permissive
// $Id$ #include "ActiveScriptError.h" #include "Reference.h" #include "TypeInfo.h" #include "Extension.h" #include "tclRunTime.h" #define NAMESPACE "::TclScriptEngine::" #define ENGINE_PACKAGE_NAME "TclScript" #define ENGINE_PACKAGE_VERSION "1.0" static int getnameditemCmd ( ClientData, Tcl_Interp *interp, ...
bcd47d892225fc257bbb8c16201a26a5ce60a0a0
e62fa8cd638607428949a7f842ad1531c7b227db
sideb0ard/CPPPOP
/envelope.cpp
C++
cpp
2,123
no_license
#include <cmath> #include <iostream> #include <sstream> #include <string> #include "defjams.h" #include "envelope.h" #include "mixer.h" extern Mixer mixer; Envelope::Envelope() { //starttime = 0.0; //std::cout << "ENVELOPE CREATTTTTED" << std::endl; phase = 0; ticker = 0; looptime = 8; // two bar...
f9b240e7be2d9e815086d9bd5173c42e7db18e40
aeb84fd729d5252803b1e2bc66c07abab3b8dbc0
Ivan1910/Flappy-Bird-SFML
/Flappy Bird/Flappy Bird/endGameState.hpp
C++
hpp
537
no_license
#pragma once #include <SFML/Graphics.hpp> #include "states.hpp" #include "mainLoop.hpp" namespace fp { class GameOverState : public state { public: GameOverState(dataRef dr,int score); void init(); void inputHandler(); void update(float deltaT); void pause(); void resume(); void draw(float delt...
04b182f34f40c4ddc3da075dd3330473b166f54c
f521ab84a31c193424c9a5717e7ee99e700a01a9
Karthik005/cpp-dsa
/DataStructures/LinkedList.hpp
C++
hpp
2,514
no_license
#ifndef DSA_DS_LINKEDLIST_H_ #define DSA_DS_LINKEDLIST_H_ #include <iostream> #include "Node.hpp" template <class T> class LinkedList { protected: node<T> *root; void deleteNext(node<T> *nodeval); public: node<T> *createNode(T); void insertEnd(node<T> *nodeval); void insertBeginning(node<T> ...
2c6942da51bc0c6f453cbd87343d322946367b30
c0338aa5b12a89ad0a0227b679ffec56ba0c7a0a
attitudeyu/Data-Structure
/冒泡排序.cpp
C++
cpp
1,317
no_license
/* 冒泡排序算法: 思路: 两个for循环,两两比较元素进行交换。 步骤: 1.从前向后遍历 2.从后向前遍历 3.初始化当前序列已有序的标志位 4.两两比较 */ #include <iostream> using namespace std; const int Maxsize = 10; typedef struct { int r[Maxsize + 1];//r[0]是用于存储哨兵变量 int length; }List;//定义的结构体只有一个结构体别名 void swap(List *L, int i, int j) { int temp = L->r[j]; L->r[j] = L->r[i]; L-...
41b3cda6e339c1df12dc8dbd7ef93c23609b5ad2
93558fa7b4847af5250bb8f3f83fcf0ec169652d
DecodeGenetics/graphtyper
/src/utilities/genotype_hla.cpp
C++
cpp
22,295
permissive
#include <fstream> #include <numeric> // std::iota #include <sstream> #include <string> #include <string_view> #include <vector> #include <graphtyper/graph/absolute_position.hpp> #include <graphtyper/graph/constructor.hpp> #include <graphtyper/graph/genomic_region.hpp> #include <graphtyper/graph/graph_serialization.hp...
78d81cd3e7f4b03a5454be094890f93365526654
17674be5daff5a6a46ec6d8d130e071c702f69b4
igoswamik/cpp
/C_Bouncing_Ball.cpp
C++
cpp
870
no_license
#include <iostream> #include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll t; cin>>t; while(t--){ ll n,p,k,x,y; cin>>n>>p>>k; string s; cin>>s; cin>>x>>y; int ans=INT_MAX; ...
28b70243d785312cec3f26ae31bf432f95b0959e
1426cbce808984e1587648e32121d1932dd7dc08
manster161/Teleplanter
/src/infrastructure/MessageService.cpp
C++
cpp
1,749
no_license
#include "Arduino.h" #include "MessageService.h" #include <SoftwareSerial.h> #include "../core/Constants.h" namespace Infrastructure { unsigned long _channelNumber = 0; String ssid = "Mansternet"; String password = "snoppsnopp666"; SoftwareSerial esp(Pins::DATA_TX,Pins::DATA_RX); String data; St...
24f56e64dc7a6615b0549261c692a56dd6843838
2f1953f07e76662a13c0dcb1876edcd970f8c601
fuad7161/CSES-Solutions
/src/1644 - Maximum Subarray Sum II.cpp
C++
cpp
1,421
no_license
/* Problem Name: Maximum Subarray Sum II Problem Link: https://cses.fi/problemset/task/1644 Author: Sachin Srivastava (mrsac7) */ #include<bits/stdc++.h> using namespace std; #define int long long #define endl '\n' signed main(){ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #ifdef LOCAL freope...
6fb6807a17124d810f1f9a1d74c4e121e8c2989a
d6ef78df30ae6c4017543e7e1cdd057c0a412329
hichoe95/BOJ
/1764.cpp
C++
cpp
589
no_license
#include <iostream> #include <algorithm> #include <map> #include <cstring> #include <vector> using namespace std; int main(){ ios_base::sync_with_stdio(false); int n,m; cin >> n >> m; string a; vector<string> vec; map<string,int> name; for(int i=0 ;i<n;i++){ cin >> a; name[a]++; } for(int ...
30c03f339383836a3dd36213a24323745ecf11b8
d995608c6173e063b3bdd0d4f69ac019dbcd5aec
gejx2010/kickstart_projects
/CopyAndPaste/main.cpp
C++
cpp
3,302
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <utility> #include <algorithm> #include <cmath> #include <ctime> #include <map> #include <stack> #include <queue> #include <cassert> #include <tuple> #include <set> #include <bitset> #include <climits> #include <numeric> using namespac...
f440e75083ac095480b7cce828c62127cdea67ab
1438c71490909e5cf5429c2934fb4be593d9738d
s4kibs4mi/Random-Study
/search_word_n_remove_it_from_line.cpp
C++
cpp
841
no_license
// Searching a word in a sentence and removing it #include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ char sen[500],word[100]; gets(sen); gets(word); int len = strlen(sen),wLen = strlen(word),i,j,n; // Searching word starts here i = 0; while(i <= len-wLen){ j = 0; while(word[j]){ if(...
2ecfa555597f7e208558d68d5dec4f0e99b58df8
98371fb1863743daa667dd2f0a3b63e9999e9f58
KalyanovD/daal
/lang_service/java/com/intel/daal/algorithms/logistic_regression/model.cpp
C++
cpp
1,935
permissive
/* file: model.cpp */ /******************************************************************************* * Copyright 2014-2019 Intel Corporation * * 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 ...
6a86996319e9be91fcfd93410a9f6b0709b62175
fa21384d92a8244fa771bbafc7c4aa0889156e6c
sednanref/tesis
/src/search/lp/coin/include/coin/CoinModelUseful.hpp
C++
hpp
11,141
no_license
/* $Id: CoinModelUseful.hpp 1215 2009-11-05 11:03:04Z forrest $ */ // Copyright (C) 2005, International Business Machines // Corporation and others. All Rights Reserved. #ifndef CoinModelUseful_H #define CoinModelUseful_H #include <cmath> #include <cassert> #include <cfloat> #include <cstring> #include <cstdio> #inc...
4c07fdc26092a73325e686954007c438f0c5435e
72d9714aa60720d46d228a33993cbbfd3685ac7d
OAkyildiz/oscc-joystick-commander
/oscc/firmware/can_gateway/src/main.cpp
C++
cpp
502
permissive
/** * @file main.cpp * */ #include <avr/wdt.h> #include "arduino_init.h" #include "communications.h" #include "debug.h" #include "init.h" #include "timer.h" int main( void ) { init_arduino( ); init_globals( ); init_communication_interfaces( ); start_timer( ); wdt_enable( WDTO_250MS ); ...
a55a56494779f98a54ffe17d61b41ca4b6bd03e4
b8541e9d56644022bb644a871ac4a21618bbb7c9
surajpatel11/arangodb
/3rdParty/iresearch/core/formats/format_utils.cpp
C++
cpp
2,910
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...
914e8754d9c8ca4221de024393f710284cf252a7
024c0123cae5c1dfc25998f8c500d00a77bfde2c
floreks/Qubic
/qubic/src/QcUtility/schema/qcschema.cpp
C++
cpp
658
no_license
#include "qcschema.h" using std::list; QcSchema::QcSchema(QList<QcMetaTable> tables) { this->schema = tables; } void QcSchema::addTable(QcMetaTable table) { schema.append(table); } void QcSchema::setTables(QList<QcMetaTable> tables) { schema = tables; } QcMetaTable QcSchema::getTable(QString tableName)...
88b841d5bfa23194a740c018477512762e9a5249
2edd1ae103a8be1fc12e3dbe77103cafb0e81999
Magrawal17/Programming-in-C-and-C--Basics
/A12/a12p1/testHexagon.cpp
C++
cpp
519
no_license
#include <iostream> #include "Shapes.h" using namespace std; int main() { Hexagon one("Hex1",1,1,9,"Blue"); Hexagon two("Hex2",0,0,15,"Green"); Hexagon three(two); one.printName(); cout<<"Area: "<<one.area()<<endl; cout<<"Perimeter: "<<one.perimeter()<<endl; two.printName(); cout<<"Area...
ec77f11125439a13be92a36c2d485bc0adeafaa7
78197e4cd5f1e6eacc7bda3353ed71f8d4f6b4f1
canermastan/rockpaperscissors
/main.cpp
C++
cpp
3,566
no_license
#include <iostream> using namespace std; int pc; int pcWin = 0; string player; int playerWin = 0; int main(){ cout << "Taş Kağıt Makas Oyununa Hoş Geldiniz !\n3 Olan Kazanır!\nHaydi Başlayalım!\n" << endl; while(true){ // 1 = Rock 2 = Paper 3 = Scissors int RPS[] = {1,2,3}; int randomRPS = rand()...
4d66292752891cc835dde22a51e7472be5713d3c
022e410e8a908706694c43f44589e45cd5236219
NitinDasiah/IPMP
/Week_7/Wednesday/Strings_11.cpp
C++
cpp
378
no_license
int ic_strcmp(string s1, string s2) { int i; int n=min(s1.size(),s2.size()); for (i = 0; i<n; ++i) { if (s1[i] == s2[i] || (s1[i] ^ 32) == s2[i]) continue; else break; } if (s1[i] == s2[i]) return 0; if ((s1[i] | 32)...
1e4624c13b9309e65126f2dbf4f087c2b1f033c3
8603a5119286e3d9c9ffe965d8fc44a335df3db2
Velmy/EDCB
/EpgDataCap3/EpgDataCap3/Descriptor/StuffingDesc.cpp
C++
cpp
1,550
no_license
#include "StdAfx.h" #include "StuffingDesc.h" CStuffingDesc::CStuffingDesc(void) { stuffing_byteLength = 0; stuffing_byte = NULL; } CStuffingDesc::~CStuffingDesc(void) { SAFE_DELETE_ARRAY(stuffing_byte); } BOOL CStuffingDesc::Decode( BYTE* data, DWORD dataSize, DWORD* decodeReadSize ) { if( data ...
521380bb14b7d606799b7406fe630d30a262671f
c69136c4b68f3ab6f0fc5a8b0cd0d99230b41c23
savelii/indexer-plus-plus
/IndexerTest/FIleInfoSerializationTest.cpp
C++
cpp
916
permissive
// This file is the part of the Indexer++ project. // Copyright (C) 2016 Anna Krykora <krykoraanna@gmail.com>. All rights reserved. // Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. #pragma once #include "gtest/gtest.h" #include "FileInfo.h" #include "FileI...
e42704725a1e73d21e1e6da94dc15efade6c86f4
2b6f6ba9481d7d709729daab0cc8343012b13bf2
tokitsu-kaze/ACM-Solved-Problems
/gym/Amazalgo 2018 Practice Contest/101883A.cpp
C++
cpp
3,200
no_license
#include <bits/stdc++.h> using namespace std; namespace fastIO{ #define BUF_SIZE 100000 #define OUT_SIZE 100000 //fread->read bool IOerror=0; // inline char nc(){char ch=getchar();if(ch==-1)IOerror=1;return ch;} inline char nc(){ static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE; if(p1==pend){ ...
33226cea186269fbf36d41f058ab226fcd845dd4
adfd4364aba5a38d838cfd4b970dc080eefb94a5
tos-project/TOSC
/src/rpcblockchain.cpp
C++
cpp
27,108
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2017-2018 The T.OS developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "checkpoints.h" #include "main.h" #...
ce04ee67e322adc1437275f437d1c12da1aa51ad
60c441e1ef884d99d2bccb1aaed3eeb4319c7211
Kudusov/Rhythm_game
/client/client.cpp
C++
cpp
4,581
no_license
#include "client.h" #include "logging.h" Client::Client(const std::string& host, int port, QObject* parent): QObject(parent), next_block_size(0) { this->is_executed_response = false; client = std::make_unique<QTcpSocket>(this); client->connectToHost(QString::fromStdString(host), port); connect(client....
8da0582f6a9cca5b83628abb2832529dd90c7330
933432b9429c5c60a3df110d68ede4242f15a832
Alegruz/Game-AI-Track
/1_2/high_level_programming_ii_the_cpp_programming_language/cpp_primer/part_i_the_basics/03 Strings, Vectors, and Arrays/ex15.cpp
C++
cpp
306
no_license
// Repeat the previous program but read strings this time. #include <iostream> #include <vector> #include <string> int main() { std::string s; std::vector<std::string> svec; while (std::cin >> s) // reads a string svec.push_back(s); // stores the string in a vector return 0; }
fd13208486d8bfbeb728ad6e386de954ff9742cb
c3cf3d6f00945b2ef2154a9261422cc35e103d0d
mjwagner2/ssc
/ssc/cmod_wfcsv.cpp
C++
cpp
5,409
permissive
/** BSD-3-Clause Copyright 2019 Alliance for Sustainable Energy, LLC 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 and the...
f1abb4b114a074ee456b75af174902e5f7bf16ad
c66ca0a6bc665c089d8feaec267250ef212157b8
michaelmanfre/certificate-transparency
/cpp/server/ct-server.cc
C++
cc
8,589
permissive
/* -*- indent-tabs-mode: nil -*- */ #include <event2/thread.h> #include <functional> #include <gflags/gflags.h> #include <iostream> #include <memory> #include <openssl/err.h> #include <signal.h> #include <string> #include "log/cert_checker.h" #include "log/cert_submission_handler.h" #include "log/ct_extensions.h" #in...
5b49eeccc4969468665b198d25ab21a5318a82a8
1599c508e31fde69a5fa91e1d54af476c02f5408
ghumman3131/Altcoin-Bitcoin-v0.10.1-fork
/src/compat/strnlen.cpp
C++
cpp
592
permissive
// Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/newcoin-config.h" #endif #include <cstring> // OSX 10.6 is missing strnlen at runtime...
fdd60a09e40be0ab2c8c8106052b6478bf180d53
84c7ef00b95bd4ebdad2a9389f351f0d47474744
shubham7109/Rogue-like-game
/OtherGits/git3/williams_ethan.assignment-1.07/path.cpp
C++
cpp
11,519
no_license
#include "path.h" #include "dungeon.h" /* Ugly hack: There is no way to pass a pointer to the dungeon into the * * heap's comparitor funtion without modifying the heap. Copying the * * pc_distance array is a possible solution, but that doubles the * * bandwidth requirements for dijkstra, which would also b...
2ea65b1aa4bbf6e93fe5d4a76eea1e8fe743155c
badb0b712d5b4d620ab98b93c4f59c25ef671884
skybarer/Interview-Problems
/Leetcode/Medium/46.cpp
C++
cpp
350
no_license
// https://leetcode.com/problems/permutations/ class Solution { public: vector<vector<int>> permute(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<vector<int>> output; do{ output.push_back(nums); }while(next_permutation(nums.begin(), nums.end())); ...
0f122067adb07ec7b8f7972d2e13bf202a71c653
056f353841dbb012868014722135f729f16a2bd9
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_1/LB-GRR+R-A+R-A.c.cbmc_out.cpp
C++
cpp
62,542
no_license
// 0:vars:4 // 5:atom_0_X0_1:1 // 6:atom_1_X0_1:1 // 4:atom_2_X2_0:1 // 7:atom_2_X0_1:1 // 8:thr0:1 // 9:thr1:1 // 10:thr2:1 // 11:thr3:1 #define ADDRSIZE 12 #define NPROC 5 #define NCONTEXT 1 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) ...
83167caab32fc47da91649f280c3ea92bcc83b0f
29de41412ab07598cfcce1144bcfec242accd91a
bullover/ACBC
/Dialogs/dialogprint.cpp
C++
cpp
316
no_license
#include "dialogprint.h" #include "ui_dialogprint.h" DialogPrint::DialogPrint(QWidget *parent) : QDialog(parent), ui(new Ui::DialogPrint) { ui->setupUi(this); QPixmap pic("../ACBC/Dialogs/blueprint.png"); this->ui->label_print->setPixmap(pic); } DialogPrint::~DialogPrint() { delete ui; }
dcd6e86a6151ae99c4bb1a116f8779b3464019ee
1daca2585d4911e39b5370781a41c621691dae6d
skbalasu/fboss
/fboss/agent/hw/test/HwPortFb303StatsTests.cpp
C++
cpp
9,700
permissive
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #in...
723c4acab41f7f4904f0d0e277953690fb3bb168
be39f2b190eb555bd6a9680d784bbddb235af227
ahmad-ra/networkit
/include/networkit/numerics/LAMG/Level/LevelElimination.hpp
C++
hpp
4,272
permissive
/* * LevelElimination.h * * Created on: 10.01.2015 * Author: Michael */ #ifndef NETWORKIT_NUMERICS_LAMG_LEVEL_LEVEL_ELIMINATION_HPP_ #define NETWORKIT_NUMERICS_LAMG_LEVEL_LEVEL_ELIMINATION_HPP_ #include <networkit/numerics/LAMG/Level/Level.hpp> #include <networkit/numerics/LAMG/Level/EliminationStage.hpp> ...
a1828c68f9a87ba8e239081e21578de020482b4a
4c5853596e9b0e4349b43badf0f62999bffc442b
zsmountain/leetcode
/c++/sum_of_square_numbers.cpp
C++
cpp
704
permissive
/* 633. Sum of Square Numbers DescriptionHintsSubmissionsDiscussSolution Discuss Pick One Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. Example 1: Input: 5 Output: True Explanation: 1 * 1 + 2 * 2 = 5 Example 2: Input: 3 Output: False */ /* * Simil...
eafea6a92b2d83bd072d4024d3e5830d674937a2
cdc3023afb9574e89f218286590ec098589c4040
moosan63/my_competitive_programmings
/src/dijkstra_sample.cpp
C++
cpp
1,392
no_license
// この辺ほんとは構造体にしてポインタ渡すほうがたぶんシンプルになる vector<vector<Int>> cost_to; vector<Int> cost; vector<int> done; int dijkstra1n(int start, int goal, int N ){ Int min, target; target = -1; cost[start] = 0; while(true){ int all=0; min = inf; for(int i=1; i<=N; i++){ if(done[i] =...
28f2d5882b7761a6cb30d4d47b58d77c8eaad7c2
297b0449545991a6f373916417c06c79341642df
ajay1831/data-structure-algorithm
/Array/rotateArray.cpp
C++
cpp
765
no_license
#include<stdio.h> void swap(int *x, int *y) { int temp; temp=*x; *x=*y; *y=temp; } void reverse(int arr[], int start, int end) { int i=start; int j=end; while(i<=j) { swap(&arr[i],&arr[j]); i++; j--; } } void rotate(int arr[], int len, int k) { reverse(arr,0,k-1); reverse(arr,k,len-1); reverse(arr,0...
7583e25797188dea2db2ce391533e66d80902989
b33b9ddd77be41d64c003001c7f753d4becf7f24
seronet-project/SeRoNet-examples
/SeRoNet-Tooling-ROS-Mixed-Port/ROS-MixedPort-Examples/ROSClientCall_examples/GetStringROS/smartsoft/src-gen/GetStringROSImpl.hh
C++
hh
1,165
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...
d6f58fa22eaae10fa87d6beebeeb78009a46be01
d83e3b1c14a271548c27ff614b0e525df1cdeff5
acc-cosc-1337-fall-2020/acc-cosc-1337-fall-2020-stellaMillerAcc
/src/homework/tic_tac_toe/tic_tac_toe_3.cpp
C++
cpp
922
permissive
#include "tic_tac_toe_3.h" bool TicTacToe3::check_column_win() { if (pegs[0] != " " && pegs[0] == pegs[3] && pegs[3] == pegs[6]) return true; if (pegs[1] != " " && pegs[1] == pegs[4] && pegs[4] == pegs[7]) return true; if (pegs[2] != " " && pegs[2] == pegs[5] && pegs[5] == pegs[8]) ...
9269e759934bec41c9bac5edd57179d3a27399d2
a25f73f6c6f2717d6af3c2ee6fa5cb4be2eca896
karunmatharu/Android-4.4-Pay-by-Data
/external/chromium_org/net/socket/tcp_server_socket.cc
C++
cc
2,894
permissive
// Copyright 2013 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 "net/socket/tcp_server_socket.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/logging.h" #include "net/base/net_errors.h...
d265ef7881e9fbbf2096d50ae9e5b2200e393073
6c67869801421d666044fd6160bc967fdda9d708
ricochetcoin/ricochet-wallet
/src/Gui/Mining/PoolHeaderView.cpp
C++
cpp
1,318
no_license
// Copyright (c) 2015-2017, The Bytecoin developers // // This file is part of Bytecoin. // // Ricochet is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your ...
3101c067fe6e7b76536b54d2fe9bd2c29747392c
95c5ad8ac5ab58f2e33844c4b721abaacfc37c18
JeevakaPrabu/IA-Hardware-Composer
/common/utils/hwcutils.cpp
C++
cpp
968
no_license
/* // Copyright (c) 2017 Intel Corporation // // 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...
d3bffbf30bd6ae272b302915979c822a4fe2c75b
532d52d8e28f5fe4571292807f99cf136f7c92f0
007Robin/Algorithm-CPE593
/L12-graph/BFS.cpp
C++
cpp
2,278
no_license
#include<iostream> #include<queue> #include<vector> #include<list> using namespace std; //BFS class Graph{ int V; //Number of vertice list<int>* adj; //point to an array cotaining all adjacent vertice public: Graph(int V) : V(V) { adj = new list<int>[V]; } void addEdge(int v, int w) { adj[v].push_back(w); ...
c2af72356c7ede1e0db8e66b2ee7d9264b6d8572
b5f035aec70fc34c54a84e7d4b6f1f3fa55337c6
supersaiyanmode/CMSServer
/Util/DataType/Primitive/Number.cpp
C++
cpp
1,035
no_license
#include <sstream> #include "Number.h" #include "../../../Util/String/StringUtils.h" Number::Number(long l):value(l){ } std::string Number::str(){ std::stringstream ss; ss<<value; return ss.str(); } bool Number::parse(const std::string& str, Number& out, const std::vector<bool (*)(Number)>& conditi...
076555af87a7e5fd2232ff151b168a44518123f5
14fe88d8da3c400807a6f6ea4e5c6c140dbaf63e
manu-chroma/cp
/codeforces/366/3.cpp
C++
cpp
473
no_license
#include <bits/stdc++.h> using namespace std; typedef long long int li; int main() { ios_base::sync_with_stdio(false); int n, q; cin >> n >> q; vector < tuple<int, int, bool> > notif; int read_till = -1; for (int i = 0; i < q; ++i) { int a, b; cin >> a >> b; if(a == 1) { notif.push_back(make_tupl...
8410e99a1a6f8045e63da01216c9599429ae77ae
2b592a3dafb5c8f28e74c20205a70ffddce646d4
Buom01/cuberite
/src/Entities/Player.cpp
C++
cpp
64,567
permissive
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include <unordered_map> #include "Player.h" #include "../Mobs/Wolf.h" #include "../Mobs/Horse.h" #include "../BoundingBox.h" #include "../ChatColor.h" #include "../Server.h" #include "../UI/InventoryWindow.h" #include ".....
c394a9523e8356b38d60ddcc4b89490548a23332
3ad2e706e29c89fac269e96dbadb2362b11e1c3a
paspd/CPP_ALL
/CPP05/ex03/Bureaucrat.hpp
C++
hpp
909
no_license
#ifndef BUREAUCRAT_HPP #define BUREAUCRAT_HPP #include <string> #include <iostream> #include <fstream> #include "Form.hpp" class Form; class Bureaucrat { private: std::string _name; int _grade; public: class GradeTooHighException : public std::exception { public: const char *what() const throw(); }; cla...
bf96d76282e2a773784cff562369233e92e8bc69
36ff46d00797b7432e42396b3aa13a917c9cf267
YMDragon/Advanced-Computer-Graphics
/PA1/code/include/plane.hpp
C++
hpp
938
no_license
#ifndef PLANE_H #define PLANE_H #include "object3d.hpp" #include <vecmath.h> #include <cmath> // ~~TODO~~: Implement Plane representing an infinite plane // function: ax+by+cz=d // choose your representation , add more fields and fill in the functions class Plane : public Object3D { public: Plane()...
0f676d4cf53a70e9c67a9b0459b48a3c559e1041
4a8f51a9880de44b80c82c92468537b2cc9817b6
HibikiGameWrok/C_Origin
/C_Origin/Intermediate/Build/Win64/UE4Editor/Inc/C_Origin/C_OriginGameModeBase.gen.cpp
C++
cpp
3,615
no_license
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==============================================================...
da697bcd678619610de7f3bd1f4b203957e926db
91dfd885415302ae1d1dbc75eb96da1d465e9a7c
madeeasyliteracy/chromium
/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc
C++
cc
30,234
permissive
// Copyright 2017 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/ui/webui/print_preview/print_preview_handler.h" #include "base/base64.h" #include "base/containers/flat_set.h" #include "base/js...
1e2c6962ac78a49d61f7247beac6d8385061fe8c
b3857b035d8b936f0b18238627173317fcee4a55
sasaki-seiji/ProgrammingLanguageCPP4th
/part4/ch31/31-5-2-queue/src/queue.cpp
C++
cpp
798
no_license
/* * queue.cpp * * Created on: 2016/11/27 * Author: sasaki */ #include <queue> #include <mutex> #include <thread> #include <string> #include <iostream> using namespace std; struct Message { int code ; string str; }; void server(queue<Message>& q, mutex& m) { while (!q.empty()) { Message mess; { lo...
483b7ef4fbb0caeaa370e08e80650ffdc01b9c32
bc1dc0dc7a279fee2ed9166fab7b6dd4e023de6b
leerang92/StudyRepo
/Algorithm/MinerFSM/MinerFSM/Home.cpp
C++
cpp
831
no_license
#include "Home.h" CHome::CHome() { } CHome::~CHome() { } CHome * CHome::getInstance() { static CHome instance; return &instance; } #include "Location.h" #include "MinerAI.h" #include <iostream> using namespace std; void CHome::Enter(CMinerAI *pMiner) { if (pMiner->getLocation() != HOME) { cout << pMiner->getL...
6bfcedeb81cb675d914a4598106819a80e6a86b5
4c558d24db17effb07d1d77f326030cc7d906c05
yingjieyao/programming2017aut
/code/contest137/A/923_A_40949.cpp
C++
cpp
914
no_license
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> using namespace std; int a[520]; double b,key; int c; int findg(int a,int b) { if(a>b) { c=a%b; if(c==0)return b; else findg(b,c); } else {c=b%a; if(c==0)return a; else findg(a,c);} } int main()...
ad188b2bb253b66eade51b6aa38d9f3d445c16d0
d140028c58ec846ab7851fc0f82516f49b5173e2
mrmayurgithub/Data-Structures-and-Algorithms-Specialization---Coursera
/suffix_array_long.cpp
C++
cpp
2,964
no_license
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <utility> using namespace std; void print_int_v(vector<int>& v) { for (int i = 0; i < v.size(); i++) { cout << v[i] << " "; } cout << endl; } int char_to_idx(char x) { switch (x) { case '$': ...
736753f131f294a65012a7957971169239290704
4e34e3693d3d32a55f62930c0ba4b03743f47d36
huawei-noah/bolt
/training/src/tests/tests/layers/Test_Layer_Zoneout.cpp
C++
cpp
11,484
permissive
// Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation the rights to use,...
6e9563896df860607a819534772d9a412feeba38
aa957803f2a7698d43c8e6cb3717108eb38416e5
ExpertSeahorse/DataStructuresProject
/Graph.cpp
C++
cpp
6,395
no_license
#include <algorithm> #include <map> #include <limits> #include <utility> #include <stack> #include "Graph.hpp" void Graph::addVertex(std::string label){ //If there is a vertex with label already, throw. Else add a new vertex auto i = findVertex(label); if (i != vertices.end()) throw 1; size...
7e9339d81fa2202942d572165b53dedc9cfdaec1
3552b49b2c95b28ceac75c4d38d6c4b7940b802e
JosephDao/student-database
/GUI/login/main.cpp
C++
cpp
277
no_license
#include <QtWidgets/QApplication> #include "login.h" #include "student.h" #include "admin.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); Login *window = new Login; if (!window->createConnection()) return 1; window->show(); return app.exec(); }
b97cc574745d5a943c8e133c6b76e21d7aca4383
559d3f9075d30f8706dbb9fb6b88763b867d6a96
HyangRim/Algorithm_Back
/15965.cpp
C++
cpp
558
no_license
#include <iostream> #include <algorithm> #include <utility> #include <queue> #include <cmath> using namespace std; int numa = 7500001; bool prime[7500001]; int main() { int K; cin >> K; memset(prime, 1, sizeof(prime)); prime[0] = prime[1] = true; int sqrtx = int(sqrt(numa)); for (int x = 2; x...
41527c3b39305cd4f5e33246b35c8af2a4e612df
db18648caf517ba6bf81c2c8db7de23963d6c2ae
LinkItONEDevGroup/LASS
/WaterBox/firmware/library/ArduinoJson/test/Misc/StringTraits.cpp
C++
cpp
585
permissive
// ArduinoJson - arduinojson.org // Copyright Benoit Blanchon 2014-2018 // MIT License #include <ArduinoJson.h> #include <catch.hpp> using namespace ArduinoJson::Internals; template <typename String> bool should_duplicate() { return StringTraits<String>::should_duplicate; } TEST_CASE("StringTraits") { SECTION("...
13a8b7ecc20e84db4dc4de84b2d942cd388b0eea
dc7731bfc83dadcc6d94ca31f3bcc2eeee225613
yarpryvalikhin/sdl_core
/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/alert_request_test.cc
C++
cc
28,694
permissive
/* * Copyright (c) 2018, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of condit...
3b9bdfa1a323da5c708366407b5b0a28766565c1
196e851faa8214a96d6596edb311404fb404cbf4
mfontanini/libtins
/src/dhcpv6.cpp
C++
cpp
20,625
permissive
/* * Copyright (c) 2017, Matias Fontanini * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of ...
a27bff05fa41e76278eac20b4f98311b7e35d50c
4b11439f5a0741061f538578ac0df1d688ce438a
mauzus/progenitor
/pcsx2-rr/plugins/zzogl-pg/opengl/ZZoglFlush.cpp
C++
cpp
79,938
no_license
/* ZZ Open GL graphics plugin * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 * * 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 Softw...
9ba745cb652aa105a47e59ac4e27f4e123e18b76
a9921e326094b7dbf7e61e1bb8ee1a3cc3309770
anjali0508/ADABMSCE
/LabTest/FirstLastCount.cpp
C++
cpp
1,023
no_license
#include<iostream> using namespace std; int firstOccurence(int arr[], int low, int high, int x){ int mid; while(low<=high){ mid = (low+high)/2; //cout<<mid<<endl; if((arr[mid]==x && arr[mid-1]<x)){ return mid; } else if(arr[mid]<x){ low=...
94b360bd262763b789c2749a7a7503f746dfb07b
61528470d1b960d6bc662457ebfca90875a71347
lattic/LaserLine
/LaserLine/LaserLine/main.cpp
C++
cpp
264
no_license
#include "stdafx.h" #include "LaserLine.h" #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); LaserLine w; w.setWindowState(Qt::WindowMaximized);//´°¿Ú×î´ó»¯ w.show(); return a.exec(); }
377a471a9e85ac8a68e0ba050010628960264424
e2a3657fffe92b5d4ee19c682079acef9a8d4922
cryzlasm/UnrealEngineSDKGenerator
/Target/Unreal2/GenericTypes.cpp
C++
cpp
15,484
permissive
#include "IGenerator.hpp" #include "GenericTypes.hpp" #include "ObjectsStore.hpp" #include "NamesStore.hpp" #include "NameValidator.hpp" #include "EngineClasses.hpp" //--------------------------------------------------------------------------- //UEObject //-------------------------------------------------------------...
67546f02f5792585e98e1e902ca3763d38bd99fe
3708613729c793f8c46cbf6bf09d74e2cc8949b1
doru1004/onnx-mlir
/src/Conversion/SeqToMemref/KrnlSeqStore.cpp
C++
cpp
2,622
permissive
/* * SPDX-License-Identifier: Apache-2.0 */ //===------ KrnlSeqStore.cpp - Lower KrnlSeqStoreOp ----------------------===// // // Copyright 2019-2022 The IBM Research Authors. // // ============================================================================= // // This file lowers the KrnlSeqStoreOp operator. // //=...
9e0e0d18a9afbc9fb31f1aac1393f84330f2d0fa
428cfd8b207ad6704b9b6e1fb7fb3c7871015892
Darkgrouptw/ComicProject
/2. Segmentation_CommandLine/CartoonTexture_Segment_Library/CartoonTextureFilter.cpp
C++
cpp
1,475
no_license
#include "CartoonTextureFilter.h" #include "LibCartoon.h" #include "..\..\Common\SystemParams.h" cv::Mat CartoonTextureFilter::DoSegmentation(cv::Mat img) { cv::Mat inpImg; img.convertTo(inpImg, CV_8UC1); int img_width = inpImg.cols; int img_height = inpImg.rows; double f_sigma = SystemParams::ct_f_sigma; doubl...
b2cc6f89d8049502c12cd505eb0dee014c68c502
5b58fa17d97b5e06194d26d52154598fd2a0ae87
freakdave/bounce
/src/bounce/collision/shapes/capsule_shape.cpp
C++
cpp
7,279
permissive
/* * Copyright (c) 2016-2019 Irlan Robson * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * including commercia...
23eef0a08aa24bced4aa5c80a902c295bd3e7902
89f5da92e5781a83734be1b00a07ee02a3a10c74
jwalker-depaul/Centipede_2017
/sprint_9/SoundManager.cpp
C++
cpp
3,081
no_license
#include "SoundManager.h" #include "activateSound.h" #include "deactivateSound.h" SoundManager* SoundManager::ptrInstance; void SoundManager::Initialize() { Instance().activateStrategy = new ActivateSound(); Instance().deactivateStrategy = new DeactivateSound(); Instance().prvtChooseStrategy(Instance().activateSt...
a1806fe507eabd5bcaa6e56eeeb22b7d0780310a
77323895c8e4a4c2d981282d7f82d189565e0c42
summer06/LeetCode
/66-PlusOne/66-PlusOne/Solution.cpp
C++
cpp
1,050
no_license
// // Solution.cpp // 66-PlusOne // // Created by 邓夏君 on 04/09/2018. // Copyright © 2018 Summer. All rights reserved. // #include "Solution.hpp" #include <vector> using namespace std; vector<int> Solution::plusOne(vector<int>& digits) { int n = digits.size(); int add = 0; //个位单独考虑,中间位置考虑前面是否有进位,第一位也要单...
e22b9593d599382b76e4c2f4b05b618d6466120d
f76d24e014c3726154da2d9ab9b663cdc3d2d3b1
eshlykov/junk
/school-31/coding/mccme.ru/1991.cpp
C++
cpp
1,233
no_license
#include <fstream> #include <iostream> #include <vector> using namespace std; ifstream fin("input.txt"); ofstream fout("output.txt"); vector< vector<int> > G, Gt; vector<bool> used; vector<int> scc, sorted; void G_dfs_visit(int s) { used[s] = true; for (int i = 0; i < (int)G[s].size(); ++i) { int v = G[s][i]; ...
62bb147ee638c7039f27c3e88a4dd992a219c0fc
29217094648d978b9d1f9f27adf74acfe69d3ad6
casterbn/Qt_project
/006-All_Test_Demo/000-vital/000-sodimas_notice/000-code/SOD_DISPLAY-old/BST_IDE/mdp/physical/physicalelevator.cpp
C++
cpp
83,197
no_license
#include "physicalelevator.h" #include "deviceinc.h" #include "physicallcd.h" #include "physicalnet.h" #include "logicthememanager.h" #ifdef SUPPORT_SCENE #include "graphicsmedia.h" #elif SUPPORT_WIDGET #include "widgetmedia.h" #endif ElevatorTestcaseParse::ElevatorTestcaseParse(QString pFile) : QObjec...
20f6b86daf1a31f09a805338f339acc7f07c518e
e73e5b4ee03bfaf0114197955e9191f326588f51
pawmsf/measurement-kit
/test/common/var.cpp
C++
cpp
3,977
permissive
// Part of measurement-kit <https://measurement-kit.github.io/>. // Measurement-kit is free software. See AUTHORS and LICENSE for more // information on the copying conditions. #define CATCH_CONFIG_MAIN #include "private/ext/catch.hpp" #include <measurement_kit/common.hpp> using namespace mk; class Foo { public: ...
8059dcc0411f3de26f7688cee848b73951221d29
e8009bc21dc229087938c00342d6026abfbebddd
MeetFlash/Image-in-painting
/Gui/GeneratedFiles/qrc_InpaintGui.cpp
C++
cpp
158,837
no_license
/**************************************************************************** ** Resource object code ** ** Created by: The Resource Compiler for Qt version 5.9.2 ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ static const unsig...
fea5b30435fe3e6b7e7f5e745be34b512b5adb73
19a8f974a8a27eb534f72668a6ef98c1f33012cf
mnrn/xxx-coder
/abc044_b.cc
C++
cc
909
permissive
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i < int(b); ++i) #define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i) #define REP(i, n) FOR(i, 0, n) #define REP1(i, n) FOR(i, 1, int(n) + 1) #define RREP(i, n) RFOR(i, 0, n) #define RREP1(i, n) RFOR(i, 1, int(n) + 1) #def...
c708a43879bb123cac381044f2802f40b9521293
b81a8b487f3869515d5ac8d78776b58ab2e00bf8
fcccode/vt5
/comps/docs/OleClient/IAdvSink.Cpp
C++
cpp
1,247
no_license
#include "stdafx.h" #include "AXDocSite.h" /* * Unused members in CImpIAdviseSink * OnDataChange * OnViewChange * OnRename * OnSave */ STDMETHODIMP_(void) CAxDocSite::OnDataChange(LPFORMATETC pFEIn , LPSTGMEDIUM pSTM) { return; } STDMETHODIMP_(void) CAxDocSite::OnViewChange(DWORD dwAspect ...
18b274838501fd650d336e62ac4c737ac3703d41
1b5e4d82aa1a7f4058580ff10c68d289eba042a4
bryandsmith/CustomList
/unit3-4Prog.cpp
C++
cpp
621
no_license
// Written by Bryan Smith // #include <iostream> // Relative paths to d_random and d_vector files. These are required for program to run. #include "..\..\..\..\Downloads\d_random.h" #include "C:\Users\Owner\Downloads\d_vector.h" #include <vector> using namespace std; int main() { miniVector<int> v; random...