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
3d7765e439c1e6c751c41855efd44a17a2f1b485
94a21aaa2b398e7cc5418ce745d267ab6140a7e2
Drew0824/Lab-25-Lab-25.1-dpatel4
/main.cpp
C++
cpp
736
no_license
#include <iostream> using namespace std; /* _Compound Assignment_ Compound assignment operators modify the current value of a variable by performing an operation on it: expression | equivalent to y += x; y = y + x; x -= 5; x = x - 5; x /= y; x = x / y; y *= x; y = y * x; Instruction...
0a27d3a7067055987994e31c5d93cde2d1579f68
9b3ab063aee7054187e897ab969462202cd0f8b8
yunyou730/leetcode_practice
/byself/byself/maximum_depth_of_binary_tree_104.hpp
C++
hpp
1,326
no_license
#pragma once #include <stdio.h> #include <vector> #include <set> #include <map> #include <deque> #include <stack> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(n...
1746f56b4784f88ced69b03622c4849b2c413815
79df5498aa76d47e930f8fbb1bbb545646bb949f
monkbysea/cotta074_algosims2016
/w01_hw_e/src/ofApp.cpp
C++
cpp
2,877
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetVerticalSync(TRUE); ofBackground(0); //initialize the array: for (int i = 0; i < 10; i++) { rectangle temp; myRectangles.push_back(temp); ...
0a0c298d136327d985575417bb33d596c534fcd6
3bfcc5a2d44153cca7b9e26bbc113c04913dfd1a
schultzder/C-programs-and-assignments
/lab7.cpp
C++
cpp
5,961
no_license
//--------------------------------------------------------------------- // // DO_01: Enter your name // Name: Derek Schultz // DO_02: Enter your section // Course: CS 1430, Section 2, Spring 2017 // // Purpose: This program reads a list of watermelon seed spitting // scores and computes a few statistics: t...
36abd348b5bb629740c7339159ab32024b584e40
33df1ea5c80c4067c856ce23a84c85b97775febd
yangyong3108/project-001
/server/WorkerThreads.cpp
C++
cpp
2,592
no_license
#include "WorkerThreads.h" #include <stdio.h> void WorkerThreads::initiate() { int i; threads = (LIBEVENT_THREAD*)calloc(nthreads, sizeof(LIBEVENT_THREAD)); if (!threads) { printf("can't allocate thread"); exit(1); } for (i = 0; i < nthreads; i++) { int fds[2]; if (-1 == pipe(fds)) { printf("can't ...
ba4ac25e0f3e66de96bfda779b84e2d14aef3c93
9ebcbae722cc3952f901a68c5dbcb497b1a081e8
KushRohra/InterviewBit_Codes
/Dynamic Programming/Longest Palindromic Subsequence.cpp
C++
cpp
479
no_license
int LCS(string a, string b) { int i, j, n=a.length(); int dp[n+1][n+1]; for(i=0;i<n+1;i++) { for(j=0;j<n+1;j++) { if(i==0 || j==0) dp[i][j]=0; else if(a[i-1]==b[j-1]) dp[i][j]=1+dp[i-1][j-1]; else dp[i][j]=max(dp[i-1][j]...
4a3fa74c4b89b214382e88246b971bd8080fa135
8b6bf867073bbbba54061a3c3204332a4cc9794b
giocapit/correlation-skew
/prove/libExample.cpp
C++
cpp
232
no_license
#include <stdio.h> extern "C" { int FooBarRet (int* MyValue,double* output) { double x =100.0; double y = static_cast<double>(*MyValue); x = x + y; *output = x; return 0 ; } double sum (double* a) { return a[0]+a[1]; } }
638328e25b96ba65be600610ed588bc071013c52
e81070c548fe472fadf5ba2261bab86ade6c3ce4
we-conceived-the/ball
/src/wallet/walletdb.cpp
C++
cpp
32,260
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Ball Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet/walletdb.h" ...
7146cee933b36fdd03b6f5cb33c16e499bc2a3fa
bee9ff357f4184ea98e08dfd24ab242cd5639f87
mksmukesh/Interview-Questions
/Max Circular subarray sum.cpp
C++
cpp
725
no_license
#include<bits/stdc++.h> using namespace std; int kadane(int arr[],int n) { int currentsum=0; int maxsum=INT_MIN; for(int i=0;i<n;i++) { currentsum+=arr[i]; if(currentsum<0) { currentsum=0; } maxsum=max(maxsum,currentsum); } return ma...
7fcadd11b231028b67efd78e6d76b16fe1ddca4f
41586e15d732280a2bab84e69b7d210511e09732
scilicet64/sevabit
/src/cryptonote_core/blockchain.cpp
C++
cpp
175,745
permissive
// Copyright (c) 2014-2018, The Monero Project // Copyright (c) 2018, The SevaBit Project // // 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 r...
1ed435c84dac019855fd15f897d5f2cb053d117e
cc596d1e409aaa4fa6dbac00899754b605e22014
YuMeiLau/UAV
/code/匿名遥控器V1.21/Math/ANO_Vector3.cpp
C++
cpp
8,773
no_license
#include "ANO_Math.h" #define HALF_SQRT_2 0.70710678118654757f //根号2的值 template <typename T> void Vector3<T>::rotate(enum Rotation rotation) { T tmp; switch (rotation) { case ROTATION_NONE: case ROTATION_MAX: return; case ROTATION_YAW_45: { tmp = HALF_SQRT_2*(x - y); y = ...
205fe9fe87fe0e156731c03e814fc76686e16322
22950e076695da96c121718df6b32f4b197c160f
dmitrylavrikov/dava.framework
/Tools/ResourceEditor/Classes/Qt/TextureBrowser/TextureCache.cpp
C++
cpp
12,667
no_license
/*================================================================================== Copyright (c) 2008, binaryzebra All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistri...
6002d7b193204eaeefa3fda2fa524eb7b0ccce0e
fcf53874bbf2c93cd5fc404528c4f2f59a3f1021
anderizquierdo-sh/gpedal
/src/buttons.cpp
C++
cpp
3,806
permissive
#include "buttons.h" #include <Arduino.h> #include <ResponsiveAnalogRead.h> #include "pin.h" #include "leds.h" #include "midi.h" #include <EEPROM.h> #define LADDER_SIZE 2 #define BUTTONS_SIZE 8 ResponsiveAnalogRead _buttons_ladder[LADDER_SIZE]; int _buttons_previous_button[LADDER_SIZE]; int _buttons_delay_button[LADD...
d4d2c620a6520be749b63d27b20b3bc21e9d0eef
edf8b670346ef517f938f6bd6cc8a34616609d38
panluDreamer/PAT-A
/A1113.cpp
C++
cpp
716
no_license
#include<iostream> #include<algorithm> #include<cmath> using namespace std; const int maxn = 100010; int buf[maxn] = { 0 }; int mid; bool cmp(int a,int b) { return a < b; } int main() { int n; int n1 = 0, n2 = 0, s1 = 0, s2 = 0; int gap = -1; cin >> n; for (int i = 0; i < n;i++) { cin >> buf[i]; } sort(buf, b...
6c72ce48e1a97f6b14a1b18be877fb63ab678d02
fbeff64ff00fdd8571de3a7df04e1d6bf9012b81
bigjun/mrpt
/libs/reactivenav/src/CPTG7.cpp
C++
cpp
4,391
permissive
/* +---------------------------------------------------------------------------+ | The Mobile Robot Programming Toolkit (MRPT) | | | | http://www.mrpt.org/ ...
722e5246238483cca81b1374ee1a2fcceb1c4d86
0db5e3f11f72d32d75d7fd2a8c2eddaaa7d152b2
opensourcegamedeveloper/luascript
/lua_script_resource_formate_loader.cpp
C++
cpp
2,490
permissive
/* * This file is part of LuaScript * https://github.com/perbone/luascrip/ * * Copyright 2017-2021 Paulo Perbone * * 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.apa...
fc13e0adf1ea54b468f304c4eed3dbb80c53db58
4af5280f0bd080f9455fc6a4a4180438f91b6e5a
Raj-kar/C-Plus-Plus
/09. Pattern/tringle.cpp
C++
cpp
710
no_license
#include <iostream> using namespace std; int main() { int count = 0, space, row; cout << "Enter row number " << endl; cin >> row; space = row - 1; for (int i = 1; i < row * 2; i += 2) { for (int k = 0; k < space; k++) cout << " "; space -= 1; for (int j = 1...
689598ac93754fa8c67ba558d439babb3ea7252d
0c254b818685188df878f00769546f5c83d4e56e
jjzhang166/WinNT5_src_20201004
/NT/inetcore/mshtml/src/core/dbglite/dbglite.cxx
C++
cxx
7,964
no_license
//+--------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation, 1997 - 1997. // // File: dbglite.c // // Contents: functions for debug lite version of mshtml.dll // //----------------------------------------------------------------------------...
6b3daa2a69aacba5d82d70a83a6d32ccec53f9e7
8f48d8e76277f1f034d593dbb757595372bf9638
icprog/cpc152
/cpc152svc/read_options.hpp
C++
hpp
3,333
no_license
#ifndef _READ_OPTIONS_INC #define _READ_OPTIONS_INC #include <string> #include <vector> #include <map> #include <gklib/otd.h> #include <aic124ioctl.h> #include <dic120ioctl.h> #include <gklib/cpc152proto.h> namespace Fastwell { using namespace std; struct server_config { int server_port; int frame_size; ...
4146748e0825b0c60d82ed137bac5ecf2476d189
07cc785171f1c021dc32637f255b61fbb4a9472f
iamremi/appli
/src/gfx/PHScene.cpp
C++
cpp
5,193
no_license
#include <iostream> #include <utility> #include <QBrush> #include <QColor> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> #include "Exceptions.h" #include "PH.h" #include "Sort.h" #include "Process.h" #include "PHScene.h" PHScene::PHScene(PH* _ph) : ph(_ph) { // set background colo...
37ee310baacefaa5da10e5f803c91a5ce5302048
b6c06510951bfffb23a1d13ae8bc351818d20c21
polycube-network/polycube
/src/services/pcn-iptables/src/Iptables.cpp
C++
cpp
22,055
permissive
/* * Copyright 2018 The Polycube Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
35ad1552b4cb702d31946af0338fa7e553fc77b5
c257f8b37ae416c6197f8d2e208a97b7cb911a3a
Aditya239/CP-Daily
/Day30/Blastoise/solution.cpp
C++
cpp
1,534
no_license
class Solution { public: int vis[200][200]; int dp[200][200]; bool isValid(int i, int j, vector<vector<int>> &matrix) { if (i < 0 || i >= matrix.size() || j < 0 || j >= matrix[0].size()) { return false; } return true; } int dfs(int i, int j, vector<v...
3c90a0ef20af26b7596044859c6a068505da6b07
c9831349f096fff31eca931ca7ecbf3bc89bf73b
mindspore-ai/mindspore
/tests/ut/cpp/dataset/common/common.cc
C++
cc
8,372
permissive
/** * Copyright 2019-2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
a47c0af7b82f6f6b4f77cf6287b34f131e646662
d810c02aca56ac87f509683ded7353988c375623
openbmc/openpower-proc-control
/procedures/common/collect_sbe_hb_data.cpp
C++
cpp
4,247
permissive
/** * Copyright (C) 2017 IBM 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 by applicable law or a...
51e288e89bd69680f6f1fef83c432105c525c969
b8616d5f32eb4d9461d477aea1cfa2b695b49fdf
keith-traa/cmssw
/DQMServices/Demo/plugins/DemoNormalDQMEDAnalyzer.cc
C++
cc
3,096
permissive
// -*- C++ -*- // // Package: DQMServices/Demo // Class: DemoNormalDQMEDAnalyzer // /**\class DemoNormalDQMEDAnalyzer DemoNormalDQMEDAnalyzer.cc DQMServices/Demo/plugins/DemoNormalDQMEDAnalyzer.cc Description: [one line class summary] Implementation: [Notes on implementation] */ // // Original Author: ...
893d7a7b219a5d6aaeecbd3b9ebe429c9e344dba
d8220c7cf220c165e724916562337d2b35a32c92
ruisleipa/kp2
/src/client/tableview.cpp
C++
cpp
754
no_license
#include "tableview.hpp" #include <QHeaderView> void TableView::hideAllColumns() { for(int i = 0; i < horizontalHeader()->count(); i++) horizontalHeader()->hideSection(i); nextVisualIndex = 0; } void TableView::showColumn(int id) { horizontalHeader()->showSection(id); int from = horizontalHeader()->visu...
84662534749fc6b9b317212468776ac1deca99bd
2dc2c60d8a20736fd546615628c012d49efea7e9
syoch/wiiu-libgui
/include/Scroll.hpp
C++
hpp
1,035
permissive
#pragma once #ifndef LIBGUI_SCROLL #define LIBGUI_SCROLL #include <vector> #include "Container.hpp" namespace GUI { class Scroll : public Container { public: void draw_line(DrawPoint start, DrawPoint end) override; void draw_rect(DrawPoint start, DrawPoint end) override; void draw_...
c5d3cb8c7338de8c305c4e2ecfbcf2c829e45318
a003c2c425a07f8b499674a7ad658e30a5cb31df
uwecerron/opentxs
/src/otlib/OTSignature.cpp
C++
cpp
11,368
no_license
/************************************************************ * * OTSignature.cpp * */ /************************************************************ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 * OPEN TRANSACTIONS * * Financial Cryptography and Digital Cash * Library, Pr...
10a29f954edf0984b325c618279931377769221b
b0de24e90dc6035177a6507609ce0b0fb6c02413
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/net/upnp/host/upnphost/evtapi/evtapi.cpp
C++
cpp
55,622
no_license
//+--------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1997. // // File: E V T A P I . C P P // // Contents: Private low-level APIs dealing with UPnP events. // // Notes: // // Author: danielwe 18 Oct 1999 // //-...
c67434b46fbbe4729c2fb7c0fadddb5d12f30475
e600b9d20d088ff6cb6fe8fce67d1282855cc7e9
andrewprock/pokerstove
/src/lib/pokerstove/peval/Rank.cpp
C++
cpp
2,052
permissive
/** * Copyright (c) 2012 Andrew Prock. All rights reserved. * $Id: Rank.cpp 2649 2012-06-30 04:53:24Z prock $ */ #include <stdexcept> #include "Rank.h" using namespace std; using namespace pokerstove; Rank::Rank(const string& c) { fromString(c); } Rank::Rank(uint8_t code) { if (code <= RANK_ACE) _...
daa56c19278b93de60ce433effcde58361dd8f1e
810e71c3e11bf155a242b19b5c37562c4d9be55d
kl456123/cpp_best_practice
/src/lib/common/stream_executor/platform/default/test_benchmark.cc
C++
cc
7,385
no_license
/* Copyright 2015 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...
59eb06bfa368a093d952131b7172c34b15ddaf5c
7f4c648ddfb81a0c29ecd3ad02e61e9e355049a3
niuxu18/logTracker-old
/second/download/rsync/gumtree/rsync_repos_function_176_rsync-2.0.18.cpp
C++
cpp
352
no_license
static void gen_challenge(char *addr, char *challenge) { char input[32]; struct timeval tv; memset(input, 0, sizeof(input)); strlcpy((char *)input, addr, 16); gettimeofday(&tv, NULL); SIVAL(input, 16, tv.tv_sec); SIVAL(input, 20, tv.tv_usec); SIVAL(input, 24, getpid()); sum_init(); sum_update(input, sizeof...
a244a9ed2221eb19b1613be84755c15769647011
b1e484258f697b52581afb990662995b5bc77cf7
conwnet/way-of-algorithm
/poj-cpp/3041/14220129_AC_63MS_636K.cc
C++
cc
1,276
no_license
#include <stdio.h> #include <string.h> #include <vector> using namespace std; int N, M; int V; vector<int> G[1100]; int match[1100]; bool used[1100]; void add_edge(int u, int v) { G[u].push_back(v); G[v].push_back(u); } bool dfs(int v) { used[v] = true; for(int i...
dfeb8564ee39e0819774fcbd83fc33b4cac6017b
f372ddce849993cbb868b9ed46d7793f3f066889
SREERAGI18/chromium
/google_apis/gaia/gaia_oauth_client_unittest.cc
C++
cc
19,506
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. // // A complete set of unit tests for GaiaOAuthClient. #include <string> #include <utility> #include <vector> #include "base/bind.h" #include "base/...
215da7869d54bb32720968fe67cef429101bbfab
09a393950de99e57331b2d6286718bd9546873c1
Sarwar05/LightOJ
/1122 - Digit Count(Rec).cpp
C++
cpp
652
no_license
#include<bits/stdc++.h> using namespace std; int value[12]; int n,m; int fun(int prev, int taken) { if(taken>=n) return 1; int ret = 0; for(int i=1; i<=m; i++){ if(abs(prev-value[i])<=2){ ret+=fun(value[i],taken+1); } } return ret; } int main() { int ...
5a11f2fd251ed575f40dc9b6f914a4e08446d437
4891eff89d9ab02b67cb6b08e8a8f580cd0855b8
hyperpower/CarpioPlus
/test/geometry/test_box.cpp
C++
cpp
5,392
permissive
/* * test_point.hpp * * Created on: Jun 15, 2018 * Author: zhou */ #include "geometry/geometry.hpp" #include "utility/tinyformat.hpp" #include "gtest/gtest.h" using namespace carpio; typedef Point_<double, 3> Point3; typedef Point_<double, 2> Point2; typedef Segment_<double, 2> Seg2; typedef Box_<doubl...
197354de061833cd571430870ead39b75c667f9a
1836673e72f5c2a92af3da4829edd717f548b667
Cwoointr/DVS-Python
/oldSourceCode/EyeDx Source Code 1.5.2/EyeDx/EyeDx 1.5 Mac PC/source/PC Sources/CMFCPropertiesDlg.cpp
C++
cpp
696
no_license
// main.cp #include <stdio.h> #include <windows.h> #include <wingdi.h> #include <winbase.h> #include <winuser.h> #include <process.h> #include "resource.h" #include "globals.h" #include "main.h" #if defined (WIN32) #define IS_WIN32 TRUE #else #define IS_WIN32 FALSE #endif IMPLEMENT_DYNCREATE(CMFCPropertiesDlg, ...
2c4e1a50760e239ef88b410d09ed41e9fcc7e0b7
2539ba065ee523d030136432601a39ed96f4c82e
chanunfai/old-project
/Dijkstra's algorithm/tripper.cpp
C++
cpp
8,556
no_license
// Author Sean Davis #include <iostream> #include "tripper.h" #include "RoadRunner.h" using namespace std; City::City(){ for (int i = 0; i < 9;i++){ connected[i] = -1; dist_to_city[i] = -1; road_ID[i] = -1; } } City::~City(){ // delete[] connected; // delete[] dist_to_city; // delete[] road_...
c036b503b54e9bab04d298a058dab17654f44442
66918f0fd6d6e45121f89d2d36166578c0efeaaa
oneapi-src/oneDNN
/src/graph/backend/graph_compiler/core/src/ops/templates/matmul_core.cpp
C++
cpp
34,141
permissive
/******************************************************************************* * Copyright 2022-2023 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://...
52f577d5b19b5faeaddd6c86f8f66d128786a695
f1bf3dfe10a72991667cdaab23c750b2e9b10983
muttleyxd/chromium
/chrome/browser/ui/webui/user_actions/user_actions_ui_handler.cc
C++
cc
1,562
permissive
// Copyright 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h" #include "base/bind.h" #include "base/metrics/user_metrics.h" #include "base/va...
653bfcfd4734d95ea38e15265ceb22de85abc4da
19a54f90ed23f50d8ddc8162c1fd364188c8c0bd
Samsung/Castanets
/third_party/blink/renderer/platform/bindings/script_state.cc
C++
cc
2,315
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 "third_party/blink/renderer/platform/bindings/script_state.h" #include "third_party/blink/renderer/platform/bindings/v8_binding.h" #include "thi...
f3558f80f6e9898f6dc356d3a0e0b2f00ccf32eb
3ea3f9e7f2ddeb725286143aad7e1fbf88e33c73
z3usleo/FirestormWoD
/src/server/game/PetBattle/PetBattle.cpp
C++
cpp
104,308
no_license
//////////////////////////////////////////////////////////////////////////////// // // MILLENIUM-STUDIO // Copyright 2016 Millenium-studio SARL // All Rights Reserved. // //////////////////////////////////////////////////////////////////////////////// #include "PetBattle.h" #include "PetBattleAbilityEffect.h" #incl...
ec5f93751b81d8358a0f5a5bc8f467c4e43594df
ba0172954d774ecdb0f8a3fa9b00da2b5715a432
darkrabel/c-personal-reference-code-
/ans_that_i-tried/2t.cpp
C++
cpp
304
permissive
#include<iostream> using namespace std; int main(){ int a, b, c, d; cin>>a>>b>>c>>d; if (a>b& a>c & a>d) { cout<<a; } else if (b>a & b>c & b>d){ cout<<b; } else if (c>a & c>b & c>d){ cout<<c; } else{ cout<<d; } return 0; }
1f2da16bddecf73f9c1a39d27c31a2b98b0b9016
981d0aafe86e4ce0a46b0bd8a1b03153adb37d6b
Taokotenl/opticks
/ggeo/GBndLib.hh
C++
hh
7,414
permissive
/* * Copyright (c) 2019 Opticks Team. All Rights Reserved. * * This file is part of Opticks * (see https://bitbucket.org/simoncblyth/opticks). * * 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 ...
71b8a95b79f6616c32c72fb7036a101df1f3cff4
6aefb960e18b9d8d7bd0c56fc9604da8ec6e9851
pingpan2013/coding-exercises
/Interviews/Google/string/minimal_number_of_insertions_to_create_palindrome.cc
C++
cc
1,302
no_license
/* * ===================================================================================== * * Filename: minimal_number_of_insertions_to_create_palindrome.cc * * Description: Given a string S, you are allowed to convert it to a palindrome * by adding 0 or more characters in front of i...
bca5ff57361a6a6c4f2fab146e1d41daef7698af
a2aa28475f6342a42d0f28e0d6e2b5ddc340fd39
mizanonik/DataStructure
/Set3&4/problem_4.cpp
C++
cpp
383
no_license
#include <iostream> using namespace std; int ackerman(int m, int n){ if(m==0){ return n+1; } else if(m!=0 && n==0){ ackerman(m-1, 1); } else if(m!=0 && n!=0){ ackerman(m-1, ackerman(m, n-1)); } } int main(){ int m, n; cout << "Enter two positive integers: "; ...
eed5ffa90d8169194d5f4ce2e9f88610d6bf4364
bd9dd9fbcd66735c926768b8d6e295a68f806e99
trifunovski/randomCode
/palindrome.cpp
C++
cpp
811
no_license
#include <iostream> #include <string> using namespace std; bool checkBit(int bit){ int numOfOnes=0; for(int i = 0; i < 26; i++) { int newBit = (1<<i); if((newBit&bit)>0) numOfOnes++; } if(numOfOnes>1) return false; ...
4462775c1733ec016409544879791530e411b8de
f6feef1ecdb4f04706c60c4b221628871ac8f5fd
fromasmtodisasm/osre
/src/Engine/RenderBackend/Parameter.cpp
C++
cpp
1,610
permissive
/*----------------------------------------------------------------------------------------------- The MIT License (MIT) Copyright (c) 2015-2018 OSRE ( Open Source Render Engine ) by Kim Kulling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation f...
ca4f9728c635ed5d8b045c3140e83ae090dc9a33
1687f4067ea5f9c68d2a3b3ac40de209a82f18ba
pu2oqa/muServerDeps
/_Include/boost/asio/detail/limits.hpp
C++
hpp
950
no_license
// // detail/limits.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2011 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_ASIO_DETA...
ce2f62629a9cad50255fd402a8e21ed14a979c33
64ceef2154224a7ba59db118e998c702f48166d0
zokikizz/OOProj-Lab
/Lab 3/zadaci/Izuzeci2/RacionalanBroj.cpp
C++
cpp
850
no_license
// RacionalanBroj.cpp: implementation of the RacionalanBroj class. // ////////////////////////////////////////////////////////////////////// #include "RacionalanBroj.h" #include "Greska.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction /////////////////////...
5e158ce274223d7ec9544f7c9a7258757c4c750e
96d62e1d16478e66f7b776286a8a4cdbb6395c0e
ascend2001/CS-31
/Project_7/Centennial.cpp
C++
cpp
8,391
no_license
// // Centennial.cpp // Centennial // // Created by Howard Stahl on 1/27/17. // Copyright © 2017 Howard Stahl. All rights reserved. // #include "Centennial.h" #include <iostream> #include <string> namespace cs31 { // human goes first Centennial::Centennial() : isHumanTurn(true) { } // prints...
1f24f3bba5f82c3d554997fb88abd50650f53616
0a8550485b2039830449c6d9a0540e78fe815659
jefferssongalvao/URI
/INICIANTE/1015.cpp
C++
cpp
559
no_license
/* * Leia os quatro valores correspondentes aos eixos x e y de dois pontos quaisquer no plano, * p1(x1,y1) e p2(x2,y2) e calcule a distância entre eles, * mostrando 4 casas decimais após a vírgula, segundo a fórmula: * D = sqrt(pow(x2-x1,2)+pow(y2-y1,2)); */ #include <iostream> #include <iomanip> #include <cm...
9dc2618775d73f377eb6a3e4c11945a330e5d1bd
b6a7b0a490f93fa87909a4f794d6a09ec11077a6
trueman1990/VistaModels
/SimpleExamples/generic_fifo/models/stream_fifo_pv.cpp
C++
cpp
6,413
no_license
/**************************************************************/ /* */ /* Copyright Mentor Graphics Corporation 2006 - 2012 */ /* All Rights Reserved */ /* ...
bdfc600c42f92367bf539cf5ec64df273ed47296
e7dd85505c364884486965d7d78e3cfb4d982fc6
outman119/leetcode
/intersectionoftwolinkedlists.cpp
C++
cpp
843
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { int lenA = getlen(headA); int lenB = getlen(...
bbbed51997c0acee50a02d283c1b59b04a0e7d96
32383802337e314d308ad7ec1335eb28c02e1afc
TencentCloud/tencentcloud-sdk-cpp
/iss/src/v20230517/model/ListSubTasksResponse.cpp
C++
cpp
4,029
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 ...
4010d9c5ba0ce42a7d543e672defcd511ef1a42f
809f61653f6b36683775dc0d1d730f609576cdce
Superet/Expenditure
/Basket DP/Simulation_grid/3C_Bellman_operator.cpp
C++
cpp
4,518
no_license
#include <Rcpp.h> #include <RcppGSL.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_min.h> #include <gsl/gsl_interp.h> using namespace Rcpp; // [[Rcpp::depends(RcppGSL)]] struct my_f_params { double I_current; double lambda; double tau1; double tau3; double beta; double q; const gsl_interp *myint; gsl_...
d147190b71e281bca06dd912623729e55a6eb738
9c9b31de6f742fdbd9b02d876452f486b33ff992
fanghong2004/CHESS-MFC
/MFCApplication5/parallel_patch_daily.cpp
C++
cpp
2,323
no_license
//------------------------------------------------------------------------------------------------------------------------------ // A parallel way for computing daily F // Designed by Xu. //------------------------------------------------------------------------------------------------------------------------------ #in...
0e772ac7b2c07f60eeae607f5ae2e91a1c439cb5
d5b36aed5be64eba03ec3e70b8c5c65fa26a48ec
y-meguro/competitive-programming
/AtCoder/ABC/091/abc091_b.cpp
C++
cpp
533
no_license
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N; map<string, int> m; for (int i = 0; i < N; i++) { string s; cin >> s; if (m.count(s)) { m.at(s)++; } else { m[s] = 1; } } cin >> M; for (int i = 0; i < M; i++) { string s; cin >> s; ...
a1c794cd754bbfb28800e02bbcd14914ebefe1bf
e1bcee89e3d7f5d540b7cc28df7e6b7a8acd19f6
gideonmay/minervagis
/Source/Minerva/Qt/Widgets/FlyTo.cpp
C++
cpp
3,025
no_license
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2008, Adam Kubach // All rights reserved. // BSD License: http://www.opensource.org/licenses/bsd-license.html // /////////////////////////////////////////////////////////////////////////////// #include "Minerva/Qt/W...
42c813d4b3d2a9c34174a3b07f47d17a784152cd
586895f291e9ae08e2886177a2742cc74af7b722
WolfireGames/overgrowth
/Projects/bullet3-2.89/test/GwenOpenGLTest/GroupBox.cpp
C++
cpp
345
permissive
#include "UnitTest.h" #include "Gwen/Controls/GroupBox.h" using namespace Gwen; class GroupBox2 : public GUnit { public: GWEN_CONTROL_INLINE(GroupBox2, GUnit) { Gwen::Controls::GroupBox* pGroup = new Gwen::Controls::GroupBox(this); pGroup->Dock(Pos::Fill); pGroup->SetText("Group Box"); } }; DEFINE_UNIT_TEST...
30152f7f5baa226b8228a358bda7dfc4c8922e4c
eaa191b722e06985b29dc0e582be42df345aa087
NilFoundation/network-marshalling
/include/nil/network/marshalling/protocol/msg_id_layer.hpp
C++
hpp
23,685
permissive
//---------------------------------------------------------------------------// // Copyright (c) 2017-2021 Mikhail Komarov <nemo@nil.foundation> // Copyright (c) 2020-2021 Nikita Kaskov <nbering@nil.foundation> // // MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of th...
02e6bf9daf15b5ca93092a129baa4d9bddf69186
0dacd0a887df117306561d6231c25ea583971dd3
iammarajul/competitive_programming
/Codeforecs/16B.cpp
C++
cpp
738
no_license
#include<bits/stdc++.h> using namespace std; struct aa { int a,b; }; int main() { int n,m; cin>>n>>m; aa arr[m+1]; for(int i=0;i<m;i++) { cin>>arr[i].a>>arr[i].b; } for(int i=0;i<m;i++) { for(int j=i+1;j<m;j++) { if(arr[i].b<arr[j].b) ...
da5f30d51843ecd721c2e743878ec3d97890cec8
029910fb1919b57359bb4eea59ecc6792b1701f6
cuom1999/CP
/Problem/Corona2/B/GenTest.cpp
C++
cpp
690
no_license
#include "lib.h" typedef pair<int, int> II; int main() { ios::sync_with_stdio(0); cin.tie(NULL); // delAllFiles(); FOR (i, 51, 60) { ofstream inp = inpFile(i); // write using to file inp int cnt[4]; FOR (i, 1, 3) { cnt[i] = Rand(6, 6); inp << c...
8a94c5d3765da92a2c21875e90bcb57eae6c8df2
1ce04ffad0471e0411a9c5ed4f76ac56b88499d7
MMwaveOctomap/OctomapROS
/ti_mmwave_rospkg/src/mmWaveDataHdl.cpp
C++
cpp
2,155
no_license
/** * @file mmWaveDataHdl.cpp * @version 0.0.0 * @author yzc * @brief 这个文件通过实现ROS的线程节点打开了雷达板的读数据串口 */ #include "mmWaveDataHdl.hpp" #include "DataHandlerClass.h" namespace ti_mmwave_rospkg { PLUGINLIB_EXPORT_CLASS(ti_mmwave_rospkg::mmWaveDataHdl, nodelet::Nodelet); mmWaveDataHdl::mmWaveDataHdl() {} /** * @brie...
042415b011a57cb572d5bd3366ecf3f8588a197d
23b0d635ff79cf43367490b749b3312767e6350e
vincent-w-hsu/chromium
/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_unittest.cc
C++
cc
41,233
permissive
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h" #include <memory> #include <string> #include <utility> #include "ba...
bf5948e38ea6719a41ea9260f80f6eda489c1526
0a66714e6c3ee66cce468d6f0df81b4c218b3729
ArchimedDev/ArchimedCoin
/src/rpc/blockchain.cpp
C++
cpp
45,626
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Archimed Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "amount.h" #include "...
521fd8ec883efb1e79661f0e7f73c2443222002d
148f5293fa8f84d33084a00a89a9d2bdc429b2eb
KMuriungi/IEEEXtreme-Solutions
/IEEEXtreme 11/Rumour.cpp
C++
cpp
649
no_license
// Link: https://csacademy.com/ieeextreme-practice/task/9ca8fafd184f553a903734761546a224/ #include <bits/stdc++.h> using namespace std; #define all(v) (v).begin(), (v).end() #define int long long #define sz(v) (int)(v).size() #define mod 1000000007 void solve() { int a, b; cin >> a>> b; int cnt= 0; ...
bb18376d1f3e8b3fd497f4b88e3f1875f7660935
cdc16f0a0397743c2a5f6faa37a0a22abb6bef23
hinnie123/PWND_SDK
/SDK/PWND_Hank_Character_functions.cpp
C++
cpp
2,068
no_license
// PWND (4.17.2.0) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function Hank_Character.Hank_Charact...
535386a1f57ba53c7dcaa6947c59bd8a6243b313
786e479ec4d5e518fac97c013a738bd3af073771
Coulson007/Firmware
/src/modules/commander/airspeed_calibration.cpp
C++
cpp
9,360
permissive
/**************************************************************************** * * Copyright (c) 2013-2016 PX4 Development Team. 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. Red...
ad8e3fb37e349949c5a3e6c74ca658a69f3bc452
4b16df7273d18b60d2258a467ed0f484efc259b2
Maeiky/CpcdosOS2.1-1
/CONTRIB/LLVM/src/rt/test/asan/TestCases/use-after-scope-dtor-order.cc
C++
cc
714
permissive
// RUN: %clangxx_asan -O1 -mllvm -asan-use-after-scope=1 %s -o %t && \ // RUN: not %run %t 2>&1 | FileCheck %s #include <stdio.h> struct IntHolder { explicit IntHolder(int *val = 0) : val_(val) { } ~IntHolder() { printf("Value: %d\n", *val_); // BOOM // CHECK: ERROR: AddressSanitizer: stack-use-after...
969bbb2a68dd19f48614885d86c3af317dacacc6
c4fc7873c0349c9fb3d06a2f050ee75422624363
HatlessFox/self-study
/software_development/c++/c++_primer_5th-lippman_etc/ch_04/solution_22.cpp
C++
cpp
1,114
no_license
/* * Exercise 4.22, p.152. * * Extend the program that assigned high pass, pass, and fail grades to also * assign low pass for grades between 60 and 75 inclusive. Write two versions: * One version that uses only conditinal operators; * the other should use one or more if statemens. * Which version do you think i...
090c1fbc7f52a272ccc5fed25f171e8847421a34
7682c54c3cf9964e27ea0c18fe7d191f134c55c1
shareone2/LuoGuOj
/1157组合的输出.cpp
C++
cpp
425
no_license
#include <iostream> #include <iomanip> using namespace std; int r, n, num[30]; void dfs(int a, int cnt); int main() { cin >> n >> r; dfs(1, 1); return 0; } void dfs(int a, int cnt) { if (cnt == r + 1) { for (int i = 1; i <= r; i++) { cout << setw(3) << num[i]; } cout << endl; } else { fo...
d6472bfa7b171884ec9998ce813e0517675908e0
9e9aa0690c24197e6bd9bd2dc78595f4b2d17201
sc2ad/BeatSaber-Quest-Codegen
/include/GlobalNamespace/IAvatarPart.hpp
C++
hpp
2,125
permissive
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/byref.hpp" #include "beatsaber-hook/shared/utils/typedefs-string.hpp" // Completed includes // Type namespa...
2f095b35b3892850c6f9b778d96c8b432cf6585b
e448fa63a2c80bfdeb38cd8701ba28b27d63915c
alexocher/ukp
/libs/ukpplan/src/modules/proj/planfunction.cpp
C++
cpp
179,863
no_license
#include <defMacro> #include <TModuleEmployees> #include <TModulePlans> #include <QMessageBox> #include <QtCore> #include <QProgressDialog> // Терминология: // Номер рабочего часа года м.б. от 0 до 365*8. В году 365 суток по 8 часов. Считаем, что в сутках только 8 часов (только рабочие часы). // Номер дня год...
360db5ad49616fcdbd4fd938d5c9d2beb468d558
dfd09fe54c43bd1f07b7cbcd11f070c282323aff
Unihedro/compute-runtime
/unit_tests/command_queue/enqueue_map_buffer_tests.cpp
C++
cpp
21,721
permissive
/* * Copyright (C) 2017-2019 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "core/helpers/aligned_memory.h" #include "core/unit_tests/helpers/debug_manager_state_restore.h" #include "runtime/command_stream/command_stream_receiver.h" #include "test.h" #include "unit_tests/command_queue/command_qu...
b8b0948dde57519720490b6c007b1ced0c59174e
68b022026c83653c38eec9687640d83249080047
Harrypotterrrr/Algorithm-ACM
/Math/LC 0029 - divide.cpp
C++
cpp
2,427
no_license
/* 29. Divide Two Integers Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividing dividend by divisor. The integer division should truncate toward zero. Example 1: Input: dividend = 10, divisor = 3 Output:...
1c0319019bcc377a599eb662aef52aaa9b289d73
9b8b4354e2f1f25586e9c502e703f92028daca96
athonis/MicroMachine
/src/BotConfig.cpp
C++
cpp
8,806
permissive
#include "BotConfig.h" #include "JSONTools.h" #include <iostream> BotConfig::BotConfig() { ConfigFileFound = true; ConfigFileParsed = true; ConfigFileLocation = "BotConfig.txt"; BotName = "MicroMachine"; Authors = "David Churchill, Raphael Royer-Rivard, Antoine Theberge, Benjamin Ross, Jean-Philipp...
0ee90a627ff67ca5fea817c7619a9fa867d6a71a
0c49dbe7e0f4919b869d365ad4fbd310927f87f0
ceci3/Paddle
/paddle/fluid/operators/cast_op.cc
C++
cc
6,075
permissive
/* Copyright (c) 2016 PaddlePaddle 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...
fe2ddc1e860441ba69e753d8d6bdb31de5d19467
ba322f0bf417a1657c4f94e08d00abdf4c26fce2
kernel-coder/FileShare
/FileShare/Network/PeerChatView.cpp
C++
cpp
2,395
no_license
#include "PeerChatView.h" #include <QVBoxLayout> #include <QLabel> #include <QPalette> #include <QScrollBar> #include "Connection.h" #include "Messages/PeerViewInfoMsg.h" #include <QResizeEvent> #include "../Utils/Tag.h" PeerChatView::PeerChatView(ScrollArea *pContainer,Connection *pPeer,QWidget *parent) : QWidget...
f9b4078f1af591115a7c60af2a0969c7fc0ad6fe
004f47a47371740bd1d9fe3a4271b7efcc5ff509
Arryboom/LeagueAPI
/include/lol/def/LcdsStartChampSelectDto.hpp
C++
hpp
468
permissive
#pragma once #include "../base_def.hpp" #include "LcdsFailedJoinPlayer.hpp" namespace lol { struct LcdsStartChampSelectDto { std::vector<LcdsFailedJoinPlayer> invalidPlayers; }; inline void to_json(json& j, const LcdsStartChampSelectDto& v) { j["invalidPlayers"] = v.invalidPlayers; } inline void f...
d525bc67468e857c84fc28e3bf04b7dd243735e9
8cdff737c0d5ec248d96e239814051cc382f24e1
CU-0xff/juliet-cpp
/000/104/834/CWE476_NULL_Pointer_Dereference__struct_73b.cpp
C++
cpp
1,596
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE476_NULL_Pointer_Dereference__struct_73b.cpp Label Definition File: CWE476_NULL_Pointer_Dereference.label.xml Template File: sources-sinks-73b.tmpl.cpp */ /* * @description * CWE: 476 NULL Pointer Dereference * BadSource: Set data to NULL * GoodSource: Initialize da...
4e895dc13d958e9fbbc3515b2abf3cc6880fc143
beaedb97c5e509f99d823582c6087a6e2400d479
bijoumd78/openvino
/docs/template_plugin/src/template_plugin.cpp
C++
cpp
12,462
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // // clang-format off #include <ie_metric_helpers.hpp> #include <ie_plugin_config.hpp> #include <ie_algorithm.hpp> #include <hetero/hetero_plugin_config.hpp> #include <threading/ie_executor_manager.hpp> #include <ngraph/op/util/op_t...
c0b1d847acbf03802c4958ff26f3ec2d49435f97
6bcf735511f4ab31bf9f4e7c669b28fbf5b1886a
Celeste03/Funda-
/estatura.cpp
C++
cpp
976
no_license
#include "iostream" #include "string.h" using namespace std; float mediaestatu(); int comparacion(); int main (void) { cout <<endl; cout << mediaestatu(); cout << comparacion(); } float mediaestatu() { float altura[25] , media,sum=0; int tam=0,i; for(int i=0; i<25; i++) { cout <<...
85b49d4d556f25e7699b6230a8879522c0435569
d642b01d1cb99a934c7b4384549a268af9c44416
wangfengmsdn/chromium
/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
C++
cc
18,325
permissive
// Copyright 2015 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/background_sync/background_sync_controller_impl.h" #include <stdint.h> #include "base/files/file_util.h" #include "base/files/s...
ddb2b7ddd77f4c9a851fbfe8fefa90200c412f1b
b9c17a06a925625d44b461c5c1060991321d50cf
GraceTsang/Please-Hire-Us
/response.cpp
C++
cpp
785
no_license
#include "response.hpp" #include <vector> #include <string> void Response::SetStatus(const ResponseCode response_code){ _response_code = response_code; } void Response::AddHeader(const std::string& header_name, const std::string& header_value){ std::pair<std::string, std::string> newHeader(header_name, header_val...
df680fcf1bc2a5463cb4002baa69eabc26f22fbf
08ddb76a58346a3897940b67b9ef3bae1349b669
musakhan18/OOP
/OOP Lab 12/OOP Lab 12/Copier.cpp
C++
cpp
344
no_license
#include "Copier.h" Copier::Copier() :Scanner(), Printer() { } Copier::Copier(int a, int b, int c) : Scanner(a, c), Printer(b, c) { } void Copier::display() { cout << "Id of Power Device: " << PDID << endl; cout << "Id of Scanner: " << SID << endl; cout << "Id of Printer: " << PID << endl; } C...
8ad8b3a1e3b6d4b29a85f0230dd687058f9e74d0
2d68e06484a79fe68615b366d395c7b826f98887
shreyachatterjee00/cs32
/hw1/testScoreList.cpp
C++
cpp
1,052
no_license
// // testScoreList.cpp // Homework1 // // Created by Shreya Chatterjee on 4/11/19. // Copyright © 2019 Shreya Chatterjee. All rights reserved. // #include <stdio.h> #include "ScoreList.h" #include <iostream> #include <cassert> using namespace std; int main() { ScoreList scoreList; assert(scoreList.maximu...
a20b827c44db2dc6169543e820e776a911409ac6
bf86f2be279eb702f11ff39c9851e73f9bdec9a8
kernal88/Elastos5
/Sources/Elastos/Packages/Apps/Launcher2/src/elastos/droid/launcher2/CInfoDropTarget.cpp
C++
cpp
5,160
permissive
#include "elastos/droid/launcher2/CInfoDropTarget.h" #include "elastos/droid/launcher2/ApplicationInfo.h" #include "elastos/droid/launcher2/PendingAddItemInfo.h" #include "elastos/droid/launcher2/ShortcutInfo.h" #include "elastos/droid/launcher2/ItemInfo.h" #include "elastos/droid/launcher2/LauncherApplication.h" #inc...
2b143c0375cbff0e9e3853a64148cdc69f479dd3
58d260af2067c2e80b19ef683245d69a6e8a9181
grodtron/behavioral-model
/tests/test_packet.cpp
C++
cpp
5,224
permissive
/* Copyright 2013-present Barefoot Networks, Inc. * * 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 la...
506b6a402e11cc5c4f5bfebead33108f19f56378
68363aa7c459bcbec615972c0ec1a012a146b697
soso8531337/couchbase-lite-core
/LiteCore/Support/SecureDigest.hh
C++
hh
3,030
permissive
// // SecureDigest.hh // Couchbase Lite Core // // Created by Jens Alfke on 12/29/15. // Copyright (c) 2015-2016 Couchbase. All rights reserved. // #pragma once #if defined(_CRYPTO_CC) // iOS and Mac OS implementation based on system-level CommonCrypto library: #include <CommonCrypto/CommonDigest.h> ...
a304ff2171465db878899c1207fab36d61f52acf
c4c95aaeb58fa2c2e86c8ab4d53c19cf675540b7
pu2oqa/muServerDeps
/_Include/boost/geometry/algorithms/detail/intersection/interface.hpp
C++
hpp
9,411
no_license
//////////////////////////////////////////////////////////////////////////////// // interface.hpp // Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2014. // Modifications copyright (c) 2014, Oracle...
32e1333f121fed7fd12c4d3696ed12f267983db0
cd4b3bd56bd7342e96644ea1cf46706ce9d9e7da
hntk03/atcoder
/company/exawizards/RegularTriangle.cpp
C++
cpp
394
no_license
#include <bits/stdc++.h> using namespace std; typedef vector<int> VI; typedef vector<string> VS; //container util #define SORT(c) sort((c).begin(),(c).end()) //repetition #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(void){ int A, B, C; cin >> A >> B >> C; if(A==B and B==...
1a7263c6f98c6d367ccc6451b68865b0742b6a6c
61d39fad443f7354e2ea890b88d0bf926c56b22a
Dithn/pytorch
/torch/csrc/jit/serialization/export_module.cpp
C++
cpp
37,509
permissive
#include <torch/csrc/jit/serialization/export.h> #include <c10/util/Exception.h> #include <torch/csrc/jit/api/function_impl.h> #include <torch/csrc/jit/backends/backend_debug_handler.h> #include <torch/csrc/jit/backends/backend_debug_info.h> #include <torch/csrc/jit/frontend/source_range.h> #include <torch/csrc/jit/ir...
14aea6c950804cc8c7e105c3ee56725ed3a5e207
2567b7a6ab202e21cb1893d8cdd0e12ad23b3940
jwhite66/allwpilib
/ntcore/src/main/native/cpp/jni/NetworkTablesJNI.cpp
C++
cpp
55,241
permissive
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
21e51784a8b103567605167cca4caf8410557505
0c5a6b93a0c381be48193bff31b1a6138b10e17a
azer89/Organic_Labyrinth
/GLContainer.cpp
C++
cpp
7,968
no_license
//#include "stdafx.h" #include "GLContainer.h" #include <iostream> #include <QApplication> #include <QEvent> #include <QGLFormat> #include <QGridLayout> #include <QMouseEvent> #include <QScrollBar> #include <QTimer> GLContainer::GLContainer(QWidget *parent) : QAbstractScrollArea (parent), _ctrlPressed(fa...
c5490e1147aaebfc1c469722315bee12c67a882c
5194bdec05a530674eacdf7da967562e7b1fce62
rudolf-schoenmann/ContaminationFlow_Win
/_shared_sources/ExtrudeFacet.cpp
C++
cpp
26,812
no_license
/* Program: ContaminationFlow Description: Monte Carlo simulator for satellite contanimation studies Authors: Rudolf Schönmann / Hoai My Van Copyright: TU Munich Forked from: Molflow (CERN) (https://cern.ch/molflow) This program is free software; you can redistribute it and/or modify it under the terms of th...
07db6194653d235d007b174d6fb1d150a3ff6012
544126c1737743b62d8dbb251731604690da25b6
fueltherage/SDLServerGame
/SpaceServer/projectCopy_Physics/BaseProject/BaseProject/SpriteBatch.cpp
C++
cpp
35,787
no_license
#pragma once #include "SpriteBatch.h" #include <iostream> #ifndef COLOR_WHITE #define COLOR_WHITE CreateColor(255, 255, 255, 255) #endif bool operator== (const SDL_Color c1, const SDL_Color c2) { return (c1.r == c2.r) && (c1.g == c2.g) && (c1.b == c2.b) && (c1.a == c2.a); }; bool operator!= (const SDL_Color c1, con...
274481f9aaafe88df752b490c6f3c236761e52b1
c2997eb7e5e64271f48dab034a8b5fe588c9fcb5
614984177/Code
/LeetCode/58.最后一个单词的长度.cpp
C++
cpp
789
no_license
#include <bits/stdc++.h> using namespace std; const int MAXN = 1e5 + 5; /* * @lc app=leetcode.cn id=58 lang=cpp * * [58] 最后一个单词的长度 */ // @lc code=start class Solution { public: int lengthOfLastWord(string s) { s = " " + s + " "; int r = 0; for (int i = s.size() - 2; i >= 0; i--) { ...
4a0c7c9c66513b5846194304cf7f5b19729b9d06
9286fff72a4ee4984147ff2b23c3029dc6fea98c
nkzxw/lastigen-haustiere
/include/base64.hpp
C++
hpp
2,705
no_license
//TODO: renombrar archivo #ifndef BASE64_HPP #define BASE64_HPP #include <string> #include <iostream> #include "boost/archive/iterators/base64_from_binary.hpp" #include "boost/archive/iterators/binary_from_base64.hpp" #include "boost/archive/iterators/transform_width.hpp" using namespace std; using n...
8117ab82073236c184606ca1cfc9befd3bb85225
59c0931b297febfa39a15791c95ff1590167488f
roiSela/huffman-tree
/data structures exercise 2/data structures exercise 2/Heap.cpp
C++
cpp
2,245
no_license
#include "Heap.h" int Heap::Left(int node) { return (2*node +1 ); } int Heap::Right(int node) { return (2*node +2); } int Heap::Parent(int node) { return (node-1)/2; } void Heap::FixHeap(int node) { int min; int left = Left(node); //to find the position of left child int right = Right(nod...