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
ababa115e1d41f0397729d0d79971446f129e2e3
5848395145d0020e405f9a3dd5f57b3c2b6146d3
peterisgood2002/99.NctuProject
/05.Computer Animation/Assignment2/src/StdAfx.cpp
C++
cpp
313
no_license
// stdafx.cpp : source file that includes just the standard includes // Demo.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" double Frequence; double PC; // TODO: reference any additional headers you need in STDAFX.H // and not in this file
9f028f92e256a9869248ecb72b4a256c123808d3
63775f1c4aaa636aca5ef69b82839ef6e156b31f
sankethkatta/sdk
/runtime/vm/compiler/assembler/assembler_arm64.cc
C++
cc
62,347
permissive
// Copyright (c) 2014, 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" // NOLINT #if defined(TARGET_ARCH_ARM64) && !defined(DART_PRECOMPILED_RUNTIME)...
03d8a3e11114a57adc9db72440b2feef6bd79d22
6181b8b59e3482cf5b35162389d1f3a01f4df1d9
fakeenemy01/Speedo
/AndroidClient/utils/ArrayUtils.hpp
C++
hpp
1,005
permissive
/* * Copyright 2011 Aevum Software aevum @ aevumlab.com * * 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 b...
f6d327bbfae2e658c4b1e1130e3688d00f8f2e4e
e9d126a50d44c86c74f2cd50ed6766c3cd846fea
neonichu/iMame4All-for-iPad
/src/drivers/phoenix.cpp
C++
cpp
22,886
no_license
#include "../vidhrdw/phoenix.cpp" #include "../sndhrdw/phoenix.cpp" /*************************************************************************** Phoenix memory map driver by Richard Davies Note: pleiads is using another sound driver, sndhrdw\pleiads.c Andrew Scott (ascott@utkux.utcc.utk.edu) 0000-...
0714cd4b8b9c0f442d73a66912680c10ccabd0a9
f60e7288f625ef4102f4a5278998c4365cdec5fc
l3shi1L/pyeoskit
/libraries/wallet_plugin/wallet_manager.cpp
C++
cpp
10,096
no_license
/** * @file * @copyright defined in eos/LICENSE.txt */ #include <eosio/wallet_plugin/wallet_manager.hpp> #include <eosio/wallet_plugin/wallet.hpp> //#include <eosio/wallet_plugin/se_wallet.hpp> #include <eosio/chain/exceptions.hpp> #include <boost/algorithm/string.hpp> namespace eosio { namespace wallet { conste...
3a602cc2ec4b12db496655e07d95321cfff2184b
374a02e0081b52e187ed5ffd4b90bf810d514f22
zjw-swun/perfetto
/src/perfetto_cmd/rate_limiter.cc
C++
cc
7,915
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...
db5f62bb1e0c0a4b2d3d26e84b43971ac659342a
f971f5034900ac59e6d7062fa1641e73062b3608
ThomasMarches/Indie-Studio
/Fox/src/raylib-cpp/InputBox.cpp
C++
cpp
2,562
no_license
/* ** EPITECH PROJECT, 2020 ** B-YEP-400-TLS-4-1-indiestudio-thomas.marches ** File description: ** InputBox.cpp */ #include "raylib-cpp/InputBox.hpp" namespace ray { InputBox::InputBox(float x, float y, float width, float height, ray::Color color, int charLength) : Rectangle(x, y, width, height, color) { ...
d7d5e6b672cee91ff93f5c748fb2513441c424ac
bf4d0ced53afd4d8db548e744d242c4ee422d003
nuzumglobal/Elastos.Trinity.Alpha.Android
/src/cc/blink/web_layer_impl_fixed_bounds.cc
C++
cc
3,024
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 "cc/blink/web_layer_impl_fixed_bounds.h" #include "cc/layers/layer.h" #include "third_party/blink/public/platform/web_float_point.h" #include "t...
6e867334cf32e0837184c1145daeeac62cc9b3cf
3e535e144af3cd6bdc7c52f41064763cc231c572
iokto/newton-dynamics
/packages/thirdParty/wxWidgets/wxWidgets-2.9.4/src/aui/tabart.cpp
C++
cpp
38,956
no_license
/////////////////////////////////////////////////////////////////////////////// // Name: src/aui/tabart.cpp // Purpose: wxaui: wx advanced user interface - notebook-art // Author: Benjamin I. Williams // Modified by: Jens Lody (moved from auibook.cpp in extra file) // Created: 2012-03-21 // RC...
e08d0644b0fae6dc3e48e8c40a558c920fdc5d50
ad8557fbde4527d449ae56857685f68c31f6b7ec
ankitkesarwani/3D-Tetris-Pop
/TetrisGame.cpp
C++
cpp
6,216
no_license
#include "TetrisGame.h" #include <stdlib.h> #include <Windows.h> #include <GL/glut.h> #include "GameSpace.h" #include "Tetronimo.h" TetrisGame::TetrisGame(void) { state = 0; // state of program. 0 is title screen, 1 is game for now z = 0.0f; // z of cube cubeWidth = .25f; // scaling factor for basicall...
2e27ffa0980a8ec376138173bd0997948f50d4c3
6a68dfc6e3cf4809242dc314e19128923ed233f1
ICBPHCMS/BPHParkingAnalysis
/NtupleProducer/macro/analyzeCharged_fastDATA.cpp
C++
cpp
40,780
no_license
//g++ -Wall -o analyzeCharged_fastDATA `root-config --cflags --glibs` -lRooFitCore analyzeCharged_fastDATA.cpp //./analyzeCharged_fastDATA --isEle (0,1) --dataset (-1, runA, runB, MC) --run (1,2,3,...) --typeSelection (tightCB, NN_BkgR, NN_SigEff) --ntupleList (list.txt) --JOBid (1,2..) --outputFolder ("outfolder") --...
94b78eb08d9453f51dded997f296981daf1245c8
65758599dceed2e0e11962fb3415fe605c1a61da
smeenai/llvm-project
/lldb/source/Target/ThreadPlanCallUserExpression.cpp
C++
cpp
3,872
permissive
//===-- ThreadPlanCallUserExpression.cpp ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
68c144a9591ad424ec1eb1e8e142fe76b449fb63
2446febb92a601864f36ca6cb6d6fbdb59a629bd
TrickMond/AlG
/Lab2/Number 4/a_qucik_v_2_0.cpp
C++
cpp
684
no_license
#include <bits/stdc++.h> using namespace std; int part(unsigned int a[], int l, int r) { unsigned int buffer [70001]; int mid = (l + r) / 2; swap(a[mid], a[r]); if (l < mid) part(a,l,mid - 1); if (r > mid) part(a,mid + 1, r); } int main() { // freopen("sort.in", "r", stdin); ...
b3775d1e1cc8c0d5bfb98da629677b4df5dbe2c9
3aa5b8b13d7c74de39c61390decb0d10809c1510
audio-dsp/Max-Live-Environment
/support/macOS/xerces-c/src/xercesc/internal/XTemplateSerializer.hpp
C++
hpp
19,322
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
7d179e715dedc7c49a6af97efecc5e4ecbc0ae76
9a7a69ebdc4427e0e64ed6dff278652b67cb8fba
Xion-C/practice
/817/particles/Camera.cpp
C++
cpp
8,529
no_license
// // Camera.cpp // Implementation of OpenGL Camera Class // // Christopher Root, 2006 // Modifications by Donald House, 2009 // corrected calculation of camera coordinates // Modifications by Yujie Shu, 2012 // simplified calculation of camera coordinates // Simplifications and corrections by Donald House, 2018 /...
15da93db633ca94b2568b1262e46b6482db12673
e06cec0058bc9080d3646ec5ad98b57a75409266
xbx1/useful
/cpp/multithread/mutex_in_class.cpp
C++
cpp
570
no_license
#include <iostream> #include <mutex> #include <vector> class Example { public: Example(std::vector<int> vec) : vec_(vec) {} void add_to_list(int value) { std::lock_guard guard(mtx_); vec_.push_back(value); } void list_contains(){ std::lock_guard guard(mtx_); for(auto ite...
7d26bd5a87478be4e677c8d125be5049e86b5fdb
daa056124a9c57124063a2174a8b9f1e3e19b4cd
code-forger/dmtools
/Dungeon Masters Tools old c++/TabControll.cpp
C++
cpp
1,249
no_license
#include "TabControll.h" TabControll::TabControll(HWND hwndIn) { hParent = hwndIn; current = 0; char buffer[256]; RECT rect; INITCOMMONCONTROLSEX icex; TCITEM tie; icex.dwSize = sizeof(INITCOMMONCONTROLSEX); icex.dwICC = ICC_TAB_CLASSES; InitCommonControlsEx(&icex); GetClientRect(hPare...
12fad2cde70fda63d5ae13a96648a45a1a7bbb59
d335f49795c2dddaebc68ed17919d2259ccbbc3a
cypod/SumoDX
/Rendering/GameRenderer.cpp
C++
cpp
16,454
permissive
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A //// PARTICULAR PURPOSE. //// //// Copyright (c) Microsoft Corporation. All rights reserved #include "pch.h...
dcda02bdca7dd9ecbee24ad14492f9c51fbf3eb9
fc0202db789edd5f045eef487b38fa7aec04d296
PWrGitHub194238/RIT
/RIT_Examples/include/RIT/log/utils/LogStringUtils.hpp
C++
hpp
4,652
permissive
/* * LogStringUtils.hpp * * Created on: 14 lut 2016 * Author: tomasz */ #ifndef SRC_INCLUDE_LOG_UTILS_LOGSTRINGUTILS_HPP_ #define SRC_INCLUDE_LOG_UTILS_LOGSTRINGUTILS_HPP_ #include <string> #include "../../enums/Connectivity.hpp" #include "../../enums/Visibility.hpp" #include "../../typedefs/primitive.hpp...
cfc1f110e21138600b7bc437f64532ef54285ef2
c1b0c977cc821ff5ccf83d4595d2624583aa7180
zladuric/The-forests-edge
/src/abil.cc
C++
cc
11,468
no_license
#include <ctype.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include "define.h" #include "struct.h" const char *skill_cat_name [ MAX_SKILL_CAT ] = { "physical", "language", "spell", "trade", "weapon" }; const int skill_table_number[ MAX_SKILL_CAT ] = { TABLE_SKILL_PHYSICAL, TABLE_...
b6ad2ec0e4ede8f3108311155b849b221291e3ef
f97166a45de9063b4322a86834420d23250317c4
yslenjoy/Data-Structure-Class-FA18
/Finished Problem of the Day/potd-q44/Hash.cpp
C++
cpp
1,363
no_license
#include <vector> #include <string> #include <iostream> #include "Hash.h" unsigned long HashTable::bernstein(std::string str, int M) { unsigned long b_hash = 5381; for (int i = 0; i < (int)str.length(); ++i) { b_hash = b_hash * 33 + str[i]; } return b_hash % M; }; HashTable::HashTable(int ...
269de4c03470d9fbd0c880636c3c5b7cde9e4c89
206142a2eda00371546cc00d8b6af2433cf2af6e
luizsilvadev/algoritimos
/Exercicios/Lista 2 - Exercícios de Estruturas condicionais/exercicio14.cpp
C++
cpp
246
no_license
#include <iostream> using namespace std; int main(){ int preco; cin>>preco; if (preco<=20000) cout<<preco*1.05; else if (preco>20000 and preco<=40000) cout<<preco*1.1*1.3; else if (preco>40000) cout<<preco*1.15*1.45; return 0; }
c3441c05851541df1483d685f4f12e4b74ceff19
5afd01244bd0aec07a42dbf4b924a54764b7a22a
yuri410/rpg
/external/DirectXShaderCompiler/tools/clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp
C++
cpp
7,602
permissive
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // expected-no-diagnostics // Example tuple implementation from the variadic templates proposal, // ISO C++ committee document number N2080. // Helper type traits template<typename T> struct add_reference { typedef T &type; }; template<typename T> ...
e851ec050e8e3db873fdaf89ff2f279ce29bf0f3
7bbc042bf0b0683581367939f16426ab82276592
kjlisby/arduino_train
/ReverseLoop/OTAHandler.cpp
C++
cpp
1,899
no_license
#include "OTAHandler.h" #include <ArduinoOTA.h> // The OTAHandler is for updating the code on ESP32 over the air from within the // Arduino IDE. It is based on the OTA library, which is part of the basic ESP32 // support found here: https://github.com/espressif/arduino-esp32/blob/master/libraries/ArduinoOTA/examples/...
914bef963ae33644f85bac80909474999a74b6e0
0df5f96fe280539e98236b7cd7211dc40dc614a9
riyue625/OneGIS.ModelingTool
/VBF/Source/VBF_App/ModelingTool/C_AccessFileSTObject.cpp
C++
cpp
5,137
no_license
#include "C_AccessFileSTObject.h" #include "VBF_Plot/IVBF_3DPlot.h" #include "VBF_Plot/IVBF_3DPlotDoc.h" #include "VBF_Plot/IVBF_3DPlotLayer.h" #include "VBF_Plot/STObject/IVBF_MarkSTObjectPoint.h" #include "VBF_Plot/ElecMag/IVBF_MarkModelLinkMeteor.h" #include "VBF_Plot/ElecMag/IVBF_MarkModelLink2DDualWork.h" #incl...
867636d332b6ad63ced7316696a9e12a4b62e977
312131e5ea313de9c74a187d91e4dbd147763494
churchlab/seqan
/demos/tutorial/sequences_in_depth/assignment_exact_generous_solution.cpp
C++
cpp
643
permissive
#include <iostream> #include <seqan/sequence.h> #include <seqan/stream.h> #include <time.h> using namespace seqan; int main() { unsigned num = 1000000; time_t start; String<Dna> str; clear(str); start = time(NULL); for (unsigned i = 0; i < num; ++i) { appendValue(str, 'A', Exact...
7caaecd470bf77e6b2e32eda8ffc4af1a46fa7bd
83e93112261507bba453bb68235d28f1423e7717
narteagam/DiabeticFootExtension
/FeetSegmentation/Logic/FeetSegmentation.cxx
C++
cxx
3,683
no_license
#include "FeetSegmentation.h" #include "FeetSegmentationDataset.h" #include "vtkFeetSegmentationDataset.h" #include "Utils.h" #include <torch/script.h> //Tmp #include <QDebug> FeetSegmentation::FeetSegmentation() : device(torch::cuda::is_available() ? torch::kCUDA : torch::kCPU), normalize(torch::data::transforms...
d1e5a5172c05a6725cb38858c8af73702a1ccbe2
f70accf24de515f3ee61e449ce1313c825967055
proletesseract/navcoin-core
/src/qt/qvalidatedspinbox.cpp
C++
cpp
918
permissive
#include <qt/qvalidatedspinbox.h> #include <qt/guiconstants.h> #include <qt/skinize.h> #include <QDialog> QValidatedSpinBox::QValidatedSpinBox(QDialog *parent) : QSpinBox(parent), valid(true) { connect(this, SIGNAL(textChanged(QString)), this, SLOT(markValid())); } void QValidatedSpinBox::setValid(bool v...
df300d7070d2b44f5a2dc92a7f8d4d3f13aa37bd
ad0a637b3b09ef29211d9d55e4d9462ab6a66c6d
greearb/vocal-ct
/rtsp/rtspstack/CharDataParser.cxx
C++
cxx
11,802
permissive
/* ==================================================================== * The Vovida Software License, Version 1.0 * * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following ...
98fd41431e24a83eb8b5c9dd9e95fd72619687ae
8d3255e6a34bf5da42a8c81de33f66fb8ee9cec1
kmario23/ray_tracer
/CG1-skeleton/main/a_materials.cpp
C++
cpp
5,796
no_license
#include <core/assert.h> #include <core/scalar.h> #include <core/image.h> #include <rt/world.h> #include <rt/renderer.h> #include <rt/cameras/perspective.h> #include <rt/solids/quad.h> #include <rt/solids/sphere.h> #include <rt/groups/simplegroup.h> #include <rt/materials/dummy.h> #include <rt/lights/pointlight.h> #...
7f7712641d249ae4629c23d28d4486bab93b6402
bf89620604c3266bd2b068866a0146d9e80f8ae6
openvinotoolkit/openvino
/src/plugins/intel_cpu/src/transformations/cpu_opset/arm/pass/convert_group_conv1d.cpp
C++
cpp
3,508
permissive
// Copyright (C) 2020-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "convert_group_conv1d.hpp" #include <numeric> #include <openvino/opsets/opset1.hpp> #include <openvino/opsets/opset8.hpp> #include <ngraph/rt_info.hpp> #include <ngraph/pattern/op/wrap_type.hpp> template <class Conv> ngrap...
611199f67ac514207bd9d12d13d1ef76d5b84628
4c354182615232d7df8594284e916dbc8ea782fb
Andrzej07/Sieci-Platformowka-Windows
/Sieci Platformowka/Errors.cpp
C++
cpp
278
no_license
#include "Errors.h" #include <iostream> #include <SDL\SDL.h> void fatalError(std::string errorString) { std::cout << "Fatal error: "; std::cout << errorString << std::endl; std::cout << "\n Press any key to quit...\n"; int tmp; std::cin >> tmp; SDL_Quit(); exit(1); }
c0bddb2acdb77530d4e19b2d50223a5a5d639694
a888ea7bc1c13c60e236a7a1beb1e92b5e1ebb0d
tpdownes/htcondor
/src/condor_shadow.V6.1/pseudo_ops.cpp
C++
cpp
20,673
permissive
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
c6c03b7e399deee25f3d4e7860b64efb25e25a03
4a60fce8e959655342d2e653530862a3962149ee
youtube/cobalt
/cobalt/layout/layout_stat_tracker.cc
C++
cc
3,677
permissive
// Copyright 2016 The Cobalt 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 ap...
c544c50f8212e38f48c03d8973f97a41caee8c3d
9343982bb576b5905d579291de8254e280f4c09a
Armida220/pointCloud
/PointCloud/evaluateImages.cpp
C++
cpp
2,257
no_license
#include "evaluateImages.h" namespace calibration { void computeCellIndexs( const std::vector<std::vector<cv::Point2f>>& imagePoints, const cv::Size& imageSize, const std::size_t& calibGridSize, std::vector<std::vector<std::size_t>>& cellIdxPerImage) { // 计算每个单元格的宽高 float cellWidth = float(imageSize.widt...
c389a1befd186ba012023def3d36373e911c367d
c2baa3715f25d74a4f1dad3c3918b86a33e465de
otcshare/chromium-src
/content/browser/media/session/audio_focus_delegate_android.cc
C++
cc
3,849
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/media/session/audio_focus_delegate_android.h" #include "base/android/jni_android.h" #include "base/unguessable_token.h" #includ...
fa1c8fb210016a45061ebb1ac6677c7d17479e8c
16a0c25147ac8e4790e0e8d8bce7d729da65bcfc
andryushabolkonskiy/AA_labs_2020
/lab_2/code/test.cpp
C++
cpp
1,807
no_license
#include "test.h" unsigned long long tick(void) { unsigned long long d; __asm__ __volatile__("rdtsc" : "=A" (d)); return d; } void test(std::ofstream &file, unsigned start, unsigned end, unsigned step) { unsigned long int tb, te; int **A, **B, **C; unsigned quantity_tests = 3; fo...
3179a996472d78aa3bbf7764585798a8adb3e3fd
a14dc0d129e7ee4db34b37a49b3f23e8cb517ae2
eldy/other
/archives/SecretKeyLogger/Sources/Hooker/COMMON.CPP
C++
cpp
3,102
no_license
/********************************************************************/ /* */ /* Hooker, trojan module v2.x */ /* ACrazzi, 1999 */ /* ...
6b826fcbc9fe24b54a6b43115fac785916a00ed9
1b5acb474564579e4ab497fba5b201993955510a
geobeans/svs
/gdal/src/frmts/raw/dipxdataset.cpp
C++
cpp
12,850
no_license
/****************************************************************************** * $Id: dipxdataset.cpp 23060 2011-09-05 17:58:30Z rouault $ * * Project: GDAL * Purpose: Implementation for ELAS DIPEx format variant. * Author: Frank Warmerdam, warmerdam@pobox.com * *********************************************...
a7c0512e070bd264ab026f20fccf00b14addf36c
94d9201ac9af65480509e6a2f66217c44118767f
Karmiska/Darkness
/darkness-engine/private-src/engine/graphics/dx12/DX12ResourceDebug.cpp
C++
cpp
443
no_license
#include "engine/graphics/dx12/DX12ResourceDebug.h" namespace engine { ResourceDebug resourceDebug; void ResourceDebug::registerResource(const char* name, void* ptr) { m_map[ptr] = name; } void ResourceDebug::unregisterResource(void* ptr) { m_map.erase(ptr); } const char* ResourceDebug::name(void* ptr) ...
67895cc62cc9553bb60071edc09ad32b20b3ec04
159f3a99264eeaeb266b810cf88fc988ea5cbecb
boshkins/pelopia
/language/python/pelopia_python.cpp
C++
cpp
1,102
no_license
#include <pelopia/Dataset.h> #include <pelopia/Response.h> #include <pelopia/GeocodeJSON.h> using namespace Mapzen::Pelopia; using namespace std; extern "C" { void *createDataset(const char *filename) { Dataset *ds = new Dataset(filename); return (void *)ds; } void *Search_py(void *ds, const char *...
6a0f331dc2bcd97cb4346bcb5f69c23d90fbb744
7440d328aa264ca082a5fb4ff848d10612574a27
Bigbell01/Portfolio
/Advanced_programmation2/Peggle_project/Peggle_Keven_Bell/PeggleKevenBell.cpp
C++
cpp
2,387
permissive
#include "stdafx.h" #include "PeggleKevenBell.h" #include"iostream" PeggleKevenBell::PeggleKevenBell() { ballcount = 5; direction = D3DXVECTOR3(0.01, 0.01, 0); background = new Sprite(L"Sprite_pegle/background_pegle.jpg"); panier = new Sprite(L"Sprite_pegle/peggle_panier.png"); /*HUDl = new Sprite(L"Sprite_pegle/...
df3a1bed4a3eadd1cc0830c6b5760339332884a4
c364b19515d62c0e6033c030a4673f5dc7eb4b0b
r-type/uae4arm-libretro
/libretro/osdep/pandora.cpp
C++
cpp
32,168
no_license
/* * UAE - The Un*x Amiga Emulator * * Pandora interface * */ #include <algorithm> #include <iostream> #include <vector> #include <stdlib.h> #include <stdarg.h> #ifndef VITA #include <asm/sigcontext.h> #endif #include <signal.h> #ifndef VITA #include <dlfcn.h> #endif //#include <execinfo.h> #include "sysconfig.h"...
fc41c5b6952372554089b9e5bf1814ef596f4812
b1c6fd37ff4a3b7b9200e153392e3495c80cf6f0
fpoussin/ChibiOS-Gwen
/src/Controls/HSVColorPicker.cpp
C++
cpp
4,759
no_license
/* GWEN Copyright (c) 2010 Facepunch Studios See license in Gwen.h */ #include "Gwen/Controls/HSVColorPicker.h" #include "Gwen/Controls/ColorControls.h" #include "Gwen/Controls/ColorPicker.h" #include "Gwen/Controls/TextBox.h" #include "Gwen/Controls/Label.h" #include "Gwen/Utility.h" using namespace Gwen; using ...
63c5e5df5b04f50946088d219fc9440aba4b43a0
7016094d8cc1ace80c02f9f5d2ff1f923bc1e477
chrisoldwood/WCL
/IStreamBase.hpp
C++
hpp
1,529
permissive
//////////////////////////////////////////////////////////////////////////////// //! \file IStreamBase.hpp //! \brief The IStreamBase interface declaration. //! \author Chris Oldwood // Check for previous inclusion #ifndef WCL_ISTREAMBASE_HPP #define WCL_ISTREAMBASE_HPP #if _MSC_VER > 1000 #pragma once #endif nam...
eaac447cf9b9979ecf7106353fb4f103000436da
db650bacf2019c73162522700e9277d19824d437
ss-haze/cpp_primer
/ch16/16-47.cpp
C++
cpp
442
no_license
#include <iostream> template <typename F, typename T1, typename T2> void flip (F fn, T1 &&t1, T2 &&t2) { fn(std::forward<T2>(t2), std::forward<T1>(t1)); } void f(int &&v1, int &v2) { std::cout <<v1 << " "<< v2<< std::endl; } void g(int v1, int &v2) { std::cout <<v1 << " "<< v2<< std::endl; } int main() { ...
211da71a0eb43e0a2457d0e8fc50c3c3733f5455
905e23255a67f32d90c30cbce6d960f454b0a17f
stellagao/dtn2
/dtn-experiment/DTN/DTN2/apps/dtnsend/dtnsend.cc
C++
cc
22,451
permissive
/* * Copyright 2004-2006 Intel Corporation * * 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...
586debdb3fd083fae8ea2544fa88985df6db3dc0
0519ee847cffb60546aed6667b8a1cbbc9335ddc
gregruthenbeck/The-Forge
/Examples_3/Unit_Tests/src/25_Skinning/25_Skinning.cpp
C++
cpp
43,536
permissive
/* * Copyright (c) 2018-2019 Confetti Interactive Inc. * * This file is part of The-Forge * (see https://github.com/ConfettiFX/The-Forge). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information...
0262869eae81c83a26132f6615c88ae7b8d78f9d
e51eecc9c20d10048b12a47d8be7c7502cf15b20
yl365/filesremote
/src/sftpconnection.cpp
C++
cpp
34,350
permissive
// Copyright 2020 Allan Riordan Boll #include "src/sftpconnection.h" #ifdef __WXMSW__ #include <winsock2.h> #else #include <arpa/inet.h> #include <netdb.h> #include <sys/socket.h> #include <unistd.h> #endif #include <wx/secretstore.h> #include <libssh2.h> #include <libssh2_sftp.h> #include <time.h> #include <u...
3a38a84351bde035e94f61c65326a8eef374fe92
fe5dc00d3c373123ee1ea2f8936c3e8ccaab1097
balintradics/Matching
/MatchMaker.cc
C++
cc
6,190
no_license
#include "MatchMaker.h" #include <iostream> using namespace std; MatchMaker::MatchMaker(){ } MatchMaker::~MatchMaker(){ } void MatchMaker::init_data(){ const char *student_data[][3] = { {"1", "c2", "c1"}, {"2", "c2", "c1"}, {"3", "c2", "c1"}, {"4", "c1", "c2"}, {"5", "c1", "c2"} }; const cha...
e75c88bc5744135f089bf1edac2865f7978a1740
58c60ccae5ff71f64d2bb4e6eb2ddc802d1df8db
omichele/icars_undistortion_color
/src/utils.cpp
C++
cpp
3,278
no_license
#include "utils.h" using namespace cv; Mat makeQMatrix(Point2d image_center,double focal_length, double baseline) { Mat Q=Mat::eye(4,4,CV_64F); Q.at<double>(0,3)=-image_center.x; Q.at<double>(1,3)=-image_center.y; Q.at<double>(2,3)=focal_length; Q.at<double>(3,3)=0.0; Q.at<double>(2,2)=0.0; Q.at<...
7184aa342b2d8cf2f8a2f30727e050de821a47fe
7c71d1238a7377b93b2365eaf4f92894a0d3c4f7
RangooDu/LeetCode
/ArithmeticSlicesII-Subsequence.cpp
C++
cpp
680
permissive
class Solution { public: int numberOfArithmeticSlices(vector<int>& A) { int ans = 0; int n = A.size(); vector<unordered_map<long long, int> > dp(n); for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { long long d = (...
2915454b2c07af74569072016847b9eb3887968f
cfd6dddbfbaa360f68b4586e3a090fc041d88c13
utkarshyadav46/DataStructure
/Largest subarray with 0 sum.cpp
C++
cpp
790
no_license
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; int maxLen(int A[], int n); int main() { int T; cin >> T; while (T--) { int N; cin >> N; int A[N]; for (int i = 0; i < N; i++) cin >> A[i]; cout << maxLen(A, N) <<...
a300a23cb9f81042199cc5d849120cdac31b616d
aeefa38f74d6cb6ebe4f1092020915339ce33700
pwnzen-mobile/ios-app-to-ir
/lib/IR/AutoUpgrade.cpp
C++
cpp
33,705
permissive
//===-- AutoUpgrade.cpp - Implement auto-upgrade helper functions ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
9cc7e7743f6c7b03ce6af219d0cb2bf5af53846a
d2824f4a4f0441efa1fa2e71d8afc83434852fc8
prayush/spectre
/tests/Unit/ParallelAlgorithms/Amr/Actions/Test_CollectDataFromChildren.cpp
C++
cpp
12,316
permissive
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Framework/TestingFramework.hpp" #include <array> #include <deque> #include <pup.h> #include <unordered_map> #include <unordered_set> #include <vector> #include "Domain/Amr/Helpers.hpp" #include "Domain/Amr/Tags/Flags.hpp" #include "Domai...
38778c9635687351581821c8efc5bdc6c5f3a233
2cbcd7172bf0b7a3479f3ed2c36e1e85dcbdd8e7
Giantpizzahead/comp-programming
/USACO/Archived Contests/February 2021 (Platinum)/minimizingedges.cpp
C++
cpp
4,746
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define sz(x) ((int) x.size()) #define all(x) x.begin(), x.end() using ll = long long; const int MAXN = 1e5+5, INF = 1e9; int N, M; vector<int> adj[MAXN]; int distE[MAXN], distO[MAXN]; int nodeType[MAXN]; struct State ...
274f79d8c40388d99f8737bc9dab653d97620ce4
ee0b4953b1da8c461a1b5bc74640cd316797ba7d
IshanRanade/PathTracer
/assignment_package/src/scene/geometry/glshapecreation.cpp
C++
cpp
14,958
no_license
#pragma once #include "sphere.h" #include "squareplane.h" #include "cube.h" #include "disc.h" #include "mesh.h" #include "implicit.h" // I've put all of the Shape::create() functions in here to separate the OpenGL pre-visualization // code from the path tracer code static const int SPH_IDX_COUNT = 2280; // 760 tris ...
f0dd1cc1ee63d45d1aee06146634f743c7c75696
cc25f69530dd55a23a6f4533b3a404772979b777
whitebluepants/OJ-Practice
/PAT-乙级/1053.cpp
C++
cpp
958
no_license
#include <stdio.h> using namespace std; int read() { char ch = getchar(); int f = 1; int x = 0; while(ch < '0' || ch > '9'){if(ch == '-')f = 0;ch = getchar();} while(ch >= '0' && ch <= '9'){x = x * 10 + ch - '0';ch = getchar();} return f?x:x*-1; } int main() { int n = read(); double e; i...
37ca4844a00b73b2d4e631ccf1e9788050f8cb53
7090dd0460dd458abccf797ab713b0d6ceea724f
be9/oopcode
/lection_1_06/uommap1.cxx
C++
cxx
818
permissive
#include <unordered_map> #include <iostream> #include <random> using namespace std; default_random_engine generator; uniform_int_distribution<int> distribution(1, 1000); int main() { unordered_multimap<int, int> values; for (int i = 0; i < 10000; ++i) values.insert({ distribution(generator), distrib...
991839488d9a51d9c1b9d43147839ce42fcf843e
97361a711a63e9a94cf3582901118171d18f4466
IvanLunev/modern_prog
/FUN1.cpp
C++
cpp
678
no_license
#include "stdafx.h" #include <iostream> #include <Eigen/Dense> #include "FUN1.h" #include <string> using namespace Eigen; using namespace std; FUN1::FUN1(VectorXd& v) { dim = v.rows(); V0 = v; }; MatrixXd FUN1::Hessian(VectorXd& v) const { MatrixXd k(dim, dim); k << 6 * v(0), 6 * v(1), 6 * v(1), 6 * v(0); retur...
4e310ae58ad22e6a4df2ddec0d67733951e2f51f
c0c3dcd59fc0e588dc0f96d5c368d73d1e53d745
KEK-Co/Parallel_programming_2020_CI
/modules/task_3/skripal_a_sortshell/main.cpp
C++
cpp
3,448
permissive
// Copyright 2020 Skripal Andrey #include <mpi.h> #include <gtest-mpi-listener.hpp> #include <gtest/gtest.h> #include <vector> #include <iostream> #include "./sortshell.h" TEST(Parallel_Sort, Test1) { int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); int size = 2500; std::vector<int> seqres; std::ve...
1f419a71ab47919dcd459ab75cc06b3b10f95817
08843ef90487ded8c69c67b8a2471005fe926858
kennashka/cpp-algorithms
/binary_to_deci.cpp
C++
cpp
606
no_license
#include <iostream> using namespace std; // function to convert decimal to binary void decToBinary(int n) { // array to store binary number int binaryNum[32]; // counter for binary array int i = 0; while (n > 0) { // storing remainder in binary array binaryNum[i] ...
bb29737c8cd06db327f484cd19f9da21098cbaca
94bef8f3202e2eb8cfcb23e17e3295ae0b6ba3bf
milindthakur177/support
/tensorflow_lite_support/cc/test/task/vision/landmark_detector_test.cc
C++
cc
5,283
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...
c47382bba45b4c96fa31244213603b2bde358b29
715611929edabe499084b93b07c7d4e0a8575b96
dani-lp/chess2
/dependencies/blah/src/images/image.cpp
C++
cpp
6,633
no_license
#include <blah/images/image.h> #include <blah/streams/stream.h> #include <blah/streams/filestream.h> #include <blah/core/common.h> using namespace Blah; #define STB_IMAGE_IMPLEMENTATION #define STBI_ONLY_JPEG #define STBI_ONLY_PNG #include "../third_party/stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include ...
1493d1f98ada9253f30f2d830e9df1fe17878337
2384e4b15e0aaf93e9ac7dc73583882b93ff57c5
ZekeZR1/TGame
/ZekeGame/ZekeGame/Game/Monster/Action/Act_Majinken.cpp
C++
cpp
2,819
no_license
#include "stdafx.h" #include "Act_Majinken.h" #include "ACTEffect.h" #include "../Monster.h" #include "../../GameData.h" Act_Majinken::Act_Majinken() { m_ActionId = enMajinken; } Act_Majinken::~Act_Majinken() { if (m_efk != nullptr and m_efk->IsPlay()) m_efk->Stop(); } bool Act_Majinken::Action(Monster* me) { ...
bf03476c5ee5a383e5ef29cee8920980c522e060
e433b1eecd3158054768df00634032ef85f154b0
xchmwang/algorithm
/basic/tree_traversal/preorder.cpp
C++
cpp
622
no_license
#include <deque> #include <stack> #include <vector> struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x): val(x), left(NULL), right(NULL) {} }; class Solution { public: vector<int> preorderTraversal(TreeNode* root) { vector<int> v; stack<TreeNode*> st; TreeNode ...
0035fe01a19d8632a7bda3dc402da1178274f794
37127fec948481e4a1425b07ce7f6f99f648afa1
siedentop/rapidfuzz
/examples/classify/main.cpp
C++
cpp
754
permissive
#include <rapidcheck.h> using namespace rc; enum class Gender { Male, Female }; std::ostream &operator<<(std::ostream &os, Gender gender) { os << ((gender == Gender::Male) ? "Male" : "Female"); return os; } struct User { std::string username; Gender gender; }; namespace rc { template <> struct Arbitrary<U...
8195c7e89e7c7f70aaf1dc81c24add103b8d46ca
7873546899d7b079a620ac0b646fdbbb74b65383
frainfreeze/studying
/university/10004-Programming/labs/v6/zadatak7.cpp
C++
cpp
444
permissive
#include <iostream> using namespace std; // zadatak 7. Napisite funkciju paran koja vraca istinu ukoliko je proslijedeni broj paran. bool jeliParan(int broj) { if (broj % 2 == 0) { return true; } else { return false; } } int main() { int broj; cout << "Unesite broj: " << endl; cin >> broj; cout << "unse...
0eea1f9f231f4669525fc44528ae94c00c5c597d
5e183752a597d09252d76996158446ec9c364ef3
Epitech-Strasbourg-CT/Epitech-Computer-Science-School-Projects
/CppPool/cpp_d17/ex00/find.hpp
C++
hpp
438
permissive
// // find.hpp for find in /home/gwendoline/Epitech/Tek2/Piscine_cpp/piscine_cpp_d17/ex00 // // Made by Gwendoline Rodriguez // Login <gwendoline@epitech.eu> // // Started on Fri Jan 22 10:31:03 2016 Gwendoline Rodriguez // Last update Fri Jan 22 11:04:16 2016 Gwendoline Rodriguez // #ifndef FIND_HPP #define FIND_H...
e52c5e51ce4ee741c33d259332c0d034ffc37105
9afaa5eac5aec83188a79d61321e4faa6351b199
mhigg/3DAirHockey
/AirHockey/Classes/Obj/BallAfter.cpp
C++
cpp
2,122
no_license
#include "BallAfter.h" USING_NS_CC; BallAfter::BallAfter() : _invTime(10) { Init(); } BallAfter::BallAfter(const cocos2d::Vec3 & lPos) : _invTime(10) { _localPos = lPos; Init(); } BallAfter::~BallAfter() { } void BallAfter::Update(const cocos2d::Vec3 & lPos) { if ((_cnt / _invTime) % 2) { /// 3次元座標の更新 for...
1eee6c09c6d9df9ffc35a9db6d71aaf869b90b8c
a9cacdb7f28e6c16f7ab0963a1fd0bd3e3e4a208
czlc/mesa
/src/compiler/glsl/glsl_parser_extras.cpp
C++
cpp
83,456
no_license
/* * Copyright © 2008, 2009 Intel Corporation * * 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, copy, modify, merg...
e1565a56956c6296f7c6ee44b859a81c3203982b
9ec0202702c176f0128388365851137b1c420239
A-World/CPPConceptsInterviewPreparation
/stl/part01/part_01_05.cpp
C++
cpp
385
no_license
/* Algorithms : on basic C array */ #include <algorithm> #include <stddef.h> #include <iostream> using namespace std; int main() { int arr[] = {55,33,22,11,44}; int *begin = &arr[0]; int *end = &arr[0] + 5; sort (begin,end); for (int * i = begin ; i != end; i...
550625a5e7c2a7f7ae724c2cdb4d87cde274943e
6119852b60973522f9f07e22d0c838ce9d5420a7
qfu/hhvm
/hphp/runtime/base/mixed-array.cpp
C++
cpp
66,463
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
3a55356adcea6ab353bcf775852e277a07a0eeb7
f063c27830e17a69f9c50893c796da0dbeeddde0
Green-Sky/soloud
/src/core/soloud_audiosource.cpp
C++
cpp
7,053
permissive
/* SoLoud audio engine Copyright (c) 2013-2014 Jari Komppa 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 comm...
a474da8fe0fc3f38e3778e2bc41fe3e6f2048d7c
906af2984bc7313b40acb41984cadd628c9a9479
Springhead/dependency
/src/boost/spirit/home/support/char_encoding/unicode/create_tables.cpp
C++
cpp
17,791
no_license
/*============================================================================= Copyright (c) 2001-2010 Joel de Guzman 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) ========================================...
dfd20d791107e8c2953032529d498d0992bdfd75
41931acc02d515ef3aca89a88c4a4d3c07a65c6b
aldukeman/lmtd
/preprocess/operator.cc
C++
cc
13,847
no_license
#include "helper_functions.h" #include "operator.h" #include "variable.h" #include <cassert> #include <iostream> #include <fstream> using namespace std; Operator::Operator(istream &in, const vector<Variable *> &variables) { check_magic(in, "begin_operator"); in >> ws; getline(in, name); int varNo; ...
27fd79d4822b9b909fde9c0ec26072f9129bf0b0
8308a29220fa414110f2bf12688e6552733f6a97
hibino0429/MyGameTemplate
/gameTemple/src/ECS/ECS.cpp
C++
cpp
509
no_license
#include "ECS.hpp" void ECS::Entity::addGroup(Group group) noexcept { groupBitSet_[group] = true; manager_.addToGroup(this, group); } void ECS::EntitiesUpdate(const std::vector<Entity*>& entities) { for (const auto& it : entities) { it->update(); } } void ECS::EntitiesDraw2D(const std::vector<Entity*>& entit...
27f43f91b1638608bfe0198bf1f79d4d6aac03e8
81958a0857642c32b8a2ead8b677ca83fc46b2ad
eirikbell/Karabiner-Elements
/appendix/dump_hid_value/main.cpp
C++
cpp
5,107
permissive
#include "dispatcher_utility.hpp" #include "event_queue.hpp" #include <csignal> #include <pqrs/osx/iokit_hid_manager.hpp> #include <pqrs/osx/iokit_hid_queue_value_monitor.hpp> namespace { class dump_hid_value final : public pqrs::dispatcher::extra::dispatcher_client { public: dump_hid_value(const dump_hid_value&) = ...
80ffc1e715c9aa0f9d9b98c03d2831ba3d7c6d1b
edadda212328aa9fe232583e0b29230fc41b9336
cea56/chromium
/weblayer/renderer/ssl_error_helper.cc
C++
cc
3,360
permissive
// Copyright 2019 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 "weblayer/renderer/ssl_error_helper.h" #include "content/public/renderer/render_frame.h" #include "third_party/blink/public/common/associated_in...
f46415d095541cca614a39ae650d0daa6ed790df
5c260c11d691d5eb2cb684cd67e097c9712f7539
Think-Jumper/opensteer
/example/OpenSteerDemo.cpp
C++
cpp
50,157
permissive
// ---------------------------------------------------------------------------- // // // OpenSteer -- Steering Behaviors for Autonomous Characters // // Copyright (c) 2002-2005, Sony Computer Entertainment America // Original author: Craig Reynolds <craig_reynolds@playstation.sony.com> // // Permission is hereby grante...
42cd4c7978c92bfd868f243bf025d9d3a6b2f55a
ace1645e4db4e63fe7b4fdbd3f283e49ec893a77
blackberry/Boost
/boost/asio/basic_raw_socket.hpp
C++
hpp
36,690
permissive
// // basic_raw_socket.hpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2012 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.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASI...
4a375ea949d32b74b2e287125642fb99db640310
d29010dc55e9b95445f2e9376b333b9bd61d7966
Nalic/chromium
/chrome/browser/android/intercept_download_resource_throttle.cc
C++
cc
1,713
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/android/intercept_download_resource_throttle.h" #include "content/public/browser/android/download_controller_android.h" #inc...
6dd98adc046753b54eaf2ba8f3bc6a09715b3b71
b54c1e47662429bc2a9b0f0d908671198665450c
antoniomosca/coolfluid3
/src/Common/Exception.cpp
C++
cpp
3,764
no_license
// Copyright (C) 2010-2011 von Karman Institute for Fluid Dynamics, Belgium // // This software is distributed under the terms of the // GNU Lesser General Public License version 3 (LGPLv3). // See doc/lgpl.txt and doc/gpl.txt for the license text. #include <iostream> #include "Common/Log.hpp" #include "Common/Except...
bee56219e0d70d104c43ee63010599e05ec704c9
e4e54b4c9b433c7740ff35e967268ed356587ace
superTangcc/toc-collaborate
/Pochoir/Stencil_Collection/openLatticeBoltzmann-0.5r1/src/boundaryConditions/zouHeDynamics.cpp
C++
cpp
2,330
no_license
/* This file is part of the OpenLB library * * Copyright (C) 2007 Orestis Malaspinas, Jonas Latt * Address: Rue General Dufour 24, 1211 Geneva 4, Switzerland * E-mail: jonas.latt@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Pub...
8ae04d5f600bc26c3efcdfb088dddc736755d2ca
f9ec3f8e49281ce50ce95ece8a92ad4f49259b80
smallzhan/wpgenerator
/common/showarea.cpp
C++
cpp
3,913
no_license
#include <QtGui> #include <iostream> #include <QTimer> #include "showarea.h" #include "wpdefines.h" ShowArea::ShowArea(QWidget *parent) : QWidget(parent) { waterdrop_ = 0; col_ = WaterPrinter::g_col; row_ = WaterPrinter::g_row; show_static_ = WaterPrinter::show_static; se...
4201a611e73a5aff30c0806f4e07a5f9b3d7c9f8
6e281e116dd53909b8c11da1decb7b31aff6e36d
jmorse/llvm-project
/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
C++
cpp
53,910
permissive
//===----------------------- SIFrameLowering.cpp --------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //==----------------------------...
1f154172d7a5e6455bb050b86cf7680a5498a332
630089e3d78bce0346ce0406e1d35714ca66880d
aleksandraprohorova/spbspu-labs-2019
/B5/algorithms2.cpp
C++
cpp
2,043
no_license
#include <vector> #include <iostream> #include <numeric> #include <algorithm> #include <iterator> #include <list> #include "shape.hpp" #include "manipulator.hpp" void algorithms2() { std::cin >> std::skipws; std::list<Shape> shapes(std::istream_iterator<Shape>(std::cin), std::istream_iterator<Shape>()); if (!s...
b818c3cfbb1643575bbadfbbaa5dfd4079f3b057
6fce4f791d9771aad390bc8bb62531bfadec61fb
Pentagon03/competitive-programming
/project-euler/volume06/267.cc
C++
cc
943
no_license
#include <bits/stdc++.h> const int N = 1000; typedef long double flt; flt dp[N + 1][N + 1], p[N + 1]; flt L(flt f, int n) { return (9 * log(10) - n * log(1 - f)) / (log(1 + f * 2) - log(1 - f)); } flt run(int n) { memset(dp, 0, sizeof(dp)); dp[0][0] = 1; for (int i = 0; i < n; ++i) { for (int j = 0; j <...
8b3721dc77a0c27b33f5cbf8ec4ba36483f17d99
5f3995c885c5f2dd39a2608b483234e6b85891bc
vencik/libprocxx
/src/libprocxx/io/event_loop.hxx
C++
hxx
14,628
permissive
#ifndef libprocxx__io__event_loop_hxx #define libprocxx__io__event_loop_hxx /** * \file * \brief Linux epoll-based (socket) I/O event loop * * \date 2018/03/31 * \author Vaclav Krpec <vencik@razdva.cz> * * * LEGAL NOTICE * * Copyright (c) 2017, Vaclav Krpec * All rights reserved. * * Redistrib...
880385b12265a765117354641233e1b4c8a408f5
2cd9522cd9aec35076888955a62818e590a2491e
kamilponiewierski/PP2
/lab_04/src/lab2/matrix.cc
C++
cc
3,105
no_license
#include <iostream> using namespace std; #include "matrix.h" #ifndef _MSC_FULL_VER // if not Visual Studio Compiler #warning "Klasa jest do zaimplementowania. Instrukcja w pliku naglowkowym" #else #pragma message ("Klasa jest do zaimplementowania. Instrukcja w pliku naglowkowym") #endif TwoDimensionMatrix::TwoDimen...
a531691d7ec650f474f1c30bfb3288bbaa16841f
df76166e11779eb7bf160f36c4811c8c11dc9974
tbs1980/InterviewQuestions
/FindMissingElement/FindMissingElement.cpp
C++
cpp
1,076
permissive
#include <vector> #include <algorithm> #include <cassert> #include <iostream> #include <map> int solution_1(std::vector<int> v1,std::vector<int> v2) { // complexity O(N) assert(v1.size() == v2.size()+1); std::sort(v1.begin(),v1.end()); std::sort(v2.begin(),v2.end()); for(size_t i=0;i<v2.size(...
1794d7d504aaec5beee1c677d48a521bab7930ac
0f74a355d21130402b134873e636a5f52696ff49
ValtoLibraries/Args-Parser
/Args/groups.hpp
C++
hpp
6,512
permissive
/*! \file \author Igor Mironchik (igor.mironchik at gmail dot com). Copyright (c) 2013-2017 Igor Mironchik 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 ...
abdd8002f0601c1f7513ced6cd6555a362d9f262
4ebfb6ec16c22e31c9a58363da0f9860dcf972c6
shaj/otuscpp-hw6
/test_matrix.cpp
C++
cpp
930
no_license
/** \file Тесты */ #define BOOST_LOG_DYN_LINK 1 #define BOOST_TEST_MODULE test_matrix #include <boost/test/included/unit_test.hpp> #include "matrix.h" /** * Основной набор основных тестов */ BOOST_AUTO_TEST_SUITE(test_matrix_suite) BOOST_AUTO_TEST_CASE(test_matrix) { my::matrix<int, -1> m; BOOST_CHECK(...
ecb13d3a9701c2645ad8607512d21992f930141c
6c71429b144ba076f53710ebd1f632bbe33cf382
christmoore/Inheritance-Final
/classes/Triangle.cpp
C++
cpp
2,339
no_license
#include "Triangle.h" #include <cmath> #include "graph1.h" Triangle::Triangle() { a.setPoint(0,0); b.setPoint(0,0); c.setPoint(0,0); } Triangle::Triangle(GenPoint a, GenPoint b, GenPoint c, Color color) { this->a.setPoint(a.getX(), a.getY()); this->b.setPoint(b.getX(), b.getY()); this->c.setPoint(c.getX(),...
808f42d8c1180f4f3715bf3d6f6ecaf2218e2589
1e96b67b246c177dfbb92d4b37ba6b3583242f3f
jlnsbrt/Malon
/Malon10/Malon10/MultiRateCurveCalibration.cpp
C++
cpp
5,218
no_license
#include"MultiRateCurveCalibration.h" #include<list> void MultiRateCurveCalibration::Calibrate() { CreateRateCurveCalibrations(); m_MultiRateCurve.reset(new MultiRateCurve()); m_DiscountCurveCalibration->Calibrate(); m_MultiRateCurve->SetDiscountCurve(m_DiscountCurveCalibration->GetRateCurve()); for (std...
66e362d3b1329b67c5cc5a3f59356bd3d45a9a63
0ec0e584085488d2d92d7a38d7634705dcd7dd64
sarsaids1/qtgl2d
/qtgl01/drawutilities.cpp
C++
cpp
2,453
no_license
#include "drawutilities.h" #include "debugtools.h" #include <QtOpenGL> #include <iostream> DrawUtilities::DrawUtilities() { } //use x,y,z to be the central point of square void DrawUtilities::draw3DSquare(const int X, const int Y, const int Z, const int L) { const int HL = L/2; if(HL==0){ std::cerr<<"e...
c986eacc37cfed072c9c51dc19516bdfb92b0efe
9aa36cbfef60171e9dae27e6b4a04a4d0b4bd543
madeso/json
/tests/dup.cc
C++
cc
471
permissive
#include "catch.hpp" #include "jsonh/jsonh.h" using namespace jsonh; TEST_CASE("dup-err", "[dup]") { const std::string src = R"( { "a": 4, "a": 3 } )"; auto j1 = Parse(src, parse_flags::Json); REQUIRE_FALSE(j1); } TEST_CASE("dup-ok", "[dup]") { const std::string src = R"( { "a": 4, "a": 3 } )"; ...
933af0caffbfc25f01969795fc122e3f806fc740
cf1ef5890cfbe93fd368c0ee27b6b8a20f031fd3
llluiop/protobuf
/src/google/protobuf/compiler/java/java_map_field.cc
C++
cc
18,820
permissive
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
2c25d881e5a92ccbaaf408c24a5979d39fa4b9b3
312629eac1046cd79787773a09793ab844975a03
15831944/projects
/chrome/chrome/GetLocalDNSImp_IOS.cpp
C++
cpp
475
no_license
#include "GetLocalDNSImp_IOS.h" bool GetLocalDNSPlatformIOS(std::vector<std::string> &vecLocalDnsIp) { bool iErrorCode = false; iErrorCode = res_init(); if(iErrorCode != 0) { return iErrorCode ; } else { std::string strTmp; for (int i=0;i<MAXNS;i++) { strTmp = inet_ntoa(_res.nsaddr_list[i].sin_addr);...
cf965ff9bd38b6aff791d19761ed601a43cc4e6a
5ae48a410fc57dcf60f41e737d314111377f5685
jmarshall23/Doom3
/neo/tools/common/PropTree/PropTreeItemCheck.cpp
C++
cpp
3,808
no_license
// PropTreeItemCheck.cpp : implementation file // // Copyright (C) 1998-2001 Scott Ramsay // sramsay@gonavi.com // http://www.gonavi.com // // This material is provided "as is", with absolutely no warranty expressed // or implied. Any use is at your own risk. // // Permission to use or copy this software for any p...