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
3e4930806c809af36b3af77c34f75a8876d64471
ff233fc00225339edd2a029e9dba7cda8e63e1ad
chenlei65368/algorithm004-05
/Week 2/id_445/429.n叉树的层序遍历.cpp
C++
cpp
1,595
permissive
/* * @lc app=leetcode.cn id=429 lang=cpp * * [429] N叉树的层序遍历 */ #include <queue> using namespace std; // @lc code=start /* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val, vector<Node*> _children) { val = _val; children = _chil...
7e9e5197d99a65890a139137c880904c1c676dca
125a465a48d3e774249b87fa32e685a7402b80ba
saket2012/Data-Structure-Problems-in-cpp
/Matrix_multiplication.cpp
C++
cpp
5,379
no_license
#include <iostream> #include <stdlib.h> using namespace std; template <class x> void accept(x *a, int m, int n) { int i, j; for (i = 0; i < m; i++) { for (j = 0; j < n; j++) { cin >> a[i][j]; } } } template <class x> void display(x *a, int m, int n) { ...
dd570ff65acb8fd136d49145bb1a1a078b13ca54
5a5a162ee35a9f19d5fa2605871e5c4ef5bf6797
PubFork/uaf
/src/UAFWinEd/ListSort.cpp
C++
cpp
6,998
no_license
/****************************************************************************** * Filename: ListSort.cpp * Copyright (c) 2000, UAF Development Team (email CocoaSpud@hotmail.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published...
6cc193c3c0303e744a93ba73dbe59afca477c110
b23a275225f655ade609cfebbaf0f17743618444
syglee7/zenacoin-ver2
/src/test/allocator_tests.cpp
C++
cpp
7,431
permissive
// Copyright (c) 2012-2019 The Zenacoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <util/memory.h> #include <util/system.h> #include <test/util/setup_common.h> #include <memory> #include <boost/t...
9e3051e918c682ae61064c0db6179b9091eafb6b
7015c577ec54664b2ed4a92f80c4b7b634ab60cb
nichoal/apollo
/modules/planning/tasks/qp_spline_st_speed/qp_piecewise_st_graph.cc
C++
cc
16,156
permissive
/****************************************************************************** * Copyright 2017 The Apollo 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 ...
c271a17677a73b01a83e700e56ce3b306e335eb2
f49c91be668620e8a0468693adbc0a7cee0437e3
connectthefuture/psdmrepo
/H5DataTypes/tags/V00-05-10/src/CsPad2x2PedestalsV1.cpp
C++
cpp
2,895
no_license
//-------------------------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Class CsPad2x2PedestalsV1... // // Author List: // Andy Salnikov // //------------------------------------------------------------------------ //----------------------- // T...
e6d7cdf32a1ace3f2ea8db2fba438089fff4ce36
5445d88b0b3432e0529828e4ce68da72e1640740
AbouOpenSource/GrahamHill
/Triangle.cpp
C++
cpp
708
no_license
// // Created by abou on 25/11/2019. // #include <vector> #include "Triangle.h" Triangle::Triangle(Vector2D *ptr1, Vector2D *ptr2,Vector2D *ptr3){ ptr[0] = ptr1; ptr[1] = ptr2; ptr[2] = ptr3; } bool Triangle::isInside(Vector2D *p) { return isOnTheLeft(p,ptr[0],ptr[1]) && isOnTheLeft(p,ptr[1],ptr[2]) &...
6667046b76baacc2442e2dddd5ed2129eea2e761
ff787cec2d272d1435f5d033a9a804d6e421c84a
guankang/NaviPackDebugTools
/commonSrc/hardware_interface/HardwareInterface.cpp
C++
cpp
5,969
no_license
#include "HardwareInterface.h" #include "tools/LogFile.h" int32_t HardwareInterface::mIdCounter = MAX_INTERFACE_ID; InterfaceStreamWriter* HardwareInterface::mInterfaceStreamWriter = NULL; void HardwareInterface::initInterfaceParam(uint32_t MaxTxBufferSize) { mIsNeedWriteToFile = false; ResetCounters(); for (int...
3e9abea37f762513ab6b2a237a4b7ae9bc7c3662
944462f1cfe75f289fd658e454dd4460e6d3ddc2
ndsev/zserio
/test/language/sql_tables/cpp/ComplexTableTest.cpp
C++
cpp
10,143
permissive
#include <cstdio> #include <vector> #include <string> #include <limits> #include <memory> #include "gtest/gtest.h" #include "sql_tables/TestDb.h" #include "zserio/RebindAlloc.h" #include "zserio/SqliteFinalizer.h" namespace sql_tables { namespace complex_table { using allocator_type = TestDb::allocator_type; using...
6f032d54e1212a89a0c798f176a9e45ce33392cf
7ccbf22441e8033a1ab8e1213977971395bb563b
koosaga/olympiad
/ICPC/CERC/cerc2016_a.cpp
C++
cpp
1,115
permissive
#include <bits/stdc++.h> using namespace std; typedef long long lint; typedef pair<int, int> pi; int n, m; char str[123][123]; bool sepl[123], sepr[123]; string norm(string s){ string r = s; reverse(r.begin(), r.end()); r = min(r, s); return r; } string solve(int sx, int ex, int sy, int ey){ string s; for(int ...
409a095a6d999154c876fc322f79e150007b64b9
b7d7ceb94cd8a3818d5e9fa83645d0c920b00795
avinashw50w/practice_problems
/ACM ICPC/Practice problems/Number theory,combinatorics and maths/Hackerrank - Mathematics/nCr.table.cpp
C++
cpp
788
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #define mod int(1e9) #define ll long long int using namespace std; ll memo[1000][1000]; ll mpow(ll a,ll b,ll m){ if(b==0)return 1; ll x=mpow(a,b/2,m); x=(x*x)%m; if(b&1) x=(x*a)%m; return x; ...
3ae8c6e042ba1bd9ba6b685a3114c1fa9783c399
805cebcee3d66acbd4d161dc3e628ed546d60bbc
jlcarr/ProjectEuler
/Problem029/main.cpp
C++
cpp
1,198
no_license
// Solution to Project Euler problem 29 #include <iostream> #include <chrono> #include <set> #include<map> /* create ordered set of a loop a pop powers of a less than 100 loop b on a powers and add powers to tracking set tracking set contains the answer */ int solution(){ long n = 100; std::set<int> a_set; for ...
9d40929e51fa92a376f32c1ab9cab05a9f9bde81
336fc514222223caff4c8e0abf5f0e59d3890954
emarkproject/eMark
/src/bloom.cpp
C++
cpp
6,127
permissive
// Copyright (c) 2012-2014 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 <math.h> #include <stdlib.h> #include "bloom.h" #include "main.h" #include "script.h" #include "uint256.h" #define L...
cc92300ed439a5c5872642d03744cf1097f7adc4
f6de118694131bfe3d22eec6301dee1366406ebd
cogitates/Code
/Cplus/Acwing/WrittenExam/acwing780.cc
C++
cc
1,693
no_license
// acwing 780 爱健身的小王 // https://www.acwing.com/problem/content/782/ #include <bits/stdc++.h> using namespace std; /* 首先分析一下小王会在哪里停下来。小王从起点走n+1步后打了第一个标记,我们记为A点,再走n+1步又打一个标记,记为B点,以此类推。 假设小王打了若干次标记后不是在A点停下来,比如是在B点停下来,那么往回退n+1步,小王上一次一定是在A点重复打了一个标记,这就有矛盾了 所以,小王一定是在A点停下来的。这个结论一旦成立,说明小王在A点重复打标记之前的一次就是在原点打标记。 我们记小王一共标记了m次,那么...
56aec0b1462e14eceb93a343e01994b5933c7f6e
48cb72d7d009164041057853faa2469556e1d87f
Raikiri/LegitEngine
/dependencies/gli/gli/sampler_cube_array.hpp
C++
hpp
2,975
permissive
/// @brief Include to sample cube map array textures. /// @file gli/sampler_cube_array.hpp #pragma once #include "sampler.hpp" #include "texture_cube_array.hpp" #include "core/mipmaps_compute.hpp" #include "core/convert_func.hpp" namespace gli { /// Cube map array texture sampler /// @tparam T Sampler can fetch, w...
5eed28cd8febbe3b0422715d28d818650b1d5f95
ca5ca19373c0dde6347ef862c96dda0387c1fc49
victorca25/inviwo
/modules/basegl/processors/imageprocessing/imageglprocessor.cpp
C++
cpp
6,010
permissive
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2014-2017 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
f200db4baae9b3bfec0cfeef601b9709e6fdfe72
d91bb42b89bcb1b8e0cfb7d97a3fc209e42d067a
amand-io/algorithms
/Grafos/Iniciante/dfs.cpp
C++
cpp
275
no_license
#include <bits/stdc++.h> #define MAX 1000007 using namespace std; vector<int> grafo[MAX]; bitset<MAX> vis; void dfs(int no){ vis[no] = true; for(int i = 0; i < grafo[no].size(); i++){ if(!vis[grafo[no][i]]){ dfs(grafo[no][i]); } } }
65629c294881222211f56fae0bb03c6d1974a2c1
e2698e7986cfc997de569c41ccadd769783da9a6
wonderful8coin/wonderful8coin
/src/rpcblockchain.cpp
C++
cpp
10,313
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 "main.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace...
d4822254bf7456fd3b412861184b08d7b82f6be3
075c02cfceb03590a7ae2ed5ac82e0d7637906f7
ElwooD07/DBContainer
/src/DbContainer/Widgets/ChooseContainerDialog.cpp
C++
cpp
2,044
no_license
#include "stdafx.h" #include "Widgets/ChooseContainerDialog.h" #include "ContainerException.h" gui::ChooseContainerDialog::ChooseContainerDialog(QWidget* parent, ActionType action) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint) , m_action(action) , m_wasShown(false) { m_ui.setupUi(this); setFi...
11b1df0065ef5acaca44d9a4069569f70a9c1ddc
4e4db2d2cb846d652bbee702d3c4196fd1b0cf8d
Urban82/rapidjsonxml
/test/unittest/encodedstreamtest.cpp
C++
cpp
9,144
permissive
#include "unittest.h" #include "rapidjson/filereadstream.h" #include "rapidjson/filewritestream.h" #include "rapidjson/encodedstream.h" #include "rapidjson/stringbuffer.h" #include "rapidjson/memorystream.h" #include "rapidjson/memorybuffer.h" using namespace rapidjson; class EncodedStreamTest : public ::te...
aa2cbf51bfd77fd10bd685775f414d380e2e6729
999d1cc12c3bbc5a7a7ad77f6e1f22dc3142ebc9
TimothyHorscroft/competitive-programming
/atcoder/abc291/e.cpp
C++
cpp
1,143
no_license
#include <bits/stdc++.h> using namespace std; #define int long long #define FOR(i, a, b) for (int i=(a); i<(b); ++i) #define ROF(i, a, b) for (int i=(a); i>(b); --i) #define vi vector<int> #define vvi vector<vi> const int MOD = 998244353; signed main() { ios::sync_with_stdio(0), cin.tie(0); int n, m; ...
adf24c2113b849f743f64f8ef933a1a63e0ea60a
ebfb7ee38437d8d48da24c3a98e519f891c4a394
nealwu/UVa
/volume118/11813 - Shopping.cpp
C++
cpp
1,921
no_license
#include <stdio.h> #include <string.h> #include <vector> #include <queue> #define none -1 using namespace std; typedef struct { int to, v; } Arc; typedef vector<Arc>::iterator it; vector<Arc> link[100000]; void SPFA(int n, int st, int dis[]) { queue<int> Q; bool used[n]; memset(used, 0, sizeof(used)); for(it i ...
ead0e7bca5ff82282e61db5d0e8ed2fbae2d86cc
54cb257c48a13ecb6d4412f1d860b62e935fc109
atomic14/flame_lamp_firmware
/src/ota.cpp
C++
cpp
1,454
permissive
#include <WiFi.h> #include <ESPmDNS.h> #include <WiFiUdp.h> #include <ArduinoOTA.h> #include "ota.h" OTA::OTA(const char *hostname) { ArduinoOTA.setHostname(hostname); ArduinoOTA .onStart([this]() { String type; if (ArduinoOTA.getCommand() == U_FLASH) type = "ske...
ef2499d76bdf450b0d2d236d46967fc9aa4cf3d5
650532d304d7981f7d0301a344099cf93a1d3a6d
Oitzu/mysensors-Arduino-attiny
/libraries/PN532/snep.cpp
C++
cpp
2,231
permissive
#include "snep.h" #include "PN532_debug.h" int8_t SNEP::write(const uint8_t *buf, uint8_t len, uint16_t timeout) { if (0 >= llcp.activate(timeout)) { DMSG("failed to activate PN532 as a target\n"); return -1; } if (0 >= llcp.connect(timeout)) { DMSG("failed to set up a connection\n"); return -2; } // r...
cfde86a598e0bcc70fa1e9b6052ee18d3b8c9ad0
ce725f9cb5399c7f2d265676384a4b2d7ae103fb
RonanFR/OMA-Projet-Informatique-2015
/Projet Informatique/SudokuSolver/OnlySquareVisitor.cpp
C++
cpp
2,864
no_license
# include "OnlySquareVisitor.h" # include <set> # include <algorithm> OnlySquareVisitor::OnlySquareVisitor() { } OnlySquareVisitor::~OnlySquareVisitor() { } bool OnlySquareVisitor::Visit(Grid & ioGrid) const { /** This function fills the cells that can take only one possible value by getting * the intersection o...
c40b64f7d430f4a786f8aef4d4456ed6b71f8478
6d3fc2d8fc549507b835f15675726cceb443ada8
fl4re/COLLADAMobu
/External/boost_1_63_0/libs/geometry/test/algorithms/overlay/get_turn_info.cpp
C++
cpp
29,971
permissive
// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_...
3bba3b89fd54fb48e771a0b69d04506fa20c18e1
e3b03aa3316ad834eb78c3dd091c6f793bfd35c0
ccdxc/logSurvey
/data/crawl/wget/old_hunk_2906.cpp
C++
cpp
1,451
no_license
ssl_print_errors (); return SSLERRCTXCREATE; } /* Can we validate the server Cert ? */ if (opt.sslcadir != NULL || opt.sslcafile != NULL) { SSL_CTX_load_verify_locations (ssl_ctx, opt.sslcafile, opt.sslcadir); can_validate = 1; } else { can_validate = 0; } if (...
f127bd1ab179e22250b9392b822cb4bfdec899f7
e45782fc915b8f2662c8769c4dec2f3b04ee112f
Hichigo/BldMystery
/src/BladeExt/Character.cpp
C++
cpp
52,568
no_license
#include "bladex_int.h" static PyObject* bex_char_LoadAllAnimations(PyObject* self, PyObject* args); static PyObject* bex_char_ChangeAnimation(PyObject* self, PyObject* args); static PyObject* bex_char_SetAnmDefaultPrefix(PyObject* self, PyObject* args); static PyObject* bex_char_AddAttack(PyObject* self, PyObject* ...
e0373b2755a7809c94ffd5ec50b41cde601c852f
1b1fba77958ee46faabc00ab057b3774ca7c2612
TiraX/tix2
/Samples/10.OceanFFT/HKtCS.cpp
C++
cpp
2,536
no_license
/* TiX Engine v2.0 Copyright (C) 2018~2021 By ZhaoShuai tirax.cn@gmail.com */ #include "stdafx.h" #include "HKtCS.h" #include "OceanRenderer.h" FHKtCS::FHKtCS() : FComputeTask("S_HKtCS") { } FHKtCS::~FHKtCS() { } static const E_PIXEL_FORMAT ResultFormat = EPF_RG32F; void FHKtCS::PrepareResources(FRHI* RHI) { In...
b4c106ae053acb5aca7523e9fae6f1ef70ad2de8
55dadc00d8c5bc44a97babd5d8f7dfe3a4216a5c
JaeseungYeom/lbann
/include/lbann/utils/serialization/serialize_matrices.hpp
C++
hpp
13,376
permissive
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2022, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
474a23a3d817b12798471281c3a2b5d67a64d1a3
6e6abcf589a48a69a17808757774b8e047904ee3
faa339/CS3113
/P3/CS3113Project3/CS3113Project3/Entity.cpp
C++
cpp
2,767
no_license
#include "Entity.h" Entity::Entity() { position = glm::vec3(0); acceleration = glm::vec3(0); velocity = glm::vec3(0); speed = 0; modelMatrix = glm::mat4(1.0f); } void Entity::Update(float deltaTime, Entity* platforms, int platformCount) { velocity += acceleration * deltaTime; position.y +...
2f5dce01f5ce4a9a175fb9e13c4cbdc596e67263
124a2dd7fc9ec3f5c8f109db95989ddebb66fc3a
yangzpag/asylo
/asylo/util/file_mapping_test.cc
C++
cc
4,069
permissive
/* * * Copyright 2018 Asylo 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 agree...
0c9f4ab7292f56ca5d53dc33ec0d5ace175f658e
77761670e594e2d03774a8ab08314b31dfafb31e
junxuezheng/chromium
/content/browser/renderer_host/input/fling_controller.cc
C++
cc
16,600
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 "content/browser/renderer_host/input/fling_controller.h" #include "base/time/default_tick_clock.h" #include "base/trace_event/trace_event.h" #in...
e65e8f1b17434b55dc147de59340ebb313ff0cc2
8991daef787dc89e463452b2752c0f9b5f2a1b35
amir5200fx/AutMarine-v4.2.0
/AutMarine v4.2.0/AutLib/Geom/Search/ADTree/Geom_ADTree2dNode.hxx
C++
hxx
722
no_license
#pragma once #ifndef _Geom2d_ADTree2dNode_Header #define _Geom2d_ADTree2dNode_Header #include <Entity_Box2d.hxx> #include <Standard_Integer.hxx> namespace AutLib { namespace GeoLib { template<typename T> class Geom_ADTree2d; template<typename T> class Geom_ADTree2dNode { friend class Geom_ADTree2d<T...
6d38f72146d400e7c0a613447bd362570661491c
b1aeab569bc2e21e03b3640612c35ad0a097a20f
wyl1232792/FemasContest
/old_version/FemasContest/ConsoleDialog.cpp
C++
cpp
584
no_license
// ConsoleDialog.cpp : 实现文件 // #include "stdafx.h" #include "FemasContest.h" #include "ConsoleDialog.h" #include "afxdialogex.h" // ConsoleDialog 对话框 IMPLEMENT_DYNAMIC(ConsoleDialog, CDialogEx) ConsoleDialog::ConsoleDialog(CWnd* pParent /*=NULL*/) : CDialogEx(IDD_DIALOG1, pParent) { } ConsoleDialog::~ConsoleDia...
e33f154cea5f5dd8fcc9e58435ecd70b96513e8a
f716a1524b81d0b3f0f077904a5256bc0e47c011
stefdasca/CompetitiveProgramming
/Infoarena/arbore7.cpp
C++
cpp
2,407
no_license
#include<bits/stdc++.h> #define mod 1000000007 using namespace std; ifstream f("arbore7.in"); ofstream g("arbore7.out"); int n; vector<int>v[100002]; int dp[3][100002]; long long ways[3][100002]; long long sol, moduri; void dfs(int dad, int nod) { if(v[nod].size() == 1 && v[nod][0] == dad) { ...
7d129593141ad78f0bd511dd7709202f4868e2a0
67e0806efcac14ad7c32a006194e9c4481f6fdec
kelandisi/NetworkProgram
/net2/http.cpp
C++
cpp
2,196
no_license
/*=============================================================== * Copyright (C) . All rights reserved.") * 文件名称: * 创 建 者:zhang * 创建日期: * 描 述:使用封装的TcpSocket类实例化对象实现tcp服务端程序 ================================================================*/ #include <iostream> #include <stdlib.h> #include "tcp_socket.h...
8c82ecb1c85679d77ec68046f34d107192815e3d
7d93a315acaa4cfddbbd8c6bfe42b19ad92d6f1f
churakina/Practica-school-16
/22/6/main.cpp
C++
cpp
791
no_license
#include <iostream> #include "TXLib.h" using namespace std; int main() { int xCenter, yCenter, R; txCreateWindow (400,400); txSetColour (TX_BLUE); txRectangle (0, 0, 400, 400); R = 10; xCenter=R, yCenter=200; void drawBall (int xCenter, int yCenter, int R); { txSetColour (TX_TRA...
1391fa50559b70c55d6e58fd7c1679435c8ebd46
6d68d7a13f3c13cb4478ebfff2d9d0872ed53d19
hechuanxi1990/chromium
/components/omnibox/browser/actions/omnibox_pedal.cc
C++
cc
8,132
permissive
// Copyright 2018 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/omnibox/browser/actions/omnibox_pedal.h" #include <algorithm> #include <cctype> #include <numeric> #include "base/metrics/histogram...
dc3b7349846771cb0aa32125f4749bf965b9b0ef
d8fe8940ce343468c193e635867d324e84b7f6b8
kghost/connectedhomeip
/examples/lighting-app/efr32/src/AppTask.cpp
C++
cpp
9,432
permissive
/* * * Copyright (c) 2020 Project CHIP Authors * Copyright (c) 2019 Google LLC. * 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 * * h...
98667f730e369410770662777b8ce40fd6173185
89a0cdbaa4e7138456d6ca6ad10431cc68272c71
imulan/procon
/aoj/vol1/0103.cpp
C++
cpp
559
no_license
#include <iostream> #include <cstdio> #include <string> using namespace std; int main(){ int n; scanf(" %d", &n); for(int i=0; i<n; ++i){ int count=0, ans=0, base[3]; for(int i=0; i<3; ++i) base[i]=0; //初期化 while(count<3){ string s; cin >> s; if(s=="HIT"){ if(base[2]==1) ++ans; base[2]=base[...
69b48d82bfd95dea4016dc4e86690d17f014abe1
dc18315e85c5506c0b252da4565d4e89379117c5
ityuhui/render-32
/main.cpp
C++
cpp
263
no_license
#include "App.h" #include "Render.h" int main(int argc, char** argv) { MyOGL::App app(&argc, argv, MyOGL::Render::getWindow(), MyOGL::Render::renderInit, \ MyOGL::Render::renderDisplay, MyOGL::Render::renderReshape); app.mainLoop(); return 0; }
34ec87299bbbd5216f28d3e6472253f798c20218
d29d38bdb8ae7d833a9216d8bea3cc1f895562fa
LanxinL/CrowdSimCityU
/gazebo/gazebo/sensors/GaussianNoiseModel.cc
C++
cc
7,997
permissive
/* * Copyright (C) 2012-2016 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...
75893ee8285d60ccbe218a64b0bb901abcad2e2a
0b6f0aca082775088719add90a97d2c36299f18c
SelyanKab/chromium
/chrome/browser/ui/views/extensions/extension_dialog.cc
C++
cc
9,253
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 "chrome/browser/ui/views/extensions/extension_dialog.h" #include <memory> #include <utility> #include "build/chromeos_buildflags.h" #includ...
fc48ae7140111a568c9d4fc71ade561eed84e025
7ba0faab1dd74511ef377e9fb787eb8dce35ef92
doublek420/bitcoin
/src/qt/test/uritests.cpp
C++
cpp
3,596
permissive
// Copyright (c) 2009-2014 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 "uritests.h" #include "guiutil.h" #include "walletmodel.h" #include <QUrl> void URITests::uriTests() { SendCo...
7e5d8eb4ab8c5cb8955c6900a768d14c28d7db50
8da6c8da21e1e230faa4a8e1a3c7133013e41f9f
mschwen/snogoggles
/src/3DModules/Tracks/TrackBuffer.hh
C++
hh
1,503
no_license
//////////////////////////////////////////////////////////////////////// /// \class TrackBuffer /// /// \brief Stores all of the VBOs containing relevent track information /// /// \author Olivia Wasalski <oliviawasalski@gmail.com> /// <wasalski@berkely.edu> /// /// REVISION HISTORY:\n /// ...
ab6eee0f43180d65a56205c40e985b527ce253b1
7a1b85214450eb422479c1a32f26dca70147c1ad
AKavrani7/CP-for-Fun
/A2OJ/Round1/A. k-String.cpp
C++
cpp
914
no_license
//// Signature Question //////////////// #include<iostream> #include<bits/stdc++.h> using namespace std; string k_string(int k, string str) { if(k == 1) return str; int alpha[26]; for(int i=0; i<26; i++) alpha[i] = 0; int n = str.length(); for(int i=0; i<n; i++) ...
9132c1e93f94c030be46308b55e0696fa36b1f8c
57f752924d6d356759c1a9cb9df9e0b1b7077555
operativeF/Kvasir
/Lib/Chip/CM0+/Freescale/MKW01Z4/SysTick.hpp
C++
hpp
4,526
permissive
#pragma once #include <Register/Utility.hpp> namespace Kvasir { //System timer namespace SystickCsr{ ///<SysTick Control and Status Register using Addr = Register::Address<0xe000e010,0xfffefff8,0x00000000,unsigned>; ///no description available enum class EnableVal { v0=0x0000...
2ec005524ff2820883dcdb6084ed78545b9252f3
7e2815178be2780b9db782e5a18e06b01e947e99
blackberry/Boost
/boost/fusion/container/deque/deque.hpp
C++
hpp
5,585
permissive
/*============================================================================= Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2006 Dan Marsden 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.t...
ec5a13893ee832f2c0e25994c1012fc8e6dda769
c1055946f22e283e6217bda0200807d60209297e
ejk6218/lv3.1-recovery
/controlSystem/RecoveryBoard/FirmWare/recovery_board_firmware/Core/Src/checkupCode.cpp
C++
cpp
5,009
no_license
#include "checkupCode.h" #include "recoveryUtils.h" #include "main.h" // test the LED void ledBlink(){ int i=0; while(i<5){ HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin); HAL_Delay(500); i++; } } // test the speaker void spkrTest(){ int i=0; // turn on speaker HAL_GPIO_WritePin(SPKR_GPIO_Port, SPKR_Pin, GPIO_...
7df3aee5ccb37c600b8070780036007f20b3cd1c
81042eac589e84657582cefbe56119d1d7faf9b4
lyw/StrawberryCore
/src/game/Scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp
C++
cpp
9,867
no_license
/* Copyright (C) 2006 - 2012 ScriptDev2 <http://www.scriptdev2.com/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version....
6cb6919fcb89577240d0d35bf8351c95355bf579
69ea315f7b85777e4a8a7fbd33ee7824090f3932
Galenika/dankme.mz
/dankme.mz/Gladiatorcheatz-v2.1-master/NetMngr.hpp
C++
hpp
798
permissive
#pragma once #include <unordered_map> #include "misc/Recv.hpp" #include "Singleton.hpp" class NetMngr : public Singleton<NetMngr> { public: void init(); int getOffs(const char *tableName, const char *propName); bool hookProp(const char *tableName, const char *propName, RecvVarProxyFn func); bool h...
c5669e9b77d88c5b35da0f1e9dc4251efb1a6358
f5fb6b2009190b63951bf6982330627dfa48d033
blockspacer/cobalt-clone-28052019
/src/out/linux-x64x11_devel/gen/bindings/browser/source/cobalt/dom/v8c_dom_rect_read_only.cc
C++
cc
30,183
permissive
// Copyright 2019 The Cobalt 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 ...
b3bf63d5a1951eabb088f6435403988ea56b956d
4db559819e018285cda73f1dd1c67131d3f12518
SymbolixAU/s2Test
/src/stringprintf.cc
C++
cc
2,865
no_license
// Copyright 2002 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
7211c16f8cfbe4c7984a4ab45cc80838c14c50be
c95c56faad3a573540894efd4db7c17d0860a0c5
A0nameless0man/Pile
/ProblemSet/VOJ/2020.3.8Team/A.cpp
C++
cpp
5,316
no_license
#include <cstdio> #include <iostream> #include <map> #include <string> #include <vector> long long gcd(long long a, long long b) { if(a < b) { return gcd(b, a); } if(b == 0) { return a; } return gcd(b, a % b); } long long mcl(long long a, long long b) { return a * b / gc...
fd83ead9fcad887eb36de5ff32d2dc5bb134601e
cc4f240ce17e9c919c51e6322b11864b30328c45
xlxes/Demo
/ros/src/actiondemo/src/do_dishes_action_server_node.cpp
C++
cpp
2,026
no_license
//这是actionlib的服务端 #include <actiondemo/DoDishesAction.h> #include <actionlib/server/simple_action_server.h> //这样定义下会用起来简洁许多 typedef actionlib::SimpleActionServer<actiondemo::DoDishesAction> Server; class DoDishesActionServer { public: DoDishesActionServer(ros::NodeHandle n): server(n, "do_dishes", ...
443d4c69d22cd89c20fbe848bad16935d14612b9
baa869a0e35ba60f92877c826fbfff5ce2c069a0
google-code-export/assaultcuber
/source/src/stream.cpp
C++
cpp
21,529
permissive
#include "cube.h" ///////////////////////// file system /////////////////////// #ifndef WIN32 #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include <dirent.h> #endif string homedir = ""; vector<char *> packagedirs; char *makerelpath(const char *dir, const char *file, const char *prefix, const ch...
c254adbc3b091f0d5cae407049d91a5f695d5ce5
e935122df4443b252b9cf3e694f57dfa5615d2c4
vplotton/cpp_pool
/rush01/inc/InterfaceDisplay.hpp
C++
hpp
584
no_license
#ifndef INTERFACEDISPLAY_HPP # define INTERFACEDISPLAY_HPP #include <ncurses.h> #include <string> #include <vector> #include "AbstractModule.hpp" #include "Info.hpp" class InterfaceDisplay { public: virtual ~InterfaceDisplay() {} virtual void destroy_win(WINDOW * win) = 0; virtual void printGraph(WINDOW *wi...
4e575fe17af41e0c5f34af3aa3fcf83d4480ae46
66df36f157bc8d04ee676349041472e469caa7ae
extra-byte/extrabyte
/src/test/test_xbit.cpp
C++
cpp
2,424
permissive
// Copyright (c) 2011-2013 The Bitcoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #define BOOST_TEST_MODULE xbit Test Suite #include "main.h" #include "random.h" #include "txdb.h" #include "ui_interface...
3d68d3487c9101a8f7b5b2aa8e1aacb335a6ebb4
e76a659251365ecd0db4776b3f772d753e64a644
amitray1608/PCcodes
/practice/597B.cpp
C++
cpp
640
no_license
#include<bits/stdc++.h> using namespace std; #define int int64_t const int maxn = 5e5 + 1; int dp[maxn]; int n; vector<array<int, 2>> a; int recc(int i) { if (i >= n) return 0; int &ans = dp[i]; if (ans != -1) return ans; int j = upper_bound(a.begin(), a.end(), array<int, 2> {a[i][1] + 1, -1}) - a.begin() -...
05b8cfd1e250e1ae5fca06d604bf2c2e45908126
3b1bc26ee98fcb5b7b3489cf7adb3ed9c1502fc5
pvardanis/PFMCPP_Project8
/main.cpp
C++
cpp
2,751
no_license
/* Project 8: Part 1/1 video: Chapter 4 Part 6 Create a branch named Part1 Public vs. Protected vs Private & Friend Build/Run often with this task to make sure you're not breaking the code with each step. I recommend committing after you get each step working so you can revert to a working version easily if nee...
79391c0aaf076b25a08a51ee55bb89b6f8063109
98c86cb6c10db6755c00eaa61c7f48a151a0fea5
knut0815/sample-code
/pcg.cpp
C++
cpp
777
no_license
Eigen::VectorXf Diagonal( const Eigen::MatrixXf &A ) { Eigen::VectorXf M(A.cols()); for ( int i = 0; i < A.cols(); i++ ) { float a = A(i, i); if ( fabs( a ) > 1e-6 ) { M(i) = 1.0f / a; } else { M(i) = 1.0f; } } return M; } Eigen::VectorXf PCG( const Eigen::MatrixXf &A, const Eigen::VectorXf &b, int m...
530669bf4de5cc0c5da11ed6f28a2256421aa4b2
88c788151183a81771c2c8831a3e7defffe8481c
usiksan/SaliCAD
/src/windows/SdPropBarSymPin.cpp
C++
cpp
1,535
no_license
/* Project "Electronic schematic and pcb CAD" Author Sibilev Alexander S. Web www.saliLab.com www.saliLab.ru Description Properties bar for symbol pin */ #include "SdPropBarSymPin.h" #include <QComboBox> SdPropBarSymPin::SdPropBarSymPin(const QString title) : SdPropBar( title ) { mPinType = new QCombo...
8b16e4696781874c224e44f14d8f8eda3d26d6b2
39f12e8d6494342db194cae2a28dd4730ed21ac8
YuryMikhailuts/L4AI
/L4AI/src/smart_from_json.cpp
C++
cpp
33,237
permissive
/* * smart_from_json.cpp * * Создано российским программистом на территории Российской Федерации. * (Created by a Russian programmer on the Russian Federation.) * * Дата создания (Created): 23 марта 2021 г. * Разработчик (Developer): Михайлуц Юрий Вычеславович (aracks@yandex.ru) */ #include <smart_from_jso...
22d57efa2646f8574c8f13091ee844f4fa4fb9b1
08d21f4202e31a48a276caf43134f3af46a1bde9
meniossin/src
/third_party/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc
C++
cc
3,459
permissive
/* * Copyright (c) 2015 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...
e23b05b99617660af8b1e98acfc8cb7d4603d03c
92aec13d96b2c9c82adf8a4c5620c498aba699eb
David4860/navcoin-core
/src/test/allocator_tests.cpp
C++
cpp
3,919
permissive
// Copyright (c) 2012-2015 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 <util.h> #include <support/allocators/secure.h> #include <test/test_navcoin.h> #include <boost/test/unit_test.hpp>...
4f572a214c1d1b559fb4b20830012b87e7fc4db0
5a1b1a23ec9342a5b284c5f097c5e601693a426e
tjjjohnson/freebayes
/src/Genotype.cpp
C++
cpp
68,566
permissive
#include "Genotype.h" #include "multichoose.h" #include "multipermute.h" vector<Allele> Genotype::uniqueAlleles(void) { vector<Allele> uniques; for (Genotype::iterator g = this->begin(); g != this->end(); ++g) uniques.push_back(g->allele); return uniques; } int Genotype::getPloidy(void) { int...
7572c04103dbb93c13b15f203cb7be0c5789cebc
d0b12266524bac5e71816fdecf2a386f2cac379d
shwina/cugraph
/cpp/tests/test_utils.hpp
C++
hpp
1,544
permissive
/* * Copyright (c) 2019, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
f8faec63b0906afc063a425aa4adf49717a387e8
db67fdf7444898fd656f2e250e35953625cfc2a9
AaronNGray/xalan
/src/xalanc/XPath/XalanQNameByValueAllocator.cpp
C++
cpp
3,722
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the "License"); * you m...
954aebdd6d445db18799b250d71954559b4a1a86
18220cb9ce63c5fc3dceb3ca0741373b9826f245
ccnufufan/Mndroid-5.0
/ALPS.L0.MP8.V2.1_LCSH6735_65C_HZ_L_INHOUSE/alps/vendor/mediatek/proprietary/platform/mt6735/hardware/mtkcam/D2/core/featureio/drv/tdri_mgr/tdri_mgr.cpp
C++
cpp
46,650
no_license
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or ...
0e807dbfbd6146e55e01429d74fbf49fa5387cb4
a8580103c6d6608c6e477eeef4492edd3cfbbff1
mitro42/Graph
/src/shortestPathDijkstra.cpp
C++
cpp
5,688
permissive
#include "shortestPathDijkstra.h" ///////////////////////////////////////////////////// // DIJKSTRA'S SHORTEST PATH ///////////////////////////////////////////////////// std::vector<std::pair<double, const GraphEdge*>> nodeWeightDijkstra(Graph &g, int startNode, int endNode) { std::vector<std::pair<double, cons...
3aa6d219bbbb5e1eed2d2be8296d2b3e1c8eee55
c606164ae96d7e67a3194ddea77eebfb7069966a
maskedw/dandy
/dandy/shell/commands/DShellCommand_example.cpp
C++
cpp
2,123
permissive
#include <dandy/shell/DShell.hpp> #include <optparse/optparse.h> int d_shellcommand_example(const DShellCommandContext* ctx) { // see https://github.com/skeeto/optparse struct optparse_long longopts[] = { {"help", 'h', OPTPARSE_NONE}, {"color", 'c', OPTPARSE_OPTIONAL}, {"address", 'a',...
796ea5c300e3a6b88be6d9d702674c2002e0e865
34b1545f209a62588d6b4ce6d9bde66c2526ffbe
laxtools/lax
/ext/asio/include/asio/detail/null_reactor.hpp
C++
hpp
1,404
permissive
// // detail/null_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef ASI...
068bee0e5e8e59cbae97f41dd699af430743f80d
8ca84353dc220746251c5bdba2b47322a59d2c75
amsaabesh/All-Project
/C/Abashon C/Abashon.cpp
C++
cpp
8,801
no_license
#include<stdio.h> #include<string.h> int main() { int i,j,k; char pasw[20],input_pass[20]; printf("\t\tWelcome TO Abashon\nThis Software is Designed by Ahmed Mahir Shoaib\nIf you want to continue press 1, else anything\n"); scanf("%d",&k);//press 1 to enter in main code... FILE *bill_save,*bill_coll...
5744756f36eca1f11ab2ec9563afe04157ed82ea
4febce5c001687c688202120f16b7a21eee18881
yjgddd/Coding-interviews
/剑指offer/调整数组顺序使奇数位于偶数前面/solution.cpp
C++
cpp
370
no_license
class Solution { public: void reOrderArray(vector<int> &array) { vector <int> temp; int i; for(i=0;i<array.size();i++) if(array[i]%2==1) temp.push_back(array[i]); for(i=0;i<array.size();i++) if(array[i]%2==0) temp.push_back(array[i]); for(i=0;i<array.s...
9e26a8d83890e9a9946d9504ec16a3de607433ec
fddf2c08962a676f78d2f4825a4f416d016e0613
weiyinfu/learnCtypes
/004-ctypes结构体/a.cpp
C++
cpp
299
no_license
#include <string.h> #define EXPORT_HELLO_DLL #include "a.h" char* GetStructInfo(struct StructTest* pStruct) { for (int i = 0; i < ARRAY_NUMBER; i++) pStruct->iArray[i] = i; pStruct->pChar = "hello python!"; strcpy(pStruct->str, "hello world!"); pStruct->number = 100; return "just OK"; }
e39d4d28cc9c05b5ebeaf851b54646dc66455c5f
214fc7816042deb5f48d9ddc046db3b12cc5378f
sgzwiz/misc_microsoft_gamedev_source_code
/misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/extlib/havok/Source/Physics/Dynamics/World/hkpWorldCinfo.cpp
C++
cpp
5,996
no_license
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent.This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Level 2 and Level 3 source code contains trade secrets...
7caa8b90c26a964c9691111dc8e43771d1667e3a
e0678c3028b701b22eff2521fb6e4c2b4253277b
CCMS-UCSD/CCMS-sps
/trunk/FalseLocalizationRates/FalseLocalizationRates.cpp
C++
cpp
103,339
no_license
/* * FalseLocalizationRates.cpp * * Created on: May 14, 2011 * Author: jsnedecor */ #include "FalseLocalizationRates.h" namespace specnets { // ------------------------------------------------------------------------- FalseLocalizationRates::FalseLocalizationRates() { //void } ...
dda97d0242e2512392b978ed79cdc4503aa3d102
85fbb872e8babfa6ac31b80d0ea97a29b903848a
shortstories/terminal
/src/terminal/parser/ut_parser/StateMachineTest.cpp
C++
cpp
6,664
permissive
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #include "precomp.h" #include "WexTestClass.h" #include "../../inc/consoletaeftemplates.hpp" #include "stateMachine.hpp" using namespace WEX::Common; using namespace WEX::Logging; using namespace WEX::TestExecution; namespace Mi...
511bdd7bed74a66dcca335e25ab0cf0ec1a93697
d1b870fc10a2da51694c18f96f0fdaabd8f0da85
dirmich/Revised_II
/src/projectmgr.cpp
C++
cpp
9,419
no_license
/* * This file is part of Revised, a visual editor for Ren'Py * Copy right: 2014-2015 Ray <ray.cn@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of...
6affaa5b55d72d9815b6479be9e25b7955fa026a
89ea2346ba02ec8fa3874b75075b3dfe49eb678e
ytt/CornStarch-1
/Application/Window/View/MainNotifier.cpp
C++
cpp
1,011
no_license
#include "MainNotifier.hpp" #include "../Service/StringUtility.hpp" namespace CornStarch { ; CMainNotifier::CMainNotifier(void) #ifdef _WIN32 :m_taskbar(NULL) #endif { } CMainNotifier::~CMainNotifier(void) { #ifdef _WIN32 delete m_taskbar; #endif } ///////////////////////////////////////////////////////////////...
99c5b9ce53dae11e300ef45e4d3117cffc9d1948
2e78a3c80742912be2c860252df937fe1a0e9cfd
kanc/UTAD
/2D/Practica 9 - Efectos de Particulas/src/sprite.cpp
C++
cpp
5,187
no_license
#include "../include/sprite.h" //#include "../include/rectcollision.h" #include "../include/image.h" //#include "../include/map.h" #include "../include/math.h" //#include "../include/pixelcollision.h" #include "../include/renderer.h" //#include "../include/circlecollision.h" #include <math.h> #include "../include/scree...
f71df6a9757893c41aad1714ae0711ec0d68750c
ef4311d9c46a1b8185cc4ecd71c303b9d918ee69
Treecase/irc-client
/src/util/util/sockets.hpp
C++
hpp
473
permissive
/* Copyright (C) 2023 Trevor Last * See LICENSE file for copyright and license details. */ #ifndef UTIL_SOCKETS_HPP #define UTIL_SOCKETS_HPP #include <string> /** Open a connection to HOSTNAME:PORT_NUMBER. */ int get_tcp_socket(std::string const &hostname, std::string const &port_number); /** Read all available ...
86d2cec79b15cbf9ea79fdc22b9e0070c3afa1ea
e475209fa5ae7265f8105803ecab320351408bf7
biswarup55655/DSA_sem4_Practical
/Day2(23.04.2021)/toh(recursion).cpp
C++
cpp
472
no_license
#include<iostream> #include<math.h> using namespace std; void TOH(int n,char Sour, char Aux,char Des) { if(n==1) { cout<<"Move Disk "<<n<<" from "<<Sour<<" to "<<Des<<endl; return; } TOH(n-1,Sour,Des,Aux); cout<<"Move Disk "<<n<<" from "<<Sour<<" to "<<Des<<endl; TOH(n-1,Aux,Sour,Des); } i...
28873088189bc9c784cf9319669f5631490e5470
66125f8a9c21b1850fd93707b933347c0236b837
akshaymarch7/chromium
/third_party/blink/renderer/core/paint/image_paint_timing_detector_test.cc
C++
cc
38,102
permissive
// Copyright 2018 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 "third_party/blink/renderer/core/paint/image_paint_timing_detector.h" #include "base/bind.h" #include "base/test/test_mock_time_task_runner.h" #...
63d5ca473520f7091b6a4917758a65e9c686fc69
c78929f3818dec311b806a667c6822403e78d743
duartepbrandao/LAIG2
/src/objload.cpp
C++
cpp
45,424
no_license
//----------------------------------------------------------------------------------------------------------- /// \file objload.cpp /// \author Rob Bateman, mailto:robthebloke@hotmail.com /// \date 11-4-05 /// \brief A C++ objloader supporting materials, and any face data going, groups /// (ie, different meshes), ca...
3aa9c32cc6d10e6b4d6504d8eff1f3a920c421d9
c63d33e313a3008deb966ae8a5b7efc9cf803f64
hbdhj/spoj-cpp
/9334_TETRAHED.cpp
C++
cpp
1,471
no_license
/* TASK: Point in tetrahedron ALGO: geometry */ #include <cstdio> typedef struct { int x, y, z; } Point; typedef long long i64; inline i64 calc(const Point &a, const Point &b, const Point &c, const Point &d) { i64 usq, vsq, wsq, Usq, Vsq, Wsq, u1, v1, w1; usq = (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) + (a.z-b.z...
8f6f4129e5d71160a6f8ec655e75af81fc2ec19e
bb5d7d6149f52ac9e732bf24323de92983dcd291
teefyl/Basic-Graphics
/Lab3.cpp
C++
cpp
10,585
no_license
//Some Windows Headers (For Time, IO, etc.) #include <windows.h> #include <mmsystem.h> #include <GL/glew.h> #include <GL/freeglut.h> #include <iostream> #include "maths_funcs.h" //Anton's math class #include "teapot.h" // teapot mesh #include <string> #include <fstream> #include <iostream> #include <s...
10899980515282f1b4c82ccc1d778fb64f461f4c
8cb17911ed1860496d9c384f5c37c5093bb3807b
InteractiveComputerGraphics/SPlisHSPlasH
/Simulator/GUI/imgui/Simulator_GUI_imgui.cpp
C++
cpp
27,357
permissive
#include "Simulator_GUI_imgui.h" #include "GUI/OpenGL/MiniGL.h" #include "GUI/imgui/imguiParameters.h" #include "SPlisHSPlasH/Simulation.h" #include "SPlisHSPlasH/TimeManager.h" #include "../OpenGL/Simulator_OpenGL.h" #include "SPlisHSPlasH/Utilities/SceneLoader.h" #include "GUI/OpenGL/Selection.h" #include "Utilities/...
c778d802ad0f5aa987c6d7ca5a31ff8e00f8239b
f810bc91486b8962fa15770a0818e4186a6d720a
ljca/mybackup
/src_note/develop/cpp-src/overload/operator/add.cpp
C++
cpp
303
no_license
#include <iostream> #include "mytest.h" int main() { Test test1(1,10); Test test2(2,20); Test test3(3,30); test1.show(); test2.show(); test3.show(); Test total; total = test1 + test2; std::cout << "test1 + test2 = ?\n\r"; total.show(); std::cout << std::endl; return 0; }
c6beddead8bc335e6743328bc27aa5ca02f9d4ca
0a86cbcc759287eb6a4e8d45292503fe7c44e86b
HackShitUp/Theory-Comp
/proj1/proj1.cc
C++
cc
1,304
no_license
/* * CISC 4090 (Theory of Computation) * Spring, 2020 * * Project 1: A Deterministic Finite-State Automaton * * Given a file describing a DFA, this program reads strings from * input, saying whether the DFA accepts the string. If the string is * accepted, then its trail through the FSA is printed as well. * ...
cb42d79dde90bd81fce5909a2a5e9120351dd292
58a6173368f725e3fcc8577ca51d49b58f568bfe
sadrulhc/chromium
/content/browser/renderer_host/render_widget_host_view_aura_browsertest.cc
C++
cc
14,110
permissive
// Copyright 2018 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 "content/browser/renderer_host/render_widget_host_view_aura.h" #include "base/bind.h" #include "base/macros.h" #include "base/run_loop.h" #inclu...
7d7c107ed1d39102fc283766b1c731b58893a7ce
095306ef7dd410d1d9640eeffccbe38feff91755
fcortez426/LabosFunda
/Cuadratica.cpp
C++
cpp
1,028
no_license
#include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main(){ int a=0; int b=0; int c=0; float valorp=0; float valorn=0; float raiz=-3; float resfin=0; cout << "******************************************\n"; cout << "*****RESOLUCION DE FORMULA CUADRAT...
770fed8fe779d305db6bac7532ae83676c1fd219
b8d28f7be7c2d992f307bdfcb1331c43047d3190
ezyang/pytorch
/torch/csrc/distributed/autograd/rpc_messages/rpc_with_autograd.cpp
C++
cpp
6,057
permissive
#include <torch/csrc/distributed/autograd/rpc_messages/rpc_with_autograd.h> #include <c10/util/C++17.h> #include <torch/csrc/distributed/rpc/rpc_agent.h> #include <torch/csrc/distributed/rpc/utils.h> #include <torch/csrc/jit/serialization/pickle.h> #include <torch/csrc/utils/byte_order.h> namespace torch { namespace d...
6abddde11a751f28e6689469c5db4c4c6a183853
b66f4bc4de7683d037c4fe86e14361f97dfaa4cf
htcondor/htcondor
/src/condor_utils/uids.windows.credd.cpp
C++
cpp
2,660
permissive
/*************************************************************** * * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
5e03e207d076723ecaebdc2c18071931c226b77e
4426fd1484f9e359cfbce733817630c0fdbe0065
santonugoswami/dostem2.0
/src/ecodomain/Vegetation.cpp
C++
cpp
12,273
no_license
/* * Vegetation.cpp * * Purpose: Defining vegetation structure * * History: * June 28, 2011, by F.-M. Yuan: * (1) added for constructing vegetation domain (plant community) * * Important: * (1) Parameters are read from 'CohortLookup.cpp', and set to 'vegdimpar' (struct:: vegpar_dim)...
93692628d225fa7d3c4d2010d7b705355a179a0d
5e9df21730ba8f967dc3eff6cec3e20ce03200b9
kbell23/Across-Words
/acrossWords.cpp
C++
cpp
16,350
no_license
// Author: Kevin Bell // April 25, 2017 #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include "string.h" #include <time.h> #include <ctype.h> #include <iostream> using namespace std; //--------------------------------------------------------------------------------- // declares the struct ...
57c10a75e31cdb85e924e1efdc26790845748824
0ab1f6d61ab79d74e290cfd1aa7b331d94b30942
dtcxzyw/OI-Source
/Source/ProjectEulerEasy/PE6.cpp
C++
cpp
217
no_license
#include <cstdio> typedef long long Int64; int main() { Int64 n; scanf("%lld", &n); Int64 a = n * (n + 1) / 2; Int64 b = n * (n + 1) * (2 * n + 1) / 6; printf("%lld\n", a * a - b); return 0; }
dfecdc0ea5b55e8fd8e28f7ec60b4baefae32e47
9e09896598577715c4031e16ae0bfa3556b13583
alandbarroso/multimidia
/build/.moc/moc_treasure_hunter_widget.cpp
C++
cpp
2,996
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'treasure_hunter_widget.h' ** ** Created: Thu Dec 5 21:14:44 2013 ** by: The Qt Meta Object Compiler version 63 (Qt 4.8.4) ** ** WARNING! All changes made in this file will be lost! *************...
2c8dc1ac14e7fb06c4aefb7701cbc5c607948012
cf2439e2f846afff87405ebc79151b3d81575f31
longbowlee/C_Code
/栈的应用_表达式转换为逆波兰表达式_.cpp
C++
cpp
2,108
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ElemType char #define STACKINCEMENT 20 #define STACK_INIT_SIZE 50 #define Status int #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef struct { ElemType *base; ElemType *top; int stacksize; }stack; Status I...