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
6fef1e01fed16d70dbe87685f12410b86e0721b4
b189a6448fa266bddf209df4197c141851100047
lunarwaterfox/AudioUnitSample
/AudioUnitSample/PlayerAndRecorder/AudioMidiDevice/AMDCore.cpp
C++
cpp
5,683
no_license
// // AMDCore.cpp // AudioUnitSample // // Created by lagopus Alopex on 2020/5/25. // Copyright © 2020 lagopus Alopex. All rights reserved. // #include "AMDCore.hpp" #include "AudioUnitException.hpp" void AMDCore::initialize() { // 启动 AUGraph OSStatus status = NewAUGraph(&_aGraph); if (status != noErr...
9d8ab9ec206f83ca7be8b68f1b1074d019db0d82
0986c9afaf2f9680176805a34e90d6e19db28a46
namu1714/Algorithm-Problem-Solving
/기타/c++/programmers_무지의먹방라이브.cpp
C++
cpp
1,091
no_license
#include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> food_times, long long k) { int answer = 0; int foodNum = food_times.size(); vector<int> food_sorted; food_sorted.resize(food_times.size()); copy(food_times.begin(), food_times.end(), food_sorted...
6b90ac49516964d5dd66c1325fe95a7fae9e2054
26316ad37dfb635e31caade1114937a9a47939ba
mark-ruuan/Codeforces-Solution
/ER68/code.cpp
C++
cpp
957
no_license
#include <bits/stdc++.h> #define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define ll long long int #define ld long double using namespace std; const int N = 1e3+ 5; const int MOD = 1e9 + 7; int n; int c, b, aa; int a[N]; int dp[N][N]; int go(int idx, int prev){ if(idx == n) return 0; if(dp[idx]...
f4d0ec35dc137f394ed7fb62bded5f966a9f5b95
e86a59d92e83065774482f4956ea36dfe4f2cac0
Tmbao/hesaff
/hesaff.cpp
C++
cpp
5,730
permissive
/* * Copyright (C) 2008-12 Michal Perdoch * All rights reserved. * * This file is part of the HessianAffine detector and is made available under * the terms of the BSD license (see the COPYING file). * */ #include <iostream> #include <fstream> #include "pyramid.h" #include "helpers.h" #include "affine.h" #inc...
52ee8cd34cb696c0449c428b4ee108bee6453f69
ed881a3bfa157c7706c3f750f62feca9b820c2c5
matus-chochlik/oglplus
/source/lib/oglplus/shapes_base.cpp
C++
cpp
1,207
permissive
/** * .file lib/oglplus/shapes_base.cpp * .brief Shape generator functions * * @author Matus Chochlik * * Copyright 2010-2014 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) */ #include...
4d36b221b9f3200882220c689c56df7ca9fce6e3
d5aaecd8f336c17b406a091465ce623aea6e4b37
gitbetter/Zenith
/Engine/_Source/Graphics/ZMaterial.cpp
C++
cpp
13,992
permissive
/* ______ ______ __ __ __ ______ __ __ /\___ \ /\ ___\ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ \/_/ /__ \ \ __\ \ \ \-. \ \ \ \ \/_/\ \/ \ \ __ \ /\_____\ \ \_____\ \ \_\" \_\ \ \_\ \ \_\ \ \_\ \_\ \/_____/ \/_____/ \/_/ \/_/ \/_/ \/_/ \/_/\/_/ ZMateri...
8c1b92e2797d2a72eed487379ff7dd8516874c2e
017c3a58465e1da9f0c4bc9f0ceff54a1b8e2e5d
ishikabansal04/DataStructures_And_Algorithms
/Graphs/primsOptimised.cpp
C++
cpp
2,159
no_license
//dijkstra using sets (Optimized version) #include<iostream> #include<algorithm> #include<vector> #include<queue> #include<climits> #include<utility> #include<map> #include<unordered_map> using namespace std; class Edge{ public: int u; int v; int w; Edge(){ u=0; v=0; w=0; ...
9513bac9a2d4ddff603a6d135cf763e265b50c8d
dba7893b0e8c93708b66f18ee885031a762ff379
tadeze/pyad
/pyada/src/main.cpp
C++
cpp
4,786
permissive
/* * main.cpp * @Created on: Mar 22, 2015 * @Author: Tadeze * Main entry: accepts the the * @param argv * Usage: iforest [options] * -i FILE, --infile=FILE Specify path to input data file. (Required). -o FILE, --outfile=FILE Specify path to output results file. (Required). -m COLS, --metacol=COLS S...
6c8e1cd16baf7ccd762e5c58f07d610004ca50b5
49f164904045003291628acc93c8ec1c7519cfa7
kristians521/IAJ-GameServer-Plugin
/IA Julia 1.x.x/ChatCommands.cpp
C++
cpp
61,071
no_license
// ================================================== // // # GameServer 1.00.90 # // // # Imagination Arts # // // # Julia Project 1.1.x # // // ================================================== // // # http://imaginationarts.net/forum/ # // // # http://auroraplay.ru/ # // // ================...
2b086a28a258812102b14ae3cea2c93ea1299504
6c070b21aea2c11486c584f05361942b696ff889
MahimPranto/URI-OnlineJudge-Solution
/Beginner/1008.cpp
C++
cpp
268
no_license
#include <iostream> #include<iomanip> using namespace std; int main () { int n, h; float s,salary=1; cin >> n >> h >> s; salary=s*h; cout << "NUMBER = " <<n<< endl; cout<<"SALARY = U$ "<<fixed<<setprecision(2)<<salary<<endl; return 0; }
ae5bbd53090b1a1a7aa26fac58e5caaa98c67f74
7019bd22d69854e39ecc97d9f2831eed85aa1c39
testmana2/fbthrift
/thrift/lib/cpp2/security/SecurityKillSwitchPoller.cpp
C++
cpp
2,230
permissive
/* * Copyright 2016 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
bb66db2ce7649f9d932582e7adc124ad8ef5ccf5
78374917910230690c1d310cbb6dc5d654290625
lmstearn/FuzzyQuasiSKSE
/common/ITextParser.cpp
C++
cpp
1,133
no_license
#include "ITextParser.h" ITextParser::ITextParser() :m_stream(NULL) { // } ITextParser::ITextParser(IDataStream * stream) :m_stream(stream) { // } ITextParser::~ITextParser() { // } void ITextParser::Attach(IDataStream * stream) { m_stream = stream; } void ITextParser::SkipWhitespace(void) { while(!m_stream->...
96fca9faf87b8ac0f3bdcfa4edaa04773516e156
243372f5430666179be3d530801ff4aebc6b2bc6
fucora/OFDeditor-1
/richtextprocess.cpp
C++
cpp
16,523
no_license
#include "richtextprocess.h" #include "thread_loadrichtext.h" RichTextProcess::RichTextProcess(QWidget *parent) : QWidget(parent) { paperNum = 1; //纸张实际大小 height = A4height; width = A4width; scale = 1; mainLayout = new QVBoxLayout(this); Paper *paper = new Paper(this); mainLayout->addW...
0dd3492b12d355f5cf1d7b8a1a9aa98233fdf603
728a5f72a2eec05d1a3e15263376fa756ba0ff11
paule32/CafeWindowManager
/src/caferect.cc
C++
cc
736
permissive
#include <cafewm.h> #include <caferect.h> namespace kallup { CafeRect::CafeRect() { // initial values ... pos_x = 0; pos_y = 0; pos_w = 0; pos_h = 0; } CafeRect::CafeRect( int x, int y, int w, int h) { setX(x); setY(y); setWidth (w); setHeight(h); } // getter ... i...
9f15aedf2a07414fc69d8a99b67d620d6391d756
f288501efab6c13e638e08f43e6b9898b5d86239
rocdat/OPS
/apps/c/CloverLeaf_3D/OpenACC/flux_calc_kernely_openacc_kernel.cpp
C++
cpp
7,705
no_license
// // auto-generated by ops.py // #include "./OpenACC/clover_leaf_common.h" #define OPS_GPU extern int xdim0_flux_calc_kernely; int xdim0_flux_calc_kernely_h = -1; extern int ydim0_flux_calc_kernely; int ydim0_flux_calc_kernely_h = -1; extern int xdim1_flux_calc_kernely; int xdim1_flux_calc_kernely_h = -1; extern int...
27e00fd9568233a84621c276dbc17361ed06fca2
a480662a2fde2549d0160c34c4441e3f95e444b0
beifengno01/ZLToolKit
/tests/test_eventPoller.cpp
C++
cpp
2,798
permissive
/* * MIT License * * Copyright (c) 2016 xiongziliang <771730766@qq.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
9c661311d8da58269364276a8f9f8e039985b47a
4984c9d3c96e71f4d5f19520c11a547f2b61f50a
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/W+RWC+poreleaserelease+fencembonceonce+fencembonceonce.c.cbmc.cpp
C++
cpp
53,133
no_license
// Global variabls: // 0:vars:3 // 3:atom_1_X0_1:1 // 4:atom_1_X2_0:1 // 5:atom_2_X1_0:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 6 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt,...
7ef76345dcebad010263aab9e4074b2f954e2f0d
6e8adbcc8bc18b735cee21f6c58077ca9e9d2f2d
OPterminator/Striver-SDE-sheet-All-Solutions
/Construct Binary Tree from Inorder and Postorder.cpp
C++
cpp
2,572
no_license
https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/ The Idea is As They Given us Inorder and Postorder as we Know Inorder Fallow --> Left_subtree => Root_Node => Right_subtree Traverse ans Postorder Fallow --> Left_subtree => Right_subtree =>Root_Nodetraverse using Postorder_...
5b95dc13889c0d83820cf6c008d8d94b68469b26
dc87208637a692a79ff056841f9d34716877b599
slipstak2/conspects
/stepik/Спортивное программирование/code/stepik-53634/5.7.6-parket.cpp
C++
cpp
1,343
no_license
#include <string> #include <vector> #include <fstream> #include <algorithm> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<bool> vb; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; ifstream cin("input.txt"); ofstream cout("output.txt"); vector<bool> prec...
8e6008a46bd911d6271d59425c22b7aa48bedf95
c0ccda895ffc9d513c418a34b45646a93211cede
xNero321/OOP_arcade_2018
/src/core/Load.hpp
C++
hpp
1,108
no_license
/* ** EPITECH PROJECT, 2017 ** OOP_arcade_2018 ** File description: ** Load.hpp */ #ifndef __LOADER_HPP_ #define __LOADER_HPP_ #include <exception> #include <memory> #include <dlfcn.h> #include <string> #include <iostream> #include <fstream> Class Load { public: Load(); ~Load(); void *chan...
ff417689224e93c93fd4016eb4cd4ae525464b14
3a9f36b18b3a117fb4a3c2ebd0c8e4b5dd5935a4
jordansj/recipes
/logging/Logging.cc
C++
cc
2,675
no_license
#include "Logging.h" #include <datetime/Timestamp.h> #include <thread/Thread.h> #include <errno.h> #include <stdio.h> #include <string.h> #include <sstream> namespace muduo { class LoggerImpl { public: typedef Logger::LogLevel LogLevel; LoggerImpl(LogLevel level, int old_errno, const char* file, int line); v...
f10a6785620dc7d48105896c5df46e8d77a8c31e
886f0fe4c6db55b7e3747a73edc211079762d310
kittikun/takoyaki
/src/takoyaki/public/constant_buffer.cpp
C++
cpp
1,626
permissive
// Copyright(c) 2015-2016 Kitti Vongsay // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publi...
b9130edfb3547786e98ba4712511ceec3cb1b945
155201fd1a207a5ea54a19626ecc1632ea1103bd
Descendant-XI/system_security
/keystore/keystore_get_wifi_hidl.cpp
C++
cpp
2,512
permissive
/* Copyright 2017 The Android Open Source Project * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the ...
3a610167c43947fb823f18057a38b3f894ba582d
09c68c9a2d92ab37635718410e1b7e8815b9559f
VD-15/Sprout
/sprout/algorithm/mismatch.hpp
C++
hpp
11,744
permissive
/*============================================================================= Copyright (c) 2011-2019 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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.tx...
cbd54bcb151d11c25d916a8dc4302d68d98094a1
cb47d08836d283f00c7d0f1886acc91a7cc5ab4c
naturalatlas/node-gdal
/deps/libgdal/gdal/port/cpl_sha1.cpp
C++
cpp
8,944
permissive
/****************************************************************************** * * Project: CPL - Common Portability Library * Purpose: Implement SHA1 * Author: Even Rouault, even.rouault at spatialys.com * * SHA1 computation coming from Public Domain code at: * https://github.com/B-Con/crypto-algorithms/bl...
8e13421612e2441dc647299bd495e0c8c150d9f8
4f4b45bfbf317a72da160d5b9da79c676b9d4ee5
richy486/cocos2d-x
/plugin/jsbindings/auto/jsb_pluginx_nd91_auto.cpp
C++
cpp
8,597
permissive
#include "jsb_pluginx_nd91_auto.hpp" #include "jsb_pluginx_spidermonkey_specifics.h" #include "jsb_pluginx_basic_conversions.h" using namespace pluginx; #include "IAPNd91.h" template<class T> static JSBool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { TypeTest<T> t; T* cobj = new T(); js_type_class_t...
d082588432b083cf44db1dc07b350dc508e326c4
7b21322ae5c1c31ecd2a302e43d643d784131ee7
neelchoudhury/cp
/Misc/v.cpp
C++
cpp
486
no_license
#include<bits/stdc++.h> #define ll long long int #define pb push_back using namespace std; int main() { bool a[1000010]; for(int i=0;i<1000010;++i) { a[i]=0; } ll n; scanf("%I64d",&n); ll count=0; ll ans=0; while(n--) { char ch; ll x; scanf(" %c %I64d",&ch,&x); if(ch=='+') { count++; if(cou...
c7a302605b2e49acdfb0565285b6b02c53c7dac9
18e7ef83c4e283b7cea4d761507559be26c8f342
HMBL98/Competitive-Programming-Problems
/Graphs/MST/a.cpp
C++
cpp
1,520
no_license
#include <bits/stdc++.h> using namespace std; #define optimizar_io ios_base::sync_with_stdio(0);cin.tie(0); #define MAX 1000+10 typedef pair<int,int> ii; typedef vector<int> vi; vector< pair<double,ii> > grafo; vector<ii> coor; int p[MAX]; int _rank[MAX]; int setSize[MAX]; int numSets; void makeSet(int n){ numSets...
a2c61e4aec6471768fc15e1a1a86082f44f5f3bc
55ab289db6f51b5b2c2fed0ab137645869cd9ed1
imclab/brainflow
/tests/cpp/src/brainflow_get_data.cpp
C++
cpp
7,664
permissive
#include <iostream> #include <stdlib.h> #ifdef _WIN32 #include <windows.h> #else #include <unistd.h> #endif #include "board_shim.h" #include "data_filter.h" using namespace std; void print_head (double **data_buf, int num_channels, int num_data_points); bool parse_args (int argc, char *argv[], struct BrainFlowInput...
a45c529edaf1997edf37c71f15904558cfb9c97a
75e76d6b93471ef6334799732c75a35f4507cacb
aksnzhy/xlearn
/src/reader/reader.cc
C++
cc
11,874
permissive
//------------------------------------------------------------------------------ // Copyright (c) 2018 by contributors. 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 a...
454140bf8976d83c5e530d4c30034f4a8bc7e2a7
91a8a55d1ee1096edb7f93554d7ac2255f4dea04
katen145/DeepMimicRepo
/DeepMimic/DeepMimicCore/DrawSceneSimChar.cpp
C++
cpp
12,385
no_license
#include "DrawSceneSimChar.h" #include "sim/SimBox.h" #include "render/DrawUtil.h" #include "render/DrawGround.h" #include "render/DrawCharacter.h" #include "render/DrawSimCharacter.h" #include "render/DrawObj.h" #include "render/DrawWorld.h" #include "render/DrawPerturb.h" const tVector gCamFocus0 = tVector(0, 0.75...
00aa268dabc15880dd415d04cb7650f75d5adb24
59a11d1b6aebb62d2fb7de403fc7c3833a39dd80
yycccccccc/Leetcode
/162.Find Peak Element.cpp
C++
cpp
1,508
no_license
题意:找出数组中的第一个山峰的值 方法一:遍历 1.从头开始遍历,如果该位比前一位和后一位都大,那么返回其坐标位置。 2.注意判断越界问题,如果超出范围的不能返回,还要考虑山峰在最后一位时的情况,直接返回最后一位。 3.其他情况比如第一位最大或者只有一个元素那么就返回0。 class Solution { public: int findPeakElement(vector<int>& nums) { for(int i = 1; i < nums.size();++i){ if(nums[i]>nums[i-1] && nums[i] > nums[i+1] && i+1 < num...
346a42dc7f12d43d59d5023f06b4d5eeb753ad59
e34853c67a0611676f462c192386e2c72465182a
runnishino/DesignPattern
/composite/main.cpp
C++
cpp
1,085
no_license
#include <iostream> #include "Entry.h" #include "File.h" #include "Directory.h" using namespace std; int main() { cout << "Making root entries..." << endl; Directory *rootdir = new Directory("root"); Directory *bindir = new Directory("bin"); Directory *tmpdir = new Directory("tmp"); Directory *us...
a740c337b6c018d5571d59e87f3e743d55a50200
8ac722badc1e9b0b71dda60ecfdbb3ede955f007
mcpherrinm/space
/net/message.hh
C++
hh
681
no_license
#pragma once #include <stdint.h> enum class MessageType : uint16_t { /* Never sent: */ INVALID = 0, /* Sent by client: */ JOIN_GAME, ADD_STATION, LEAVE_GAME, REMOVE_STATION, /* Sent by server: */ DATA_UPDATE, /*Sent by either: */ DEBUG, ACK = 0xFFFF }; // Header on network messages struct Message { ...
28d200426fd37f6ce068de9068069b0a099496a6
1d570630ebaf5ff376d75150b9e50e1921a74eca
Totalq09/PrasaHydrauliczna-OpenGL
/gl_01/Box.cpp
C++
cpp
1,738
no_license
#include "Box.h" Box::Box() { initialize(); } Box::~Box() { glDeleteVertexArrays(1, &VAO); glDeleteBuffers(1, &VBO); } Box::Box(Transformation mod) { model = mod; initialize(); } Box::Box(glm::vec3 translation) { model.setPosition(translation); initialize(); } ///////////////////////////////////////////////...
e371819d5b72eacae7dd31bce63aca01cf0b26bf
136a5fb41b79520995c90e044722f1430aa3b5b4
JPETTomography/j-pet-framework-examples
/PhysicAnalysis/EventCategorizerPhysics.cpp
C++
cpp
12,690
permissive
/** * @copyright Copyright 2018 The J-PET Framework 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 find a copy of the License in the LICENCE file. * * Unless required by applicable law...
212e39be6c13b362f1e9ba02bd960a986d4cd42f
ab951768a0b371c7af07de92a77d0eacb1f374c8
chenghuige/melt
/test/test_seralize.cc
C++
cc
4,635
no_license
/** * ============================================================================== * * \file test_seralize.cc * * \author chenghuige * * \date 2014-04-09 20:18:28.024001 * * \Description: * * ==========================================================================...
2db8f01ec11c08491f2ebda1d5dc2e5e3849ca81
b20166501d9ee7fceb01990f4c482771de7b24da
lwch00700/LDAPQuery
/LDAPQuery/LDAPQuery.cpp
C++
cpp
15,667
permissive
/* Copyright (c) 2013, Roman Glebsky (Maqentaer) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and t...
f7ecae3642501483237bb835881a83491fad53d4
c2bae4efecc69abea85308928c12987c9e3f4c4f
sergiiF/leetcode
/serializeTree.cpp
C++
cpp
3,048
no_license
#include <stack> #include <vector> #include <string> #include <queue> #include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(0), right(0) {} }; class Codec { public: // Encodes a tree to a single string. string se...
719aca97d5331d064ecd2243c3f125891f5b3af9
c0242ea7ac5bb125b5e0d05fbfd6b5a26f6aa484
venkatarajasekhar/c-
/tutorials/Templates/ArrayTemplate2.cpp
C++
cpp
1,436
no_license
#include<iostream> #include<string> using namespace std; class Employee { string empId; string name; public: Employee() {} Employee(string id,string nm) : empId(id), name(nm) {} string getName() const { return name; } string getEmpId() const { return empId; } }; ostream& operator...
a8d50b64e472b96807a0434d22c6123792d34fe7
6b83ee44c448d76eb62b30f56d8c7ba3af134def
2109/win32lualib
/oolua/unit_tests/bind_classes/expose_stub_classes.cpp
C++
cpp
296
permissive
#include "expose_stub_classes.h" #include "oolua_dsl_export.h" /**[MinimalProxyExport]*/ OOLUA_EXPORT_NO_FUNCTIONS(Stub1) /**[MinimalProxyExport]*/ OOLUA_EXPORT_NO_FUNCTIONS(Stub2) OOLUA_EXPORT_NO_FUNCTIONS(Stub3) OOLUA_EXPORT_NO_FUNCTIONS(InvalidStub) OOLUA_EXPORT_NO_FUNCTIONS(Return_double)
ae51db24f6650dfa3b25e3fabeb0a56a2971ff3d
c99a6cfb4232c88e8532ac1c9e4172319d4a15d1
diffblue/cbmc
/src/goto-checker/bmc_util.cpp
C++
cpp
12,889
permissive
/*******************************************************************\ Module: Bounded Model Checking Utilities Author: Daniel Kroening, Peter Schrammel \*******************************************************************/ /// \file /// Bounded Model Checking Utilities #include "bmc_util.h" #include <iostream> #i...
6ec4a5c93af07d2a87c0afe824cdaccd62ff7c81
f000015efb962d1fde03574b0f46a7ce783561cf
ciryiping/rippled
/src/ripple/legacy/0.27/book/impl/OfferStream.cpp
C++
cpp
5,353
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
7d2d7c952c78da2b1f12fb9219391cb97f092d57
6adea2451411524db1b24e2df9204ac9268d388b
inkiya/bdrc
/src/chainparams.cpp
C++
cpp
8,518
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "assert.h" #include "chainparams.h" #include "main.h" #include "util.h" #inc...
4551847e1c5e5f9d345ab4e9a1af402586366581
a757f28e0213abfb5ba8692a818e8dd955027c1d
andreiG98/DFA_Minimization
/main.cpp
C++
cpp
4,294
no_license
#include <iostream> #include <fstream> #include <vector> #include <string.h> using namespace std; class automat { int q;//card stari int* Q;//starile int a;//card alfabet char* A;//alfabet int t;//card tranzitii int** T;//tranzitii int nf;//card stari finale int *F;//starile finale ...
921fbefa6a56c0bee5d9df749a9c20617031f76c
bbb3c2e68651ed75f8803adc58d2702b3470d510
kraemmax/mythos
/kernel/boot/init-loader-amd64/boot/load_init.cc
C++
cc
12,398
permissive
/* -*- mode:C++; -*- */ /* MIT License -- MyThOS: The Many-Threads Operating System * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation ...
a1b804067f22b98f8626c6e1eeab6a85200dc510
c9f989b827115ed06f3e63fd0c01f589d0c1f0d3
vespa-engine/vespa
/config/src/vespa/config/retriever/configkeyset.hpp
C++
hpp
566
permissive
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. namespace config { template <typename... ConfigTypes> ConfigKeySet & ConfigKeySet::add(const vespalib::string & configId) { addImpl<ConfigTypes...>(configId); return *this; } template <typename ConfigTyp...
8f5ef15440547ee81ebf5abe26cddae7860f3a34
c65b043646cba7e184d83b99b57a549b27cd55cb
RaisinTheSteaks/MultiPlayerCA1
/GD4SFMLGameWorld/DataTables.hpp
C++
hpp
1,496
no_license
/* Charlie Duff D00183790 */ #pragma once #include "ResourceIdentifiers.hpp" #include "TextureID.hpp" #include "ActionID.hpp" #include "CategoryID.hpp" #include "IslandID.hpp" #include <SFML/System/Time.hpp> #include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Rect.hpp> #include <SFML/Window/Event.hpp> #includ...
bc6db53f51d63c5eefc1ec683e5161a1a98a85f3
f5ad43d9fa49fe0ba11cb997ea74a104a2c9a3ad
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
/webkit/browser/appcache/appcache_group.cc
C++
cc
8,423
permissive
// Copyright (c) 2012 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 "webkit/browser/appcache/appcache_group.h" #include <algorithm> #include "base/bind.h" #include "base/logging.h" #include "base/message_loo...
11afe7a655929a8f8de73595e1401bdf7fffe119
79a068e427a1df2319b926b742db56605c866135
svanderweele/super-mario-ecs-cpp
/super_mario_cpp/SetSpriteToFaceMovingDirectionSystem.cpp
C++
cpp
685
no_license
#include "SetSpriteToFaceMovingDirectionSystem.h" #include <iostream> #include <vector> #include "SpriteComponent.h" #include "EntityManager.h" void SetSpriteToFaceMovingDirectionSystem::update() { std::vector<Entity *> entities = GetEntityManager()->GetEntitiesWithComponents({ COMPONENT_ID_TRANSFORM, COMPONENT_ID_V...
3cdf49efd0c29febb62a7cb574d0d2deeac10057
fb8eefa3aa55e901d586f5323b7a2b8d3b93f125
slin35/crackingTheCodingInterview
/chapter5-Bit_Manipulation/5.6.cpp
C++
cpp
379
no_license
#include <iostream> #include <cassert> using namespace std; /* conversion: determine the number of bits needed to convert A to B */ int convert(int A, int B) { int tmp = A ^ B; int cnt = 0; while (tmp != 0) { if ((tmp & 1) == 1) cnt++; tmp >>= 1; } return cnt; } int...
6bbe1791ec9d559fd5f50d55528bfcf545ac1277
fa1a332cc6987869858c35fcf7e7268920d4d323
msabbouri/CPP-doubly-linked-list
/dlist.hpp
C++
hpp
5,031
no_license
#pragma once /* dlist.h Doubly-linked lists of ints */ class dlist { public: dlist() { } struct node { int value; node* next; node* prev; }; node* head() const { return _head; } node* tail() const { return _tail; } // Returns the node at a particular index (0 is...
9806684500029c8fda7a9a7d7b708e7115d29894
dbc4bd428cba25310dcb7222216d82fdf76ecdf0
anshika-sri/CodeTricks
/array/string/enterWords1.cpp
C++
cpp
307
no_license
#include <iostream> using namespace std; int main() { string s1[10]; for(int i =0;i<10; i++) { cin>>s1[i]; } cout<<s1[0] << s1[4]; return 0; } ********IO********* anshika1 anshika2 anshika3 anshika4 . klrer. w'rl wjrwelr e e anshika1. a n s h i k a s r i v a s t a v a ai
06a09fc2178fee3a30ff445166f2bf3fe42d0286
accd2f440229b718c8a950db7deb08d6287dd894
LeeWooSang/Capstone_Design_TeamProject
/Client/New_FreezeBomb/Code/Shader/BillboardShader/UIShader/CharacterSelectUIShader/CharacterSelectUIShader.cpp
C++
cpp
19,127
no_license
#include "../../../../Stdafx/Stdafx.h" #include "CharacterSelectUIShader.h" #include "../../../../Texture/Texture.h" #include "../../../../Material/Material.h" #include "../../../../Mesh/BillboardMesh/BillboardMesh.h" #include "../../../../GameObject/Billboard/UI/UI.h" #include "../../../../SoundSystem/SoundSystem.h" #...
bac99bdaa1d67ae53644544dc5e6fe5f32b87258
a2abdc17a67b65518837373a8833e89541159c11
jprosser/tensorflow
/tensorflow/compiler/xla/service/gpu/xlir_kernels.cc
C++
cc
9,964
permissive
// Copyright 2021 The TensorFlow Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
88745a04891e9c262537926ac0644bd3e462ca43
385b653ba6eb38d6889669b1cd14bcaf5e81f6d0
a1266143/JNIProject
/app/src/main/cpp/native-lib.cpp
C++
cpp
15,954
no_license
// // Created by xiaojun on 2019/11/28. // #include <jni.h> #include <android/log.h> #include <thread> #include <chrono>//时间 #define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,"xiaojunJNI_Verbose",__VA_ARGS__) #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,"xiaojunJNI_Debug",__VA_ARGS__) #define LOGE(...
9ad06d1971babddccb184d402de758a132afff1c
aa5e7fd9b4d56f4c1de9ff9e89df63648180cad2
svn2github/texstudio
/branches/experimental/tablemanipulation.cpp
C++
cpp
29,492
no_license
#include "tablemanipulation.h" #include "qdocumentcursor.h" #include "qdocumentline.h" #include "smallUsefulFunctions.h" #include "scriptengine.h" QStringList LatexTables::tabularNames = QStringList() << "tabular" << "array" << "longtable" << "supertabular"; QStringList LatexTables::tabularNamesWithOneOption = ...
884d2c1c67b1d407519be64ea4cea7907f9e42b4
0e9684a17f0069ddcd726e94c121e93766a27e00
patelhardik/pal
/src/core/layers/decorators.cpp
C++
cpp
114,132
permissive
/* *********************************************************************************************************************** * * Copyright (c) 2015-2021 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
4f42e23dfa6b673544f5b1f91e29f94527d33147
c3cd24163dde74eacf1340f7ca7dc688a5b54a92
joansanchez/idi
/idi/CleanCode/bloc-1/ses3/act2/MyGLWidget.cpp
C++
cpp
4,395
no_license
#include "MyGLWidget.h" #include <iostream> MyGLWidget::MyGLWidget (QWidget* parent) : QOpenGLWidget(parent) { setFocusPolicy(Qt::ClickFocus); // per rebre events de teclat } MyGLWidget::~MyGLWidget () { if (program != NULL) delete program; } void MyGLWidget::initializeGL () { // Cal inicialitzar l'ús de...
0e84c8de310ef88ed231c27e1b02f3d847ed84a1
b2f46c5daaefd4bc191e5199151d3237ce734673
fermi-lat/GlastRelease-scons-old
/TkrDigi/src/GaudiAlg/TkrDigiTruncationAlg.cxx
C++
cxx
4,240
no_license
/* * @file TkrDigiTruncationAlg.cxx * * @brief Calls an user-chosen tool to add noisy strips to the SiStripList. * * @author Michael Kuss * * $Header$ */ #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/AlgFactory.h" #include "GaudiKernel/SmartDataPtr.h" #include "GaudiKernel/Algorithm.h" #include "Ev...
9ded0c653af777f77ba41a4cd1f6c608ab3583a4
69db5063000aaba48991fa14053ed484da2ef1bf
slayercat/pgina
/pGina/src/CredentialProvider/Credential.cpp
C++
cpp
18,463
no_license
/* Copyright (c) 2011, pGina Team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
189194c648390481bc59088a2b72996f9089fbd3
08ae7b6610eb34ded539ee78665622c501ebf779
keldath/PieAncientEurope
/SDK/CvGameCoreDLL/CyPlayer.cpp
C++
cpp
58,423
no_license
// // Python wrapper class for CvPlayer // #include "CvGameCoreDLL.h" #include "CyPlayer.h" #include "CyUnit.h" #include "CyCity.h" #include "CyArea.h" #include "CyPlot.h" #include "CvPlayerAI.h" //#include "CvEnums.h" #include "CvCity.h" #include "CvMap.h" #include "CvPlot.h" #include "CySelectionGroup.h" #include "...
f52995043132bcfe4faa73f0c62308b31ba83e87
f9f811a736ef8c2dd8fc76b6eef37d47602f89a0
Haydelj/SCIRun
/src/Core/Algorithms/Legacy/Converter/NrrdToField.cc
C++
cc
57,763
permissive
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2020 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ...
0d7daf86cf9e5f26ec42dacd0dd2fce6f5ab9686
45a134704889c768dd67cb5274f4f4af541d4ddf
anuragagrawal99/CPP_Apna_College
/16. Recurrsion/first_and_last_occurence.cpp
C++
cpp
575
no_license
#include<iostream> using namespace std; int firstOccurence(int a[], int n, int i, int key) { if(i==n) return -1; if(a[i]==key) return i; return firstOccurence(a,n,i+1,key); } int lastOccurence(int a[], int n, int i, int key) { if(i==n) return -1; int restArray = lastOccuren...
16a42cc89ce3b2094e29fae06669bfc4296abecb
821fbfca0946cc117c4f845f115c61700532c69d
RathiRohit/daily-coding-problem
/problem-00011/solution.cpp
C++
cpp
508
no_license
#include <iostream> #define ll long long #define ull unsigned long long using namespace std; int main() { int n; cout<<"Enter value of N:"<<endl; cin>>n; ll total = 0; ll power = 1; while(power <= n) { ll startFrom = n - (power - 1); ll fullCount = (startFrom / (power * 2)) * power; ll partial = startFr...
e39fb08e494e71772343f7673e262f6607cce577
395dad1ffc3160d20dc8a7bd838f0838edcd0664
zenoalbisser/chromium
/third_party/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
C++
cc
53,302
permissive
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
800160d8b3215ee3ad9bfd7f71d68cce3d875cec
cb5700f8ca16647bc2489c939b4e2bddb77bb1a5
PDi-Communication-Systems-Inc/chromium
/weblayer/browser/content_browser_client_impl.cc
C++
cc
26,298
permissive
// Copyright 2019 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 "weblayer/browser/content_browser_client_impl.h" #include <utility> #include "base/command_line.h" #include "base/containers/flat_set.h" #inclu...
28a51b8ea22018a2379a6049c77ce6a2262ba1ea
23167d36c5040e224c8d9068fb1cb6c06a768802
tsingyawn/cowbpt
/test/test_node.cpp
C++
cpp
14,686
no_license
#include <gtest/gtest.h> #include <string> #include <memory> #include <iostream> #define private public #define protected public #include "node.h" #include "slice.h" #include "comparator.h" using namespace cowbpt; bool equal(Slice a, Slice b); extern SliceComparator cmp; TEST(NodeTest, LeafNodeCRUD) { std::sha...
6da2eaed53ad4eb6893e463bffb3eb8613dd09c3
84165929361ca74a8e2df62d9d6baae1f1e4513a
arsebac/chromium
/components/signin/core/browser/ubertoken_fetcher_unittest.cc
C++
cc
6,553
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/signin/core/browser/ubertoken_fetcher.h" #include <memory> #include "base/memory/ref_counted.h" #include "base/test/scoped_task_env...
aaf37d12c6ab1872838a3d9b1d36cbf885404f9e
11d14f25a61bdae42a01e7725b3693355605db76
SCS-B3C/VTK5.6
/Widgets/Testing/Cxx/TestCheckerboardWidget.cxx
C++
cxx
11,666
permissive
/*========================================================================= Program: Visualization Toolkit Module: TestCheckerboardWidget.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This so...
3398a0a37938e2c1e38422e668929cc788306248
f3d49c699ab002d9797a4519c6fc0761a8e113db
seokan-jeong/Baekjoon
/Silver/2606.cpp
C++
cpp
630
no_license
// 21.7.12 // bfs #include <iostream> #include <queue> using namespace std; bool map[101][101], visit[101]; int NumOfComputers, cnt = 0; void bfs(int start) { visit[start] = true; queue<int> q; q.push(start); while (!q.empty()) { int current = q.front(); q.pop(); for (int i = 1; i <= NumOfComputers; i++)...
82ae76f3b7a133b0d86bc4dedde8679c21dc9d63
7ab44afd4ab471573190999c51c472e23173cf3a
luqmanarifin/cp
/Codeforces Round #452/a.cpp
C++
cpp
366
no_license
#include <bits/stdc++.h> using namespace std; int main() { int a = 0, b = 0, n; scanf("%d", &n); while (n--) { int v; scanf("%d", &v); if (v == 1) { a++; } else { b++; } } int ans = 0; for (int i = 0; i <= b; i++) { if (a < i) break; ans = max(ans, i + (a - i) / 3)...
2b2f66dfcc1324f287399f263e00d35f8150d1bb
d6b177d325893628edee0818750c80798fb535d4
hyl946/opensource_apple
/download/unzip/IOHIDFamily/IOHIDFamily-503.92.1/IOHIDSystem/IOHIDUserClient.cpp
C++
cpp
18,404
no_license
/* * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1998-2013 Apple Computer, Inc. All Rights Reserved. * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file exce...
7ee86bd022df676903bb8c1b33b0774134f7f007
ebae550555f84053f4f9d535f806a6816ae8f3fd
itspriyansh/DSA-Coursera-Specialisation
/Genome_Assembly/Programming-Assignment-1/Assignment1.cpp
C++
cpp
1,225
no_license
#include <iostream> #include <cstring> #include <vector> #include <algorithm> using namespace std; int largestBorder(string& a, string& b){ string temp = b+a; vector<int> s(temp.size()); s[0]=0; int border=0; for(int i=1;i<s.size();i++){ while(border>0 && temp[border]!=temp[i]){ border = s[border-1]; } ...
1cf113415073974da1dee75ea58fe912417ccc80
c7e87288a47785033d0223cd672e841b0d1dea36
karina-rodriguez/CI224-opengl
/source/main/View.cpp
C++
cpp
2,394
no_license
#include "View.hpp" View::View(int widtht, int heightt) { width = widtht; height = heightt; } View::~View() { } int View::initialise() { // Initialise GLFW if( !glfwInit() ) { fprintf( stderr, "Failed to initialize GLFW\n" ); getchar(); return -1; } ...
eae1faf99d3a0943422864e31aa8744bc8e49a5b
7f908464d60b8be239c22589ceab28f8973b8006
gmzang/mitsuba2
/src/bsdfs/roughdielectric.cpp
C++
cpp
21,102
permissive
#include <mitsuba/core/fwd.h> #include <mitsuba/core/plugin.h> #include <mitsuba/core/spectrum.h> #include <mitsuba/core/string.h> #include <mitsuba/render/bsdf.h> #include <mitsuba/render/ior.h> #include <mitsuba/render/microfacet.h> #include <mitsuba/render/fresnel.h> #include <mitsuba/render/texture.h> #include <mit...
6fc7942cef4507bce276104ffd25ec2dbbeb5e9e
3b8b249935406936a519be64b3928e324ff7636a
rushioda/PIXELVALID_athena
/athena/PhysicsAnalysis/JetTagging/JetTagInfoTPCnv/src/TrackCountingInfoCnv_p1.cxx
C++
cxx
1,238
no_license
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ /// /// Code for the converters /// #define private public #include "JetTagInfo/TrackCountingInfo.h" #undef private #include "JetTagInfoTPCnv/TrackCountingInfoCnv_p1.h" #include "JetTagInfoTPCnv/BaseTagInfoCnv_p1.h" static Analysis::Base...
cb2b6cb2f53db26f9674feb9cba6b66eb7e254b1
78a0aa0dfc87165f70dbb14082840ef1170c39fe
junges521/netfoxclient
/huoying/src/游戏组件/碰碰车/游戏客户端/dlgbank.cpp
C++
cpp
16,756
no_license
// DlgBank.cpp : implementation file // #include "stdafx.h" #include "DlgBank.h" #include "resource.h" #define IDC_OK 500 #define IDC_CANCEL 501 #define IDC_FRESH 502 //定时器I D #define IDI_CHARMVALUE_UPDATE_VIEW 1 //更新界面 #define TIME_CHARMVALUE_UPDATE_VIEW 200 //更新界面 vo...
15a10bc16adcbc4c86457c40507764f1dba7e8f6
64a9be4857a7efd68a5a1d0120a92296ea147c68
chinagdlex/yggdrasil
/developing/yggdrasil/test/databasesystem/database_mgr_test.cpp
C++
cpp
6,884
no_license
//data_base_system_test.cpp #include <iostream> #include <yggr/base/yggrdef.h> #include <yggr/database_system/database_operator.hpp> #include <boost/bind.hpp> #include <vector> #include <yggr/database_system/database_mgr.hpp> #define USE_MYSQL #if defined(_MSC_VER) #if defined(_DEBUG) # pragma comment(lib, "libdtl-v...
61bb22f3a8b160125529898b7faa80a8ab556e47
53ecf7642c6d1a0dfa11e185532339c2beac9b0a
InfoSmart/InSource-Singleplayer
/src/game/shared/hl2/basehlcombatweapon_shared.cpp
C++
cpp
14,562
no_license
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #include "cbase.h" #include "basehlcombatweapon_shared.h" #ifdef CLIENT_DLL extern IVModelInfoClient* modelinfo; #else extern I...
a4ddb3409f1ff60072d860a1f504014160fa0a00
b881c241be7a865bd2393d5868b14e94fdbc10f2
cubetrain/CubeTrain
/contracts/libc++/upstream/test/std/experimental/string.view/string.view.comparison/oplt.string_view.pointer.pass.cpp
C++
cpp
2,543
permissive
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===---------------------------------...
86cc68081091c6dce52e2cccfbb5d1eb54cde947
adb6b3094ffea701b080ef416b80fded0726a452
firiexp/contest_log
/atcoder/Other/tkppc4_2_d.cpp
C++
cpp
935
no_license
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> #include <cmath> static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template<class T> conste...
0603387c01336285ed20026a6c10fbba649aca09
d8315bde02745f070fee957a6d52836aa930c186
LuisAlbertoVasquezVargas/CP
/otherRepos/luis/CDF/TECHNOCUP_2017/ELIMINATION_ROUND_1/F.cpp
C++
cpp
605
no_license
#include<bits/stdc++.h> using namespace std; #define REP( i , n ) for( int i = 0 ; i < n ; i++ ) #define clr( t , val ) memset( t , val , sizeof(t) ) #define all(v) v.begin() , v.end() #define pb push_back #define SZ( v ) ((int)(v).size()) #define mp make_pair #define fi first #define se second #define...
3a5f5eca3fcda8b6018f7266c6b3736bb168e7d2
84df2a69dcedf9ecba2b3dc3cb41acc73dc8e219
sadrulhc/chromium
/chrome/browser/ui/passwords/bubble_controllers/sign_in_promo_bubble_controller.cc
C++
cc
1,434
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/passwords/bubble_controllers/sign_in_promo_bubble_controller.h" #include "chrome/browser/profiles/profile.h" #include "chrome...
7842ec03f182802b71995859ca784dc1594d13a3
910694b5bf729806d5e6a85a809e89c3c24f01c3
amish1999/Leetcode
/cpp/_9.cpp
C++
cpp
1,454
permissive
/** * 9. Palindrome Number * * Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefor...
216ba918ae70e3c3f1fa4d8b247b98bb74324c78
78fd5ec6e547f852ca9a3e24d397e6ba3d8c6e9f
likewatchk/python-pcl
/VTK-7.1.1/Rendering/OpenGL2/vtkOpenGLPointGaussianMapper.cxx
C++
cxx
24,412
permissive
/*========================================================================= Program: Visualization Toolkit Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRAN...
483bcb9aa55eba593503c4a9e50b147d17c06eba
09e82d6bfcef302972eb4d7a8387c972f4c126e3
greiny/NN_image
/Conv_Training/src/matrix_maths.cc
C++
cc
4,566
no_license
#include "matrix_maths.h" using namespace cv; using namespace std; double Reciprocal(const double &s){ double res = 1.0; res /= s; return res; } Mat Reciprocal(const Mat &M){ return 1.0 / M; } Mat sigmoid(const Mat &M){ return 1.0 / (exp(-M) + 1.0); } Mat dsigmoid_a(const Mat &a){ Mat ...
b2307ba2cb53e7a7f272ee0fa036d84cfd5b6f32
8d545f2cf8c4cc461b4ca73fec8c1988ee8bc362
hoboaki/sandbox
/LowGfxApi/Vulkan01/ae/base/KeyboardUpdateData.hpp
C++
hpp
464
no_license
// 文字コード:UTF-8 #if defined(AE_BASE_INCLUDED_KEYBOARDUPDATEDATA_HPP) #else #define AE_BASE_INCLUDED_KEYBOARDUPDATEDATA_HPP #include <ae/base/KeyBitSet.hpp> //------------------------------------------------------------------------------ namespace ae { namespace base { /// @addtogroup AeBase-Hid //@{ /// キーボードの更新データ。 ...
26da059e7159da1a2c33861a80bd56c085dc1f31
2c73df3cb98a58a6cb2a71ec3abb2b421d5e3ff1
dalorin/FPSDemo
/objects.cpp
C++
cpp
9,400
no_license
#include "objects.h" #include <iostream> #include <sstream> #include "Shader.h" #include "targa.h" #include "GameEngine.h" #include "Utils.h" Object::Object(GameEngine* engine) { m_position = new Vector3(); m_scale = new Vector3(1.0f, 1.0f, 1.0f); m_velocity = new Vector3(); m_acceleration = new Vecto...
b6efe43da0c182cbbb7d1dbe66b943307c786adf
8581d8b6279fd050ad9be9801d33dbe60bfb9ee1
WebGameLinux/chromium
/chrome/browser/devtools/devtools_protocol.cc
C++
cc
4,811
permissive
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/devtools/devtools_protocol.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/strings/s...
2736f25b5386f1ed637e3822b32673e7ac4e7d8d
ce6e705074387201bc5fa8ad47113ad57f75d50c
happydpc/edyn
/src/edyn/util/shape_util.cpp
C++
cpp
2,385
permissive
#include "edyn/util/shape_util.hpp" #include <fstream> #include <sstream> namespace edyn { void make_plane_mesh(scalar extent_x, scalar extent_z, size_t num_vertices_x, size_t num_vertices_z, std::vector<vector3> &vertices, std::vector<uint16_t> &indices) { const auto h...
8115041af5d0006a793a1d5e13876a51009273f9
41ad1dea19f1b83f94b48a5fe9ac1e774d4f1ef7
diantaowang/cocoding
/322_coin_change.cc
C++
cc
815
no_license
#include <vector> #include <algorithm> #include <string> #include <iostream> using namespace::std; class Solution { public: int coinChange(vector<int>& coins, int amount) { sort(coins.begin(), coins.end()); vector<int> dp(amount + 1, INT32_MAX - 1); dp[0] = 0; int val = coins[0], c...
b4ce56a896f3fe50906df3931b027b2d08e33684
8f146ef593c571837ca771dc915505aa02e04fee
ngthanhtrung23/CompetitiveProgramming
/codeforces/393/B.cpp
C++
cpp
1,266
no_license
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++) #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; i--) #define REP(i,a) for(int i=0,_a=(a); i<_a; i++) #define EACH(it,a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); ++it) #define SZ(S) ((int) ((S).size(...
69bb3c54969e42b6aae3409824205d790abef12a
28865fbdef5d247886483535d59db442657cf62d
GoogleCloudPlatform/esp-v2
/src/envoy/utils/http_header_utils_test.cc
C++
cc
1,796
permissive
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
2046db56e7ae8aacb987f5478ad31efec9d44966
c7de23226f442e6ee82c505e6430e7c9d875c8ef
Thibaud-43/ft_containers
/srcs/ft_vector.cpp
C++
cpp
14,949
no_license
#include <vector.hpp> #include <ctime> #include <deque> #include <vector> #include <fstream> class Time { private: clock_t m_begin_std; clock_t m_end_std; clock_t m_begin_ft; clock_t m_end_ft; public: Time(/* args */){}; ~Time(){}; void setBeginStd(void) { m_begin_std = clock(); } void setBeginFt(void...
fa4d2e0bd6664a2adaad14218aaeb5e352b514a9
1391402e7395396cbe6a845a7442350b6728afc3
zsq001/oi-code
/11.12contest/source/Stu-26-11.12BeyondLimits/string/stringgg.cpp
C++
cpp
1,084
no_license
#include <cstdio> #include <cctype> #include <cstring> #include <iostream> using namespace std; const int INF = 1 << 30; int q, n, k, ans = INF; string s, t, st; bool flag; int main() { cin >> q; while(q--) { cin >> n >> s; t = s; for(int i = 0; i < (int)s.length(); i++) { i == 0 ? s.erase(i, ...
3af53391ad09b0c05148245b615cd62065919bba
67a8dad0fa179a542cf567b576303bc34eb68d63
KPEKZ/WinApi32
/LabWork1/CColoredBall.cpp
C++
cpp
485
no_license
#include "CColoredBall.h" CColoredBall::CColoredBall() { this->hBrush = CreateSolidBrush(RGB(0, 0, 0)); } CColoredBall::~CColoredBall() { DeleteBrush(this->hBrush); } void CColoredBall::SetColor(unsigned char r, unsigned char g, unsigned char b) { DeleteBrush(this->hBrush); this->hBrush = CreateSolidBrush(RGB(r,...
cde704e1e1cbc01b4eac45193764cd1194a950da
df1b0cc579871e39953235bf636c93f5de4c7c5f
timofimo/GameEngine
/GameEngine/Components/Light/SpotLight.cpp
C++
cpp
1,098
no_license
#include "SpotLight.h" /*local includes*/ #include "../GameObject.h" #include "../Shaders/InstanceSpotShader.h" SpotLight::SpotLight(std::string name, glm::vec3 color, glm::vec3 position, glm::vec3 direction, float angle, float constant, float linear, float exponent, RenderingEngine* renderingEngine) : PointLight(nam...
52b89644af9280c331a2c9dc428afa7892daba3e
5d702ca15bb6950f6a63c2dcc1358d11c6143412
spkdroid/OpenLoco
/src/OpenLoco/Windows/BuildVehicle.cpp
C++
cpp
56,707
permissive
#include "../CompanyManager.h" #include "../GameCommands.h" #include "../Graphics/Colour.h" #include "../Graphics/ImageIds.h" #include "../Input.h" #include "../Interop/Interop.hpp" #include "../Localisation/FormatArguments.hpp" #include "../Objects/CargoObject.h" #include "../Objects/InterfaceSkinObject.h" #include "....
fc6987f1b6b34948a44e47e7b76c04a5006cba8a
9e479f41f2541839c5d97c8ecac50f24ceac5820
AIFAN-Lab/Msnhnet
/examples/yolov3/yolov3.cpp
C++
cpp
1,588
permissive
#include <iostream> #include "Msnhnet/net/MsnhNetBuilder.h" #include "Msnhnet/io/MsnhIO.h" #include "Msnhnet/config/MsnhnetCfg.h" #include "Msnhnet/utils/MsnhOpencvUtil.h" int main(int argc, char** argv) { if(argc != 2) { std::cout<<"\nYou need to give models dir path.\neg: yolov3 /your/mod...