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
6b44aac010893064d871626666e3b2c72aa08608
87ba262e0eae166bfd2af3f86034cf4846871de8
angelhof/cbmc
/unit/solvers/prop/bdd_expr.cpp
C++
cpp
1,873
permissive
/*******************************************************************\ Module: Unit tests for bdd_expr Author: Diffblue Ltd. \*******************************************************************/ /// \file /// Unit tests for bdd_expr #include <testing-utils/use_catch.h> #include <solvers/prop/bdd_expr.h> #include <...
3fb29cd1a9623389e0437a2d844179f4e78505e7
5dc7ea63ab3db51e0f1fdb344a6c789602d739d0
Flatta/jumanpp
/v2/src/util/serialization_test.cc
C++
cc
1,538
no_license
// // Created by Arseny Tolmachev on 2017/03/04. // #include "util/serialization.h" #include "testing/standalone_test.h" using namespace jumanpp; using namespace jumanpp::util::serialization; struct Test { i32 a; }; template <typename Arch> void Serialize(Arch& a, Test& o) { a& o.a; } enum class TestClass { A,...
cd38fc07a7d40161c3323bfbca2aee6dcb231d4e
34d5bb43675dd1bea265c8574032ec23401a3665
juanplopes/hackerrank
/dynamic-programming/kingdom-division.cpp
C++
cpp
1,270
no_license
#include<iostream> #include<cstring> #include<vector> #include<cmath> #define M 1000000007 using namespace std; vector<int> G[100010]; long long V1[100010], V2[100010]; long long H1(int p, int v); long long H2(int p, int v); long long H2(int p, int v) { if (V2[v] >= 0) return V2[v]; long long total = 1; ...
02c11063426c8f538cf98fc7acedc060a50a0014
e63d7268ca2d57f72845088f5738314dabac4cc0
pnshiralkar/Sem4-Assignments
/DSFL/Ass6.cpp
C++
cpp
4,668
no_license
//============================================================================ // Name : Ass6.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <ios...
c54a68645fe36cdd57cf948e42c6c4632efbae65
6d23f8b59541ebe5ad30776303eb539e67fa99ee
louiscklaw/nodemcu_ws2812_tryout
/_tryout/nodemcu_ws2812/nodemcu_ws2812/src/main.cpp
C++
cpp
2,269
no_license
#include <Arduino.h> #include <WS2812FX.h> #define LED_COUNT 8 #define LED_PIN 5 #define TIMER_MS 3000 // Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products ...
5de01b44f09f27b105cd5842daec39cfc38cec0a
f09560711b58ce6e6f128e8284915bf98dab755c
SREERAGI18/chromium
/ash/app_list/views/continue_section_view.cc
C++
cc
4,331
permissive
// Copyright 2021 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/app_list/views/continue_section_view.h" #include <algorithm> #include <memory> #include <string> #include <vector> #include "ash/app_list/...
240da1d6af8ca74dbaf1a87105d96980aeda5b16
dad51af56a63dbe1422ef64a1f818b1185012639
sdgMihai/Airplane3D
/Source/Laboratoare/Tema2/Clouds.cpp
C++
cpp
2,605
no_license
#include "Clouds.h" #include <cstdlib> #include <time.h> /* time */ #include "GameStatistics3D.h" #include "Laboratoare/Laborator4/Transform3D.h" #include "Tester.h" unsigned short lfsr = 0xACE1u; unsigned bit; unsigned myRand() { bit = ((lfsr >> 0) ^ (lfsr >> 2) ^ (lfsr >> 3) ^ (lfsr >> 5)) & 1; return lfs...
b2caf9e07c5def8738f6ae1317c322f9eef2f30a
78976af94c9da35027e6124c9b31747a603f73bd
LazyPlanet/MX-Architecture
/ThirdParty/boost_1_63_0/libs/hana/test/basic_tuple/unpack.cpp
C++
cpp
1,079
permissive
// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include <boost/hana/assert.hpp> #include <boost/hana/basic_tuple.hpp> #include <boost/hana/equal.hpp> #include <boost/hana/unpack.h...
ac8bb3ea77933463fd5eb61da7ae274682003c81
046efa6f348ada6fad1ed5479bd427fcfbaf8006
Sevyyy/leetcode
/28.cpp
C++
cpp
909
no_license
class Solution { public: int strStr(string haystack, string needle) { //return haystack.find(needle); int n = haystack.size(); int m = needle.size(); if(m > n) return -1; if(m == 0) return 0; int *next = new int[m+1]; next[0] = next[1] ...
81f530d16737c0c8b8a4fe3b6bb2ec5a3dac525e
57f842a40f2b73392e77aa9bc666002d4960d3dc
brunoconterato/GA_Framework
/src/FitnessEvaluator.cpp
C++
cpp
518
no_license
/* * FitnessEvaluator.cpp * * Created on: 1 de mai de 2017 * Author: brcon */ #include "FitnessEvaluator.h" FitnessEvaluator::FitnessEvaluator() { // TODO Auto-generated constructor stub } FitnessEvaluator::~FitnessEvaluator() { // TODO Auto-generated destructor stub } void FitnessEvaluator::run() { ...
4d932a833a2b4f45daad75888bf0f69ab04e8487
8f7350b167b57fe2c1954cb21af71132340968d4
we-are-kicking-lhx/xinxinalgorithm
/L124. Binary Tree Maximum Path Sum.cpp
C++
cpp
567
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int maxPathSum(TreeNode* root) { int cur=INT_MIN ; func(root,cur); retu...
0dee47b8abdce61e5f5aa07734bf00e744283900
25e07e51956c91e44cf058c3c77e1f2bd81500c3
fuwh-shanghaitech/Metagenomics_CAST
/pilercr/tree.cpp
C++
cpp
28,698
no_license
#include "multaln.h" #define TRACE 0 /*** Node has 0 to 3 neighbors: 0 neighbors: singleton root 1 neighbor: leaf, neighbor is parent 2 neigbors: non-singleton root 3 neighbors: internal node (other than root) Minimal rooted tree is single node. Minimal unrooted tree is single edge. Leaf node alwa...
dc4ba29189641cb78e7ebd8677e71fc1cec67bdd
e321f9115be2b3b2b2d18e32d87b9d309ee098d9
rwang067/rocksGraph
/src/api/filename.hpp
C++
hpp
2,060
no_license
#ifndef GRAPHWALKER_FILENAMES_DEF #define GRAPHWALKER_FILENAMES_DEF #include <fstream> #include <fcntl.h> #include <string> #include <sstream> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <sys/stat.h> #include "api/datatype.hpp" #include "util/logger.hpp" // static std::string fidname( std::st...
4c81b8ada3ef8c2c70e32d62476dc732a2500e7e
cc8af170bf384b6cebe465796fde1d8c3122f449
Shahin15-1573/mycode-arena
/Codeforces/Game.cpp
C++
cpp
558
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <queue> #include <stack> #include <vector> #include <list> #include <set> #include <iostream> #include <algorithm> using namespace std; #define LLI __int64 #define ULL unsigned long long int #define MAX 20005 #define alpa 26 #define...
ee79ad3a6e1e9444fdcb040547cce86dd98a97ed
34ed0adb4c7b3f46bc15bcf433ec4aafc649de6a
sysrel/PROMPT
/lib/Prose/helper.cpp
C++
cpp
5,405
permissive
#include "../../include/klee/Interpreter.h" #include "../../lib/Prose/Prose.h" #include "../../include/klee/ExecutionState.h" #include "llvm/Support/CommandLine.h" #include "helper.h" #include "parser.h" #include <iostream> #define true 1 #define false 0 /* * global variable */ int debug=1; /* * lokal variable *...
027e18a6d4cfd64795277186dd786f645afae5b2
72d57fa04678ce856934c5f2e38e4228ce767c4c
BoyanVelkov/SoftUni-C-
/main.cpp
C++
cpp
6,152
no_license
#include <iostream> #include <float.h> #include <climits> #include <iomanip> #include "Building.h" #define ARRAY_SIZE 3 void mostEmployees(Building* arr); void mostFreePlaces(Building* arr); void highestCoefficient(Building* arr); void mostAndLeastPeoplePerFloor(Building* arr); void mostAndLeastOfficesPerFloor(Buildi...
af98d27207ad542ef24c0faa846ba4e60e7683b0
df5b7200fabc6ea7a3a174adfcd44b6aca6617a1
suruoxi/CppMiscellaneous
/Trigraphs.cpp
C++
cpp
474
no_license
/************************************************************************* > File Name: Trigraphs.cpp > Author: Peng Zhang > Mail: pengzhang_live@live.com > Created Time: 2014-12-09 ************************************************************************/ #include<iostream> using namespace std; int ...
aad7e048081183506394088f0fcf37df8fb503d1
527fbd71812e647d606509c08a0a2a35c87ff697
khaki3/IEEE2017
/dsl-double/denoise/denoise.driver.cpp
C++
cpp
982
no_license
#include "../common/common.hpp" #include "../common/timer.hpp" #include <cassert> #include <cstdio> extern "C" void host_code (double *, double *, double, double, double, int, int, int); extern "C" void denoise3d_gold (double *, double *, int); int main(int argc, char** argv) { int N = 512; double (*u0)[N][N] = ...
b6793d0592653e9915a9fed5a9cc7b39f2ba8679
3f5de88d6d224422178979e1c416bea2f3c6770c
jwworker201/rpidmx512
/lib-ltc/src/h3/midireader.cpp
C++
cpp
6,517
no_license
/** * @file midireader.h * */ /* Copyright (C) 2019 by Arjan van Vught mailto:info@raspberrypi-dmx.nl * * 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 w...
4998b270481c9690ae48aa3c6a6fc6e6f1486e3e
f74323ef89102c6e6cb64035d2589bac65382db8
Happy-Ferret/xygine
/xyginext/src/graphics/postprocess/PostOldSchool.cpp
C++
cpp
2,207
permissive
/********************************************************************* (c) Matt Marchant 2017 - 2018 http://trederia.blogspot.com xygineXT - Zlib license. 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 thi...
d77ac59906b7c83266bc70765ab21144f29255cf
791c1de387f85a99f4c06199aed313aa6fc04532
ARM-software/patrace
/patrace/src/common/in_file.hpp
C++
hpp
2,234
permissive
#ifndef _IN_FILE_HPP_ #define _IN_FILE_HPP_ #include <fstream> #include <string> #include <vector> #include "json/writer.h" #include "json/reader.h" #include "common/file_format.hpp" namespace common { class InFileBase { public: void printHeaderInfo(); const std::string getJSONHeaderAsString(bool prettyPrin...
e60934d730a6a663e39af7a1e89d12ade9a90bcc
26a8ceacdd6d8198b53ad377511ec1cff7b26923
jqhong/klee-native
/remill/remill/Arch/X86/Semantics/SSE.cpp
C++
cpp
93,596
permissive
/* * Copyright (c) 2017 Trail of Bits, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
91420cef94bfedb37da3d38fad639edf31a773e4
119955f5d0577197b6eb4963f1db831ca0ad7ad4
big-guy/cpp-demo
/lib7api1/src/main/cpp/lib7api1impl1api2.cpp
C++
cpp
789
no_license
// GENERATED SOURCE FILE #include "lib7api1_private.h" #include "lib7api1_impl.h" #include <iostream> #include <stdio.h> /* * Here is a function. */ int lib7api1impl1api21(int a, int b) { return a + b; } /* * Here is a function. */ int lib7api1impl1api22(int a, int b) { return a + b; } /* * Here is a fu...
25d4efa55ed597ceb92949e927c6314fc311b333
94d2bc53c1b6232af22c00409762a0959c15e54d
matthewya2/YangMatthew_CSC5_42829
/Assignment_2/Hmwk/Coding Problems/savitch_9thed_chap2_prob5_PracProg/main.cpp
C++
cpp
649
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: Matthew * * Created on March 18, 2016, 3:05 PM */ #include <cstdlib> #include <iostream> usi...
f164308bd8a3753bd2aa8238479e28c06030ee5e
63215e6bd3b4d59a4a54753f6fa7006bf047237d
dragon-tc-tmp/clang
/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
C++
cpp
9,112
permissive
//==- DebugCheckers.cpp - Debugging Checkers ---------------------*- 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 // //===---------------------------...
509f763baf9980ee49d32502ca892e8f875cdaf6
5883f383a3ff69ebe7e4a066350f9ed47522205c
sumaiyaazad/Operating-System-CSE-314-BUET
/IPC/CakeFactory/semaphore.cpp
C++
cpp
1,466
no_license
#include<stdio.h> #include<pthread.h> #include<semaphore.h> #include <zconf.h> #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmissing-noreturn" sem_t bin_sem; pthread_mutex_t mtx; char message[100]; void *thread_function(void *arg) { int x; char message2[10]; while (1) { printf("thread2:waiti...
a297f12f281c808795961e3e39f8fd9072e0c693
92fc703b35663e7b9fb58f0ad63aee194a19e8f8
Bikubisw/Coding
/DATA STRUCTURES AND ALGORITHMS/dynamic_programming/longest_increasing_subsequence.cpp
C++
cpp
578
no_license
#include <iostream> using namespace std; int lis(int *input,int n){ int *output=new int[n]; output[0]=1; for(int i=1;i<n;i++){ output[i]=1; for(int j=i-1;j>=0;j--){ if(input[j]>input[i]){ continue; } int possibleans=output[j]+1; if(possibleans>output[i]){ output[i]=possibleans; } } } i...
9e22850a5117f1205ea4ac276e551d6c8da1b650
e8e2608f16a543fc5967b82af45e4a68359f99d3
hyperledger/iroha
/shared_model/interfaces/queries/query_variant.hpp
C++
hpp
1,125
permissive
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef IROHA_SHARED_MODEL_QUERY_VARIANT_HPP #define IROHA_SHARED_MODEL_QUERY_VARIANT_HPP #include "interfaces/queries/query.hpp" #include <boost/variant.hpp> namespace boost { extern template class variant< ...
7f41f5fac59e713afbc95506145702086d91701d
c76d871315e6735d1ff5e27f551284b2b0dd78a4
fanzcsoft/windows_embedded_compact_2013_2015M09
/windows_embedded_compact_2013_2015M09/WINCE800/private/winceos/COREOS/core/corelibc/crtw32/convert/_wcstoq.cpp
C++
cpp
921
no_license
// // Copyright (c) Microsoft Corporation. All rights reserved. // // // Use of this source code is subject to the terms of the Microsoft shared // source or premium shared source license agreement under which you licensed // this source code. If you did not accept the terms of the license agreement, // you are...
f6e6bca9a83430ba4fb58c000775351197e5f745
7cbd195a8988f9b9c02b71a8f92c0f5d3fe50170
shawnss25/Library
/SortedType-2.hpp
C++
hpp
2,965
no_license
#ifndef SortedType_hpp #define SortedType_hpp #include "ItemType.hpp" // File ItemType.h must be provided by the user of this class. // ItemType.h must contain the following definitions: // MAX_ITEMS: the maximum number of items on the list // ItemType: the definition of the objects on the list // Relatio...
9106c012370344ccc293579b86397636c7bd780a
faaaa146c8fd85d4238022fa9d51faaeaf3ca47f
darlinghq/xcbuild
/Libraries/pbxbuild/Sources/Phase/HeadersResolver.cpp
C++
cpp
2,387
permissive
/** Copyright (c) 2015-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 <pbxbuild/Pha...
8c2f641945e18ad7f6dfda09035ac1ee78b8f1a1
e3c336465a51537f839a0ff846352d5022cae20f
froody/swift-llvm
/lib/Analysis/BasicAliasAnalysis.cpp
C++
cpp
66,002
permissive
//===- BasicAliasAnalysis.cpp - Stateless Alias Analysis Impl -------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
a52ca9e2915908552514285e296badd511992ffa
8079c063f884e25491cd146d0ab87e0eedee078e
PravinSelva5/Cpp-Crash-Course
/Cpp_Essential/Exercise Files/Chap03/struct.cpp
C++
cpp
471
no_license
// struct.cpp by Bill Weinman <http://bw.org/> #include <cstdio> using namespace std; struct Employee { int id; const char * name; const char * role; }; int main() { Employee joe = { 42, "Joe", "Boss" }; // Also can use a pointer Employee * e = &joe; printf("%s is the %s and has ...
c132a3874e6f5c6b48a0c1139e8056dd36398873
0425bab7c10b46981c3805692752ee7fe952e0a2
Durian2022/v8
/src/d8/d8-posix.cc
C++
cc
25,064
permissive
// Copyright 2009 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 <errno.h> #include <fcntl.h> #include <netinet/ip.h> #include <signal.h> #include <stdlib.h> #include <string.h> #include <sys/select.h> #inclu...
647cd6b3b50a77ffdf38109b813530c2c39a6e79
6067a35916e552a3340124d24ea9fc00963fc8bc
WhiZTiM/coliru
/Archive2/27/49f8c124a2fa9c/main.cpp
C++
cpp
4,420
no_license
#include <iostream> #include <typeinfo> #include <string> #include <boost/fusion/include/sequence.hpp> #include <boost/fusion/include/algorithm.hpp> #include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/adapt_adt.hpp> #include <boost/fusion/include/is_sequence.hpp> #include <boost/mpl/eval_if....
d0507e0c7c7827c101943db3216bd283645f638e
91a6c7e0e4ded98a4d4e1bc00a778cce9b2cee67
itm2018/bitcoin
/src/test/coins_tests.cpp
C++
cpp
37,461
permissive
// Copyright (c) 2014-2016 The Marscoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coins.h" #include "script/standard.h" #include "uint256.h" #include "undo.h" #include "utilstrencodings.h" #includ...
808050c71399ecac7e572acaa39df6ac49c720a9
12e80bd383436d0b3bd3db89685923ed67dec312
wmdc/canvas
/ControlBrush.cpp
C++
cpp
1,197
permissive
#include "precompiled.h" #include "ControlBrush.h" #include "Brush.h" #include "Canvas.h" #include "DrawingConstants.h" #include <GL/glut.h> #include "IL/ilut.h" ControlBrush::ControlBrush( int _mode, bool _selected, Canvas &_c, BrushPalette &_p ) : Brush( _selected, _c, _p ), mode(_mode) {} void ControlBrush::se...
0f45e48604065bce74c19dd55131bf4d604f2468
3a299996190bbe45832c5048b23d06a781ab6533
asmwarrior/vroomgis
/vroomgis/src/vrrenderer.cpp
C++
cpp
7,101
no_license
/*************************************************************************** vrrenderer.cpp ------------------- copyright : (C) 2009 CREALP Lucien Schreiber email : lucien.schreiber at crealp dot vs dot ch ************************...
f073f7b4cce43ce2331b3aae7f49f5d352b2ff74
8cd300d23f82386e8048078a71a8b76b92f7d8f5
thibautcornolti/Plazza
/src/classes/Slave.cpp
C++
cpp
3,986
permissive
/* ** EPITECH PROJECT, 2018 ** Plazza ** File description: ** Plazza */ #include "Slave.hpp" Plazza::Slave::Slave(size_t id, unsigned workerCount, const std::string &loggerName, const std::function<void(void)> &atFork) : _id(id), _pool(_id, workerCount, loggerName), _fork(), _loggerName(loggerName), _atFork(atFo...
87577e3868b622eb4f9feae11e6265ca8a107ae8
fb11b3bb8c698f570fbb024c7e23c4623caff65c
caxapexac/IronsphereServer
/src/native/components/ai_attacker.cpp
C++
cpp
803
no_license
#include "ai_attacker.hpp" #include "../entities/unit.hpp" #include "../game/abstract_game.hpp" const std::string& com::ai_attacker::type () const { return j_ai_attacker::type; } void com::ai_attacker::command (ent::unit& sender, ent::unit& owner, game::abstract_game& context, json& input) { } void com::ai_attac...
fcca766ce4663822356bc19009c46a175f801055
926d57ccbe6815cb1a483930f523e394b13532fe
jtlap/nt2
/modules/core/base/cover/boolean/scalar/logical_andnot.cpp
C++
cpp
1,526
permissive
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
52acff1550dde3a56af1ae31caddb691af91028c
b486abd0d404edda1270afa316f1be22ea9ae9b8
blusno1/chromium-1
/components/omnibox/browser/bookmark_provider_unittest.cc
C++
cc
21,752
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/omnibox/browser/bookmark_provider.h" #include <stddef.h> #include <algorithm> #include <memory> #include <string> #include <vec...
81f0dc0d2ff294a5151448779f094dff8e436708
25d7ee711a42cd06aa8e9c3c210ac365bf3c0e69
dlombrana21/COSC
/Ch3/In class example/Ch3Ex2.cpp
C++
cpp
339
no_license
//Name who wrote it //ITSE1302 course #include <iostream> /* Main program execution */ int main() { int intCounter = 0; //Output std::cout << "Counter: 4" << ++intCounter << std::endl; std::cout << "Counter: 4" << intCounter++ << std::endl; std::cout << "Counter: 4" << intCounter++ << std::endl; ...
2569ee0b6b507ae5d26c0e685e9c22d8d413170e
43383dad3d5382c2b382c0b62cb68305ead40538
PerttuP/PPUtils
/source/PPUtils/objectpool.hh
C++
hh
5,575
permissive
/* objectpool.hh * * This header defines the ObjectPool class template. * * Author: Perttu Paarlahti perttu.paarlahti@gmail.com * Created: 06-Aug-2015 */ #ifndef OBJECTPOOL_HH #define OBJECTPOOL_HH #include <memory> #include <vector> #include <functional> #include <unordered_map> namespace PPUtils { /*!...
4da1f9e8a883bd11cbd5a07506fcacb55edb35d3
e4b4b395227d915d82ea0a3f9bb4cc4deac543db
Bitcloudcoin/Bitcloud
/src/rpcwallet.cpp
C++
cpp
61,881
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet.h" #include "walletdb.h" #include "bitcoinrpc.h" #include "init.h" #in...
a68b5e27917dfef7e94307207a72bb7decee9e62
e2389b50d03ce70d0fce3b77fbaccb7426a1d5f0
mgh3326/iridium-browser
/chrome/browser/chromeos/login/lock/webui_screen_locker.cc
C++
cc
13,149
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 "chrome/browser/chromeos/login/lock/webui_screen_locker.h" #include "ash/public/cpp/ash_pref_names.h" #include "ash/public/cpp/ash_switches.h" #...
52c2c25a206ae86b4d6db9b55968b992c1f46755
e70f9560b6e002c3621b75a0adfbeebeb4123f19
jz20/chess
/src/gui/piecebitmap.cpp
C++
cpp
577
no_license
#include "piecebitmap.h" #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include "piece.h" PieceBitmap::PieceBitmap(wxWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, Square *square, GameRunner *runner): wxStaticBitmap(p...
d510761bc279df6c65ddd84d6d507e4ed17a357b
351da7acd825a99cb6d9df5bb936b88492d151a0
timsnyder/map
/sparta/sparta/statistics/EnumCycleHistogram.hpp
C++
hpp
13,892
permissive
// <EnumCycleHistogram.h> -*- C++ -*- /** * \file EnumCycleHistogram.hpp * \brief EnumCycleHistogram implementation using sparta CycleCounters * that models enum state lifetimes. * This Histogram class can be templated on both C++ enums and * sparta::utils::Enums. */ #ifndef __ENUM_CYCLE_...
74b9736a7dbe4294a8a804382987f99c838f2cb6
9653c8c9ed1f5c4607dd4e5a80f52a8123dc4544
yoshi5534/schorsch-the-robot
/src/Control2012/libreoffice/com/sun/star/util/XCloseBroadcaster.hpp
C++
hpp
1,512
no_license
#ifndef INCLUDED_COM_SUN_STAR_UTIL_XCLOSEBROADCASTER_HPP #define INCLUDED_COM_SUN_STAR_UTIL_XCLOSEBROADCASTER_HPP #include "sal/config.h" #include "com/sun/star/util/XCloseBroadcaster.hdl" #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/util/XCloseLi...
30fc9cece9b1032efc433592d038f15c844e1c26
4cdaf0ea094b72d94420858d8a803cdce752ddf2
stankevichevg/stanford_algorithms
/src/edge.cpp
C++
cpp
353
no_license
#include "edge.h" int Edge::getLength() { return length; } void Edge::setLength(int length) { this->length = length; } Edge::Edge(int startNode, int endNode, int length) : startNode(startNode), endNode(endNode), length(length) {} int Edge::getStartNode() const { return startNode; } int Edge::getEndNode...
94e3e900c151ecbaea3d8b894bba4e663fda593f
a3dea1c34911178204719b82644b19c243399b92
qigaode/translate_jt
/translate-jt/thirdparty/others/OCCTinc/TopoDS_Shape.hxx
C++
hxx
7,263
no_license
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _TopoDS_Shape_HeaderFile #define _TopoDS_Sh...
28591001834b918bff69ee47e450d691c2c08035
b7b1105b99133f17070f752a2168d8c7f7a20f28
bashu22tiwari/Apna-College
/Function/Functions 3.0/decimaltobinary.cpp
C++
cpp
573
no_license
// In this i am going to make a program where we will be converting decimal number into binary number #include<iostream> using namespace std ; int pow(int a,int b) { int ans=1; if (b == 0) { return ans; } else if (b > 0){ for(int j=1; j<=b ; j++) { ans*=a; }...
5070e4fae638fe360e7369e3c1fc327621cab507
1a659869c125bc62889ed31a7206a673d351418a
ubaidsayyed54/drake
/drake/bindings/pybind11/pydrake_gurobi.cc
C++
cc
501
permissive
#include <pybind11/pybind11.h> #include "drake/solvers/gurobi_solver.h" namespace py = pybind11; PYBIND11_PLUGIN(gurobi) { using drake::solvers::GurobiSolver; py::module m("gurobi", "Gurobi solver bindings for MathematicalProgram"); py::object solverinterface = py::module::import("pydrake.solvers.mathe...
77147892a641232fc1ac5f264a85e859d40e9a9e
4bba035807ecf5f838da2789b70983f114ad2c51
koonchen/chromium
/chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.cc
C++
cc
6,333
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" #include "base/strings/utf_string_conversions.h" #include "chrome/common...
41c0c94fc7fed34b78a52a5b09df99e9ea1ee29d
271373fc1f01e2f91788f5bceaceb7e0dda749f3
909335040/GameEngineProjectFinal
/Client/GEP1/imgui_impl_glut.cpp
C++
cpp
8,272
permissive
// ImGui Glut binding with OpenGL // You can copy and use unmodified imgui_impl_* files in your project. // If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown(). // See main.cpp for an example of using this. // https://g...
5a233d1d8606a9854163eb6677385f52e0c4b075
cb0b18cdf14f2734fef277c6c2b9cda59a51f9f1
RedaBorchardt/Joshua
/Joshua/Headers/joshua.hpp
C++
hpp
669
permissive
// Preprocessor Directives #ifndef JOSHUA_HPP #define JOSHUA_HPP #pragma once // System Headers #include <irrKlang.h> #include "imgui.h" #include "examples/imgui_impl_opengl3.h" #include "examples/imgui_impl_glfw.h" #include <GL/gl3w.h> #include <GLFW/glfw3.h> #include <assimp/Importer.hpp> #include <assimp/postproces...
81a10f33999c7bbf7aad2e1084c5a5ce1a114f39
7d4d84bda3c16b64e5cfde673418532b9ab53aff
MEONMedical/Log4Qt
/src/log4qt/logger.cpp
C++
cpp
7,927
permissive
/****************************************************************************** * * This file is part of Log4Qt library. * * Copyright (C) 2007 - 2020 Log4Qt contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ...
960079d514c8590903066ffa0050f43978b9b4e3
0cce9bb6ecd92e6840c18e3978a015225e0aaaca
panhaozi/engine
/native/cocos/renderer/pipeline/custom/NativeProgramLibrary.cpp
C++
cpp
64,315
permissive
/**************************************************************************** Copyright (c) 2021-2022 Xiamen Yaji Software Co., Ltd. http://www.cocos.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated engine source code (the "Software"), a limited, wo...
a9b9c0b6e5ca02ce03f54c7cb33adc39bf8cbca0
f03f19db9e769e6dd2db2f557ed4708b392f6fff
BackupTheBerlios/feuerkraft-svn
/tags/release_0_1_0/src/Screen.hxx
C++
hxx
1,459
no_license
// $Id: Screen.hxx,v 1.1 2001/12/12 00:00:33 grumbel Exp $ // // Pingus - A free Lemmings clone // Copyright (C) 2000 Ingo Ruhnke <grumbel@gmx.de> // // 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 Softwar...
5c481fc2212bd645e8b3e14b653179dc893607e7
2f6aa613252589e3bacbed0430732d30a3537c97
matus-chochlik/llvm-project
/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
C++
cpp
86,486
permissive
//===- llvm/unittest/DebugInfo/DWARFDebugInfoTest.cpp ---------------------===// // // 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 // //===---------------------------...
b6d9d559eb12f42acca17d95c0a9a6a8349bff1e
a9688d7bd26038c13dce6e57a67ebde042b838f0
hafsasaqib/Asteroids-in-a-2-Dimensional-Graphical-game
/cpp Files/Asteroid.cpp
C++
cpp
3,713
no_license
#include "Asteroid.h" #include "util.h" #define TOP 1 #define RIGHT 2 #define BOTTOM 3 #define LEFT 4 Asteroid::Asteroid() { Color= PINK; X=Y=0; Radius=48; Corners=6; Alive=false; theta = 45; step = 10; } Asteroid::Asteroid(ColorNames c, int x, int y, int r, int co, bool a) { se...
c8df8ab7880627b56bf500f4eeef8d114907a051
ef3e1d3b0d4df113d6a668a379e9030e5a47ff29
abenagli/UserCode
/HiggsAnalysis/VBFHiggsToVV/plugins/MCFwdJetsPreselFilter.cc
C++
cc
3,191
no_license
// -*- C++ -*- // // Package: GenFilters // Class: MCFwdJetsPreselFilter // /**\class MCFwdJetsPreselFilter MCFwdJetsPreselFilter.cc GeneratorInterface/GenFilters/src/MCFwdJetsPreselFilter.cc Description: mild VBF selections: the event is required con contain a minimum number (m_nJets) of gen jets (m_jetTa...
c7d5192753636da2ee32b5ef9037123ff4efbe33
ecd078704df9d1cecd58b00ca3d34c3c52cda2bd
massbrowser/android
/remoting/client/jni/jni_client.cc
C++
cc
11,749
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "remoting/client/jni/jni_client.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "base/logging.h" #include...
9f54f2b57033f3cbc2e3c7d49f95f5089bc844c5
0203f8a9153a17c8d8a8485225696a0bbfb4b7ff
fry1999/Spoj-ptit
/bangnhan.cpp
C++
cpp
242
no_license
#include<iostream> #include<math.h> using namespace std; int main(){ long long n, x, dem=0; cin>>n>>x; for(long long i=1; i<=sqrt(x); i++){ if(x%i==0&&i<=n&&(x/i)<=n){ if(i*i==n){ dem+=1; } else dem+=2; } } cout<<dem; }
df7b9d56b22c317c1cbe9ddf15ee72e05797366a
ef73feb17dd703b9082316efd40e6e057d54e150
hophacker/algorithm_coding
/leetcode/convert-sorted-array-to-binary-search-tree.cpp
C++
cpp
3,873
no_license
#include <cmath> #include "leetcode.h" #include <set> #include <list> #include <unordered_set> #include <hash_map> #include <climits> #include <queue> #include <vector> #include <map> #include <set> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> // istringstream bu...
1bb9aee9c69cee311bff3ce861b1a1923f3bda89
315562871e7b1d0095d55cd61a233bc2342c1c35
intmdm/IIPULabs
/Laba1/Laba1/Laba1.cpp
C++
cpp
2,256
no_license
#include <iostream> #include <windows.h> #include <setupapi.h> using namespace std; #pragma comment (lib, "Setupapi.lib") int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); HDEVINFO device_info_set; SP_DEVINFO_DATA device_info_data; device_info_set = SetupDiGetClassDevs( NULL, ...
0358b4d6317ec1b1c2bd16396abbc55e4138e1be
3cfb026a97c984aa7e1d0edb2026d85166be2a54
DeNiCoN/2DeNgine
/src/Engine.hpp
C++
hpp
1,042
permissive
#pragma once #include <vector> #include "render/RenderManager.hpp" #include "gamebasis/Scene.hpp" #include "gamebasis/ActorFactory.hpp" #include "gamebasis/SceneFactory.hpp" #include "easylogging++.h" #define ELPP_FEATURE_CRASH_LOG namespace DeNgine { class Engine { private: double m_currentTime; double m_...
1922fbe8db252a11996da51f9a52a2f4d09c5d0c
c001946b865f3b85d2d32d6b7a5cc1f25d8ae312
antonio0023/dev
/succ.cpp
C++
cpp
300
no_license
#include <stdio.h> #include <conio.h> int sumaTotal(int x); int main(){ int a,b; puts("Numero: "); scanf("%i",&a); b=sumaTotal(a); printf("total\t%d",b); getch(); } int sumaTotal(int x){ if(x==0) return 0; else return x+sumaTotal(x-1); }
9d73527ef13012f93318884ff7031428c350a52b
59fd1b2a790a31ce0bb6500892fb457c6e40a769
SmithLiu95/OSM_CAA_WeightedContrastiveLoss
/CaffeMex_V28/src/caffe/layers/gaussian_layer.cpp
C++
cpp
1,288
permissive
#include <algorithm> #include <cfloat> #include <vector> #include "caffe/layers/gaussian_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { using std::min; using std::max; template <typename Dtype> void GaussianLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<D...
8ffd84f20a536d4dbf68ea4d6e42cf42466005e1
457e7d4ea23bac36440b645e01ca5ac473fbd298
sschaetz/nt2
/modules/type/complex/hyperbolic/unit/simd/tanh.cpp
C++
cpp
2,219
permissive
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
f1aa3087c658ecbd87fa34a080b9d0e3508165a2
50d94e0dd8de2ad107ac3a04daf994217e033ceb
BarkingCactii/WorldTime2000
/TMP2/Str.cpp
C++
cpp
5,596
no_license
// // // STR.CPP // // String Class member functions // // Developed by: Jeff Hill of PCM Computer Systems Pty Ltd // for Reoforce Systems Pty Ltd // // #include "stdafx.h" #include <stdio.h> #include <string.h> #include <strstrea.h> #include <ctype.h> //#include "globals.h" #include "str....
70d61f95dacbd52feeba26fc1fff128a0bd2c851
0ad9be290006c505d29ff20aa2c14d1da1980b45
zeroengineteam/ZeroCore
/ZeroLibraries/Platform/CrashHandler.hpp
C++
hpp
6,893
permissive
/////////////////////////////////////////////////////////////////////////////// /// /// \file CrashHandler.hpp /// Declaration of the CrashHandler class. /// /// Authors: Trevor Sundberg, Joshua Davis /// Copyright 2010-2014, DigiPen Institute of Technology /// //////////////////////////////////////////////////...
5d42b15d3239b9ddceaa4e354c8a318706db8161
f1f92d329ebb4ed31b28028553810c65be28cff9
whisperity/llvm-project
/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
C++
cpp
56,222
permissive
//===- Transforms.cpp - Linalg transformations as patterns ----------------===// // // 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 // //===---------------------------...
babe7d273700686602d58246a4ead941d53a9d97
50651e25aaefd69af2c790e36906f9878acd04af
ethio123/LogDevice
/logdevice/ops/ldquery/VirtualTable.cpp
C++
cpp
10,374
permissive
/** * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. * 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. */ #include "VirtualTable.h" #include <chrono> #include "logdevice/common/Timestamp.h" #...
a791e164f5499b09c20ad79b97db0f032ee5a3a2
22c92f2acc008a47047374e928dc955bed5664d6
madhavsuresh/vaultdb_core_operators
/operators/secure_join.cpp
C++
cpp
2,346
no_license
// // Created by madhav on 1/6/20. // #include "secure_join.h" #include "emp-tool/emp-tool.h" #include <querytable/expression/expression.h> #include <querytable/query_table.h> void MergeTuples(QueryTuple *output, const QueryTuple *tuple1, const QuerySchema *schema1, const QueryTuple *tuple2, ...
c45372b692c95ca19e189959ddfb33d591d80ad7
6ee6925b5da1d1ab7d0c77a7d793dbd9bf404bd0
brotherofken/bokehrendering
/src/glf/window.cpp
C++
cpp
8,573
no_license
//------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ #include <glf/window.hpp> #include <glf/utils.hpp> #include <GL/freeglut.h> //------------------------------------------------------------...
555f3ab81b15cc03d0232dda7753353d8c6f2ed3
7496401ae300d1342216a8633b407a8746ef0f01
icoinproject/icoin-project
/src/main.cpp
C++
cpp
130,862
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "alert.h" #include "checkpoints.h" #include "db.h" #include "txdb.h" #inc...
0ecbd7d75b71e10f2816b8a6f15fcc413915d6e0
427c45e446eb50d66ab71e72dcbc6701aad3c9d9
jiachengii/chromium
/third_party/blink/renderer/core/fetch/request.cc
C++
cc
41,314
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 "third_party/blink/renderer/core/fetch/request.h" #include "base/optional.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "serv...
280aa7fde423d2a94d02c7175d0fd2aef45df54f
de4c2c7d4b33a2ff77bff71bcb2015810b8d2a4b
quantumrain/LD33
/src/game/entity.cpp
C++
cpp
2,985
no_license
#include "pch.h" #include "game.h" entity::entity(entity_type type) : _world(), _flags(), _type(type), _rot(0.0f), _radius(8.0f) { } entity::~entity() { } void entity::init() { } void entity::tick(int move_clipped) { } void entity::draw(draw_context* dc) { dc->translate(_pos.x, _pos.y); dc->rotate_z(_rot); dc->sha...
55eadf980181707459ea115e1c10379201d1a3fc
c0d9707441411facd2a1ad0864dadcae50d48ff2
bootingman/fuchsia2
/zircon/system/ulib/fs/watcher.cpp
C++
cpp
5,743
permissive
// Copyright 2017 The Fuchsia 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 <stdlib.h> #include <string.h> #include <sys/stat.h> #include <unistd.h> #ifdef __Fuchsia__ #include <zircon/device/vfs.h> #include <zircon/sysca...
2c0b419c5c68c361b2e2373e498a4a3e33a09256
32c98241cd1aea6701627a9d8d5f39cbdda1d6a7
syzwdong/ThinkingInCppNote
/B_对象的创建与使用/F_文件读写/FillStrings.cpp
C++
cpp
503
no_license
// // Created by 何时夕 on 2017/12/8. // #include <string> #include <fstream> #include <iostream> using namespace std; int main(){ // string 具有动态性 不用担心string的内存分配 // 只要将新的内容添加进去,string会自动扩展内存 ifstream in("FillStrings.cpp");//创建文件的输入流 string s , line; while (getline(in , line)){//不断从输入流中获取数据 s...
acf8b5dcf5f068745317dc6baadd442ce80f0cb7
a6ce0bf69f5f02b649059695f24b44c82f5b8000
kyle-ilantzis/samurai-dash
/Source/ParticleDescriptor.cpp
C++
cpp
5,709
no_license
// // COMP 371 Assignment Framework // // Created by Nicolas Bergeron on 15/7/15. // with help from Jordan Rutty // // Copyright (c) 2014-2015 Concordia University. All rights reserved. // #include "ParticleDescriptor.h" // V1,V2,V3 are mutally exclusive, they decide which fountain descriptor to use. #define V...
826b0048e2fb977c7c86146715311bae46d76230
429b2fc561f89a43aa19624ef44379051f1a526a
ugozapad/TheZombieEngine
/zombie/code/zombie/ngrass/src/nvegetation/nvegetationmeshcacheentry.cc
C++
cc
5,236
no_license
#include "precompiled/pchngrass.h" //------------------------------------------------------------------------------ // nvegetationmeshcacheentry.cc // (C) 2005 Conjurer Services, S.A. //------------------------------------------------------------------------------ #include "nvegetation/nvegetationmeshcacheentry....
fc972d5c70e90280ef556da801d82c0ae1f1d1b2
7c1acc91f0dc6661d3cf4036520ba104e0aa3f00
zeborrego/opensource.apple.com
/src/llvmCore/llvmCore-3418.0.81/lib/Target/X86/X86Subtarget.cpp
C++
cpp
12,138
permissive
//===-- X86Subtarget.cpp - X86 Subtarget Information ----------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
157f9a6a50f75830a2038ffea6a409e1b4b510d9
4d990bbc635ea0e3ebd2c5fad24d756a80bfcfd8
zhuwq0/AdFem.jl
/deps/Advection/Advection.cpp
C++
cpp
10,668
permissive
#include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/tensor_shape.h" #include "tensorflow/core/platform/default/logging.h" #include "tensorflow/core/framework/shape_inference.h" #include<cmath> // Signatures for GPU kernels here using namespace tensorflow; #include "Advection.h" RE...
e0f565578d09909814fb2f095d09b6c364de1913
7d87f80ea2c4bef9d008bc79f9ce6ed1a20cfac7
zcoco99/minimu9-ahrs
/minimu9.cpp
C++
cpp
9,756
permissive
#include "vector.h" #include "minimu9.h" #include "exceptions.h" #include <stdio.h> #include <unistd.h> #include <iostream> #include <fstream> #include <wordexp.h> minimu9::comm_config minimu9::auto_detect(const std::string & i2c_bus_name) { i2c_bus bus(i2c_bus_name.c_str()); minimu9::comm_config config; // Det...
aa1693edd03c0a8377080b8473ac47f29d394e6f
32ea8d47aa9ffd8dd9687da904276d3e69e14965
MichaelMiao/chromium
/chrome/browser/ui/login/login_prompt.cc
C++
cc
23,166
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/login/login_prompt.h" #include <string> #include <vector> #include "base/bind.h" #include "base/command_line.h" #include...
462adb201255e5ab1d9bb391cbc8a8b715ca57b0
b71b0a3e752e63bd04e7e0f9cc3b224db9da78d0
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE124_Buffer_Underwrite/s01/CWE124_Buffer_Underwrite__char_declare_loop_82a.cpp
C++
cpp
2,575
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE124_Buffer_Underwrite__char_declare_loop_82a.cpp Label Definition File: CWE124_Buffer_Underwrite.stack.label.xml Template File: sources-sink-82a.tmpl.cpp */ /* * @description * CWE: 124 Buffer Underwrite * BadSource: Set data pointer to before the allocated m...
e41358b1b852d4aa3044402406200c7e4cbb3ad2
c79a7a68e91bf28dde43a48cbddf680c892f8476
shauryauppal/Algo-DS-StudyMaterial
/GRAPH THEORY/1.BFS using linklist(list).cpp
C++
cpp
1,289
permissive
//BFS using list list #include <bits/stdc++.h> using namespace std; class Graph { int V; list <int> *adj; public: Graph(int m) { V=m; adj=new list<int>[V]; } void addedge(int v,int w) { adj[v].push_back(w);//link(edge) from v to w added } vo...
057d7edbbadcd4f3508d57e2d375ec4098ecaece
15e55680d4457ad6e029606199739cfaffde4773
LogCreative/ProblemSolving-Assignments
/Week08/FLTKUseAndDesign/FLTK1/3/Binary_tree.cpp
C++
cpp
1,306
no_license
#include "Binary_tree.h" Binary_tree::Binary_tree(int _N, Point _xy, Color color): N(_N),xy(_xy) { set_color(color); calc_nodes(); } void Binary_tree::calc_nodes() { if (N == 0) return; add(xy); //废除第 0 个节点 int layer_num = 1; double interval = pow(2, N - 1) * w; Point bottom_left = Point(xy.x + interval ...
06bded813f7cba0d11b212a135be5a06a0bbb164
a86313f434c8388aae66e3ccd670473bf3fefcdd
ric2b/Vivaldi-browser
/update_notifier/thirdparty/wxWidgets/tests/misc/pathlist.cpp
C++
cpp
949
permissive
/////////////////////////////////////////////////////////////////////////////// // Name: tests/misc/pathlist.cpp // Purpose: Test wxPathList // Author: Francesco Montorsi (extracted from console sample) // Created: 2010-06-02 // Copyright: (c) 2010 wxWidgets team //////////////////////////////////...
c1f7e3770a760b66ab588aac5c630d830cd35896
8d8b7ae7d8a56ac42794945fd6c733777eba7328
meniossin/src
/components/cryptauth/fake_remote_device_provider.cc
C++
cc
653
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 "components/cryptauth/fake_remote_device_provider.h" namespace cryptauth { FakeRemoteDeviceProvider::FakeRemoteDeviceProvider() = default; Fak...
18dd14d68b4b8f6112dae4808ad5e4990ca3f96e
433b2746f3f20ee6d2251ff19b226357887776d4
dankoga/URIOnlineJudge--C-
/uri_1115.cpp
C++
cpp
674
no_license
#include <iostream> #include <array> #include <string> int main() { std::array<std::string, 4> tableQuadrants{ "primeiro", "segundo", "quarto", "terceiro" }; int x, y; while(std::cin >> x >> y && x*y != 0) { auto code = static_cast<size_t>(x < 0); code ...
7a8536be95b44375bb9922a731a6f40495347daa
b4f6618d28c70d3feaa3099650d2703733c0b52d
jonahisadev/serenity
/Kernel/Devices/SerialDevice.cpp
C++
cpp
4,956
permissive
/* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #include <Kernel/Arch/x86/IO.h> #include <Kernel/Devices/DeviceManagement.h> #include <Kernel/Devices/SerialDevice.h> #include <Kernel/...
d649176884f5ac9555250d8ba808b3401a86b1d7
c8238d1d956d110640c0cb1bf89cb4a6d57d738e
ivilab/kjb
/lib/gr_cpp/test/test_gl_camera.cpp
C++
cpp
9,526
no_license
/* $Id$ */ /* =========================================================================== * | | Copyright (c) 1994-2010 by Kobus Barnard (author) | | Personal and educational use of this code is granted, provided that this | header is kept intact, and that the authorship is not misrepresented, that ...
e69f048be1ab46034ab27a9d89e250489a426898
7fb1d824c702951a5ffbdff43203029e7d6eb7bf
masahi/tvm
/src/relay/backend/contrib/dnnl/query_layout.cc
C++
cc
14,729
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License")...
8cc164cfb39927bef0bd9be8322097529bce9f9f
47d789e31c17d6f6960fa4c1037b1bce54b36dc1
openunderlight/ULServer
/libsrc/gmsg/GMsg_GetPlayerName.cpp
C++
cpp
1,636
permissive
// GMsg_GetPlayerName.cpp -*- C++ -*- // $Id: GMsg_GetPlayerName.cpp,v 1.1 1998-04-24 16:18:04-07 jason Exp $ // Copyright 1996-1997 Lyra LLC, All rights reserved. // // message implementation #ifdef __GNUC__ #pragma implementation "GMsg_GetPlayerName.h" #endif #ifdef WIN32 #define STRICT #include "unix.h" #include ...
5d39f62db3a569660b1cd8bb16d8c109cc9a0540
f305264f036c0e8658d461bc83b3ffd07f003139
HyunJin1111/Zelter-The-GungeonD
/Zelter-The-GungeonD/bulletKingAttack2.cpp
C++
cpp
1,578
no_license
#include "stdafx.h" #include "bulletKingAttack2.h" #include "player.h" bulletKingState * bulletKingAttack2::InputHandle(bulletKing * bulletKing) { if (_count >= 25) return new bulletKingIdle(); if (bulletKing->getBulletKing().currentHp <= 3) return new bulletKingDeath(); return nullptr; } void bulletKingAttack2::e...
6b9663909d3dc75f83eb50a737c5b3c302c625e3
3af2e5908f10c2cdc478485b4c0991848e6b6650
jjzhang166/WinNT5_src_20201004
/NT/com/svcdlls/trksvcs/dltadmin/enumoid.cxx
C++
cxx
5,451
no_license
#include <pch.cxx> #pragma hdrstop #include <ole2.h> #include "trkwks.hxx" #include "dltadmin.hxx" BOOL DltAdminEnumOids( ULONG cArgs, TCHAR * const rgptszArgs[], ULONG *pcEaten ) { LONG iVol = 0; LONG iArg = 0; BOOL fSuccess = FALSE; BOOL fCrossVolumeOnly = FALSE; BOOL fShow...
a646b0e6134109c73f7e3188999ab3c26ceb399d
f858f03d7c6162ce0fed1df57a2cb94c72b5b590
Smaugmuel/Remade_3D_Project
/Engine/Events/EventReceiver.hpp
C++
hpp
358
no_license
#ifndef EVENT_RECEIVER_HPP #define EVENT_RECEIVER_HPP #include "Event.hpp" // Each inheriting class needs to check which event type was sent, and then static_cast the value to a pointer of the corresponding value type class EventReceiver { public: EventReceiver() {} virtual ~EventReceiver() {} virtual void Receiv...