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
ac73ce40ae9af6ad0e4e482f7eb8d04598a872d8
1c5ee02ce292a81856542a0c473ac3536694d0e2
sauleddy/C_plus
/leetcode/306_AdditiveNumber/main.cpp
C++
cpp
565
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: eddy * * Created on April 14, 2017, 2:33 PM */ #include <cstdlib> #include <iostream> #include ...
8f33cba2239a72733ec73db3ac1b9e9de7185470
565c7d2ae15fa7191f455e0910aca20fcaed77ee
ZackAshM/UHMComputationalPhysics
/7 Euler and Runge-Kutta Diff Eq/harmoscRK4.cpp
C++
cpp
2,334
no_license
// simple harmonic oscillator using Euler's method // P. Gorham, updated March 2013 for UH Physics 305 #include <iostream> #include <iomanip> #include <fstream> #define USE_MATH_DEFINES #include <cmath> #include <cstdlib> using namespace std; #define Tmax 50 // seconds for integration extern double FRK4xv(int...
4960f668e4c3b8523b158d9d3a076d4f1468bfda
92943b74f53fd651cfb1a463a0994070c624f94f
yangjiang123/possumwood
/src/libs/actions/detail/nodes.cpp
C++
cpp
7,169
permissive
#include "nodes.h" #include <dependency_graph/node_base.inl> #include <dependency_graph/nodes_iterator.inl> #include <dependency_graph/network.h> #include "../app.h" #include "tools.h" #include "connections.h" #include "metadata.h" namespace possumwood { namespace actions { namespace detail { namespace { bool isC...
354f1f1e6ff2b8af314b2e68a14483273cdf0e9f
a3d0879ec5740a2f143e7f8c3238096415759b27
upperwal/valhalla
/src/loki/search.cc
C++
cc
35,577
permissive
#include "loki/search.h" #include "baldr/graphconstants.h" #include "baldr/tilehierarchy.h" #include "loki/reach.h" #include "midgard/distanceapproximator.h" #include "midgard/linesegment2.h" #include "midgard/util.h" #include <algorithm> #include <cmath> #include <iterator> #include <list> #include <unordered_set> u...
4d075740f4104ec6674b2bfe8c438ab1ff25261a
ab216d55016f17348be3caabb8bedff0d77bf231
theoremprover-museum/OSHL
/arithmetics.cpp
C++
cpp
1,855
no_license
/* * Author: Hao Xu */ #include <string.h> #include "arithmetics.h" // global data // problem specific maximum function symbols dimension unsigned int MaxFunctionSymbolDimension; // number of function symbols of a given dimension unsigned int NumberOfFunctionSymbols[MAX_FUNCTION_SYMBOL_DIMENSION + 1]; // num...
7a516977f8cfbb1c138f64be9c34e21180a68c86
1c807d5da2d4ec1c5cb56ea967c043afa473c6ca
sysrqb/chromium
/ui/base/ui_base_features.cc
C++
cc
1,143
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/base/ui_base_features.h" namespace features { #if defined(OS_WIN) // Enables stylus appearing as touch when in contact with digitizer. cons...
77bb9ab6a40c64af231c639b26a55196b36796f5
dc2d4d21d91544fe170961ec47792ff6decbdb13
nwjs/chromium.src
/printing/backend/cups_printer.cc
C++
cc
11,606
permissive
// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "printing/backend/cups_printer.h" #include <cups/cups.h> #include <cstring> #include <string> #include <utility> #include "base/memory/raw_ptr.h" #include "base/str...
e24ff2f27b9a586a1f6c2b6a535e6f4934b8bf08
5ff82b09e30bc39142ee1d6b741bd6717a9ff87f
jfmherokiller/TheOuterWorldsSdkDump
/Indi/SDK/Indi_Gorillian_AnimBP_structs.hpp
C++
hpp
329
no_license
#pragma once // TheOuterWorlds SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "Indi_Basic.hpp" #include "Indi_CombatEnum_classes.hpp" #include "Indi_Indiana_classes.hpp" #include "Indi_Engine_classes.hpp" #include "Indi_AnimGraphRuntime_classes.hpp" namespace SDK { } #ifdef _MSC_VER #pragma pack(pop...
770017efccc0ffbbbd98833504aca127da1cd2e5
87246306fa682d8b16c15e65599894de44267ecd
nilipta/cpp-mvc-functional
/StudentView.cpp
C++
cpp
407
no_license
#include "StudentView.h" #include <iostream> using namespace std; namespace mvc { StudentView::StudentView() { } StudentView::~StudentView() { } void StudentView::printStudentDetails(Student S) { cout << "Student :" << endl; cout << "Name : " <...
6370ad6761c8e3f002f324635e9a79307ed8fdc5
b42ccd0fc8cda9051e743c9cae0b093e7a97bce4
mysterious-29/cp
/CodeChef/CHFNFRN.cpp
C++
cpp
1,134
no_license
#include <bits/stdc++.h> #define MAX 1100 using namespace std; int arr[MAX][MAX]; vector<int> x1, x2; int main(){ int t; scanf("%d", &t); int n, m, i, x, y, temp, flag, j, l, k, found, p; while(t--){ scanf("%d %d", &n, &m); for(k = 0; k < n; k++){ for(j = 0; j < n; j++){ arr[k][j] = 0; } } f...
d175aa964aff5ab9b9de8087d7bc134434c24030
5ed79b06f98ef53eb67821f9f1cb698e9635b28d
SCOTT-HAMILTON/RobotsWar
/src/Commands/VarSetCommand.cpp
C++
cpp
1,345
permissive
#include "Commands/VarSetCommand.h" VarSetCommand::VarSetCommand(ScriptBlock &block, const std::string &_expr, const std::string &var) : ScriptCommand(block, "varset"), expr(_expr), varname(var) { strings.insert(std::pair<std::string, std::string>("expr", expr)); strings.insert(std::pair<std::string,...
16b2d490f981be798daf93024e25aa44e4543c69
900a4dc9234c0cfce2812357971d2b92b0ff7e55
tuckerc/combatTournament
/Shadow.cpp
C++
cpp
2,117
no_license
/************************************************************************* ** Program Filename: Shadow.cpp ** Author: Chase Tucker ** Creation Date: 7/23/15 // Last Update: 10/1/19 ** Description: This file provides the implementation for the Shadow class ** Input: none ** Output: none *********************************...
5e03ba6c123f948f47ea73f81a9dc355c39a08d1
4fdf0419cf3aafd25aed655fe37028b18752b338
MKEcoin/mkecoin
/tests/trezor/tools.cpp
C++
cpp
2,169
permissive
// Copyright (c) 2014-2018, The MKEcoin 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 retain the above copyright notice, this list of ...
82e0ff1f19a3f7f7a5f510df7e2fb3ca057f9cab
0a97895fea2d623d4a6f380a12b238443896c79f
thehomosapien/AMLBitcoin
/src/zmq/zmqpublishnotifier.cpp
C++
cpp
5,734
permissive
// Copyright (c) 2015-2016 The Bitcoin Core developers // Copyright (c) 2017 The AmlBitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chain.h" #include "chainparams.h" #include "streams.h" #includ...
23f327b69717f8ca8801d4d32293b6821ba9e26d
f8a70b14f979576795c8ce9cd832adb193457926
Neodabara/Java
/Java/Brock HW#10/main.cpp
C++
cpp
216
no_license
#include <cstdlib> #include <iostream> #include "TimeOfDay.h" using namespace std; int main(int argc, char *argv[]) { TimeOfDay tod1; system("PAUSE"); return EXIT_SUCCESS; }
209582a988ed495e98ba34a4ca43d405587b4775
893f3530d31b0bd17bb712a87037491fd8503178
Bendabir/LO21
/UTComputer/UTComputer/literal.cpp
C++
cpp
4,543
no_license
#include "literal.h" ostream& operator<<(ostream& f, const QString& str){ f << str.toStdString(); return f; } ostream& operator<<(ostream& f, const Literal& l){ f << l.toString(); return f; } bool Literal::isNumber() const { return isInteger() || isReal() || isRational(); } // Permet d'implément...
03ef25885bd299739c5b282afc3bbce1f849c2bc
ea2e0d226ae58029a193dd2c6ac2f45dd4631e69
rituraj07/Advance-Data-Structure-Algorithm-CPP
/Dynamic Programming/maxProfitJobScheduling.cpp
C++
cpp
1,352
no_license
class Solution { public: static bool comp(pair<int,int> a,pair<int,int> b) { if(a.first==b.first) return a.second<b.second; return a.first<b.first; } int fn(vector<int>& st, vector<int>& et, vector<int>& p,int i,int n,int s,map<pair<int,int>,int> &m) { if(i>=n) ...
0ee915f6e0820f08215a0bd0e70873f64a8242ce
c9035ebbcc22158b1eeb44d38a10cf54e884078f
NilsHolger/cppplayground
/Documents/Visual Studio 2013/Projects/cppplayground/cppplayground/numerics.cpp
C++
cpp
749
no_license
#include "headers.h" using namespace std; #define M_PI 3.14159265358979323846 //auto main() -> int //{ // cout << "max integer is " << numeric_limits<int>::max() << '\n'; // // cout << sin( M_PI/ 2) << '\n'; // // vector<int> v{ 1, 2, 3, 4, 5, 6 }; // next_permutation(v.begin(), v.end()); // for (auto i : v){ cout << ...
746221390905f88b313575088a4030791c9cf454
4e1814a2e0fb3646e79762c3357924be93dff9ef
sanskar1307/algorithms
/ExtraLongFactorial.cpp
C++
cpp
2,261
no_license
#include <bits/stdc++.h> using namespace std; // Complete the extraLongFactorials function below. void extraLongFactorials(int n) { int i; if(n<21) // for all numbers upto 20, this is the easier approach { unsigned long long fac=1; for(i=1;i<=n;i++) fac = fac * i; cout ...
b698bf4c2b89fab38b87a6c7b9bf61e2169277e3
f9c62527c8fbde788a09d72270d42f7afd7c145c
xuj428/Algo2013_Final
/faceTracker/src/Boid.cpp
C++
cpp
1,187
no_license
// // Boid.cpp // Flocking // // Created by Charlie Whitney on 10/20/13. // // #include "Boid.h" Boid::Boid() { damping = 0.99; } Boid::Boid( ofVec2f position, ofVec2f velocity) { pos = position; vel = velocity; damping = 0.99; p.loadImage("yellow.png"); //p.loadImage("yeah.png"); size...
50ba5832b9545c809297334c8c357ae442fce212
53d97b4392b832b375ddc4628c8df7692eba425e
mister51213/EscapeNY
/DX11_Framework_custom/COMHandler.cpp
C++
cpp
461
permissive
/************************************************************************ Added a COMHandler class, all it does is initialize the COM interface when the System class is created and UnInitializes it when the System class is deleted. *************************************************************************/ #include "C...
c7d9239b774b5149d39893199c1eede6a9980024
78d629d3e0e47562dd8e04f96cc52677d61da412
LloydSSS/LintCode-LeetCode
/hash-function.cpp
C++
cpp
619
no_license
// http://www.lintcode.com/en/problem/hash-function/ // Magic Number is what? #include "lc.h" class Solution { public: /** * @param key: A String you should hash * @param HASH_SIZE: An integer * @return an integer */ int hashCode(string key,int HASH_SIZE) { long long base = 1; ...
0eb7c40278b376ab75f02467833c747e5df050cb
1d74182a581c3f6b7d5deb509ca0e5732bba6e1a
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_PrimalItemResource_ApexDrop_RockDrake_classes.hpp
C++
hpp
916
permissive
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemResource_ApexDrop_RockDrake_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //-----------------------------------...
dbbf00396a99383e54cf491f4a1f5dd1401b7e20
63a344cd74d48ff8276b437a6e8310af99361139
msk4862/Operating-System-Programs
/consumer.cpp
C++
cpp
460
no_license
#include<sys/shm.h> #include<fcntl.h> #include <sys/mman.h> #include<cstdio> #include<iostream> using namespace std; int main() { const int s = 1024; const char *name = "OS"; int shm_fd; void *ptr; while( (shm_fd = shm_open(name, O_RDWR)) < 0 ); cout<<"\n\tConsuming.....\n"; ptr = mmap(0, s, PROT_READ, MA...
2c561fad5af7d58ffd4efdca207bae07c79bb593
d252ced60d67bb597c82df7fc66945f75b0be3c0
Ngoguey42/ftconstexpr
/Vertex.hpp
C++
hpp
1,606
no_license
// ************************************************************************** // // // // ::: :::::::: // // Vertex.hpp :+: :+: :+...
3640c141c77b07333a33a59765b78eeb2cd864ce
30f0c44da0fba3f3dd77482e66638f5f4da82e95
wangbichao/dual_camera_x
/vendor/mediatek/proprietary/hardware/mtkcam/legacy/platform/mt6735m/v1/hal/adapter/MtkEng/Preview/MtkEngCamAdapter.Preview.cpp
C++
cpp
7,975
permissive
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or ...
70d7100c0873d95a5efa7573e0282c6a9ef6ef34
963bc5f955bfbac5d9b652c641edd6feb724f161
sc2ad/BeatSaber-Quest-Codegen
/include/GlobalNamespace/PackedPlayModeBuildLogs.hpp
C++
hpp
8,464
permissive
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: System.ValueType #include "...
87eb399bcbb56b1ed6378b1340bb5fbf54856041
1beac1e3c6829e23ba1245e57e77c1e2a7b4b29d
MedicaicloudLink/Rosetta
/main/source/src/protocols/docking/DockingPrepackProtocol.cc
C++
cc
10,952
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
b54b7d5daaff182e1baaf333bfd8590e36b6fb95
2e240e756358aa7a9f8bdf1540f38b0549567674
angelmotta/CompetitiveProgramming
/UVA/problem_100.cpp
C++
cpp
765
no_license
#include <iostream> int cycle_length; long long int algo(long long int n){ if(n == 1){ return cycle_length; } else{ if(n%2 != 0){ cycle_length++; return algo(3 * n + 1); } else{ cycle_length++; return algo(n/2); } } } int main() { int i, j, temp; while(std::cin >> i >> j){ int max = 0, ...
5ce5a7556ec7622de2b53b7e125c06dba45c88a3
c7a30969733778a91c934b8adcb71f8bd4b5679b
arc80/plywood
/repos/plywood/src/runtime/ply-runtime/container/Hash128.cpp
C++
cpp
9,191
permissive
/*------------------------------------ ///\ Plywood C++ Framework \\\/ https://plywood.arc80.com/ ------------------------------------*/ // Spooky Hash // A 128-bit noncryptographic hash, for checksums and table lookup // By Bob Jenkins. Public domain. // Oct 31 2010: published framework, disclaimer ShortHash...
bf0797a6f029d9e576419bea94cab9a9239a2012
076eeac36ff47110e07fecbd93ddbba1a3a524b5
NeilAlishev/ArchHack
/ArchHack/Temp/il2cppOutput/il2cppOutput/Bulk_UnityEngine.UnityWebRequestModule_0.cpp
C++
cpp
43,911
no_license
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include <stdint.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" #include "object-in...
2ade63c8e6bd54fad18df7d28f1f0a996f8c64ea
484c41edf3ee8c338167baf358330694cd5260bf
Orb-H/nojam
/source/nojam/1520.cpp
C++
cpp
1,841
no_license
#include <iostream> #include <queue> using namespace std; typedef struct _pos { int h; int y; int x; } pos; typedef struct _compare { bool operator()(pos a, pos b) { return a.h < b.h; } } compare; int main() { int n, m; int board[500][500]; int cases[500][500] = {0,}; int...
80ebf0d3a272386c87e0869760de1b40aeadf1d8
3c27f974a474a2eb501638f2f3c8b3ce26e1001d
BlenderCN-Org/spacegameengine
/plugins/opengl/src/check_state_once.cpp
C++
cpp
1,719
no_license
/* spacegameengine is a portable easy to use game engine written in C++. Copyright (C) 2006-2016 Carl Philipp Reh (carlphilippreh <at> gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation...
cd41dc8b4535dc8cb5bcb0353d9387c43c434f68
5b66d0807d02c96c7060165bc29513fbe8318021
thewolfwillcome/unrimp
/Renderer/OpenGLRenderer/src/Linux/ContextLinux.cpp
C++
cpp
13,489
permissive
/*********************************************************\ * Copyright (c) 2012-2013 Christian Ofenberg * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including ...
8dbdb6fb39cc6f039c6f2250aa677853bd03b4d6
f28b04d222ca839936ea6ced1e0fa1936a6b4b7a
splucs/Competitive-Programming
/Codeforces/Rounds/965/D.cpp
C++
cpp
744
no_license
#include <bits/stdc++.h> using namespace std; #define MAXN 100009 #define MAXM ((1e+18) + 100) #define MOD 1000000007 #define INF (1<<30) #define EPS 1e-9 #define FOR(x,n) for(int x=0; (x)<(n); (x)++) #define FOR1(x,n) for(int x=1; (x)<=(n); (x)++) #define pb push_back #define all(x) x.begin(), x.end() typedef pair<int...
8defec135c50e1c925f96f44ff04238375c5dc82
54d5f71fc0e4f553d2fe17cf3b54ba50030e0f9a
gvvynplaine/chrono
/src/demos/pyparser/demo_PY_parser.cpp
C++
cpp
4,876
permissive
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
7964e2792559b6e4a12bc76b6f8cb5756887cdf6
79772e32b51d74529619bc4937d40ed686915e74
Koki-Yamaguchi/competitive-programming
/codeforces/1324/d/a.cpp
C++
cpp
2,187
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; (i) < (int) (n); (i) ++) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define dump(x) cerr << #x << " = " << x << '\n'; using ll = long long; template<typename T> ostream& operator << (ostream& os, vector<T...
93bf9c57c74658a2436036059bde1dc0d1845aed
f26d1c838798fe781229c385ebbf34cbc634805f
yesunhuang/Cluster-expansion-approach-for-quantum-calculation
/dev_new/ClusterTool/ClusterTool/common.cpp
C++
cpp
3,750
no_license
#include "common.h" namespace ayaji { LabelSeq Common::mul(const LabelSeq& label1, const LabelSeq& label2) { int len1 = label1.size(); int len2 = label2.size(); LabelSeq ret; if (label1.front() == 0) { ret.assign(label2.cbegin(), label2.cend()); return ret; } else if (label2.front() == 0) { ret.a...
72fe11a92b957836f01947aa3d5435c09d71a45f
a75f62035207b1f41bb5a9e88dd9ee7d5cfacf19
dsx0511/Hackerrank
/30 Days of Code/Day 10: Binary Numbers/solution.cpp
C++
cpp
571
no_license
#include <bits/stdc++.h> #include <stack> using namespace std; int main() { int n; cin >> n; cin.ignore(numeric_limits<streamsize>::max(), '\n'); stack<int> bin; do { bin.push(n % 2); n = n / 2; } while (n != 0); int max = 0, current = 0; while(!bin.empty()) { ...
cb7d97b3b0359d4a97a6e95e982d4b84b143fa88
4e6baf9825ad7ad138b53432c599c70c66a53fba
jiverson002/efika-perf
/src/apss/bench_apss.cc
C++
cc
9,021
no_license
// SPDX-License-Identifier: MIT #include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <memory> #include <stdexcept> #include <string> #include <sstream> #include "celero/Celero.h" #include "efika/apss.h" #include "efika/core.h" #include "efika/io.h" #ifdef HAS_REF_L2AP # include "l2ap/i...
c7819ef386bae4cbc147a049fd5f71ab473614ae
0efbbfd1054d18e6fe218d8e87d4d1e98f26fc63
warrenween/Elastos
/Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/provider/CTelephonyMms.cpp
C++
cpp
3,540
permissive
//========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ...
3451c3ca8c706a54bd7b292b0d238a5306c89be3
b2f84e83a7510105d21037254fcf7e1e8b34dde9
micmacIGN/micmac
/MMVII/src/Serial/ElemStrToVal.cpp
C++
cpp
36,928
permissive
#include <map> #include "MMVII_util.h" #include "MMVII_enums.h" #include "MMVII_Stringifier.h" #include "cMMVII_Appli.h" #include "MMVII_DeclareCste.h" /** \file uti_e2string.cpp \brief Implementation enum <=> string conversion Probably sooner or later this file will be generated automatically. Waiting for t...
64a5c40fcfcce103f6fe05c473f171d4d2ca6995
9421653b4dc8be2e7ef27117daeedb500ff07568
Pix4D/OpenMesh
/src/OpenMesh/Apps/Subdivider/qtsubdivider.cc
C++
cc
4,015
permissive
/* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen University * * ...
4e547a12a7018c5e5d7e29676b3b85793efa4d91
2b7a33d49707e45b154bdce9e6b116e3a0b4d55b
roccodimaio/ProjectGama
/ProjectGamma/Source/ProjectGamma/SpawnVolume.cpp
C++
cpp
1,432
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "SpawnVolume.h" #include "Components/BoxComponent.h" #include "Kismet/KismetMathLibrary.h" #include "Engine/World.h" #include "BasicEnemy.h" // Sets default values ASpawnVolume::ASpawnVolume() { // Set this actor to call Tick()...
198e6d269c5e4ff20abc23d8f126406b1c9e73d8
eebdf32ee2053256676e7b0cc76a54dc0516e9ee
WasserEsser/magnum
/src/Magnum/Test/MultisampleTextureGLTest.cpp
C++
cpp
15,614
permissive
/* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Vladimír Vondruš <mosra@centrum.cz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to d...
e6f33ff7f260717786f7886b5babd87affad6aa6
b029666f6993193e5b57281d9c330d5f26b7779d
BRAINSia/BRAINSTools
/BRAINSConstellationDetector/src/BRAINSConstellationDetector.cxx
C++
cxx
6,790
permissive
/*========================================================================= * * Copyright SINAPSE: Scalable Informatics for Neuroscience, Processing and Software Engineering * The University of Iowa * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file excep...
6f03e5d5b04cb1b73e1e10de85ced349dfe17e70
cd5bea4291224093eaa8eac5026d529c54feeb37
joegoldin/jak-project
/goalc/compiler/compilation/Function.cpp
C++
cpp
25,159
permissive
/*! * @file Function.cpp * Calling and defining functions, lambdas, and inlining. */ #include "goalc/compiler/Compiler.h" #include "third-party/fmt/core.h" namespace { /*! * Get the preference to inline of the given environment. */ bool get_inline_preference(Env* env) { auto ile = get_parent_env_of_type<WithIn...
a6ccb0ebe1c44280d683c5b0cfe27b46b67358f3
1dd51b44fb12a4edd9721e9d4a28359bd2ed542b
lunarpulse/stm32template
/common/src/isr_callbacks.cpp
C++
cpp
1,722
permissive
/* * Wrapper to allow executing ISR callbacks belonging to C++ objects. */ #include "isr_callbacks.h" // -------- Generic helpers --------- struct CallbackData { IsrCallbackFunc f; void* arg; }; void registerCallback(CallbackData& cb, IsrCallbackFunc f, void* arg) { // Check if callback is already registere...
f36e054de30f42843f3128e3758f9002dfd79cb1
441a6adeef76dc204634428b5ded3426ee0fff3c
Canciller/tlpi
/chapter5/exercises/exercise_5_7.cpp
C++
cpp
3,383
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <unistd.h> #include <fcntl.h> #include <cerrno> ssize_t readv(int fd, const iovec *iov, int iovcnt) { if(!iov) { errno = EINVAL; return -1; } if(iovcnt <= 0) { errno = EINVAL; return -1; } printf("rea...
85ef4b1178d6dc10cf3f9d98b776a050a6be76e4
86c3f3decb26ec6cee20716892f0b0f502f7585e
mingz2013/study-cocos
/cocos_bak/testgozapreader_bak/frameworks/js-bindings/gozap/bindings/auto/jsb_gozap_auto.cpp
C++
cpp
6,447
no_license
#include "jsb_gozap_auto.hpp" #include "cocos2d_specifics.hpp" #include "gozap.h" template<class T> static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { JS::RootedValue initializing(cx); bool isNewValid = true; if (isNewValid) { TypeTest<T> t; js_type_class_t *typeCl...
f1eab93631b852b0f97b08f3b7105a9b32d85f4a
f9c72fe6be570c56c6d96b71a8786181bdf2c4a4
sdo-ops/WebPageTest-mirror-
/agent/browser/ie/pagetest/PageSpeed/pagespeed/html/minify_js_css_filter.cc
C++
cc
5,197
permissive
// Copyright 2010 Google Inc. 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 applicabl...
d54cb192bfe0bcd10cef93c181b355b8a89e2305
a8997ba41dbb4b4715b2939ca49081eb7dfd34df
TYJt18/C-
/(3).cpp
C++
cpp
892
no_license
#include<iostream> #include<time.h> using namespace std; int main() { int y, m, d, sum, leap, i, k; char e; cout << "please enter the date of the day" << endl; cin >> y >> e >> m >> e >> d; switch (m) { case 1:sum = 0; break; case 2:sum = 31; break; case 3:sum = 59; break; case 4:sum = 90; break; ...
65c13c641019ce78719dbb734825a33dbaa46e22
79cb2035f6e2cac493dc60ae61aab967a6b1bd89
damian-szulc/BLDC-driver
/GUI/mainwindow.cpp
C++
cpp
22,244
no_license
/**************************************************************************** ** ** Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com> ** Copyright (C) 2012 Laszlo Papp <lpapp@kde.org> ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtSerialPort module of the Qt Toolkit. ** ** $QT_BEGIN...
00ce0f1473a7173a75ccecb07a07b5d00d2683ad
06bee39d8b45d666bb1038a6b04361ce233695f2
Bit-Net/VpnCoin-BitChain
/src/checkpoints.cpp
C++
cpp
25,457
permissive
// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/foreach.hpp> #include "checkpoints.h" #include "t...
44ed7cc44454f79a0a8c05cc58ca193cc387c4a7
6592151472337398f3877c7a96ae4f8f8af1bfb8
ViveStudiosCN/vulkan-openvr-sample
/Sample-Programs/Hologram/ShellWin32.cpp
C++
cpp
6,099
permissive
/* * Copyright (C) 2016 Google, 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 law or agree...
e5ce84b307a478ea76df158973e3c2a41bb14fea
e490d14d98b215e0cc4a9f0b73322ba58a0dbedd
gfh16/Geant4
/examples/extended/persistency/P03/src/ExTGDetectorConstructionWithSD.cc
C++
cc
3,841
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
708669b5efdb549ae320ad5d9d2383ce74859ae8
63cabd83c2ae0aa880719017b01d9fdd0f8c00e9
jannson/BPI-1296-Android7
/android/external/deqp/external/vulkancts/framework/vulkan/vkAllocationCallbackUtil.hpp
C++
hpp
7,920
permissive
#ifndef _VKALLOCATIONCALLBACKUTIL_HPP #define _VKALLOCATIONCALLBACKUTIL_HPP /*------------------------------------------------------------------------- * Vulkan CTS Framework * -------------------- * * Copyright (c) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may no...
9dd8aed6d5792dd4bb8e3300012a8bff77982eaf
b807223b8337139a17f5d5c24540c88562840cc6
mahbub389/cse_202
/string_processing-1.1.cpp
C++
cpp
975
no_license
#include<bits/stdc++.h> using namespace std; typedef long long LL; const int MX=1000000; int main() { string S,T,USR; S = "JOHN PAUL JONES"; T = "A THING OF BEAUTY IS A JOY FOREVER"; cout<<S<<endl<<T<<endl; cout<<"Index of 'JO' in S = "<<S.find("JO")+1<<endl; cout<<"Index of 'JO' ...
9b9cfbb35a6bc88427343be3e49950d390c2ed7e
558bb6fd78c2c4fc2bcee93b5df5db6f35ba364e
HemiMin/llvm-project
/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
C++
cpp
26,084
permissive
//===- lib/CodeGen/GlobalISel/GISelKnownBits.cpp --------------*- C++ *-===// // // 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 // //===------------------------------...
55c00f0adbeff620f278fa2b135693df03678faf
7eeb9d85cd8141d1d2b21f5f2da411d4b96259a7
raminhalavati/WhiteNote
/Source/MainFrm.cpp
C++
cpp
1,604
no_license
// MainFrm.cpp : implementation of the CMainFrame class // #include "stdafx.h" #include "WhiteNote.h" #include "MainFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMainFrame IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) ON_WM_CREATE() END_MESSAGE_MAP() static UINT in...
befac592c0e715fbeacef98d1d1b748381970005
fb7c9403ec60d0c9a808ff48f4cc61b2facebcb4
Sifum/C-plus-plus-Learn
/第二十二章lambda表达式/判断整除.cpp
C++
cpp
1,641
no_license
#include <iostream> #include <algorithm> #include <vector> #include <list> using namespace std; //c++11 //通过捕获列表接受状态变量的lambda表达式 //判断一个数字能否被另一个数字整除 int main() { vector<int> vecIntegers; cout << "The vector contains the following sample values: "; for(int nCount = 25; nCount < 32; ++nCount) { vecInt...
02f39ae485acd4e3a799caa6b0208c1c077a2a86
ae97ef5302373ac6a91b26ddce5495411649be84
yang123vc/OpenGS1
/include/gs1/common/ConstantTable.hpp
C++
hpp
1,209
permissive
#ifndef GS1COMMON_CONSTANTTABLE_HPP #define GS1COMMON_CONSTANTTABLE_HPP #include <gs1/common/Util.hpp> #include <algorithm> #include <string> namespace gs1 { struct ConstantKey { ConstantKey(int index) : index(index){}; int index; }; template <typename T> class ConstantTable { public: struct Constant { C...
9f3197b733fa87f2bf78dd870c037ab18e38adfc
837dd40b0e3a87b4976e8ea06dc99676bd66b3dd
YutoTaketi/YTBikeGame
/GameTemplate/Game/Kyakuseki.cpp
C++
cpp
987
no_license
#include "stdafx.h" #include "Kyakuseki.h" #include "graphics/SkinModel.h" Kyakuseki::Kyakuseki() { m_model.Init(L"Assets/modelData/Kyakuseki.cmo"); //静的物理オブジェクトを作成 m_phyStaticObject.CreateMeshObject(m_model, m_position, m_rotation); //法線マップをロード DirectX::CreateDDSTextureFromFileEx( g_graphicsEngine->GetD3DDev...
fe246ffac10a2c8914b4c28c35bf906d14355c87
1ba8102988550be82e98501f253a3899b9ebba3f
PaddlePaddle/models
/tutorials/mobilenetv3_prod/Step6/deploy/inference_cpp/src/cls.cpp
C++
cpp
3,190
permissive
// Copyright (c) 2020 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...
f863bece553419e237fddadf8274b43959f86987
f707445392590a4e500c00298a1374724624ffac
Rakhoonkim/forager
/skill.cpp
C++
cpp
2,932
no_license
#include "stdafx.h" #include "skill.h" skill::skill() { } skill::~skill() { } HRESULT skill::init() { _startX = WINSIZEX / 2 - 190; // 스킬 타일의 X 시작점 _startY = WINSIZEY / 2 - 190; // 스킬 타일의 Y 시작점 _tileSize = 80; // 80 크기 _skillPoint = 0; _offsetX = 0; _offsetY = 0; skillSetting(); return S_OK; } void ...
3c4be46306a044da9dc14b1a3f13974780094209
e35ee0027ad68b0d5b42d340888e6fb9ac1b9cc6
lucaspimentel/dd-trace-dotnet
/profiler/src/ProfilerEngine/Datadog.Profiler.Native.Windows/Windows64BitStackFramesCollector.cpp
C++
cpp
15,053
permissive
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2022 Datadog, Inc. #include "Windows64BitStackFramesCollector.h" #ifdef BIT64 #include <cinttypes> #include <winnt...
17ada0d62c6c370a1b9dc10d442ff8ac7106ad2b
c8d5a54da270336d5fe99c8e5ef04dcc07a60134
ozcankarabacak/crimes_in_chicago
/src/decisiontree.cpp
C++
cpp
3,453
no_license
#include <decisiontree.h> #include <iostream> namespace chicago_crime { double information_gain(CrimeDataPack& l, CrimeDataPack& r, double impurity){ /* information gain calculations with gini impurity * {https://en.wikipedia.org/wiki/Decision_tree_learning} */ double p = double(l.size()) / (l.size(...
5cabebf634411425f2922f0502297b52e55f5344
96336579876b191651e7c3e6a89baf914327cea4
icprog/lindenis-v536-softwinner
/eyesee-mpp/awcdr/apps/cdr/source/bll_presenter/remote/dev_ctrl_adapter.cpp
C++
cpp
1,708
no_license
/* ******************************************************************************* * Copyright (C), 2001-2016, Allwinner Tech. Co., Ltd. * *******************************************************************************/ /** * @file dev_ctrl_adapter.cpp * @brief 设备公共控制适配器接口实现类 * @author id:826 * @version v0.3 * @...
d041e9ca735b378f781ff8449f7b7defcb9a3ded
a2405349ebb7bb991d5d4b36b4b6afba3743398d
zenoalbisser/chromium
/third_party/skia/gm/lcdblendmodes.cpp
C++
cpp
6,269
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. */ /* * Tests text rendering with LCD and the various blend modes. */ #include "gm.h" #include "SkCanvas.h" #include "SkGradientShader.h" #include "SkSurface.h" namespace s...
e5398a45eca969b4a82afa064a26a181863b7678
7e2158c3eca71d1be2ceecbbccdb542c43821def
Cascades/PyMesh
/tools/Triangulation/ShewchukTriangle/ConformingDelaunay.cpp
C++
cpp
695
no_license
/* This file is part of PyMesh. Copyright (c) 2016 by Qingnan Zhou */ #ifdef WITH_TRIANGLE #include "ConformingDelaunay.h" #include <Core/Exception.h> #include <Triangle/TriangleWrapper.h> using namespace PyMesh; void Triangle::ConformingDelaunay::run() { TriangleWrapper triangle; triangle.set_points(m_point...
f2f5939903fd91ab6e0dacc469f90f913f7cb614
d3a5f6d8210a0bb470512f969f97b902804bee7e
Alpish-Jain/Computer-graphics-algorithms
/boundary fill/main.cpp
C++
cpp
813
no_license
#include<iostream> #include<graphics.h> #include<dos.h> using namespace std; void boundaryfill(int x,int y,int fill_color,int boundary_color) { if(getpixel(x,y)!=boundary_color && getpixel(x,y)!=fill_color) { putpixel(x,y,fill_color); boundaryfill(x+1,y,fill_color,boundary_color); boundaryfill(x,y+1,f...
772bf2b653c26fdf750781efb421c254823948e7
55ec3b28371f0d166b86bb07fb103798b28864ea
RevengeOS/android_system_bt
/stack/hid/hidd_conn.cc
C++
cc
30,577
permissive
/****************************************************************************** * * Copyright 2016 The Android Open Source Project * Copyright 2002-2012 Broadcom Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
70231a4d951e9de616d2142b6a13352f86ab0465
9ca409e3359483bed835c31cc0c2d38b6743be96
Pink-Dragon-Labs/DnGServerSource
/global/ipc.cpp
C++
cpp
251
no_license
/* interprocess communication (ipc) class library author: Stephen Nichols */ #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <poll.h> #include <limits.h> #include <sys/time.h> #include "system.hpp" int gMaxConnectCount = 2000;
0f3903b05f3b50c36d3b5563d9b8ef58d65a7dc6
9ae48a90ba875ab9e5a376fb29dd93c7e68992a1
ailyanlu/ACM-ICPC-9
/套题/2015多校/2015 MUTC 9/1005.cpp
C++
cpp
846
no_license
#include<map> #include<string> #include<cstring> #include<cstdio> #include<cstdlib> #include<cmath> #include<queue> #include<vector> #include<iostream> #include<algorithm> #include<bitset> #include<climits> #include<list> #include<iomanip> #include<stack> #include<set> using namespace std; typedef long long ll; int a[1...
c4456081828b11342340171dea0a18f141d1ed48
9cb0287bb8123f81ba30bd3c89c863373c5033f0
william-dawson/NTPoly
/Source/CPlusPlus/RootSolvers.cc
C++
cc
1,026
permissive
#include "RootSolvers.h" using namespace NTPoly; //////////////////////////////////////////////////////////////////////////////// extern "C" { #include "RootSolvers_c.h" } //////////////////////////////////////////////////////////////////////////////// namespace NTPoly { //////////////////////////////////////////////...
532e14914fa54dc7696a8f28ed59a6adbeae25d1
6e163ade5b4b00a5cb089da9619496195c39a9eb
erwincoumans/swiftshader
/third_party/SPIRV-Tools/test/fuzz/transformation_add_relaxed_decoration_test.cpp
C++
cpp
5,040
permissive
// Copyright (c) 2020 Google LLC // // 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 agreed to ...
6f1789e0e78b7248c9b79fecfb7f12585e8c5bd3
398ebeddff67afd17488adbf36f19043ea97e9b3
stevemarple/FLC100_shield
/software/FLC100/FLC100.cpp
C++
cpp
8,328
no_license
#include <limits.h> #include <avr/power.h> #include <Arduino.h> #include <FLC100.h> FLC100::FLC100(void) { ; } FLC100::I2C::I2C(void) : state(off), axis(0) { } bool FLC100::I2C::initialise(uint8_t pp, uint8_t adcAddressList[numAxes], uint8_t adcChannelList[numAxes]) { powerPin = pp; pinMode(powerPi...
2ae3e6e3545e5a06d2da5d9300f1b398c545f6fe
5d1f7642895e95b5f29c56052d252a9316705f35
Pavelius/pixart
/platform/nix_io_file.cpp
C++
cpp
2,229
no_license
#include <cstdio> #include <unistd.h> #include "crt.h" #include "io_stream.h" void printcnf(const char* text) { fwrite(text, 1, zlen(text), stdout); } io::file::file() : handle(0) { } io::file::file(const char* url, unsigned flags) : handle(0) { create(url, flags); } io::file::~file() { close(); } io::file::fin...
659ed643e1c0d0790e3270bd21f34d2093c19261
e18c89ed0752d1957b960a2222c0bb8d06315a75
karlchina2008/LeetCode
/271. Encode and Decode Strings.cpp
C++
cpp
1,404
no_license
/* Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list of strings. Machine 1 (sender) has the function: string encode(vector<string> strs) { // ... your code return encoded_string; } Machine 2 (receiver) has the fun...
26ea537acab8d80a591058a625068ecff5a6835c
be97e7ac943391f151b01ff69281a9f7965963b3
Benjamindutta/practice_questions
/recur_backtrack/ladder_problem.cpp
C++
cpp
1,402
no_license
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define pii pair<int,int> #def...
99ccd284c882d975a6d945cc20e65c9fcb9b0538
42ef0253029207cba8b6c1b97c5d83f0bf8b977e
greenfox-zerda-sparta/tataiferenc89
/week-06/day-03/task-01/task-01.cpp
C++
cpp
565
no_license
#include <iostream> #include <string> using namespace std; template <class T> T return_first_element(T *array) { return array[0]; } int main() { // create a function template the takes in a fix long array and prints the 1st element of it int array_int[5] = {32,24,35,44,51}; cout << return_first_element...
1fef0ccc4ced1530a3a1d6d31646e7947e5c49e3
b73323722fbe544ffaf783458d430e6e32f4ee47
alpineondev/rsdo-gfp
/src/slovar.cpp
C++
cpp
9,907
no_license
#ifdef _VISUALC_CE_PH_ #include "stdafx.h" #endif #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <math.h> #ifdef _BORLANDC_ #include <io.h> #include <dir.h> #include <conio.h> #include <dos.h> #endif #if defined (_VISUALC_) #include <io.h> #elif defined (_VISUALC_CE_) #include <wce_io.h> #include <...
81970e0aad3a54535a9a172c64316ef35289f0ab
bf2d8c70ec4b5c19ec4494b162c308bf8a744cc2
Esvux/QtBisonFlexCalculadora
/scanner.cpp
C++
cpp
46,081
no_license
#line 2 "scanner.cpp" #line 4 "scanner.cpp" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we dea...
7ee35895cde1b8e70db6a8dd768deaed2eddf1a3
f60d08f6df0ae86752ac759a737568ac32d5876b
adnan333bd/youtube
/leetcode/april-2020-challenge/11-diameter-of-binary-tree.cpp
C++
cpp
746
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { pair<int,int> dfs(TreeNode* root) { // (diameter, depth) if(root == NU...
cd082b7506ee8e247104941dc65d05b9abd75179
04eb3f0b8bf021eab7a03f710ddf47d80111cffe
timblechmann/boost.simd
/include/boost/simd/function/definition/bitinteger.hpp
C++
hpp
1,038
permissive
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //===========================...
3d5601ecbac37a5ca6e179a5972c0c1ae7f605b8
700479b6adbd6fcc167c388d4725177db4814254
nashiong/cantera
/cantera/branches/hdf5/src/thermo/ThermoFactory.cpp
C++
cpp
28,594
no_license
/** * @file ThermoFactory.cpp * Definitions for the factory class that can create known %ThermoPhase objects * (see \ref thermoprops and class \link Cantera::ThermoFactory ThermoFactory\endlink). * */ // Copyright 2001 California Institute of Technology #include "cantera/thermo/ThermoFactory.h" #includ...
86b0e47e7c90db57f001b3ef7d1b1729c4cde4f2
b5c100c83f4e1ee684a9a9e2fdefd9c122b8fa27
351642983/LittleWindowTools
/src/Math_design/shutdown.cpp
C++
cpp
9,858
no_license
#include "shutdown.h" #include <QtGui> ShutDown::ShutDown(QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) { if (objectName().isEmpty()) setObjectName(QString::fromUtf8("ShutDown")); setFixedSize(264, 261); setWindowFlags(Qt::WindowMinimizeButtonHint); QIcon icon; icon.addPixmap(QPixm...
fca8945d2e4c2ef3a370d3dd76b2c846b887f99f
d1695b374fa384767d380008d03dfe1a583c8bd0
sligocki/busy-beaver
/cpp/src/lazy_beaver_enumerator.cpp
C++
cpp
2,576
no_license
#include "lazy_beaver_enumerator.h" #include <fstream> #include <iostream> #include <set> #include <string> #include "enumerator.h" #include "simulator.h" #include "turing_machine.h" #include "util.h" namespace busy_beaver { LazyBeaverEnum::LazyBeaverEnum(const long max_steps, const ...
54d33fc81e82a8e9542124927d355151b5b46688
4d4378a0519c50f4e0ce3432358fcea97eeb0b79
kkumar86/ep-engine
/access_scanner.cc
C++
cc
4,178
permissive
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #include "config.h" #include <iostream> #include "ep_engine.h" #include "access_scanner.hh" class ItemAccessVisitor : public VBucketVisitor { public: ItemAccessVisitor(EventuallyPersistentStore &_store) : store(_store), ...
a5163ddc66538f2a624189da21f62f9cb2391c49
5f6614eb411202fe19fccfe91aeada68fa894270
seblef/ShadowEngine
/Core/IFileSystem.cpp
C++
cpp
1,147
no_license
#include "IFileSystem.h" using namespace Core; bool IFileSystem::hasPath(const string& fileName) { bool path=false; for(int c=0;c<fileName.length();++c) path|= (fileName[c]=='\\' || fileName[c]=='/'); return path; } bool IFileSystem::extractPath(const string& fileName, string& path) { int c=f...
1b3dec3c68a09d93b14df1df36238cb0c5ee9617
a6c467e16d56f79be228d0e8b357c56128ee1883
qqsun8819/iree
/iree/modules/check/check_module_main.cc
C++
cc
7,503
permissive
// Copyright 2020 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
31352ae84fef42505ab32f3c6f5677409bc2f1fe
596e5d1039b1f3a5eca397803ddbb3d4f0e7469c
Cabba4/Queues
/Round5/Round_5_exercise_1/queue.cpp
C++
cpp
2,191
no_license
#include "queue.h"" Queue::Queue() /* Post: The Queue is initialized to be empty. */ { count = 0; rear = maxqueue - 1; front = 0; } bool Queue::empty() const /* Post: Return true if the Queue is empty, otherwise return false. */ { if (front == -1) return count == 1; ...
18ee72a42317013b1d9a89d2d537a4af64b26402
1e9ca4e7a67b8b4556eb3d38a0baebe1dda847cd
DLR-TS/gdal
/ogr/ogrsf_frmts/pgdump/ogrpgdumpdriver.cpp
C++
cpp
7,949
permissive
/****************************************************************************** * * Project: OpenGIS Simple Features Reference Implementation * Purpose: Implements OGRPGDumpDriver class. * Author: Even Rouault, <even dot rouault at spatialys.com> * *************************************************************...
e034118ab1c39f990ea5ed911dcc68a627cd2129
e1d3aa09a4f82fcf0b4e7cefa5855a589c3df94b
MTASZTAKI/ApertusVR
/core/sceneManager/network/3rdParty/raknet/Source/NatPunchthroughServer.cpp
C++
cpp
20,937
permissive
/* * Copyright (c) 2014, Oculus VR, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #include ...
381d172dee64085a340a5a02a0f4b0244d54c23a
03fe35204eb4dd78969b520b4a62a1643d11ea71
Lopiano/CompTest
/Source/EnvFollower.cpp
C++
cpp
2,913
no_license
/* ============================================================================== EnvFollower.cpp Created: 25 Feb 2020 12:24:55pm Author: John Caplan ============================================================================== */ #include "EnvFollower.h" EnvFollower::EnvFollower() { ...
96e72c30366c413ffbdf8c7e30f581af20432c2d
0e8a77ae1053082bd75c7c6e86882afeb77e7016
VaishnaviDhulipalla2902/Conwey-s-Game-Of-Life-2
/main.cpp
C++
cpp
422
no_license
#include "SuperGrid.h" #include <iostream> #include <string> using namespace std; int main(int argc, char** argv) { int NR,NC,R,C,k,s; NR = stoi(argv[1]); NC = stoi(argv[2]); R = stoi(argv[3]); C = stoi(argv[4]); k = stoi(argv[5]); s = stoi(argv[6]); SuperGrid supergrid(NR,NC,R,C,k,s); supergrid.generate_in...
9c6e7d1fd9f176f985e4061eeb3cdb18c20da959
fbd53c4d100bccbd7b42e43411717a2fd2fe3b26
jixhua/QQmlQuickBook
/sstd_utility/windows_boost/boost/hana/take_front.hpp
C++
hpp
2,474
no_license
/*! @file Defines `boost::hana::take_front` and `boost::hana::take_front_c`. @copyright Louis Dionne 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_TAKE_FRONT_HPP #define BOOST_HANA_TAKE_FRONT_...
5bf70e963df3eb513ce35e739c818df2d35e589f
9958904bc728fcdcad1fed139ecc82441d67e7fc
rranjik/ideal-octo-barnacle
/307-RangeSumQuery-Mutable.cpp
C++
cpp
1,471
no_license
class FT { vector<int> ft; public: FT(vector<int>& nums){ ft = vector<int>(nums.size()+1); ft[0] = 0; for(int i = 1; i<=nums.size(); i++){ ft[i] = ft[i-1]+nums[i-1]; } for(int i = nums.size(); i>=0; i--){ int p = i - (i & -i); if(p...
bf325be8d1198a96a5ec239a9c556765d92ed96f
59f09d7a59ae89a01a249b92408d20c412629c4b
satyamakgec/BlissBlockchain
/src/qt/optionsdialog.cpp
C++
cpp
8,172
permissive
#include "optionsdialog.h" #include "ui_optionsdialog.h" #include "bitcoinunits.h" #include "monitoreddatamapper.h" #include "netbase.h" #include "optionsmodel.h" #include <QDir> #include <QIntValidator> #include <QLocale> #include <QMessageBox> #include <QRegExp> #include <QRegExpValidator> OptionsDialog::OptionsDi...
c55f2a547972446cc3bda098dabdc1b4d233ac0b
1115d37b718570d967c8b3ad33152133fc014001
thanhchauns2/Rep3
/SoNhoNhat.cpp
C++
cpp
6,183
no_license
// Designed by Nguyen Thanh Chau // a.k.a Linh's servant - Ken // En Taro Adun! - TemplarAssasin a.k.a Zeratul // Libraries #include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> // #include <boost/math/constants/constants.hpp> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/trie_p...