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
0f463296ba4d9b6b65174513c2598fd703acf88f
212ad0c8d718148a760eda71b3afc9592071c61b
crackersamdjam/DMOJ-Solutions
/CCC/ccc13s3.cpp
C++
cpp
1,515
permissive
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define gc getchar() #define pc(x) putchar(x) template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;} template<typename T> void print...
d701fc1e20d9059347e04bf2c832055369088b56
115d953894608164d0f58c0d617eeecd7b3f96d7
zxzql/ouzel
/ouzel/graphics/opengl/linux/RenderDeviceOGLLinux.cpp
C++
cpp
14,134
permissive
// Copyright 2015-2018 Elviss Strazdins. All rights reserved. #include "core/Setup.h" #if OUZEL_PLATFORM_LINUX && OUZEL_COMPILE_OPENGL #if OUZEL_SUPPORTS_X11 # include <X11/Xlib.h> # include <X11/extensions/xf86vmode.h> #endif #include "RenderDeviceOGLLinux.hpp" #include "core/linux/EngineLinux.hpp" #include "core...
54da2b289ee03820b6fa2f583054dcd6c9b6251f
eb7d7292da7bcec688f6582990ac6ee96c3a7f6c
parsa/blaze
/blazetest/src/mathtest/operations/dmatdmatsub/SDaUDb.cpp
C++
cpp
4,124
permissive
//================================================================================================= /*! // \file src/mathtest/operations/dmatdmatsub/SDaUDb.cpp // \brief Source file for the SDaUDb dense matrix/dense matrix subtraction math test // // Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved // /...
abeeda0dfde80e4f42a0682daffdc1ac0f5c5dc3
0f165a9d53c67a2b12284e5c7dd24b072cc99856
serge-sans-paille/pythran
/pythran/pythonic/include/builtins/NameError.hpp
C++
hpp
249
permissive
#ifndef PYTHONIC_INCLUDE_BUILTIN_NAMEERROR_HPP #define PYTHONIC_INCLUDE_BUILTIN_NAMEERROR_HPP #include "pythonic/include/types/exceptions.hpp" PYTHONIC_NS_BEGIN namespace builtins { PYTHONIC_EXCEPTION_DECL(NameError) } PYTHONIC_NS_END #endif
735b668e1f71950402b05bf96feee43c13d59d5a
e2fc3644b167d26e3ef24dfe08ceb835bbddacc0
cc200723/My-way-of-learning
/学习C++时写的代码/数组左移一位.cpp
C++
cpp
746
no_license
#include <iostream> using namespace std; int arr[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; int len = sizeof(arr) / sizeof(arr[0]); void PrintArray(){ cout << "数组是:" << '\n'; for (int i = 0; i < len; i++){ cout << arr[i]; cout << ' '; } cout << '\n'; } void Left_Move_Array(){ in...
9e480173e0fead76a852caad2e77dd257ac844e6
f6ab8888d047abf80adf04778854282e78023fc4
wh4tsername/Mini-Java-Compiler
/compiler/driver.cpp
C++
cpp
5,720
no_license
#include "driver.hh" #include "../LogCleaner.h" #include "parser.hh" Driver::Driver() : program_(nullptr), trace_parsing_(false), trace_scanning_(false), scanner_(*this), parser_(scanner_, *this) {} int Driver::Parse(const std::string& file) { file_ = file; location_.initialize(&file_)...
29d4ff2808f08fa2598c539a083693e97579d0e6
9e9416c768d03c4cf9db9c5b6982ead9cba7b92e
rfabbri/vxl-1
/contrib/brl/bbas/bsta/bsta_gauss.cxx
C++
cxx
4,560
no_license
#include <iostream> #include <cmath> #include "bsta_gauss.h" //: // \file #ifdef _MSC_VER # include <vcl_msvc_warnings.h> #endif double bsta_gauss::bsta_gaussian(const double x, const double sigma) { double x_on_sigma = x / sigma; return (double)std::exp(- x_on_sigma * x_on_sigma / 2); } //: generate a 1-d Gauss...
65b751fe474ca4e26883ce9f7a3dcaf7e08f10ad
813dafb30453c4e27e4090da21ff80ef6b42f15d
DLR-TS/SUMOLibraries
/gdal-3.4.0/frmts/gtiff/tifvsi.cpp
C++
cpp
17,503
permissive
/****************************************************************************** * * Project: GeoTIFF Driver * Purpose: Implement system hook functions for libtiff on top of CPL/VSI, * including > 2GB support. Based on tif_unix.c from libtiff * distribution. * Author: Frank Warmerdam, warm...
fd53ba32a9a41d583cdff45c56ca494143faa6ab
03e7d10df0a99e46afbb632c233da3ded4909571
thecloners/Age-of-du-riche-I
/src/Personnage/villageois.cpp
C++
cpp
2,570
no_license
#include "villageois.hpp" // Bon header! (c'est moi qui l'ai ajouté) using namespace std; Villageois::Villageois(sf::Vector2f Position, int equipe) : Personnage( 100, 100, 50, 10, 100, ...
c4f15ca031b9fc98c31969e1958be615e265a2ca
377feb8a2402b85e90b2038629670e010ffac011
JimZGChow/rlncd
/src/ctrl_tracker.hpp
C++
hpp
4,319
no_license
#pragma once #include <atomic> #include <memory> #include <utility> #include <mutex> #include <vector> #include <chrono> #include "logging.hpp" class ctrl_tracker { size_t m_count = {0}; std::pair<size_t, size_t> m_rtt; size_t m_avg; std::mutex m_lock; public: typedef std::shared_ptr<ctrl_trac...
2cc321aa05d3859715d6bf2b5f2e44159cb81777
c8640929faa30acbbb7f9f6b66e5a626384fab5c
masumr/problem_solve
/code/kfd.cpp
C++
cpp
908
no_license
#include<bits/stdc++.h> using namespace std; const int N=2001; vector<int>v[N]; int dis[N]; int vis[N]; int a[N+5]; int bfs(int n){ int mx=0; queue<int>q; memset(vis,0,sizeof vis); memset(dis,-1,sizeof dis); vis[n]=1; q.push(n); dis[n]=0; while(!q.empty()){ int u=q.front();q.pop(...
04710f840e0ff60b41a64394ca36bb1dd4296087
8913247af3781256825266f4cd5abd7a83a0682a
rurudo/moguru
/source/Game/Menu/ItemEquip.cpp
C++
cpp
6,068
permissive
#include "ItemEquip.h" #include "MixTreeData.h" const int ItemEquip :: DefaultFontPosX = 11; const int ItemEquip :: DefaultFontPosY = 10; const int ItemEquip :: DefaultFontSize = 45; const int ItemEquip :: DefaultPosX = 616; const int ItemEquip :: DefaultPosY = 440; const int ItemEquip :: DefaultWidth = 170;...
3e28f79cbc05e0973f688467c6c45e7de0110d45
dd3f473b7752006f24b9eda0391060352ed1b5f1
JornEirikBetten/Compphys
/Project_1_backup/prob2.cpp
C++
cpp
1,062
no_license
#include <armadillo> #include <iostream> #include <math.h> #include <fstream> using namespace arma; using namespace std; //function calculating values of analytical expression of u(x) vec function_u(int n, vec x) { vec u = zeros<vec>(n+1); for (int i=0; i<n+1; i++) { double u_i = 1.0-(1.0-exp(-10))*x(i)-e...
57474625706813ac4a2318656223304ebad978a7
d32e7c20d999faeb9cb7df32c6ffd8bf52645e2a
piklock/FAQO
/src/qt/bitcoinunits.cpp
C++
cpp
8,415
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017-2018 The FAQO & Bitfineon developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource....
e8333ddc925b326090de69b7e3e77f3b73b25ef6
01c4bab3a1ee52d3f89508527aa0819d674ac5f1
naseem366/Data-Structures-and-Algorithms-master
/SortingAlgorithms/countingsort.cpp
C++
cpp
730
no_license
#include<iostream> using namespace std; countSort(int a[],int n){ int maxVal=a[0]; int temp[10]; for(int i=1;i<n;i++){ if(a[i]>maxVal) maxVal=a[i]; } int count[maxVal+1]; for(int i=0;i<=maxVal;i++){ count[i]=0; } for(int i=0;i<n;i++){ count[a[i]]++; } //find sum of elements for(int i=1;i<=maxVal;i++...
eac608742befe426da0ef1376012602534fc8092
5ea781b0c8eb172b54667d4a5ff13cd551df176b
alex-fu27/arduino-StatusLED
/examples/serial/serial.cpp
C++
cpp
241
no_license
#include <Arduino.h> #include <StatusLED.h> StatusLED led(LED_BUILTIN); void setup() { Serial.begin(9600); pinMode(LED_BUILTIN, OUTPUT); } void loop() { led.update(); if (Serial.available()) { led.setStatus(Serial.read(), 4); } }
eae997e464e1d5ff5ed7c709ccbf8cb1da311cce
0d52c1048319ffcad7a20be06d9c20fee7c4edba
Brilliantrocks/leetcodelib
/190.颠倒二进制位.cpp
C++
cpp
901
no_license
/* * @lc app=leetcode.cn id=190 lang=cpp * * [190] 颠倒二进制位 */ // @lc code=start #include <stdint.h> class Solution { public: const uint32_t m1 = 0x55555555;//01010101010101010101010101010101 const uint32_t m2 = 0x33333333;//00110011001100110011001100110011 const uint32_t m3 = 0x0f0f0f0f;//000011110000111100001111...
52c61d76697e5e2da7db2051e15d935ec3d4cd65
613e434e39739e45d8bb0b418675b377683c567f
eiaeii/ECS_GameDemo
/ecs_client/window_system.cpp
C++
cpp
681
permissive
#include "window_system.h" #include "triangle_game.h" #include "singleton_render.h" using namespace terra; WindowSystem::~WindowSystem() { SDL_Window* main_window = static_cast<TriangleGame*>(admin_)->GetSingletonWindow()->main_window; if (main_window) { SDL_DestroyWindow(main_window); } } bool WindowSystem::...
2653dda0c2c73721d08693ba226f3f6680876755
d76a0763b7e0207ff738adb1f4049cdb00e6215d
nikhildhanji/Qt_Fractions
/fraction.cpp
C++
cpp
827
no_license
#include "fraction.h" Fraction::Fraction(int numerator, int denominator) throw (std::invalid_argument) : numerator{numerator}, denominator{denominator} { if(denominator == 0){ throw std::invalid_argument{"Denominator cannot be zero"}; } } float Fraction::get_value(){ return static_c...
bd149e12868eacdef8ce004405ff3b181bc4124c
9eec47d5f2bdf9bf00b258c621d00dee32ba6580
pawroc/Excercises
/codingcpp/circular_buffer/main.cpp
C++
cpp
3,908
no_license
#include <iostream> #include <array> //#include <boost/circular_buffer.hpp> #include <mutex> #include <shared_mutex> #include <chrono> #include <thread> #include <vector> template<typename T, size_t N> class CircularBuffer { public: CircularBuffer() : begin_{buffer_.data()}, end_{begin_ + N}, last_{begin_}, first_...
f385e4c026693fa770c61e757444ed71d4e93f31
443b0329171aa3a0002cb54e29d110c5266e91f4
michaelyin/ocropus-git
/ocr-line/glbits.cc
C++
cc
9,899
permissive
#include <unistd.h> #include <sys/stat.h> #include "glinerec.h" #ifdef HAVE_GSL #include "gsl.h" #endif namespace glinerec { //////////////////////////////////////////////////////////////// // bitmap classifier //////////////////////////////////////////////////////////////// typedef long long uint64...
11a1285e7d7f392727deeb9afd9485fff6b57c7b
ebe5600bad43daa1de94fff9f1f105c7f87c0b62
himanshu0066/Codeforces-Practice
/basic_diplomacy_2021_codeforces.cpp
C++
cpp
1,149
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long ll mod=1e9+7; void solve(){ ll n,m,x,y; cin>>n>>m; unordered_map<ll,ll> freq; vector<ll> pos(m,0); vector<vector<ll>> arr(m); for(ll i=0;i<m;i++){ cin>>y; for(ll j=0;j<y;j++){ cin>>x; ...
da342178afacf11c0aa3edd7c8ce2f6cc30579b6
7c742956866029c50abbefd15fbe51946cd93505
mudhistoricalsociety/tinymux_2.6
/src/conf.cpp
C++
cpp
81,172
permissive
// conf.cpp -- Set up configuration information and static data. // // $Id: conf.cpp,v 1.77 2006/01/11 20:51:31 sdennis Exp $ // #include "copyright.h" #include "autoconf.h" #include "config.h" #include "externs.h" #include "attrs.h" #include "command.h" #include "interface.h" // ------------------------------------...
656911657592661474091773831521980cd1efa7
ebb1399c6039733ecd9b928aa23b4e62b263b9d5
cksharma/coding
/leetcode-cpp/archieve/BestTimeToBuyAndSellStockII.cpp
C++
cpp
347
no_license
#include "header.h" int BestTimeToBuyAndSellStockII::maxProfit(vector<int> &prices) { int ans = 0; int running_sum = 0; for (int i = 1; i < (int)prices.size(); i++) { int diff = prices[i] - prices[i - 1]; running_sum += diff; if (running_sum < 0) { running_sum = 0; } if (diff > 0) { ans = ans + di...
132d85b818431723844c0932bc97e44bd56cceb4
debd94c9079375a68ebf9d4e435907d9e4b680d5
Xoooo/fuchsia
/garnet/bin/http/tests/manual/mwget/mwget.cc
C++
cc
3,501
permissive
// Copyright 2017 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <fuchsia/net/oldhttp/cpp/fidl.h> #include <lib/async-loop/cpp/loop.h> #include <lib/sys/cpp/component_context.h> #include <stdlib.h> #include "sr...
58cd723fd550074dbc1ead6ace9f0f616d29d4b3
1627aaca446c744586a67606d3b65504c4a000bf
janblumenkamp/AirSim
/Unreal/Plugins/AirSim/Source/WorldSimApi.cpp
C++
cpp
9,397
permissive
#include "WorldSimApi.h" #include "AirBlueprintLib.h" #include "common/common_utils/Utils.hpp" #include "Weather/WeatherLib.h" WorldSimApi::WorldSimApi(ASimModeBase* simmode) : simmode_(simmode) { } bool WorldSimApi::isPaused() const { return simmode_->isPaused(); } void WorldSimApi::reset() { UAirBluepr...
655dbfb4289be8014bd87817d37c090eb9eb68c9
5844e10a93cd861086a540581b7eb9879ca39340
Yonghui56/ogs6
/Applications/DataExplorer/main.cpp
C++
cpp
1,925
permissive
#include "mainwindow.h" #include <memory> #include <QtGui/QApplication> #ifdef VTKOSGCONVERTER_FOUND #include <OpenSG/OSGBaseFunctions.h> #endif #include "logog/include/logog.hpp" #include "LogogSimpleFormatter.h" #ifdef VTKFBXCONVERTER_FOUND #include <fbxsdk.h> #include "Common.h" FbxManager* lSdkManager = NULL; FbxS...
2dbacb6acbbab5e3e7a6401e8a99d23a2a8bfc4e
d617f3d3876e63b2fb76724bac64aaf354216aa7
archiron/MEM_CMSSW_8_0_28
/src/MEM/MEMAlgo/src/CPPProcess_DY_ubarcbar_to_ubarcbar.cc
C++
cc
9,104
no_license
//========================================================================== // This file has been automatically generated for C++ Standalone by // MadGraph5_aMC@NLO v. 2.2.2, 2014-11-06 // By the MadGraph5_aMC@NLO Development Team // Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch //============================...
1425e1e12348dbcfd56c3993d7f076653874ba95
10864a396988b6e03390b8061ad9aee0d80a026b
lvfulong/LayaNative-0.9.16
/Conch/source/conch/JCScrpitRuntime.cpp
C++
cpp
22,811
no_license
/** @file JCScrpitRuntime.cpp @brief @author James @version 1.0 @date 2016_5_13 */ #include "JCScrpitRuntime.h" #include <algorithm> #include <util/Log.h> #include "JSWrapper/JSInterface/JSInterface.h" #include "JSWrapper/LayaWrap/JSFileReader.h" #include "JSWrapper/LayaWrap/JSGlobalExportCFun.h" #include "J...
ed99d0ce65771313ea382b6e91beeb7a49996356
17e6a6940988bd0c91a1a9cb92093338b78d1674
catch4/Doho
/8times/pro_12913.cpp
C++
cpp
2,670
no_license
/* [PRO] 땅따먹기 문제 출처 : https://programmers.co.kr/learn/courses/30/lessons/12913 [풀이 방법] DP? 1. 첫행을 제외한 2번째 행부터 누적합의 최댓값을 구한다. - {1, 2, 3, 5}, {5, 6, 7, 8} 일 때 2번째의 0번 누적합은 {7, 8, 9} 가 된다. 이 중 최댓값을 새로운 배열(newLand[1][0])에 저장해준다. [실패 과정] 1. DFS를 이용해 모든 경우를 체크하는 방법은 효율성 이전에 정확성에서 시간초과가 뜬다. 2. BFS를 이용한 다익스트라 ...
47216890d8bb8e449c6359c9498d61c6b92c8e36
ee0bedec11b72598e60945d01b2d0b6c63207314
zambreno/dec13-09
/synthesizer/src/AudioProcessor.hpp
C++
hpp
1,442
no_license
#pragma once #include <stdio.h> #include <math.h> #include <iostream> #include "portaudio.h" #include "Module.hpp" //NUM-SECONDS is simply a playback mechanism #define NUM_SECONDS (1) //Sample rate of the soundcard #define SAMPLE_RATE (32000) //Audio buffer size #define FRAMES_PER_BUFFER (256) //Power of wave...
02dae8eb7c4252726e1ec001edfea1254488ee7d
e0174adc8436f93e983758b471901969cbf99ddc
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14571/function14571_schedule_3/function14571_schedule_3_wrapper.cpp
C++
cpp
1,197
no_license
#include "Halide.h" #include "function14571_schedule_3_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(1048576); Halide::Buffer<int32_t> buf01(1...
4d9277e90dcf21558843a4def8433f861ce47cb2
ec14d0dc9e4c7153f44c2f8d977d135fe303a37c
msrLi/portingSources
/ACE/ACE_wrappers/tests/Stack_Trace_Test.cpp
C++
cpp
2,118
permissive
// ============================================================================ // // = LIBRARY // tests // // = DESCRIPTION // This program exercises the ACE_Stack_Trace class. // // = AUTHOR // Chris Cleeland <cleeland @ ociweb . com> // // ====================================================================...
4b9992b63cac11b0a2d03b705e08dcfe2eba22e6
eb5246de49c0ee144e564a624ce429eb51e03a07
ngc7293/cutestation
/src/net/unix/socket.cc
C++
cc
2,218
permissive
#ifdef __linux__ #include "net/socket.hh" #include <unistd.h> #include <arpa/inet.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/un.h> #include "sockbuf.hh" namespace net { struct socket::priv { int fd = -1; sockbuf* buf = nullptr; socket_type type; }; socket:...
352ef120efd42793a0267c16ee1b0e92786ca9db
0f795f21dc883908cee8a69a9d98f579824ffb82
strcoder4007/spoj
/SMPDIV/SMPDIV-15990895.cpp
C++
cpp
1,009
no_license
#include <fstream> #include <iostream> #include <string> #include <complex> #include <math.h> #include <set> #include <vector> #include <map> #include <queue> #include <stdio.h> #include <stack> #include <algorithm> #include <iomanip> #include <list> #include <ctime> #include <memory.h> #include <bitset> #define F fir...
4ddbbc4d69f1f6955f13f8e20de84661a1d12443
00b4d8bd1cf15b019eddbc60aa0908855713d8ec
ermig1979/Simd
/src/Simd/SimdAvx512bwEdgeBackground.cpp
C++
cpp
16,607
permissive
/* * Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2017 Yermalayeu Ihar. * * 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 limi...
4d2f900c7aa54cbec4aa6185892795004f2bdf0a
01ceb2886a8599aa04aabd942ed86f03a6ac90ad
phusion/passenger
/src/cxx_supportlib/oxt/backtrace.hpp
C++
hpp
4,568
permissive
/* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2017 Phusion Holding B.V. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softwar...
bd3d66a2e4f549c48b625fee72c5c0ec32a8b59c
8ab40b66f342926c8e8a4781207a7e7c8b29133c
halx99/asio
/asio/include/asio/impl/as_tuple.hpp
C++
hpp
9,064
permissive
// // impl/as_tuple.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef ASIO_IMPL_AS_TUPLE_HPP #d...
9dabfa9af9fc03d097ac96ee3fab0f9c0c8d05df
538b3beb2c9bf714f7fc6aeb5aac605512659652
ConnectionMaster/fbthrift
/thrift/lib/cpp/test/Base64Test.cpp
C++
cpp
2,539
permissive
/* * Copyright (c) Facebook, Inc. and 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 applic...
b5a5b390b0b0e92904189ce8168690e1f382adfa
4ed4bebc9c8299b226972319a5bd3a3cd8dcf24d
mmasniy/Cpp-Yellow-Belt
/4/find_nearest_element.cpp
C++
cpp
864
no_license
#include <iostream> #include <set> #include <algorithm> using namespace std; set<int>::const_iterator FindNearestElement(const set<int>& numbers, int border) { auto rhs = numbers.lower_bound(border); if (rhs == numbers.begin()) { return rhs; } auto lhs = prev(rhs); if (rhs == numbers.en...
e17ef6574ae93bea3f5c54b2de7889ca8fbfd4cf
7872a9cee7cc2ef089bd825e557626204f8b68da
hitsgub/chainer
/chainerx_cc/chainerx/native/native_backend_test.cc
C++
cc
8,959
permissive
#include "chainerx/native/native_backend.h" #include <cstring> #include <tuple> #include <vector> #include <gtest/gtest.h> #include "chainerx/array.h" #include "chainerx/context.h" #include "chainerx/device.h" #include "chainerx/routines/creation.h" #include "chainerx/testing/threading.h" namespace chainerx { names...
b6f618b9b341172b706917a6969d8a3bc2856b60
a86e4daf477cf8143da10270e343b385ba878a44
549642238/MyRepository
/Imitation/KinectSDK_CaptutringSkeletonData/ConsoleApplication1/math_function.cpp
C++
cpp
2,796
no_license
#include "math_function.h" //求向量大小 double MathFunction::val(vect v){ return sqrt(pow(v.x,2)+pow(v.y,2)+pow(v.z,2)); } //三维空间点的大小 double MathFunction::val2(double* a){ double x = sqrt(pow(a[0],2) + pow(a[1],2) + pow(a[2],2)); return x; } //根据转轴和旋转角度求局部旋转矩阵,相对于母连杆的旋转矩阵 double** MathFunction::rodrigues(double* a,dou...
7695b9965fb6c32022211fa1eaac31ce44a72722
b8352f8f2c26ac16022b5451d45a5725044d9c1d
semajrolyat/tas
/examples/pursuit/os.cpp
C++
cpp
6,962
no_license
#include "os.h" #include <stdio.h> #include <vector> #include <assert.h> #include <unistd.h> #include <fcntl.h> #include <sys/select.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> // POSIX #include "log.h" //----------------------------------------------------------------------------- extern...
b85745de4e9a3e041cc61c17220c0fec5e2914a4
db0708544896f5f59740a97b4e9f2198d3369b69
gncvalente/18app
/dist/ios/src/_root.app18_accessor_NavBarTitle_Text.cpp
C++
cpp
5,443
no_license
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_accessor_NavBarTitle_Text.h> #include <_root.NavBarTitle.h> #include <Uno.Bool.h> #include <Uno.Object.h> #include <Uno.String.h> #inclu...
4d7aa2bff9e1e73ca3ff817debd8f62447d180c5
74b944bd2b11495e0b4a04c3544c51a08528fb45
pedro772/LiP-2020.5
/list9/sumFatorials.cpp
C++
cpp
428
no_license
#include <iostream> using namespace std; int fatorial(int x); int sumFatorials(int y); int main() { int input; cin >> input; cout << sumFatorials(input); return 0; } int fatorial(int x) { int i; for(i = (x - 1); i > 0; i--) { x *= i; } return x; } int sumFatorials(int ...
bbc3e1cd22a5a245c809d27b7cf0a0fd9dad122c
dbc96583aef7c2fa995d8578eff75b18d776d97a
lambertomaza/poo
/evidencias/2016/ene_jul/POO/evidencia01/Perez Perez Daniel/main.cpp
C++
cpp
777
no_license
#include <iostream> #include <string.h> /*strlen()*/ /*header required in linux not required in windows*/ using namespace std; //Palindromo int main(int argc, char** argv) { bool palindromo=true; char palabra[100]; cout<<"Ingrese una Palabra: "; cin.getline(palabra,100); for(int i=0;i<st...
23c9cc51760a148cd52148de3c2dfd5a18ed226b
5cb53e6ffdf95667fc266bce07f909a29abba89e
Ptiana/Yplay
/Yplay/translate.cpp
C++
cpp
2,768
no_license
#include "translate.h" Translate::Translate() { manager = new QNetworkAccessManager(this); translateResult = ""; userAppId = ""; userKey = ""; randomSalt = 0; } Translate::~Translate() { } bool Translate::setUser(QString appId, QString key) { bool ret=false; do { if (appId == NULL) break; if(key==NU...
a45499caa7d1dc484051ccb77fb2fc2b8361643d
c82ddd413d70f7cd5284d4b81dd53b8fd31e093e
aayushghosh123/Data-Structure
/21.Count_Inversion.cpp
C++
cpp
408
no_license
#include<bits/stdc++.h> using namespace std; void count_inversion(int arr[],int n){ int count=0; for(int i=0;i<n-1;i++){ for(int j=i+1;j<n;j++){ if(arr[i]>arr[j]) count++; } } cout<<count; } int main(){ int n=0; cin>>n; int arr...
bd9461d4a2334b21fa9a1de814a35e126668b97f
505b3bad74321dcd12eb76174197b886415f2460
edwig/SQLComponents
/SQLComponents/SQLTransaction.cpp
C++
cpp
7,310
no_license
//////////////////////////////////////////////////////////////////////// // // File: SQLTransaction.cpp // // Copyright (c) 1998-2022 ir. W.E. Huisman // All rights reserved // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "S...
13daa3097d3ce9c45de7b73b867a2554203992ef
db1a9d3a8196a3c756d8f06ef1c954295bbd1f40
es-sns121/waterSim
/src/waterSim.cpp
C++
cpp
5,142
no_license
/* * ============================================================= * Author: Evan Smith * Date : 6/5/2017 * * waterSim.cpp * * Source file that implements the creation of the database. * * ============================================================= */ #define epicsExportSharedSymbols #include <pv/water...
94b2ff3bb5c82309515ca595b50fde247ae114a8
e77adc9046498cc09d012baec9315fd058c6ff94
nperf/nlapack
/routines/lineq/matfac/gbtrf.cc
C++
cc
1,341
permissive
#include "routines.h" void dgbtrf(const v8::FunctionCallbackInfo<v8::Value>& info) { lapack_int m = info[0].As<v8::Integer>()->Value(); lapack_int n = info[1].As<v8::Integer>()->Value(); lapack_int kl = info[2].As<v8::Integer>()->Value(); lapack_int ku = info[3].As<v8::Integer>()->Value(); double *ab = reinterpre...
8edf5ba1e5084b4c983dd1908911a39ac5da3e3b
9b68de93abd62ee9f0de63777a0a927bf360b15f
Rikoshet-234/xray-oxygen
/code/engine.vc2008/xrEngine/string_table.cpp
C++
cpp
4,378
permissive
#include "stdafx.h" #include "string_table.h" #include "../xrCore/XMLCore/xrXMLParser.h" #include "xr_level_controller.h" STRING_TABLE_DATA* CStringTable::pData = nullptr; EGameLanguage g_Language = EGameLanguage::eglRussian; xr_token language_type_token[] = { { "Русский", 0 }, { "English", 1 } }; CStringTable:...
e074c76767de47042bf563b8f988ff3c1044f044
20c54890b0fc51e924c8785d6a87aa16696f3de2
asad14053/My-Online-Judge-Solution
/Uva online Judge/uva-1980.cpp
C++
cpp
322
no_license
#include<bits/stdc++.h> using namespace std; long long p(long long n) { long long s=1; for(int i=1; i<=n; i++) s*=i; return s; } int main() { // p(); int n; string a; while(cin>>a) { if(a=="0") break; int l=a.size(); cout<<p(l)<<endl; } return 0; ...
0da3196be5a6066e76f1be85577295d49f9f99ab
27c3a8abe9f28858dbea3061fa463f0a612e8406
litao1009/SimpleRoom
/externals/OCCTLib/inc/Handle_StepBasic_ProductConceptContext.hxx
C++
hxx
910
no_license
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Handle_StepBasic_ProductConceptContext_Hea...
0ecae4b82664125e6d863218ce233a461688be06
4a65a2a5c77a748668f98c4cef4704e46e066bc1
RicardoMadieeH/Ultimate-Snook-v9001
/GameManager.cpp
C++
cpp
1,148
no_license
#include "GameManager.h" GameManager::GameManager(IntroController &ic, SnakeController &mc, ScoreController &sc, Snake &b) : introController(ic), snakeController(mc), scoreController(sc), body(b) { state = INTRO; } void GameManager::updateState() { switch (state) { case INTRO: if (introController.isFinished())...
6d76d7bdb0479d3a7bbf637eae1111071af6b8da
42be11a485c458fbe7555b51ad230f244b1ce4c6
inglada/OTB
/Testing/Code/IO/otbOpticalDefaultImageMetadataInterfaceFactoryNew.cxx
C++
cxx
919
no_license
/*========================================================================= Program: ORFEO Toolbox Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. See OTBCopyright.txt for details. This software is distributed WITHOUT ANY...
2bb4d9c32a35b07cc7ac7f62fb7ea7b0799013a1
360060ddb7e9d7c553d62cd71f85b0ad6a980a6a
MatthewBerkvens/TA-MSSC
/FA.cpp
C++
cpp
11,034
no_license
#include <assert.h> #include <string> #include <set> #include <memory> #include "FA.h" void DFA::checkIfValid() { assert(alphabet.size() != 0); unsigned int startingStatesCount = 0; for (std::set<std::shared_ptr<DFAState>>::iterator it_state = states.begin(); it_state != states.end(); it_state++) //loop over stat...
d991df285a168cfc20e5815efbb24a136f85d4c7
ae22a874a7614603aedb16567ba6c5ffc880d7e4
nkirov/nkirov.github.com
/2020/NETB290/lectures/sources/permute.cpp
C++
cpp
552
no_license
// permute.cpp #include <iostream> using namespace std; #define MAXN 100 int n = 4; int used[MAXN]; int mp[MAXN]; void print() { for (int j = 0; j < n; j++) cout << mp[j] + 1 << " "; cout << endl; } void permute(int i) { if (i >= n) { print(); return; } for (int j = 0; j < n; j++) { if (use...
77f2cc58b90a5045e6bba3b4c8bc979b28d845fe
672e0bcd2b7f8f3481778964c514cca3115b082f
365082218/A4D
/A4D/Engine/Mesh.cpp
C++
cpp
11,941
permissive
#include "stdafx.h" #include "Mesh.h" #include "BaseMesh.h" #include "W4DCommon.h" #include "RenderState.h" #include "Node.h" #include "Component.h" #include "EventDispatcher.h" #include "resources.h" #include "GameWorld.h" #include "GameObject.h" #include "Transform.h" #include "TexturePool.h" #include "Camera.h" #inc...
5d3be2c898b8ae67e732aaf8fe8a4fe7943a950a
52cb1ba13734360e68354f715f6ada26fc32b888
pkuchensir/tag2vec
/model/tag2vec.cc
C++
cc
8,084
no_license
#include "model/tag2vec.h" #include <algorithm> #include <eigen3/Eigen/Core> #include <iostream> #include <numeric> #include <omp.h> #include <random> #include <string> #include <vector> #include "document/document.h" #include "document/memory_document_iterator.h" #include "document/score_item.h" #include "document/t...
d722951b591c35fbb997e76906c36bd5c47cc9b9
3da4e215d32d49cf7ec5e9b22b6355ff8e2d49c0
Brunni132/roxxortool
/Code/MouseHook.cpp
C++
cpp
6,828
permissive
#include "Precompiled.h" #include "MouseHook.h" #include "Config.h" #include "Utilities.h" #include <CommCtrl.h> const DWORD CLICK_TIME_FOR_TASK_SWITCHER = 250; static HHOOK hHook; static vector<WPARAM> mouseEventsToIgnore; static void addForIgnore(WPARAM eventType) { mouseEventsToIgnore.push_back(eventType); } sta...
87e4291cf9032b56098a599268a4c8c3c345dbbe
c2f5d8b322b95516d5985ac6b492cc6327ebb1e6
void-dragon/platin
/src/kernel/CMOS.cpp
C++
cpp
1,599
no_license
/** * CMOS.cpp * * @since 20.05.2010 * @author Arne Simon => email::[arne_simon@gmx.de] */ #include "CMOS.hpp" #include <lib/std.hpp> namespace kernel { namespace CMOS { void rtc( lib::Time* time ) { uint8 reg = read( REG_B ); time->seconds = read( REG_RTC_SECONDS ); time->minutes = re...
ea37fb320b572b741869c35d9a539fb2b4a829d9
2c7907a9f560d903b9cba29333b265e85273c0cb
necabo/ppcpp
/chapter9/library.cpp
C++
cpp
2,351
no_license
#include "library.h" namespace Library { Book::Book(string isbn, string title, string author, Date copyright_date, Genre genre) : isbn(isbn), title(title), author(author), copyright_date(copyright_date), genre(genre) { if (!is_valid_isbn(isbn)) throw Book::InvalidISBN{}; } bool is_valid_isbn(const string& is...
93f2bb8916adcc60e0ad551ac4e445993ff82e47
3aa6cb8014097c0edb147aa3fea12b32077509f1
adurigneux/M3DS
/semaine-08/raytrace_Durigneux/src/application/Cube.cpp
C++
cpp
2,344
no_license
#include <cmath> #include "Cube.h" #include "Line.h" #include "GLTool.h" #include <iostream> #include "IntersectionArray.h" /** @file @author Fabrice Aubert */ using namespace p3d; using namespace std; Cube::Cube() : Primitive() {} Cube::ESpaceIntersect Cube::intersectBiPlane(double a,double u,double *res1,double ...
c88d4b7e18e8fadbd17ce88f88b60b07f665a27d
0ee0913b4bc8e320e0cc13a9b6f2394be15c8f54
kesshei/skia
/src/shaders/SkShader.cpp
C++
cpp
11,031
permissive
/* * Copyright 2006 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/core/SkMallocPixelRef.h" #include "include/core/SkPaint.h" #include "include/core/SkPicture.h" #include "include/core/SkScalar.h" #includ...
ab419c5fe683b604248151a8b234359d60825427
582d21440c3ba5aa21d8a379ddb2a97ffa5474c3
Acnapse/Labs
/oop8/TBinaryTree.cpp
C++
cpp
10,684
no_license
#include "TBinaryTree.h" #include <exception> template <class T> TBinaryTree<T>::TBinaryTree() : head(nullptr), count(0) {} template <class T> std::shared_ptr<T> TBinaryTree<T>::operator[](size_t i) { if (i > size() - 1) throw std::invalid_argument("index greater then stack size"); size_t j = 0; for ...
8941bffabf1509b50ec128038316de28d8a4cc0c
b4c789ea0a33abcf03c6319838ded4436ddbcc7c
JeyM1/JLang
/src/lexer/BoolConstToken.cpp
C++
cpp
655
no_license
// // Created by Denis Afendikov on 02.03.2021. // #include <iostream> #include "BoolConstToken.h" #include "exceptions/LexerError.h" BoolConstToken::BoolConstToken( const std::string& lexeme ) : Token(Token::Type::BoolConst, lexeme) { if (lexeme == "true") { _actual = std::make_shared<CTYPE>(true); } else if ...
1f87ede8a70ec47e11f95d11bc9fd0bca5cb8f6c
8fdd28a55cee14c458e0f280fe662bfc7854a137
Leo-Wang-JL/force-riscv
/base/src/MemoryInitData.cc
C++
cc
10,197
permissive
// // Copyright (C) [2020] Futurewei Technologies, Inc. // // FORCE-RISCV is 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 // // THIS SOFTW...
6efea6044c3eb01ed96dfdc733ae4679654e149b
cd54dc266897250ca48398079b686db0bf1507a1
ttyang/sandbox
/sandbox/mirror/boost/char_type_switch/char.hpp
C++
hpp
1,387
no_license
/** * \file boost/char_type_switch/char.hpp * Narrow/Wide character type switching. * * Copyright 2008 Matus Chochlik. Distributed under the Boost * Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_CHAR_TYPE_SWITCH_CHAR_...
99eb6968954a39ea9c5bfbae2a7efb34bd33e349
c582c26bf27968e2891cafc9b4236cd1686389af
rrankin8801/GT-511C3
/extra/GT-511C3_SDK_20130410/SDK_DEMO_FOR_USER_AVW_20130122/SDK_DEMO.cpp
C++
cpp
4,838
permissive
// SDK_DEMO.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "SDK_DEMO.h" #include "SDK_DEMODlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CSD...
919dc264b5af2fae7e1c118b233fd010b85e3081
7fa56959b76e6f203b79ae417a3f4d8cfc611b23
kelvin331/Robot-Simulation
/sig/examples/cameratest/cameratest.cpp
C++
cpp
5,558
permissive
/*======================================================================= Copyright (c) 2018 Marcelo Kallmann. This software is distributed under the Apache License, Version 2.0. All copies must contain the full copyright notice licence.txt located at the base folder of the distribution. ================...
9e71055b7db823395ed788f0b77b9b53c691ff40
22a8a2d31e2f838f8d7a7367df774f5fb5a0816e
CNugteren/CLBlast
/src/database/kernels/xgemv_fast/xgemv_fast.hpp
C++
hpp
848
permissive
// ================================================================================================= // This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. It // is auto-generated by the 'scripts/database/database.py' Python script. // // This file populates the database with be...
ca29ffbc3ea8827bbd8e10f8f11d7f82b287c108
18c54cce22d8fedeb79ec76d313238b61bc6bb53
prollings/ttauri
/src/ttauri/notifier.hpp
C++
hpp
3,787
permissive
// Copyright Take Vos 2020. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) #pragma once #include "required.hpp" #include "unfair_recursive_mutex.hpp" #include <mutex> #include <vector> #include <tuple> #include ...
0a39fac11ce166fe0ae4855b4058e99f56082749
5afefc877322ae47ee5c60051befada2fb9fdc54
ZhifengPan/vcdebug
/databreak/databreak.cpp
C++
cpp
442
no_license
// databreak.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <string.h> int data=100; char str1[10]; char str2[5]; void test(int val) { data = val; } void test1() { strcpy(str1,"hello"); } void test2() { strcpy(str2,"this is a test text"); } int main(int argc, _TCHAR* argv[]) { test(200); printf("data=%d\n...
209f13fc27242e78118a798d046aecfffabf00d8
a1ff06e1050db5f492921b07e6dedbf5564f3cc5
fengjixuchui/Heuristic_antivirus_engine_by_huoji
/POC_MSI_EXPLOIT_BY_HUOJI/virtual_helper.cpp
C++
cpp
10,947
no_license
#include "head.h" #include "head.h" #include "virtual_helper.h" /* virtual_helper: 设置底层系统虚拟化环境 */ void init_descriptor64(SegmentDesctiptorX64* desc, uint64_t base, uint64_t limit, bool is_code, bool is_long_mode) { desc->descriptor.all = 0; //clear the descriptor desc->descriptor.fields.base_low = base; desc->des...
a1fa328b5111aff118860bde624b451f7e028dff
1a9180c3f122a82cd81c4ab9f3d37f441bf150ad
andrew1205lin/109EE2405
/mbed04/4_4_uLCD_demo/main.cpp
C++
cpp
610
no_license
// uLCD-144-G2 basic text demo program for uLCD-4GL LCD driver library // #include "mbed.h" #include "uLCD_4DGL.h" uLCD_4DGL uLCD(D1, D0, D2); // serial tx, serial rx, reset pin; int main() { uLCD.background_color(WHITE); uLCD.cls(); // basic printf demo = 16 by 18 characters on screen uLC...
4a98f9e5a89726813c00d9f43667adcee531dacc
57020cd1f04a33c218b115870ea185b5cef1a90a
liulianyou/KayakGame
/Game/Kayak/Plugins/Item/Source/Item/Private/ItemInventoryInterface.cpp
C++
cpp
606
no_license
#include "ItemInventoryInterface.h" #include "ItemDefinition.h" UItemInventoryComponent* IItemInventoryInterface::GetItemInventoryComponent() const { UItemInventoryComponent* Result = nullptr; if (_getUObject()->GetClass()->IsFunctionImplementedInScript(GET_FUNCTION_NAME_CHECKED(IItemInventoryInterface, OnGetItemIn...
a269957a204bce8397036eb3b24c54629cf1bc7b
cb3a7c15f509581d007d4209faa46d9b8773e37c
blegloannec/CodeProblems
/CodeChef/Contests/JuneChallenge17/sbtr.cpp
C++
cpp
3,747
no_license
#include <cstdio> #include <vector> #include <cstdlib> #include <algorithm> #include <queue> using namespace std; /* Derniere version soumise du code, mais pas celle donnant le meilleur score. L'approche gloutonne ne permet pas d'ameliorer le score, le meilleur score est obtenu sans utiliser greedy_bfs, avec 115...
03566a5fc079250cc64dbfe5a6696d723b18fb0f
d0825115a5f17c9bcc34a02d70a902752bb23c14
strategist922/Programming-Training
/剑指Offer编程66题/018_二叉树的镜像.cpp
C++
cpp
916
no_license
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { public: void Mirror(TreeNode *pRoot) { if(pRoot==NULL) return; /* 递归实现 TreeNode* tmp; tmp = pRoot->...
4658ea4d4a1dd4e44b8be933def6ae7a653696a9
c7fe4ceb037cb1fac0e330d3e728b3fa1d0777b4
kleikanger/vmc
/ipdist/ipdist.cpp
C++
cpp
7,499
no_license
#include "ipdist.h" #include "../newmatrix/newmatrix.h" #include <cmath> #include <iostream> #include <cstdlib> #include <mkl_cblas.h> #define H 0.001 #define ONE_OVER_H (double)1000 using std::cout; ipdist::ipdist(int n, int di, int iC) {/*//startvimfold*/ //storing class variables n_min_one=n-1; dim=di; iCutof...
96cc46111d813470b981bc49206d46abe7af0bd4
2af774ebaed6c50ed7057da2ebcac557230e8237
MarryMilkman/x-o
/inc/Human.hpp
C++
hpp
315
no_license
#ifndef HUMAN_HPP # define HUMAN_HPP # include "game_lib.h" # include "Game.hpp" class Human : public Player { public: Human(Map *map); ~Human(); int *step() override; void win_phrase() override; int is_human() override; private: int _check_coord(int const *coord) override; }; #endif
8a8d33ffa1b0cbfdc11118ee55edcf951dd30a37
3dd2482a1d42dfe4d99436ec0b59b2ca0964d3cb
DanielBG26/Exercises-c-
/Basics3/Arbres/Arbres2/Persona.cpp
C++
cpp
556
no_license
#include "Persona.h" ostream& operator<<(ostream &out, const Persona& p) { out << "(" << p.m_nom << ", " << p.m_edat << ")"; return out; } bool Persona::operator>(const Persona& p) { bool mesGran = 0; if (m_edat == p.m_edat) if (m_nom > p.m_nom) mesGran = 1; else if (m_edat > p.m_edat) mesGran...
7b8fc8194d3a6b35c2604bde5ca7aa939f4ef25f
7a6cbc5759ef4e96fb29796c4afde94c3e13fd92
psi29a/mygui
/Tools/ImageEditor/ImageExportSerializer.cpp
C++
cpp
6,447
permissive
/*! @file @author Albert Semenov @date 07/2012 */ #include "Precompiled.h" #include "ImageExportSerializer.h" #include "FactoryManager.h" #include "DataManager.h" #include "DataTypeManager.h" #include "PropertyUtility.h" namespace tools { FACTORY_ITEM_ATTRIBUTE(ImageExportSerializer) void ImageExportSerializ...
ad18ed4ad8b41360a8d3a132bcfd59c325993744
c28e4f02af16f363466ffb41137922126449f614
ndahlquist/nautilus
/common/transform.cpp
C++
cpp
6,273
permissive
// transform.cpp #include "transform.h" #include "Eigen/LU" std::stack<Matrix4f> model_view; std::stack<Matrix4f> projection; #define _USE_MATH_DEFINES // M_PI //Model-view //get the current matrix float* mvMatrix(){ float* mvMatrix = new float[16]; for(int i=0; i<4; i++) for(int j=0; j<4; j++) ...
f48d73b220e5b435c5a35396620ce1b78b91ef82
2a25c93ca1120b593ea71499a307729d7212e7d0
sidd-2203/Data-Structures-Algo-C
/TreeCode/Traversal/PerfectBinaryTree/PerfectTreeLevelOrderSet2.cpp
C++
cpp
1,729
no_license
#include <bits/stdc++.h> using namespace std; struct node { struct node *left, *right; int data; }; struct node *create_tree(int arr[]) { static int a = 0; struct node *temp; int x; temp = (struct node *)malloc(sizeof(struct node)); x = arr[a++]; if (x == -1) return NULL; te...
5197c8f7d5a288a4acb00fa1a4dc16892ad98c2e
f5ce06519e6222958dcebe10a24d9f0c143914cc
Freeddy-Djiotsop/MatrixCPlusPlus
/matrix_main.cpp
C++
cpp
1,477
no_license
//Matrix mit dynamischen Speicherverwaltung //Die Deklaration der hier verwendete Funktion sind in .hpp Files zu finden // und derer tatsächlischen Defintion in .cpp Files #include <iostream> #include <iomanip> #include "matrix_arith.hpp" #include "matrix_dyn.hpp" #include "matrix_io.hpp" using namespace std; i...
b553b2845b69f5b2e6c732c13223f5973371ccad
2511c4161b4ee222d8a4f3be9be40e13666210e5
LimeFallacie/GPA
/Src/GPUPerfAPICounterGenerator/PublicCounterDefsCLGfx8_Fiji.cpp
C++
cpp
1,047
permissive
//============================================================================== // Copyright (c) 2010-2018 Advanced Micro Devices, Inc. All rights reserved. /// \author AMD Developer Tools Team /// \file /// \brief PublicCounterDefinitions for CLGFX8_FIJI //=============================================================...
a5654e9f581ef7365c8206feb27c1b60a7f2ca71
5360dae7a83c13f637f9382b27cd9841918c2c8b
AfzalivE/NachOS
/code/filesys/filesys.cc
C++
cc
12,684
permissive
// filesys.cc // Routines to manage the overall operation of the file system. // Implements routines to map from textual file names to files. // // Each file in the file system has: // A file header, stored in a sector on disk // (the size of the file header data structure is arranged...
ae0563e2fa7c03a7e73e3215bc1bcacff1391a07
349199fb657a09a59de70479713276fa5cd7ff95
PopCap/GameIdea
/Engine/Source/Runtime/Core/Private/Apple/ApplePlatformSymbolication.cpp
C++
cpp
19,688
permissive
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. /*============================================================================= ApplePlatformSymbolication.cpp: Apple platform implementation of symbolication =============================================================================*/ #include "CorePri...
dce13047141f28d424c0f68447faf6cd2ebfdd90
bbf8a981d8dd5b26404c8a1040842babfa7a74f2
song1223/MRSim
/MRSim_SECDED/src/Tester.cc
C++
cc
4,422
no_license
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <math.h> #include "Config.hh" #include "Tester.hh" #include "Scrubber.hh" #include "FaultDomain.hh" #include "DomainGroup.hh" #include "codec.hh" //------------------------------------------------------------------------------ char errorName[][10] = ...
68effeb4b7bc2010d0cce6969bc33cc3465e3713
c183843a9671899fa3cf2932a62bbb1b511f046a
fcccode/vt5
/comps/docs/ScriptDoc/scriptactions.cpp
C++
cpp
9,883
no_license
#include "stdafx.h" #include "scriptdoc.h" #include "scriptactions.h" #include "core5.h" #include "ScriptDataObject.h" //[ag]1. dyncreate IMPLEMENT_DYNCREATE(CActionStartDebugger, CCmdTargetEx); IMPLEMENT_DYNCREATE(CActionToggleBreakpoint, CCmdTargetEx); IMPLEMENT_DYNCREATE(CActionBreakAtNextStatement, CCmdTargetEx);...
31be3ecf103949e0cf47fc1cdda7ddabf73dbca6
2da8ca6f1907aab41f530096759edbe103f80798
keichi/ADIOS2
/examples/heatTransfer/read_fileonly/heatRead_adios1.cpp
C++
cpp
2,878
permissive
#include <cstdint> #include <iomanip> #include <iostream> #include <math.h> #include <memory> #include <stdexcept> #include <string> #include <adios_read.h> #include <mpi.h> #include "PrintData.h" int main(int argc, char *argv[]) { MPI_Init(&argc, &argv); if (argc < 2) { std::cout << "Not enoug...
8b4612c551eeee5dc49c328f58bbcb4de18c2b54
a5bc2e1ad6f9fef4745a200a8261f61b086ba654
EeroHeikkinen/ThreadedEngine
/src/test_models.hh
C++
hh
609
no_license
#ifndef TEST_MODELS_HH #define TEST_MODELS_HH #include <GL/GLEW.h> namespace Test{ void makeBox(GLuint& VBO_, GLuint& IBO_, GLuint& VAO_, size_t& numIndices_, float xSize, float ySize, float zSize); void ma...
24fb940feb019a3b3abe2ace0572d64660397823
9ebe7f346e29279901c22defc20def70e249fac2
algo-imp/algorithm-practice
/topcoder/srm600-div2-prob1.cpp
C++
cpp
741
no_license
/* * srm600-div2-prob1.cpp * * Created on: Jun 2, 2014 * Author: vietnguyen */ #include <iostream> #include <vector> #include <algorithm> #include <limits> using namespace std; class TheShuttles{ public: int getLeastCost(vector<int> cnt, int baseCost, int seatCost){ sort(cnt.begin(), cnt.end()); int ...
0603ec37d56e80d48e4d8f220853171b8844e2cd
793f6214aea33ee44d8e19927c15004d4b49b9c1
ms303956362/myexercise
/Cpp/codeforces/cf/818/C.cpp
C++
cpp
2,549
no_license
// IO #include <iostream> #include <sstream> // ordered container #include <vector> #include <deque> #include <list> #include <forward_list> #include <string> #include <stack> #include <queue> // associative-container #include <map> #include <set> #include <unordered_map> #include <unordered_set> // algorithm #include ...
b92d5bd7fb863465ca19a8b72e6101f9cedf5c74
c696c5855ff87b1affcb819c3fc82b65acd9c268
TrellixVulnTeam/proto-quic_1V94
/src/base/android/animation_frame_time_histogram.cc
C++
cc
1,235
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/android/animation_frame_time_histogram.h" #include "base/android/jni_string.h" #include "base/metrics/histogram_macros.h" #include...
061d0984d75c165047d6de0a937d42f62e50c3a4
540256e9e868def62dce360c0612d6166cf71269
Saphirant/ReseauNeuronal
/ReseauNeurone/PerceptronMulti.cpp
C++
cpp
3,295
no_license
#include "PerceptronMulti.h" namespace NeuralNetwork { PerceptronMulti::PerceptronMulti(std::vector<double> input, std::vector<std::tuple<int, Neurone::NeuroneType, double>> couche, int nSortie) : m_input(input), m_nSortie(nSortie), m_nCouche((int)couche.size() + 1) { //tuple = Nombre de neurone par ...
42edddffe4701eb911d5d8cee138f61ace615809
60ca7e9cf540702d77ee6c24519b47f6e44d8777
waves123/1912
/1912/1912.cpp
C++
cpp
355
no_license
#include <iostream> #include <algorithm> using namespace std; int a[100000], d[100000]; int main() { int n, ans; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } d[0] = a[0]; for (int i = 0; i < n; i++) { d[i] = max(a[i], d[i - 1] + a[i]); } ans = d[0]; for (int i = 0; i < n; i++) { ans = max(ans...
54ff7dd86a34c2c9468e040549346a2dfed95290
83c80df6c58bb7dfefd4dd75235a36c0a4f56782
slaakko/cminor
/parsing/XmlLog.cpp
C++
cpp
1,029
no_license
// ================================= // Copyright (c) 2017 Seppo Laakko // Distributed under the MIT license // ================================= #include <cminor/parsing/XmlLog.hpp> #include <cminor/parsing/Utility.hpp> #include <algorithm> namespace cminor { namespace parsing { void XmlLog::WriteElement(const std:...
bb3ff54605d3d067b81f28fc8c16adc81dfed3ee
e7229c9cf5d6ed527da979c57659ec2212558700
MayankChaturvedi/competitive-coding
/stanford-algos/2SAT_papadimitriou_original.cpp
C++
cpp
1,868
no_license
#include <cstdio> #include <bitset> #include <utility> #include <random> #include <iostream> using namespace std; int main() { long long n; scanf("%Ld",&n); int vars[n]; //or int vars[n]; pair<int, int> inp[n]; for(int i=0; i<n; i++) { scanf("%d %d", &inp[i].first, &inp[i].second); } ...