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
4177b5eff10ca3da9d5433d4228671c9f083ba00
fb46bc1599b1e2e893e13d1ebe2aa44a3c8b92e3
sebpost2/Sebastian-Gonzalo-Postigo-Avalos
/RSA(sin NTL).cpp
C++
cpp
4,278
no_license
#include <iostream> #include <vector> #include<time.h> int mimodulo(int x, int y){ int div = x / y; int modulo = -(div * y) + x; if (modulo < 0) modulo += y; return modulo; } int mcd(int x, int y){ int modulo; while (y != 0) { modulo = mimodulo(x, y); ...
a2bef70df6dc5906c7ccb62768b1ac882f8f0742
c185b21e45ff62258934a3e263829d19351b6ecb
kangbudz/Xarmlib
/include/targets/LPC84x/lpc84x_specs.hpp
C++
hpp
4,244
permissive
// ---------------------------------------------------------------------------- // @file lpc84x_specs.hpp // @brief NXP LPC84x specification definitions. // @date 14 January 2020 // ---------------------------------------------------------------------------- // // Xarmlib 0.1.0 - https://github.com/hparracho/Xa...
05044a4eab84c134e373a35ff87ad955a3f13520
ea9709a0372add9fb63feecaae8e71ec22537fc2
uditg200/LaunchpadNoon19
/Lecture9/arraysum.cpp
C++
cpp
394
no_license
#include<iostream> using namespace std; int sum(int *a,int n) { if(n==0) { return 0; } int ans=a[0]+sum(a+1,n-1); return ans; } int sum1(int a[],int i,int n) { if(i==n) { return 0; } int ans=a[i]+sum1(a,i+1,n); return ans; } int main() { int n; cin>>n; int a[100]; for(int i=0;i<n;i++) { cin>>a[...
aadab27181716bb9062cb34e43c0d4b75f267927
cbd0cbe03f65c71c2c9763c6ce8a14334b09d5dd
avast/yaramod
/src/builder/yara_rule_builder.cpp
C++
cpp
24,863
permissive
/** * @file src/builder/yara_rule_builder.cpp * @brief Implementation of class YaraRuleBuilder. * @copyright (c) 2017 Avast Software, licensed under the MIT license */ #include "yaramod/builder/yara_rule_builder.h" #include "yaramod/types/expressions.h" #include "yaramod/types/symbols.h" #include "yaramod/types/pl...
f34f6c204059529e0339ba6783bcc81849e0386d
6813cb0f62de4f0d8d799024620d43190dc1bf1c
yatsek/silk
/src/plugins/mimehandler/qml/qmlhandler.cpp
C++
cpp
21,012
permissive
/* Copyright (c) 2012 Silk 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: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
d8a8bf315999119840a580d33c1112d67a7b0b0b
b39948dcdca50d532471388521e35afeaa247680
MirageMalik47/Data-Structure-Algorithms
/01 Amazon/06 DP/18 Subset Sum Problem.cpp
C++
cpp
854
no_license
Problem Statement : https://www.geeksforgeeks.org/subset-sum-problem-dp-25/ /**************************** Time Comp : O(sum*n) ****************************/ bool isSubsetSum(int set[], int n, int sum) { bool subset[n+1][sum+1]; for (int i = 0; i <= n; i++) // If sum is 0, then answer is true ...
9fe9178e5368b3b4d9804b9ece90dd50f8915970
c2cd0fd36fb1b5ce873e374a71421a29e577e732
lunixoid/libtorrent
/test/test_magnet.cpp
C++
cpp
15,476
permissive
/* Copyright (c) 2012, Arvid Norberg 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 and the f...
a17f29b9e7a3ea36d53a2c68df5bf595b771e677
7460e9ccf54bda38f39e46d1b4dc9d6e0acf3d96
palliums-developers/PalliumsPOS
/src/omnicore/test/alert_tests.cpp
C++
cpp
2,722
permissive
#include "omnicore/notifications.h" #include "omnicore/version.h" #include "util.h" #include "test/test_bitcoin.h" #include "tinyformat.h" #include <boost/test/unit_test.hpp> #include <stdint.h> #include <map> #include <string> #include <vector> using namespace mastercore; // Is only temporarily modified and resto...
581a4d9745782f15ea502a6cc9706536ce8cc1e9
ef5de569e65e6f7e8eddcc55e2b31a564e27127c
CVanderbilt/CPP
/module_03/ex04/NinjaTrap.hpp
C++
hpp
973
no_license
#ifndef NINJATRAP_HPP # define NINJATRAP_HPP # include <iostream> # include "ClapTrap.hpp" # include "ScavTrap.hpp" # include "FragTrap.hpp" class Ninjatrap: virtual public Claptrap { public: Ninjatrap(void); Ninjatrap(std::string name); Ninjatrap(Ninjatrap const &ft); ~Ninjatrap(vo...
552c64fbb05728998d19f8a4969abfdb66803e53
e25de08bf7e334b332faee5052f4f95c50f73af4
mapsme/omim
/routing/routing_integration_tests/routing_test_tools.hpp
C++
hpp
7,875
permissive
#pragma once #include "routing/index_router.hpp" #include "routing/routing_callbacks.hpp" #include "storage/country_info_getter.hpp" #include "map/features_fetcher.hpp" #include "platform/country_file.hpp" #include "platform/local_country_file.hpp" #include <cstdint> #include <memory> #include <set> #include <stri...
c58b0973ce57a95135bc7441ae3b81d3cdae7e52
2945abbd8c197bfda3c153fc8a94ebfa6e90d049
rosoareslv/SED99
/c++/godot/2017/4/scene_tree_editor.cpp
C++
cpp
36,738
no_license
/*************************************************************************/ /* scene_tree_editor.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
be02bb946a689b60aa133fc9b518e8414cbcfee4
8eb6acc891958bde3f9d759930d6ac69e1b00d04
amrittb/lms-gtk
/system/database/model/ModelQueryBuilder.cpp
C++
cpp
2,137
no_license
#include <gtk/gtk.h> #include <system/database/model/ModelQueryBuilder.h> #include <system/database/connections/QueryResult.h> #include <system/database/model/Model.h> #include <system/database/query/QueryBuilder.h> namespace tuber{ ModelQueryBuilder::ModelQueryBuilder(QueryBuilder* builder) : m_queryBuilder(builde...
8b495468872759d050c7d07476fd7031291a6f2a
9e8b6696c339862a00933a982ab7055ace0fe3f8
firesidecollectives/mediasoup
/worker/src/lib.cpp
C++
cpp
5,395
permissive
#define MS_CLASS "mediasoup-worker" // #define MS_LOG_DEV_LEVEL 3 #include "common.hpp" #include "DepLibSRTP.hpp" #include "DepLibUV.hpp" #include "DepLibWebRTC.hpp" #include "DepOpenSSL.hpp" #include "DepUsrSCTP.hpp" #include "Logger.hpp" #include "MediaSoupErrors.hpp" #include "Settings.hpp" #include "Utils.hpp" #in...
3b66acdeb599479ba84d7674ab23889609666b15
29e6f3a28d29e2432b139608e8db28c8f3b936fb
lep/biboumi
/louloulibs/network/resolver.hpp
C++
hpp
2,816
permissive
#pragma once #include "louloulibs.h" #include <functional> #include <memory> #include <string> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> class AddrinfoDeleter { public: void operator()(struct addrinfo* addr) { #ifdef CARES_FOUND while (addr) { delete addr->ai_addr; ...
702fe9ca5c747b4c884c080f6005f8ffa332ac84
32f374e6a5bce9585b42f7c8d03d9ce13dd91054
prateekbatra/lcq
/bfs/binary_tree_vertical_order_traversal.cpp
C++
cpp
1,763
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
90661dce659d3c2f0877344a43b4b1cbab790a8f
e82ecb109253abffb1b108ae6ebd85fdbb857738
xzlinux/fuchsia
/src/storage/fs_test/json_filesystem.cc
C++
cc
5,353
permissive
// Copyright 2021 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/storage/fs_test/json_filesystem.h" namespace fs_test { bool GetBoolOrDefault(const rapidjson::Document& config, const char* member, bool de...
5dd5f099ad4c7517c20418b45af4edd367e0735e
fe27106f885c5ac77bb7cbb38ca9d07eab9c8c41
WebProject-STT/Algorithm
/prev/baekjoon/3주차/10434/10434_jh.cpp
C++
cpp
1,857
no_license
#include <iostream> #include <string> #include <string.h> #include <math.h> using namespace std; #define MAX 10001 // 무한루프 여부를 확인하기 위한 배열 bool check[MAX] = {false}; // 소수 판별 함수 bool isPrimeNumber(int n) { // sqrt는 n의 제곱근을 구해줌 for (int i = 2; i <= sqrt(n); i++) { if (n % i == 0) { ...
7cfa4e82229a4f0e6e976833deee36ab05d08833
75e9432b1f6270241e7587964565cfa91c6394cb
sdwfrost/vg
/src/mapper.hpp
C++
hpp
35,423
permissive
#ifndef VG_MAPPER_HPP_INCLUDED #define VG_MAPPER_HPP_INCLUDED #include <iostream> #include <map> #include <chrono> #include <ctime> #include "omp.h" #include "vg.hpp" #include "xg.hpp" #include "index.hpp" #include <gcsa/gcsa.h> #include <gcsa/lcp.h> #include <gbwt/gbwt.h> #include "alignment.hpp" #include "path.hpp" ...
f5b081aed0993e585ad5d3e54d746a9dc9c53059
7b10c6264a92c7b1fc4d4f982339a4b8124d876a
gholamidin/DailyNotes
/剑指offer/6.Fibonacci.cpp
C++
cpp
232
no_license
class Solution { public: int Fibonacci(int n) { int first = 0 ; int second = 1; while(n--){ second = first+second; first = second - first; } return first; } };
a64e2d9f13ac5d9a47f15bebbb64d904fa3d3449
3e7fe01a2a3e4bd443422f15cd911adfe1e6c6bb
zsaladin/CppCoroutine
/EventLoop/main.cpp
C++
cpp
1,671
no_license
#include <iostream> #include <chrono> #include "EventLoop.h" #include "Task.h" #include "Sleep.h" using namespace std::literals::chrono_literals; std::future<void> func0(std::weak_ptr<EventLoop> loop) { std::cout << "func0 - 1" << std::endl; // 1 co_await Sleep(loop, 1000ms); std::cout << "func0 - 2" ...
48cdf615b68c55a832d20069c0573e2a91cb90f3
1daa4eff77c992168a7099cf9be726273c4e5aae
veenanitk/Digital-Image-Processing
/pgms/graph.cpp
C++
cpp
1,325
no_license
#include<bits/stdc++.h> using namespace std; class Graph { int V; list<int> *adj; public: Graph(int V); void addEdge(int v, int w); void BFS(int s); }; Graph::Graph(int V) { this->V = V; adj = new list<int>[V]; } void Graph::addEdge(int v, int w) { adj[v].push_back...
e3261b700c1d1ec3eb962909bc8244aa9c72b3cf
75d08d6ac909cefb4fe732cf3393aeb4a3f574e4
jared321/amrex
/Src/LinearSolvers/MLMG/AMReX_MLEBTensorOp.cpp
C++
cpp
22,918
permissive
#include <AMReX_MLEBTensorOp.H> #include <AMReX_EBMultiFabUtil.H> #include <AMReX_MultiFabUtil.H> #include <AMReX_MLTensor_K.H> #include <AMReX_MLEBTensor_K.H> namespace amrex { namespace { constexpr int kappa_num_mglevs = 1; } MLEBTensorOp::MLEBTensorOp () { MLEBABecLap::setScalars(1.0,1.0); } MLEBTensorOp...
fa75ce94e2eb5863699aa0623ac35583136de9d7
40d20470cb2e6c9e453410e3202dbf1e41017ecb
aspose-tasks/Aspose.Tasks-for-C
/Examples/CPP/WorkingWithTasks/AddTaskExtendedAttributes.cpp
C++
cpp
10,938
permissive
/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Tasks for .NET API reference when the project is build. Please check https:// Docs.nuget.org/consume/nuget-faq for more information. If you do not wish to use NuGet, you can manually download Aspose.Tasks for .NET API from https://www.n...
aa82a79e975f78d4f6538dffa35470940f1ada75
4a611e8fa0d35fd77871eca9747db40de17f32cd
themucha/airwindows
/plugins/WinVST/SpatializeDither/SpatializeDitherProc.cpp
C++
cpp
7,688
permissive
/* ======================================== * SpatializeDither - SpatializeDither.h * Copyright (c) 2016 airwindows, All rights reserved * ======================================== */ #ifndef __SpatializeDither_H #include "SpatializeDither.h" #endif void SpatializeDither::processReplacing(float **inputs, float **...
0e2c4bc56a3c7d6af905fae512e696f0977cfd7e
548b44ad24f838b714cf40513d0d58580ecaa87e
ccccjason/TinySTL_m
/TinySTL/Test/TrieTreeTest.cpp
C++
cpp
857
no_license
#include "TrieTreeTest.h" namespace TinySTL { namespace TrieTreeTest { void testCase1() { trie_tree t; t.insert("abc"); t.insert("def"); assert(t.is_existed("abc")); assert(!t.is_existed("a")); } void testCase2() { trie_tree t; string arr[] = { "ab", "abbreviation", "abide", "abolish", "ab...
ef7cef4c6f8d64568811a174be0e6e4961684fbe
108e326ad763d530c89d7731bd6539edf6a4546d
aseprite/skia
/src/shaders/SkImageShader.cpp
C++
cpp
42,830
permissive
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/shaders/SkImageShader.h" #include "include/private/SkImageInfoPriv.h" #include "src/core/SkArenaAlloc.h" #include "src/core/SkColorSpacePriv.h" #include "src/co...
943393d24b61bb45ab3a84a2ddeffa8da7b30af0
f0a8e2c5500e63b2138122aa37b9e9dce82640f7
moneytech/cvmfs
/cvmfs/publish/command.cc
C++
cc
3,602
permissive
/** * This file is part of the CernVM File System. */ #include "cvmfs_config.h" #include "publish/command.h" #include <getopt.h> #include <cassert> #include <cstdlib> #include <cstring> #include "logging.h" #include "publish/except.h" #include "smalloc.h" #include "util/string.h" using namespace std; // NOLINT ...
f02e8f131f897528859f4c4445ed0aa0cbc57150
28b645e0ebc6887cec3aa1a3c707a32ad1edb9dc
dm-vodopyanov/llvm
/mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
C++
cpp
40,015
permissive
//===- GPUTransformOps.cpp - Implementation of GPU transform ops ----------===// // // 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 // //===---------------------------...
68fbeb9b3fa40d903e456c3fad2e1b17c881b434
9222d8d9a5c6b09a0f7fbb826ee0487650b4dc11
kcudcigam/Problems
/source/2019.08.12/李泽清/debate.cpp
C++
cpp
836
no_license
#include<bits/stdc++.h> #define LL long long #define F(x,y,z) for (int x=y;x<=z;++x) #define D(x,y,z) for (int x=y;x>=z;--x) using namespace std; const int N=800010; int n,cnt,mm; LL ans,anss; char s[100]; int p1[N],p2[N],p0[N]; int r1,r2,r0,pt; int h[1000000]; bool cmp(int x,int y){return x>y;} int main(){ freopen("d...
d38f5b6051ec6e4acf86a283f3fc023acca427af
7cfc5f8f7da18c29e7bdbebe58eb2104d22d8f57
cs-joy/Pulse
/src/test/skiplist_tests.cpp
C++
cpp
4,045
permissive
// Copyright (c) 2014 The Bitcoin Core developers // Copyright (c) 2017 The Pulse developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "random.h" #include "util.h" #include <vector> #includ...
da3f8d9133bd58e669d3675d8922e1d6a719fe12
23993e5984d55a1770a2186ce6a65e2625f0156e
samwhitlock/mesos-monitoring
/src/common/resources.cpp
C++
cpp
6,703
permissive
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
e42eb3e630bb1f8f8be18ad674629fd4f08b67ae
972d8e23bd30fdfb9af84db9bdd2744c34842aec
JefGrailet/treenet
/v2/Reader/src/aliasresolution/AliasHintCollector.cpp
C++
cpp
8,135
no_license
/* * AliasHintCollector.cpp * * Created on: Feb 27, 2015 * Author: grailet * * Implements the class defined in AliasHintCollector.h (see this file to learn further about the * goals of such class). */ #include "AliasHintCollector.h" #include "IPIDCollector.h" #include "UDPUnreachablePortUnit.h" #include...
1748e873b54a0776b54c5529123461ce5d7aef9b
5c3fc5f95f65dc0e0090106af2ae1b9f6357dbba
retrospct/fastled-wedding
/src/MultiArray-DemoReel100.cpp
C++
cpp
5,867
no_license
#include <Arduino.h> #include <FastLED.h> FASTLED_USING_NAMESPACE // FastLED "100-lines-of-code" demo reel, showing just a few // of the kinds of animation patterns you can quickly and easily // compose using FastLED. // // This example also shows one easy way to define multiple // animations patterns and have them a...
f11b24a9341af6d1b9cd138a4e8d835fc77ea7e3
dafa6851bda59e758f914fb4ad1d8ceb8844f6bf
markchen0/hand-gesture
/src/gesture.cpp
C++
cpp
15,170
no_license
#include <opencv2/opencv.hpp> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> #include <iostream> using namespace std; using namespace cv; void paste(cv::Mat dst, cv::Mat src, int x, int y, int width, int height){ cv::Mat resized_img; cv::resize(src, resized_img, cv::Size(width, heigh...
65f690708332376c0260fec23fbef85cdd69eb4b
2dee3dee7ab40de1719ffbb08b3496a8cebbc6cf
ClarkGuan/android-runtime
/test-app/runtime/src/main/cpp/v8_inspector/src/inspector/v8-overlay-agent-impl.cpp
C++
cpp
2,467
permissive
// // Created by pkanev on 11/15/2017. // #include <ArgConverter.h> #include <v8_inspector/src/inspector/utils/v8-inspector-common.h> #include "v8-overlay-agent-impl.h" namespace v8_inspector { using tns::ArgConverter; namespace OverlayAgentState { static const char overlayEnabled[] = "overlayEnabled"; } V8Overlay...
18b1a5d47227b9375704afb343da3e97c948645b
699c6f7f050794175018a0425fca9242dcd3867e
manthans873/Codeforces-Solutions
/1500/Running-for-Gold.cpp
C++
cpp
1,139
no_license
// prob link: https://codeforces.com/contest/1552/problem/B #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5+2; bool operator < (vector<int>& a, vector<int>& b){ int cnt = 0; for(int i=0; i<5; ++i){ if(a[i] < b[i]) cnt++; } // cout<<cnt<<"\n"; return (...
0b062f3a1fd0a6161ec3a6782a1e2d1050b7d1c5
5ebf1a5893ae8f32b86af2888069b8398f0024b8
trmcnealy/Graphics.NET
/runtime.Graphics.NET/runtime.Graphics/opengl/image_impl.hpp
C++
hpp
2,576
no_license
/******************************************************* * Copyright (c) 2015-2019, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause *****************************************...
a62f1042e590f469e47e50d880c4640cf47f13c9
2f766117ed11b86c0d42231b831531a0c8527188
vcato/node_editor
/evaluatestatement.cpp
C++
cpp
2,519
no_license
#include "evaluatestatement.hpp" #include "stringparser.hpp" #include "evaluateexpression.hpp" #include "anyio.hpp" #include "rangetext.hpp" using std::string; using std::vector; using std::ostream; using std::cerr; Optional<Any> evaluateStatement( const string &statement, const vector<Any> &input_values,...
0b63812e8e22ae0b82161e6ac384b6511de41608
8b64538eab205f96af175bf09c2a8565d7da0ce7
LouisRenWeiWei/reef
/lang/cs/Org.Apache.REEF.Bridge/AllocatedEvaluatorClr2Java.cpp
C++
cpp
8,298
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
3ed2eb61668a10e691fba4505f40c38a54e20227
6454973d4e6b35e463217c8cb01cf94a256657fb
mysms/mysms-desktop-app
/jsinterface.cpp
C++
cpp
2,588
no_license
/**************************************************************************** ** ** mysms - Send & receive all your SMS on your Notebook, PC or tablet – like on your smartphone ** Copyright (C) 2013 Up To Eleven ** All rights reserved. ** ** ** This library is free software. either version 2.1 of the License, or (at y...
c3de7fc694cfd10a7957c05082cf44df059578db
f2503de3349a004b866567b15e3bb4125a386792
Cendukka/ProggRs-2d-Shooter-game-project
/src/ship.cpp
C++
cpp
4,682
no_license
#include "ship.h" #include "Game.h" #include "Util.h" #include "GLM/gtx/rotate_vector.hpp" #include "PlayScene.h" #include "Level1Scene.h" #include "GLM/gtx/string_cast.hpp" #include "ScoreBoardManager.h" Ship::Ship() : m_maxSpeed(5.0f), m_currentDirection(0.0f), m_turnSpeed(2.0f), m_steerForce(0.1f), m_currentTile(...
b72a0b1f38655268d95d74c73f5f9baf8b9477b5
a6eece4798e13b699005c1d1c2e45f1fc8280a24
mmbillah/ProgPrac
/C++/Pointers/3_newNothrow.cc
C++
cc
984
no_license
#include<iostream> using namespace std; int* a; //we only define a pointer, not telling whether it's an array or whatever int b[3]; //an array of integers int main(){ //we convert the pointer into an array of pointers //the 'new' keyword always returns a pointer //thus, the use of '&' and '*' operat...
ec171e2b619492a2b6653a073d4eacebac056bcd
989b26180cf5a75fbd1fa96d64b21a0738ef6dc1
ragebiswas/algorepo
/hackerrank/nov13_utopian_tree.cpp
C++
cpp
555
no_license
/** * 20/20 Hack November: Utopian Tree (https://www.hackerrank.com/contests/nov13/challenges/utopian-tree) * Category: Simple coding */ #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int nc, h, c; cin >> nc; while(nc--) {...
be71aebf8b547b1a52550e2e27c44657528127b9
11747d8975a23450d1aa2233e647a756bbd6bcf3
Igorjan94/vk
/vkconsole/vk.cpp
C++
cpp
8,203
permissive
#include "vk.h" #include <cstdlib> using namespace std; #define pb push_back #define ll long long #define forit(it, r) for (auto it = r.begin(); it != r.end(); it++) #define forn(i, n) for (int i = 0; i < n; ++i) #define forn1(i, n) for (int i = 1; i < n; ++i) #define FOR(i, m, n) for (int i = m; i < n; ++i) #define ...
2da9486464f40ef121046a528c8ff1f7fc21444a
bac314557f1826b2e6913d57d7dcbf7ce6444f92
muttleyxd/chromium
/components/autofill/core/browser/form_processing/label_processing_util.cc
C++
cc
3,895
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 "components/autofill/core/browser/form_processing/label_processing_util.h" #include "base/ranges/algorithm.h" #include "base/strings/string_spli...
222a46daa91feac8c5b72a1d16c94622cdfb0ec7
1c09942666a8bf59bc875a390de56a82a2f95ec5
senka/MultiBosons
/plugins/LazyCandViewShallowCloneCombiner.cc
C++
cc
491
no_license
#include "FWCore/Framework/interface/MakerMacros.h" #include "CommonTools/UtilAlgos/interface/StringCutObjectSelector.h" #include "CommonTools/CandAlgos/interface/CandCombiner.h" namespace reco { namespace modules { typedef reco::modules::CandCombiner< StringCutObjectSelector<reco::Candidate,true>, ...
2a3f0da21db29e20ddb0fd53e44582cabe8dc045
ba6ddcfd7842ebf0b62521ca9eae22386580fe62
termoshtt/monolish
/include/vml/monolish_linearoperator_vml.hpp
C++
hpp
3,851
permissive
// this code is generated by gen_linearoperator_vml.sh #pragma once #include "../common/monolish_common.hpp" /** * @brief * Vector and Matrix element-wise math library */ namespace monolish::vml { /** * @brief element by element addition LinearOperator matrix A and * LinearOperator matrix B. * @param A monolis...
4f47cbc0e140661fdef12a9b994210f09470d953
3663e94d5009dcefe6f3ca67278943ee37ed4e72
HarryLong/StatisticalAnalysisTool
/analyser/analyzer.cpp
C++
cpp
12,017
no_license
#include "analyzer.h" #include "../analysis_point.h" #include "dependency_analyzer.h" #include "../utils/file_utils.h" #include "../utils/utils.h" #include <iostream> #include <thread> #include <QProgressBar> #include <fstream> #include <chrono> /******************************* * RADIAL DISTRIBUTION TRACKER * **...
db396102564fa95b64b0e5064f63b016aac579f0
66f1bf4875b0c494ed45a39bbc6636cf870dd9c8
lajagapp/rocSOLVER
/rocsolver/clients/gtest/getf2_getrf_gtest.cpp
C++
cpp
9,361
permissive
/* ************************************************************************ * Copyright 2020 Advanced Micro Devices, Inc. * * ************************************************************************ */ #include "testing_getf2_getrf.hpp" using ::testing::Combine; using ::testing::TestWithParam; using ::testing::Val...
e2029ae18591ba54aa711a9460fcceed10820642
b6e602956d5c89c6a91f40e9b7af95e7d09712f3
otcshare/chromium-src
/services/ml/dnnl_symbol_table.cc
C++
cc
939
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 "services/ml/dnnl_symbol_table.h" #include "build/build_config.h" namespace ml { #if defined(OS_LINUX) LATE_BINDING_SYMBOL_TABLE_DEFINE_BEGIN(...
3523fa61abe536432c3b6ef33231994b39c32300
6627f618784d52963bdb4fa017fad1380c7d36a0
bgruening/OpenMS
/src/tests/class_tests/openms/source/SpectrumSettings_test.cpp
C++
cpp
16,698
permissive
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and ...
5ec4f8a7ca97a49ece5d92c6b375aa6b6815f36c
c11827c85c234bb18fc880e29e379edbb52445a6
Segs/SegsEngine
/thirdparty/EASTL/test/source/TestFunctional.cpp
C++
cpp
35,283
permissive
///////////////////////////////////////////////////////////////////////////// // Copyright (c) Electronic Arts Inc. All rights reserved. ///////////////////////////////////////////////////////////////////////////// #include <EABase/eabase.h> #include <EAAssert/eaassert.h> #include "EASTLTest.h" #include <EASTL/memory...
6ca71f51d63bbc320415de17d113ab3b5e0bd7b8
68c0e061e560622132acbcb119fc9b8d9666b76d
p719967821/algorithm
/oj/2017.cpp
C++
cpp
437
no_license
/*字符串统计*/ #include <iostream> #include <string> using namespace std; int main() { string s; int n,i,j,lo,sum = 0; cin >> n; for(i = 0; i < n; i++) { cin >> s; lo = s.length(); for(j = 0; j < lo; j++) { if(s[j] <= '9' && s[j] >= '0') { ...
803da9231360f6e9b098a06a5c8dcd3362d44d58
d6e414cf6c9ce3575ffc4dfad3baf5f38c676cbc
jaggiK/cv_visual_assistance
/src/perception/sensors/oakd/depthai/depthai-api/shared/3rdparty/dldt/ngraph/src/ngraph/op/gather_nd.hpp
C++
hpp
2,142
permissive
//***************************************************************************** // Copyright 2017-2019 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...
a608c012477a9c2d698a60c0a44f407de527d61a
d6e8ba0a2aa99de5f6433a66194275b541f0ac2c
radtek/master2
/DlgInputRptPostKpXls.cpp
C++
cpp
1,776
no_license
// DlgInputRptPostKpXls.cpp : implementation file // #include "stdafx.h" #include "master.h" #include "DlgInputRptPostKpXls.h" #include "afxdialogex.h" // CDlgInputRptPostKpXls dialog IMPLEMENT_DYNAMIC(CDlgInputRptPostKpXls, CDialog) CDlgInputRptPostKpXls::CDlgInputRptPostKpXls(CWnd* pParent /*=NULL*/) : CDialog(...
58cb5b4329aef2b57ddfd6c5febbc63e041ab4cd
b2c0b523523d616e8675a26fae3d2e16ca52f3c2
ClaraGehm/8823D-2020-2021-VEX
/Codes in Use/milfordSkills/milSkillsCompSkill/src/main.cpp
C++
cpp
23,296
no_license
/*----------------------------------------------------------------------------*/ /* */ /* Module: main.cpp */ /* Author: C:\Users\David ...
03072fb4b880f55c65195edd5ddaa62591b882bf
fc67445bb90ed7f9c1f270f289a9c9212f057560
mukul1em/Cpp-tutorial
/2D arrays/spiral2dtraverse.cpp
C++
cpp
911
no_license
#include<iostream> using namespace std; int main(){ int n,m; cin>>n>>m; int arr[n][m]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>arr[i][j]; } } cout<<"Resulted array:\n"; int row_start=0, row_end=n-1, col_start=0,col_end=m-1; while(row_start<=row_end...
ff87443e66ad352cfd01d74f5617eca8fab92563
9b64e1ea4d3f5d0ac21d1f8efe6384104ab2a2e1
robertmuth/Cwerg
/CpuA64/opcode_test.cc
C++
cc
1,548
permissive
/* This test is NOT equivalent to opcode_test.py It only checks the encoding of certain immediate fields. */ #include "CpuA64/opcode_gen.h" #include "Util/assert.h" #include <cstdint> namespace { using namespace cwerg; void CheckEncodeDecode() { uint32_t count = 0; uint32_t sm = 0; for (uint32_t size...
2791b5849055da17f1e7cea46594b89e3bc8b50a
1f22605c4c8d6070e3bd3b1774cc671fc5c9af8f
brunolauze/MonoNative
/MonoNative/mscorlib/System/Runtime/InteropServices/mscorlib_System_Runtime_InteropServices_CriticalHandle.cpp
C++
cpp
1,714
permissive
#include <mscorlib/System/Runtime/InteropServices/mscorlib_System_Runtime_InteropServices_CriticalHandle.h> #include <mscorlib/System/mscorlib_System_Type.h> #include <mscorlib/System/mscorlib_System_String.h> namespace mscorlib { namespace System { namespace Runtime { namespace InteropServices { //...
96fba51c52f8f448a79030a750a1b8045ef9a002
0a49ccc1b65614df90dbdbb90062b4c1123f115a
kdu027/CPPTest
/128_LongestConsecutiveSequence.cpp
C++
cpp
705
no_license
class Solution { public: int longestConsecutive(vector<int>& nums) { unordered_map <int, bool> used; for (auto i:nums) used[i] = false; int longest = 0; for (auto i:nums){ if (used[i]) continue; used[i] = true; int length = 1; //向后找 ...
c84eb0a12eb6f8f99c882aab4bc0d098674d196a
74f36ef3f6cf1da4000afd09a40b1a1b1b8e6744
vampiredia/BXF
/src/XLUEWebKernel/BrowserObjectLuaHost/LuaBoltBrowserObject.cpp
C++
cpp
648
no_license
/******************************************************************** /* Copyright (c) 2013 The BOLT UIEngine. All rights reserved. /* Use of this source code is governed by a BOLT license that can be /* found in the LICENSE file. ********************************************************************/ #include "stdafx.h...
eba12de0eff1f9a43a8d59a24624d47f9bda6db6
bb70537935509f98bb05ab12a4f29d985718e7c0
NeoniteDev/Osmium
/Osmium/SDK/FN_S_Water_Shallow_2x5_classes.hpp
C++
hpp
665
no_license
#pragma once // Fortnite (4.5-CL-4159770) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass S_Water_Shall...
289faecd303df269fe8926c1512315798822f209
c5a52a90094d3d27516ea32d283f87214d959699
ptolmachev/brainstem_simulation
/src/output/code_objects/neurongroup_5_stateupdater_codeobject.cpp
C++
cpp
7,583
no_license
#include "code_objects/neurongroup_5_stateupdater_codeobject.h" #include "objects.h" #include "brianlib/common_math.h" #include "brianlib/stdint_compat.h" #include<cmath> #include<ctime> #include<iostream> #include<fstream> #include<climits> ////// SUPPORT CODE /////// namespace { template < typename T1, ...
81e7e72617e44bcab9a32f793e2091a02a7f33f5
3adc76b7ca4e100a50a307d1f4f505b9c725875a
william1099/CP
/527A-plypper.cpp
C++
cpp
229
no_license
#include <bits/stdc++.h> using namespace std; int main() { long long int a,b,count=0; cin>>a>>b; while (a>0 && b>0) { if (a>=b) { count+=a/b; a=a%b; } else { count+=b/a; b=b%a; } } cout<<count<<endl; }
65e969597ae833795d8e37131fbc93b7b6b4de24
3055a373b3703dcf73cfd89434ce9be29618f130
ParadoxGameConverters/Vic2ToHoI4
/src/OutHoi4/Military/OutRegimentType.cpp
C++
cpp
267
permissive
#include "src/OutHoi4/Military/OutRegimentType.h" #include <ostream> std::ostream& HoI4::operator<<(std::ostream& out, const RegimentType& regiment) { out << "\t\t" << regiment.type << " = { x = " << regiment.x << " y = " << regiment.y << " }\n"; return out; }
3e538fa3030a885017de56e8eebd0d5dfec02fa8
ddf137828513c4095611d68c3f7e051ba165b882
Life4gal/UDRefl
/src/test/09_lifecycle/main.cpp
C++
cpp
691
permissive
#include <UDRefl/UDRefl.h> #include <iostream> using namespace Ubpa; using namespace Ubpa::UDRefl; struct Point { Point() { std::cout << "Point ctor" << std::endl; } ~Point() { std::cout << "Point dtor" << std::endl; } float x, y; }; int main() { ReflMngr::Instance().RegisterTypeAuto<Point>(); ReflMngr::I...
a5eda07b382192287a4ce518f2498749fcb12290
f33c902be099a2200c757833abd6517ba27339ee
effeect/CreativeProjects2
/src/AssetManager.cpp
C++
cpp
854
no_license
#include "AssetManager.h" AssetManager::AssetManager(Manager* man) : manager(man) { } AssetManager::~AssetManager() { } //Function to get the texture with a name/ID. I couldn't dirrectly emplace ofImage into the map //texture.emplace(id, texture_load.load(path)) <<--- doesnt't work //It works this way tho void Ass...
5c6a206060c7c9a1bf40ce8d53f9caebadb27275
75b96bcb76b4138c006cd5650a1990d1d7131a57
jordanleex13/raytracer
/src/scene_object.cpp
C++
cpp
8,935
no_license
/*********************************************************** Starter code for Assignment 3 Implements scene_object.h ***********************************************************/ #include <cmath> #include <iostream> #include "scene_object.h" bool UnitCylinder::intersect(Ray3D& ray, const Matrix4x4& ...
fd7b443e428a26d5699e850555cda8d5ffb6f358
4f4a07b86fa032ed9d74003ac7c4ba6d9c9ae4a9
OKullmann/oklibrary
/ComputerAlgebra/Satisfiability/Lisp/Reductions/plans/DP-Reductions.hpp
C++
hpp
1,703
no_license
// Oliver Kullmann, 15.6.2008 (Swansea) /* Copyright 2008, 2012 Oliver Kullmann This file is part of the OKlibrary. OKlibrary 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 and included in this library; either ver...
7cc3e698624d96a8619720f610d5e22db048b209
649631834dc154deba6e4adc1166ab1042d59952
openvinotoolkit/model_server
/src/test/tfs_rest_parser_row_test.cpp
C++
cpp
27,979
permissive
//***************************************************************************** // Copyright 2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.ap...
ddd650ed0f82f809beaeca0fb52d4e9b84c8ef0f
c1aa293b9a44fdd877aa40ec6a36b1d83053dee9
weberhong/leetcode
/Linked-List-Cycle/main.cpp
C++
cpp
1,332
no_license
/*************************************************************************** * * @file main.cpp * @author Hong Gengwei(honggengwei@gmail.com) * @date 2014/11/03 * @brief * **************************************************************************/ /* * https://oj.leetcode.com/problems/linked-list-cycle/ *...
4ee705d8abff9106c8e5b31260a8958335c3af45
345a077e321865144eabb1fb66fe1d0251413bb9
thuanvh/tensorflow
/tensorflow/compiler/xla/service/service.cc
C++
cc
49,803
permissive
/* Copyright 2017 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...
fba9086f7a88c25f1fc19ac9f067acef1781d8e8
12a21f9ecca09d170222d578f46037c026f60710
marromlam/lhcb-software
/LHCb/Kernel/Relations/src/InstanceCounter.cpp
C++
cpp
3,780
no_license
// $Id: InstanceCounter.cpp,v 1.3 2008-02-29 17:46:30 ibelyaev Exp $ // ====================================================================== // Include files // ====================================================================== // ST D& STL // ===================================================================...
41a530cc84435c21982b2ca554d2736f20303420
760039ab20d4eeeab8a0d290627792c48acd9b4d
CPPGuruBBD/Boot-Camp-CPP
/Keshan/Statements/statements_2.cpp
C++
cpp
371
no_license
// statements2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> int main() { using namespace std; int examples(0); cout << "How many examples do you have?" << endl; cin >> examples; cout << "Here are two more. "; examples += 2; cout << "Now you have " << ...
ff1e7d90a2658d783db879d12b2e38f356830cb2
14df1bdb87f9f472288088fe9b72ba9655fc5fc3
lionemilio95/PokemonPark
/CSE167_final/Model.hpp
C++
hpp
12,794
no_license
// // Model.hpp // CSE167_final // // Created by Yan Sun on 12/2/18. // Copyright © 2018 Yan Sun. All rights reserved. // #ifndef MODEL_H #define MODEL_H #define GLFW_INCLUDE_GLEXT #ifdef __APPLE__ #define GLFW_INCLUDE_GLCOREARB #else #include <GL/glew.h> #endif #include <GLFW/glfw3.h> // Use of degrees is deprec...
ab45a1a6628778e4dcc10a727800ba8f59111a5d
fc739b8a4c1d020e45ebc139044941dd267cc971
mausimus/ags
/Engine/ac/global_screen.cpp
C++
cpp
4,968
permissive
//============================================================================= // // Adventure Game Studio (AGS) // // Copyright (C) 1999-2011 Chris Jones and 2011-20xx others // The full list of copyright holders can be found in the Copyright.txt // file, which is part of this source code distribution. // // The AGS ...
5243b61dd4d9ff8f8f2334cd46352396e90a6101
e88b7b3371668b877efa0d8e56bc60d51ae885ce
hiteshkansal/Karumanchi
/ch3/p38.cpp
C++
cpp
1,632
no_license
#include "linkedlist.h" /* node* getkplusone(int k, node *head) { node *kth=head; int i=0; if(!head) return head; while(kth&&(i<k)) { kth=kth->next; i++; } return kth; } int hasnode(node *head,int k) { int i; for(i=0; head&&(i<k);i++,head = head->next); ...
1c8652ea873f93135da29fd0f5c866a5e51d6a73
f35360f247ec900143ffd4ea24388d93b153b47d
GaoYifanGHB/qtP
/draw/debug/moc_first_opengl.cpp
C++
cpp
2,098
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'first_opengl.h' ** ** Created: Sun Aug 13 16:22:47 2017 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.3) ** ** WARNING! All changes made in this file will be lost! **********************...
a40aa9e289b6c5c4f3449050d12ec5efed8f9a8b
2a4b53f32a93461fdcd22604dc4a7f6a42055fc6
bitzonecoin/bitzonecoin
/src/qt/obfuscationconfig.cpp
C++
cpp
2,596
permissive
#include "obfuscationconfig.h" #include "ui_obfuscationconfig.h" #include "bitcoinunits.h" #include "guiconstants.h" #include "init.h" #include "optionsmodel.h" #include "walletmodel.h" #include <QKeyEvent> #include <QMessageBox> #include <QPushButton> #include <QSettings> ObfuscationConfig::ObfuscationConfig(QWidge...
768e616948cbf3374d7bd2bbc4780a8a0b6d32ee
3a394e7266da43ff1af483db2706d29e5dd4c105
fpelliccioni/RuntimeCompiledCPlusPlus
/Aurora/Systems/RocketLibSystem/RocketLibSystemGLFW.cpp
C++
cpp
3,845
no_license
/* * This source file is part of libRocket, the HTML/CSS Interface Middleware * * For the latest information, see http://www.librocket.com * * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and assoc...
b6f32a58c205a1ceea3c8feb5da83fc72254e35b
8614bb4a5a5f1b73b617289f11b6d7f5309ced71
siconos/gazebo-siconos
/gazebo/physics/bullet/BulletPhysics_TEST.cc
C++
cc
9,462
permissive
/* * Copyright (C) 2012-2016 Open Source Robotics Foundation * * 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...
c804e427b71ac031b2bcf9f9fd98f4bc06d1ca78
046e060fdf81cf1b57c435d9e2872a0c2bcd5b24
xaqq/RouxOS
/includes/PrintEngine.hh
C++
hh
761
no_license
#pragma once #define TVIDEORAM ((u8*)0xB8000) #define LINESIZE (80 * 2) #define SCREENSIZE (LINESIZE * 25) class String; class PrintEngine { public: enum Color { /* Values for setAttr(bool, char, bool, char) */ Black = 0b000, Blue = 0b001, Green = 0b010, Cyan = 0b011, Red = 0b100, Ma...
e4dbe8d7f7ecb536cfd7f61c57f7d25180b71357
5ae9aa44242a657363655decd5b11c58dd011885
camaro1200/GraphProject
/GraphProjectC++/main.cpp
C++
cpp
1,786
no_license
// // main.cpp // GraphProjectC++ // // Created by Paul Shaburov on 7/1/20. // Copyright © 2020 Paul Shaburov. All rights reserved. // #include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; const int MAXN = 1e6; vector<vector<pair<int, int>>> v; vector<int> dist; vector<...
d8ecb83ec763bebbd0d888ecc5e2503a2074f268
13f301fe2cce1034ba849f1116b22f66106071fe
MarouaneMan/cv4faces_course
/week3/cpp/fastWebcamFLD.cpp
C++
cpp
4,685
no_license
/* Copyright 2017 BIG VISION LLC ALL RIGHTS RESERVED This code is made available to the students of the online course titled "Computer Vision for Faces" by Satya Mallick for personal non-commercial use. Sharing this code is strictly prohibited without written permission from Big Vision LLC. For licensing and ...
5a148bd7907d3a0ab6dbf267ace47ce3ec9af767
aceaf6690260d19498449703bee70957a2de1a10
MiracleCity/MiracleCity
/src/script/sigcache.cpp
C++
cpp
3,363
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Copyright (c) 2017-2019 The Raven Core developers // Copyright (c) 2020 The Miracle Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licen...
8faef94c30d4e67761040393de2cb876add5aef6
35189d136200c9796169e185cab5b90eb104daea
varshitabhat/aps
/dpauxilar.cpp
C++
cpp
271
no_license
#include <iostream> using namespace std; int binarycoeff(int n,int k) { if(n==k || k==0) return 1; else return binarycoeff((n-1)*(k-1),(n-1)*(k)); } int main() { int n,k; cin>>n; cin>>k; binarycoeff(n,k); }
21cfed9c341599d98f605c94eae3b55774700843
e6bb201ac938f2cd8f0557c7dc6b88538b66da28
crusadesoflouis/algoritmos-y-estructuras-de-datos-3
/tp2/aux/parser.cpp
C++
cpp
2,640
no_license
#include "parser.h" #include <iostream> #include <math.h> using namespace std; //la idea es que llamen a las matrices de ady inicializadas vacias y se carguen aca //otro dato de color es que el nodo "1" se guarda en la posicion 0, es decir el nodo i va en la posicion i-1 void getInputEj1(vector <vector < int > > &di...
8aaf8c511e1a792060a5e9a8b6e44d51dff4e3bd
ff6a2a5112fdb944cc07600c2ab94b8420850fc9
synesissoftware/STLSoft-1.10-delta
/test/component/platformstl/filesystem/test.component.platformstl.filesystem.properties_file/test.component.platformstl.filesystem.properties_file.cpp
C++
cpp
18,381
permissive
/* ///////////////////////////////////////////////////////////////////////// * File: test.component.platformstl.filesystem.properties_file.cpp * * Purpose: Implementation file for the test.component.platformstl.filesystem.properties_file project. * * Created: 17th May 2009 * Updated: 3rd Novemb...
a14027c7e7c84a962f6352a15037a7207427dd0a
98d95a5c52f18c99417df65c6dc89ca5bfbe0efa
shammo18/Sports-Programming
/ChessKnight.cpp
C++
cpp
7,278
no_license
//Bismillahir Rahmanir Rahim #include<bits/stdc++.h> using namespace std; int dx[] = {2,1,2,-1,-2,-2,1,-1}; int dy[] = {1,2,-1,2,1,-1,-2,-2}; //ll ncr(long long n,long long r){if(n==r)return 1;if(r==1)return n;if(dp[n][r]!=-1)return dp[n][r];return dp[n][r]=ncr(n-1,r)+ncr(n-1,r-1);} // bit manipulations //bool ...
23079f15af7b8291ebe96dd29c642f34b26ed014
81dbafe19630f295dd47f7b4365d08a0705f9a5e
blowery/phantomjs
/src/qt/src/gui/kernel/qeventdispatcher_qws.cpp
C++
cpp
4,906
permissive
/**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** ...
83e08567940c983f35083571ed42708826f9339b
0121a9d298108c03b3e0a4913a2a2eccc117be4c
scvalex/visigoth
/visigoth/quadtree.cpp
C++
cpp
6,221
no_license
#include <cmath> #include <stdexcept> #include <iostream> #include "vtools.h" #include "quadtree.h" // The size of the smallest quadrants. static const int BASE_QUADRANT_SIZE = 30; inline static int pow2(int exp) { return 1 << exp; } inline static int calculateWidth(vreal longestEdge) { // Make the width so...
ac2c9ac92676066bb36b159c0ee3f7261b19a3f7
879132fc99ca5f723662ecf99de5673f79012423
romix/cquery
/src/utils.cc
C++
cc
15,660
permissive
#include "utils.h" #include "platform.h" #include <doctest/doctest.h> #include <tinydir.h> #include <loguru/loguru.hpp> #include <algorithm> #include <cassert> #include <cctype> #include <fstream> #include <functional> #include <iostream> #include <locale> #include <sstream> #include <unordered_map> #if !defined(__...
721f858619f76188b923572677afbf7bdd1ca85c
a784ebb2d21f9c11bd0dcc9162ba195c0822f9b8
laky55555/objektno_programiranje
/10. sat/m.cpp
C++
cpp
6,269
no_license
#include "m.h" #include <cstddef> #include <iomanip> #include <sstream> #include <typeinfo> #include <assert.h> #include <stdlib.h> Datum::Datum(std::string str) { m_dan=prvi_broj(str); std::size_t found = str.find(":"); str=str.substr(found+1); m_mjesec=prvi_broj(str); found = str.find(":"); st...
860fb8a8e1433a657ec74f3286738a305abbc6af
2dd3201fe6cc60195bc8c153e105df1fd5802369
Epitech-Lyon/qt-engine
/libraryobjects/includes/engine/widget/combobox/EFontComboBox.hpp
C++
hpp
230
no_license
/* ** EPITECH PROJECT, 2020 ** qt-engine ** File description: ** EFontComboBox */ #pragma once #include "Object.hpp" #include <QtWidgets/QFontComboBox> namespace libraryObjects { typedef Object<QFontComboBox> EFontComboBox; }
af3d5bbbba590da946a9eb6b4ab8cb0c8c06ff4d
e47d45be6b64a00e396076020e9fd1c534d38ad2
Deepjyoti-Sarmah/Data-Structure-and-Algorithms
/Deque/implementation.cpp
C++
cpp
361
no_license
#include<iostream> #include<deque> using namespace std; int main(){ deque<int> dq; dq.push_back(1); dq.push_back(2); dq.push_front(3); dq.push_front(4); for(auto i : dq){ cout<<i<<" "; }cout<<endl; dq.pop_front(); dq.pop_back(); for(auto i : dq){ cout<<i<<" ...
962a5cb7f59bdf2467d5b3dd9dcef259d87d5f31
58a9bdaac3a276f56d2afeb5f9b7d4c473b9d083
HarvardAgileRoboticsLab/drake
/drake/examples/Valkyrie/test/robot_state_encoder_decoder_test.cc
C++
cc
14,355
permissive
#include "drake/examples/Valkyrie/robot_state_encoder.h" #include "drake/examples/Valkyrie/robot_state_decoder.h" #include "gtest/gtest.h" #include "drake/common/drake_path.h" #include "drake/common/eigen_matrix_compare.h" #include "drake/math/quaternion.h" #include "drake/multibody/parsers/urdf_parser.h" #include "d...
279ec26c2bae0f1815bdac0587c04e771eb8e4bd
dcbdecb688cab30597e62a44639a43a790c24b79
RadyGo/newton-dynamics
/newton-4.00/sdk/dCore/dPerlinNoise.cpp
C++
cpp
5,940
permissive
/* Copyright (c) <2003-2019> <Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * includi...
ae87c245a4a25093baaa7477535bb57ece7ea88e
8e2b63961faa0c2f14e61450c71195cee3caaa0e
SinaRaoufi/Jewel-Castle
/include/Game.hpp
C++
hpp
370
permissive
#ifndef GAME_IG #define GAME_IG #include <SFML/Graphics.hpp> #include "configs.hpp" #include "States/GameState.hpp" #include <array> typedef std::array<GameState*,NUMBER_OF_STATES> StateList; class Game { public: Game(); void init(); void run(); private: sf::RenderWindow mainWindow; GameState* c...
4897cf7269f198679561ec01a914ee1bd5a000b0
e299e9f23bb848334e7777c244d31f1bed6b76c4
Warp-12/phd_tools
/exerciseStroustrup/part_5/cwiczenie12/cwiczenie12.cpp
C++
cpp
2,241
no_license
#include "std_lib_facilities.hpp" #include "Simple_window.hpp" #include "Graph.hpp" #include <iostream> bool isprime (int arg) { int x = 1; for (int i = 2; i < arg; ++i) x = (x*i)%arg; return (x == arg-1); } class twin { static int offset, a, b, N; static double m, n; public: static void set_c...
21b1f197e4fa9bad144cd4f992231f6c73691cec
eb728a58787e9c3380b95accebc52366c4a49f16
GXhua/puno
/.libs/puno_automatic_generated/inc/types/com/sun/star/script/provider/XScriptProvider.hpp
C++
hpp
1,508
no_license
#ifndef INCLUDED_COM_SUN_STAR_SCRIPT_PROVIDER_XSCRIPTPROVIDER_HPP #define INCLUDED_COM_SUN_STAR_SCRIPT_PROVIDER_XSCRIPTPROVIDER_HPP #include "sal/config.h" #include "com/sun/star/script/provider/XScriptProvider.hdl" #include "com/sun/star/script/provider/XScript.hpp" #include "com/sun/star/uno/XInterface.hpp" #inclu...