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
58526bd886889a4ee846e9253dda5655c6ee5578
bc57c4d8ddc6a2b4c023e0bdaf89644a252282a9
abbaswasim/SpartanEngine
/Runtime/RHI/D3D11/D3D11_CommandList.cpp
C++
cpp
19,810
permissive
/* Copyright(c) 2016-2019 Panos Karabelas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
6f5684e921f5f0875c751c8b0cdc30ca87e146fa
0d12125467ebe9c7df19841b7ab0e6027e3fcc29
Spladed/string-class
/Project1/源.cpp
C++
cpp
4,537
no_license
#include<iostream> #include<iomanip> using namespace std; struct Srep { char* s; int sz; int n; Srep(int nsz, const char* p) { n = 1; sz = nsz; s = new char[sz + 1]; strcpy(s, p); } ~Srep() { delete[] s; } Srep* get_own_copy() { if (n == 1) return this; n--; retur...
6109b5c74b9f4f261501cb2ef1a04e8d33b4213f
3090a3a1c9cdfcc02612864bd716ef3b096360e3
tuian/pcshare
/界面资源/[XTreme.Toolkit.9.6.MFC].Xtreme.Toolkit.Pro.v9.60/Samples/CommandBars/CustomThemes/ChildFrm.cpp
C++
cpp
2,184
no_license
// ChildFrm.cpp : implementation of the CChildFrame class // // This file is a part of the XTREME TOOLKIT PRO MFC class library. // ©1998-2005 Codejock Software, All Rights Reserved. // // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRES...
efa3d6c3050ac818a7bcb9c02136aeb2a4333baf
966c09cb4956a9b5bad08ab5d25c2c3cdfa5d9b0
excfergodst/dod
/Sandbox/SandboxApp.cpp
C++
cpp
604
no_license
#include "SandboxLayer.h" #include "PhysicsLayer.h" #include "ParticleTestLayer.h" #include "ScriptTestLayer.h" #include <RishEngine.h> #include <EntryPoint.h> class Sandbox : public rl::Application { public: Sandbox() : rl::Application("Sandbox", 1920, 1080) { RL_PROFILE_FUNCTION(); pushLayer...
e961d8d3f17c4c43c45ff62b44370bd8dccd5008
d3b0fddbd6c2de1c09739849d5418304fc760215
honzapatCZ/NejCoin
/tests/unit_tests/chacha.cpp
C++
cpp
6,834
permissive
// Copyright (c) 2019-2019, Nejcraft // Copyright (c) 2014-2019, The Monero 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 t...
6fe7651b88ae1c89596d1dd9f252ef8f204ef170
47e39bba9b0dfe18c5a10923def6ac539258327e
ElevatedPitch/ElevatedPitch_FinalApp
/InternTest/hello/hello/hello.cpp
C++
cpp
1,143
no_license
// // hello.cpp // hello // // Created by Rahul Sheth on 4/7/17. // Copyright © 2017 Rahul Sheth. All rights reserved. // #include <stdio.h> #include <limits.h> #include <iostream> int saturating_add(int x, int y) { int w = sizeof(int) << 3; int result; bool value = __builtin_add_overflow(x, y, &re...
3fbff1345bd774d6411cfbc2ce03c915423a19e4
eee09369dc968f33d842dad569209ab4be5aa827
dipperin/llvm
/tools/obj2yaml/elf2yaml.cpp
C++
cpp
22,533
permissive
//===------ utils/elf2yaml.cpp - obj2yaml conversion tool -------*- 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 // //===---------------------------...
a5620984bd0c941625b3b1b99cd2dd28dfaddfe3
88316a22e0699791486c4604c924867ad6b541d8
MainForm/ChessGameInMFC
/Chess/ChessBlock.cpp
C++
cpp
3,897
no_license
#include "pch.h" #include "ChessGame.h" #include "ChessBlock.h" using namespace Chess; ChessBlock::ChessBlock(ChessGame* cg, CPoint pt) : cp(nullptr), ptCG(cg), cpPos(pt),Moveable(false),bCheck(false) { } ChessBlock::ChessBlock(ChessBlock& cb) : cp(nullptr), ptCG(cb.ptCG), cpPos(cb.cpPos), Moveable(false), bCheck(f...
f3bb4a9533d3e922b079ae2065cdd2de5f62c8f7
e8a3ae69e197a180fd658ce0a107cd10b32792b3
b04901066/105-1_DSnP
/b04901066_hw7/src/task/taskMgr.cpp
C++
cpp
3,760
no_license
/**************************************************************************** FileName [ taskMgr.cpp ] PackageName [ task ] Synopsis [ Define member functions for task Manager ] Author [ Chung-Yang (Ric) Huang ] Copyright [ Copyleft(c) 2014-present LaDs(III), GIEE, NTU, Taiwan ] ************...
96a2b720dc7f13194979e8284ae8bafce2a5e85a
7437f7d56ea7b5e3e706eca7df5a6983388c87a4
free25zer/ngraph
/src/ngraph/op/add.cpp
C++
cpp
1,829
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...
a4316efb5c488d2673339a55b957f60aad3e3133
ccbda8df49c0c36acc7df0a808139ef5b0d7d3cd
vnemesin78/Thesis
/tkalman_c/Applications/source/simulate_PKF_data.cpp
C++
cpp
2,057
no_license
#include "lib_PKF.hpp" #include "lib_tkalman_API.hpp" #include "lib_tkalman_simulation.hpp" #include <ctime> int main( int argc, char ** argv ) { if ( argc > 1 ) { if ( ! strcmp( argv[1], "--help" ) || ! strcmp( argv[1], "-H" ) ) { cout << "Help" << endl; cout << endl; cout << " Arg[1] : parameter f...
f276284be4c40889a65d915cb94275b0f3ed7e57
79c14ce844394180a7c670b7c2dc063665757b1a
wuzhuobin/QvtkUtil
/QvtkData/QvtkImageIO_writeITKImage.cpp
C++
cpp
389
no_license
// me #include "QvtkImage.h" #include "QvtkImageIO_writeITKImage.hpp" bool Image::writeITKImage(QStringList paths, vtkImageData* image, const double orientation[3], const double position[3], const double scale[3], vtkMatrix4x4 *userMatrix) { switch (image->GetScalarType()) { vtkTemplateMacro(return writeImage<VTK_...
be650c6a8087c2ac1ae87d058602e8d3df7714ec
25ff4201bbc0fa1c506638688bcd466ab6b1322d
ysei/toppers-jsp-for-linux
/cfg/base/parser.cpp
C++
cpp
44,094
no_license
/* * TOPPERS/JSP Kernel * Toyohashi Open Platform for Embedded Real-Time Systems/ * Just Standard Profile Kernel * * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory * Toyohashi Univ. of Technology, JAPAN * * 上記著作権者は,以下の (1)〜(4) の条件か,Free Software ...
764bf1af5d4077294f7929bd0543d0c1b9510cc9
700870b5b73988a40431d88d195ac591b5bc7c16
Xenland/radard
/src/ripple/rpc/impl/WriteJson.cpp
C++
cpp
2,742
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
ffb045076827883a40539bcd26128c6379a178c0
310b0186496f7c95353633ac7bbf84972fdfc18e
iammarajul/competitive_programming
/Codeforecs/1251C.cpp
C++
cpp
1,360
no_license
#include<bits/stdc++.h> using namespace std; int sc1() {int x; scanf("%d", &x); return x;} long long sc2() {long long x; scanf("%lld", &x); return x;} #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*b)/gcd(a,b) #define Int sc1() #define LL sc2() #define For(n) ...
84a2c1e23b35afa0e192c28693a34e6a403217b6
6be9136961e5e2fa08bf8ee713377dd0c8192a73
Subhash1998/Data-Structures
/binary tree/bottom view of binary tree.cpp
C++
cpp
527
no_license
//using queue and map void bottomView(Node *root) { if(root==NULL) return; int hd = 0; map<int,int> mp; queue<pair<Node*,int>> q; q.push(make_pair(root,hd)); while(!q.empty()) { Node *ptr = q.front().first; hd = q.front().second; q.pop(); mp[hd] = pt...
8eb9b153378efeb48f2c9d0554c5c2bb9114bc06
ff536824774d7e0465c93804b0914b2a3afc9c8d
prijindal/Data-Structures
/binaryTreeNode.cpp
C++
cpp
2,852
no_license
#include <iostream> using namespace std; struct Node { int data; Node* left; Node* right; }; // Binary Search Tree class Tree { Node* root; public: Tree() { root = NULL; } void add(int item) { insert(root, item); } void remove(int item) { removeHelper(root...
31c2bcf5498bfb1e7910b63ccf10380d073b9cd0
e2680adaeeddf5c598a2eb484e6ee03ac229a6d3
JackDrogon/CodingEveryday
/others/utils/cpp/socket/inet_address.cc
C++
cc
1,278
no_license
// Author : Jack Drogon // Mail : jack.xsuperman@gmail.com #include "inet_address.h" #include <cstring> #include <cassert> #include <arpa/inet.h> // #include <endian.h> namespace nepenthe { namespace net { InetAddress::InetAddress(const struct sockaddr_in &address) : address_(address) { } InetAddress::InetAdd...
90a9c03661489dbb29dec52ae3f8f0d655d79eb6
c73e430fa96d9380fb8b8a0f9950f3471f265410
s00144602/A_Star_Threading
/SDLAStar/Cell.cpp
C++
cpp
1,249
no_license
#include "stdafx.h" #include "Cell.h" #include "SDL.h" #include "SDL_render.h" #include "Constants.h" Cell::Cell() { } Point Cell::getGridPos() { return m_gridPos; } Cell::Cell(int x, int y, int size, bool isWall) : x(x), y(y), m_size(size), m_iswall(isWall), m_gridPos(x / size, y / size) { } bool Cel...
e81d86ea94a36089c2a99e282a93cc1db8f07d0c
0fd3c3d7441cfbe63fd4065577749c84d74beddd
ryandugie/Vulkan-Framework
/Project/Vulkan-Framework/Source/Semaphore.cpp
C++
cpp
2,877
permissive
/****************************************************************************/ /*! \Author Ryan Dugie \brief Copyright (c) Ryan Dugie. All rights reserved. Licensed under the Apache License 2.0 */ /****************************************************************************/ /*===============================...
183729ecc9133ae8c7b8c8b391830a54345ab53a
164c3ae36ebda81f0d2371cb04f9e13eca242204
McManning/fro_client
/core/widgets/OpenUrl.cpp
C++
cpp
2,983
no_license
/* * Copyright (c) 2011 Chase McManning * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify,...
94e1e6c6ea2afdf49ada136dd2c735d6aaf8f8e6
27d9264093ba05daed9ff1a208061d07d01e0f35
niuxu18/logTracker-old
/second/download/squid/gumtree/squid_repos_function_4796_last_repos.cpp
C++
cpp
404
no_license
void Parser::BinaryTokenizer::want(uint64_t size, const char *description) const { if (parsed_ + size > data_.length()) { debugs(24, 5, (parsed_ + size - data_.length()) << " more bytes for " << context << description << BinaryTokenizer_tail(size, parsed_)); Must(expectMore_); // thro...
022782adaceef2712bb4da3f8c077cb17bc6a3d0
140c4570f6f267d14f62946706700712d13c6efd
robpieke/gaffer
/src/GafferUI/ViewportGadget.cpp
C++
cpp
50,458
permissive
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012, John Haddon. All rights reserved. // Copyright (c) 2013, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided...
36533b1c2f17dec75f21f4daea817542a871b9ef
757ee2dfacd9cfe0c1ba05d345a971e1802b6784
qzed/avis
/include/avis/glfw/initializer.hpp
C++
hpp
366
permissive
#pragma once #include <vulkan/vulkan.hpp> #include <GLFW/glfw3.h> namespace avis { namespace glfw { class scope_initializer { public: inline scope_initializer(); inline ~scope_initializer(); }; scope_initializer::scope_initializer() { glfwInit(); } scope_initializer::~scope_initializer() { glfwTerminate(); } ...
74ad70f316b38f733ff0aaf50de6cf75619d8a75
32d82088400f1415d33c8c431de8bdc204b820b2
n0nBin4ry/Knowledge-Experience_COSC-Courses
/Cosc220_Computer-Science-II/Lectures and HW/HW1/7.cpp
C++
cpp
1,466
no_license
// // Created by Richard Flores on 2/13/2017. // #include <iostream> using namespace std; // func prototypes void output1(); int input1(); int sort1(int a, int b); int sort2(int a, int b, int c); void output2(int a, int b); const int SENTINEL = 0; // user inputs integers, program outputs the two largest when sentinel...
6d2cc39e895cd46eaf826867abd45a68baa6aba7
da8df7c0dc35fb44f446973eab7a220c5065f62e
kaitai-io/formats-kaitai-io.github.io
/vp8_ivf/src/cpp_stl_11/vp8_ivf.cpp
C++
cpp
2,456
permissive
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild #include "vp8_ivf.h" #include "kaitai/exceptions.h" vp8_ivf_t::vp8_ivf_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, vp8_ivf_t* p__root) : kaitai::kstruct(p__io) { m__parent = p__parent; m__root = this;...
8f657a966cea9ea01d7ce7e002613c4acc94b224
0d34c3089cb9d98d65611cc2bee72c95f0020f61
leothomas77/opengl-experiments
/infraStructure/glfwBasic.cpp
C++
cpp
6,052
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <GLFW/glfw3.h> using namespace std; bool inside = false; /* ************************************************************************* */ /* */ /* *************************...
19b865afae245eceacd82a718aef8a98226ff2b8
fef61864def7992710c6e1f87e3350b308d3c2bc
KqSMea8/sstd_library
/sstd_boost/sstd/boost/interprocess/detail/shared_dir_helpers.hpp
C++
hpp
6,936
permissive
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2007-2014. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/interp...
24944b602c85d58091f7aaad11400972867fcd4e
59e403e79d3c189c45aaca73584ef81fb5412b27
Xen-alpha/emscripten-fastcomp-clang
/lib/CodeGen/ItaniumCXXABI.cpp
C++
cpp
159,749
permissive
//===------- ItaniumCXXABI.cpp - Emit LLVM Code from ASTs for a Module ----===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
50feaa164ed709af064e60faf9b97b9a5e2c480b
a97eee8046694bdb46662c615310bf00ca9f138f
TalonBraveInfo/mirror-nd2
/nebula2/code/nebula2/src/gfx2/nmousecursor.cc
C++
cc
4,163
no_license
//------------------------------------------------------------------------------ // gfx2/nmousecursor.cc // (C) 2004 RadonLabs GmbH //------------------------------------------------------------------------------ #include "gfx2/nmousecursor.h" #include "gfx2/ngfxserver2.h" //-----------------------------------------...
59ccf6c98909322bb5e30a7379dfb9018a4d783b
a2145a3c909fb6bbc531124bd2b2daafcd6195b2
SandorBalazsHU/sdl-bezier-drawer
/road_drawer/RigidBodySimulation/Simulation.cpp
C++
cpp
5,811
permissive
/* GPU accelerated rigid body simulation with OpenGL and OpenCL. Created by: Sándor Balázs - it.sandor.balazs@gmail.com AX400 --- The main simulation object. Simulation initialisation and Input handling. */ #include <ctime> #include "Simulation.h" //Constructor Simulation::Simulation(void) { //Random generator ...
d4d4fb91632e80a7bebe786e7d081a72585374e5
3d7927175cde86ff2ca91c2faa589e2b64b0242a
zjp/hcc
/src/3ac_output.cpp
C++
cpp
5,387
no_license
#include <iterator> #include "ast.hpp" #define MAKEBINOP(OPERATOR) \ Opd* tmp1 = myExp1->flatten(proc);\ Opd* tmp2 = myExp2->flatten(proc);\ Opd* dst = proc->makeTmp(QUADWORD);\ BinOpQuad* b = new BinOpQuad(dst, OPERATOR, tmp1, tmp2);\ proc->addQuad(b);\ return dst; #define MAKEVARWIDTHBINOP(OPERATOR) \ Opd*...
4aed79bd96fc7911f2d0edae7df5ffcb283a9dc7
06b946d866885cb24680bd3931406e8abcb37d42
edweenie123/competitive-programming-solutions
/CF/1095F-Make-It-Connected .cpp
C++
cpp
2,437
no_license
/* ~~~ 1095F - Make It Connected ~~~ Key Concepts: Kruskal's The problem with the BF approach (add all edges to krukals) is that it will TLE and MLE since we have n^2 edges A problem where you have to simplify the problem first to solve it Insight 1: Imagine what the optimal arrangement would be if you didn't ...
fa8e7e2511345b84cc4bd831bf979d3a58b1b38c
8af8dcfcf7c2fff5096e64995019a6aa1d7ccaef
sebastsg/ntnu-bachelor
/core/source/windows_gl.cpp
C++
cpp
6,223
no_license
#include "windows_gl.hpp" #if PLATFORM_WINDOWS && ENABLE_GL #include <glew/glew.h> #include <glew/wglew.h> #include "debug.hpp" namespace no { namespace platform { static void set_pixel_format(HDC device_context_handle) { MESSAGE("Setting pixel format"); PIXELFORMATDESCRIPTOR descriptor = {}; descriptor.nSize ...
981c1c9e1e0de8e58e501feebbd7f2de78c3fa19
0df97ffba913c7838bc2abbf6c893d5d0e648b27
afAditya/Competitive-Coding
/leetNgeeks/450/string/test.cpp
C++
cpp
437
no_license
#include <bits/stdc++.h> using namespace std; /* void demo(bector<int> a, int ind) { }*/ int main() { int n; cin>>n; vector<int> a(n); for(auto &x:a) { cin>>x; } //unordered_set<int> st; set<int> st; int sum = 0; for(int i = 0; i < n; i++) { sum = 0; for(int j = i; j < n; j++) { sum += a[j...
e9700d3376b481529071f96116b256c3cf663cf8
12a449b3a5986a46bf52ff55800d06e730c975cd
eduardoyutaka/lives
/02/examples/idade.cpp
C++
cpp
221
no_license
#include <iostream> int main() { int idade = 26; std::cout << "Esse ano eu fiz "; std::cout << idade; std::cout << " anos" << std::endl; idade = 27; std::cout << "Ano que vem eu vou ter " << idade << " anos"; }
16c46a46cfde4f00f9e6594c083108006a41fc2f
e154b783a666022d1284b2dfd612a14089102274
teble/problem-setting-public
/2017-sichuan/bitwise-range-query/solution.cpp
C++
cpp
1,797
no_license
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdint> #include <utility> #include <vector> const int M = 100000; const int Q = 13; int numbers[M]; uint16_t result[Q]; int main() { int n, m, a, b, q; while (scanf("%d%d%d%d%d", &n, &m, &a, &b, &q) == 5) { assert(m < M); u...
18685f234620d94a31c7441351c06e26e1fb9c0f
83489d8cb583370e5ffb8f48f5224a1c71a2e91c
veldrinlab/researchEngine
/ResearchEngine/CloudExamples/InterpolationType.hpp
C++
hpp
321
no_license
/* * Projekt C-Way * Efekt nieba, chmur i słońca w grze 2D z widokiem z boku * Szymon Jabłoński * pod kierunkiem Tomasza Martyna * Instytut Informatyki * Politechnika Warszawska */ #ifndef INTERPOLATIONTYPE_HPP #define INTERPOLATIONTYPE_HPP enum InterpolationType : int { LINEAR, COSINE, CUBIC }; #endif
b1b609f0d94398b493ac578504fea92f58e6b0db
7efa7b353e4edda516216f137dc71f956a8dae46
sanjaysanjel019/serenity
/Kernel/Net/NetworkAdapter.cpp
C++
cpp
8,651
permissive
/* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * 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 noti...
80c42ce5bd32f3b48adafbc6f2a2df2b115fbbbd
f232d036452d1779f90e690bcc59823a67168ef9
stoneyang-isp/HDRage
/HDR_assign/GeneratedFiles/qrc_mainwindow.cpp
C++
cpp
698
no_license
/**************************************************************************** ** Resource object code ** ** Created: Fri 22. Mar 21:19:15 2013 ** by: The Resource Compiler for Qt version 4.8.3 ** ** WARNING! All changes made in this file will be lost! ***************************************************************...
6e4b009da74beead3d64c5622168104a1a33f788
53473de791563dc14350314cce6672004e818eb1
sonndinh/leetcode
/535_EncodeDecodeTinyURL.cpp
C++
cpp
1,473
no_license
class Solution { private: unordered_map<int, string> keys2; int count = 0; unordered_map<string, string> keys; const string alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ"; string keyGen() { string key; srand(time(nullptr)); for (int i = ...
b007aa9c47a7cce0404b86999a8b7f8db143148d
4257f61293b4ab875f4eeee5590100435e431304
mpsitech/wzsk-Whiznium-StarterKit
/wzskcmbd/CrdWzskUsg/PnlWzskUsgDetail_blks.cpp
C++
cpp
15,353
permissive
/** * \file PnlWzskUsgDetail_blks.cpp * job handler for job PnlWzskUsgDetail (implementation of blocks) * \copyright (C) 2016-2020 MPSI Technologies GmbH * \author Emily Johnson (auto-generation) * \date created: 5 Dec 2020 */ // IP header --- ABOVE using namespace std; using namespace Sbecore; using namespace X...
6a99a5fa72434104f0492c402bdbf96c7b8aa268
bb4f7b2292f81eb9b5241f293f56099d66b14a50
jxlh999/Fantasia
/ACM/3982/7904392_WA.cpp
C++
cpp
1,861
no_license
#include <iostream> #include <memory.h> using namespace std; struct BIG_NUM { int bit_count; int num[501]; }; BIG_NUM sum(BIG_NUM a0, BIG_NUM a1, BIG_NUM a2) { BIG_NUM num; num.bit_count = 0; memset(num.num, 0, sizeof(num.num)); int max_bit = a0.bit_count; ...
473852b337109fb3aea642ee1e59c0fe8ef4c4b9
7fba110946b50e3da571301d61c1accd10373f76
hanqichen/algorithm014-algorithm014
/Week_08/relative-sort-array.cpp
C++
cpp
1,485
no_license
class Solution { public: vector<int> relativeSortArray(vector<int>& arr1, vector<int>& arr2) { unordered_map<int, int> cache; for (int k = 0; k < arr2.size(); k++) { cache[arr2[k]] = k; } quickSort(cache, arr1, 0,arr1.size() - 1); return arr1; } void quic...
4cbd753a33e0a7b6c65ab611b3e5a68f3fc1c590
65db317ca186c4de25e99efb652d915ec489e531
szr712/PAT-Advanced-Level-Practice
/1112.cpp
C++
cpp
1,097
no_license
#include<iostream> #include<algorithm> #include<string.h> #include<string> #include<vector> #include<map> #include<set> #include<cmath> #include<stack> #include<queue> using namespace std; int k; string in, ans; map<char, queue<int>> all; set<char> stu; map<char,bool> flag; int main() { cin >>k>> in; for (int i = ...
aa72abcef75d0f392272550877c8df7ce399aa00
73af0546e67a1d72ee75e6ef9292a6ab945721fc
jedelbo/PEGTL
/src/test/pegtl/file_file.cpp
C++
cpp
400
permissive
// Copyright (c) 2015-2018 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include "test.hpp" #include "verify_file.hpp" namespace tao { namespace TAO_PEGTL_NAMESPACE { void unit_test() { verify_file< file_input<> >(); } ...
b19c04c2bf2489da97a48e706d9302e33e5c170b
0aef9de0a5ccfd75978fb8090754e14b5abe046a
programminggp/2DLV1
/2DLv0/GameProgramming/CPlayer.cpp
C++
cpp
1,914
no_license
#include "CPlayer.h" #include "CShootPlayer2.h" #include "CUI.h" #define VELOCITY 5 #define SHOOTINTERVAL 30 CPlayer* CPlayer::mpInstance = 0;; CPlayer::CPlayer() : mHit(0) , mFont("Font.tga", 1, 64, 16, 33) , mShootInterval(0) { LoadTexture("Player.tga"); mPriority = 1; mTag = EPLAYER; // E...
aea26f40b695a6c90e0f9e915df401d2609a5c10
e8db8c5ec36ca89b0d971a59bdf90ffedb33a7a3
chengniansun/Surelog
/src/parser/SV3_1aSplitterParser.cpp
C++
cpp
41,600
permissive
// Generated from SV3_1aSplitterParser.g4 by ANTLR 4.9.1 #include "SV3_1aSplitterParserListener.h" #include "SV3_1aSplitterParser.h" using namespace antlrcpp; using namespace antlr4; SV3_1aSplitterParser::SV3_1aSplitterParser(TokenStream *input) : Parser(input) { _interpreter = new atn::ParserATNSimulator(this...
f9b5b76a67febd63d299e180d78463cc629f5b6f
a3d006ecacf020fd9d24c1a04a62fe064ac43c3c
quangtung97-study/20172-AI
/include/ai/game/gomoku/SDLWrapper.hpp
C++
hpp
1,898
no_license
#ifndef AI_GAME_GOMOKU_SDLWRAPPER_HPP #define AI_GAME_GOMOKU_SDLWRAPPER_HPP #include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> #include "MatrixRenderer.hpp" #include "AIMover.hpp" #include <memory> #include <string> #include <optional> namespace ai { namespace game { namespace gomoku { class TextRenderer { private: ...
29811749c917595d00781883f86dbae84dba8c8a
12ee2a54d236e691f0ca7632c23945ef4f928147
rnaimehaom/SmartsCompiler
/src/smartsscores.cpp
C++
cpp
15,238
no_license
#include "smartsscores.h" #include "defines.h" #include "util.h" #include <cassert> #include <fstream> namespace SC { double PrettySmartsScores::GetExprScore(const SmartsAtomExpr *expr) { switch (expr->type) { case Smiley::OP_AndHi: case Smiley::OP_AndLo: return std::min(GetExprScore(expr...
34deeb82cbeb3005770fc2926386343980e2b95f
8879e250cf6c59db361e1416e79334ee1739b8db
zjxjwxk/PAT
/C++/Basic Level/B1044.cpp
C++
cpp
1,369
no_license
#include <cstdio> #include <map> #include <string> #include <iostream> using namespace std; string mars1[13] = {"tret", "jan", "feb", "mar", "apr", "may", "jun", "jly", "aug", "sep", "oct", "nov", "dec"}; string mars2[13] = {"tret", "tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mer", "jou"}; ...
ea2aed5d54595480d4eb3a270ccebb9ea45e65a6
c26ad20f94b6326fb19f58bd74a5613f16fc8271
azimafroozeh/duckdb
/src/parser/transform/statement/transform_alter_table.cpp
C++
cpp
2,686
permissive
#include "duckdb/parser/statement/alter_statement.hpp" #include "duckdb/parser/transformer.hpp" #include "duckdb/parser/expression/cast_expression.hpp" #include "duckdb/parser/expression/columnref_expression.hpp" #include "duckdb/parser/constraint.hpp" namespace duckdb { unique_ptr<AlterStatement> Transformer::Transf...
1b8ae46774351fc59b4688da0406d7191faa7cc2
442f7dbde2925d6c5c7e3903fba18633f7fe6958
pkraison/pytorch
/aten/src/TH/generic/THStorageCopy.cpp
C++
cpp
3,120
permissive
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/THStorageCopy.cpp" #else void THStorage_(rawCopy)(THStorage *storage, real *src) { ptrdiff_t i; real *data = THStorage_(data)(storage); for(i = 0; i < storage->numel(); i++) data[i] = src[i]; } void THStorage_(copy)(THStorage *storage, THStorage *src)...
a74d6c91fea9249fa16548269c07c9feb2a46e2f
b9b756294ef2221b149137afb4b0e0f80b1ba040
siddhantmahalle/ChatBot-Memory-Management
/src/chatbot.cpp
C++
cpp
5,560
no_license
#include <iostream> #include <random> #include <algorithm> #include <ctime> #include "chatlogic.h" #include "graphnode.h" #include "graphedge.h" #include "chatbot.h" // constructor WITHOUT memory allocation ChatBot::ChatBot() { // invalidate data handles _image = nullptr; _chatLogic = nullptr; _rootNo...
fd29d8bc1fcc6d0676e192c39b960b43922e883c
66b3c88030db351047276ddba16172d5644a6e7b
BrianRickardMason/TheUltimateStrategy
/Server/include/ConfiguratorHuman.hpp
C++
hpp
2,685
permissive
// Copyright (C) 2010, 2011 and 2012 Marcin Arkadiusz Skrobiranda. // 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 // ...
503939bbcbcce97b2a8f0a0e05e4c5d9094945c6
70866ea6b3f1aac727134fd7289ed379e1890842
zzjfindmyself/C-Interview
/操作系统/main.cpp
C++
cpp
1,012
no_license
#include "a.h" #include "b.h" #include <iostream> #include <string> using namespace std; /*const string &manip(){ string ret; if(!ret.empty()) return ret; else { return "Empty"; } }*/ // string& shorterString(string& s1,string& s2){ // return s1.size()<s2.size()?s1:s2; // ...
2cd9f1ffb590af9f06313c7b2533d78c069ad193
935c9169623a7af7c469e2d28420dde38fb9f988
fvzcoin/fvzcoin
/src/qt/sendcoinsdialog.cpp
C++
cpp
18,350
permissive
#include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" #include "init.h" #include "walletmodel.h" #include "addresstablemodel.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "optionsmodel.h" #include "sendcoinsentry.h" #include "guiutil.h" #include "askpassphrasedialog.h" #include "coincontrol...
2325b09e246045b1eb31b91c695c4c56f80f5c78
6f9e84273d09215e4b1f739c950a12172f5dd6e9
notdatboi/Matrices
/Simulation.cpp
C++
cpp
4,270
no_license
#include"Simulation.hpp" #include<ctime> #include<cstdlib> Simulation::Simulation(): shapes(), transform(3, 3), window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "TEST"), axes(4, sf::Vertex(sf::Vector2f(0, 0), sf::Color(180, 70, 70))) { axes[0].position = sf::Vector2f(-1000, 0); axes[1].position = sf::Vector...
2516a559353b0a0a5a8fa02f6e88e6c77d8dc1d3
17dd51692daad20b2839a86eaab4ed8ce09e88fe
mhunicken/icpc-team-notebook-el-vasito
/geometry/minkowski_sum_test.cpp
C++
cpp
2,963
no_license
// Codeforces gym 104288K - AC // http://codeforces.com/gym/104288/problem/K #include <bits/stdc++.h> #define fst first #define snd second #define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i) #define pb push_back #define ALL(s) s.begin(),s.end() #define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define ...
dfbb45c7cab7c4cb9fc5f48fc1e57bfb441559e1
0348d361a29e5944858c80a9d4e1b286eed033fb
MrYum93/ai_git
/ludo/main.cpp
C++
cpp
1,955
no_license
#include "dialog.h" #include <QApplication> #include "game.h" #include <vector> #include "ludo_player.h" #include "ludo_player_random.h" #include "ludo_player_qlearning.h" #include "ludo_player_q.h" #include "positions_and_dice.h" Q_DECLARE_METATYPE( positions_and_dice ) int main(int argc, char *argv[]){ bool deb...
00e836366568196c46c4425d8861fa3455f1c310
2e864dfb19dd96d2a583d126f914ee27bd95ba6b
tymlek/FYP
/ARM_32/FirstStage/09_VirtualFunc/Code/Cpp/main.cpp
C++
cpp
391
no_license
/* C++ implementation */ class A { public: A(); virtual int f(); private: int value; }; A::A() { value = 0; } int A::f() { return 0; } class B : public A { public: B(); virtual int f() override; }; B::B() { } int B::f() { return 1; } int main(void) { B b; A...
4dce0e7a52d19de86d423eca87c6fc3aafa59845
66ca6c0fe7ce973e99747cfd97cf31525e95881b
weixu000/ray-tracer
/src/ray.hpp
C++
hpp
479
permissive
#pragma once #include <glm/glm.hpp> /** * Direction is normalized */ struct Ray { glm::vec3 origin, direction; glm::vec3 operator()(float t) const { return origin + t * direction; } }; static inline const float SHADOW_EPSILON = 1E-5f; // Avoid self-intersection using MaterialRef = size_t; using GeometryId =...
f73cf775b42217966314e4fe93933fc61e436310
cd90faad6a5ebae4bec55c4cc87e82401ca1b752
pancw/game_server
/engine/c_common/module/unixServer.cpp
C++
cpp
4,603
no_license
#include "unixServer.h" #include <sys/un.h> #include "libeventBase.h" #include <iostream> #include <vector> #include "luaService.h" #include "luaBase.h" namespace unixServer { #define UNIX_DOMAIN "../../unix.domain" int unixListenFd = -1; struct event *unixListener = NULL; unsigned int globalUfd = 1; std::unordered_...
6c3afacb6f5832a7ef84ab9e22e2b7f19830ec7c
a6ab04e2d8fc1e4fa61c27a7822bdda7649cb213
edu-417/Online-Judge-Solutions
/Codeforces/Round #186/A. Sereja and Bottles.cpp
C++
cpp
399
no_license
#include<cstdio> #define N 1000 bool used[N+5]; int a[N+5],b[N+5]; int cnt[N+5]; int n; int main(){ scanf("%d",&n); for(int i=0;i<n;++i){ scanf("%d%d",a+i,b+i); ++cnt[a[i]]; } for(int i=0;i<n;++i)if(a[i]!=b[i])used[b[i]]=true; else if(cnt[a[i]]>1)used[b[i]]=true; int ans=...
a5ccf9768a0fa63589756e083f6c4947bad841ec
4847eaf1e394c82a9e66ae6090334cade30f102f
pixelami/NME
/project/common/CachedExtent.cpp
C++
cpp
2,309
permissive
#include <CachedExtent.h> namespace nme { static int sgCachedExtentID = 1; // --- CachedExtent -------------------------------------- Extent2DF CachedExtent::Get(const Transform &inTransform) { mID = sgCachedExtentID++; if (!mExtent.Valid()) return Extent2DF(); /* double ratio = mMa...
7deab84da28f217de82bf9cfb3902556991f5395
a273dde081eca8f528a9f7540d7cc3fe0bfb729f
LeandroLovisolo/CodeJam-Solutions
/2013/1A/B/energy.cpp
C++
cpp
1,233
no_license
#include <iostream> #include <vector> #include <cmath> typedef long long energy; using namespace std; energy solve(int E, int R, const vector<int> &v) { vector<vector<energy> > dp(v.size(), vector<energy>(E + 1, 0)); for(int i = v.size() - 1; i >= 0; i--) { // cout << "i = " << i << endl; fo...
e81712d8d87c734fcc305c166b7068351403b725
cf2d9f213ed80e374644ef0f0d338a552dd0d552
wyrover/nsduilib
/src/duilib/Control/UIScrollBar.cpp
C++
cpp
31,289
no_license
#include "stdafx.h" #include "UIScrollBar.h" namespace DuiLib { CScrollBarUI::CScrollBarUI() : m_bHorizontal(false), m_nRange(100), m_nScrollPos(0), m_nLineSize(8), m_pOwner(NULL), m_nLastScrollPos(0), m_nLastScrollOffset(0), m_nScrollRepeatDelay(0), m_dwButton1Color(0), m_uButton1State(0),...
9ab99a30c10fd94d817a08dcb5acf8605d569c74
c3db577cd921f123f79206c69328775a831ec449
skyto0927/Programming-Contest
/AtCoder_PastProblems/ABC_066/B.cpp
C++
cpp
565
no_license
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1e9 typedef long long ll; int main() { string S; cin >> S; FOR(i,1,...
7baa2aaaf8dcfa3e4d80b082c68abc986170156f
3db19faa409fa6de14c36f15a5b4824a80fc7b13
sam7k9621/ManagerUtils
/ArgHelper/interface/Readmgr.hpp
C++
hpp
904
permissive
#ifndef READMGR_HPP #define READMGR_HPP #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/PythonParameterSet/interface/MakeParameterSets.h" #include <string> #include <vector> namespace mgr{ class Readmgr { public: Readmgr(); Readmgr( const std::string& ); ...
bd2a86fe6fe9a157c2ce744f2f9bfb3ed1418c20
6b1fd24df42184cd309bcd6446da476239ddc236
shuchongqj/PhotonBox
/PhotonBox/src/resource/CubeMap.cpp
C++
cpp
8,269
permissive
#include "PhotonBox/resource/CubeMap.h" #include <vector> #include <iostream> #include "PhotonBox/component/Camera.h" #include "PhotonBox/core/Resources.h" #include "PhotonBox/core/system/Renderer.h" #include "PhotonBox/core/system/SceneManager.h" #include "PhotonBox/math/Matrix4f.h" #include "PhotonBox/resource/Scen...
566eadea6a462ef10bc20be67becb47617ce31a4
7f5d0ec93ffd561bd212b735997e0375a6198b08
blockspacer/chila
/src/chila/connectionTools/lib/codegen/FunMData.hpp
C++
hpp
2,847
no_license
/* Copyright 2011-2015 Roberto Daniel Gimenez Gamarra * (C.I.: 1.439.390 - Paraguay) * * This file is part of 'chila.connectionTools.lib.codegen' * * 'chila.connectionTools.lib.codegen' is free software: you can redistribute it * and/or modify it under the terms of the GNU Lesser General Public License * as publ...
12ff7f574da9b852a381ecf827fd3aa966e9b1a0
49b064b0b8e7c534dc397c7882fcfa6b7b2aa843
sk3l/charon
/src/cmd_parser.cpp
C++
cpp
2,048
no_license
#include <exception> #include <iostream> #include <sstream> #include "core/text/string_util.h" #include "cmd_parser.h" using string_util = sk3l::core::text::string_util; namespace charon { cmd_parser::cmd_parser() : cmd_map_(128, sk3l::data::adt::string_hash()) { cmd_map_.insert("quit", cmd_type::QUIT); c...
28d5be08b52c36270047603382f1c00c8335e911
42fff62d0b8f5722dbce31b09b15c320dfd9030b
slavapestov/swift
/lib/ClangImporter/SwiftLookupTable.cpp
C++
cpp
25,967
permissive
//===--- SwiftLookupTable.cpp - Swift Lookup Table ------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
044cba39df73438021fff50009e5cfa0e56156a0
93a313214e977eb1ccf3190d83090fd4797f1220
mingnine/BOJ
/code/1564_팩토리얼5.cpp
C++
cpp
447
no_license
#include <iostream> using namespace std; typedef long long ll; ll N, ans, tc, fc; int main() { scanf("%lld", &N); ans = 1; for (int i = 2; i <= N; i *= 2) tc += N / i; for (int i = 5; i <= N; i *= 5) fc += N / i; for (int i = 1; i <= N; i++) { ll x = i; while (x % 2 == 0) x /= 2; while (x % 5 == 0) x /...
3e494ef93262c8ec388972c109e33703d4d8bf72
d6e2250a1a25da7d3b39b20637dc75262862a5d0
terier/FAST
/source/FAST/Examples/Filtering/gaussianSmoothingFilter.cpp
C++
cpp
1,189
permissive
/** * Examples/Filtering/gaussianSmoothingFilter.cpp * * If you edit this example, please also update the wiki and source code file in the repository. */ #include "FAST/Importers/ImageFileImporter.hpp" #include "FAST/Algorithms/GaussianSmoothingFilter/GaussianSmoothingFilter.hpp" #include "FAST/Visualization/ImageR...
acf228f3fa34c2a5f3beb12a754ccf65eb0501d1
3c25d4495ca2c8f16f85dcc5779597dc1fc30db1
chenff/vpp
/extras/vom/vom/gbp_recirc_cmds.hpp
C++
hpp
2,734
permissive
/* * Copyright (c) 2017 Cisco and/or its affiliates. * 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...
7379afff465a4b427acce6de51e0c38b51b49703
8056c6da1f5be2273a7cf2df72335a62f463f37e
raymondSeger/wxWidgets
/samples/grid/griddemo.cpp
C++
cpp
83,931
no_license
///////////////////////////////////////////////////////////////////////////// // Name: griddemo.cpp // Purpose: Grid control wxWidgets sample // Author: Michael Bedward // Modified by: Santiago Palacios // Copyright: (c) Michael Bedward, Julian Smart, Vadim Zeitlin // Licence: wxWindows licence //...
05ccd982d03ce8d5622577abef7d04d3884b3ec5
ce3a94d8a5427ddde00a46b95d954abfb8f2a055
thngkaiyuan/chromium
/content/renderer/media_capture_from_element/html_audio_element_capturer_source_unittest.cc
C++
cc
5,706
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/memory/weak_ptr.h" #include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h" #include "content/public/renderer/media...
9a7cce2c15a43c0775be7e93858c17e52321ec0e
413f41289f119307557f80e36daec12c50a43689
bhaveshgawri/codeforces
/C/811.cpp
C++
cpp
1,887
no_license
#include <bits/stdc++.h> #define ll long long int #define nl "\n" #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define sz(x) x.size() #define all(x) x.begin(), x.end() #define init(x, k) fill(all(x), k) #define dot(x) fix...
da855337a29e4a17090c38872c60be9f13b5769f
858c807e3868bce058689690406ffd94c616b3f5
tectronics/azerothnuitdelune
/src/game/GridNotifiers.cpp
C++
cpp
8,702
no_license
/* * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either vers...
178a757633d6522510c67268ecdc4ab7b99ea4f5
e0e418c087986a31164c6855e6b1e1678447a1da
K-Wu/libcxx.doc
/test/std/containers/sequences/vector/vector.modifiers/insert_iter_value.pass.cpp
C++
cpp
3,130
permissive
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
cfff908ee8eb299c9134c09e22d51a1e4574563b
731f011f8d4a4d360aee97ac4365881c8a6c7c8b
renegeizu/UGR-FP
/Codigos/Sesion 6/Ejercicio 34.cpp
C++
cpp
1,235
no_license
/* * * Calcular mediante un programa en C++ el combinatorio (n/m) con n, m valores * enteros. No pueden usarse las funciones de la biblioteca cmath. * */ #include <iostream> using namespace std; long double factorial(int numero){ long double total = 1; for(int i = 1; i <= numero; i++){ cout << i; total *=...
075d1f1ef0f9537dab296281e9d5a91b532fc723
ee8e5ff07d1ad076c5d852f19df73adbd9c04247
PublicFedorenko/Gaddis-9th-edition
/Chapter4/ProgChalenges/NumeralConverter/main.cpp
C++
cpp
830
no_license
/* * Write a program that asks the user to enter a number within the range of 1 through 10. * Use a switch statement to display the Roman numeral version of that number. */ #include <iostream> #include <string> using namespace std; #define SIZE 10 int main() { const unsigned int charsToIgnore = 100; int nu...
b98b65946afae3650bf1ace92773d7ea62ca5d84
4b0d601634b219e1cdb59425c73aa55df0651edc
gianscarpe/cpp_primer
/src/chp07/Screen.cpp
C++
cpp
1,008
permissive
#include "Screen.hpp" #include <string> #include <vector> #include <iostream> using std::string; using std::vector; using std::cin; using std::cout; using std::endl; void Screen::do_display(std::ostream &out) const{ for(pos c = 0; c != contents.length(); ++c){ out << contents[c]; if ( (c+1) % width == 0) ...
da8cf593685fd18085f81b40450f35d0594ae993
e93f4dba8cc63f24be9bb7cefaa319a217683ddb
tarun-agarwal1044/Codeforces
/B580.cpp
C++
cpp
423
no_license
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n,d; cin>>n>>d; pair<ll,ll> p[n]; for(int i=0;i<n;i++) cin>>p[i].first>>p[i].second; sort(p,p+n); ll ans=-1,ff=0; int i,j=0; for(i=0;i<n;i++){ if(p[i].first-p[j].first<d){ ff+=p[i].second; an...
37845146c188d2a2c60d1b874c3ae580aefac314
9555ed949dc4538c93b3e29a7a17fb9d29bdc7cb
MLaszczewski/cross-platform-base
/FastGFX/src/GeneratorBuffer.cpp
C++
cpp
10,741
permissive
// // Created by Michał Łaszczewski on 14/04/16. // #include <fastgfx.h> #include "GeneratorBuffer.h" namespace fgfx { ShaderBindingRequest GeneratorBuffer::shaderBindingRequest = { .attribNames = { "aPosition", "aNormal", "aTangent", "aBitangent", "aCoord", "aGeneratorFactor", "aOutp...
5bf25fe76ad6e452bfc66c4a2b37c0c962a48fe1
8e13ff65bae66f3d9aa52638bddd3058959f3096
wzj1695224/BinClone
/lshkit/trunk/3rd-party/boost/boost/mpl/integral_c.hpp
C++
hpp
1,592
permissive
#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/li...
03850d2a25887cefefeacb12ed54d936017b870b
1e2e4a043f8af36c4caf69728ed079c9703129bb
Robot7769/Falcon2
/.piolibdeps/RB3201-RBControl_ID5532/src/RBControl_servo.cpp
C++
cpp
2,298
permissive
#include <algorithm> #include <chrono> #include "RBControl_servo.hpp" namespace rb { SmartServoBus::SmartServoBus() : m_bus(NULL) { } void SmartServoBus::install(uint8_t servo_count, uart_port_t uart = UART_NUM_1, gpio_num_t pin = GPIO_NUM_32) { m_mutex.lock(); if(m_bus == NULL) { m_bus = new lw::Bus...
61dcf55d8d45b0a3ce43b0ece7d8ca47a4f49b79
9b5db256498493518c641149ccb0fa4d2a6a103b
NitaiBanik/My-algorithm
/Square Root Decomposition/try_array.cpp
C++
cpp
2,925
no_license
#include<bits/stdc++.h> using namespace std; #define siz 300005 #define ll long long ll arr[siz]; vector<ll>vec[570]; ll n,m,u; void process() { ll block_size = sqrt(n); ll ck = 0, block = 0; for(int i=0; i<n; i++) { ck++; vec[block].push_back(arr[i]); if(ck == block_size...
9e5fc11cc1c550f3508815a45fdf0602f41f4bc6
33c90a9af9e3280f5f02c54fe281b54400884b50
Aaronchangji/wukong
/deps/zhelpers.hpp
C++
hpp
7,453
permissive
#ifndef __ZHELPERS_HPP_INCLUDED__ #define __ZHELPERS_HPP_INCLUDED__ // Include a bunch of headers that we will need in the examples #include <zmq.hpp> // https://github.com/zeromq/cppzmq #include <iostream> #include <iomanip> #include <string> #include <sstream> #include <time.h> #include <assert.h> #include <stdl...
9d2e7994fe87684e47f9394ec6c1d30577a3a7a8
45378fcb551a5fdeb31097ca59f3aee75a1023a7
sat-p/EE604A-Assignment1
/Q2/src/Q2.cxx
C++
cxx
1,285
no_license
#include "../include/histogram_matching.h" #include <opencv2/highgui/highgui.hpp> #include <iostream> int main (int argc, char** argv) { if (argc != 3) { std::cout << "Please input reference and target image path" << std::endl; return 0; } const auto& tar = cv::imread (argv[2], ...
ee04cefcf8dfbf312b675ef48c0835f084e29731
6d2bbeee61ee3e3c6af375534f470ca93ed3c547
ofzo/chromium
/chrome/browser/chromeos/web_applications/media_web_app_info.cc
C++
cc
2,249
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/web_applications/media_web_app_info.h" #include <memory> #include "base/strings/string16.h" #include "base/strings/utf...
2cdfa3b9552a5b0a8b14faff4ee47db26640a15a
3be3c2d506ea659766da4f923a6753136f81e47a
river34/game-hfsm
/hfsm/State.hpp
C++
hpp
895
permissive
// // State.hpp // GameFSM // // Created by River Liu on 4/1/2018. // Copyright © 2018 River Liu. All rights reserved. // #ifndef State_hpp #define State_hpp #include <stdio.h> #include <iostream> #include <vector> #include <string> class Blackboard; namespace FSM { class State { protected: ...
e18ffd1084d063e0490dd609a318f3797020b384
18859bfb3ed4cbaf911fb5b3db6d68c164a726b6
EXAGLOBAL/BurnCoinWallet
/src/rpcblockchain.cpp
C++
cpp
13,861
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2018. BurnCoin 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 "bitcoinrpc.h" #i...
9d82a2c6443bd990e72863bc8fb09fe527c1a342
16cb6692e0b6956e57160c9487ecbd7a41df9b6b
RamazanDemirci/DesignPatternExamples
/Observer-III/src/CurrentScoreDisplayCls.cpp
C++
cpp
802
no_license
/* * CurrentScoreDisplayCls.cpp * * Created on: 14 Tem 2018 * Author: tr1d5042 */ #include <stdio.h> #include "CurrentScoreDisplayCls.h" CurrentScoreDisplayCls::CurrentScoreDisplayCls() { // TODO Auto-generated constructor stub //printf("\n%s", __FUNCTION__); } CurrentScoreDisplayCls::~CurrentScoreDispl...
3a31e240b381f0964def9701a99f6b8c4ba5a432
8b9ee1d671005b46bc2ae2679deee48622298c48
chromium/chromium
/tools/clang/empty_string/tests/test-original.cc
C++
cc
1,329
permissive
// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Test file for the empty string clang tool. #include <string> // Tests for std::string declarations. void TestDeclarations() { std::string a(""), b("abc"), c(""); } // T...
eb79e362cb5c09ce50ddf922757d26aa51364d59
a8de9187e6c3580227807c04b7cb86c8783c5b08
kongyt/GameEngineCopy
/Platform/Windows/D3d12Application.cpp
C++
cpp
536
no_license
#include "WindowsApplication.hpp" #include "D3d/D3d12GraphicsManager.hpp" #include "MemoryManager.hpp" #include <tchar.h> using namespace GE; namespace GE{ GfxConfiguration config(8, 8, 8, 8, 32, 0, 0, 960, 540, "Game Engine Copy(Windows)"); IApplication* g_pApp = static_cast<IApplication*>(new W...
40cc575b374108dee777e21c1199988f7d163223
b3517564f53c5aa1e073964d48e664536cf060c0
CapelliC/loqt
/lqUty/ParenMatching.cpp
C++
cpp
3,041
no_license
/* lqUty : loqt utilities Author : Carlo Capelli E-mail : cc.carlo.cap@gmail.com Copyright (C): 2013,2014,2015,2016,2017,2018,2019 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as publishe...
669fcf723682c7202ee7a41f71dbbe1b57df725f
efa8b7fe84f2ab7fa744ebb93fd46b33fc91acb0
liangliangwang0537/TNML
/CppMNIST/include/mnist/mnist_reader.hpp
C++
hpp
8,526
permissive
//======================================================================= // Copyright (c) 2014 Baptiste Wicht // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //=======================================================================...
987cc916a9c695dabb25be79353cd7e44c3dd742
420b595573172c33d621515f5c943c19b7bb12b1
ecreeth/hhvm
/hphp/runtime/vm/jit/target-cache.cpp
C++
cpp
18,256
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...