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
90bc2311876b1cdf20e3bc634dfad619b5ab7fa7
59dbb541aa88e7d0f7b285f897ee73fb092f75e9
Elzair/simple-renderer
/src/utils.hpp
C++
hpp
2,502
no_license
#pragma once #include <cstdint> #include <string> #include <vector> #define GLFW_INCLUDE_VULKAN #include <GLFW/glfw3.h> /* * File IO */ std::vector<uint8_t> ReadFile( const std::string& filename ); /* * Formats */ VkFormat FindSupportedFormat( VkPhysicalDevice physical, ...
1a585f1ffd72ce018a3ed9420926a658e57afe03
59a5089364208d1230166144f83948189ab38fde
LineageOS/android_external_perfetto
/src/base/temp_file.cc
C++
cc
2,382
permissive
/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
97f6486668b44099ef38fda16b5e54d8a06ec2b8
d0ca35532e9142a47e4d7c2ac2fe8f09e9e8fd5b
EOTSIO/EOTS
/programs/nodeos/main.cpp
C++
cpp
3,593
permissive
/** * @file * @copyright defined in eosio/LICENSE.txt */ #include <appbase/application.hpp> #include <eosio/chain_plugin/chain_plugin.hpp> #include <eosio/http_plugin/http_plugin.hpp> #include <eosio/history_plugin.hpp> #include <eosio/net_plugin/net_plugin.hpp> #include <eosio/producer_plugin/producer_plugin.hpp...
3dc4ca9a100a74d2f0a13bbb9bdf29cfc72eaed6
981629a7bfc2fcea37e08ec06934bcb3b2b5390f
AbrahamTinajero/Good-Resistor-Program
/main.cpp
C++
cpp
1,752
no_license
/* Title: Resistor Program Filename: main.cpp Programmer: Abraham Tinajero For Instructor: Dr. Ed Polak Date Created: November 05, 2018 Date Due: November 16, 2018 Revised Date: December, 2018 Complete with minor issues with exiting loop first */ #include <cstdlib>//needed for system() functions to clear and pause s...
2238b7788a6f90faf705ab2935f11f8c0853baba
d53546b808ef9cf9c522bd0b12a1ffdcd562f19c
etamimi93/NJOY21
/src/njoy21/input/RESXSR/Card2/Eps/test/Eps.test.cpp
C++
cpp
1,208
permissive
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include "njoy21.hpp" using namespace njoy::njoy21::input; SCENARIO( "eps values", "[RESXSR],[Card2],[Eps]" ){ GIVEN( "valid values" ){ for( auto eps: {0.01,0.1,1.0,10.0,100.0} ){ THEN( "the correct value is returned" ){ iRecordStream<cha...
e597c9b631eb1af280626e8fb0488fb1b751961f
b365005e4dcb75ed607fe8548cfc4547e987e6a1
chhzh123/heterocl-demo
/bnn/reactnet/project-cosim/kernel.cpp
C++
cpp
157,159
no_license
// HASH:3946627534 #include <gmp.h> #define __gmp_const const #include <ap_int.h> #include <ap_fixed.h> #include <ap_int.h> #include <ap_fixed.h> #include <ap_axi_sdata.h> #include <hls_stream.h> #include <hls_math.h> #include <math.h> #include <stdint.h> #include "kernel.h" #include "const.h" void test(ap_fixed<32, 2...
2c786d3a4b2f9d57a78a434dad763ea0b65b65a7
6455f9aa4e5e20a0b67d93185d8966bd457389b3
tamoghna21/KIdnapped_Vehicle_Localization
/src/main.cpp
C++
cpp
6,351
no_license
#include <uWS/uWS.h> #include <iostream> #include "json.hpp" #include <math.h> #include "particle_filter.h" using namespace std; // for convenience using json = nlohmann::json; // Checks if the SocketIO event has JSON data. // If there is data the JSON object in string format will be returned, // else the empty stri...
fc5cd049d21fe91b8e606c9b725ac492218d8b95
f33bbbf8ae2f064ddc0ab36569ca787ad68d4643
MrDesTinY/huangchong
/停车场管理软件绑定车道加密狗封装库/Encrypt/IVMSDogMaker.cpp
C++
cpp
3,254
no_license
#include "IVMSDogMaker.h" CIVMSDogMaker::CIVMSDogMaker() { } CIVMSDogMaker::~CIVMSDogMaker() { } /**************************************************************************************************** * @函数名称: MakePRDog * @功 能: 制作视频分析记录仪加密狗 * @参 数: * @wDays 使用天数 * @nChannels 通道数 * @nLanes 车道数 * @nPlatForm 平台连接 ...
298edbb275001e45e693b9c6bc9e3aa033fce45f
181e762f35593c23f360fde8539888ed7d596ef0
skonnov/mp2-lab3-stack
/test/tests.cpp
C++
cpp
4,781
no_license
#include "tformula.h" #include "gtest.h" TEST(TStack, can_create_stack_with_positive_length) { ASSERT_NO_THROW(TStack(5)); } TEST(TStack, cant_create_stack_with_negative_length) { TStack st(-1); EXPECT_EQ(DataNoMem, st.GetRetCode()); } TEST(TStack, can_put_element_in_stack) { TStack st(2); ASSERT...
b78f8767540ea6d505809272ac7f25b175a55d45
8084edc260b915756b6e61ea88893b122de31b2c
sdh0611/UE4_ProjectZ_422
/Source/ProjectZ_422/Private/Character/Player/ZPlayerState.cpp
C++
cpp
1,554
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "ZPlayerState.h" #include "ZBasePlayerController.h" #include "ZCharacter.h" #include "UnrealNetwork.h" #include "ZLobbyPlayerController.h" #include "Engine/World.h" AZPlayerState::AZPlayerState() { Kills = 0; } void AZPlayerSt...
da542b57a0da773be131e901ec73bdca8224a546
94730f705fe727152dbffe6908aefa22b42cb964
1998factorial/Codeforces
/contests/contest594Div2/C.cpp
C++
cpp
499
no_license
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> using namespace std; typedef long long ll; typedef pair<int , int > ii; const ll mod = 1e9 + 7; const int maxn = 3e5 + 10; int M , N; ll F[maxn]; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N >> ...
aea8fd9faea39694f896a043b7d9a3652188c7a5
23b20d2b80621d4b32f89b1674836410d597527f
earringyyr/OI-Codes
/BZOJ4504.cpp
C++
cpp
2,374
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <queue> #include <map> using namespace std; #define inf 1e18 struct tree { int l; int r; long long mx; long long sum; } tr[100005 * 100]; struct node { int id; long long sum; node(int aa = 0, long long bb ...
c68e13a60f9b247961b0201bb43fc32822b60767
73a3730da913c8cb67dd15ebc9dcf76daabac5a4
airwindows/airwindows
/plugins/LinuxVST/src/ZRegion/ZRegion.cpp
C++
cpp
6,007
permissive
/* ======================================== * ZRegion - ZRegion.h * Copyright (c) 2016 airwindows, Airwindows uses the MIT license * ======================================== */ #ifndef __ZRegion_H #include "ZRegion.h" #endif AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new ZRegion(a...
148f04a93ce131cd119f1eac068b19cf3169adbf
2f7475f354b4f0a81a275e699c8ff6566c62f447
S-H-GAMELINKS/SimpleMusicPlayer
/SimpleMusicPlayer/main.cpp
C++
cpp
4,284
permissive
// Simple Music Player // coding by S.H. (GAMELINKS) // This source code license is MIT, see the license // include DxLib #include "DxLib.h" // include Boost library #include <boost/filesystem.hpp> #include <boost/foreach.hpp> namespace fs = boost::filesystem; // include openCV #include <opencv2/opencv.hpp> // inc...
2a1e9801f79d5e5ee6e71dbcf8efca48a0711391
87ab5c7e0a20bc8238f7c7c2dbd08acb2bc89f5f
CodingSpiderFox/restc-cpp
/tests/HttpReplyTests.cpp
C++
cpp
14,930
permissive
// Include before boost::log headers #include "restc-cpp/logging.h" #include <boost/log/core.hpp> #include <boost/log/trivial.hpp> #include <boost/log/expressions.hpp> #include "../src/ReplyImpl.h" #include "UnitTest++/UnitTest++.h" using namespace std; using namespace restc_cpp; namespace restc_cpp{ namespace u...
54ab41078704034cc199a8410e71975f1c994281
06143b13448be90b416243e4f9a3ad71d3cad176
mbellman/adamantine
/adamantine/subsystem/AssetCache.cpp
C++
cpp
495
no_license
#include "subsystem/AssetCache.h" AssetCache::~AssetCache() { for (auto& [key, texture] : textureMap) { delete texture; } textureMap.clear(); } void AssetCache::addTexture(const Texture* texture) { textureMap.emplace(texture->getPath(), texture); } const Texture* AssetCache::createTexture(std::string pa...
5c1d169406853ca0f1c078168166affab5b5deda
a3776c2e80525b6c1258bc3bed3d9f18c1e83231
patrickdolloso/DAGMC
/mcnp5/mcnp_funcs.cpp
C++
cpp
33,318
permissive
#include "mcnp_funcs.h" #include "DagMC.hpp" using moab::DagMC; #include <limits> #include <iostream> #include <algorithm> #include <assert.h> #include <stdlib.h> #include <string.h> #ifdef CUBIT_LIBS_PRESENT #include <fenv.h> #endif // globals #define DAG DagMC::instance() #define DGFM_SEQ 0 #define DGFM_READ ...
76114c002236d69299ad8c67fad87e0ce74d0718
d65f29a55c6479b6d0075990c1f3a6ad38206a49
CyberShadow/DBugTests
/bugs/13152/src/bcd/fltk/Fl_Widget.cc
C++
cc
11,068
no_license
/* THIS FILE GENERATED BY bcd.gen */ #include <stdlib.h> #include <string.h> #include "../bind.h" #include "FL/Fl_Widget.H" extern "C" { void _BCD_delete_8Fl_Label(Fl_Label *This) { delete This; } void _BCD_set__ZN8Fl_Label5valueE(Fl_Label *This, char const * x) { This->value = x; } char const * _BCD_get__ZN8Fl_Label5v...
f81c163056489f0a4b246d014c9815216a1cd3bb
b27ebf9d5e1be5cf6c9aca06896d118c56860ad8
martinmozi/sql-wrapper
/src/connection_impl.cpp
C++
cpp
4,706
permissive
#include "connection_impl.h" #ifdef PQ_BACKEND #include "pq/connection_impl.h" #include "pq/transaction_statement_impl.h" #include "pq/selector_impl.h" #endif #ifdef SQLITE_BACKEND #include "sqlite/connection_impl.h" #include "sqlite/transaction_statement_impl.h" #include "sqlite/selector_impl.h" #endif #ifdef ORACL...
a9db9d27bb2b2f70bec63f4a8e039211112d85cf
867e0e456b923d6ff08554c115bf55a992499e3f
rajatgirotra/study
/cpp/polymorphism_and_virtual_functions/VariantReturn.cpp
C++
cpp
1,945
no_license
/* The Derived3 class in NameHidin2.cpp suggests that you cannot modify the return type of a virtual function during overriding. This is generally true, but there is a special case in which you can slightly modify the return type. If youre returning a pointer or a reference to a base class, then the overridden vers...
87ee0732af6b4ba6687d06123e553d22f4400b7b
d428b21747652c9f6b1377dd14e7cb15bf4740f9
nuzumglobal/Elastos.Trinity.Alpha.Android
/src/components/component_updater/component_installer.cc
C++
cc
16,210
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 "components/component_updater/component_installer.h" #include <utility> #include "base/bind.h" #include "base/files/file_enumerator.h" #include...
b83816a017c5680e6258e592d974c4a67b232318
8a9b377b9aab05cdbac96fa9230f3faa9380ec2e
yuatpocketgems/aws-sdk-cpp
/aws-cpp-sdk-sagemaker/source/model/ListProcessingJobsResult.cpp
C++
cpp
1,437
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/sagemaker/model/ListProcessingJobsResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include ...
7a408510ba38447bbfdf2d5ee6187dcc06676f5d
cf9a4f864f442b05a69ade52011b18440c9852e2
bgoonz/UsefulResourceRepo2.0
/_REPO/MICROSOFT/cocos2d-x/cocos/network/HttpCookie.cpp
C++
cpp
4,657
permissive
/**************************************************************************** Copyright (c) 2013-2017 Chukong Technologies Inc. http://www.cocos2d-x.org 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 th...
3259d51055af3ee6a202a8cf0c7e742863cf01b6
bc49274bee47a2d6b3de4bbf0b2de5a313f0ccab
blowery/phantomjs
/src/qt/src/3rdparty/webkit/Source/WebCore/generated/JSHTMLIFrameElement.cpp
C++
cpp
19,783
permissive
/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation...
e678cd3ff06d9c1251fa62ada464c766bc6742e8
b9fce333619bece6edcd48a268c1bb7a212385fc
ALEHACKsp/xtd
/tests/xtd.core.unit_tests/src/argument_out_of_range_exception.cpp
C++
cpp
17,736
permissive
#include <xtd/argument_out_of_range_exception.h> #include <xtd/xtd.tunit> using namespace xtd; using namespace xtd::tunit; namespace unit_tests { class test_class_(test_argument_out_of_range_exception) { public: void test_method_(default_creator) { argument_out_of_range_exception e; assert::are_eq...
cd2015d8e42a51c5dbcbbd3e398bca0323675241
2e843d8365838e27a9a8e03cd98ad1761db36d1f
iphantomsky/open-phd-guiding
/myframe.cpp
C++
cpp
84,099
permissive
/* * myframe.cpp * PHD Guiding * * Created by Craig Stark. * Copyright (c) 2006-2010 Craig Stark. * Refactored by Bret McKee * Copyright (c) 2012 Bret McKee * All rights reserved. * * This source code is distributed under the following "BSD" license * Redistribution and use in source and ...
87e621bcd2fec9b32e1b5e338453b1906f7742b8
11cf5add57b758e80bad53adf89da60e319ae0c4
WilliamNTN/Competitive-Programming
/Ladder1400+/72 - 235A.cpp
C++
cpp
426
no_license
#include <bits/stdc++.h> using namespace std; #define LL long long int int n; int main(){ cin.tie(0); ios_base::sync_with_stdio(0); cin>>n; LL ans; if(n <= 3){ if(n == 1) ans = 1; if(n == 2) ans = 2; if(n == 3) ans = 6; } else{ if(n%2 !+ 0) ans = n*(n-1)*(n-2); else{ ans = 0 for(LL i = (n...
1e3951d4833547bfdde52dec52843c1adb2b9678
2ca09995bda3ff2623ba80b956356e1a24763fc0
niuxu18/logTracker-old
/second/download/git/gumtree/git_repos_function_2713_git-2.8.6.cpp
C++
cpp
873
no_license
static int verify_absent_1(const struct cache_entry *ce, enum unpack_trees_error_types error_type, struct unpack_trees_options *o) { int len; struct stat st; if (o->index_only || o->reset || !o->update) return 0; len = check_leading_path(ce->name, ce_namelen(ce)); if (!len) return 0; else if (le...
1671bf97428610b5248bf293e14ecadd2352f5bb
d32556ff28da759ba904071c70dcf3cad9a307f8
someblue/ACM
/CF/277.5-div2/D/main.cpp
C++
cpp
1,013
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; typedef pair<int,int> pii; const int INF = 1e9; const double eps = 1e-6; const int N = 3010; const int M = 30010; int cas = 1; struct _edge{ int u,v; }edge[M]; bool g[N][N]; int c[N][N]; int n,...
c3a2bbff7658d0f03dc0484adaf8f38611b76fa0
608bf4c50c03f9f36b9f469c53397aca7d144128
solisoft/arangodb
/tests/Fuerte/test_connection_timeouts.cpp
C++
cpp
4,448
permissive
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2018 ArangoDB GmbH, Cologne, Germany /// /// 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...
aba5576452dc98b1582164a56e442d3e496c4cab
dda2dd421f3fe3ce11e6de736e6e704c97693f93
robinastedt/perfect-mines
/src/controller/Controller.hh
C++
hh
862
no_license
#pragma once #include <view/View.hh> #include <model/GameState.hh> #include <memory> namespace pmines { namespace controller { class Controller { public: Controller(); ~Controller(); int run(int argc, char** argv); void action_tile_lef...
278955e4c86c7d4abb98c911b19ec9e43fb08b10
4f174b51e196abdf5139af1641f3a614b1678eb3
massbrowser/android
/chromeos/network/client_cert_resolver.cc
C++
cc
21,629
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/network/client_cert_resolver.h" #include <cert.h> #include <certt.h> // for (SECCertUsageEnum) certUsageAnyCA #include <pk11pub.h> #...
95572bc4fddae6293a4101f515456b4795b00729
20cf154a12dfd83003c74311df60f3470ef0092f
ausdruck/Karabiner
/src/core/kext/VirtualKey/VK_LAZY.hpp
C++
hpp
394
permissive
#ifndef VIRTUALKEY_VK_LAZY_HPP #define VIRTUALKEY_VK_LAZY_HPP class KeyCode; class ModifierFlag; class Params_KeyboardEventCallBack; class AutogenId; namespace org_pqrs_Karabiner { namespace VirtualKey { class VK_LAZY final { public: static bool handle(const Params_KeyboardEventCallBack& params, AutogenId autogenId...
1ad56a399025c969f90125da5ef951dc3452ee15
a0db82911fcf4e3a84cf7c9ccad703daf52c4c76
nsgomez/sc4fix
/EASTL/test/source/TestSmartPtr.cpp
C++
cpp
54,825
permissive
///////////////////////////////////////////////////////////////////////////// // Copyright (c) Electronic Arts Inc. All rights reserved. ///////////////////////////////////////////////////////////////////////////// #include <EABase/eabase.h> #include "EASTLTest.h" #include "GetTypeName.h" #include <EAStdC/EAString.h>...
3f720730ed6a6331f0176043905d569dbe55989f
da9ee6f2319d25eae7ca1a536b58fd96509ce10d
sohag16030/ACM-Programming
/Codeforces/codeforces903C.cpp
C++
cpp
737
no_license
/*BISMILLAHIR RAHMANIR RAHIM*/ /*YOUR OUTPUT WILL BE REWARDED,NOT YOUR EFFORTS*/ #include<bits/stdc++.h> #define sf scanf #define pf printf #define pi acos(-1.0) #define sz 10000001 #define ll long long #define pb push_back #define mp make_pair #define f first #define ...
166a43b1c53d8dbfe6995b962907a023c298adfc
1549bd7699051c3e16504a3adc1ca1b78a7ed7e8
thoughtworksarts/Dual_Brains
/drafts/quickSpectrogram_2/libraries/liblsl/external/lslboost/asio/detail/function.hpp
C++
hpp
1,106
permissive
// // detail/function.hpp // ~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.lslboost.org/LICENSE_1_0.txt) // #ifndef BOOST_AS...
ebe163ac9636b89046b8a86767c2836a62a5fb07
fa93cd6afaf45e57f68dc4c6091909ae2ce0d4d4
pevalme/bfc_fork
/src/core/complement.cc
C++
cc
13,101
permissive
/****************************************************************************** Synopsis [Bfc - Greedy Analysis of Multi-Threaded Programs with Non-Blocking Communication.] Author [Alexander Kaiser] (C) 2011 - 2014 Alexander Kaiser, University of Oxford, United Kingdom All rights reserved. Redistr...
5738397e475eef29241fedbdf6ea423f9b865661
7a1d1d9537a431feed63aedde0f95c5001379144
isubasinghe/parallel-smith-waterman
/code/isithasubasinghe_kseqalign.cpp
C++
cpp
9,881
no_license
/* ** ** TESTED ON: GNU 10.3.0 & GNU 11.1.0 ** COMPILING COMMAND: g++ isithasubasinghe_kseqalign.cpp -I. -fopenmp -static-libstdc++ -O3 -fno-exceptions -fno-rtti -march=native -funroll-loops -pedantic -Wall -o kseqalign ** ** OMP_NUM_THREADS should ideally be chosen such that entire NUMA nodes are dedicated to the prog...
4e144cbf0dfd96cbda105b1cd0bd20b032c1a00a
77fee6338db561288d213355287ac7c559a13d9e
ujjawalgupta29/Coding-Stuff
/LeetCode/July Challenge/Remove Linked List Elements.cpp
C++
cpp
798
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeEleme...
f1ab64def4b5088ce02739802ee2a4f1bca652ea
47706a4b8fb20408e887a8d938d55fa2ce9df1c2
twombat/yolo
/cpptut/vector.cpp
C++
cpp
4,520
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; template <typename T> void hex_dump(const T &dude) { const unsigned char *c = reinterpret_cast<const unsigned char *>(&dude); for (size_t i = 0; i < sizeof(dude); ++i) printf("%02x ", c[i]); std::cout << "\n"; ...
c71bca67ca371f197bdabc22d2ed4deeab7ed331
1f408503c0b007bfdd15fcfb918521b1640c26f6
muttleyxd/chromium
/third_party/blink/renderer/core/layout/ng/ng_fragmentation_utils.cc
C++
cc
36,419
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 "third_party/blink/renderer/core/layout/ng/ng_fragmentation_utils.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_pa...
15a19bc07dd50c6769ec46040139f7e4629c1e59
94edccb99ab4d65f4da4bd89e5e9a28a8be81a5d
goeb/reference
/C++/const_char.cpp
C++
cpp
350
no_license
#include <iostream> using namespace std; char * getOne() { char *p = "toto-11"; return p; } char * getTwo() { char *p = "titi-22"; return p; } main(int argc, char **argv) { const char * s; if (atoi(argv[1]) == 1) { s = getOne(); } else { s = getTwo(); } ...
851bf5da4e46ae8336a0059e4a0362eb375cf964
ec81210cd28dd898776c4a9699e9357f1ee25a27
ajis01/systolicMM
/chipyard/tools/chisel3/test_run_dir/PopCountTester/2020030622461411715763985108646894/VPopCountTester__Syms.cpp
C++
cpp
594
permissive
// Verilated -*- C++ -*- // DESCRIPTION: Verilator output: Symbol table implementation internals #include "VPopCountTester__Syms.h" #include "VPopCountTester.h" // FUNCTIONS VPopCountTester__Syms::VPopCountTester__Syms(VPopCountTester* topp, const char* namep) // Setup locals : __Vm_namep(namep) , __Vm_activity(fa...
8ccd8ef475d7e28aa95c98362e03f67d2fdd1ae4
d5abed872c85fc5fda80b7ec789c51caf251d0f4
lordazzi/Time-Travel-Open-Tibia-Server
/cpp/databasemanager.cpp
C++
cpp
73,011
permissive
//////////////////////////////////////////////////////////////////////// // OpenTibia - an opensource roleplaying game //////////////////////////////////////////////////////////////////////// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License ...
4ba60d9461e63b031c53e4337a9460d600e33165
fac0216d49d02de9e2d05c6d322d013d57bbd855
radix-ru/c6-s11-dt
/lab-3/ab/ab.cxx
C++
cxx
2,215
no_license
#include <limits> #include <vector> #include <random> #include <iostream> /// @file /// Pseudo code for alpha-beta algorithm and its trivial testing. template<typename T> static constexpr T inf = std::numeric_limits<T>::infinity(); namespace alpha_beta { template<class Node, typename Payoff> static inline Payoff...
cbc0da0a86f7907cb0a4c5a758d373d13d3f4f64
b1227f9c3e554c34dd545d1c437bdaeb62b51932
tejdeep9/coding-practice
/Sample Programs/Anagrams.cpp
C++
cpp
1,158
no_license
#include <iostream> #include <string> #include <algorithm> #include <utility> using namespace std; bool anagrams(string str1, string str2) { if(str1.length()!=str2.length()) return false; transform(str1.begin(), str1.end(), str1.begin(), ::tolower); transform(str2.begin(), str2.end(), str2.begin(), ::tolower); s...
da62f771f621a489ee2b3f11b45640aea98c1199
c33b8d74d0d57eba5b62f56d78c7a19c88382306
devcoin/core
/src/interfaces/handler.cpp
C++
cpp
1,311
permissive
// Copyright (c) 2018-2020 The Bitcoin Core and Devcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <interfaces/handler.h> #include <boost/signals2/connection.hpp> #include <utility> namespace int...
f5f1484e23875d8f27975425aa0a733471711a07
611e0aa49e3cb8b52ee056a654e70725ede6ef70
yanshuyu/learn-opengl
/common/SceneObject.cpp
C++
cpp
10,021
no_license
#include"SceneObject.h" #include"Renderer.h" #include"RenderableComponent.h" #include<stack> #include<queue> #define SAFE_UNWRAP_OBJECT_ITERATOR(itr) itr == m_childs.end() ? nullptr : itr->get(); SceneObject::SceneObject(const std::string& name) :m_name(name) , m_id(0) , m_transform(this) , m_isEnable(true) , m_isV...
32897df318ffccabdeac2fc6a66f62113ad12e0c
e702f93b37293ca28e4365524585abb4bb3f0660
Balakumaran-Bala/USACO
/January_Silver_2016/div7.cpp
C++
cpp
1,112
no_license
#include <iostream> #include <algorithm> #include <vector> #include <fstream> #include <unordered_set> #include <unordered_map> using namespace std; class Solution { private: long long N; long long id; public: void div7() { ifstream fin("div7.in"); ofstream fout("div7.out"); fin >>...
51c612d8bbd29bc18102b002e930fa77177dbfbe
74956b21f600043c31512ba83777151dcc126516
liunianjie/mvfst
/quic/state/stream/test/StreamStateFunctionsTest.cpp
C++
cpp
10,318
permissive
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ #include <quic/state/stream/StreamStateFunctions.h> #include <gtest/gtest.h> #include <quic/common/test/TestUtils.h> #include <q...
88ccf52c31e03cdd5e7ddaec44371a015bcee1e3
9d7a3473a344fe1e4902d8cc5f999b8a75709ee0
rschulman/measurement-kit
/src/libmeasurement_kit/ndt/run_impl.hpp
C++
hpp
6,379
permissive
// Part of Measurement Kit <https://measurement-kit.github.io/>. // Measurement Kit is free software under the BSD license. See AUTHORS // and LICENSE for more information on the copying conditions. #ifndef SRC_LIBMEASUREMENT_KIT_NDT_RUN_IMPL_HPP #define SRC_LIBMEASUREMENT_KIT_NDT_RUN_IMPL_HPP #include "src/libmeasure...
f2c5c4940201dd8c8d1e8f21a5217ea6c0c5d476
de447f59fc3663fc1d4d6b0adc267a436b39cd48
mindspore-ai/models
/research/nlp/atae_lstm/ascend310_infer/src/main.cc
C++
cc
5,268
permissive
/** * Copyright 2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
423daa5ddaf9629011009eb674c44f12e2e99f41
cf24cc51cc92ae8ad8b56f64a9c1830f57e06f3f
Dichi13/UDP-Sliding-Window
/src/sender.cpp
C++
cpp
5,448
no_license
#include <bits/stdc++.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <queue> #include "utility.cpp" #include <thread> using namespace std; pthread_mutex_t lockQueueRecv; in...
c0f6373bbd94703c95b8c8cb66edaea296ad9303
84fafe1acdfbe65f3339e748cb4ef8d151e51f92
ATM006/acm_problem_code
/poj/2914/5603013_AC_3469MS_2060K.cc
C++
cc
2,003
no_license
/* http://acm.pku.edu.cn/JudgeOnline/problem?id=2914 */ #include <iostream> #include <algorithm> #include <cstdio> #include <cstring> using namespace std; #define MAX 1<<30; int graph[600][600],A[600],V[600],W[600]; // Stoer-Wagner Algorithm int globalMinCut(int n) { int best=MAX; for(int i=...
45aea81199f5df263f49a8237d9db197c8375bf7
7544946a058b8be77c9e7c8fd43794c0db2ceafa
rehanjavaid2001/HashTable
/wordPuzzle.cpp
C++
cpp
7,737
no_license
//Rehan Javaid, rj3dxu, 10/12/2020, wordPuzzle.cpp #include "timer.h" #include "hashTable.h" #include <vector> #include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; // We create a 2-D array of some big size, and assume that the grid // read in will be less than this size (a ...
e8e805d13170563eea6b02709c35528a5bec9fd1
caa74797ea240deb7b2f243a0d6c54df6124ae3a
hazeltonbw/RPG
/linked_list.cc
C++
cc
1,586
no_license
#include <iostream> #include <cmath> #include <algorithm> #include <vector> using namespace std; struct LL { int data; LL *next; LL(int new_data, LL* new_next) {data = new_data, next=new_next;} //~LL() {delete next;} }; int main() { LL *head = nullptr; while (1) { cout << "Please inser...
77d142db0a8740d203b2930e18198db55f884ef8
8218efe8de52966686c15911952a0adf2b6e0bb4
liverloop/chromium
/ui/accessibility/platform/ax_platform_node_auralinux.cc
C++
cc
56,021
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 "ui/accessibility/platform/ax_platform_node_auralinux.h" #include <stdint.h> #include <memory> #include <string> #include <utility> #include "...
7765831afe93f51261e389fe4cc786a76641114a
7ad6e01d286c882c735e752b203c346eeb81066f
ddt-hirasawa/meikai-cpp
/e_07_04/src/e_07_04.cpp
C++
cpp
2,734
no_license
/* 演習7-4 typeid演算子を使って、List7-10の関数reverceの仮引数が配列ではなくポインタであることを確認せよ 作成日 2017年5月8日 作成者 平澤敬介 */ #include<iostream> // typeid演算子を使うためのライブラリ #include<typeinfo> using namespace std; //関数の宣言 配列なのか ポインタなのか void reverse(int a[],int n); int main() { const int max = 5; //配列の要素数を定義します 変更しません int Int[max]; //int型の配列を宣言します...
1c23f01e945f5b1532a633006191da1a3c18b6ec
83eb9baa5be698555a82681016261cb6576b203c
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_new_hunk_4100.cpp
C++
cpp
398
no_license
} /* XXXX need to figure out how to do this if (s->secret) { if (ajp_msg_append_uint8(msg, SC_A_SECRET) || ajp_msg_append_string(msg, s->secret)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03228) "Error ajp_marshal_into_msgb - " "E...
c62ececa8fe1918a6f2d6ed0541332ba4913df8a
1a15799c1c719230f673361bd4fcdc884f01bede
sumanyu-21/SoftwareEngineering
/STL/Basic Implementation Details.cpp
C++
cpp
2,751
no_license
# include <iostream> # include <vector> # include <set> # include <algorithm> using namespace std; /* | set | unordered_set --------------------------------------------------------- Ordering | increasing order | no ordering | (by default) | Implementati...
d8ec7b7838d31d9aebee3aae8cf82fc23dea2454
fc7c7476c5816c0d24917134467f66e2aca3020c
iamslash/learntocode
/leetcode2/LargestMultipleofThree/a.cpp
C++
cpp
903
no_license
/* Copyright (C) 2020 by iamslash */ #include <cstdio> #include <string> #include <vector> using namespace std; // 16ms 99.21% 13.2MB 46.58% // math // O(N) O(1) class Solution { public: string largestMultipleOfThree(vector<int>& D) { vector<int> cand1 = {1, 4, 7, 2, 5, 8}; vector<int> cand...
da81da313e8ba16c5895c59b0f0ca797d1a8417d
1a9062940c586104ef264589fdd0b548923af060
green-fox-academy/CodeMasterDog
/week-06/day-06 (Practice)/01.cpp/src/Mammal.cpp
C++
cpp
260
no_license
#include <iostream> #include "Mammal.h" Mammal::Mammal(string _name ):Animal(_name) { name = _name; } void Mammal::Feed() { cout <<"Feeding..." << endl; } void Mammal::Sleep() { cout << "Sleeping..." << endl; } Mammal::~Mammal() { //dtor }
33ce8edc2484bafaed36149174ae3529fab0e01a
724ebb2ece8d4ad5b673cbad69b6320e38b6b4f6
Sabuj-Kumar/Problem_Solve
/lightoj online/Lightoj Graph(BFS,DFS)/Lightoj 1009 - Back to Underworld.cpp
C++
cpp
1,418
no_license
#include<bits/stdc++.h> #define mx 20010 using namespace std; vector<int> graph[ mx ]; map< int,int > mp; int vis[ mx ]; void BFS(int root){ queue< int > q; q.push( root ); vis[ root ] = 0; while(!q.empty()){ int m = 0,p = q.front(); if(vis[ p ] == 0) m = 1; mp[ vis[ p ...
3035ea83df9cf64041979eef60a49cc88074920c
36384e061f3e4e3100db2f33860aa24a7db534af
scottstraughan/playground-eb8w0m4e
/cpp-project/src/exercises/memory_3.cpp
C++
cpp
2,320
permissive
#include <array> #include <cassert> #include <cstdint> #include <iostream> #include <random> #include <CL/sycl.hpp> class reduction_kernel; namespace sycl = cl::sycl; int main(int, char **) { std::array<int32_t, 16> arr; std::mt19937 mt_engine(std::random_device{}()); std::uniform_int_distribution<int32_t> id...
229d00cb23d560c9ee82780c6d0b0af23e9502fd
095b9e97d3fc7b5757f525bf5a0fe4ad114a5112
junxuezheng/chromium
/chrome/browser/extensions/api/device_permissions_manager_unittest.cc
C++
cc
18,398
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 <stdint.h> #include <memory> #include "base/bind.h" #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" #include "base/...
550de5f17cb02b45423f00355856dd48b183edc4
0657c806e9b279ca96d105071deeb6515362958f
americococo/RPG_FIrst
/RPG_MyLife/Monster.cpp
C++
cpp
679
no_license
#include "Monster.h" #include "Sprite.h" #include "State.h" #include "MoveState.h" #include "MonsterIdleState.h" Monster::Monster() { _speed = 2.0f; _moveCoolTime = 0.001; } Monster::~Monster() { } void Monster::Init(float posX, float posY, int mapX, int mapY, int hp, float power) { MoveObject::Init(posX, posY,...
76ecc82d9d3b2967420d32340a48b7cbfa796750
b7580d34c470b65b05512862eb02036089e6b895
spandeyehep/HGCALAnalysisCode_2016module
/TBStandaloneSimulator/src/RunAction.cc
C++
cc
5,232
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
f028ed410b14066b166ee8fd16023c3c93e8428a
aa4c3f61c881798b8902bf4bbb1485e113adfd8d
LeFroid/ungoogled-qtwebengine-chromium
/chromium/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
C++
cc
34,154
permissive
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.h" #include <utility> #include "base/bind.h" #include "base/bind_helpers.h" #include "...
d5d9e96dd2b55d6ad20c7f6ffad315f17db98bd1
f3aa12fa4df85fec1179372dde53f9587d7ae9ba
project-oak/oak
/third_party/tflite-micro/tensorflow/lite/micro/kernels/assign_variable.cc
C++
cc
3,958
permissive
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
eded8798275f1924c9bbe6824e555e6ef8488d81
62c401d53c3197d5dc056b6aab86649cf211de16
uel-dataexchange/Opencascade_uel
/inc/PDataStd_Comment.hxx
C++
hxx
1,782
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 _PDataStd_Comment_HeaderFile #define ...
cfaf3c4c0beace06963d0b7f0b6656061138e364
27f1d0bf76c9215f53fe04fe7ad2199e73a9f551
zubietaroberto/RocketThrough
/Classes/GridContainer.hpp
C++
hpp
480
no_license
#pragma once #include "cocos2d.h" #include "GameSprite.hpp" #include <algorithm> #include <random> USING_NS_CC; class GridContainer{ private: std::vector<Point> _grid; std::vector<Point>::size_type _gridIndex; std::default_random_engine randomEngine{}; int mGridWidth = 0; int mGridHeight = 0; public: ...
9d4aa4a50e0599aeb9f82b8ff07336ebc846c0c1
fd452fd087a9644908007423389e250c2b80994e
QingshuangZhu/algorithms
/heap/heap.cpp
C++
cpp
1,386
no_license
/* * heap */ #include "heap.h" /* 向上调整 */ void upAdjust(int array[], int length, int index) { if(index > length - 1 || index < 1){ return; } int parentIndex = (index - 1)/2; int tmp = array[index]; /* 孩子结点的值 */ while(index > 0 && tmp < array[parentIndex]){ /* 最小堆 */ array[i...
a6f8aa6983bd3d90f578d3e6a3340e715c87c242
58e43c91899649219c920660642176e22c92ff52
dothithuy/ElastosRDK5_0
/Sources/Elastos/LibCore/src/elastos/core/Object.cpp
C++
cpp
3,701
no_license
#include "Object.h" #include "Thread.h" using Elastos::Core::Threading::Thread; using Elastos::Core::Threading::IThread; using Elastos::Core::Threading::EIID_ISynchronize; namespace Elastos { namespace Core { Object::Object() { IncrementDllLockCount(); mNativeObject = Threading::NativeCreateObject(); mN...
cb2026bacf9024446869af6710a51f10f300d1fe
2a5b3ae3a36cd8c7e43b529d9feca4f2a06c3258
xueliangh/Visual_computer_vision
/Median_Filter/WindowsApplication1/WindowsApplication1/MyForm.cpp
C++
cpp
457
no_license
#include "MyForm.h" #include <iostream> using namespace WindowsApplication1; [STAThreadAttribute] int main(void) { //true == 1, false == 0 // 建立任何控制項之前,先啟用 Windows XP 視覺化效果 Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // 建立主視窗並執行 Application::Run(gcnew MyForm()); ...
68f2aad1ee8168916e38b2e0376d40fa82e07d11
456e84c3894caea450214abdec8683b88973541d
chuangag/POJ
/3617.cpp
C++
cpp
711
no_license
#include<iostream> #include <stdio.h> using namespace std; int main(){ int n; cin>>n; char S[2005]; char T[2005]; for(int i=0;i<n;i++){ cin>>S[i]; } int a=0,b=n-1; //S[a]...S[b] int id=0; while(a<=b){ bool left=false; for(int i=0;a+i<=b;i++){ if(S[...
c2b21d5240d9325e4a032d7f7105be10cd598deb
7d9bac76876fd437453793ec4cbbd74ed36dc7a1
nakuljn/leetcoding-problems
/Binary_Tree_level_order_Traversal.cpp
C++
cpp
1,052
permissive
// https://leetcode.com/problems/binary-tree-level-order-traversal/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
d2b27514e9d3ce01df9b4c0fe682fce5af778469
f574836b5bd04a9e4186020de2d409ce94e74986
niuxu18/logTracker-old
/second/download/CMake/CMake-gumtree/Kitware_CMake_repos_basic_block_block_14471.cpp
C++
cpp
1,534
no_license
{ c = *bp++; state->in_count++; state->cur_fcode = (c << 16) + state->cur_code; i = ((c << HSHIFT) ^ state->cur_code); /* Xor hashing. */ if (state->hashtab[i] == state->cur_fcode) { state->cur_code = state->codetab[i]; continue; } if (state->hashtab[i] < 0) /* Empty slot. */ goto nomatch; /* ...
7767b3010c083c2ffe70c8e2f790727426fe4c73
be02611e6ff1882fa78254096476a1f1e1250c84
laquythi/laquythi.github.io
/C++/105-RenLuyen_File_DaySo/main.cpp
C++
cpp
1,020
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ void luufile(int number); int main(int argc, char** argv) { while(true){ int number; cout<<"nhap so:"; cin>>number; luufile(number...
d46a003b6d9e4b0a2767f961c5b6f39047daad13
b8e79f28fae19479b245f608f0498d2f3d0b01ff
nithish642k/binary-tree
/67)closest leaf node distance from given node.cpp
C++
cpp
1,581
no_license
#include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left,*right; Node(int data) { this->data=data; left=right=NULL; } }; int getMinDistDownToLeaf(Node *node) { if(node==NULL) return INT_MAX; if(node->left==NULL&&node->right==NULL) ...
62870dd6b2b22e195e38c03f973b32f69380cb05
81b758ca7818b3c46513b576a9c6ec22f1d06842
avatarbuss/dotnet-api-docs
/samples/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/CPP/bytesdouble.cpp
C++
cpp
2,603
permissive
//<Snippet4> // Example of the BitConverter::GetBytes( double ) method. using namespace System; // Convert a double argument to a byte array and display it. void GetBytesDouble( double argument ) { array<Byte>^byteArray = BitConverter::GetBytes( argument ); Console::WriteLine( "{0,25:E16}{1,30}", argum...
cfa2acd1a6509028f9a789229ea55546b8932516
31e4d4bddf711fb03e5a14ce92715eca55c6d40e
clear-m/quickfix
/src/C++/NullStore.cpp
C++
cpp
1,279
permissive
/**************************************************************************** ** Copyright (c) 2001-2014 ** ** This file is part of the QuickFIX FIX Engine ** ** This file may be distributed under the terms of the quickfixengine.org ** license as defined by quickfixengine.org and appearing in the file ** LICENSE includ...
0cc36b6506dd2e2ec6b3d5fb69598cf48d719031
6125eca55bba286035ae4567e0fcef7ae9ed47e7
Zeratul31/leetcode
/143-lint-Sort_Colors_II.cpp
C++
cpp
1,084
no_license
class Solution { public: /** * @param colors: A list of integer * @param k: An integer * @return: nothing */ void sortColors2(vector<int> &colors, int k) { // rainbow sort rainbow_sort(colors, 0, colors.size()-1, 1, k); return; } private: void rainbow_sort(vector...
85a9fd9da64f41d8ceb560f169408a5151b4156e
2e01d1e18400fe926aeeba5f8c7426f383805ad9
qqchen/may
/may/date.cpp
C++
cpp
2,495
no_license
#include "date.h" #include <ctime> #include <ratio> #include <chrono> #include <iostream> #include <assert.h> #include <string> #include "utils.h" namespace may { Date::Date() { } Date::Date(int year, int mon, int day, int hour, int minute) { assert(year > 0 && mon > 0 && mon <= 12 && day > 0 && day < 32 && hou...
7655866d189b26be39083ee3a52eeaf6d91db584
3a4574c2de44ff4d514d1500e13540a64cc21faf
LuisAlbertoVasquezVargas/CP
/otherRepos/Codes/Home/luis/12247_UVA.cpp
C++
cpp
1,242
no_license
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmat...
3ba98c0dd7b3861fbcc7193b7eefb1a736fd6bba
e5ed6ec8a89a31b10911b79ce846ad77e11124a8
ZEROSNU/zer018
/zer018_external/lms_client/src/lms_client.cpp
C++
cpp
2,857
permissive
#include "ros/ros.h" #include "sensor_msgs/Image.h" #include "sensor_msgs/LaserScan.h" #include "core_msgs/ROIPointArray.h" #include "core_util/zdebug.h" bool LMS_CLIENT_DEBUG = false; #define RAD2DEG(x) ((x)*180./M_PI) ros::Publisher scan_publisher; core_msgs::ROIPointArrayPtr obstacle_points; void scanCallback(cons...
3c6be07f509d6ff35de11903afb6de1a45b50cf4
ff2159c6973100d9d7489c1a4b6473650c1f992b
KARACOIN-Project/KARACOIN
/src/qt/guiutil.cpp
C++
cpp
16,342
permissive
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #...
4ff9bc9f5b2b1beca01211214523e11771180b33
5c727fae07f6396d4174ac2009f2c05adc093e1b
sengeiou/xywgjh
/Findlawyer/Common/ATBLibs/Fla/FlaCore/Define/bin/fla_BinEdgeWriterReader.cpp
C++
cpp
6,340
no_license
// // fla_BinEdgeWriterReader.cpp // SceneEditor // // Created by HJC on 12-12-27. // Copyright (c) 2012年 HJC. All rights reserved. // #include "fla_BinEdgeWriterReader.h" namespace fla { namespace bin { // 判断一个整数最起码可以用多数字节表示 // 返回1表示1字节,2表示2字节,3表示四字节 static int numberOfBytes(int3...
324da63d8b969e26e78485f4ebacd963a2fbbee5
ee8452f207fa1c04da806ff0319fdcb2814c44b3
itspriyansh/DSA-Coursera-Specialisation
/Algorithmic_Toolbox/week6_dynamic_programming2/2_partitioning_souvenirs/partition3.cpp
C++
cpp
866
no_license
#include <iostream> #include <vector> using namespace std; int partition3(vector<int> &A) { int sum=0; for(size_t i=0;i<A.size();i++) sum+=A[i]; if(sum%3==0){ int n = A.size(); int part[sum/3+1][sum/3+1][n+1]; for(size_t i=0;i<=sum/3;i++){ for(size_t j=0;j<=sum/3;j++) part[i][j][0] = 0; } for(si...
776987d21ea9575b4f9545b4ebcd3da7e47d75cf
1ed53720f6de798894456ba00b587f4ebd952603
Kevin-Escobedo/Click
/Window.cpp
C++
cpp
2,221
no_license
#include "Window.hpp" Window::Window(const unsigned int x, const unsigned int y) :screen(), screenDimensions(), objects() { screenDimensions.x = x; screenDimensions.y = y; screen.create(sf::VideoMode(screenDimensions.x, screenDimensions.y), "Click", sf::Style::Titlebar | sf::Style::Close); screen.setF...
c80abb977195e354f8891e9f055b66e5271f336b
1c38edad231ffd2ffd6e97f1ca6eaf050e03797b
Hurleyworks/NewtonBlock
/NewtonModule/dMath/dMathDefines.cpp
C++
cpp
396
no_license
/* Copyright (c) <2009> <Newton Game Dynamics> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including c...
0db7a52497b333d98a771f3496e7efeb0bc8aac9
80692884db133de601b5b853c56c50c8a18cd3c8
ChenwxJay/mbed-client
/test/mbedclient/utest/m2msecurity/test_m2msecurity.cpp
C++
cpp
20,805
permissive
/* * Copyright (c) 2015 ARM Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * 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...
74d4285599894c7632e0ee23807d1b61ce72fc6a
cdb569e58a180776a27038b69c1e4574dd300312
xingjilin/moon9
/src/moon9/play/component/component.sample.cpp
C++
cpp
1,630
permissive
#include <cassert> #include <iostream> #include <vector> #include "component.hpp" // define components struct scale : moon9::component<scale> { float size; scale() : size(0) {} }; struct position : moon9::component<position> { float px,py,pz; position() : px(0), py(0), pz(0) {} }; struct ...
dfd399b8dac2c495e7af401b7f16b793665da517
94fb0cab868304ea6a6c5cad32f1638af29845fb
nadiaivc/STL_vector
/test.cpp
C++
cpp
5,429
no_license
#define _GNU_SOURCE #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> #include <windows.h> #include <algorithm> #include <string> #include "vector.h" #include <vector> using namespace std; struct Item { int a, b, c; Item() :a(0), b(0), c(0) {}; Item(int a, int b, int c) :a(a), b(b), c(c) {} }; ...
0d75757d3913edf10346da35fc5e3b9df672f634
f8d6ffc4c84957ff1fb8b82b6ec57746e9b51a5f
kodeco835/symmetrical-happiness
/ios/versioned-react-native/ABI39_0_0/ReactNative/ReactCommon/fabric/components/textinput/androidtextinput/ABI39_0_0AndroidTextInputEventEmitter.cpp
C++
cpp
6,872
permissive
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ABI39_0_0AndroidTextInputEventEmitter.h" namespace ABI39_0_0facebook { namespace ABI39_0_0React { void AndroidTextInput...
1d08450cc8096a1f89a9c7f36891f9fbaa43ae6e
66f27f9a6297d44cac2b215e73e4acf5d5a53a72
Leroy03/Z-arrangement
/Main.cpp
C++
cpp
1,527
no_license
// // main.cpp // Z // // Created by Leroy on 27/02/2020. // Copyright © 2020 Leroy. All rights reserved. // #include <iostream> #include <iomanip> #define SIZE 8 using namespace std; int main(int argc, const char * argv[]) { int matrix[SIZE][SIZE] = {0}; //Matrix int a[SIZE][SIZE] = {0}; //Go...
e5c812fd6013c2393c782157f0bab12310c95191
17210f5cb48a0c8ff331d6b22452ae94d7efe746
nouwaarom/mCRL2
/libraries/atermpp/test/operators.cpp
C++
cpp
1,881
permissive
// Author(s): Wieger Wesselink // Copyright: see the accompanying file COPYING or copy at // https://github.com/mCRL2org/mCRL2/blob/master/COPYING // // 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) // /// \file o...
2edb217faa6d5aeb914cd09e053bb24b8da9d0e0
58d1c14fc91f14d5c649d74cf8a289446219b953
AxelOc5959/asteroid
/src/util.cpp
C++
cpp
675
permissive
#include "util.h" int Rnd(int max) { return AL_RAND() / (RAND_MAX / max + 1); } double randf() { return double(AL_RAND()) / (double(RAND_MAX) + 1.0); } // convert radians (0 == E, O to 2PI) // to Allegro fixed point binary angle (0 == E, 0 to 256) fixed RAD2FIX(double r) { return itofix(r * RAD_PER_FIX);...
eb5cdf049d052bd61336d769ed98574caf97af1d
35ef39d22741692b05e83abdc76f6755848347bd
zhanghuanzj/cpp
/面试金典/MSJD17.5.cpp
C++
cpp
667
permissive
class Result { public: vector<int> calcResult(string A, string guess) { set<int> fake; multiset<int> right; for(int i=0;i<4;++i){ if(guess[i]==A[i]){ right.insert(i); } } for(int i=0;i<4;++i){ if(right.find(i)==right.end()){ for(int j=0;j<4;++j...
0f61ae51640602c5477f71b1d99265c6c63b6453
e1e76f73223b8b844a891e1c78e3e828187bb274
bigdoods/OpenInfraPlatform
/IfcRoad/src/OpenInfraPlatform/IfcRoad/entity/IfcIndexedTriangleTextureMap.cpp
C++
cpp
3,374
no_license
/*! \verbatim * \copyright Copyright (c) 2015 Julian Amann. All rights reserved. * \author Julian Amann <julian.amann@tum.de> (https://www.cms.bgu.tum.de/en/team/amann) * \brief This file is part of the OpenInfraPlatform. * \endverbatim */ #include <sstream> #include <limits> #include "OpenInfraPlatform/IfcRoad...
7fc2c9fffe5ec020109e6380648c470d54743e11
5fdcf97f15410988d4f261589e8e3c8d70e4e7bb
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14580/function14580_schedule_4/function14580_schedule_4.cpp
C++
cpp
2,049
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14580_schedule_4"); constant c0("c0", 256), c1("c1", 4096), c2("c2", 64); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"); input in...