text
string
size
int64
token_count
int64
/* * This file is a part of imagestego library. * * Copyright (c) 2020-2021 Dmitry Kalinin <x.shreddered.x@gmail.com> * * 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 restrict...
2,822
1,116
// 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 "peridot/bin/context_engine/context_repository.h" #include "gtest/gtest.h" #include "lib/context/cpp/context_metadata_builder.h" #include "lib/con...
12,183
3,967
#include "swt/widgets/Display.hpp" #include <windows.h> #include <iostream> namespace swt { int Display::readAndDispatch() { MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return static_cast<int>...
688
223
//例5.8 //用函数求一个矩阵中的最大元 #include <iostream> using namespace std; int main() { int max_value(int array[3][4]); //函数声明 int a[3][4]={{11,32,45,67},{22,44,66,88},{15,72,43,37}}; //定义数组并初始化 cout<<"max_value is"<<max_value(a)<<endl; //输出最大值 return 0; } int max_value(int array[3][4]) { int i,j,max; max=array[0][0]; for(i=0;...
416
246
/* * MIT License * * Copyright (c) 2020 Christopher B. Liebman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use,...
5,288
1,773
#include "llvm/IR/Function.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/Pass.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" using namespace llvm; // From // https://homepages.dcc.ufmg.br/~fernando/classes/dcc888/ementa/slides/ControlFlowGraphs.pdf namespace { s...
1,725
593
#include "SpiAnalyzer.h" #include "SpiAnalyzerSettings.h" #include <AnalyzerChannelData.h> //enum SpiBubbleType { SpiData, SpiError }; SpiAnalyzer::SpiAnalyzer() : Analyzer2(), mSettings( new SpiAnalyzerSettings() ), mSimulationInitilized( false ), mMosi( NULL ), mMiso( NULL ), mClock( NULL ), ...
8,942
3,478
#ifndef BOOST_TEXT_NORMALIZE_HPP #define BOOST_TEXT_NORMALIZE_HPP #include <boost/text/utility.hpp> #include <boost/text/detail/normalization_data.hpp> #include <boost/container/static_vector.hpp> #include <algorithm> namespace boost { namespace text { namespace detail { template<typename Iter, std::...
24,378
6,964
// st.pop(); // cout << st.Top() << endl; // st.pop(); // st.pop(); // st.pop(); // cout << st.em
118
48
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int c[n-1]; for (int i=0;i<n;i++) cin >> c[i]; sort(c,c+n); for (int i=0;i<n;i++) cout << c[i] << " " ; return 0; }
277
124
#include "foo.h" #include <memory.h> void* operator new(size_t size) { return (void*)1; } void operator delete(void*) { } OSDefineMetaClassAndStructors( Foo, OSObject ) OSMetaClassDefineReservedUnused( Foo, 0 ) OSMetaClassDefineReservedUnused( Foo, 1 ) OSMetaClassDefineReservedUnused( Foo, 2 ) OSMetaClassDefineRese...
341
129
// All functions here should be unit and should not have dependencies on the core marxan files. #include <algorithm> #include "computation.hpp" #include "marxan.hpp" #include "utils.hpp" namespace marxan { // Sums all connectivity edges for a pu. double connectionCost1(const sconnections& connections, doub...
12,519
3,446
#include "command/mc-cmd-list.h" #include <cstdio> void mcCmdList::help(void){ fprintf(stdout, "Usage: list\n"); fprintf(stdout, " lists opend urls or alias\n"); } mcLanguageState mcCmdList::parse(mcScanner& scanner, mcIPerformer* performer){ mcToken token = scanner.tokenize(); if(token.id != MC_TOKEN_EOL) { f...
442
177
#include "BWEB.h" using namespace std; using namespace BWAPI; namespace BWEB { namespace { vector<Station> stations; vector<const BWEM::Base *> mainBases; vector<const BWEM::Base *> natBases; } void Station::addResourceReserves() { const auto addReserve = [&](Unit res...
19,455
5,808
// b1 has 4 elements; // b2's code block has ended, os b2 is destroyed, there is no point in saying how many elements in b2.
125
40
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(NULL); ios_base::sync_with_stdio(false); int64_t n, k; cin >> n >> k; // we take the smaller of these two values: // n % k is what we'd be left over with if we stopped before negatives // k - (n % k) is what we'd be left over with (positive)...
477
192
#include "script_completer.h" //============================================================================== ScriptCompleter::ScriptCompleter(QAbstractItemModel *a_pModel, QObject *a_pParent) : QCompleter(a_pModel, a_pParent) { } //=================================================...
1,175
302
#include <eve/module/core.hpp> #include <eve/algo.hpp> #include <iostream> #include <vector> #include "print.hpp" int main() { std::vector<int> v = {2,6,-10,32,-8,2,-6,8,-2,4}; std::cout << " -> v = "; doc_utils::print(v); std::cout << " -> eve::algo::any_of(v, i >= 4) ...
566
247
#include "uint.h" #include <float.h> #include <stdio.h> #include <iostream> #include <ios> // convert a floating point number to exact decimal number class Float { public: Float(int exponent, uint64_t mantissa) : E(exponent), M(mantissa) { } std::string decimal() const { std::string dec = integer(...
3,219
1,456
// Copyright 2019 Andre Pool (Falcons) // SPDX-License-Identifier: Apache-2.0 // Copyright 2019 Andre Pool // SPDX-License-Identifier: Apache-2.0 #ifndef RASPI_SYNC_HPP #define RASPI_SYNC_HPP #include "camGrabReceive.hpp" #include "raspiControl.hpp" #include <cstdint> #include <iostream> #include <thread> #include ...
1,000
379
#include <gen/version.hpp> #undef ERROR gen::gongen_version::gongen_version(uint16 milestone, uint16 major, uint16 minor, uint16 patch) : milestone(milestone), major(major), minor(minor), patch(patch) { } gen::string gen::gongen_version::toString() const { gen::string result; result.append(std::to_string(milestone...
522
187
#include <iostream> #include "services.hpp" #include "block.hpp" #include "json.hpp" using nlohmann::json; blockRotation operator++(blockRotation& a, int) { return a = (blockRotation)((static_cast<int>(a) + 1) % 4); } blockRotation operator--(blockRotation& a, int) { return a = (blockRotation)(( static_cast<int>(a...
3,938
1,644
#include "src/NodePd.hpp" using v8::FunctionTemplate; namespace nodePd { // NativeExtension.cc represents the top level of the module. // C++ constructs that are exposed to javascript are exported here NAN_MODULE_INIT(InitAll) { // Passing target down to the next NAN_MODULE_INIT NodePd::Init(target); } NODE_MOD...
361
125
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include <Eigen/Dense> #include <Eigen/Eigenvalues> #include <unsupported/Eigen/KroneckerProduct> #include <Spectra/MatOp/SparseSymMatProd.h> #include <Spectra/SymEigsSolver.h> #include <iostream> #include <cassert> #include <random> #include <algorithm> #include "ed...
7,756
3,642
// // Copyright 2016 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trad...
10,408
2,923
#include "hash.hh" #include "murmur3.h" namespace murmur3 { uint32_t hash32(const string &str, uint32_t seed) { return hash32(str.c_str(), str.size(), seed); } uint64_t hash64(const string &str, uint32_t seed) { return hash64(str.c_str(), str.size(), seed); } uint64_t hash64(const char *str, const size_t lengt...
752
330
#ifndef __NATIVE_ASYNC_ACTIONCALLBACKFINALLY_IPP__ #define __NATIVE_ASYNC_ACTIONCALLBACKFINALLY_IPP__ /*-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. * Propose : * -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/ #include "./ActionCallbackFinally.hpp" #include "./Future.hpp" namespace native { template <typename R, typename...
16,998
5,467
/* * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370 * Authors: Andrea Del Prete * email: andrea.delprete@iit.it * website: www.robotcub.org * Permission is granted to copy, distribute, and/or modify this program * under the terms of the GNU General Public License, version 2...
18,291
6,429
// // test_file_writer.c // barc // // Created by Charley Robinson on 3/16/17. // extern "C" { #include <unistd.h> #include "file_writer.h" } #include "gtest/gtest.h" TEST(FileWriter, AllocFileWriter) { struct file_writer_t* file_writer = NULL; file_writer_alloc(&file_writer); EXPECT_TRUE(file_writer != NUL...
1,846
722
#include <iostream> #include <type_traits> int a(int i){return i;} // function int(*b)(int)=a; // pointer to function struct C { int operator()(int i){return i;} } c; // function-like class int main( int argc, char **argv ) { { # define REF(x) << #x "...
1,088
403
// // Created by rolf on 19-09-19. // #include "net/Receiver.h" #include "gtest/gtest.h" TEST(ReceiverTest,receiveTest){ //We are going to manually send commands to test the receiver QUdpSocket sendSocket; QHostAddress address("127.0.0.1"); unsigned int port = 10006; net::Receiver receiver(addres...
2,735
1,069
/* * Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the Apache License Version 2.0.You may not use this file except in compliance with the License. * * This program is distributed in the h...
11,235
3,711
/* COPYRIGHT Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United States of America. All Rights Reserved. This product is protected by copyright and distributed under the following license restricting its use. The Interface Definition Language Compiler Front End (CFE) is made available for ...
7,467
2,863
#include <cmath> #include <complex> #include <vector> #include <iostream> #include <Eigen/Geometry> #include <Magick++.h> #include "Constants.h" #include "ImageGenerator.h" #include "FractalInstance.h" using namespace std; using namespace Eigen; using namespace Magick; vector<FractalInstance> fractals; // user lit...
1,919
877
/* * AUTHOR : Hydrolyzed~ * SCHOOL : RYW * CENTER : BUU * TASK : Cable Car TOI12 * ALGO : Minimum Spanning Tree * DATE : 9 May 2021 * */ #include<bits/stdc++.h> using namespace std; #define dec(x,y) fixed << setprecision(y) << x #define all(x) (x).begin(), (x).end() #define endl '\n' #define int long long...
1,171
611
// // PHXViewDelegate.hpp // CocoaPhoenix // // Created by Bodie Solomon on 3/12/19. // #ifndef PHXViewDelegate_hpp #define PHXViewDelegate_hpp /// PHXViewDelegate responds to UI draw events by making the appropriate calls /// into the Phoenix engine object. @interface PHXViewDelegate : NSObject<MTKViewDelegate> ...
430
160
#include <cassert> #include <cmath> #include <iostream> #include <limits> #include "joml.hpp" #define JOML_CONTEXT \ "===========\n" + getContextString(str, getPosition(str, cursor)) + "===========\n" #define JOML_DEBUG // std::cout << ...
22,844
6,871
// Copyright Reality Engine. All Rights Reserved. #include "Engine.h" #define GLFW_INCLUDE_NONE #include <glfw/glfw3.h> Reality::GameEngine::GameEngine() { g_SceneManager = new SceneManager; g_Logger = new Logger; g_AudioEngine = new AudioEngine; g_Randomizer = new Randomizer; g_PlayerPref = new Pla...
3,809
1,642
//$Id$ //------------------------------------------------------------------------------ // RayleighControlStateConstraintPointObject //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool. // // Copyright (c) 2002 - 2020 United Sta...
3,754
810
//clang_mini_rpc_client.cpp william k. johnson #include <iostream> #include <memory> #include <string> #include <thrift/protocol/TBinaryProtocol.h> #include <thrift/transport/TSocket.h> #include <thrift/transport/TTransportUtils.h> #include "gen-cpp/cci_mini_clang_rpc.h" using namespace apache::thrift; using name...
1,299
449
/* copyright (c) 1996 - 2008 Ivan Varzar. lusores@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright noti...
26,883
13,019
// Copyright 2018-2020 Lexis Nexis Risk Solutions // // 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 applicabl...
2,727
953
#include<iostream> using namespace std; int main(void) { int n,k; bool found=false; int a[n]; cin>>n>>k; for(int i=0;i<n;i++) { cin>>a[i]; if(a[i]==k){ found=true; break; } } if(found){ cout<<"1"<<"\n"; } else{ cout<<"-1"<<"\n"; } }
311
156
// // Forest.cpp // Overworld // // Created by Noah Kittleson on 7/7/18. // Copyright © 2018 Noah. All rights reserved. // #include "Forest.hpp" Forest::Forest(const ResourceHolder& resources, const std::vector<Condition>& activeConds) : MapSection(MapID::Forest, NoMusic, sf::Vector2f(550 * scale, 350 * scale)) {...
3,489
1,431
#include <iostream> #include <algorithm> using namespace std; #define MAX 100001 int num[MAX]; int main() { int T, n, x; cin >> T; for (int t=1; t<=T; ++t) { cin >> n; int len = 0; fill(num, num+MAX, 0); for (int i=0; i<n; ++i) { cin >> x; int it = lower_bound(num, num+len, x) - num; if (it == le...
413
216
#include <thread> #include <iostream> #include <mutex> #define TRANSACTIONS 100000 using namespace std; void deposit(int& account, mutex& m) { for (int i = 0; i < TRANSACTIONS; i++) { { lock_guard<mutex> lock(m); ++account; } } } void withdraw(int& account, mutex& m) { for (int i = 0; i < ...
782
311
/**************************************************************************************** * @author: kzvd4729 created: Jun/09/2020 16:14 * solution_verdict: Accepted language: GNU C++14 * run...
3,092
1,479
#pragma once #include <hardware/gpio.h> #include <hardware/spi.h> #include <hardware/dma.h> #include <array> #include <cstdint> #include <cmath> #include <span> #include <emu/emulator.hpp> #include <devices/image.hpp> #include <devices/screenpalette.hpp> #include <video/palette.hpp> namespace arch::pico::video { st...
7,968
3,234
/* Copyright 2022 Alejandro Cosin & Gustavo Patow Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
16,007
5,279
/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: java.util.concurrent.SynchronousQueue ================================================================================*/ #ifndef J2CPP_IN...
15,876
6,124
/* * example_gradientdescent.cpp * * Created on: Feb 7, 2015 * Author: dagothar * * This example shows how to use optimizers. */ #include <iostream> #include <stdexcept> #include <fstream> #include <rw/math/Math.hpp> #include <rw/math/Q.hpp> #include <rw/math/FunctionFactory.hpp> #include <rw/rw.hpp> #i...
7,841
3,049
// Copyright 2002 - 2008, 2010, 2011 National Technology Engineering // Solutions of Sandia, LLC (NTESS). Under the terms of Contract // DE-NA0003525 with NTESS, the U.S. Government retains certain rights // in this software. // // Use of this source code is governed by a BSD-style // license that can be found in the L...
1,245
403
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/config/model/AggregateConformancePackCompliance.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; nam...
2,781
955
#include "./render-engine-impl.hpp" #include "../aft-vulkan/scene-aft.hpp" #include "../shmag-reader.hpp" #include "./helpers/queue.hpp" #include "./holders/swapchain-holder.hpp" #include "./render-image-impl.hpp" #include "./render-targets/i-render-target-impl.hpp" #include "./stages/present.hpp" using namespace lav...
20,188
6,367
// Copyright (c) 2020 CS126SP20. All rights reserved. #define CATCH_CONFIG_MAIN #include <mylibrary/gameengine.h> #include <mylibrary/circle.h> #include <catch2/catch.hpp> TEST_CASE("Getting the correct score", "[game score]") { //makes sure the score is 0 at the start of the game mylibrary::GameEngine engine; ...
7,354
2,965
#include "RollBackGround.h" const double RollBackGround::W = 1280; const double RollBackGround::H = 720; const int RollBackGround::ROLL_SPEED = 5; RollBackGround::RollBackGround(String firstAssetName, String secondAssetName) { firstAssetName_m = firstAssetName; secondAssetName_m = secondAssetName; fPoint_m = Poi...
825
385
//+------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation, 1992 - 1996 // // File: metatag.hxx // // Contents: Parsing algorithm for image tags // //-------------------------------------------------------------------------- #if !defined(...
1,558
492
/* Copyright (c) 2015, Julian Straub <jstraub@csail.mit.edu> Licensed * under the MIT license. See the license file LICENSE. */ #pragma once #include <stdint.h> #include <iostream> #include <vector> #include <Eigen/Core> #include <Eigen/Dense> #include <Eigen/QR> // CUDA runtime #include <cuda_runtime.h> // Utiliti...
2,541
1,024
/**************************************************************************** Copyright (c) 2013-2014 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 dea...
3,176
1,201
#include <stdlib.h> #include <stdio.h> #include "funciones.h" /* producto de dos numeros */ int division (int x, int y) { int tmp; tmp = x / y; return tmp; }
192
84
//===----------------------------------------------------------------------===// // Copyright (c) 2020 Athena. All rights reserved. // https://getathena.ml // // Licensed under MIT license. // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "A...
925
269
/* * xxHash - Extremely Fast Hash algorithm * Development source file for `xxh3` * Copyright (C) 2019-2020 Yann Collet * * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that...
95,049
39,176
/* Distributed under the Apache License, Version 2.0. See accompanying NOTICE file for details.*/ #include "stdafx.h" #include "patient/conditions/SEChronicVentricularSystolicDysfunction.h" PROTO_PUSH #include "bind/cdm/PatientConditions.pb.h" PROTO_POP SEChronicVentricularSystolicDysfunction::SEChronicVentricular...
1,946
722
#pragma warning (disable : 4244) #include "../../Server.hpp" using namespace std; GamePacket::~GamePacket() { delete[] data_; } GamePacket::GamePacket(int delay, int netId) { len_ = 61; int messageType = 0x4, packetType = 0x1, charState = 0x8; memset(data_, 0, 61); memcpy(data_, &messageType, 4); ...
3,063
1,367
//---------------------------------------------------------------------------- // // Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved. // // File: CIM_AssociatedPowerManagementService.cpp // // Contents: The association between a Managed System Element and its power management service. // //...
6,774
2,084
#ifndef MultiPaneSpecular_H #define MultiPaneSpecular_H #include <memory> #include <vector> #include "WCECommon.hpp" namespace FenestrationCommon { enum class Side; enum class Property; class CSeries; } // namespace FenestrationCommon namespace SingleLayerOptics { class CSpecularCell; class ...
4,997
1,270
#include "AstVariableReference.hpp" #include <assert.h> namespace Dwarf { AstVariableReference::AstVariableReference (std::string name, AstValue *provider) : name_ (name), provider_ (provider) { assert (!name_.empty ()); } AstVariableReference::~AstVariableReference () { delete provider_; } std::stri...
1,041
316
#ifndef SAMPLEPLUGIN_HPP #define SAMPLEPLUGIN_HPP // RobWork includes #include <rw/models/WorkCell.hpp> #include <rw/kinematics/State.hpp> #include <rwlibs/opengl/RenderImage.hpp> #include <rwlibs/simulation/GLFrameGrabber.hpp> #include <rwlibs/simulation/GLFrameGrabber25D.hpp> #include <rw/rw.hpp> #includ...
2,879
1,037
#include <iostream> using namespace std; int add_two_ints(int number1, int number2) { return number1 + number2; } int main() { int number1, number2; cout << "Enter number 1: "; cin >> number1; cout << "Enter number 2: "; cin >> number2; cout << number1 << " + " << number...
419
148
/* Copyright (C) 2006, Mike Gashler This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see http://www.gnu.org/copy...
790
303
// Fill out your copyright notice in the Description page of Project Settings. #include "DreamPlaceGameStateBase.h"
119
34
#include <iostream> #include <math.h> #include "pbas.h" #include <stdlib.h> #include <time.h> #include <utility> #include <algorithm> #include <opencv2/opencv.hpp> #include <chrono> using namespace std::chrono; using namespace std; using namespace cv; PBASgray::PBASgray() { N = 30; K...
16,568
7,194
/******************************************************************************* * tlx/define/visibility_hidden.hpp * * Part of tlx - http://panthema.net/tlx * * Copyright (C) 2019 Timo Bingmann <tb@panthema.net> * * All rights reserved. Published under the Boost Software License, Version 1.0 ******************...
963
311
/* 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...
2,027
630
#include "list.h" #include "node.h" List::Iterator List::begin() { return Iterator(theList); } List::Iterator List::end() {return Iterator(nullptr); } List::~List() { delete theList; } void List::addToFront(int n) { theList = new Node(n, theList); } int List::ith(int i) { Node *cur = theList; for (int j = 0; j ...
380
145
class Solution { void generateNumbers(int bits, long temp_num, set<long>& numbers){ if (bits == 0){ numbers.insert(temp_num); return; } // If we have bits available, out of all 10 available bits, we need to do the follwoing: // For all bits (from 0 t...
2,157
659
/** * Copyright (C) 2015-2021 Jessica James. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHO...
22,165
9,442
/**************************************************************************** ** Meta object code from reading C++ file 'videoabstract_qtver.h' ** ** Created: Sat Oct 4 11:02:03 2014 ** by: The Qt Meta Object Compiler version 63 (Qt 4.8.2) ** ** WARNING! All changes made in this file will be lost! ****************...
6,015
2,440
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "extern/beatsaber-hook/shared/utils/typedefs.h" // Including type: System.Net.WebResponse #include "System/Net/WebResponse.hpp" // Inclu...
10,875
3,358
// // Created by huanghaifeng on 15-9-1. // Copyright (c) 2015 wonghoifung. All rights reserved. // #include "tcpconn_handler.h" #include "shared/utils/logger.h" tcpconn_handler::tcpconn_handler() { } tcpconn_handler::~tcpconn_handler() { } void tcpconn_handler::on_highwatermark(tcpconn_ptr conn, size_t size, si...
710
317
/* Copyright (c) <2003-2011> <Julio Jerez, 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 f...
5,678
2,330
/* * Copyright (C) 2018 Apple Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following di...
5,253
1,713
#include "proxy.h" #include <string> #include <filesystem> #include <iostream> #include <fstream> #include <QProcess> #include <QFile> #include <QTextStream> #include <QDateTime> #include <QDir> #include <QCoreApplication> #include "mustermann_signature.png.h" using namespace std; namespace fs = std::filesystem; ...
5,461
1,871
#include <jni.h> #include "ck/bank.h" #include "ck/core/javastringref_android.h" extern "C" { jboolean Java_com_crickettechnology_audio_Bank_nativeIsLoaded(JNIEnv* env, jclass, jlong inst) { CkBank* bank = (CkBank*) inst; return bank->isLoaded(); } jboolean Java_com_crickettechnology_audio_Bank_nativeIsFail...
2,014
795
// Copyright (c) 2017-present, Xiaomi, Inc. All rights reserved. // This source code is licensed under the Apache License Version 2.0, which // can be found in the LICENSE file in the root directory of this source tree. #include "replica.h" #include <fstream> #include <dsn/dist/block_service.h> #include <dsn/dist/f...
6,325
1,766
#pragma once namespace iharr { const std::string getenv(const char* name); } // namespace iharr
98
31
#include <signal.h> int main(void) { kill(1, SIGKILL); kill(3, SIGKILL); return 0; }
97
47
/** @author Adminotech Ltd. Copyright Adminotech Ltd. All rights reserved. @file @brief */ #include "StableHeaders.h" #include "DebugOperatorNew.h" #include "MeshmoonUser.h" #include "CoreDefines.h" #include "LoggingFunctions.h" #include <QTimer> #include "MemoryLeakCheck.h" // RocketUse...
4,511
1,466
//Boleyn Su's Template for Codeforces #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <functional> #include <utility> #include <bits...
5,921
2,979
//@group Renderer /* Original Copyright Yan Chernikov <github.com/TheCherno/Hazel-dev> and contributors. The following code is a derivative work of the code from the GitHub project 'Hazel-dev', which is licensed under: Apache License Version 2.0, J...
24,283
8,020
//---------------------------------------------------------------------------------------------------------------------- // Copyright : (c) Julian Bouzas 2018 // License : BSD3-style (see LICENSE) // Maintainer : Julian Bouzas - nnoell3[at]gmail.com //------------------------------------------------------...
1,482
445
#include "stdafx.h" #include "ASTPrinter.h" void ASTPrinter::Print( Expr *expr ) { expr->Accept( this ); } void ASTPrinter::VisitBinaryExpr( Binary *expr ) { Parenthesize( expr->Op.Lexeme, { expr->Left, expr->Right } ); } void ASTPrinter::VisitGroupingExpr( Grouping *expr ) { Parenthesize( "group", { expr->...
1,058
398
// Given an array of characters, compress it in-place. // // The length after compression must always be smaller than or equal to the original array. // // Every element of the array should be a character (not int) of length 1. // // After you are done modifying the input array in-place, return the new length of the...
3,862
1,422
// Copyright (C) 2015, Pawel Tomulik <ptomulik@meil.pw.edu.pl> // // 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) #define BOOST_TEST_MODULE test_txpl_lexer_try_dec_number #include <txpl/test_config.hpp> #includ...
2,588
1,081
#include "MemoMemu.h" #include "../GameManager/GameManager.h" MemoMenu::MemoMenu() { init(); visible = false; } MemoMenu::~MemoMenu() { freeResource(); } void MemoMenu::reFresh() { if (scrollbar != NULL && memoText != NULL) { for (int i = 0; i < MEMO_LINE; i++) { if (position + i < (int)GameManager::getI...
1,481
614
#pragma GCC optimize ("O2") #include<bits/stdc++.h> #include<unistd.h> using namespace std; #define FZ(n) memset((n),0,sizeof(n)) #define FMO(n) memset((n),-1,sizeof(n)) #define F first #define S second #define PB push_back #define ALL(x) begin(x),end(x) #define SZ(x) ((int)(x).size()) #define IOS ios_base::sync_with_s...
11,513
9,346
// Author KMS - Martin Dubois, P. Eng. // Copyright (C) 2021 KMS // License http://www.apache.org/licenses/LICENSE-2.0 // Product Maze // File Maze_Lib/Color.cpp // CODE REVIEW 2021-12-18 KMS - Martin Dubois, P. Eng. // TEST COVERAGE 2021-12-18 KMS - Martin Dubois, P. Eng. #include "Component.h" // ===...
1,445
615
#include "cat3d/obj/texture.hpp" namespace cat3d::obj { texture::texture(const std::string& path) : m_tex(resource::get().texture(path)), m_hooked(false) { } texture::texture(color col) : m_hooked(false) { m_tex.load_color(col); } texture::~texture() { if (m_hooked) { parent()->unbind(m_hook_id); } } voi...
485
226
class Solution { public: int getNumberOfBacklogOrders(vector<vector<int>> &orders) { priority_queue<pair<int, int>, vector<pair<int, int>>> buy; priority_queue<pair<int, int>, vector<pair<int, int>>, std::greater<pair<int, int>>> sell; for (auto &order : orders) { // buy if (order[2] ==...
1,654
572
#include "chromapch.h" #include "EntryPoint.h" #include <physfs.h> extern "C" { __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; } extern "C" { __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; } void InitFilesystem() { PHYSFS_init(NULL); } void DeinitFilesystem() { PHYSFS...
825
338