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
2acefe45e31af381b9339e7fef8fd194b281c759
8579f67b10aa0aed721a47392b4411cac9cfbf49
TencentCloud/tencentcloud-sdk-cpp
/yunjing/src/v20180228/model/DescribeWeeklyReportMalwaresResponse.cpp
C++
cpp
5,707
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
abb942ab1e1cc86872f79b72a3a4969d5b8f9566
4c89cfc46ebc4c7ff692e1f7a6a54b981ca3b8c5
FedeGB/7559-TP1
/src/Estructuras/Semaforo.cpp
C++
cpp
2,053
no_license
#include "Semaforo.h" Semaforo::Semaforo(int projID, const int valorInicial, bool undo) : valorInicial(valorInicial), undo(undo) { key_t clave = ftok("/bin/mv", projID); this->id = semget(clave, 1, 0666 | IPC_CREAT); this->inicializar(); } Semaforo::~Semaforo() { } int Semaforo::inicializar() const { ...
7862f203eee21905b16f6e07b86b03d36fd74a84
0de88bbb696c1819cd887dc17bea0b776a362e06
moukayz/AlgorithmTraining
/leetcode/16.cpp
C++
cpp
1,309
permissive
/* 3Sum Closest Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution. Example: Given array nums = [-1, 2, 1, -4], and target = 1. The sum that ...
882164ee39f97e526f5c263e25ac6b459aec732f
271fc0fa9b306817b6054a773539e33a69689bd1
brightface/2020_CppProblem
/MyHammingDistance/MyHammingDistance/MyHammingDistance.cpp
C++
cpp
1,348
no_license
#pragma once #include "MyHammingDistance.h" #include <iostream> using namespace std; #define XOR(a,b) (!(a)^!(b)) // constructors MyBinaryNumber::MyBinaryNumber() :value(0) { } MyBinaryNumber::MyBinaryNumber(unsigned int val) : value(val) { } // accessor functions unsigned int MyBinaryNumber::getValue() const { r...
9ebf41f5b7855305b48ca2dbb20cfc8dc591a6ba
c39fd2ddff8f97b56c5c96baee8ec8277cd2d96f
RanJi0128/Chromium-customization
/upp/uppsrc/Draw/DrawTextUtil.cpp
C++
cpp
2,636
permissive
#include "Draw.h" namespace Upp { void DrawTextEllipsis(Draw& w, int x, int y, int cx, const wchar *text, const char *ellipsis, Font font, Color ink, int n) { if(n < 0) n = wstrlen(text); FontInfo f = font.Info(); const char *s; int dtl = 0; int el = 0; for(s = ellipsis; *s; s++) { dtl += f[*s]; e...
9b6e4685a61512688216752dbd67e14c8053fe7e
d9adb4e5fa2057df1272eaacb95ea0c3bbc6360b
radtek/MTI_WINCE317_BSP
/PLATFORM/TI_EVM_3530/SRC/Ctlpnl/Cplmain/stylus.cpp
C++
cpp
10,441
no_license
// // Copyright (c) Microsoft Corporation. All rights reserved. // // // Use of this sample source code is subject to the terms of the Microsoft // license agreement under which you licensed this sample source code. If // you did not accept the terms of the license agreement, you are not // authorized to use this samp...
cfff9450beddc46f695e389734d7294363cd219e
02abc62ff6db8c7456c2e9e9c3c8d7b66e77fb86
minaricious/algoritma_bab7
/nomor 3 hal 41 do while.cpp
C++
cpp
305
no_license
#include <stdio.h> #include <conio.h> #include <iostream> using namespace std; int main() { int a, n; float nilai, rata; nilai=0; cout<<"Masukkan Nilai = "; cin>>n; do { nilai=nilai+a; a++; } while (a<=n); cout<<"Nilai Total = "<<nilai<<endl; rata=nilai/n; cout<<"Rata-rata = "<<rata; }
6368c70d354e02d54f64f256779220a2948e0aa7
95e5aa84049dd0b366a16c27348038e0d8fad54d
wilmercastrillon/Algoritmos
/estructuras_de_datos/disjoint_set_union_find.cpp
C++
cpp
1,417
no_license
#include <iostream> #include <vector> using namespace std; const int MAX = 100; struct union_find{ int padre[MAX], rango[MAX];//Rango opcional void iniciar(int n){ for (int i = 0; i < n; i++){ padre[i] = i; rango[i] = 0; } } int raiz(int x){ if(x == padre[x]) ret...
c8b66e025a67a2e2e1415d32d6220dd384c14463
4c8ba975badf081f783e3a1bcef8372b98ba095c
bstaletic/NanoRange
/include/nanorange/detail/iterator/indirect_callable_concepts.hpp
C++
hpp
7,296
permissive
// nanorange/detail/iterator/indirect_callable_concepts.hpp // // Copyright (c) 2018 Tristan Brindle (tcbrindle at gmail 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 NANORANGE_DETAIL_ITERATOR_IN...
93ad5ba65df2bd65825308343a3d9bced94b3bca
1a0c3add635e42e0369f4552c1609eed6d40bf99
demonsheart/C-
/rongyu/homework1/file2/2018192044_1235_姝g‘_559.cpp
C++
cpp
1,274
no_license
#include <iostream> using namespace std; #include<iomanip> class Geometry { public: Geometry(){} virtual double getArea()=0; //计算面积,结果保留小数点后两位 virtual ~Geometry(){} }; class Rect:public Geometry { double l,h; public: Rect(double l1,double h1):l(l1),h(h1){} double getArea() { return l...
4097715ac3b90bfeaa6929f17669bf6ddc813b16
8ed76cab53318fbe122aa50ce36ae33516042b38
NaviPolytechnique/GUI
/GUI/GUI/WidgetsUsed/AttitudeMeter/attitudemeter.cpp
C++
cpp
1,807
no_license
#include "attitudemeter.h" #include "ui_attitudemeter.h" AttitudeMeter::AttitudeMeter(QWidget *parent) : QWidget(parent), ui(new Ui::AttitudeMeter) { ui->setupUi(this); //init horizon artificiel mAttitudeGauge = new QcGaugeWidget; mAttitudeGauge->addBackground(79); QcBackgroundItem *bkg ...
0e095d9bdf0c6c7bfb4dfc9cd6c99e236ad94134
547088c98c71da590883e6e21bad161345560eb9
marc-hanheide/cogx
/vision/trunk/tools/hardware/tts/src/c++/components/TTSServerDoubleTalk.hpp
C++
hpp
543
no_license
#ifndef TTS_SERVER_DOUBLETALK_HPP_ #define TTS_SERVER_DOUBLETALK_HPP_ #include <cast/architecture/ManagedComponent.hpp> class TTSServerDoubleTalk : public cast::ManagedComponent { public: TTSServerDoubleTalk(); /** * Empty destructor. */ virtual ~TTSServerDoubleTalk(){}; protected: virtual v...
83f2b164f57d0a49df19c303188d5d5c1807a8b1
dd87c9e7600d22e1434d393c67ce9710d17cbe19
marcelarosalesj/metal
/mtce/src/pmon/pmonInit.cpp
C++
cpp
16,819
permissive
/* * Copyright (c) 2013-2016 Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 * */ /** * @file * Wind River CGCS Platform Process Monitor Service Header */ #include "pmon.h" #include "alarmUtil.h" /* for ... alarmUtil_getSev_str and alarmUtil_query_identity */ #include "pmonAlarm.h" ...
5161c83fd50173d2f649c9f445106c49055d71e9
acfa8c74836c7f34372a3c925e2b49b2a33c733c
RizkiePratama/bx
/src/string.cpp
C++
cpp
27,079
permissive
/* * Copyright 2010-2023 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx/blob/master/LICENSE */ #include <bx/allocator.h> #include <bx/file.h> #include <bx/hash.h> #include <bx/string.h> namespace bx { inline bool isInRange(char _ch, char _from, char _to) { return unsigned(_c...
0a54eecf21287a3563874823d2f30d8dbe74d81a
e31bc3cbe6b293d03360791d1a257fcbe3b694e4
OpenXRay/xray-15
/cs/sdk/3d_sdk/maya/ver-8.5/devkit/plug-ins/ribExport.cpp
C++
cpp
83,203
permissive
//- // ========================================================================== // Copyright (C) 1995 - 2006 Autodesk, Inc. and/or its licensors. All // rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files contain unpublis...
2031e333f685e58e4a5fb744c08c1341aae224a3
a1f5735b3b92be2379b11964cd907728333b3346
z0CoolCS/CompetitiveProgramming
/UVA/208-Firetruck.cpp
C++
cpp
898
no_license
#include<bits/stdc++.h> using namespace std; int cont; bool state[21]; int obj; void dfs(int i,vector<int> &r,vector<int>*n){ for(int &x:n[i]){ if(x==obj){ cont++; cout<<" "; for(int &y:r) cout<<y<<" "; cout<<obj<<endl; continue; } if(!state[x]){ state[x]=1...
f53ba5eab703e05080f8752e48c467a00dc350bf
d83d28add2d189096be1dbb615841f29f3ede332
sysrqb/chromium-src
/third_party/WebKit/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
C++
cpp
30,333
permissive
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
b20c3012758279e46b1c16514130018d26c635b6
1024c75d1114c959a9036d71149020aa7094d556
Veiasai/CSE-lab
/lab3/lock_client_cache.cc
C++
cc
3,942
no_license
// RPC stubs for clients to talk to lock_server, and cache the locks // see lock_client.cache.h for protocol details. #include "lock_client_cache.h" #include "rpc.h" #include <sstream> #include <iostream> #include <stdio.h> #include "tprintf.h" int lock_client_cache::last_port = 0; static u_int sendtime=5; enum {unl...
e6e2bdbead5161dd0e0403ef9d3c16a2f0d6cebb
7b20dd61056dc2f8936d169399743184e93f6ce1
Huangtuzhi/CppPrimer
/ch13/ex13_26.cpp
C++
cpp
3,250
no_license
#include <vector> #include <algorithm> #include <memory> #include <iostream> #include <initializer_list> #include <exception> #include <iostream> #include <fstream> using namespace std; class StrBlobPtr; class StrBlob { friend class StrBlobPtr; public: StrBlob(): data(make_shared<vector<string>>()) { } S...
b4439dae0f7a69d7b71b0502d07f2a660b4fb5c9
6472772fe13212118518e5749b8247fbba7ed36d
TrellixVulnTeam/proto-quic_1V94
/src/base/trace_event/memory_dump_scheduler.cc
C++
cc
3,979
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/trace_event/memory_dump_scheduler.h" #include <algorithm> #include <limits> #include "base/bind.h" #include "base/logging.h" #...
1b8e156bdee1d55c3814caa63a28f223ff486d41
9a25d9f7055382add23fc15e3751e6f93dabf5f3
Sanjo-A/LostInSpace
/Rock.cpp
C++
cpp
470
no_license
/******************************** *Name: Sanjo Abraham *Date: 05/31/19 *Description: Implementation file of Rock class, derived from ExtractableItem class ********************************/ #include "Rock.hpp" #include <string> using std::string; Rock::Rock(){ name = "Space Rock"; type = "Extract"; des...
63de1494c30f85a529efde4ba8ceee4dd9efd197
c3ab2ecc4068a8a51f6d43fb63fde6e8b221360f
eodabash/msdfgen
/ext/import-font.cpp
C++
cpp
4,908
permissive
#include "import-font.h" #include <cstdlib> #include <queue> #include <ft2build.h> #include FT_FREETYPE_H #include FT_OUTLINE_H #ifdef _WIN32 #pragma comment(lib, "freetype.lib") #endif namespace msdfgen { #define REQUIRE(cond) { if (!(cond)) return false; } class FreetypeHandle { friend FreetypeHandle * ...
8d454ed623adea0b6bca2b6126dcbdf034c58480
578e22d0c677268d4568c45b0754d27e8c4be7fa
kimdongi/opengl_example
/src/main.cpp
C++
cpp
2,712
no_license
#include"context.h" #include <spdlog/spdlog.h> #include <glad/glad.h> #include <GLFW/glfw3.h> void OnFramebufferSizeChange(GLFWwindow* window, int width, int height) { SPDLOG_INFO("framebuffer size changed: ({} x {})", width, height); glViewport(0, 0, width, height); } void OnKeyEvent(GLFWwindow* window, ...
d8ecbbba672de031ba5e5a453a94e07b12f5fecd
c9022efa142714d974d5ac2a88bb03272a38399b
Karikari1234/coding
/July 2020/Week 3/Day 4/Contest/6.cpp
C++
cpp
859
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, a, b) for (i = a; i < b; i++) #define REP_ITER(it, v) for (it = v.begin(); it != v.end(); it++) #define FASTIO \ ios::sync_with_stdio(false); \ cin.tie(0) #define TEST(test) \ int test; \ cin >...
1082bab0c7e55fee1470ef4d9f27b1bc4af95b10
e880e1b8b9d4249e61757064643b0154ae8e7951
thak1411/rn-algo-set
/src/AC_BEG_188/C.cc
C++
cc
589
no_license
#include <algorithm> #include <utility> #include <cstring> #include <cstdio> #include <vector> #include <string> typedef long long ll; int ar[1000000], r1, r2; int query(int l, int r) { if (l == r) return l; int m = (l + r) / 2; int p = query(l, m); int q = query(m + 1, r); if (ar[p] < ar[q]) { ...
0bec71a11945fbba38708a83ea9fb659bd1e270e
dbd545b465e8a93db0404ee3f3552e8a8f70d60f
OlegZhavoronkov/tmk_dcl_certification
/libdclalgo/tests/ZenithEvaluationTests.cpp
C++
cpp
4,758
permissive
#include "ZenithEvaluation.h" #include "MapToMat.h" #include <gtest/gtest.h> #include <iostream> #include <limits> #include <opencv2/core.hpp> class ZenithEvaluationTests : public ::testing::Test { public: ZenithEvaluationTests(); cv::Mat genRandomMat(double min, double max); protected: cv::Mat dop; cv::...
51d058de4e50eb42a70cdde563f69152d4a0fb00
1200ffa4360c2524caf6f3f7e52ba955bfd23319
Harshavardhan341/ign-gazebo
/include/ignition/gazebo/EntityComponentManager.hh
C++
hh
39,276
permissive
/* * Copyright (C) 2018 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
ed9c0c76569c37cf3e7f531e757bb5be10a0399f
8706e30ee0187296bc0d8e29036ea17df8ee8e64
yezhizhen/stcsp-solver
/token.cpp
C++
cpp
3,379
permissive
#include <cstdio> #include <cstdlib> #include <cstring> #include "util.h" #include "node.h" #include "token.h" #include "y.tab.h" Token *tokenNew(int id, char *str, int level) { Token *token = (Token *)myMalloc(sizeof(Token)); token->id = id; token->str = strdup(str); token->level = level; token->n...
a2e64d99adeb5ca2a7bc85cadde7d314fdaedc61
959eee73a415a7cf0e1bbef58d1c6fa518651d74
wszk1992/LeetCode-Survival-Notes
/238.product-of-array-except-self.72811118.ac.cpp
C++
cpp
423
no_license
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int n = nums.size(); int pre = 1; int rev = 1; vector<int> result(n, 1); for(int i = 1; i < n; i++) { result[i] *= pre * nums[i - 1]; result[n - i - 1] *= rev * nums[n - i]; ...
abc84d9e8539c396ae8753a366e65c976c114d9b
05e706799ca2073083889b44451188b9346f3e40
AnAtlas/WizardArena
/WizardArena/EventManager.hpp
C++
hpp
3,727
no_license
#pragma once #include <SFML/Window.hpp> #include <SFML/Graphics.hpp> #include <vector> #include <unordered_map> #include <functional> #include <fstream> #include <sstream> #include <iostream> enum class EventType{ KeyDown = sf::Event::KeyPressed, KeyUp = sf::Event::KeyReleased, MButtonDown = sf::Event::MouseButtonP...
7a8cf62e0351cb8708dc13b73a29a2949e0da964
a9a8085c55bcae5ecfa0972b38706623bd580e60
551100kk/NPSC-Junior
/2014-final-junior/a.cpp
C++
cpp
407
no_license
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> par; typedef long long int LL; #define x first #define y second int main(){ int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); if (n == 0) putchar('0'); string ans; if (n % 9) printf("%d", ...
e6b61b228221df91e1407409f56feff8a66a0ad6
09597950adddcdb9fb73a31defedeb4b8eb10a2c
0xc0dec/solo
/vendor/assimp/4.1.0/code/OgreStructs.cpp
C++
cpp
34,261
permissive
/* Open Asset Import Library (assimp) ---------------------------------------------------------------------- Copyright (c) 2006-2017, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions...
354d92668de6590047afa5e21d5456b95115a1b5
df3219de5e6b97b2cb035f14008f1d3090ee5be6
shj4849/Fuse
/날씨/build/Android/Debug/app/src/main/jni/Uno.Platform.EventSources.g.cpp
C++
cpp
9,487
no_license
// This file was generated based on '(multiple files)'. // WARNING: Changes might be lost if you edit this file directly. #include <Uno.Bool.h> #include <Uno.Delegate.h> #include <Uno.EventHandler-1.h> #include <Uno.Int.h> #include <Uno.Object.h> #include <Uno.Platform.Applicat-bf686309.h> #include <Uno.Platform.Appli...
65383ce16b24861bc0065378d82dd7fd57751fad
29b147be783467660639331b14e479d7beceda62
Ashatta/trikRuntime
/trikScriptRunner/src/scriptRunnerProxy.cpp
C++
cpp
2,105
permissive
/* Copyright 2013 Yurii Litvinov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
2286bf675308c02c1679b03072ed8118d75a8250
4e10be2513dd1bdac5ae2d53a43239f4f958ab45
farfromrefug/mobile-carto-libs
/vt/src/vt/StrokeMap.cpp
C++
cpp
3,782
permissive
#include "StrokeMap.h" #include "BitmapManager.h" namespace carto { namespace vt { StrokeMap::StrokeMap(int width, int maxHeight) : _width(width), _maxHeight(maxHeight), _height(0), _strokeMap(), _bitmapStrokeMap(), _bitmapPattern(), _mutex() { int height = 1; std::vector<std::uint32_t>...
37952772b991a3c4c54dcf672f89ca2704ce9843
15c20329c8b126d10cc27c03517ebb332c3193e4
omenyrobert/fingerprintauthentication
/SubDlgChanCfg.cpp
C++
cpp
19,495
no_license
// SubDlgChanCfg.cpp : implementation file // #include "stdafx.h" #include "EHomeDemo.h" #include "SubDlgChanCfg.h" // CSubDlgChanCfg dialog IMPLEMENT_DYNAMIC(CSubDlgChanCfg, CDialog) CSubDlgChanCfg::CSubDlgChanCfg(CWnd* pParent /*=NULL*/) : CDialog(CSubDlgChanCfg::IDD, pParent) , m_dwSelfDefBitrate(...
2bb1ca61980747ca5e52bafcd0553b0061896c4e
05dec3fc9c06cb8311a8440090d549d9acde143a
Jerrycpp/PhuLapTrinhCpp
/phulaptrinhcpp/tichmax.cpp
C++
cpp
858
no_license
#include <iostream> using namespace std; int n; int arr[10001]; void Input(){ scanf("%d\n",&n); for (int i = 1;i<=n;i++){ scanf("%d\n",&arr[i]); } } void QuickSort(int l,int r){ int x = arr[(l+r)/2]; int i = l; int j = r; while (i<=j){ while (arr[i]<x) i++; while (ar...
f98903d5eb83749aac0b9f42f230c9f212f7e774
271262616fbcdbde155a2823e9fb30339ecd147b
Robiul001/Codeforces
/459A.cpp
C++
cpp
473
no_license
#include<bits/stdc++.h> using namespace std; int main() { int x1,y1,x2,y2; cin>>x1>>y1>>x2>>y2; if(((x1!=x2) && (y1!=y2)) && (abs(x1-x2)!=abs(y1-y2))) { cout<<-1; } else if(x1==x2) { cout<<x1+abs(y1-y2)<<" "<<y1<<" "<<x2+abs(y1-y2)<<" "<<y2; } else if(y1==y2) { ...
fd9eb1b3b38fcb1a739b87bbd37c9b707e5f6768
dea92c810dc4163c60768f06626168f967691721
xuguozhi/mnn_example
/src/common/common.cpp
C++
cpp
2,729
permissive
#include "common.h" #include <algorithm> #include <iostream> #include "opencv2/imgproc.hpp" namespace mirror { uint8_t* GetImage(const cv::Mat& img_src) { uchar* data_ptr = new uchar[img_src.total() * 4]; cv::Mat img_tmp(img_src.size(), CV_8UC4, data_ptr); cv::cvtColor(img_src, img_tmp, cv::COLOR_BGR2RGB...
e7e697721d252809582e57adda3df40de55c02bf
b33d1116f96cc55b5d9d787002ff33f2cde4372b
SuperRonan/MyOpenGL
/src/lib/Window.cpp
C++
cpp
1,388
no_license
#include "Window.h" #include <iostream> namespace lib { void framebuffer_size_callback(GLFWwindow* window, int width, int height) { glViewport(0, 0, width, height); } Window::Window(int width, int height, const char* name, bool center) : m_monitor(glfwGetPrimaryMonitor()), m_window(glfwCreateWindow(widt...
61efcc94620de1c32751d67d42fbcd7896e4fd75
507518b1faeb858b604863337347498a0b578194
amassiro/HIGSTXS
/weight2MINLO.cc
C++
cc
1,199
no_license
#include "TFile.h" #include "TGraph.h" #include <algorithm> // ---- for std::min std::vector<TGraph*> _weightSources; TFile* _source = TFile::Open("NNLOPS_reweight.root"); void initialize_weight2MINLO (){ for (unsigned iJet = 0; iJet != 4; iJet++) { _weightSources.push_back( (TGraph*) (_source->Get(TSt...
53cf744712df4dad7f8c2cf4d087e890e50819d1
19ff554c66995d5aad2b29a97e548d4ab18d9389
iliayar/ITMO
/Term2/CXX/8-puzzle-iliayar/src/solver.cpp
C++
cpp
3,779
no_license
#include "solver.h" #include "board.h" #include <algorithm> #include <memory> #include <queue> #include <unordered_map> namespace { using table_type = std::vector<std::vector<unsigned>>; struct table_hash { static const std::size_t BASE = 31; static const std::size_t MOD = 1337269; std::size_t operator()...
8a6717b2e9608da0b68d559cc0733f8106c32260
605e36a4eb58fff91b6a87d280d744da1ba466f1
Tingoles/CTP_SFML_Implementation
/Project/GameTimer.cpp
C++
cpp
285
no_license
#include "GameTimer.h" GameTimer* GameTimer::game_timer_instance; void GameTimer::Tick() { delta_time = clock.restart(); } GameTimer * GameTimer::getGameTimerInstance() { if (game_timer_instance == 0) { game_timer_instance = new GameTimer(); } return game_timer_instance; }
076476797e0a06a19a610abfc56d1dd1f1de729f
79afcf6f1e67c9541d11398d5f6763e3fbe44820
thienchidh/ListBaiTapCoBan_C-_-_DeBai
/363_.cpp
C++
cpp
1,035
no_license
/* Bài 363: Liệt kê các cột tăng dần trong ma trận*/ #include<bits/stdc++.h> using namespace std; #define MAX 100 void NhapMang(int a[][MAX], int &dong, int &cot) { cin >> dong >> cot; for(int i = 0; i < dong; i++) { for(int j = 0; j < cot; j++) { cin >> a[i][j]; } } } void X...
471a8a0a2dc2845ef0e32ddd2d087fabb29b4981
5eea9e3ecc5611941d5d884d0f6a053f88b14edc
ReturnCoin/ReturnCoin
/src/rpcdump.cpp
C++
cpp
10,935
permissive
// Copyright (c) 2009-2012 Bitcoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <iostream> #include <fstream> #include "init.h" // for pwalletMain #include "bitcoinrpc.h" #include "ui_interface.h" #in...
8266374c0221648343c863535664bc349468e822
2e3e04414287b9594dcb60be5b6a11dacdf808ec
hyller/GladiatorLibrary
/QP/v2.2.3/CPP/QPATTERN/COMP.CPP
C++
cpp
6,212
permissive
///////////////////////////////////////////////////////////////////// // QP comp.cpp -- "Orthogonal Component" state pattern example // Copyright (c) 2002 Miro Samek, Palo Alto, CA. // All Rights Reserved. ///////////////////////////////////////////////////////////////////// #include <windows.h> #include <string...
2b17c99771ce19324c34d330b3d2f64f11422f7a
210119fd760a99172f21e6f20cf78c1941d9db01
hlzz/dotfiles
/graphics/VTK-7.0.0/Common/Core/vtkBoxMuellerRandomSequence.cxx
C++
cxx
3,122
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkBoxMuellerRandomSequence.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
b57cfc67e48e4126d6331d273c267e3e6ec0efc3
01d4943463740131bea32cd4ddd922010f551a54
vritzcoin/vritzcoin
/src/bench/lockedpool.cpp
C++
cpp
1,244
permissive
// Copyright (c) 2016 The Vritzcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <bench/bench.h> #include <support/lockedpool.h> #include <iostream> #include <vector> #define ASIZE 2048 #define BIT...
008f7084a97acbdf468e0a1c14270c25e3d21bfd
d92304712e4eceafce583d3c343c1e8dd43cbe77
ulasguner/Space-Runner
/sources/SpaceRunner/core/Game/StateProcessors/Race/Space/Sparks.cpp
C++
cpp
1,461
no_license
#include "Sparks.h" #include "Render/SceneSector.h" #include "RenderProcessor.h" #include "Render/ParticleSystem.h" namespace CoreEngine { Sparks::Sparks(Vector3 offset, float speedMultiplier) : SpaceObject(offset, 0) , _multiplier(speedMultiplier) { auto sceneManager = RenderProcessor:...
7f7ee6f865da6462c0bfe18713a62941635162fd
4c95300ed191034ea7001039acb4750c0c598b68
sharfiky/splay
/main.cpp
C++
cpp
302
no_license
#include "ialgo.h" #include "splay.h" #include "tester.h" int main() { UnRandomTree hard; SimpleRealization simple; checker(generateFirstTest(10000, 100), &hard, &simple); hard = UnRandomTree(); simple = SimpleRealization(); checker(genLittleTest(10000, 100), &hard, &simple); return 0; }
5840d38b13f2aa8cc398ecf54e4757ad69e78e22
184e93851436ab0b8a9e0cd49ecb358343f8d1a1
knobik/source-python
/src/thirdparty/boost/boost/mpl/replace.hpp
C++
hpp
1,330
no_license
#ifndef BOOST_MPL_REPLACE_HPP_INCLUDED #define BOOST_MPL_REPLACE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright John R. Bandela 2000-2002 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or cop...
4401e9ee49937c457cd688fa8a44a966112df063
ff463e3858ec48062667339a0e2f046fb6e229e6
sr3dna/opentoonz
/toonz/sources/tnztools/bluredbrush.cpp
C++
cpp
16,359
permissive
#include "bluredbrush.h" #include "tropcm.h" #include "tpixelutils.h" #include <QColor> namespace { static QVector<QRgb> colorTable; QImage rasterToQImage(const TRasterP &ras, bool premultiplied = false) { QImage image; if (TRaster32P ras32 = ras) image = QImage(ras->getRawData(), ras->getLx(), ras->getLy...
f3536d8976430eae4d6f217c1246f4fee5e2316d
86dbdacd6448dc2cfa1ac056c1aa354f841c6393
igoroogle/codeforces
/shvec/ZAD_E.cpp
C++
cpp
1,986
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 2000000010; int as[100010], bs[100010], cs[100010], mas[100010]; int main() { int a = 0, b = 0, c = 0, n, a1, i; as[0] = -INF; bs[0] = -INF; cs[0] = -INF; cin >> n; for (i = 1; i <= n; i++) scanf("%d", &m...
14461a80451f979201a5369728b0caf26f83adcb
32d29857188b3cf1886faf9599d8353a9fd6c1fa
jaimeleonh/cmssw
/SimMuon/Neutron/src/RootNeutronWriter.cc
C++
cc
1,591
permissive
#include "SimMuon/Neutron/src/RootNeutronWriter.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" using namespace std; #include <iostream> RootNeutronWriter::RootNeutronWriter(const string & fileName) { theFile = new TFile(fileName.c_str(),"update"); } RootNeutronWriter::~RootNeutronWriter() { for(s...
f47410c7d841cfc52c4105dfea99a77f03b1ec8e
921d9808e52961c2199b36a16e9ef34c861b8435
z34hyr/school21_projects
/10_cpp_modules/module_01/ex03/Zombie.hpp
C++
hpp
327
no_license
#ifndef ZOMBIE_HPP # define ZOMBIE_HPP # include <iostream> # include <string> class Zombie { public: Zombie(); ~Zombie(void); void announce(void); void set_name(std::string name); void set_type(std::string type); private: std::string _name; std::string _type; static std::int16_t _total; }; ...
8440397f4e4318a4626502b20bae0bc548dcff44
ed77fd0071b4c2b940e4105800320cd1050c2d3d
phisiart/peloton
/src/type/integer_parent_type.cpp
C++
cpp
1,325
permissive
//===----------------------------------------------------------------------===// // // Peloton // // numeric_value.cpp // // Identification: src/backend/type/numeric_value.cpp // // Copyright (c) 2015-16, Carnegie Mellon University Database Group // //===-----------------------------------------...
7455e7a97ca5758c3358aecda58f39077d32d212
a1d4b5ab2eeaab8e3c5e50bb2b75bdfb241808f0
Sana-Gupta/Cplusplus
/Stacks and Queues/StackImplementation_dynamicAarray.cpp
C++
cpp
899
no_license
#include<iostream> using namespace std; template<typename T> class Stack{ T *arr; int currentSize; int maxSize; int rear; public: Stack(int ms = 10){ rear = -1; currentSize = 0; maxSize = ms; arr = new T[ms]; } bool empty(){ return currentSize == 0; } bool full(){ return currentSize >= maxSize; ...
41283f0c9b5f14399fb6565409ac719608ef2b8a
e5e556f72c30bf86f9c02669b8fb669384d35c75
SyojiTakahiro/GamePerformance
/吉田学園情報ビジネス専門学校 荘司雄大/ハッカソン作品/ハッカソン(2019年3月21日)/ソースコード/Source/Scene/Object/mountain.cpp
C++
cpp
5,044
no_license
//***************************************************************************** // // 山の処理[mountain.cpp] // Auther:Hodaka Niwa // //***************************************************************************** #include "object.h" #include "manager.h" #include "system.h" //**************************************...
708a5d47929596477ab6534d9940d88798b21af6
8566d0336be2f988f7ed92793732f0d38c4eba5b
TeodoraMaria/SnakeLearning
/src/AI/HardCoded/SingleBot.cpp
C++
cpp
1,912
no_license
#include "SingleBot.hpp" #include <random> #include <cstddef> using namespace AI::HardCoded; /* ** Utils */ template<typename Iter, typename RandomGenerator> Iter select_randomly(Iter start, Iter end, RandomGenerator& g) { std::uniform_int_distribution<> dis(0, std::distance(start, end) - 1); std::advance(st...
b2184e226222df7e0e6abe7adb0d763633fde34d
4423c6dfae53ecc7104fdddd58aff3f21bb609a9
Ailick/BPI-S905X3-Android9
/vendor/amlogic/common/npu/service/hal_limitation/nnapi_support/ANEURALNETWORKS_CONV_2D.hpp
C++
hpp
5,617
no_license
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * 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 ...
f65493c8edfd2def939936bebb56847e2734c5f7
99c9c95c0463fc91eb6bf8e40a8e0076b5dcd45d
huochaitiantang/ILabel
/config.cpp
C++
cpp
2,129
no_license
#include "config.hpp" nclude<string> #include<vector> #include<iostream> #include<dirent.h> #include<sys/stat.h> using namespace std; vector<string> getAllFiles(string directory, vector<string>& target){ vector<string> files; struct dirent* d_ent = NULL; DIR* dir = opendir(directory.c_str());...
b251f1fbbf5fa3defff0322d78287d1a11c26dc2
4d3f962daa7bcce44e0ffad2f45e330d0a909f3e
GITJambo/Dig-Craft
/Robo.cpp
C++
cpp
1,828
no_license
#include "Robo.h" #include "Projetil.h" #include "IdsEntidades.h" Robo::Robo(int xN, int yN, Mapa* mPtr) : Personagem(xN, yN, mPtr) { x = xN; y = yN; direcao = 1; id = IdsEntidades::Robo; animacao[1].loadFromFile("images/Wizard/i1.png"); animacao[2].loadFromFile("images/Wizard/i2.png"); animacao[3]....
90f40ce3db55c60b0d2fbf016bd4c0c496e3d870
0e740425cc9531329a3fb026ffcd73aa550eb84c
ric2b/Vivaldi-browser
/chromium/chrome/browser/ui/views/lens/lens_side_panel_controller.cc
C++
cc
8,871
permissive
// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/lens/lens_side_panel_controller.h" #include "base/bind.h" #include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics_action.h...
861fc5574f334db2c5dd79c47a0537aed3744f28
e9eeb8aa9ff56530da017dacbe7f00138c08a95f
Ivanhan2018/zsbbserver
/src/gmServer/NetTask.cpp
C++
cpp
5,932
no_license
#include "NetTask.h" #include "socketsvc.hpp" #include "gmThread.h" #include "gmFixData.h" #include "log.hpp" /*************************************************************************** // int 服务器ID // const char * 接收的数据 // unsigned int 接收数据的长度 // 返回0 ******************************************************************...
bce2aeffd6a24e9b96ed18ce34b034145dde9634
563f89fee13558bd8c1428e5811304ebcb72aa05
clotha87762/Pipelined-CPU-Simulator
/decoder.cpp
C++
cpp
2,040
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include "decoder.h" #include "simulator.h" extern simulator sim; using namespace std; void decodeData(FILE* F){ int i=0; int status; unsigned int data_temp=0; unsigned char byte; for(i=0;i<4;i++){ status = fread(&byte,sizeof(char)...
cf453e00c0eb21534702ff643eb49b43bae06760
9f88e27916320ceb28f1a91d3db051ff02e0a7f0
mzwtju/catkin_ws
/src/offboard/src/offboard_node.cpp
C++
cpp
3,875
no_license
/** * @file offb_node.cpp * @brief Offboard control example node, written with MAVROS version 0.19.x, PX4 Pro Flight * Stack and tested in Gazebo SITL */ #include <ros/ros.h> #include <geometry_msgs/PoseStamped.h> #include <mavros_msgs/CommandBool.h> #include <mavros_msgs/SetMode.h> #include <mavros_msgs/State.h> ...
99b9f8ed4c2dc334d09d014b2577ca1e06389f9e
ee8f065801b81155533d6d9873156c092dfd2bb4
kvr000/drt
/src/core/base/Shared.cxx
C++
cxx
6,644
no_license
/** * drt library * * drt multiplatform development toolkit * * ---------------------------------------------------------------------------------- * * Copyright (C) 2004-2008 Zbyněk Vyškovský * * ---------------------------------------------------------------------------------- * * LICENSE: * * This file i...
7331a72d10d2ba81086d7569a173f2680cfcde6a
e6845db30205d7fa70cccdbb3ea3c71532c12ac8
mmxsrup/procon
/aoj/v5/0596.cpp
C++
cpp
1,755
no_license
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(n);i++) const int INF = 1e9; int n, k; //町の数 道路の本数 int c[5010], r[5010]; //運賃 連続して通れる道路の本数 vector<int> d[5010];//道路を隣接 int G[5010][5010];//rの制限を満たしていける町を隣接リストで記録 int d...
92d62ba9da9747ee024ed7066d2fb1fcd3d153d4
8f65966d32911291dfbeebf574e81f19e5256b2b
cognitio-project/cognitio
/src/masternodeconfig.cpp
C++
cpp
3,639
permissive
// Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017-2018 The Cognitio developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // clang-format off #include "n...
a7b5e30269efc116d05b24677637c5778c72ff7d
e7b080f4381e345c7ccbe3fa9c393cbe5bfcb41a
ckeh/CMPE125
/riscv/03verilog/tests/hello2_tb.cpp
C++
cpp
952
no_license
#include "Vhello2.h" #include "verilated.h" #include "verilated_vcd_c.h" vluint64_t global_time = 0; VerilatedVcdC* tfp = 0; void advance_clock(Vhello2 *top, int nclocks=1) { for( int i=0;i<nclocks;i++) { for (int clk=0; clk<2; clk++) { #ifdef TRACE tfp->dump(global_time); #endif top->clk = !top...
f53a909a9a386da27f1e465d58f02436c7a7a779
1cb5f697766802de6f2eceec48d02d3a268cfc8f
lilin-liya/Data-Structure
/Homeworks/homework6/5130379091_hash.cpp
C++
cpp
2,855
no_license
#include <iostream> #include <string> #include <fstream> using namespace std; const int MAXSIZE = 256; //The max size of the hashtable;set as 256 because of the ASCII class HashTable { private: char elem[MAXSIZE]; //all the chars int ele_times[MAXSIZE]; //the showing times of each char bool flag[MAXSIZE]; ...
7679726d3040917ba2a60b10aa7a3ba9bb078caf
9962dd15d0b719cf1da41cbd89afa67bfa197cd4
OpenMYR/IoT_Motors
/src/op_queue.cpp
C++
cpp
1,093
permissive
#include "include/op_queue.h" #include "osapi.h" void op_queue::store_command(struct stepper_command_packet *packet, IPAddress* ip_addr, uint8_t id) { if (queue_length[id] < BUFFER_SIZE) { command_queue[id][(last_element[id] + 1) % BUFFER_SIZE].packet = *packet; os_memcpy(&(command_queue[id][(last_element[id] +...
973fb8bbbf84ac70a1bbb95c7538e231cde29b04
35befb65e87924041383cd5c14b65c5684cd07aa
krismz/SimpleITK
/Code/BasicFilters/src/sitkJoinSerriesImageFilter.cxx
C++
cxx
3,856
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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://ww...
e08e0198570312729e1b32e9ac11916fec81fbcc
fa3735f678934032d1295bde3d383e9ec41e9e26
xueshanlongyin/zircon
/system/host/fidl/lib/attributes.cpp
C++
cpp
4,804
permissive
// Copyright 2018 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 "fidl/attributes.h" namespace fidl { size_t EditDistance(const std::string& sequence1, const std::string& sequence2) { size_t s1_length = se...
7eca1c694d25f8750f8d5ce722af3ed4ae8e5a82
069db83a98142da733f9671e737484a86514ed1f
google/nearby
/internal/platform/implementation/windows/wifi_direct_socket.cc
C++
cc
6,867
permissive
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
9955ec907853169aa8fff4fe9baea4f9b45fc7f4
2fe3646f9edb110d3b1982c67fb4db82c6a6697f
liaomiao/minimum-volume-enclosing-ellipsoid
/MVEELinux/Cholesky.cpp
C++
cpp
6,713
no_license
/* * Cholesky.cpp * * Created on: 31 Oct 2012 * Author: spyros */ #include "BlasWrappers.h" #include "Cholesky.h" extern "C" void dpotrf_(const char *in, int &n, double *a, int &lda, int *info); extern "C" void dpo...
20193d4de3cfadad3a6ab232756ff9a345d3b093
cd87d644b2fc87a60e6aaed6fe5a1ea2391b06ba
excelle08/Data-structure
/hash_query/main.cpp
C++
cpp
861
no_license
#include <iostream> #include <string> #include "hashtable.h" using namespace std; int main(int argc, char const *argv[]) { HashTable<string, string> table; cout << "Demo for hash table" << endl; cout << "Please enter key and value. Enter exit to end input" << endl; while(true) { string key, ...
1cb9d79360d54b96ae5c6c73687063ed20fe8124
bc3b15d4f44e7a90ccb536c43805e03c857919a9
liangxiao-xikunlun/Stowage_Algorithm_Simulator
/simulator/Simulation.cpp
C++
cpp
22,631
no_license
// // Created by Owner on 28-Mar-20. // #include "Simulation.h" #include "../common/FileParser.h" #include <thread> Simulation:: Simulation(vector<TravelFiles>& p_travels, FileParser& p_file_parser, std::map<string,TravelsResults>& algorithm_to_stats): travels(p_travels), file_parser((p_file_parser)), stat...
a9de2f842ea7da5dda89e86f22d510a128caf588
ad3e40916dce91a71a6906c29f4496067a25ea79
WarpspeedSCP/godot
/servers/physics/area_sw.cpp
C++
cpp
8,634
permissive
/*************************************************************************/ /* area_sw.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
df8d239b8386032d6828543f2f5f085c6b212525
3c3ae8877ec7eefc0ebf353063793cd09379ccd9
Bwar/Nebula
/src/actor/cmd/sys_cmd/manager/CmdOnStartService.hpp
C++
hpp
1,081
permissive
/******************************************************************************* * Project: Nebula * @file CmdOnStartService.hpp * @brief 启动服务 * @author Bwar * @date: 2020-07-05 * @note * Modify history: ******************************************************************************/ #ifndef SRC_AC...
0eb599b773b5703d7a7662bba480fa18b99d37ab
c5aa508d2d3834c806053cb8fab968a7bafdec32
BillySilver/Online-Judge
/ZeroJudge/d386. 10200 - Prime Time.cpp
C++
cpp
957
no_license
#include <iostream> #include <math.h> int Euler[10002]={0, 1}, Prime[78498], i, j, n, e; bool Prime_Table[1000001] = {true, true}; int main() { for (i=2; i<1000001; i++) { if (Prime_Table[i]) continue; Prime[n++] = i; for (j=i*2; j<1000001; j+=i) Prime_Table[j] = true; } ...
889f53ef5e4035994c714995b10c43c55783ad29
04e86dc6880f0a1f1a02d28fdfcc7ea415e231ad
Gavin-Sun555/Parking-Lot-Simulation
/P3_part_2/figures.cpp
C++
cpp
8,052
no_license
#include <GLUT/glut.h> #include <cmath> #include <cstdlib> #include "figures.h" figure::~figure() {} //----------1 Rectangle void rectangle::draw() { glColor3f(r, g, b); glBegin(GL_QUADS); glVertex2f(position.getX(), position.getY()); glVertex2f((position + anchor * 0.5 + (anchor * 0.5 ...
7228acd51c23db42ed65e83e2a8f5278ce5f3ae7
2cbdf63502e8bb5343782e630193165727ba1af9
dboyzhong/vnet
/test/timer_test.cpp
C++
cpp
1,435
no_license
/************************************************************************* > File Name: timer_test.cpp > Author: > Mail: > Created Time: Fri 30 Dec 2016 08:27:17 PM CST ************************************************************************/ #include<iostream> #include "vnet_loop.h" #include "timer.h" #include...
c0698aac3a8b15b545b1eef45a87d981b274d9ae
2213c7b7f6475e7da011d086fe93a0d6702fed79
althafvly/android_frameworks_native
/services/surfaceflinger/SurfaceFlinger_hwc1.cpp
C++
cpp
147,025
permissive
/* * Copyright (c) 2016, The Linux Foundation. All rights reserved. * Not a Contribution * * * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the...
8928a24c70f06ef91f81c9d09cb54a93c5a63318
a7dad75b730dc1e93e18caafdaf595b32a0c508c
theassyrian/GrinPlusPlus
/Wallet/WalletDB/WalletSqlite.cpp
C++
cpp
26,596
permissive
#include "WalletSqlite.h" #include <Wallet/WalletDB/WalletStoreException.h> #include <Common/Util/FileUtil.h> #include <Common/Util/StringUtil.h> #include <Infrastructure/Logger.h> static const uint8_t ENCRYPTION_FORMAT = 0; WalletSqlite::WalletSqlite(const Config& config) : m_config(config) { } void WalletSqlite:...
c23df98b8e4b64d736fb666f1efefc30722df5a7
f046de17c5e2ec4e8c14eeb1244c011a752dcaf5
0003088/qt-gui-test
/src/libs/tools/src/pluginspec.cpp
C++
cpp
5,409
permissive
/** * @file * * @brief Implementation of plugin spec * * @copyright BSD License (see doc/LICENSE.md or http://www.libelektra.org) * */ #include <pluginspec.hpp> #include <toolexcept.hpp> #include <iostream> using namespace std; namespace kdb { namespace tools { /** * @brief Construct a plugin spec with a...
7dc0f1f1c1bbb60a292b82cfc37d75623b57b390
f45551825ab01b0498d2a30bf5a07d4513c8d5a8
mamonu/curves_and_surfaces_cw
/Bitmap.cpp
C++
cpp
4,965
no_license
#include "StdAfx.h" #include "Bitmap.h" #include "RGBTriple.h" Bitmap::BitmapFileHeader::BitmapFileHeader(const BitmapInfoHeader& Info) { _Type = 0x4d42; _Reserved1 = 0; _Reserved2 = 0; _OffBits = 14 + Info._Size + Info._ClrUsed * 3; _Size = _OffBits + Info._SizeImage; } ostream &Bitmap::BitmapFileHeader::Write...
13dfc04212ec3dda686979ba2bb192bc815a3112
c34a9fa411dfd2935a7d2b5c44245d038f455a47
paulkoba/Assignments_KNU_Y2
/leetcode/set-matrix-zeroes/Accepted/8-13-2021, 3:57:30 PM/Solution.cpp
C++
cpp
792
no_license
// https://leetcode.com/problems/set-matrix-zeroes class Solution { public: void setZeroes(vector<vector<int>>& matrix) { int m = matrix.size(); int n = matrix[0].size(); vector<int> row(m); vector<int> col(n); for(int i = 0; i < m; ++i) { for(i...
264564a563605ec0c32e3c843006c966e24349e6
06525ef0d429c10254b97c7977284b1a08958e6a
HelloMandu/OnlineJudge
/Baekjoon/11050이항계수2.cpp
C++
cpp
398
no_license
#include<iostream> using namespace std; long long cache[1001][1001]; long long BinomialCoefficient(int n, int k) { if (n == k || k == 0) return 1; else if (cache[n][k]) return cache[n][k]; else return cache[n][k] = (BinomialCoefficient(n - 1, k - 1) + BinomialCoefficient(n - 1, k)) % 1000000007; } int main()...
93a928768ffed212f26e9a357b8e69343d247d70
afdddc685a377a31f594c5ef6f8ce6c383a234ca
Margen67/blamod
/sp/src/game/server/te_armorricochet.cpp
C++
cpp
4,134
permissive
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $Workfile: $ // $Date: $ // //----------------------------------------------------------------------------- // $Log: $ // // $NoKeywords: $ //========================================================...
f9f1e7b24bfbab686108ef8fc083d4fa70ef5709
9f52bdbf538e2a6b049c76d31253271cfb2d4026
gitnmr/cantera
/src/clib/ct.cpp
C++
cpp
40,516
no_license
/** * @file ct.cpp * Cantera interface library. This library of functions is designed * to encapsulate Cantera functionality and make it available for * use in languages and applications other than C++. A set of * library functions is provided that are declared "extern C". All * Cantera objects are sto...
618a556352f47cb1dd677ad22bae1147f01f2635
b7bbb5d5d10cf377f55424f4a672454aeb55d5bb
AeroOwl/souper
/lib/Infer/EnumerativeSynthesis.cpp
C++
cpp
31,443
permissive
// Copyright 2018 The Souper Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
a6c1b0e799edd015a9d80c1f76d5339d372ffe57
47f0c6f24432b0505dd8e6485f8d6166c48fab14
skyrusnetwork/skyrus-core-1.0.1
/src/test/amount_tests.cpp
C++
cpp
2,729
permissive
// Copyright (c) 2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "amount.h" #include "test/test_skyrus.h" #include <boost/test/unit_test.hpp> BOOST_FIXTURE_TEST_SUITE(amount_tests, Bas...
a3215b4f98957a840de5fe3eaef763bcd5e6b453
133cbfd16d53f358cd748c32113c91f6711437e5
LuoWDK/QT-network-testing
/network_server_udpserver_class.cpp
C++
cpp
1,156
no_license
#include "network_server_udpserver_class.h" #include "ui_network_server_udpserver_class.h" #include <QHostAddress> UdpServerClass::UdpServerClass(QWidget *parent) : QWidget(parent), ui(new Ui::UdpServerClass) { ui->setupUi(this); this->setWindowTitle(tr("UDP server")); port_ = 5555; is_started_...
63064f3e997763e2d40f136f978ec860d0aacacc
62cb65a674622625106d4538572d5d1cf0d50e64
nikola1011/cplusplus-tutorial
/_WelcomeQuiz.cpp
C++
cpp
8,003
no_license
// Introduction (me, course planning) // C znanje iz prethodne godine ? Polozen AIP ? // Trenutna godina studija, da li prvi put vide C++ ili znaju ponesto, polagali su ispite ? // C++ znanje / upoznavanje ? // Razlike izmedju C i C++-a ? (C++ => OOP support, functional + object oriented driven, polymorphism, encapsula...
7a847da220d01d207be3e819288dca869a2fd336
3afaba458011ea28cff95d63274c7b9bcf7fe1dd
rdingwall/foofxp
/foofxp/curses/detail/attributes.cpp
C++
cpp
2,175
no_license
// Copyright (c) 2007, Richard Dingwall // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of...
877c9e1a88f4c85f7957182dcea7b0627b559da7
982c3908b6a120d9137ad0dc1ce153bc927cd13b
KaihongGo/PAT
/second time/PAT A1155.cpp
C++
cpp
1,080
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int MAXN = 10010; int heap[MAXN]; int n; // n elements vector<int> path; void DFS(int root) { if (root <= n && root * 2 > n) { path.push_back(heap[root]); for (int i = 0; i < path.size(); i++) { ...
74513be772775db29658af054b27a22badb29933
440d1a718eabce012b7f3c56b0c89fb17faa83b6
chaudhariyash10/CodeChef
/DSALearningSeries/Basic Dynamic Programming/CodeforcesNewSkateboard.cpp
C++
cpp
551
no_license
#include <bits/stdc++.h> #define MAX 1000000 using namespace std; int main() { string s; cin >> s; int arr[s.size()]; for (int i = 0; i < s.size(); i++) { arr[i] = (int)s[i] - 48; } long long count = 0; for (int i = 0; i < s.size(); i++) { if (arr[i] % 4 == 0) ...
00252aa7b0771fd0096626681a31c801d1900b12
da89a179dcdb03c8c820afa197dc70a4e0976383
ZeroFreeman/Zero
/exercise/2018_06/20180606/AL_ASCIISort_Up/al_asciisort_up.cpp
C++
cpp
234
no_license
#include <iostream> #include <algorithm> using namespace std; int main() { char s[3] = { 0 }; while (scanf("%s", s) != EOF) { sort(s, s + 3); printf("%c %c %c\n", s[0], s[1], s[2]); } return 0; }
3f4e4f248fca65ca78e7e2cd96fdaf8d411dc8ed
1ec3edad12d485bb97b640120a63bac53da06c1a
MiSawa/library
/hl_decomposition/gen.cc
C++
cc
1,258
no_license
#include <iostream> #include <cstdio> #include <cassert> #include <cstring> #include <vector> #include <valarray> #include <array> #include <queue> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <algorithm> #include <cmath> #include <complex> #include <random> using namespace ...