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
14955a95fb1cd49ca1036a502dd22777b94b1bc4
24581e9aec6a2f1da453b25ba2d3fd80f5a0d27e
skyitachi/websocket-engine
/src/TcpServer.cpp
C++
cpp
2,087
no_license
// // Created by skyitachi on 2019/5/28. // #include <ws/TcpServer.h> namespace ws { using namespace std::placeholders; static void onAsyncCb(uv_async_t* asyncHandle) { auto conn = *static_cast<TcpConnectionPtr*> (asyncHandle->data); assert(conn); conn->connectionEstablished(); free(asyncHandl...
9b6a33129b2b35dd49c4d74be185e514ae13b204
5b33d036edac304b8d42bd1aeef98a0c60b16378
cw100/SoT-SDK
/SDK/SoT_Basic.cpp
C++
cpp
1,079
no_license
// Sea of Thieves (1.4) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { TNameEntryArray* FName::GNames = nullptr; FUObjectArray* UObject::GObjects = nullptr; //--------------------------------------------------------------------------- bool FWeakObjectPtr::IsValid() const { ...
d9f9d67f87c889f88b70dbf3647bbb0305bbedee
41e82005653ee738756bc6dc5c11b861e1ca65c3
jcoleman1969/cef-pdf
/src/PrintHandler.cpp
C++
cpp
1,174
permissive
#include "PrintHandler.h" #include "include/wrapper/cef_helpers.h" namespace cefpdf { PrintHandler::PrintHandler() {} // CefPrintHandler methods: // ------------------------------------------------------------------------- CefSize PrintHandler::GetPdfPaperSize(int device_units_per_inch) { DLOG(INFO) << ...
99e9d1efc830d151b7cb53962e0fd4c0a76ae23a
2b4101d54279bb1e13081399767aae06a1e8ef84
deb0ch/R-Type
/systems/ActionMovementSystem.cpp
C++
cpp
1,356
permissive
#include "ActionMovementSystem.hh" #include "ActionComponent.hh" #include "Speed2DComponent.hh" #include "MovementSpeedComponent.hh" const std::map<std::string, std::pair<int, int> > ActionMovementSystem::KeyMovement = { {"UP", {0, -1}}, {"LEFT", {-1, 0}}, {"DOWN", {0, 1}}, {"RIGHT", {1, 0}} }; ActionMovement...
960226955b407f60eb3963cbc11f6cbcfc074f23
a5bb9631ccc6644ebf212b9f65f5bde1c2bf0865
wangpengcheng/MNN
/source/shape/ShapeReshape.cpp
C++
cpp
5,756
permissive
// // ShapeReshape.cpp // MNN // // Created by MNN on 2019/01/10. // Copyright © 2018, Alibaba Group Holding Limited // #include "shape/SizeComputer.hpp" #include "core/Macro.h" #include "core/TensorUtils.hpp" namespace MNN { class FlattenComputer : public SizeComputer { public: // Ref: https://github.com/onn...
dbca2c45a6abbd033a1201190fdbe55b9e42909f
1ec838f276bac904b52c3ccf9522f4b656978449
mannyzhou5/scbuildorder
/SCBuildOrderGUIDoc.cpp
C++
cpp
2,950
no_license
// SCBuildOrderGUIDoc.cpp : implementation of the CSCBuildOrderGUIDoc class // #include "stdafx.h" // SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail // and search filter handlers and allows sharing of document code with that project. #ifndef SHARED_HANDLERS #include "SCBuildO...
beb35b12f74686170d23687a95b0b9f61df298dd
52ec7b7526cc043da4d487e2c06940fcd926f5e0
CIS22CWork/CIS_22C_Lab_1_ADT_Wallet
/22c_lab1_BL_SL/CurrencyRupee.cpp
C++
cpp
771
no_license
#include "currency.h" #include "CurrencyRupee.h" //****************************************************** // class constructor //****************************************************** CurrencyRupee::CurrencyRupee(int initWhole, int initFractional) : Currency(initWhole, initFractional) { setUp(); } //****...
0cc68c48d9a7f72067dd800f83ee9ec549390f6b
ae07841eb10c722b9fcfcc1b07581096a600eda7
IlyaGrytsatsuev/18
/18/main.cpp
C++
cpp
400
no_license
#include "LfuCache.hpp" int main() { LfuCache a(4); a.find_and_add("AA"); a.find_and_add("HH"); a.find_and_add("CC"); cout<<a; cout<<endl; a.find_and_add("AA"); a.find_and_add("AA"); a.find_and_add("CC"); cout<<a; cout<<"\n"; a.find_and_add("BB"); a.find...
045bb5c0ac6c5d86d1e614b45b335eef8d10011c
5022c3b9f705b7083e3fea3cf183aa5cf2d613c1
hamundnic/cocos-code
/gdgame/frameworks/cocos2d-x/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.hpp
C++
hpp
278
no_license
#include "base/ccConfig.h" #ifndef __cocos2dx_spine_h__ #define __cocos2dx_spine_h__ #ifdef __cplusplus extern "C" { #endif #include "tolua++.h" #ifdef __cplusplus } #endif int register_all_cocos2dx_spine(lua_State* tolua_S); #endif // __cocos2dx_spine_h__
bf786d214e0bfa17ae38b5eb7cd76f7c2fe62fda
8beddc03d6233f7c2dbf13173a5c1286f1dd9b0c
jeeb/zimg
/src/zimg/colorspace/gamma.cpp
C++
cpp
5,607
permissive
#include <algorithm> #include <cfloat> #include <cmath> #include "common/except.h" #include "common/libm_wrapper.h" #include "common/zassert.h" #include "colorspace.h" #include "gamma.h" namespace zimg { namespace colorspace { namespace { constexpr float REC709_ALPHA = 1.09929682680944f; constexpr float REC709_BETA ...
b996ed827561ed83e69844525abdb27dca39c712
346cf64daf8210e151da1f804d7399c8e3dbf700
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-ecr/source/ECREndpointProvider.cpp
C++
cpp
279
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/ecr/ECREndpointProvider.h> namespace Aws { namespace ECR { namespace Endpoint { } // namespace Endpoint } // namespace ECR } // namespace Aws
4df1434569302d0711e3960412ed59a0c16b2a04
0be98bbf1617394e84b34020184d0eb29bed295b
weihsinc/16831STR_HW3_ParticalFilter
/src/sensor_msg.cpp
C++
cpp
1,234
no_license
#include <sensor_msg.h> using namespace std; /* Implementation of class SensorMsg */ SensorMsg::SensorMsg(const vector<string> &tokens): pose(stof(tokens[1]), stof(tokens[2]), stof(tokens[3])), timestamp(stof(tokens.back())) { } /* Implementation of class Odometry */ Odometry::Odometry(const vector<string> &token...
6a386c537fb029bfc23419cc42b26bfc035daf6a
5a8c451e32b404cc08c9ae78b37581410ae1a8d5
vishesh/foundationdb
/flow/Net2.actor.cpp
C++
cpp
76,527
permissive
/* * Net2.actor.cpp * * This source file is part of the FoundationDB open source project * * Copyright 2013-2022 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtai...
1ba216d4b79d0db40ea1473d124018f91b0565dd
85e98d71ebfd67c3c1eab3a0ee17835ce68f5dcb
sakiib/OnlineJudge-Solutions
/Codeforces Solutions/codeforces 817A-1.cpp
C++
cpp
298
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int int main(){ int x1,x2,y1,y2,x,y; cin>>x1>>y1>>x2>>y2; cin>>x>>y; if(abs(x2-x1)%x==0&&abs(y2-y1)%y==0&& ((abs(x2-x1)/x)%2==(abs(y2-y1)/y)%2)) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
d585b847e3c5cb4d834c26786e108da4b79bb53c
1342f5431809229daa15f8668fce6130c6f43b34
ryanmurf9/CS205
/PROJECT CODE/build-UIDesign2-Desktop_Qt_5_14_1_clang_64bit-Debug/moc_museummain.cpp
C++
cpp
4,325
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'museummain.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.1) ** ** WARNING! All changes made in this file will be lost! *********************************************************...
9c6af258b31c50c68e3f9a135631e1fbc126a02e
2a86b6e17132cbb4d251b4315f082afafe2a83a8
is2ei/coding-challenges
/GeeksforGeeks/Sort_an_array_of_0s_1s_and_2s/cpp/main.cpp
C++
cpp
886
no_license
#include <bits/stdc++.h> using namespace std; vector<int> f(vector<int> arr) { int count[3] = {0}; for (int i = 0; i < arr.size(); i++) { count[arr[i]]++; } vector<int>v; for (int i = 0; i < 3; i++) { while(count[i] > 0) { v.push_back(i); count[i]-...
d6dc58bea1915b6b4d54d368f320b32762fdab9b
081908d38b23832628eb52104016606db2090b33
colinyoyo26/mlir-standalone-toy
/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
C++
cpp
169,915
permissive
//===- Ops.cpp - Standard MLIR Operations ---------------------------------===// // // 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 // //===---------------------------...
7ea2e0c009a0cbebe6f76488e15a1b30d1bc44e5
8488bcaa3e0601e80cceace3643009d2e793e4f1
muhammadanas123/Data-structures-
/Queue_LL.cpp
C++
cpp
1,964
no_license
#include <iostream> using namespace std; class node { public: int val; node *next; node(int val) { this->val=val; next=NULL; } }; class list { node *head; node *rear; node *front; int len; public: list(); void enq...
7f877464fa9dce516fbfa428a0559396da4faf98
4e671ceb162e8617005d9a627af153429d870435
Adrasl/OX
/src/iprod/Prod3DEntity.cpp
C++
cpp
10,627
no_license
#include <Prod3DEntity.h> #include <debugger.h> using namespace core::iprod; Prod3DEntity::Prod3DEntity() : entity(NULL), nodepath(NULL), collidable(false) {} Prod3DEntity::Prod3DEntity(core::IEntityPersistence* ent) : entity(ent), nodepath(NULL), collidable(false), ready_to_die(false), sound_creat...
52702b6402ef97e06b6b1d37559c810047613d39
cce0da22a657eb73e89a6585765d6abda8afb1b0
TDoust/M2RET
/sys_io.cpp
C++
cpp
9,364
permissive
/* * sys_io.cpp * * Handles the low level details of system I/O * Copyright (c) 2013 Collin Kidder, Michael Neuweiler, Charles Galpin 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 re...
778ab0971ead05f1310adf4d4f9a1b5588bbabde
fe8d6fbe536ade62a06fab254b531b7d6ed674cd
mattwamboldt/synthesizer
/source/app/audio/synth/midicontroller.cpp
C++
cpp
3,128
permissive
#include "midicontroller.h" #include "../file/midi.h" #include "../../debug.h" namespace Audio { void MidiController::RefreshPulseRate() { if(midiFile) { // convert microseconds to seconds, multiply by samples per second and divide by pulses per beat // eg. 500000 us/beat = 0.5 s/beat * 44100 sa...
285d1d46cfc1fb50baf02f284f87f1c21a3f41c9
6c0ec944dc8a533198a7839760f6f4c5974a6c26
KirillBelyaev1/PROC-1
/ListIn.cpp
C++
cpp
375
no_license
#include "stdafx.h" #include <fstream> #include "list.h" using namespace std; namespace arrays { array *InfaArrayPrint(ifstream &ifst); void In(list &list, ifstream &ifst) { while (!ifst.eof()) { listElement *temp = new listElement; temp->array = InfaArrayPrint(ifst); temp->next = list.listHead; ...
99b17909414583802ffd87890ae3b307c40440ae
837ec4cad08f354f2378aa321fe82bae84db9195
LEGO0937/Our_Project
/Client/DinoRun/DinoRun/Common/Font/Font.cpp
C++
cpp
4,494
no_license
#include "Font.h" Font LoadFont(LPCWSTR filename, int windowWidth, int windowHeight) { std::wifstream fs; fs.open(filename); Font font; std::wstring tmp; size_t startpos; fs >> tmp >> tmp; startpos = tmp.find(L"\"") + 1; font.name = tmp.substr(startpos, tmp.size() - startpos - 1); // 폰트사이즈 fs >> tmp; s...
d2d991dc12a52176d01520fc448c4bf98e24ea98
f0778f39f90d9d49819b5ed752f1597e1bfffe90
AndreyAlonso/ProgramacionVisual
/MFC/12. Conjuntos/CajaInter.cpp
C++
cpp
2,569
no_license
// CajaInter.cpp : implementation file // #include "stdafx.h" #include "Conjuntos.h" #include "CajaInter.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CCajaInter dialog CCajaInter::...
814a7b793d447b862e65b2ad14ae8102e09885a0
e714b2ad0c078253c5bb2a0d54b5d4d4101268eb
diyism/chromium
/cc/trees/layer_tree_host_unittest_scroll.cc
C++
cc
85,401
permissive
// Copyright 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 "cc/trees/layer_tree_host.h" #include "base/location.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" #include "...
9434c1752926e3e428d72402ac7d7f26d3498ef2
d0a9b0a68e1f06dd55e8cab365d053997fb45b65
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-route53domains/source/model/AssociateDelegationSignerToDomainResult.cpp
C++
cpp
1,368
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/route53domains/model/AssociateDelegationSignerToDomainResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/Stri...
7b03b71a62b18044614e5aa345b168617d630a27
f5720eb3c1d35e7b8fc31dbec6634af9a8a20207
BillXu/MJGame
/Server/Html5GateServer/src/websocketpp/common/system_error.hpp
C++
hpp
3,379
no_license
/* * Copyright (c) 2014, Peter Thorson. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of cond...
e78f84db20af6a1525c4000ada7c8937d55e3a20
877050bcc9a04dd9dee691f969028d82925f38e1
HopeCollector/LearningCPP
/Chapter13_类继承/brass_dir/brass.cpp
C++
cpp
2,141
no_license
#include <iostream> #include "brass.h" using std::endl; using std::string; Brass::Brass(const string f_name, const string l_name, unsigned int account, double tl): first_name(f_name), last_name(l_name), id(account), total(tl){} // 使用了初始化成员列表的方法 bool Brass::withdraw(double m) // virtual关键字...
a83bf1f51a3e6393f6a271cc596343ad2c08ec2d
b4db2f284be8114c461753c2ed09d53f1c21441d
DUNE/fnal-art
/test/Framework/Services/Message/UnitTestClient_G.cc
C++
cc
1,086
no_license
#include "test/Framework/Services/Message/UnitTestClient_G.h" #include "messagefacility/MessageLogger/MessageLogger.h" #include "art/Framework/Core/ModuleMacros.h" #include <iostream> #include <string> #include <iomanip> namespace arttest { void UnitTestClient_G::analyze( art::Event const & e ...
4c4db6eeb4f886e4af1f8b6c2b8f18b086eb98dc
13425e425a5da2c2109d1a0b2290bfe9156edb9c
TencentCloud/tencentcloud-sdk-cpp
/tke/src/v20180525/model/PrometheusConfigItem.cpp
C++
cpp
4,081
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
77f02d51d5848b833d0b98a2cd4e0bb2e9e4cc93
534e57ba582e4dfea0169982cc2b8c629ac16f03
shiyuli/WPF_CPP
/WPF_CPP/ControlManager.cpp
C++
cpp
1,814
permissive
#include "ControlManager.h" using namespace System::Windows; using namespace System::Windows::Media; ControlManager::ControlManager() { } static ControlManager::ControlManager() { } Button^ ControlManager::CreateButton(uint32_t row, uint32_t column, String^ text) { Button^ button = gcnew Button(); button->C...
7e9357b1b824a06e1111fb9af01273377fc2a629
2a3313141001361ab1a73664a4002bd0d250b2dc
veeg/disir-c
/test/internal_util/context_default.cc
C++
cc
4,559
permissive
#include <gtest/gtest.h> // PUBLIC API #include <disir/disir.h> // PRVIATE API extern "C" { #include "context_private.h" #include "default.h" } #include "test_helper.h" // Test mold API with empty mold. class ContextDefaultTest : public testing::DisirTestWrapper { void SetUp() { DisirLogCurrentTes...
dba6583c72cb4d789d409119255560278baca5e2
8f6633d0872668f9259ed36bbaa121cff44b3150
zhmu/ananas
/external/gcc-12.1.0/libstdc++-v3/testsuite/30_threads/future/cons/assign_neg.cc
C++
cc
1,053
permissive
// { dg-do compile { target c++11 } } // { dg-require-gthreads "" } // Copyright (C) 2009-2022 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published...
9391e6663c129594ce50020ddd891720dc22339c
671f5c97692661a9760fb9b5dd2401d9d4591bd6
YannGarcia/repo
/dev/g++/projects/beaglebone/beagleboneUtils/src/converter.cpp
C++
cpp
2,965
permissive
/* Beaglebone converstion tools * Copyright (c) 2013 ygarcia, MIT License * * 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 t...
65e3ee04c1e5d142c46336e884e41fcd8e4f6dfe
c0c50d5010b4306cae17341e9696b409e145beb4
mkmartinw/compute-runtime
/unit_tests/kernel/substitute_kernel_heap_tests.cpp
C++
cpp
5,841
permissive
/* * Copyright (C) 2018 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "unit_tests/fixtures/device_fixture.h" #include "unit_tests/mocks/mock_kernel.h" #include "test.h" using namespace OCLRT; typedef Test<DeviceFixture> KernelSubstituteTest; TEST_F(KernelSubstituteTest, givenKernelWhenSubsti...
863724fb0d1bd24b88c8a6d6307e7b1bf4e25bc1
893906cd1288c52f74d7cfe7df28d2f2eac5480f
ChristopherRabotin/GMAT
/src/gui/solver/SolverCreatePanel.cpp
C++
cpp
6,137
permissive
//$Id$ //------------------------------------------------------------------------------ // SolverCreatePanel //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool // // Copyright (c) 2002 - 2020 United States Government as repre...
ecc20119ddcb3c98fcf645050a6e83d1fe637efb
6dbf0b3c233495acf9b3c519ad0caab19111cad7
laurencourtney/Robotics
/test_final/build/action_package/rosidl_generator_cpp/action_package/action/detail/circumnavigate__traits.hpp
C++
hpp
11,644
no_license
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em // with input from action_package:action/Circumnavigate.idl // generated code does not contain a copyright notice #ifndef ACTION_PACKAGE__ACTION__DETAIL__CIRCUMNAVIGATE__TRAITS_HPP_ #define ACTION_PACKAGE__ACTION__DETAIL__CIRCUMNAVIGATE__TRAITS_HPP_ #...
a8722d74aa1b4b45382b61460cad722e9552da78
e72e979f7a8c5d21da8fac8743e6049c8ae0459b
morali/nf-interpreter
/src/Windows.Devices.SerialCommunication/win_dev_serial_native.cpp
C++
cpp
1,983
permissive
// // Copyright (c) 2017 The nanoFramework project contributors // See LICENSE file in the project root for full license information. // #include "win_dev_serial_native.h" static const CLR_RT_MethodHandler method_lookup[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,...
e89e33b227acb9736cfa740140246d66a0e89e68
1773668351d1f41edb3c4ed6990b4e9f2a3a99a6
kyuty/LearnCpp
/code/02_1.4_functions_and_return_values/main.cpp
C++
cpp
1,216
no_license
#include <iostream> // for std::cout and std::endl using namespace std; #ifdef __cplusplus #define ANDROID_NATIVE_UNSIGNED_CAST(x) static_cast<unsigned int>(x) #else #define ANDROID_NATIVE_UNSIGNED_CAST(x) ((unsigned int)(x)) #endif #define ANDROID_NATIVE_MAKE_CONSTANT(a,b,c,d) \ ((ANDROID_NATIVE_UNS...
a2c78a3f53d65612737bdfcaff8058e17ec209fc
12722f1e74c66252de16ff04620969737b32e757
walkccc/LeetCode
/solutions/1630. Arithmetic Subarrays/1630.cpp
C++
cpp
861
permissive
class Solution { public: vector<bool> checkArithmeticSubarrays(vector<int>& nums, vector<int>& l, vector<int>& r) { vector<bool> ans; for (int i = 0; i < l.size(); ++i) ans.push_back(isArithmetic(nums, l[i], r[i])); return ans; } private: bool isArith...
783210af193a9c657cd71436d7df3af46aadbe62
10e63aa98a039dc4d2ade906cf4551893d9fc9a1
iankressin/binary-xml-images
/src/matrix.cpp
C++
cpp
1,328
no_license
#include "matrix.h" #include <stdexcept> Matrix::Matrix(std::size_t rows, std::size_t columns) { rows_ = rows; columns_ = columns; data_ = new int*[rows_]; for (auto i{0u}; i < rows_; i++) { data_[i] = new int[columns_]; for (auto j{0u}; j < columns_; j++) { data_[i][j] = 0; } } } Matrix...
bea13e819714bac9fe0e3ae7e5a6674f491aab7b
740a3b266181327fc7dc69148a49e4272fd12951
egorodet/MethaneKit
/Modules/Platform/Utils/Sources/Methane/Platform/Utils.cpp
C++
cpp
2,215
permissive
/****************************************************************************** Copyright 2019-2020 Evgeny Gorodetskiy 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/lic...
88cebad0fe3b415acf6613dca425b054f205fdeb
4e853cab3639f67c656acf68f105f2182fbd2ce8
niuxu18/logTracker-old
/second/download/curl/gumtree/curl_old_hunk_14.cpp
C++
cpp
10,252
no_license
/* NEVER EVER edit this manually, fix the mkhelp script instead! */ #include <stdio.h> void hugehelp(void) { puts ( " _ _ ____ _ \n" " Project ___| | | | _ \\| | \n" " / __| | | | |_) | | \n" " | (...
1a9968d65c72768e3c85e92aef9d326b0c7688ab
2f1f2aede6cea89586b6347010995369f1f3ea48
suraj1611/Competitive_Programming
/CP-Codes/maximize_sum.cpp
C++
cpp
1,554
no_license
/* Code by : Suraj (@suraj1611) */ #include<bits/stdc++.h> #include <string> using namespace std; #define ll long long #define rep(i,n) for(int i=0; i<n; i++) #define rep1(i,n) for(int i=1;i<=n;i++) #define mx INT_MAX #define mn INT_MIN #define md 1000000007 #define pb push_back #define mp make_pair #define pf print...
0b36725d098b6127819103a8a8e4cdf0a0926adb
a1921072fb4acb6d8a53de0b63b008cf1d8b74bc
michael-baron/cxx_testsuite
/buffer_overflow_004.cpp
C++
cpp
364
no_license
/* Emenda Ltd, 02/05/2018 Buffer Overflow */ #include <string.h> void buffer_overflow_004_P(char * src) { char buf[8]; char tgt[1024]; strncpy(buf, src, 3); strcpy(tgt, buf); //DEFECT } void buffer_overflow_004_N(char * src) { char buf[8]; char tgt[1024]; strncpy(buf, src, 3); // ensure null term...
318108db135f555cff745c77931de6013341ca99
3a2debd6408a81127793da0c20fd7afecf87a37b
m-nny/Codeforces
/contest/635/e/a.cpp
C++
cpp
1,958
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef map <int, int> mii; typedef pair <int, int> pii; typedef pair <ll, ll> pll; int const maxn = int(2e5 + 12); int const maxb = int(2e6 + 12); int const inf = int(1e9 + 7); ll const linf = ll(1e18...
72702afb5f005755259f0788d7935f57fe758659
97b8334f5d2550021819b516ad5e0da514d6469b
15cm/LeetCode
/228.summary-ranges.hpp
C++
hpp
502
no_license
class Solution { public: vector<string> summaryRanges(vector<int>& nums) { vector<string> ans; int n = nums.size(); for(int i = 0, j; i < n; i = j) { for(j = i + 1; j < n && nums[j] == nums[j-1] + 1; j++); int k = j - 1; if(i == k) { ans.pu...
cd7c805ec0cba8f88bb2e16bf1a204060a5c3d75
32bd77f793af1e8edc691da8cb7a25f1fec17a09
yuhonglin/cbm
/Log.cpp
C++
cpp
963
no_license
#include <string> #include <exception> #include <cstdio> #include "Log.hpp" namespace cbm { bool Log::use_exception = false; bool Log::use_color = true; void Log::error(const std::string& s) { if (use_exception) { throw std::runtime_error(s); } else { if (use_color) { std::printf("\03...
9c73a0e414427815a7dc9b393acb293dbca362ab
35c307eb8b18cdef9ea70cab62982e1c0f49cb2a
soloweyDev/coursera
/WhiteBelt/Week4/rational_mult_div.cpp
C++
cpp
2,088
no_license
#include <iostream> using namespace std; int NOD(const int a, const int b) { int t1 = a; int t2 = b; while (t1 > 0 && t2 > 0) { if (t1 > t2) { t1 %= t2; } else { t2 %= t1; } } return t1 + t2; } class Rational { public: Rational() { _numerator = 0; _denominator = 1; } Rational(int ...
15129bc721281f3fe96a4e81b8c49028d9d21bd6
3b3350ba775aaa8475eec4ffb0ac0c538751cb57
AkshaySrivatsa03/two-level-cache
/ProjectCodebase/src/ndnSIM/NFD/daemon/table/cs-policy.hpp
C++
hpp
5,306
no_license
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** * Copyright (c) 2014-2015, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonn...
1feb13523dd75b400c106d954f5e80f1fad4d6f1
82b10015556d3a64cc743a99cba07b70d36f9784
RuneKokNielsen/graphhopper
/src/graphhopper/kernel/gaussian.cpp
C++
cpp
809
no_license
#include "gaussian.h" Gaussian::Gaussian(LabelType labelType, double mu) { this -> mu = mu; switch(labelType) { case Discrete: _fCompute = &Gaussian::computeDiscrete; break; case Vector: _fCompute = &Gaussian::computeVector; break; } } double Gaussian::compute(Node *v1, Node *v2) { return...
4e297f9425e48ccdecdc65d95ff0e36100356368
bcf19a71f095fd019ad6246a746ac01d9d12c1bf
jjzhang166/WinNT5_src_20201004
/NT/enduser/zone_internetgames/src/client/shell/unicodeapi/test/globaldv/globaldv.cpp
C++
cpp
8,520
no_license
// // GlobalDv.cpp // // This sample application demonstrates several principles of writing // a globalized application. The main techniques demonstrated are: // // 1. Single binary Win32 application that will run on any version of // Windows 95, Windows 98, or Windows NT (localized, enabled or plain // vani...
e6389d64a8d88c520b3e8f2e0c98d6fd57e8a5ea
f233d2315cd3275a71b7b09889a70132b5541a86
YaminArafat/Codeforces
/new/B. Lovely Palindromes.cpp
C++
cpp
228
no_license
#include <bits/stdc++.h> using namespace std; int main() { string str,rev; cin>>str; rev=str; reverse(str.begin(),str.end()); rev.append(str); str.clear(); cout<<rev; rev.clear(); return 0; }
2e43c13430f553cc42f93cf0110c77744bb1d6a7
f7ddb675defd20a01328c4e57da95d7c55e6e06d
LinZiYU1996/Learning-C-Plus-Plus
/Learning_From_Primer_Plus/Chapter_8/twoswap.cpp
C++
cpp
1,478
no_license
// // Created by ly on 2019/12/16. // // 显式具体化 #include <iostream> template <typename T> void Swap(T &a, T &b); struct job { char name[40]; double salary; int floor; }; // explicit specialization template <> void Swap<job>(job &j1, job &j2); void Show(job &j); int main() { using namespace std; cout...
1c9e45889c404701a19be2a463424d330311dde2
aa215e239039c2558f4e8a2ebc0629dd2172169b
alex4814/algo-solution
/poj/2356.cc
C++
cc
812
no_license
#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; #define EPS 1e-8 #define MAXN 10005 #define MAXE 1005 typedef pair<int, int> pii; typedef long long ll; int a[MAXN], n; int s[MAXN], r[MAXN]; int...
d5a1e29f84b4525fe212ecaa729010765e6a7962
a09cca2e3cf35727e9b81f779898fe7ca519e854
Wizmann/ACM-ICPC
/HDU OJ/4/4339.cc
C++
cc
1,844
no_license
//Result:2012-08-02 20:59:45 Accepted 4339 2531MS 6184K 1877 B C++ Wizmann #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <bitset> using namespace std; #define print(x) cout<<x<<endl #define input(x) cin>>x #define SIZE 1000010 inline int lowbit(int x) { ...
69b01fafb916df529dc90108b7343cc7cfd04d3e
60f7b0311efebe3279332d56960598743d0e8ba5
turbo6412/Text-Generator-C-
/BrowserHistory (2).hpp
C++
hpp
3,642
no_license
#pragma once #include <iostream> #include <fstream> #include <string> #include <iterator> // std::next, std::prev #include <list> using std::string; using namespace std; struct WebPage { // creating struct that holds URL and webpage size string _url; size_t _pSize; WebPage(string url, size_t filesize)...
f497e177ae15e2d4e246c168b8482ef86d38969a
d92f581608ff40641d856ff494d801a5ee9c156d
xuruilong100/QuantLibEx
/qlex/cashflows/ChinaFixingRepoLeg.cpp
C++
cpp
2,835
no_license
#include <qlex/cashflows/ChinaFixingRepoCoupon.hpp> #include <qlex/cashflows/ChinaFixingRepoLeg.hpp> namespace QuantLib { ChinaFixingRepoLeg::ChinaFixingRepoLeg(const Schedule& schedule, ext::shared_ptr<ChinaFixingRepo> chinaFixingRepo) : schedule_(schedule), chinaFixi...
d75947e3e35f3cd43c77ae3e2b03e4661378e111
e9e678d3321e5ee104ad69bbb3a167bb400babcb
floitschG/sdk
/runtime/vm/code_patcher_x64.cc
C++
cc
8,663
permissive
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. #if defined(TARGET_ARCH_X64) #include ...
f945c507a69128fcb0cd65f28a6b974ebfa21c2e
e0a7062c944a5653085bec7c77161b162214907c
MpowerMPO/Code
/src/test/sighash_tests.cpp
C++
cpp
7,137
permissive
// Copyright (c) 2013-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "consensus/validation.h" #include "data/sighash.json.h" #include "hash.h" #include "validation.h" // For CheckTransa...
a2e4f573ba2621a4552bef2d7bc51db8e626d75e
e176152894416766630ca6a53a94db479cc35626
gewing97/cs133
/lab5/lab5/merlin/src/CnnKernel.cpp
C++
cpp
1,327
no_license
const int kNum = 256; const int kKernel = 5; const int kImSize = 224; const int kInImSize = 228; const int kOutImSize = 112; #define max(X,Y) ((X)>(Y)?(X):(Y)) #pragma ACCEL kernel void CnnKernel( const float input[kNum][kInImSize][kInImSize], const float weight[kNum][kNum][kKernel][kKernel], const float bias...
8fc62c74c966cd3e53850b679eb195eddb3c91da
8c480514be719bacf0abdd4cf374805fb090aadc
shubhampal077/s_pal1
/coding/codechef/jan15a.cpp
C++
cpp
341
no_license
#include<bits/stdc++.h> //***************Constraints are always imaginary,I'm real :)************** using namespace std; typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll t,l,r; cin>>t; while(t--) { cin>>l>>r; cout<<(r-l+1)*(r+l-1)<<endl; ...
ad01c579999034711a494dbdcb3ac043c1133655
786fa59156610063cac958e6bc747a8b5e6c9872
Riazulcse/Programming-Online-Judge
/URI1079.cpp
C++
cpp
312
no_license
#include <cstdio> int main() { int n; double a; double b; double c; scanf("%i", &n); for (int i = 0; i < n; ++i) { scanf("%lf", &a); scanf("%lf", &b); scanf("%lf", &c); double med = ((a/10) * 2) + ((b/10) * 3) + ((c/10) * 5); printf("%.1f\n", med); } return 0; }
02c34423911693cfd24aa1afdbf75293b18b3a46
253fa2594150c0e2ea45d3441b82a1f07a774fa4
cerg2010cerg2010/android_kernel_highscreen_ZeraF
/mediatek/platform/mt6572/hardware/mtkcam/core/featureio/pipe/aaa/aaa_hal.thread.cpp
C++
cpp
6,511
no_license
/****************************************************************************** * *******************************************************************************/ #define LOG_TAG "aaa_hal/3Athread" // #include <utils/threads.h> #include <utils/List.h> using namespace android; // #include <mtkcam/common.h> #include <con...
a8e6bda2392097cb7cf7d08e2baae4484a7201f5
e76a07f84f8b43a773467904312709120c9923f0
DentonGentry/FreeBSD-ports
/www/chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc
C++
cc
477
permissive
--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2021-07-19 18:45:18 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc @@ -648,7 +648,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasTextures(); -#if defined(OS_LINUX) || defin...
852b7aa45dfe0e76935857ff39649bce06e40bb2
7aabb65f6e1a4bf91365fe77732969d6e36ef4eb
wukui1900/TNN
/source/tnn/device/opencl/opencl_runtime.cc
C++
cc
28,023
permissive
// Tencent is pleased to support the open source community by making TNN available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy o...
a46818fa87e3bde77560359032aa7aebe911425b
e6c0530bec0616179f5a355328b7c6d7df6f68aa
Lyriix/openCVproject
/src/local/scene/faceTrack.cpp
C++
cpp
1,212
no_license
#include "faceTrack.hpp" faceTrack::faceTrack() { //Initialisation du classificateur cascade = ( CvHaarClassifierCascade*)cvLoad("haarcascade_frontalface_alt.xml",0,0,0); storage = cvCreateMemStorage(0); //zcvReleaseHaarClassifierCascade(&cascade); //cvReleaseMemStorage(&storage); } /* IplImage*face...
abc4a411ac232f8b4389af44c4009214364a7958
d2e9acd547a950442634433dbedc6921f07a584f
KqSMea8/sstd_library
/sstd_boost/sstd/boost/math/special_functions/detail/ibeta_inverse.hpp
C++
hpp
34,069
permissive
// Copyright John Maddock 2006. // Copyright Paul A. Bristow 2007 // Use, modification and distribution are subject to 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) #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_IBETA_INVERSE_HPP #def...
0b6465f16973bbabfb49f11ced2d237ee23a1fa0
bacb9795eabb4e73fc05bfca7b37fc5764161bd9
timkrentz/SunTracker
/IMU/VTK-6.2.0/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx
C++
cxx
57,048
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkXOpenGLRenderWindow.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
f6a8c1767fd8590ddc8a80647248b798acbcec87
d38ef0f810b3712d263ee1e394daea059bfcde23
GandhiGames/gauntlet
/gauntlet/src/Object.cpp
C++
cpp
1,903
no_license
#include "PCH.h" #include "Object.h" #include "SharedContext.h" // Transform component automatically added to all new objects. Object::Object() : m_queuedForRemoval(false) { m_transform = AddComponent<C_Transform>(); m_instanceID = AddComponent<C_InstanceID>(); m_tag = AddComponent<C_Tag>(); } void Object::Update(...
f928c3f0ba596ed80152ae51aa7f53bb6e9001d1
a284d2d61170a65aa185657b5787730ee17ac681
MatCoder77/Compiler
/DoWhileLoop.cpp
C++
cpp
644
no_license
#include "DoWhileLoop.hpp" DoWhileLoop::DoWhileLoop(CommandPointers commands, ConditionPointer condition) { this->condition = condition; this->commands = commands; } void DoWhileLoop::compile() { ConditionBlock conditionBlock = condition->evaluateCondition(B, C); string IF_TRUE_LABEL = conditionBlock...
4317cf02c7c1a25232045b778cf41384a20b20b3
22b22305eb9c61035ec14a3c54658fc7c4b98165
DreamMazeTeam/FactorySutff
/src/encoder.cpp
C++
cpp
7,766
no_license
#include "encoder.h" #ifdef PRECISE_ALGORITHM const int8_t KNOBDIR[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0, }; int8_t encPos = 0; #endif // ================= CONSTRUCTOR ================= Encoder::Encoder() { flags.use_button = true; } Encoder::Encoder(uint8_t clk, uint8_t dt, int8_t ...
dad37fbe04dea54b3a5b5dee6ffbda02572174f6
5a376d3df60194b8a030c3a1578abe715b89c8a8
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_mountedTurret_Catapult_TPV_RIG_AnimBP_classes.hpp
C++
hpp
1,541
permissive
#pragma once // ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_mountedTurret_Catapult_TPV_RIG_AnimBP_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //-----------------------------------...
cbeb400c8d5ee8b127bf4d2b84b1348a61dac5fe
d3f01daac42cb071a5858f62d577561343362de6
jcan1995/Operating-Systems-CS433
/PCBTable.cpp
C++
cpp
1,028
no_license
#include <ctime> #include "PCBTable.h" #include <vector> #include <stdlib.h> using namespace std; PCBTable::PCBTable(){ srand(time(NULL)); /*Initialize our PCBTable in our constructor. Set a random priority in each iteration. */ for(int i = 0; i < 20; i++){ process *p = new process; p ->...
b9306f5ebae73af961e43d62f9da66e378fd951c
d070a3e7d1eefafe088acbb835e95a38080c8362
tosobolewski/kuznia_p
/Zadanie 10.4-2b.cpp
C++
cpp
12,009
no_license
// // Name: .../kuzniaprogramistow/zadaniakorekta/Zadanie 10.4-2.cpp // Copyright: ? // Author: Tomasz Sobolewski (tso) // Date: 30-01-14 23:23/03-02-14 16:21/04-02-14 22:09 // Description: KOREKTA pierwszej wersji programu, teraz rzuty zapisywane w tablicy 'liniowej' długosci 21 pol // // // Zadanie 10.4. Bowling /...
2218f3304ebf7891bb08069d5983ea94c568eb5c
e631617a50669708da7e34d4d06750dc2cac7bf7
JokerLbz/Leetcode
/Algorithms/101. Symmetric Tree/101. Symmetric Tree - Recursive.cpp
C++
cpp
616
no_license
//Approach : Recursive // √ 193/193 cases passed (12 ms) // √ Your runtime beats 96.51 % of cpp submissions // √ Your memory usage beats 47.11 % of cpp submissions (16 MB) // T/S Complexity : O(n)/O(n) class Solution { public: bool isSymmetric(TreeNode* root) { if(!root) return true; return...
e94873f02c2c4c705d9fe0d6abe2cf883ab85708
c4775bd31f83ef275677dd4100728837d9fd2727
lykkin/liblw
/lw/flags/format.cpp
C++
cpp
5,855
permissive
#include "lw/flags/format.h" #include <cmath> #include <cstdlib> #include <charconv> #include <chrono> #include <string> #include <string_view> #include <system_error> #include "lw/err/canonical.h" namespace lw::cli { namespace { constexpr float STRING_ESCAPE_SIZE_FACTOR = 1.2f; } template <> bool parse<bool>(std...
55530e41ada4c2138634e1da7eee70c812d5bcc7
6e0cebdba3c58cebd5dc164f1773e74e0a168d1f
aurantst/windows-XP-SP1
/XPSP1/NT/net/config/tools/netafx/getopt.cpp
C++
cpp
6,287
no_license
/*++ Copyright (c) 1991 Microsoft Corporation Module Name: getopt.c Abstract: Utility function to parse command line options. Inspired by UNIX getopt - but coded from scratch. Not thread-safe currently (don't call this from multiple threads simultaneously) Author: Ravisa...
f823bdf02f3e114549f4acf04207171acf3e4ac3
406f52b8c106e805af95d017ed398f80a58be634
msrLi/portingSources
/ACE/ACE_wrappers/TAO/orbsvcs/tests/ImplRepo/nestea_client_i.cpp
C++
cpp
3,278
permissive
#include "nestea_client_i.h" #include "tao/debug.h" #include "ace/Get_Opt.h" #include "ace/Read_Buffer.h" #include "ace/ACE.h" // Constructor. Nestea_Client_i::Nestea_Client_i (void) : argc_ (0) , argv_ (0) , server_key_ (ACE::strnew (ACE_TEXT("key0"))) , server_ (Nestea_Bookshelf::_nil ()) , shutdown_serv...
084518260317ebde00c3522250e5f1d740d31411
9ec047064cf41346cb0727d4d5c137a686d80b65
mkuri/path-planning-udacity
/src/main.cpp
C++
cpp
4,504
no_license
#include <uWS/uWS.h> #include <fstream> #include <iostream> #include <string> #include <vector> #include "Eigen-3.3/Eigen/Core" #include "Eigen-3.3/Eigen/QR" #include "helpers.h" #include "json.hpp" #include "vehicle.h" // for convenience using nlohmann::json; using std::string; using std::vector; int...
a4017bc19c2a53ba00bb376c057ff6f6290d9840
23978de34cc0a792cb1360c9bd5e2caa86d90639
ivk22/Data_Structures_and_Algorithm
/Data_Structures/Week_6/2.6.4.cpp
C++
cpp
15,875
no_license
// 2.6.5.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> #include <queue> #include <ostream> #include <sstream> #include <iterator> #include <cmath> #include <list> #include <algorithm> #include <vector> #include <random> u...
bd55cace5a04e6d80d3dcd2c0743829a25ebf2dc
4462af3a3c6bb37f4f9ccc1725e83abaa6be7df7
wjdwithyou/BOJ
/5032/5032.cc
C++
cc
254
no_license
#include <iostream> int main() { int e, f, c, t; int cnt = 0; scanf("%d %d %d", &e, &f, &c); do { t = e + f; e = t % c; f = t / c; cnt += f; } while (f); return !printf("%d", cnt); }
7b9d9337bd0bea20db2900ad5f702be4102be075
448f016182dc9f387186af3ba3ff0481a216f577
QikaiYang/ASTRAL_origin
/ASTRID-master/src/Args.hpp
C++
hpp
1,915
no_license
#ifndef ARGS_HPP #define ARGS_HPP #include "help.hpp" struct Args { string infile; string outfile; string multindfile; double constant; vector<string> dms; bool octal; vector<string> java_opts; bool stacksize_set = false; Args(int argc, char** argv) { constant = 0; octal = false; ...
f1c2986a5148f55883b56a66c0818a065a9a92c1
94ee47d3a80c8dc2e49407f4c5da07928c80cadb
MrSkl1f/OOP
/1lab/inputLinks.cpp
C++
cpp
774
no_license
#include "inputLinks.h" int readCountOfLinks(FILE *curFile, int &countOfLinks) { int errCode = NO_EXCEPTION; if (fscanf(curFile, "%d", &countOfLinks) != 1) return FILE_FORMAT_EXCEPTION; return errCode; } int readAllLinks(linkData &info, FILE *curFile) { int errCode = NO_EXCEPTION; for (int...
eed948962ceea7dd58e554c0ad74efc2cda36579
980e06b65972af8e840a6d133b2831ce5cb5ee4f
kenlouie/SCIRunGUIPrototype
/src/Modules/Math/Tests/EvaluateLinearAlgebraBinaryTests.cc
C++
cc
1,902
permissive
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2012 Scientific Computing and Imaging Institute, University of Utah. License for the specific language governing rights and limitations under Permission is hereby granted, free of charge, to any person o...
d447c901dc771c42afbccddf082824e09350f8dd
e5b7407c7beea489d44cbb5ec36a978457ef4d28
NatadecocoSeijin/If-I-m-not-brave-men
/Heal.cpp
C++
cpp
5,285
no_license
# include "Heal.h" #include "DxLib.h" #include "draw.h" Heal::Heal() :Magic(2, "ヒール", 2, true) { this->damage = 10; this->type = 1; this->attack_area = 11; this->attackable = 2; } void Heal::effectpoint(int point, Player** players, int size_players, Enemy** enemy, int size_enemy) { int point_x = point % 10; //カー...
318d58f74ecd26be786601a5495b60a64dd52851
a2830b12f6416af1cb75da894f844b3e00cc2863
hqzhang/cloudtestbed
/CppCourses/Cppdemo/s4/s4/friend_class/use_tv.cc
C++
cc
570
no_license
//use_tv.cpp #include <iostream> using namespace std; #include "tv.h" int main() { Tv s20; cout << "Initial settings for 20\" TV:\n"; s20.settings(); s20.onoff(); s20.chanup(); cout << "\nAdjusted settings for 20\" TV:\n"; s20.settings(); Remote grey; grey.set_chan(s20, 10); ...
fa8b883fdc7c467a3c56b23a2af4e9e1651178bf
848e100a0ddb12b39475d1f5e208330926587731
kacperpabian/Komiwoja-er
/Komiwojażer/PEA1.cpp
C++
cpp
439
no_license
#include "Traveler.h" #include <ctime> int main() { srand(time(NULL)); int n; system("cls"); cout << "/******Komiwojazer dla n miast********" << endl; cout << "Podaj ilosc miast:" << endl; cin >> n; Traveler *traveler = new Traveler (++n); //traveler->LoadFromFile(); traveler->LoadCities(); //traveler->Ini...
f347cf5c7318b835e0834b4a667e7469f8cd23b9
dc6f320d5e924d467af0be36322bcb90e3d2282c
shakilaust/Uva-Solve
/12484.cpp
C++
cpp
812
no_license
#include <iostream> using namespace std; long long a[10003]; long long dp[2][10002]; int n; int main(){ while(cin>>n){ for(int i=1;i<=n;i++){ cin>>a[i]; dp[1][i]=a[i]; a[i]+=a[i-1]; } for(in...
25f10098cf170e4e4b1f6a6a1edd7a2b54312e12
f0ae29f18bc993b3b2e656678df250c10a38c291
iOverlander/omim
/map/bookmark.cpp
C++
cpp
9,069
permissive
#include "map/bookmark.hpp" #include "map/bookmark_helpers.hpp" #include "coding/url_encode.hpp" #include "base/string_utils.hpp" #include <sstream> #include "private.h" namespace { std::string const kDeepLinkUrl = DLINK_URL; std::string GetBookmarkIconType(kml::BookmarkIcon const & icon) { switch (icon) { ...
3e607684d32094fd1a3ffe35321dd169df29e9b0
abcd494f4f32f29e280f0f2612e058a6cb50d8dd
FinTPc/fintpc-tip
/fintp_routingregulations/src/CurrencyAmount.cpp
C++
cpp
737
no_license
#include "CurrencyAmount.h" currency_amount::currency_amount( const string& value ) : m_Pi( 0 ), m_Pd( 0 ) { string actualValue = StringUtil::Replace( value, ".", "," ); string::size_type decFinder = actualValue.find( ',' ); if ( decFinder == string::npos ) { m_Pd = 0; #ifdef WIN32 m_Pi = _atoi64( actualValue....
b976858ac87868f564af3f242f89f8e5387e7517
43af0a688f9bf0c9e6f774b403b1633c84fd7101
tuannguyentpd/BigNumber_Processing
/Cal_expression_String_KiPhapBaLan/1612774/LinkList.cpp
C++
cpp
1,968
no_license
#define _CRT_SECURE_NO_WARNINGS #include"LinkList.h" Ref getNode(char* data) { Ref p; p = (Ref)malloc(sizeof(struct node)); if (p == NULL) { printf("Loi - Khong du bo nho cap phat!\n"); } p->data = (char*)malloc(sizeof(char)*(strlen(data) + 1)); strcpy(p->data, data); p->next = NULL; ret...
0ff6c2a1aa9c89c0b23b26e68c5f5ab25c77fc18
581df3efacf8ebfa6a40d8dc1ac4aa86a211a14f
FunkMonkey/Bound
/Wrapping/Spidermonkey/WrappingTest/wrap_autogen/src/ProjectName/Inheritance.cpp
C++
cpp
532
no_license
#include "ProjectName/Inheritance/BaseClass.hpp" #include "ProjectName/Inheritance/SubClass.hpp" #include "ProjectName/Inheritance.hpp" namespace jswrap { namespace ProjectName { namespace Inheritance { JSBool init(JSContext* cx, JSObject* scope) { JSObject* newObj = JS_DefineObject(cx, scope, "Inheritance", N...
9f74315a663d9d35f0fd2ca5185ff187ea3dea94
decc1bf41682ab4125cca320a2dacc4cc4a3d0b5
gavroman/tp_algos
/module3/taks1/AbstGraph/IGraph.hpp
C++
hpp
339
no_license
#ifndef INCLUDE_IGRAPH_ #define INCLUDE_IGRAPH_ class IGraph { public: virtual ~IGraph() {} virtual void addEdge(int from, int to) = 0; virtual int verticesCount() const = 0; virtual std::vector<int> getNextVertices(int vertex) const = 0; virtual std::vector<int> getPrevVertices(int vertex) con...
c88b62f6d3211df7fdb81518dcee5172dcceb156
97bc6542dfdcfd2bf5b924bebc97dcd8f120cdc4
BPI-SINOVOIP/BPI-H3-New-Android7
/android/external/deqp/modules/egl/teglSyncTests.cpp
C++
cpp
47,402
permissive
/*------------------------------------------------------------------------- * drawElements Quality Program EGL Module * --------------------------------------- * * Copyright 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except...
7422217dd5ef9a1f71ab8a1d3e5bfd96a9241beb
00a8ea3e29abe9f0f4cd08f76ed7898e01d5be73
pieterlexis/kolmo
/http.cc
C++
cc
614
permissive
#include "http.hh" #include <boost/utility/string_ref.hpp> #include <boost/algorithm/string.hpp> using std::string; std::string pickContentType(const std::string& fname) { const string charset = "; charset=utf-8"; if(boost::ends_with(fname, ".html")) return "text/html" + charset; else if(boost::ends_with(fn...
e58b2e1eec05b34342db1f99b1323c25dd993b04
a01099d6f9549494c321e61bd4de489c0b7a3c83
hyl946/opensource_apple
/download/unzip/IOPCIFamily/IOPCIFamily-106/IOPCIDevice.cpp
C++
cpp
20,707
no_license
/* * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * The contents of this file constitute Original Code as defined in and * are subject to the Apple Public Source License Version 1.1 (the * "License"). You may not use this file except in compliance with th...
db8e86865522cbb19adb547c718b8b0f5949b657
e875ce4953014bcc5a02231149b2b3ff83e598b5
jiemde/IOsonata
/ARM/Nordic/nRF52/src/ble_app_nrf52.cpp
C++
cpp
58,130
permissive
/*-------------------------------------------------------------------------- @file ble_app.cpp @brief Nordic SDK based BLE peripheral application creation helper @author Hoang Nguyen Hoan @date Dec 26, 2016 @license Copyright (c) 2016, I-SYST inc., all rights reserved Permission to use, copy, modify, and distribu...
6a2b5744ce41116a14903e638d26f37e52748f90
423ba52254fe69ecd76eedef892d18618358dc5b
Nayrn/PhysicsNew
/PhysicsForGamesLATEST/PhysicsForGames/main.cpp
C++
cpp
227
no_license
#include "Physics.h" int main() { Physics app; if (app.startup() == false) { return -1; } while (app.update() == true) { app.draw(); } app.shutdown(); return 0; }
16638d1e5f72bfda6ad2effccb327ae540ba38ce
970bbb6a3616107d62414a196a45528542e7778e
SKKU-ESLAB/Auto-Compression
/contrib/pim/software_stack/pim_func_sim/pim_unit.cc
C++
cc
17,491
permissive
#include "pim_unit.h" using half_float::half; PimUnit::PimUnit(int id) : pim_id(id) { PPC = 0; // PIM program counter : Points the PIM Instruction to execute in // CRF register LC = 0; // Loop counter : A counter to perform NOP, JUMP Instructions // Initialize PIM ...