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
7cb6aecabc64750507207b1b128518a5d3f95aab
df2c42fb6bf298d2ccb085f629e69c456a2e4c25
CUTEQWQ/YTSvrLib
/Sample/Sample/GWServerParser/GWServerParser.cpp
C++
cpp
2,212
permissive
#include "stdafx.h" #include "GWServerParser.h" ////////////////////////////////////////////////////////////////////////// CGWSvrParser::CGWSvrParser(void) : YTSvrLib::CPkgParserBase(), m_poolGateway("CGMSvrSocket") { } CGWSvrParser::~CGWSvrParser(void) { } void CGWSvrParser::ProcessMessage(YTSvrLib::ITCPBASE* pS...
df4728bd0c3a89cba72daacb45f408c222f70fe3
3bde46180ab6a00fb60cc7282aa97c9d0a8ea20a
readex-eu/readex-scorep
/src/tools/info/scorep_info_command_config_summary.hpp
C++
hpp
1,035
permissive
/* * This file is part of the Score-P software (http://www.score-p.org) * * Copyright (c) 2017, * Technische Universitaet Dresden, Germany * * This software may be modified and distributed under the terms of * a BSD-style license. See the COPYING file in the package base * directory for details. * */ #ifnde...
cbba05d7f82c7aef730ea5f3244426dd943fbfbb
6332a09b4a4972d1262c816f904070e4c302c31d
rimever/GameProgrammingCpp
/Chapter6/Chapter6/Texture.cpp
C++
cpp
992
no_license
#include "Texture.h" #include <soil.h> #include <glew.h> #include <SDL.h> Texture::Texture() :mTextureID(0) ,mWidth(0) ,mHeight(0) { } bool Texture::Load(const std::string& fileName) { int channels = 0; unsigned char* image = SOIL_load_image(fileName.c_str() , &mWidth,&mHeight,&channels,SOIL_LOAD_AUTO); if (ima...
d10cbbe217099688f89f033839255d660ccdbe4a
4960c5110855571015e6d0dbc27c4c92895252bd
anasmoni/Non-cp-codes
/L2-T-1/HW4-Heap - st/1505087.cpp
C++
cpp
5,450
no_license
#include<stdio.h> #define MAX_HEAP_SIZE 100000 #define MAXREAL 999999.0 class HeapItem { public: int data; //actual data that is stored float key; //key value of the data, heap is constructed based on key }; //MinHeap class, minimum item stored at the root of heap tree class MinHeap { public: HeapItem * A; //sto...
f391475e59b69dcb211d310ac7184527fafd2d23
033c62e244ee49e3b1728fa68a6d120a910d809a
abrahamacdev/AAED
/practica_1/ej4.cpp
C++
cpp
470
no_license
// // Created by abrah on 11/10/2021. // #include "ej3.h" #include "math.h" #include "iostream" using namespace std; double calcular_media(int N){ double sum = 0; for (int i = 0; i < N; ++i) { double x = frand(0, 1); //cout << (x) << endl; sum += 4 * sqrt(1 - pow(x, 2)); } ...
d48d84b1dad398eeb6fb07bb91105f02531e4908
3c5623ece1a004798a2a4137469cf31c9214e74e
ngaut/tellstore
/deltamain/colstore/LLVMColumnMapProjection.hpp
C++
hpp
2,661
permissive
/* * (C) Copyright 2015 ETH Zurich Systems Group (http://www.systems.ethz.ch/) and others. * * 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/LICENS...
3705af16d95e2734ef7f0ce94b7a5adef519448f
5bc8375aed70d38d3365af94e3b6f52950d049e9
arunsathvik/KTAB
/examples/smp/libsrc/smpbcn.cpp
C++
cpp
30,680
permissive
// -------------------------------------------- // Copyright KAPSARC. Open source MIT License. // -------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2015 King Abdullah Petroleum Studies and Research Center // // Permission is hereby granted, free of charge, to any person obtaining...
0f7af76993e5bb55bdf9a9aea2b5288b41ccb089
ed8e56944460430ab846880b97f482deb90b97be
mcarlson-nvidia/04_BattleTank_Udemy_UnrealCoarse
/BattleTank/Source/BattleTank/Private/TurretAimingComponent.cpp
C++
cpp
3,628
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "TurretAimingComponent.h" #include "BarrelMeshComponent.h" #include "Projectile.h" #include "TurretMeshComponent.h" #include "Kismet/GameplayStatics.h" // Sets default values for this component's properties UTurretAimingComponent...
853eed4668faa0eac9003d5216ee935d18605694
87609f1b40a4d9be9e8a309d9965c5d3436b3afb
Datos2Sem22018/Proyecto2
/Juego/Rutas/Rutas.cpp
C++
cpp
439
no_license
// // Created by mariano on 27/10/18. // #include "Rutas.h" int Rutas::getMatriz() const { return matriz; } void Rutas::setMatriz(int matriz) { Rutas::matriz = matriz; } int Rutas::Dijkstra(int matriz) { return 0; } int Rutas::Prim(int matriz) { return 0; } int Rutas::Kruskal(int matriz) { ret...
b294c1954d12bd5a148314d5f481bb3ee3f3add5
e054d027d0f9a6fa17c764c5d1cd6fe5774e9cab
openvinotoolkit/openvino
/src/core/reference/include/ngraph/runtime/reference/one_hot.hpp
C++
hpp
1,769
permissive
// Copyright (C) 2018-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "ngraph/shape.hpp" namespace ngraph { namespace runtime { namespace reference { template <typename INPUT_TYPE> void one_hot(const INPUT_TYPE* indices, const Shape& indices_shape, cha...
8c6dd686927061298499b1e96c508683b373d005
c76e02b09808d20d72ba7df262a32c36c861eb39
make1122/tencentcloud-sdk-cpp
/bm/src/v20180423/model/DeletePsaRegulationResponse.cpp
C++
cpp
2,452
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 ...
0226afc6187370179bef2b0dc99ccd96841fd76a
63fe48669639897a158600a1bacb24cc02e91e28
tkqlzz/Algorithm
/lib/bfs.cpp
C++
cpp
323
no_license
#include <iostream> #include <queue> using namespace std; #define sync() { ios_base::sync_with_stdio(0); cin.tie(0);} #define endl '\n' int direct[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; void bfs() { queue q; while (not q.empty()) { int cur = q.pop(); int next; q.push(next); ...
786ea28b89ae2c339d521c331617b8c32d648436
81f780cf29333500ac7834201edc8e8875df9127
aleixgab/Factory-Escape
/Motor2D/j1Scene.cpp
C++
cpp
18,960
permissive
#include "p2Defs.h" #include "p2Log.h" #include "j1App.h" #include "j1Input.h" #include "j1Textures.h" #include "j1Audio.h" #include "j1Render.h" #include "j1Window.h" #include "j1Map.h" #include "j1Scene.h" #include "j1Entities.h" #include "j1Pathfinding.h" #include "j1FadeToBlack.h" #include "j1Menu.h" #include "j1...
2e2405c6b2830173ae3950dca690eae22a8e65c4
0a97fb887fb61ff5ae34ab658e9bfb6cfd417776
5455945/chromium
/chrome/browser/ash/arc/accessibility/arc_accessibility_tree_tracker.cc
C++
cc
22,340
permissive
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ash/arc/accessibility/arc_accessibility_tree_tracker.h" #include "ash/public/cpp/app_types_util.h" #include "ash/public/cpp/exte...
645f69d99199a241367cbd5d945dc1dc05087be8
3ac0fccdfdaf4a5a041ddcbc122952c5021d8ffe
RIVeR-Lab/oryx_2012
/oryx_network_manager/src/ActivateConnectionService.cpp
C++
cpp
2,635
no_license
/* * ActivateConnectionService.cpp * * Created on: Nov 28, 2012 * Author: mitchell */ #include "ActivateConnectionService.h" #include "boost/bind.hpp" ActivateConnectionService::ActivateConnectionService(ros::NodeHandle& handle, NMClient* client, NMRemoteSettings* remote_settings) : m_handle(handle...
2f366b46bdc45fe8f2313485ef9831de5413bf20
161f10939d574d9f86f910b67ee40e7a1739fddd
PritomD/Pulsar-Star
/main.cpp
C++
cpp
11,538
no_license
#include <GL/glu.h> #include <math.h> #include <GL/glut.h> #include <stdlib.h> #include <Windows.h> #include <MMSystem.h> float theta; //static int slices = 16; //static int stacks = 16; /* GLUT callback Handlers */ static void resize(int width, int height) { const float ar = (float) width / (float) height; ...
fca75d2b57b25202de1751a2b6c8c74c08939ec3
6f8d86498583b58ff9ca62393c145f0d230d1d72
nibilin33/chromium
/content/browser/renderer_host/frame_connector_delegate.cc
C++
cc
4,849
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/renderer_host/frame_connector_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/...
3bc575a3cd50a02778eb3867efee2222ae2feae2
a4507db9594e24c875a75743de9bd36226c7885a
HermonatJ/MyProject3
/Source/MyProject3/MyProject3GameMode.cpp
C++
cpp
480
no_license
// Copyright Epic Games, Inc. All Rights Reserved. #include "MyProject3GameMode.h" #include "MyProject3Character.h" #include "UObject/ConstructorHelpers.h" AMyProject3GameMode::AMyProject3GameMode() { // set default pawn class to our Blueprinted character static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPC...
d909d5af6144742eec732684493491142ba72517
2b8a61e874a65d5908bd849def6366209190aed9
alexandraback/datacollection
/solutions_5695413893988352_0/C++/math10/tmp2.cpp
C++
cpp
4,461
no_license
/* Author :: MD. Musfiqur Rahman Sanim Aust cse 28th Batch ID:11.02.04.097 */ //{ Template using namespace std; //{ headers #include<bits/stdc++.h> //} //{ Loops #define forab(i,a,b) for (__typeof(b) i = (a); i <= (b); ++i) #define rep(i,n) forab (i, 0, (n) - 1) #define For(i,n) forab (i, 1, n) #defin...
ae47e516deff1ebd9f9c4b357779e4a123a1f3c5
ea1c9f4b784ecbf7337b996fdfe310be030e9515
njoy/lipservice
/src/lipservice/PURR/Card3.hpp
C++
hpp
426
permissive
class Card3 { public: /* nested types */ #include "lipservice/PURR/Card3/Temp.hpp" Argument< Temp > temp; template< typename Char > Card3( iRecordStream< Char >& is, Argument< PURR::Card2::Ntemp >& ntemp) try: temp( argument::extract< Temp >( is, ntemp ) ) { Card::clear( is ); } c...
7e864e6b76034da5f931055bb2d2d4a22d86b9e9
f0939da6b2ff970825b8c397f86beee84aa3a6ec
himanshu520/UVa-OJ
/Graphs/Network Flow/UVa 10330.cpp
C++
cpp
2,245
no_license
//An application of FordFulkerson's algorithm of max flow in a directed graph, with vertex capacities and multiple sources and sinks #include<bits/stdc++.h> #define INF 1000000000 using namespace std; typedef vector<int> vi; int N, M, mf, f, s=0, t=249, x, y, w, B, D, res[250][250]; vector<vi> AdjList; vi p; bitset<2...
97562607d67c5626f8980630f6c1efeabbd246a8
de03613d5e8e4d79f3f9bd3832f897f1a97ca385
teju85/teditor
/src/extensions/grep/mode.cpp
C++
cpp
1,525
permissive
#include "../base/readonly.h" #include "core/buffer.h" namespace teditor { namespace grep { /** grep mode */ class GrepMode: public readonly::ReadOnlyMode { public: GrepMode(): readonly::ReadOnlyMode("grep") { populateKeyMap<GrepMode::Keys>(getKeyCmdMap()); populateColorMap<GrepMode::Colors>(getColorMap());...
bd9b81846ebfc407ded3767784272d2696b7dae0
224d58acff57f776dbcbba8845259065a05d6462
Waelwindows/bvh_anim
/cpp/src/bvh_anim.cpp
C++
cpp
1,867
permissive
#include "bvh_anim/bvh_anim.hpp" #include <iostream> using namespace bvh_anim; constexpr channel::channel(bvh_anim::channel_type ty, size_t idx): type(ty), index(idx) { } constexpr channel::channel(const bvh_Channel& channel): index(channel.channel_index) { switch(channel.channel_type) { case X_POSI...
140976ecb36c424add1f066853156beff9de427a
7c2695b2fbe81ed9b28d0479baa4f3153460cf90
hanganflorin/Sources-and-Algorithms
/sant/main (2).cpp
C++
cpp
1,030
no_license
#include <fstream> #include <cstring> #define INF 0x3f3f3f3f using namespace std; ifstream is("sant.in"); ofstream os("sant.out"); int s, n, c; int L[11], P[11]; int D[101][101], t[101][101]; void Scrie(int i, int j); int main() { is >> s >> n >> c; for ( int i = 1; i <= c; ++i ) is ...
880095742b6b7751a5a5f2c2de4952dafa7c5405
a3eb8e520bd593768b7bb508d71d9e7b2843b279
voidstarr/cs7b
/given/Chapter16/pr16-09.cpp
C++
cpp
540
no_license
// This program illustrates the use of function templates // with multiple types. #include <iostream> #include <string> using namespace std; //template function template <class T1, class T2, class T3> void echoAndReverse(T1 a1, T2 a2, T3 a3) { cout << "Original order is: " << a1 << " " << a2 ...
b2640f273c32031f6f2248275af05d86078794d3
0fd53b784756ec399d842a12575d4f900d895de9
bfar97/CG18-19
/Engine/Deps/sg.cpp
C++
cpp
1,426
no_license
#include "sg.h" using namespace std; // SceneGraph // Construtor // Setters SceneGraph::SceneGraph() { } void SceneGraph::setScale( Escala novaesc ) { this->scale = novaesc; } void SceneGraph::setTrans( TranslacaoV novatrans ) { this->trans = novatrans; } void SceneGraph::setRot( Rota...
f033db5e247d20c95f31873c7aede8e60897c648
d9adffcc0e959fbbe5aba70c6dd13e2f35115284
Mric26/M1-S8
/Geo Num/build-TP1-GeoNum-Desktop-Debug/moc_mainwindow.cpp
C++
cpp
3,214
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'mainwindow.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) ** ** WARNING! All changes made in this file will be lost! **********************************************************...
223a3dd915f5a3f8c09cb2683ed29914dd4bd9c9
fb71335c9f1d156f244111b5dfe9151cd3f9bf53
smorzhov/prefirewall
/PreFirewallTests/lib/googletest/test/gtest-typed-test_test.cc
C++
cc
12,445
permissive
// Copyright 2008 Google Inc. // 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 conditions a...
691a309d101046bfd1e35b9766041dca2a690485
ddd2d506754d2f4ed8979dacd23164ef80fcabf4
AbelChe/MyCodes
/C++/545用栈实现进制转换.cpp
C++
cpp
434
no_license
#include<iostream> #include<stack> #include<math.h> using namespace std; int dec_oct(int dec) { int oct = 0, temp, n = 0; stack<int> stk; while (dec!=0) { temp = dec % 8; dec = dec / 8; stk.push(temp); } while (!stk.empty()) { oct = oct + stk.top() * pow(10, stk.size() - 1); stk.pop(); } return oct; } ...
31695277ca4e8f0b346cb1dbf7c04c916ad18b9c
73b0639101927bfffd4a919133a0621ab0101dba
shitfSign/mqsimple
/src/cpp/qget.cpp
C++
cpp
985
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "mqsimple.h" int main(int argc, char **argv) { char sMessage[MQ_MAX_MESSAGE_SIZE]; int iReturn = 0; int iReadHandle = 0; int iExit = 0; if(argc > 2) { char* sQueueDef = argv[1]; int iWait = atoi(argv[2]); // open queue for reading fro...
e5c0577ff0e12b923fa749a73cd2c1bca3fb9e95
386cc1746e0a9da5cc200550eb4c01d6cd7466f4
sanyaade-projects/android-nn-driver
/ArmnnPreparedModel_1_3.cpp
C++
cpp
33,938
permissive
// // Copyright © 2020 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // // Note: the ArmnnFencedExecutionCallback and code snippet in the executeFenced() function // in this file is based on Android code // under the Apache 2.0 license. See comments below for details. // #define LOG_TAG "Ar...
d1658cdb0e3fb04d3629e4e33cab0e5d80cf9412
f2c7e41b5512857552f0f14e78320daed8d7584a
24sristi/Launchpad-CPP
/Recursion/QuickSort.cpp
C++
cpp
636
no_license
#include<bits/stdc++.h> using namespace std; int partition(int *a, int s, int e) { int i=s-1; int j=s; int pivot =a[e]; for(;j<=e-1;) { if(a[j]<=pivot) { i++; swap(a[i],a[j]); } j++; } swap(a[i+1],a[e]); return i+1; } void QuickS...
9074d5897441eafd1793edfce7d81205853a9662
0376a57b64f0a2921d707123a11af1883413ab00
BigPig0/MPFUI
/third_party/skia/src/effects/SkLerpXfermode.cpp
C++
cpp
3,546
permissive
/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkLerpXfermode.h" #include "SkColorPriv.h" #include "SkReadBuffer.h" #include "SkWriteBuffer.h" #include "SkString.h" SkXfermode* SkLerpXfermode::Create(SkScalar sc...
b6cb645a9be3447dfd77c45222c7da8a2b6aef95
308410922f80c7d36b2600553d0c996c0c1a566c
LeMoktar/gzdoom
/src/scripting/backend/vmbuilder.cpp
C++
cpp
28,512
no_license
/* ** vmbuilder.cpp ** **--------------------------------------------------------------------------- ** Copyright -2016 Randy Heit ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions ** are met: ** ** 1. R...
47fc2b0f451b8b65b2015d36ade1b5950d660645
d36ebf4fd4515fd4dcf29a28664413523bd77883
robwasab/SensorFusionSimulation
/OpenGLWalker.hpp
C++
hpp
1,437
no_license
// // OpenGLWalker.hpp // OpenGLTutorial // // Created by Robby Tong on 1/20/19. // Copyright © 2019 Robby Tong. All rights reserved. // #ifndef OpenGLWalker_hpp #define OpenGLWalker_hpp #include <stdio.h> #include "OpenGLComposite.hpp" #include "Walker.hpp" #include "OpenGLSphere.hpp" #include "OpenGLPrismCylind...
4680f0fecf4a42fd1a1c3e3a12a77a788be10f4e
26abfd7c65c913aa166a06faafedee566718d5e4
Euclideon/udshell
/test/src/libep/array.cpp
C++
cpp
7,229
permissive
#include "eptest.h" #include "traits/hassize.h" #include "traits/isgrowable.h" #include "traits/isshrinkable.h" #include "traits/shared.h" #include "ep/cpp/platform.h" using ep::Slice; using ep::Array; using ep::SharedArray; struct TestSlice { using Type = Slice<int>; using ConstType = Slice<const int>; using...
3864980fd0c5e3362e222a868eb628b7cf46ad06
0ae09aa6881e949eb0d5f6cc84d08c1273bd51ca
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_1/SB+dmb.sy+rfi-ctrl-data-rfi.c.cbmc_out.cpp
C++
cpp
43,324
no_license
// 0:vars:3 // 3:atom_0_X2_0:1 // 4:atom_1_X2_1:1 // 5:atom_1_X7_1:1 // 6:thr0:1 // 7:thr1:1 #define ADDRSIZE 8 #define NPROC 3 #define NCONTEXT 1 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_rng(); char get_rng( char from, cha...
ac22341376c36455f8b582367678ec8277d01764
acc4753861722f7c98edbbfd4f51cfaa52f65d0c
wwwa/tesseract
/src/training/pango_font_info.cpp
C++
cpp
27,924
permissive
/********************************************************************** * File: pango_font_info.cpp * Description: Font-related objects and helper functions * Author: Ranjith Unnikrishnan * Created: Mon Nov 18 2013 * * (C) Copyright 2013, Google Inc. * Licensed under the Apache License, Version 2...
1e5ac223b654a1f46691a2e93990299b68f537e1
fbe0de4b2132b3986353a36f3f9832895af69659
alfredoqt/MissileCommand
/Game/Private/World.cpp
C++
cpp
2,059
permissive
#include "..\Public\World.h" #include "..\Public\GameObject.h" #include "Game\Public\GameObjectHandle.h" #include "Game\Public\COGPhysics.h" #include "Engine\Public\Engine.h" #include "Game\Public\COGLineRenderer.h" #include "Game\Public\COGCollider.h" #include "Game\Public\COGBattery.h" #include "Game\Public\COGMissil...
90d0738bf734b5717962a76b63fc6d18cbc530f6
430007fa52be746c445601ff105bbdbd6603273f
SimonBerens/Reference
/problems/csacademy/ieeextreme2021/bus_company/bus_company.cpp
C++
cpp
997
no_license
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; template <typename K> using hset = gp_hash_table<K, null_type>; template <typename K, typename V> using hmap = gp_hash_table<K, V>; using namespace std; #define all(x) (x).begin(), (x).end() #define pb push_back #define eb...
209a777d217ed4c6ca9c5ca120cc3f7644402ce0
7785bbaab79bd0ef6cbde0ffc1982a56b25dfd3a
neilpirch/CSIS123_Assign02_OutputManipulation
/Assign02-OutputManipulation/Assign02-OutputManipulation.cpp
C++
cpp
1,548
no_license
// Assign02-OutputManipulation.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { string first; string middle; string last; int age; double prevBalance = 10000; //initial value double ex...
ea9c375be6fa9b5306fe2d6b3c5d2c5cf6611cc7
432167fd32f9390e28f9458612da5031624d76d0
ajapon88/Lib
/lib/source/file/file.cpp
C++
cpp
2,963
no_license
#include "stdafx.h" #include <lib/file/file.h> #define NOMINMAX #include <windows.h> namespace lib { namespace file { void getFileList(FileList *filelist, const char *dir, const char *ext, bool recursive) { HANDLE hFind; WIN32_FIND_DATA fd; std::string path; path = dir; if (path.back() != '\\' && path.back() != ...
4eaeefdb06413c6546e5b2644d3885ddd5c94178
6d8343c21f8460c0f2e92cf3967eb08cb7b474c2
huningxin/ngraph
/src/ngraph/pass/any_all_replacement.hpp
C++
hpp
1,021
permissive
//***************************************************************************** // Copyright 2017-2018 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://w...
3afcce1e6187585166ec5f7ec4eeee6b050fa622
151b5c25046af7dfb81bd73f677645936818bc62
nooboracle/ForTest
/knowledgeKing/knowledgeKing/Classes/ASFightLayer/BladeMasterCritical.cpp
C++
cpp
17,765
no_license
#include "ASFightLayer.h" #include <sys/timeb.h> #include "global.h" #include "SimpleAudioEngine.h" #include "ASUser.h" using namespace std; using namespace CocosDenshion; extern ASUser* MainUser; void ASFightLayer::BladeMasterPreAttackCritical(){ if(!MainUser->muted) CocosDenshion::SimpleAudioEngine...
2c21006f15e162df29f758333b6dcfcb36e82f79
c1c402e04967eafee80bfd9fecc00dcd6edbe741
SymbianSource/oss.FCL.sf.mw.qtwebkit
/WebKit2/WebProcess/WebPage/WebPage.cpp
C++
cpp
18,292
no_license
/* * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
fad08140536d81ceb4f9da57506d22a2b2ee876c
38fca28d47d5adacb44f0da3e2e3094e314137f0
mayank1101/Advance-Data-Structures-and-Algorithms-CSL-006P1M-
/lab/Assignment 2/que10.cpp
C++
cpp
1,389
no_license
//implement counting sort #include<iostream> #include<cstring> #include<iomanip> // for setting precision #include<sys/time.h> //for implementing timeval using namespace std; typedef unsigned long long LL; LL range=0; void randomInput(LL arr[], LL n){ for(LL i=0;i<=n;i++){ arr[i] = (rand() % range)+1; } } voi...
66647a6d9037624e6a63d9ee3ed6d964951f7bf4
23d9bb213e8617c8a0fad0c94084d89b246194a9
smeanapole/NanoporeCode
/POISSON-code/cpp/viterbi2d.cpp
C++
cpp
22,889
no_license
/*========================================================== * * viterbi2d.cpp * * Does simultaneous Viterbi basecalling and alignment on a strand and * its complement (or two distinct strands) * * Arguments: event1, event2, model1, model2 * *========================================================*/ ...
0575cef4573739bc275800e29ff92e4d38795ce5
962aa8692430f77631dee4a2fe77c5710db6ea23
amenoyoya/old-project
/c/Haxe/OpenFL/01.HelloWorld/Export/windows/cpp/obj/src/lime/utils/Int16Array.cpp
C++
cpp
10,714
permissive
#include <hxcpp.h> #ifndef INCLUDED_Std #include <Std.h> #endif #ifndef INCLUDED_haxe_io_Bytes #include <haxe/io/Bytes.h> #endif #ifndef INCLUDED_lime_utils_ArrayBufferView #include <lime/utils/ArrayBufferView.h> #endif #ifndef INCLUDED_lime_utils_ByteArray #include <lime/utils/ByteArray.h> #endif #ifnde...
8c697a1218d3c31ffd9798fceb5c2d86997bc06f
7b2184925215d2b9987857b094ca732204d66ab7
abilitiinc/AbilitiX
/external_plugins/multiparty_messaging/include/sophiatx/plugins/multiparty_messaging/multiparty_messaging_objects.hpp
C++
hpp
5,587
permissive
#pragma once #include <sophiatx/chain/sophiatx_object_types.hpp> #include <boost/multi_index/composite_key.hpp> namespace sophiatx { namespace plugins { namespace multiparty_messaging { using namespace std; using namespace sophiatx::chain; // // Plugins should #define their SPACE_ID's so plugins with // conflicting ...
90581e015012490d06f97c7396f2bced440835f4
c067487d4d9bc814a6753f1422f48f278116bf0e
lx443587263/game_demo
/game_demo/Avatar.cpp
C++
cpp
6,334
no_license
//------------------------------ // Avatar.cpp // 10/16/2019 created // 10/31/2019 modified // by liuxi //------------------------------- #include "Avatar.h" #include "game.h" #include <wincodec.h> #include <Windows.h> #include <float.h> #include "ItemManager.h" #include <algorithm> #include "ConcreteAr...
557d28c7067df9782a08eb7b7a6095a37c37fa49
db2cb65172250164843564e5d048752ac2fe31ce
KCreate/skybison
/runtime/range-builtins.cpp
C++
cpp
10,273
permissive
// Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) #include "range-builtins.h" #include "builtins.h" #include "frame.h" #include "globals.h" #include "int-builtins.h" #include "runtime.h" #include "type-builtins.h" namespace py { RawObject rangeLen(Thread* thread, const Object& start_obj, ...
5bb111f4bc5c2fb82b1671222efe0a818f0786cf
3f177a08c2410ae74bb67554ee1bec167a99ffd5
A-Productions/WickedEngine
/WickedEngine/wiLua.cpp
C++
cpp
10,082
permissive
#include "wiLua.h" #include "wiLua_Globals.h" #include "wiBackLog.h" #include "wiHelper.h" #include "MainComponent_BindLua.h" #include "RenderPath_BindLua.h" #include "RenderPath2D_BindLua.h" #include "LoadingScreen_BindLua.h" #include "RenderPath3D_BindLua.h" #include "RenderPath3D_Deferred_BindLua.h" #include "Render...
7ecb0e22c10865b851183448c182817074938542
580874418253885eab22c54333557914bc4cd038
lyleaf/ACM-solution
/Leetcode - Count of Smaller Numbers After Self.cpp
C++
cpp
2,376
no_license
class flower{ public: int index; int val; int count; flower(int i,int v,int c=0): index(i),val(v),count(c){} bool operator < (const flower& f) const { return (index < f.index); } }; class Solution { public: vector<int> countS...
28be25073784b580f2def800aa43bc3c71a29d01
3c3ad2de5b552d0ce864cea23785fee0c2770deb
peter517/ACM
/求序列最大值.cpp
C++
cpp
1,302
no_license
#include <iostream> using namespace std; #include <time.h> #define LEN 50 int Max = 10; int test[LEN]; void Swap(int &a,int &b) { int temp ; temp = a; a = b; b = temp; } void Sort(int low,int high) { int i = low + 1; int j = high; if (low >= high) { return; } while (i < j) { ...
1421e12edb0ddbd7a63f50404c125865329a2482
82665bcac0e2394e10f500d27ce10c8676be4cc3
dinesh18798/CPP-Codes
/CPP Code Test/TestClass15.cpp
C++
cpp
1,897
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <cassert> using namespace std; //Define the structs Workshops and Available_Workshops. //Implement the functions initialize and CalculateMaxWorkshops struct Workshops { public: int startTime, duration, endTime; ...
326084a5db63c553db1e6ff02ca1b5d5e87749ae
79556f6c3ea205f9566408dd494f689799f4f7f5
aibo-kit/new_3dbbox_generation_method
/src/main.cpp
C++
cpp
56,441
no_license
#include <iostream> #include <fstream> #include <sstream> #include <eigen3/Eigen/Core> #include <eigen3/Eigen/Geometry> #include <eigen3/Eigen/Dense> #include <opencv/cv.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include "opencv2/imgproc/imgproc.hpp" #include <vector> #include <strin...
0b21c107e8864668fdf27dd658b8a6622003e01c
b5697b61019edfe40b333b7adb13accdc5295ee5
uesleiregis/JogoDaVelha
/av3/src/kernel/game.cpp
C++
cpp
11,501
no_license
/*! * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 3 of the * License, or (at your option) any later version. * This program is distributed in the hope that it will be...
ef4d5c980d349d94ec6031ffcbcb21798d4468d5
e19435b31448fed6c22835a1df4f55ac1823852e
hanngos/Tetris
/TETRIS/Ramka.cpp
C++
cpp
291
no_license
#include "Ramka.h" void Ramka::rysuj(SDL_Renderer* renderer, int x, int y, int w, int h, int r, int g, int b) { SDL_Rect rect; rect.x = x; rect.y = y; rect.h = h; rect.w = w; SDL_SetRenderDrawColor(renderer, r, g, b, 255); SDL_RenderDrawRect(renderer, &rect); }
219c77de0d176cc0f78a0bdbd0b5ac3a294d3b67
96d58495aeb45f8c19c4e6c33bb96647696a216b
michaelecrippa/Party-Clubs
/Clubs/Base Club/Club.cpp
C++
cpp
4,006
permissive
#include <algorithm> #include "Club.h" #include "../../User/User.h" #include "../../Resources/Messages.h" void Club::erase() { if (isEmpty()) return; delete[] users; users = nullptr; delete[] name; name = nullptr; } void Club::copyFrom(const Club& other) { if (other.isEmpty()) { erase(); return; } minVod...
918b0c0f8d31a5916e512e46c075d9a4864fa1a6
469aea8707b021ba08844a970c4853649c9db421
windxixi/test
/CODE/android/system/vold/Volume.cpp
C++
cpp
23,747
no_license
/* * Copyright (C) 2008 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...
5ce2ccc5fd6cb30f1d484bd59681e25fc7804167
625f806785d9cd7ca60847fc7f60273583f43bbd
Zalewa/gzdoom
/src/dobjgc.cpp
C++
cpp
20,856
no_license
/* ** dobjgc.cpp ** The garbage collector. Based largely on Lua's. ** **--------------------------------------------------------------------------- ** Copyright 2008 Randy Heit ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that t...
9c6fd8c3270a8997affd8d3e7ccd442f8e27aa46
d2266c7154dce97881f8fb77a812ec801d327400
HarshitKhurana/DataStructures
/HashMap/HashMap.cpp
C++
cpp
8,142
no_license
#include "HashMap.h" template <typename KeyType , typename ValueType> void HashMap<KeyType ,ValueType> :: rehash() { /* * This function is called means loadFactor has exceeded 70%. * Re-create hashes for all the objects in the HashMap and re-write in a new HashMap of double the size previous...
90af83a3d7cd434a451fcbcfa2cfebc82ae56578
18ace6f07f7c122e31e806c7a0f64be2548adb8a
lucaskotw/dart
/dart/dynamics/ReferentialSkeleton.hpp
C++
hpp
15,434
permissive
/* * Copyright (c) 2015-2016, Graphics Lab, Georgia Tech Research Corporation * Copyright (c) 2015-2016, Humanoid Lab, Georgia Tech Research Corporation * Copyright (c) 2016, Personal Robotics Lab, Carnegie Mellon University * All rights reserved. * * This file is provided under the following "BSD-style" License:...
f64e7040db3aadca1dfa7a9e6563e562381aa500
432f97d1c3e1fb2b77a7332aaf0b0348f3f86931
mhlr/Green-Marl
/src/backend_gps/gm_gps_opt.cc
C++
cc
3,325
no_license
#include <stdio.h> #include "gm_backend_gps.h" #include "gm_backend_cpp_opt_steps.h" #include "gm_ind_opt_steps.h" #include "gm_error.h" #include "gm_code_writer.h" #include "gm_frontend.h" #include "gm_transform_helper.h" void gm_gps_gen::init_opt_steps() { std::list<gm_compile_step*>& L = get_opt_steps(); L....
0a70e22c5726c06767972e4fd5186e9750768ce5
eac8b76d860401b17a4d5496e1b0250fa1032b78
LeiShi1313/leetcode
/leetcode_cpp/279_perfect_squares.cpp
C++
cpp
852
no_license
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <string> #include <ctime> #include "utils.h" using namespace std; class Solution { public: int numSquares(int n) { if (n <= 0) { return 0; } static vector<int> cntPerfectSquares(...
c25f2e3961e0540834b6360256eb36789376ae08
210e6fcd9ac5010b458cd118d089334f6841c11e
karlgluck/Evidyon
/Source/complete-editor/v2/v2actions.cpp
C++
cpp
2,857
permissive
//---------------------------------------------------------------------------// // This file is part of Evidyon, a 3d multiplayer online role-playing game // // Copyright © 2001 - 2022 Karl Gluck // // // ...
b410f4e973407b60d57233939dced42f3bc0bca7
60c58d8d5248f5fdb74d2cd9cab5506057315003
LuisAlbertoVasquezVargas/CP
/otherRepos/Codes/Home/luis/1158_TI.cpp
C++
cpp
2,756
no_license
#include<cstdio> #include<iostream> #include<cstring> #include<vector> #include<cmath> #include<algorithm> #include<climits> #include<set> #include<deque> #include<queue> #include<map> #include<climits> #include<string> #include<stack> #include<sstream> using namespace std; #define pi (2.0*acos(0.0)) #...
87d74e59e052b0651c44f6dddb5af0cc9b1169fe
5f9f1da32d9af210e7adaddd4edc47a6bb45519b
onlyet/ZLToolKit
/tests/test_sql.cpp
C++
cpp
3,516
permissive
/* * MIT License * * Copyright (c) 2016 xiongziliang <771730766@qq.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
4b65da486a7ea4ee57210864c7549fcd00ba98ed
c25aa1632647e2ba52cf4613326cd06eadfe4247
SiChiTong/Embedded
/0_Project/STM32F4/Template_NO_RTOS/stm32f4xx_it.cpp
C++
cpp
1,528
no_license
/*********************************************************************************************************************** * Copyright (c) Hands Free Team. All rights reserved. * FileName: * Contact: QQ Exchange Group -- 521037187 * Version: V2.0 * * LICENSING TERMS: * The Hands Free is licensed generally under a perm...
055fd2d83030af12d9abbd12381c493ea51f09e1
697c494eacb5e0095650be5d52b068cae7898119
kavitha565/MissionRnD-CMrndTest3
/src/Problem1.cpp
C++
cpp
1,490
no_license
/* Given a Binary Tree of N Nodes, which have unique values in the range of [0,N](Inclusive) with one value(Node) missing in that sequence. Return that missing value . Example 1 : N=5 3 / \ 4 1 / \ 5 0 Missing Value is 2 ,Sequence is [0,1,2,3,4,5] Example 2 : N=8 2 / \ 4 5 / \ ...
05ed414c290100c7e4ccfb31593dec560f125fba
f0f3df497cc0e9ed5f1c61dbd1eacc0450ffdc1e
eclipse/xacc
/tpls/antlr/runtime/src/support/CPPUtils.cpp
C++
cpp
5,878
permissive
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ #include "support/CPPUtils.h" namespace antlrcpp { std::string join(std::vector<std::string> strings, const std::strin...
0949dd6abb2ae0d4a1e9ed9ef9b8a7ebf8220817
87eaa6add45971bc9550197949c99d5396b6fe90
Fabulous-Oreo/frameworks_base
/libs/hwui/service/GraphicsStatsService.cpp
C++
cpp
14,181
permissive
/* * Copyright (C) 2017 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...
1b969e26f5741b333e72c4ca7ea0238dea09ff88
71e1de438717ab37a3022444423aaef93726750b
wxmvolker/OPS
/apps/c/CloverLeaf_3D_HDF5/MPI/update_halo_kernel2_xvel_plus_2_bot_seq_kernel.cpp
C++
cpp
6,061
no_license
// // auto-generated by ops.py // //user function inline void update_halo_kernel2_xvel_plus_2_bot(double *xvel0, double *xvel1, const int* fields) { if(fields[FIELD_XVEL0] == 1) xvel0[OPS_ACC0(0,0,0)] = xvel0[OPS_ACC0(0,2,0)]; if(fields[FIELD_XVEL1] == 1) xvel1[OPS_ACC1(0,0,0)] = xvel1[OPS_ACC1(0,2,0)]; } // ...
0f8d1aee7c1bd41b03bf8259c3c1d73d28f60378
e0d257a0ed1be80f3603b6765363fd22058d0bc5
Hairahcez/cplus-fall2013
/Assignment14/Assignment14/main.cpp
C++
cpp
954
no_license
#include <iostream> #include <conio.h> using namespace std; void main() { // Declare 2d arrays with values int first_array[][3] = { {16, 18, 23}, {54, 91, 11}}; int second_array[][3] = { {14,52,77}, {16,19,59}}; int third_array[2][3]; // loop through the arrays to fill the third array with values for(...
44ce3bcdd0e6631178f56cc45cfbb64407672c44
cd9245f632da5c64b0d3f9f3182d09483a976eb9
logan0501/Codechef-DSA-Learning-series-solutions
/EasyProblems/findme.cpp
C++
cpp
1,791
no_license
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k, in) for (int i = j; i < k; i += in) #define RFOR(i, j, k, in) for (int i = j; i >= k; i -= in) #define REP(i, j) FOR(i, 0, j, 1) #define RREP(i, j) RFOR(i, j, 0, 1) #define INF (int)1e9 #define PI 3.1415926535897932384626433832795 #define MOD 10000000...
2c8ece710ac1137eaeca8673157c9ca3efd5c401
d3a14b522596641e94c3e5b124b2c4d586d1c453
NightZZD/PAT-
/B1036.cpp
C++
cpp
584
no_license
#include<iostream> using namespace std; int main(){ int n; char c; cin>>n>>c; int half; if(n%2==0){ half = n/2; }else{ half = n/2+1; } for(int i=0;i<n;i++){ cout<<c; } cout<<endl; for(int i=0;i<half-2;i++){ for(int j=0;j<n;j++)...
c9d49acfadfb04a233d48cbef0dfa73354ed6960
838a682dcb7993759c66580a13fe35ede4066a70
vcaesar/tensorflow
/tensorflow/lite/delegates/xnnpack/conv_2d_tester.cc
C++
cc
19,165
permissive
/* Copyright 2020 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...
248fdfb2f068287206b1456f659f9e3aa55a3697
6e6485b619f674abfd97a47d63ddb357bbde7daf
DrSwad/CompetitiveProgrammingArchive
/codeforces/808/F.cpp
C++
cpp
2,663
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define x first #define y second #ifdef LOCAL #include "debug.h" #endif const int N = 105; const int MAXC = int(1e5) + 10; int n, k; int p[N], c[N], l[N]; bool isprime[2 * MAXC]; struct MaxFlow { const int INF = int(1...
1eca655a73b149242de7cc03106b7d48249046f5
7b2320cb6b2d224534ab60525fa40dc8874f09c0
darrylys/spoj
/PCLNMBR.cpp
C++
cpp
781
no_license
#include<stdio.h> #define ll long long // 1e15 #define UPPER (1000000000000LL) int gcd(int a, int b) { if (b == 0) return a; else return gcd(b, a%b); } int lcm(int a, int b) { return a / gcd(a,b) * b; } ll qn(ll N, int a, int lcmab, int lcmabc) { return N/a - N/lcmab + N/lcmabc; } ll findN(int A, int B, int C...
1d1e20981a3d3b7eab8119c6325eeda2459044ba
0ea4d6af033482f357998e0fdc82ef5de92c9652
toby4548/move_base_flex
/mbf_simple_nav/src/simple_controller_execution.cpp
C++
cpp
3,176
no_license
/* * Copyright 2017, Magazino GmbH, Sebastian Pütz, Jorge Santos Simón * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, t...
f51e3c6a3f8e337fae7cbdcdea938123c18bdc4a
4d381bd6279db206e25191d1f9acaadff9d0b83d
robertpfeiffer/Afterlife-Empire-Opensource
/Windows-Specific/FileManager_Windows.cpp
C++
cpp
6,866
no_license
#include "FileManager.h" #include <windows.h> #include <tchar.h> #include <stdio.h> #include <strsafe.h> #include <iostream> #include <iterator> #include <fstream> #include <vector> #include <algorithm> #include "ModManager.h" #include "DebugTools.h" #pragma comment(lib, "User32.lib") ...
83d0cfd3a2d9fe473b2e34838c16666acf0523e6
efef102e1d0719519bd6d8afcb38bb11c2810f66
thelochan/MinerCPPtoWASM
/main.cpp
C++
cpp
2,284
no_license
#include <iostream> #include <string.h> #include "sha256.h" //Run Command for output eg: ./main.o neeraj http://lochan.website 21e8 1 void output_state(std::string keyword, std::string data, std::string data_hash, std::string rotation_hash, int nonce, std::string target) { // output the state of a successful...
7628db603dd7da797fb5619fd8824e7fd9075ff9
d5412ec31a39d6791c3343e09c8505376a60c4bd
vmmc2/Competitive-Programming
/LeetCode/Top Interview Questions/Medium Collection/Dynamic Programming/Unique Paths.cpp
C++
cpp
698
no_license
class Solution { public: int uniquePaths(int m, int n) { int dp[m][n]; memset(dp, 0, sizeof(dp)); //base cases: dp[0][0] = 1; //de onde ele comeca so tem uma forma de chegar... for(int i = 0; i < m; i++){ for(int j = 0; j < n; j++){ if(i == 0 || j ...
e3182e94abaabeea36de2342e1519666ef4cc1c7
827c232ea3294a4b3de053dc71fd149aaf45166a
stanleywxc/chromium-noupdator
/src/chrome/browser/ui/views/autofill/autofill_popup_view_native_views.cc
C++
cc
40,566
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/autofill/autofill_popup_view_native_views.h" #include <algorithm> #include <memory> #include <utility> #include "base/...
f8bf7b21440daaff4dcf0408c68de585d039b572
fe745b2aa386d69a6763619d2ad604d2a304fd95
Script-Kiddie-JKB/Competitive-Programming-Solutions
/LeetCode/525-Contiguous Array.cpp
C++
cpp
505
no_license
class Solution { public: int findMaxLength(vector<int>& nums) { unordered_map<int, int> frstOccur; frstOccur[0] = 0; int ans = 0, pref = 0; for(int i=0; i<nums.size(); ++i){ pref += nums[i] == 0 ? -1 : 1; auto it = frstOccur.find(pref); if(it != fr...
3df42d1211c805398114d00429e57288a4f667a2
1a38fa44e6f6ce673d7433d545ba06d6030e39a5
SaulZhang/Algorithm-Templates
/1-PAT专题训练/真题模拟/2017年3月/1128(AC).cpp
C++
cpp
878
no_license
#include <iostream> #include <set> using namespace std; const int N = 1000+5; set<int> S; int A[N],n,k; int main() { cin>>n; for(int i=1;i<=n;i++){ cin>>k; S.clear(); for(int j=1;j<=k;j++){ cin>>A[j]; S.insert(A[j]); } bool flag = true; if(...
9e1aba126ae88a160e59b910f1c2ec32ffdd9c93
c07643bd2cc55f743bb846bfd0156de740b741f6
icyfox168168/tccjit
/src/tccjit.cpp
C++
cpp
5,130
permissive
#include "tccjit.hpp" #include <cstring> #include <cstdio> #include <vector> #include <stdexcept> #include <sstream> #include <fstream> using namespace std; //////////////////////////////////////////////////////////////////////////////// /** * utility method, check if the given file exists */ static bool is_file(co...
1e3d66bc71bf94ecd55d7e94c7703da2933ed950
805c35b2a015745d583a0741466b21cf4b9ff4d6
x86nick/leetcode
/Algorithm/TwoSum/TwoSum.cpp
C++
cpp
2,332
permissive
/* Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based....
0b4dd218b1d78f260c29dc7aa0e7c4a4d18dfa93
b4391a8056b70f2cd0b855574527eceb17579bd8
PaladinAI/aws-sdk-cpp
/aws-cpp-sdk-storagegateway/source/model/RefreshCacheResult.cpp
C++
cpp
1,413
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
6f1850e6421c2f0ca99566f2740363672c432ae2
0661cdb3014f4014c5fc0673a70bf3f2afdeb75e
lazaryan/CyberGarden2
/proj/build/Il2CppOutputProject/Source/il2cppOutput/Bulk_UnityEngine.UnityWebRequestModule_0.cpp
C++
cpp
60,670
no_license
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include <stdint.h> #include "il2cpp-class-internals.h" #include "codegen/il2cpp-codegen.h" #include "i...
4ceeab2eae581e69136f06fde380ad81b2faf5de
c0ac494828f1aee61593f96d3071d84073b36c43
apple-open-source/macos
/libsecurity_ldap_dl/lib/AttachedInstance.cpp
C++
cpp
11,858
no_license
/* * Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except i...
b2f7695ef487c6cd4cb56a5d1a8f3f45c794c140
9dfc19586007f1855fc31ae4203867d9ec76481d
sharpie33/chromium
/content/browser/file_system/file_system_url_loader_factory_browsertest.cc
C++
cc
36,683
permissive
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <algorithm> #include <memory> #include <string> #include <utility> #include <vector> #include "base/bind.h" #include "base/feature_list.h" #incl...
774ed0d9646dfa2bcd65e6176c4b07f7214286b2
df5b92c0eb10d48784ca0d18cca0c22698a5bdc4
praneyrai/Online-Judge-Solns
/SPOJ/SGAME.cpp
C++
cpp
603
no_license
#include "bits/stdc++.h" using namespace std; int main() { int t; cin >> t; while (t--) { int s; cin >> s; list<int> add[330]; set<int> st; while (1) { int a, b; cin >> a >> b; if (a == -1 && b == -1) break; add[a].push_back(b); ...
611d4e1eba241399c98caf8d7fc6527a1cecb2ae
180f96269a13263de8f51b93af96ab8fbd7f5446
google/swiftshader
/third_party/llvm-10.0/llvm/lib/IR/ModuleSummaryIndex.cpp
C++
cpp
20,058
permissive
//===-- ModuleSummaryIndex.cpp - Module Summary Index ---------------------===// // // 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 // //===---------------------------...
9e881b0cf401537a87802da09b5d5d09462ca587
8b719ce4090645967e91fb69433a82d04eb422f2
JoshPenner/HackerRank
/C++/STL/Sets-STL/Solution.cpp
C++
cpp
753
no_license
/* Problem: https://www.hackerrank.com/challenges/cpp-sets/problem */ #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <set> #include <algorithm> using namespace std; int main() { int Q; cin >> Q; set<int>s; for (int i =0; i<Q; i++) { int y, x; ci...
22f3cffac75ea60c491af7c7e136e6403522df8b
37d0a974b100d452d5d2e0715f98c9bf7ca019c5
aatishballa/DataBank
/Transaction.cpp
C++
cpp
1,757
no_license
/* * File: Transaction.cpp * Author: User-PC * * Created on October 19, 2017, 1:46 PM */ #include <cstdlib> #include "Transaction.h" using namespace std; Transaction::Transaction(char userChoice,double amt,Date date,string payee){ setAmount(amt); setUserChoice(userChoice); setDate(date); se...
6b877aeb9be35b38e2c168cbee6c5f44073c113f
407b8dc4e91e261fdf9577bb113b7a77b4366151
asiviero/physicsSimulator
/src/agent.cpp
C++
cpp
4,944
no_license
/* * agent.cpp * * Created on: Mar 8, 2012 * Author: andre */ #include "../inc.h" agent::agent() { // Reset all vars, except the mass for(int i=0;i<3;i++) { floatAgentAcceleration[i] = 0; floatAgentSpeed[i] = 0; floatAgentColor[i] = 0; floatAgentPosition[i] = 0; } floatAgentPosition[Y_AXIS] = 0...
11a1d443ad41895b435f2aebd31e2e7a2dbae139
a593103ba94b93680e50dc953540859aa92faf4a
egrassl/SnowMan
/mainwindow.cpp
C++
cpp
1,621
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } void MainWindow::on_actionNublado_triggered() { ui->widget->setSkyColor(1); } void MainWindow::...
aa7c38102c2ed892b2aaea46c4d6ae15561a0a08
dc94bde31e8c21d389b89e03f9458292b6fd985f
yfyf510/SNMP-Monitor
/snmplib.cpp
C++
cpp
3,348
no_license
#include "snmplib.h" #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include <string.h> #include <QDebug> #include <QString> #include <QFile> SNMPLib::SNMPLib() {} bool SNMPLib::init(QString IP,QString community) { /* * Initialize the SNMP library */ init_snmp("snmpdem...
4e6c71b1e21c7b5f85d0300a594a085b1f9542d1
22d94afe8e4c85e0507612b7d48bf1b8cf00477b
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14186/function14186_schedule_31/function14186_schedule_31_wrapper.cpp
C++
cpp
1,079
no_license
#include "Halide.h" #include "function14186_schedule_31_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(128, 64); Halide::Buffer<int32_t> buf01(...