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
aace0130e1c5c8485491bd1fcbd62d1af6c0791f
f23f7c59ee3401710d50976573a8379ce92c59ae
qiuzijian7/UnrealEnginePython
/Source/UnrealEnginePython/Private/UEPyEditor.cpp
C++
cpp
68,634
permissive
#include "UEPyEditor.h" #if WITH_EDITOR #include "Developer/AssetTools/Public/AssetToolsModule.h" #include "Editor/UnrealEd/Classes/Factories/Factory.h" #include "Runtime/AssetRegistry/Public/AssetRegistryModule.h" #include "Kismet2/KismetEditorUtilities.h" #include "Editor/ContentBrowser/Public/ContentBrowserModule...
feb642640261ea95e80237488e02b2fbf6f361cf
34e2504916ecf147258252de95e675106221545f
google-code/ar-battle-bots
/ARBB/ARBB/faceCam.cpp
C++
cpp
1,504
no_license
#include "faceCam.h" using namespace cv; CvCapture* capture = cvCaptureFromCAM(0); GLuint faceTexture = 0; int loadTexture_Ipl(IplImage *image, GLuint *text) { if (image==NULL) return -1; glGenTextures(1, text); glBindTexture( GL_TEXTURE_2D, *text ); //bind the texture to it's array glTexParamet...
9218a231731db5efaecd3446409fe70d9a873fa4
5803004e26a174c6f621e94d36476800390a6c6a
LoneHandyman/Final-Proyect-Redes
/src/Network/RDTSocket.cpp
C++
cpp
8,651
no_license
#include "Network/RDTSocket.hpp" #include "Network/Algorithm/sha256.hpp" #include "App/Tools/Fixer.hpp" #include <iomanip> #include <math.h> // vea el siguiente link: https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average float rdt::RDTSocket::RTTEstimator::EWMA(float constant, float firstTerm, float...
9e0f61ddde9d51cf0478bbe8f33fb822ccc2143b
1016d4b9e3193d2a14f72413c2123598f39d2cb2
lavandalia/C
/Interclasarea a doua liste.CPP
C++
cpp
1,571
no_license
/* Interclasarea */ #include <stdio.h> #include <conio.h> #include <alloc.h> #include <values.h> #include <stdlib.h> #include <string.h> struct lista { int k; struct lista *next; }; struct lista *add(int k,struct lista *l); void print(struct lista *l); struct lista *interclass(struct lista *x,struct lista *y); s...
f1c690390daeba9fa4f92a03bdf59063775ef1df
8b2e51e76a75c8b7d7c13e7a9ba65b0590c40615
webosce/chromium53
/src/v8/src/compilation-cache.cc
C++
cc
13,479
permissive
// Copyright 2011 the V8 project 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 "src/compilation-cache.h" #include "src/counters.h" #include "src/factory.h" #include "src/globals.h" #include "src/objects-inl.h" namespace ...
3ebd365f9202bf56eba210186f73d4756e02bd08
2f2318a23a130c865acf59662ac6fa6ba2eab639
liuxueyang/liuxueyang.github.io
/assets/src/ybt/language_basics/1132.cpp
C++
cpp
2,391
no_license
// ================================================== // C library #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> // Containers #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <set> #include <map> // Input/Out...
4f03d9cc8748c2f943622a5d5b55e4d578a1f839
984d98af7ea18cc9cd2d875d4945046138d6f895
YoYoLikesCiCi/PAT-
/13b02.cpp
C++
cpp
1,611
no_license
/* * 标题: 马虎的算式 小明是个急性子,上小学的时候经常把老师写在黑板上的题目抄错了。 有一次,老师出的题目是:36 x 495 = ? 他却给抄成了:396 x 45 = ? 但结果却很戏剧性,他的答案竟然是对的!! 因为 36 * 495 = 396 * 45 = 17820 类似这样的巧合情况可能还有很多,比如:27 * 594 = 297 * 54 假设 a b c d e 代表1~9不同的5个数字(注意是各不相同的数字,且不含0) 能满足形如: ab * cde = adb * ce 这样的算式一共有多少种呢? 请你利用计算机的优...
143678a80bbf47274e3c4fa4add8ecd48499ba14
08f41ba9b9910d82e1554d80d1ae1f9eae95ff4f
alanyee/redex
/tools/debug-info/linemapdump.cpp
C++
cpp
807
permissive
/** * Copyright (c) 2016-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. */ #include <...
23e0b4a04b13cd875dc474f0efb9a40a3e591971
928dde0bff34d6db6fa136db0fd5ada85f72849a
agileluo/c--_learn
/chapter4/4.21.newStruct.cpp
C++
cpp
452
no_license
#include <iostream> struct inflatable { char name[20]; float volume; double price; }; int main() { using namespace std; inflatable* p = new inflatable; cout << "Enter the name: " ; cin >> p->name; cout << "Enter the volume: " ; cin >> (*p).volume; cout << "Enter the price: " ; cin >> (*p).price; cout ...
1e764e75308f146594192b13f1b352676281226b
451f4dae7d7ac50f7f6500e3b069bc886e039ea0
opencor/llvmclang
/test/tools/llvm-cov/showHighlightedRanges.cpp
C++
cpp
1,847
permissive
// RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -dump -path-equivalence=/tmp,%S %s 2>&1 | FileCheck %s -check-prefixes=SHARED void func() { return; int i = 0; // SHARED: Highlighted line [[@LINE]], 3 -> } ...
53e55ce4c31e8e50bbd49f335426261f36101650
feaa0fb6a58c30913f6f27f35fff115f1724d2e7
kitaisreal/llvm-project
/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
C++
cpp
11,168
permissive
//===--------- JITLinkGeneric.cpp - Generic JIT linker 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 // //===---------------------------...
1f3358c1c9186d1d95480ee1d8f16be898a15747
d18ca6ae8593f66556c950c89373ffc98e8c1517
li-xiao-nan/mediakit
/third_party/platform/timer_unittest.cpp
C++
cpp
711
no_license
#include "Timer.h" #include "CurrentTime.h" #include <iostream> #include <unistd.h> #include <stdio.h> using namespace std; using namespace timer; class TimerTest{ public: TimerTest(); void fireFunc(Timer<TimerTest> *timer); void addTimers(double t); private: Timer<TimerTest> _timer; }; TimerTest::TimerTes...
1337b64834980c5b6b8f34d7a3e0ba6898e8ff0a
c3075dbc49c45d67796a14e87c5a979964ce3538
osrf/opensplice
/src/api/dcps/isocpp2/include/dds/sub/TRank.hpp
C++
hpp
5,105
permissive
/* Copyright 2010, Object Management Group, Inc. * Copyright 2010, PrismTech, Corp. * Copyright 2010, Real-Time Innovations, 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 L...
7cce7a86778b73cff3e63afe5d34f07c1002a0f7
47285c1ff73d96230f1e3dcd185c59372a902236
amit-mittal/Programming-Questions-Practice
/c,c++/spoj/spoj_pigbank2.cpp
C++
cpp
1,405
no_license
#include <iostream> #include <cstdio> #include <stdlib.h> #define MAX 1000000009 #define LIM 10001 using namespace std; /* int func(int a[][2], int w, int i, int value){ int ans, amount; if(w==0) return value; if(i<0 || w<0) return MAX; amount = w/a[i][1]; ans = min( func(a, w, i-1, value), func(a, w - ...
9c3dfa0072c79a610d873e4681b183012e5defd9
f8e47868e1d0d99ed54092a27c915aa41f0d8306
ACLoong/LeetCode
/src/088-Merge-Sorted-Array/088_merge_sorted_array.cpp
C++
cpp
480
no_license
class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int index_nums1 = m - 1; int index_nums2 = n - 1; int icur = m + n - 1; while (index_nums1 >= 0 && index_nums2 >= 0) { nums1[icur--] = (nums1[index_nums1] >= nums2[index_nums2] ? ...
8b507e9e7e7507c0c9b18c6e9438c8f9d723e407
def74a0883b6e1faea7101401e879695b015418f
denis-gubar/Leetcode
/Sorting/2160. Minimum Sum of Four Digit Number After Splitting Digits.cpp
C++
cpp
489
no_license
class Solution { public: int minimumSum(int num) { int result = num; string s = to_string(num); sort(s.begin(), s.end()); int N = s.size(); do { int current = 0; for (int i = 1; i < N; ++i) { int x = stoi(s.substr(0,...
d2aad320261820beb365e60b700ba9789233026f
070da43ff63da19cff8fd832e9ee867ed735822b
crypTuron/PengolinCoin-Core
/src/qt/pengolincoin/settings/settingssignmessagewidgets.cpp
C++
cpp
12,182
permissive
// Copyright (c) 2019 The PENGOLINCOIN developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qt/pengolincoin/settings/settingssignmessagewidgets.h" #include "qt/pengolincoin/settings/forms/ui_settingssignmessagewi...
f554a7e67dd7d127ed10d7b41ffae3b723af05b3
e36d4e6232ffe5f4f32bfce826412de22753a970
KodOtBoga/practice
/day3/113.cpp
C++
cpp
225
no_license
#include <iostream> using namespace std; int main() { for (int i = 0; i < 20; i++) { for (int j = 0; j < 10; j++) { if (i % 2 == 0) cout << i << ' '; else cout << 1 << ' '; } cout << endl; } return 0; }
06e37851adf3ae3c6c60632df41d00decc11752b
07a3fd022f75acd8203b6e854280e52bf04ffe4d
dashishi/lowpoly_interactive_system
/code/Lowpoly/Lowpoly/SLIC.cpp
C++
cpp
36,545
no_license
// SLIC.cpp: implementation of the SLIC class. // // Copyright (C) Radhakrishna Achanta 2012 // All rights reserved // Email: firstname.lastname@epfl.ch #include "stdafx.h" #include <cfloat> #include <cmath> #include <iostream> #include <fstream> #include "SLIC.h" // Construction/Destruction SLIC::SLIC() { m_lvec =...
b43248c7637ecfafb63263a94c66e7fe7c081b90
564355980029875b42b15f37e602c5608f2c40a9
TakashiNakagawa/CarND-Extended-Kalman-Filter-Project
/src/kalman_filter.cpp
C++
cpp
2,134
no_license
#define _USE_MATH_DEFINES #include <cmath> #include <iostream> #include "kalman_filter.h" using Eigen::MatrixXd; using Eigen::VectorXd; namespace { double NormalizeAngle(double angle) { return fmod(angle + M_PI, 2*M_PI) - M_PI; } void UpdateXP(const MatrixXd& H, const MatrixXd& R, const VectorXd& y, ...
2276ed6ec6714ffd96a9c7c00b3c14079c2768c4
7740ddb410fb82c29ce266e28605c7edba9803a4
lukemayor15/DPhoenix-3D-Game-Engine
/DPhoenixEngine/MeshGeometry.cpp
C++
cpp
1,342
no_license
#include "D3DUtil.h" DPhoenix::MeshGeometry::MeshGeometry() : mVB(0), mIB(0), mIndexBufferFormat(DXGI_FORMAT_R16_UINT), mVertexStride(0) { } //release memory DPhoenix::MeshGeometry::~MeshGeometry() { ReleaseCOM(mVB); ReleaseCOM(mIB); } //construct for index buffer void DPhoenix::MeshGeometry::SetIndices(ID3D11Dev...
8ca0efe8c6856443798593ebec17e9ed41887a1c
d5ee9a2222fca1242a8046744173fd18e3bcec4d
ccdxc/logSurvey
/data/crawl/squid/hunk_3293.cpp
C++
cpp
338
no_license
debug("Trying to validate; %s %s\n", username, password); if (Valid_User(username, password, NTGroup) == NTV_NO_ERROR) - puts("OK"); + SEND_OK(""); else - printf("ERR %s\n", errormsg); -error: + SEND_ERR(errormsg); err = 0; fflus...
a07524871a6f3bc73af4da8c361cd438c6a9d3bb
d783a7865a93a6af2dc20411005bca61f37259c0
fjiaqi/pylith
/libsrc/pylith/fekernels/fekernelsfwd.hh
C++
hh
2,307
permissive
// -*- C++ -*- // // ====================================================================== // // Brad T. Aagaard, U.S. Geological Survey // Charles A. Williams, GNS Science // Matthew G. Knepley, University at Buffalo // // This code was developed as part of the Computational Infrastructure // for Geodynamics (http://...
92c70955bc3e76ab4719e6b1a7b4b56f8198f377
f441a52061f71e0003f17657ab81fd49ab7e7078
Deepbody-me/deepvariant
/third_party/nucleus/io/vcf_conversion.cc
C++
cc
44,030
permissive
/* * Copyright 2018 Google 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 following disc...
967b5764a8a8005d26d249e6430aafa14c21d69d
5af7260b114a6687486e26301fdceaa50acb3877
antmicro/tui-selector
/src/tui-menu.hpp
C++
hpp
2,926
permissive
#pragma once #include <vector> #include <string> #include <memory> #include <ncurses.h> #include <menu.h> /** * A wrapper for non-standard destructors for unique_ptr */ template <typename T, int delfunc(T *)> struct Destroy { void operator()(T *obj) { if (obj) delfunc(obj); } }; /** * Runs al...
309b0997244aafffc0cdda10f56f1f81b027e22d
03c473628081ae4704a4b2f894272aedfe06a5c4
iridium-browser/iridium-browser
/v8/src/heap/scavenger.cc
C++
cc
34,321
permissive
// Copyright 2015 the V8 project 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 "src/heap/scavenger.h" #include "src/common/globals.h" #include "src/handles/global-handles.h" #include "src/heap/array-buffer-sweeper.h" #inc...
55cd342449890ef1c4a6e5a8002ead7eb0395bbe
b45785e123b3518ee03437dc11c25379ffefead5
google-code/atf2flightsim
/ATF2/control-software/epics-3.14.8/extensions/src/ChannelArchiver/ThirdParty/xerces-c-src2_4_0/src/xercesc/dom/DOMRangeException.hpp
C++
hpp
5,686
permissive
#ifndef DOMRangeException_HEADER_GUARD_ #define DOMRangeException_HEADER_GUARD_ /* * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted p...
63390f13443e2883c43811d7c5a09f517852cc6c
f56a49ce051bafb68615707482059065ae13accf
fzcoin/frozencoin
/src/qt/bitcoinstrings.cpp
C++
cpp
13,446
permissive
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *bitcoin_strings[] = { QT_TRANSLATE_NOOP("frozen-core", "" "%s, you must set a rpcpassword in the configuration file:\n" "%s\n" "It is recommen...
de7dc7f3dc2f65246f83ac1841e2bd439f5e01eb
178d44898b5c0e5d4d821cf06fe9b88b31eaf4d1
TheJonBovi/CST126SRS03
/CST126SRS03/preserve.cpp
C++
cpp
4,046
permissive
#include "stdafx.h" #include <cassert> #include "gps.h" #include "loxodonta.h" #include "preserve.h" Preserve::Preserve(): feature_ { { Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock, Feature::kRock }, { Feat...
e1a92b903e0258201ce932952204d86350b8622b
5e149c5e3bcbdb4a9b234c266ea5ca5543d858db
KwamiLabs/LABS
/src/qt/Sombe/receivedialog.cpp
C++
cpp
2,325
permissive
//Copyright (c) 2019 The PIVX developers //Copyright (c) 2020 The Sombe developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qt/Sombe/receivedialog.h" #include "qt/Sombe/forms/ui_receivedialog.h" #include "qt/Som...
e9a863d96b1a3d277b9410dbcc99b0de6a8b450d
52ab5ae3455a5226c16955891ff8be00a5cd3d1c
ncuoolab/domjudge
/submissions/c2.s1105.ncu100502027.ProblemB.cpp.0.ch2.cpp
C++
cpp
4,206
no_license
#include<iostream> #include<string> using namespace std; int doerror=0,numbers=0; string result[7]= {}; void Dostring(string tring) { if((tring[0]>=97&&tring[0]<=122)||(tring[0]>=65&&tring[0]<=90)||(tring[0]>=48&&tring[0]<=57)) { int Noerror=0; for(int t=1; t<tring.length(); t++) ...
cf826be115c40b40adf80d021351e0555f97f878
540983856f369c3f7f3d38bbb68230f0f091906c
sailfish009/binding_affinity_calculator
/lib/rosetta/source/src/protocols/rosetta_scripts/PosePropertyReporterCreator.hh
C++
hh
1,895
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...
d7f20046bbbc9a2f2ae2a28ef84981ffe1d0b6f1
6e94ac78ad2fb0b087e5922cd3b873a083cd9abe
MPiotr/slowwavedevice
/src/utilities/datarow.cpp
C++
cpp
267
no_license
#include "datarow.h" bool operator< (const DataRow & x, const DataRow &y) { if (x.key() == y.key()) return x.val() < y.val(); else return x.key() < y.key(); } ostream & operator << (ostream &str, const DataRow & row) { str << row.serialize(); return str; }
8a805feaf5879a6259db853dd4ad32d4d674c85f
96255321c2b4de11d1acd585df18f611f00c8c64
s-haffar/hiphop-php
/hphp/runtime/vm/translator/hopt/jumpsopts.cpp
C++
cpp
6,684
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) | +---------...
73081c8bcf633c0f7b195ba758628b7cd5404d63
ff93f700f48ebaa0ebda65a2ca686ac7455c9561
Nelsontw/chromium
/ash/quick_answers/quick_answers_controller_impl.cc
C++
cc
5,546
permissive
// Copyright 2020 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 "ash/quick_answers/quick_answers_controller_impl.h" #include "ash/public/cpp/new_window_delegate.h" #include "ash/quick_answers/quick_answers_ui...
85c2c831c68ba4b58ad0f79acb67bdda0c8406d4
68e0fdd6815703b85aebb215385551222055e6d3
wilson-ben/ITKExamples
/src/Filtering/ImageGrid/RunImageFilterOnRegionOfImage/Code.cxx
C++
cxx
3,584
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
6e84693515e93ce0d6d2b6b31f58b353482c6b21
8448f222e0c71f8fa3085e8a3f2c0d43c35f3d1e
ThisPerson23/CompProject
/SFML/Projectile.cpp
C++
cpp
3,153
no_license
/** * @file * @author * Justin Lange 2018 * @version 1.0 * * * @section DESCRIPTION * Projectile class * * * * * @section LICENSE * * * Copyright 2018 * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice an...
be8cfca726f0309169d4faa2d65532f9a2d5f99e
8a6375d215f4f2b8f234dad7ecaf59946c5f232b
mannmann2/X-Code
/Q/Q/Q.cpp
C++
cpp
1,557
no_license
#include <iostream> #define MAXSIZE 50 using namespace std; class Queue { int arr[MAXSIZE]; int front, rear; public: Queue() { front=0; rear=-1; } int isFull(); int isEmpty(); void enQ(int x); int deQ(); void display(); } p; int Queue::isFull() { if(rea...
4b0e5a1e18edccfbce071f2c956d1dc103249496
cef81605ae0b7008424b2d5d22e17875e97c3c97
MahmudulHasanBayzid/codforces_solved_problem
/Playing with Dice.cpp
C++
cpp
304
no_license
#include<bits/stdc++.h> using namespace std; int main() { int a,b,x=0,y=0,z=0,i; cin>>a>>b; for(i=1;i<7;i++){ if(abs(a-i)<abs(b-i)) x++; else if(abs(a-i)>abs(b-i)) y++; else z++; } cout<<x<<" "<<z<<" "<<y; }
489d0f62a6f3eab97aecb1f49144e7a11daf5470
9478c1e49f71b0c3d691febd85efb13c4c0fbba9
phenixwutao/DemoProjects
/STL_2nd/006typetraits.cpp
C++
cpp
740
no_license
#include <iostream> #include <vector> #include <deque> #include <list> #include <map> #include <set> #include <memory> // smart pointers #include <thread> #include <mutex> #include <condition_variable> #include <atomic> #include <future> #include <climits> // old number limit #include <cfloat> // ...
6f01429e6accc1f8fea6cbbe312c4852d4c6f63f
9757b6c37ea9aaa6dc315b2fb5e6edf9ba6cfd58
annadanh/2143-OOP-Danh
/assignments/A04/main.cpp
C++
cpp
1,848
no_license
/** * Anna Danh * Course: CMPS 2143 - OOP * * Purpose: add int frameCount and int frameRate as data members in * gameOfLife class and use them to control how often the board gets * drawn. * * @version 1.1 10/5/2018 * @github repo: https://github.com/annadanh/2143-oop-danh */ #include <SFML/Gra...
87b6075febcb5e7636f903d0d7a4c1184bfb9a0f
89a771fefd27ecdce3b65c187b3091d737da8086
SergeyDjam/microem-rfid-linux
/scanner/Transfer_unix.cpp
C++
cpp
16,676
no_license
// Transfer.cpp: implementation of the CTransfer class. // ////////////////////////////////////////////////////////////////////// #include "Transfer_unix.h" #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <termios.h> #...
7ffa124cc73c057b10e53e7624e82ddccfec8eb1
36391033e13472ae3447dfdb4a80d7781e4fca4f
siweisun/MILP_conditional_cube_attack
/Test_on_6round_Keccak_MAC_512_rightkey.cpp
C++
cpp
14,819
no_license
/* Test_on_6round_Keccak_MAC_512_rightkey.cpp Test whether the cube sum with the right key guess is zero or not. The program is run in Visual Studio 2010 with x64 platform Release. One experiment averagely takes 76 minutes with this procedure. */ #include <stdio.h> #include <conio.h> #include <string.h> ...
26a3c99e78bbe68dac5bfe60f02c1b9c145e87e6
ef3fcdf590e97f796ddc452fc01b4de6d829ca6f
Suryansh555/ARTH-Daily-Code
/SwastikaPattern.cpp
C++
cpp
1,014
no_license
#include <bits/stdc++.h> using namespace std; void swastika(int row, int col) { for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { if (i < row / 2) { if (j < col / 2) { if (j == 0) cout << "*"; ...
d86fc13f38a06afa72738fa8f842a7d6bfffecc2
b86ff65c8be19c94d22a676323cdd624a4ad0552
revery-ui/esy-skia
/tests/PathOpsThreeWayTest.cpp
C++
cpp
2,849
permissive
/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "PathOpsTestCommon.h" #include "SkIntersections.h" #include "SkTDArray.h" #include "Test.h" // check intersections for consistency struct Curve { int ptCount; ...
0867f91a0f9d37cec1c8688dc405d68385c2cee2
a125e4ac1187ba8fe91b1b059784b0232f149e39
SanD94/USACO
/dualpal/dualpal.cpp
C++
cpp
812
no_license
/* ID: safaand1 PROG: dualpal LANG: C++11 */ #include <iostream> #include <fstream> #include <string> using namespace std; ifstream fin("dualpal.in"); ofstream fout("dualpal.out"); int N,S; char nums[] = "0123456789"; bool pal(string a){ int sze = a.length(); for(int i=0;i<sze;i++) if(a[i]!=a[sze-...
07e2d3407554515adf555d2957a6f6841c7403a4
d924964c6e1f92ff5f64dd672242b37d722a2b7a
jubayerislam17/190041129-CSE-4302
/Lab 10/129_Task1.cpp
C++
cpp
1,000
no_license
#include <bits/stdc++.h> using namespace std; class Database { protected: string name, id, type; public: Database(string Name,string iD): name(Name),id(iD) {} virtual void details() = 0; virtual void set_ID() { id = id; } }; class Accountant : public Database { public: Accoun...
a6174fa96a1a16d7e64658cc84b1d7035fc94578
68aec707b3909d39ee81454908f6f6d22075f0e8
moononcloud/cpp-primer-4th-edition-exercises-keys
/cpp primer fourth ex/chapter_9/ex_9_15/main.cpp
C++
cpp
420
no_license
#include <iostream> #include <list> #include <string> using std::string;using std::list; using std::cin;using std::cout;using std::endl; int main() { string str; list<string> lst; cout<<"请输入字符串:"<<endl; while(cin>>str) { lst.push_back(str); } cout<<"打印字符串:"<<endl; for(list<string>::const_iterator vit=lst.be...
8830d7911eafed2e0dbb892a7629e1b2a78152b6
8512cf690df787c42e28b2fd7c46829ec435dd60
lineCode/cheerp-llvm
/lib/Transforms/Instrumentation/AddressSanitizer.cpp
C++
cpp
133,516
permissive
//===- AddressSanitizer.cpp - memory error detector -----------------------===// // // 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 // //===---------------------------...
d3659fa594515b98fe6ea66b3ca0ebc57d126f0f
c57db1ceba6780fc8ade6d3f7acacf3322a4a861
Qinxin-Yan/USTC_CG-1
/Homeworks/4_MinSurfMeshPara/project/src/UI/Attribute.cpp
C++
cpp
30,030
permissive
#include <UI/Attribute.h> #include <UI/Grid.h> #include <Engine/MeshEdit/Glue.h> #include <Engine/MeshEdit/MinSurf.h> #include <Engine/MeshEdit/Paramaterize.h> #include <Engine/MeshEdit/par_freebound.h> //#include <Engine/MeshEdit/Par_ARAP.h> #include <Engine/MeshEdit/IsotropicRemeshing.h> #include <Engine/MeshEdit/...
c9ddda1e1e78eb702e18e695aa438d215bd8575a
9cc108be7a3d5fcf8f161a3b96435028d7d0f284
rob-c/RapidFit
/framework/src/XMLTag.cpp
C++
cpp
12,017
no_license
/** @class XMLTag A class used to parse an xml config file. Represents a single xml tag and its contents. @author Benjamin M Wynne bwynne@cern.ch @date 2009-10-02 */ #include "TF1.h" // RapidFit Headers #include "XMLTag.h" #include "StringProcessing.h" // System Headers #include <iostream> #include <stdlib...
e26700b8eb3277b14a7378e961a1869b6a808e61
0b6961f764356f4a8d38cf1f168388e138193060
KevinMathewT/Competitive-Programming
/Inequality Reduction.cpp
C++
cpp
1,312
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double ld; #define F first #define S second template<class T> ostream& operator<<(ostream &os, vector<T> V) { os << "[ "; for(auto v : V) os << v << " "; os << "]"; return os; } template<class T> ostream& operator<<(ostream &os, s...
6347311a5a025db2d6f0bdfb7faaa8dabb7b764e
3f650fff1bcbe61c9a92225e87b9bbdba9a3d590
mashoujiang/openvino
/ngraph/frontend/onnx/onnx_import/src/op/depth_to_space.hpp
C++
hpp
1,059
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "ngraph/node.hpp" #include "onnx_import/core/node.hpp" namespace ngraph { namespace onnx_import { namespace op { namespace set_1 { /// \brief ...
04f9199796d4847999d9da144c75b16e667b2a84
0d36d4b8c39e41068f856c683793446b371b45d5
kyx0r/FA_Patcher
/boost_lib/boost/metaparse/token.hpp
C++
hpp
404
permissive
#ifndef BOOST_METAPARSE_TOKEN_HPP #define BOOST_METAPARSE_TOKEN_HPP // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <boost/metaparse/v...
c9c4b7c555e322dc94ba3803e62f07f67a37ef39
4eb2368d25ea95a30231998bdb3dc481fb645fca
md143rbh7f/competitions
/topcoder/tco/11/qual1/FoxListeningToMusic.cpp
C++
cpp
451
no_license
#include <vector> using namespace std; double p_end[80010]; struct FoxListeningToMusic { vector<double> getProbabilities( vector<int> len, int T ) { int n = len.size(); vector<double> ans(n); p_end[0] = 1; for( int t = 0; t < T; t++ ) for( int i = 0; i < n; i++ ) if( t+len[i] <= T ) p_end[t+len[i]] += p_en...
dd5b936be9e2f7fb15ff0f9dbd726732300e103b
72992ec903dac1d7493cf6ebd035ce3e389eb69f
boostorg/hana
/include/boost/hana/fwd/adapt_struct.hpp
C++
hpp
1,600
permissive
/*! @file Documents the `BOOST_HANA_ADAPT_STRUCT` macro. Copyright Louis Dionne 2013-2022 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_FWD_ADAPT_STRUCT_HPP #define BOOST_HANA_FWD_ADAPT_STRUCT_HPP #incl...
0383c600bc98aa914f844287512e0df0267bde28
5860eb3e41fd5a9ee662254dc62193c062e825ac
cristivlas/zerobugs
/zero_python/elf_header.cpp
C++
cpp
2,590
permissive
// ------------------------------------------------------------------------- // This file is part of ZeroBugs, Copyright (c) 2010 Cristian L. Vlasceanu // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // ------...
4edf255c4f315b35374bfedd79d8773642371c7e
810a462c2aa455bd0832b750b451ebdcd5d1734f
totalkyos/AWS
/aws-cpp-sdk-devicefarm/source/model/Test.cpp
C++
cpp
4,432
permissive
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file...
6638d2d242be5a8e1a03760409e9fac2316d87b4
19a927cc5cda97a2ca994a301569db4e4c9563dc
worldpaycoin/WPAY
/src/stakeinput.cpp
C++
cpp
8,410
permissive
// Copyright (c) 2017-2018 The ZillionFLUX developers // Copyright (c) 2018 The WPAY developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "accumulators.h" #include "chain.h" #include "primitives/deterministicmint....
1d209f4e3fb3aae31ab106479d0511c52c087f08
87da30bce50c63cdf65c2498f326da1fa1d9f302
tanxiaosysu/WindowsAPPandCocos2d
/HW10/Classes/AppDelegate.cpp
C++
cpp
3,557
no_license
#include "AppDelegate.h" #include "HelloWorldScene.h" USING_NS_CC; static cocos2d::Size designResolutionSize = cocos2d::Size(720, 480); static cocos2d::Size smallResolutionSize = cocos2d::Size(480, 320); static cocos2d::Size mediumResolutionSize = cocos2d::Size(1024, 768); static cocos2d::Size largeResolutionSize = c...
6d9323c620fe2241f0cdc9e999a35d61d39c3425
1872b04a6eb574581b7bf15ce555a8429e600e38
885225250/wusuoweidui
/draw/qwidgetdraw.cpp
C++
cpp
8,395
no_license
#include "qwidgetdraw.h" #include <QPainter> #include <QTimer> #include<QVBoxLayout> #define N sizeof(ecgWave)/sizeof(int) QWidgetDraw::QWidgetDraw(QWidget *parent, int type): QWidget(parent) { this->resize(1000, 800); this->map = new QPixmap(this->width(), this->height()); this->map->fill(Qt::black); ...
d78e0677d742956e1b2f6de70db81e8accd47eee
4e6d13b617c43cce98dad284f3e806492b9f99b5
mirodrig/codebank
/C++/Exercises/labs/Data_Structures/maps/studentTest.cpp
C++
cpp
4,398
no_license
#include <iostream> #include <map> #include "student.h" void printMsg(); int main(){ int input; // user input std::map<std::string, Student> stuList_; // map of student objects printMsg(); std::cin >> input; while(input != 7){ // modify data while not terminated if(input == 1){ // add stude...
327b286d66f7d2421df38ec263a7284fe11dc00d
7e8fe32a806500fef5f42e239e52eb5b542a048f
greathousee/School
/CSC 226 C++/greathousee-A13.cpp
C++
cpp
5,421
no_license
// Course: CSC 226 Introduction to Programming with C++ // Name: Eddie Greathouse // Assignment A13: <Put a brief sentence about your program here.> /* Answer to questions: <a. The program uses two classes because one class ensures random numbers while the other class only focuses on the dice. b. Having 2 clas...
67ac763166dca3763622e10c40d84b240a614952
08622ddfb52bf8c9b4e3f862a354d255050b2885
jwarton/N-Technium-Libs
/NT-Template/ntechnium/libNtechnium/Image/ntMosaic.cpp
C++
cpp
8,743
no_license
#include "ntMosaic.h" using namespace arma; using namespace std; using namespace af; ntMosaic::ntMosaic(){} ntMosaic::ntMosaic(std::string url_IMG, std::string path_Tiles): url_IMG(url_IMG), path_Tiles(path_Tiles) { t_LOAD = clock(); /// const char * file = url_IMG.c_str(); matrix = af::loadImage(file, false); ...
6eca94a8e0d14f29bec30325b5b5787a5b51bdd8
f8727777dcb8ad02336eb8a49559ef1e1b45a5c6
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_IndustrialCookingPot_parameters.hpp
C++
hpp
868
permissive
#pragma once // ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_IndustrialCookingPot_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //-------------------------------------------------...
39953bfbdb6757d289ad269a555a16279d318a6f
056dab37c9cc80a54692c2058d52d6fc5a05e075
RahulKushwaha/Algorithms
/CodeForces/546D - Soldier and Number Game.cc
C++
cc
1,317
no_license
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <sstream> #include <stack> #include <list> #include <unordered_map> #define SIZE 5000001 using namespace std; typedef long long ll; //dp = number of prime factors of a number. Not DISTINCT but all...
f5eb28cb185074fd31ae31cda47d9bf0db5bef4d
b7e9f5496b1c00ecdf14170ebb497b6c8645d1f0
siro0413/SGA3D
/UnitTest/Vertex/GridTest.cpp
C++
cpp
2,617
no_license
#include "stdafx.h" #include "GridTest.h" void GridTest::Initialize() { shader = new Shader(L"03_Grid.fx"); //정점의 개수 vertexCount = (width + 1) * (height + 1); vertices = new Vertex[vertexCount]; for (UINT z = 0; z <= height; z++) { for (UINT x = 0; x <= width; x++) { //각 그리드의 좌하단 인덱스 ...
1dc4a0d984540c8e2e4990889f8969af42286903
d071bd466ad42ce2bed8f378eec5e41835feb611
celestialxevermore/Three_Kingoms
/포로탈출확률.cpp
C++
cpp
629
no_license
/** 포로가 탈출할 확률을 계산합니다. @param person 포로 */ int PK_포로탈출확률(Person person) { //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // 부대 포로일 경우에도 탈출 /* Building building(person.getBuildingId()); if (!isalive(building)) return 0; */ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>...
ffe99bbabdcb0e6bbd39e1e89979c9d725ecd0a0
ce4da1b7165ec305d153ca8f12b6d72aaed02e54
NickSKim/csci321
/lectures/AI/Search/PathPlannerApp/PathPlannerApp.base/Src/PathPlannerApp.cpp
C++
cpp
15,539
no_license
// PathPlannerApp.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "PathPlannerApp.h" #include "PathPlannerBreadthFirst.h" #include "PathPlannerBestFirst.h" #include "PathPlannerDijkstra.h" #include "PathPlannerAStar.h" #include "PathPlannerAStarOptimized.h" #inclu...
725342cf4e927a65b28bbb0528e224456ebfb22c
9fcbb3c27d24f2c93d6ba22953362f34c67954c9
chaomengnan/aliyun-openapi-cpp-sdk
/green/src/model/UpgradeCdiBaseBagResult.cc
C++
cc
2,008
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
dadd9c44f2a189ea1978fbf2ad823930266e3a58
c1c165bc7f263ecbd3b5202e398e73c26ded84f5
gersseba/glow
/examples/adaptive-grid/main.cpp
C++
cpp
4,337
permissive
#include <GL/glew.h> #include <algorithm> #include <random> #include <cassert> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/transform.hpp> #include <glow/Error.h> #include <glow/Uniform.h> #include <glow/ShaderFile.h> #include <glow/Program.h> #include <glow/loggin...
a84ea16e875da153e5ad95b9fb6aa2ca0f82bd37
2b2abee14b28712104df75f7359c9bf236d13959
Vergir/protei-chat
/client/Client.cpp
C++
cpp
2,158
no_license
#include <cerrno> #include <cstring> #include <iostream> #include <stdexcept> #include "Client.hpp" namespace protei_chat { Client::Client (char* hostName, int portNumber) { if ((hostEntity=gethostbyname(hostName)) == NULL) throw std::runtime_error("Could not translate host"); if ((connectionSocket = socket(PF_INE...
8a4ba4fce5cd9be08645c230441be1798da712e2
f8b9ebe62bfc098fd6b3565763fe1615f44f7dbb
carla-simulator/map
/tools/map_maker/geometry/include/ad/map/maker/geometry/Polyline2d.hpp
C++
hpp
4,744
permissive
// ----------------- BEGIN LICENSE BLOCK --------------------------------- // // Copyright (C) 2018-2019 Intel Corporation // // SPDX-License-Identifier: MIT // // ----------------- END LICENSE BLOCK ----------------------------------- /** * @file */ #pragma once #include <vector> #include "ad/map/maker/geometry/Li...
b4d81ea011eb198abebeda06953cd199528562ed
b705adb1abfb03c454aeb5d7e8bed53677d4dba1
0xSombra/RED4ext.SDK
/include/RED4ext/Types/generated/game/ActionMoveToState.hpp
C++
hpp
726
permissive
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/REDhash.hpp> #include <RED4ext/Types/generated/Vector3.hpp> #include <RED4ext/Types/generated/game/ActionReplicatedState.hpp> namespace RED4ext { namespace game { struct ActionMo...
3cd812981cd2c85f5e9ff0593f82331af34a7654
dff3b0b933e696c036c85b112ede75258648639c
Vindition/reshade
/source/d3d12/d3d12_impl_command_list.cpp
C++
cpp
33,248
permissive
/* * Copyright (C) 2021 Patrick Mours. All rights reserved. * License: https://github.com/crosire/reshade#license */ #include "d3d12_impl_device.hpp" #include "d3d12_impl_command_list.hpp" #include "d3d12_impl_type_convert.hpp" #include <algorithm> void encode_pix3blob(UINT64(&pix3blob)[64], const char *label, con...
df9be82202ef15d449e00281095fa997f3420616
522d4752b1b3ad1f6795ea2d6643cab9b87770d5
FoxForge/OpenGL-3D-Ray-Tracer
/Source/TinyRay/TestApplication.cpp
C++
cpp
3,092
permissive
#include "TestApplication.h" #include "AppWindow.h" #include "Resource.h" #include <Windowsx.h> TestApplication* TestApplication::s_oglapp = NULL; TestApplication::TestApplication() { m_appwnd = NULL; m_hInst = 0; m_terminate = FALSE; } TestApplication::~TestApplication() { if ( m_appwnd ) delete m_appwnd; } ...
64376f83731d58876dd84e92e71eb94e8e982a76
ec8403671c778cfded16e160d5a2a25e8affd6c2
capt-hb/llvm-project
/llvm/tools/llvm-exegesis/lib/Latency.cpp
C++
cpp
8,160
permissive
//===-- Latency.cpp ---------------------------------------------*- C++ -*-===// // // 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 // //===---------------------------...
82edd74cacf03fdec764870bbb9894adf8205830
fd2e843700fe4c5df6d2eeca3d78592186913072
mahangm/hawk
/hawk/assets/framebuffer.hpp
C++
hpp
4,492
permissive
#ifndef HAWK_ASSETS_FRAMEBUFFER_H #define HAWK_ASSETS_FRAMEBUFFER_H // glad #include <glad/glad.h> // glm #include <glm/glm.hpp> namespace hawk { namespace Assets { /** * Frame buffer wrapper. */ class Framebuffer { public: /** * Attachment enum. */ enum Attachment { Color = 1 <<...
3f5953d6eecd7e7a3a6ae078dadcee08f207ad1c
43a245bab025e375c8d6fb5c6288015c31635245
ninthDevilHAUNSTER/UnrestrainedGamblingWithSurreptitiousLuna
/LeetCode/416. 分割等和子集.cpp
C++
cpp
2,186
no_license
// // Created by shaob on 2020/3/15. // #include <iostream> #include <cstdio> #include <map> #include <vector> #include <set> #include <string> #include <cstring> #include <vector> #include <stack> #include <algorithm> #include <cmath> #include <stack> #include <queue> #include <cassert> #include <cmath> #include <unor...
d8bf2650fa4fa468a1d8f2fbd3daaf637539f837
a1f0e43de0ec0860452fb6f678054a4c35c2c67b
cleancoindev/shadow-of-the-wyrm
/engine/calculators/source/DoorBreakageCalculator.cpp
C++
cpp
1,904
permissive
#include "DoorBreakageCalculator.hpp" const int DoorBreakageCalculator::DEFAULT_STR_BASE = 0; const int DoorBreakageCalculator::DEFAULT_STR_LOCK = 10; const int DoorBreakageCalculator::STR_INCR_DIVISOR = 1; DoorBreakageCalculator::DoorBreakageCalculator() : material_base_strength_values({{MaterialType::MATERIAL_TYPE_...
bd529c5bb8a7b295af2bc064e7511a3c6741ce5c
6fca6c79906b170ff0fa99dbd491f913fcba5649
mpoullet/NumCSE
/Assignments/Codes/SparseMatrix/Ellpack/solutions/ellpack.cpp
C++
cpp
6,398
no_license
#include <iostream> #include <vector> #include <Eigen/Dense> #include <Eigen/Sparse> using namespace Eigen; using Triplet_new = Triplet<double>; using Triplets = std::vector<Triplet_new>; using Vector = VectorXd; using index_t = std::ptrdiff_t; /* @brief Class representing a sparse matrix in Ellpack format * \par...
5fb484bcd8c6072811d17842087c446fed6ca7eb
5377c776d9265e29b15e8b15284c4571d20c71b7
hjw21century/Algorithm
/LeetCode/BestTimetoandSellStock/main.cxx
C++
cxx
553
no_license
#include <bits/stdc++.h> #include <gtest/gtest.h> using namespace std; class Solution { public: int maxProfit(vector<int> &prices) { int mi = INT_MAX; int maxP = 0; for (int p : prices) { maxP = max(maxP, p - mi); mi = min(mi, p); } return maxP; ...
72ffb7e81f43b2f75cecab9342aac5100929407b
cc4551a375fa587be5df2527484bd4723936ae30
shaharhayon/cpp_ex3_a
/NumberWithUnits.cpp
C++
cpp
2,296
no_license
#include "NumberWithUnits.hpp" using namespace std; using namespace ariel; NumberWithUnits::NumberWithUnits(double n, string u) : number(n), units(u) { return; } void NumberWithUnits::read_units(ifstream& unit_file) { return; } NumberWithUnits NumberWithUnits::operator+(const NumberWithUnits &n) { ret...
09010e7f82b759e97fc11cfd7a3aa9a8b19dde12
7b9745b26bf7adbda484e20cad2c65f0fec9cdc6
cenariusxz/ACM-Coding
/Train/11/C.cpp
C++
cpp
448
no_license
#include<bits/stdc++.h> using namespace std; char s[1010]; char t[1010]; void fuck() { vector<int> ans; int i,j,l=strlen(s+1); for(i=1;i<=l;i++) s[i]-='0'; memset(t,0,sizeof(t)); for(i=2;i<=l;i++){ if(s[i]==t[i]) continue; ans.push_back(i-1); for(j=i;j<=l;j+=i-1) t[j]^=1; } for(i=0;i<ans.size()-1;i++) ...
f54b5dc1c6408193cf66ae2059a032747eb3d543
73fe352e775175c694c8c9095d560e5986b57d7f
parinazhsn/Ece650
/Main.cpp
C++
cpp
1,627
no_license
#include "Main.h" #include "Graph.h" #include "VisitedPath.h" #include "ShortestPath.h" #include "Edge.h" Main::Main() { } Main::~Main() { } vector<Edge> Main::parseEdges(string edgesString) { vector<string> result=split(edgesString, "{<"); result = split(result[1], ">}"); result = split...
823a29f0bd3afd1b3bc50663c92304616b12928f
6d04f497d816e19339da595087a762f8d1c31ff0
BlackCarDriver/WinPcapTest
/demo/read offline package 1.cpp
C++
cpp
1,972
no_license
//以下代码将打开一个WinPcap / libpcap的堆文件,并显示文件中每一个包的信息。 //脱机文件中读取数据包和从物理接口中接收它们是很相似的。 #define HAVE_REMOTE #pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <pcap.h> #define LINE_LEN 16 void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); int main(int argc, char ...
52209d96e00d21fc63c4d487330cd77bf95dcf5a
2a26502bdb1903566ecf5b918269126b7348a251
pdiaz/mud
/src/gfx/Particles.cpp
C++
cpp
9,572
permissive
// Copyright (c) 2018 Hugo Amiard hugo.amiard@laposte.net // This software is provided 'as-is' under the zlib License, see the LICENSE.txt file. // This notice and the license may not be removed or altered from any source distribution. #include <gfx/Generated/Types.h> #include <gfx/Particles.h> #include <obj/Memo...
29b267cc3702e3be479b1f25ec92d44649a7a542
368ff3dd80f06fba920f0d639f2a9d76e33c364d
islers/octomap_mapping
/octomap_server/src/DROcTree.cpp
C++
cpp
1,378
no_license
#include <octomap_server/DROcTree.h> #include <iostream> namespace octomap { /*DROcTreeNode::DROcTreeNode() : OcTreeNode() , _occDist(-1.0) ,_hasNoMeasurement(false) {} double DROcTreeNode::getMinChildOccDist() { double min = std::numeric_limits<double>::max(); for (uns...
02c9fd784a25132383743a457ec78781d7087919
c74b31e6b0731b23e07a7ed8a0a7b004d3899e0e
kojingharang/algorithm_contest
/google_code_jam/2014_world/R1C/shinA.cpp
C++
cpp
2,495
no_license
// topcoder.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include <stdio.h> //#include <tchar.h> #include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <al...
97b79323e8f8affc2e0a47e3745ce89e42a646ca
4a8cd17b6fae79273388bc43fcdf35141c0b0761
nwjs/blink
/Source/modules/bluetooth/BluetoothDiscovery.cpp
C++
cpp
1,223
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "config.h" #include "modules/bluetooth/BluetoothDiscovery.h" #include "bindings/core/v8/CallbackPromiseAdapter.h" #include "bindings/core/v8/Scr...
c1ddd9d7d7dee2192d86bf7b45f7ea6e787b2bf7
57c0c1de65a7bc00d302af5e3af1ebbd65f899b1
zzjjzzgggg/cpplib
/test/test_ioutils.cpp
C++
cpp
998
no_license
/* * test_ioutils.cpp * Copyright (C) 2017 jzzhao <jzzhao@zhlap> * * Distributed under terms of the MIT license. */ #include <cstdio> #include "../io/ioutils.h" #include "../os/osutils.h" void test_null_ptr() { // auto ptr = std::unique_ptr<ioutils::IOIn>(); auto ptr = ioutils::getIOIn("dad"); if (pt...
385c6ac35e8942c919feb7d0e2a0142f6b18bd4d
19e08337824956056d9a5344f922372fdf6cab06
iCoinSoft/TidexTrader
/src/script/addrulegroup.cpp
C++
cpp
6,032
permissive
#include "addrulegroup.h" #include "main.h" #include "thisfeatureunderdevelopment.h" #include <QFileDialog> #include "rulescriptparser.h" #include <QMessageBox> AddRuleGroup::AddRuleGroup(QWidget *parent) : QDialog(parent) { ui.setupUi(this); setWindowFlags(Qt::WindowCloseButtonHint); Q_FOREACH(RuleWidget* curr...
68d0dd6cbf05718ff6488bc72b7d5e4f8e756911
4b3ace27a7c52037c60b2ad278373cafadb3c661
StiviusChallenges/DSA
/Deque/constants.hpp
C++
hpp
211
permissive
#ifndef CONSTANTS_HPP #define CONSTANTS_HPP enum class ExpandingPolicy { Front, Back }; const int EXPANDING_BLOCKS = 2; const int BLOCK_SIZE = 8; const int INVALID_INDEX = -1; #endif // CONSTANTS_HPP
f1dd2c7a2fde424d22c99a5d89c4a72e24476ed9
d943a4629e74cc944d36966640b49edc5ebd3bff
firiexp/contest_log
/atcoder/Other/pakencamp-2018-day3-B.cpp
C++
cpp
536
no_license
#include <iostream> #include <algorithm> #include <vector> #include <iomanip> #include <map> #include <queue> static const int MOD = 1000000007; using ll = long long; using u32 = unsigned; using namespace std; template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208; int main() {...
128091c7dcf0b3f8b3dd578e338ec2865f28977a
9c24192319a83f60bcaede9783d42c1968b61fe9
rushioda/PIXELVALID_athena
/athena/Trigger/TrigTools/IDScanHitFilter/src/components/IDScanHitFilter_entries.cxx
C++
cxx
443
no_license
//////////////////////////////////////////////////////////////////////////////// // IDScanHitFilter // ------------------- // ATLAS Collaboration //////////////////////////////////////////////////////////////////////////////// #include "GaudiKernel/DeclareFactoryEntries.h" #include "IDScanHitFilter/IDScanHitFilter.h" ...
596aee180f5b008433a840f1ca949d1feef2f504
1bda912350f4b7deb5be7cd408f50669763c306f
saraband/data-structures-and-algorithms
/disjoint-set/DisjointSet.cpp
C++
cpp
1,675
no_license
#include "DisjointSet.hpp" int main () { test::registerTest("Disjoint set initialization", []() { DisjointSet<int> set{ std::vector<int>{ 1, 2, 3, 4, 5 } }; test::expect(set.m_parents.size() == 5); // Each element must be its own parent for (const auto& element : set.m_parents) { int key = el...
0cb66a03ceb1cf6212ef7ce133f9ad080ff42aeb
5679648f6890abeb47c4050e569f9733ebdfe8dc
granty1/cpplearning
/pointer.hpp
C++
hpp
234
no_license
// // pointer.hpp // cpplearning // // Created by Grant on 2020/6/14. // Copyright © 2020 Grant. All rights reserved. // #ifndef pointer_hpp #define pointer_hpp #include <stdio.h> void pointreDesc(); #endif /* pointer_hpp */
c2b9fc47f7c6d2dc8c66312b109e47cea61e71df
e9694456e1c4cb97929845550a4ba1627d424cd7
feengg/SanTang
/x64/Debug/moc/moc_loginwindow.cpp
C++
cpp
4,799
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'loginwindow.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.6) ** ** WARNING! All changes made in this file will be lost! ********************************************************...
5fff055e88adb4a3cf6b619bb2eb2d6e4292df31
dd15d79cbac5d90e0c0f3e62377a66c98366db3e
ji-one/algorithm-study
/baekjoon_study_won/string/9252_jw.cpp
C++
cpp
971
no_license
#include <iostream> #include <string> #include <vector> using namespace std; int d[1001][1001]; int main() { string s1; string s2; cin >> s1 >> s2; vector<char> v; for (int i = 0; i < s1.length(); i++) { for (int j = 0; j < s2.length(); j++) { if (s1[i] == s2[j]) ...
7e8d61e78b5b34b6750023e8a175087a06f4b640
3ec9fc7bee9edb9be9d361b13d41c9aa4d1771fb
devfbuthod/CPP
/cpp04/ex01/Enemy.hpp
C++
hpp
1,494
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Enemy.hpp :+: :+: :+: ...