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
c66f5f8b0ef5a6fb7b2e2c5d24de8c1f61200d96
144afae2ad734e77ec6090281aafadd7d897deae
RickyJun/live_plugin
/back/RtmpLivePushSDK/boost/boost/system/windows_error.hpp
C++
hpp
3,807
permissive
// boost/system/windows_error.hpp ------------------------------------------// // Copyright Beman Dawes 2007 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/...
4bb5f65e42f0590b5ab71bacd58e3cae8c99111b
b2d6d70f526270ddc01146a7dbb4338c223575db
jw4967/Bulb-Ver2.0
/WinMain.cpp
C++
cpp
1,906
no_license
#include "stdafx.h" Main main; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hWnd; WNDCLASSEX wc; ZeroMemory(&wc, sizeof(WNDCLASSEX)); wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = WindowProc; wc.hInstance = ...
59c08fc9b10cf1748b2f42b8deadcd8066de82da
c2a77ed1e34b1c45f24380a4b10b3741969eb674
xtblock/chromium
/content/public/test/signed_exchange_browser_test_helper.cc
C++
cc
3,904
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 "content/public/test/signed_exchange_browser_test_helper.h" #include <memory> #include "base/files/file_path.h" #include "base/path_service.h" ...
330043983c129fdf9009554568f38d4521f97b52
d071e468101e1c7d20fd19cfc98b1f42d30978a4
MohitR1999/cpp
/subtraction.cpp
C++
cpp
423
no_license
#include<bits/stdc++.h> using namespace std; int finalResult(int num, int k) { int result = num; for(int i = 1; i<=k; i++) { int lastDigit = result%10; if(lastDigit > 0) { result -= 1; } else { result /= 10; } } return result; } i...
668d3b1f9483f599ec20fcd81e09ede711f2836e
97c6963ff05a1166ef43b012aea0094e28c76e9e
IMWYY/algorithmING
/leetCode/math/Problem1093.cpp
C++
cpp
1,443
no_license
#include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; /** * We sampled integers between 0 and 255, and stored the results in an array * count: count[k] is the number of integers we sampled equal to k. * * Return the minimum, maximum, mean, median, and mode of the sample ...
a4b0d5e6e8f1304f7b918e9f6c8c90237b6e125f
cec1a071d2e4666c78de0385368d4710ba303391
tkadauke/raytracer
/test/functional/steps/BoxSteps.cpp
C++
cpp
876
no_license
#include "test/functional/support/RaytracerFeatureTest.h" #include "test/functional/support/GivenWhenThen.h" #include "test/helpers/ShapeRecognition.h" #include "raytracer/primitives/Box.h" using namespace testing; using namespace raytracer; GIVEN(RaytracerFeatureTest, "a centered box") { auto box = std::make_shar...
95df4923634b4be4301e7e044418a81a9dfdafaa
8f70552fa5d08a4498609a62f1d3c4eec6bfc61e
eugene1211/PreTest
/Source/PreTest/Character/ActionKeyManagementComponent.cpp
C++
cpp
4,309
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "ActionKeyManagementComponent.h" // Sets default values for this component's properties UActionKeyManagementComponent::UActionKeyManagementComponent() { // Set this component to be initialized when the game starts, and to be tic...
2a6c797038a5aa400026b263ba3482eca59f0131
f243bcfa4e71eaaa3c2a11b3b7746c0d76361bb7
axelgafu/ObjectOrientedWork
/ObjectOrientedWork/CStack.cpp
C++
cpp
746
no_license
// ObjectOrientedWork.cpp : Defines the entry point for the console application. // #include "stdafx.h" namespace StackPro { #include "CStack.h" /* Use this function to get the element at the top of the stack. */ unsigned int CStack::Pop() { if (m_iStackPointer > 0) { return m_uiBuffer[m_iStackPointer-...
90cc7044df1edf5770966dba4e7992edc92d114f
e9f605dd50b99f6fa0f085f56313539b84d05464
SourceEnginePlayground/source-sdk-2004
/src_mod/dlls/hl2_dll/script_intro.cpp
C++
cpp
11,266
no_license
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #include "cbase.h" #include "eventqueue.h" #include "script_intro.h" #include "point_camera.h" // memdbgon must be t...
61d1b8c81a747ad49aba992978cda77769a4d83e
5e20f24b402d877de0d63957c65e5324c9335d3c
wzekin/BUPT-Projects
/C++/stage1/test.cpp
C++
cpp
1,215
no_license
#include "lib/monster.h" #include "lib/monster_factory.h" #include <QtCore> #include <QtGlobal> #include<iostream> #include <QDebug> using namespace std; int main(){ Monster *u = MonsterFactory::produce("Charizard", 1); qDebug() << "宠物小精灵的名称:" << u -> name(); qDebug() << "宠物小精灵的昵称:" << u ->...
cc3ad0f7bdf3ce5195e8a11261e852ac51fa3c4c
8c3690cdfad8e0e1b2a59d819b21c2be67a82683
alexandraback/datacollection
/solutions_5630113748090880_1/C++/Shreyas14/main.cpp
C++
cpp
1,053
no_license
// // main.cpp // test // // Created by Shreyas Sinha on 09/04/16. // Copyright © 2016 Shreyas Sinha. All rights reserved. // #include <iostream> #include <fstream> #include <cmath> #include <vector> #include <list> #include <string> #include <set> using namespace std; typedef long long ll; int t,n,num; int mai...
89f82d5944d7322dcd98d51927fbbd5b9d2b9397
2fb0d87354ee382058f695990d6f7f37e412f346
Strongc/libccc
/test/test_refptr.cpp
C++
cpp
907
no_license
#include "ut.h" #include "ccc.h" #include <stdio.h> using namespace ccc; using namespace std; class Foobar { public: static int count; Foobar() { count++; } ~Foobar() { count--; } void hello() { printf("Hello Foobar\n"); } }; int Foobar::count = 0; int main() { UT_APP(ccc...
b2571b5c2abea325912c42d3ed8719db7e074971
d38588febdd27706db8d876d99d270bcd522751d
jackiewais/game-1986
/connectionManager/ConnectionManager.cpp
C++
cpp
5,772
no_license
/* * ConnectionManager.cpp * * Created on: May 10, 2016 * Author: pablomd */ #include "ConnectionManager.h" #include <iostream> #include <cstring> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include "../Logger/Log.h"...
ec82652446d50a0e95116647b3a07f23e1553501
6f35f79d2e5417448586a59d11cd3e2d6eeeaa88
bhaveshwadhwani/CarND-Extended-Kalman-Filter-Project
/src/FusionEKF.cpp
C++
cpp
4,786
permissive
#include "FusionEKF.h" #include <iostream> #include "Eigen/Dense" #include "tools.h" using Eigen::MatrixXd; using Eigen::VectorXd; using std::cout; using std::endl; using std::vector; /** * Constructor. */ FusionEKF::FusionEKF() { is_initialized_ = false; previous_timestamp_ = 0; // initializing matrices...
5a6a9080d159f2d1582ab7ede11da40270445ca2
52e64ebad2159f4b96047ca53a4d44a93bed18cf
pheragu/zircon
/system/core/devmgr/devmgr.cpp
C++
cpp
32,465
permissive
// Copyright 2016 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <ctype.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <threads.h> #include <unist...
ecfa8d8ba7067f624f54bc137d7f266184363eb2
af6a4837a69eb697ba3b270874c78ae5b04511c9
cwj1462/201602085
/Project1/소스.cpp
C++
cpp
245
no_license
#include <iostream> class LetDebug { public: void printNum() { uint16_t s1 = 32767; uint16_t s2 = 1; uint16_t s3 = s1 + s2; std::cout << s3 << std::endl; } }; int main() { LetDebug* ld = new LetDebug; ld->printNum(); return 0; }
d6734664caf6cd2f5ea12501aa83e2b0a5c43aa9
566f6d24a2312fd7a6758f4ce9237a7109d2b09a
PeterJensen/bench2d
/c/ballpit.cpp
C++
cpp
3,557
no_license
#include <cstdio> #include <time.h> #include <math.h> #include <stdlib.h> #include "Box2D/Box2D.h" #include "Bench2d.h" using namespace std; //const int e_count = 40; const int e_count = 40; // Simple nearest-rank %ile (on sorted array). We should have enough samples to make this reasonable. float percentile(clock_...
e5b05d88729ef6c9a50fa6fa02ce74325886241b
cdadf83aca050804f4b2bcfe30b3db07fb7c5cfa
Kelia373/LearnCPP
/2020.12.18/Project1/Project1/02.cpp
C++
cpp
497
no_license
#include<iostream> using namespace std; int main() { int arr[] = { 1,2,3,4,5,6,7,8,9,10 }; int mid = 0; for (int a = 0; a < sizeof(arr) / sizeof(arr[1]); a++) { cout << arr[a] ; } cout << endl; for (int j = (sizeof(arr) / sizeof(arr[1])) -1; j > 0; j--) { for (int i = 0; i < j; i++) { mid = arr[i]; ...
284048859e4b9bdbaf45e19d6318b471f56cff9a
37f3aaa8b9243c5430d95d24e55299cf75017e1f
Denis-Semakin/sailfish-secrets
/lib/Crypto/plugininfo.cpp
C++
cpp
3,835
permissive
/* * Copyright (C) 2018 Jolla Ltd. * Contact: Chris Adams <chris.adams@jollamobile.com> * All rights reserved. * BSD 3-Clause License, see LICENSE. */ #include "Crypto/plugininfo.h" #include "Crypto/plugininfo_p.h" using namespace Sailfish::Crypto; //-------------------------------------------- PluginInfoPriva...
4024b052e59b7601f063c2b23f74b441e07d8bbd
402d519cafebf4b5fcee78fd2edd01d43ae166a7
gentlebots/gb_manipulation
/include/gb_manipulation/behavior_tree_nodes/Pick.hpp
C++
hpp
2,419
no_license
// Copyright 2021 Intelligent Robotics Lab // // 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 ...
50487ab81fbcfc86ae707f48e7c093be0be06713
d86fc23622491a3f5ae804d501da11f0769c71b5
yue/node
/deps/v8/src/runtime/runtime-internal.cc
C++
cc
25,826
permissive
// Copyright 2014 the V8 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. #include <memory> #include "src/api/api.h" #include "src/ast/ast-traversal-visitor.h" #include "src/ast/prettyprinter.h" #include "src/baseline/baselin...
b535ba596b0557ec0062619f3a073e55c28a6581
9d713d33f0cf5eb3c907e159e5a5a058657e2bbf
weld-project/clamor
/experiments/cpp/simple_sum/simple_sum.cc
C++
cc
5,028
permissive
/* Main program for running workers + driver */ #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG #include <spdlog/spdlog.h> #include <stdint.h> #include <sys/time.h> #include <future> #include <iostream> #include <vector> #include <string> #include <utility> #include "clamor/debug.h" #include "clamor/cluster.h" #inc...
6973e9f87e49941e6ffb9b3d66d9ddf38964210d
b83eac9761c78854fcf327cd5537b118a78c2f9f
helaan/mCRL2
/tools/release/pbes2bes/pbes2bes.cpp
C++
cpp
9,007
permissive
// Author(s): Jan Friso Groote // Copyright: see the accompanying file COPYING or copy at // https://github.com/mCRL2org/mCRL2/blob/master/COPYING // // 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) // /// \file p...
cf9f2f451a2f9910a7d7aa9b449bf06c65a3e82b
6149de653c15d886fdf009cb1271e654cfa5976b
TheCharlatan/monero
/tests/net_load_tests/clt.cpp
C++
cpp
28,633
permissive
// Copyright (c) 2014-2022, The Monero Project // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list o...
d7ce1aa33abe40f69b1032a6395d14653d9648d0
5f1ffb83fe6a190e6e8445cf911425b934e17c48
zaourzag/chromium
/chrome/browser/extensions/api/braille_display_private/brlapi_connection.cc
C++
cc
7,212
permissive
// Copyright 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/extensions/api/braille_display_private/brlapi_connection.h" #include <errno.h> #include <string> #include "base/files/file_des...
bd1168bf0281065a15b056d18b763bf34edadc7d
d6e7b8aa955dff680e27e16526f943585ce3ffa9
fiahil/R-Type
/Server/Libraries/Entities/sources/main.cpp
C++
cpp
3,684
permissive
#include <iostream> #include "IEntity.h" #include "IDrawable.h" #include "IArmable.h" #include "ICollidable.h" #include "IMoveable.h" #include "IDestroyable.h" #include "IScriptable.h" #include "IPlayable.h" #include "AEntityMonster.h" #include "EntityDecor.h" #include "EntityPlayer.h" #include "EntityWeapon.h" #incl...
e418f6fef2c41203084db1d8376dff0bdf8c1c36
7c371f7b711db64ef26a1fc51fd681412e6fd300
code4bones/rjson
/rjson/JsonLexer.cpp
C++
cpp
44,966
permissive
#line 2 "JsonLexer.cpp" #line 4 "JsonLexer.cpp" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* The c...
5ac93bbd235ec0bff628848246b5eac15ad44709
af35d14c3f4e192ef9d840d7d0480d4e5bebbd62
river34/game-bt
/bt/Behavior.hpp
C++
hpp
3,230
permissive
// // Behavior.hpp // GameBT // // Created by River Liu on 15/1/2018. // Copyright © 2018 River Liu. All rights reserved. // #ifndef Behavior_hpp #define Behavior_hpp #include "Status.hpp" #include <map> #include <string> #include <iostream> class Blackboard; namespace BT { class Behavior { protected...
8d8a5ea4fa1249fe7591a54e66b3cc9077e294c0
0c00ba2522414ac70fc0cce7dd73cf08e39ccf7e
harryge00/algorithm
/basicSet.cc
C++
cc
1,082
no_license
#include <iostream> #include <set> #include <unordered_set> void unorderSetTest() { std::unordered_set<std::string> myset = {"USA","Canada","France","UK","Japan","Germany","Italy"}; myset.erase ( myset.begin() ); // erasing by iterator // myset.erase ( "France" ); /...
709ff3b7180560d8505d4528ea84abb1dda3ed05
fc59731c31a33a39d502372d40cf9f86f3747915
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/MP+dmb.sy+ctrl-addr-rfi-[fr-rf]-ctrlisb.c.cbmc.cpp
C++
cpp
76,815
no_license
// Global variabls: // 0:vars:4 // 7:atom_1_X9_0:1 // 4:atom_1_X0_1:1 // 5:atom_1_X7_1:1 // 6:atom_1_X8_2:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 8 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __C...
f980f03e70a2388837d56f30ca0249de1d1917d0
fa9bbeafcd09bd074695141e1a74725f055b30a5
springswen/opentoonz
/toonz/sources/toonzqt/fxsettings.cpp
C++
cpp
58,412
permissive
#include "toonzqt/fxsettings.h" #include "toonzqt/gutil.h" #include "toonzqt/keyframenavigator.h" #include "toonzqt/dvdialog.h" #include "toonzqt/fxhistogramrender.h" #include "toonzqt/histogram.h" #include "tmacrofx.h" #include "tstream.h" #include "tparamcontainer.h" #include "tspectrumparam.h" #include "tfxattrib...
9d0d4d7e34fe4140afa39cd59555033b1e985cd9
7be0e75303b5249b429cb92283b7dda48d5d1e95
accb529/Kassiopeia
/KEMField/Source/Bindings/Fields/Magnetic/include/KMagnetostaticFieldmapBuilder.hh
C++
hh
6,659
no_license
/* * KMagnetostaticFieldmapBuilder.hh * * Created on: 27 May 2016 * Author: wolfgang */ #ifndef KMAGNETOSTATICFIELDMAPBUILDER_HH_ #define KMAGNETOSTATICFIELDMAPBUILDER_HH_ #include "KEMBindingsMessage.hh" #include "KComplexElement.hh" #include "KEMStreamableThreeVector.hh" #include "KToolbox.h" #ifdef KEM...
a08b7e4b7a654274fa606b20a7865b60ad1a380f
cfa1666a62853b0e7b385454800308a1f4138490
wintel2014/LinuxProgram
/C++/Basics/string_view.cpp
C++
cpp
1,433
no_license
#include <algorithm> #include <vector> #include <string_view> #include <string> #include <iostream> std::vector<std::string> split(const std::string& str, const std::string& delims = " ") { std::vector<std::string> output; auto first = std::cbegin(str); while (first != std::cend(str)) { const a...
eee63e7444f881da15d646d0097ed8d49d26177f
a61bde61ef34a687a79f259516c5e01d8124cd02
zhang197652/ROS_QT_GUI
/qml_ogre/main.cpp
C++
cpp
1,339
permissive
/*! * \copyright (c) Nokia Corporation and/or its subsidiary(-ies) (qt-info@nokia.com) and/or contributors * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * \license{This source file is part of QmlOgre abd subject to the BSD license tha...
13b19edf1fee63f7a9cabe7f4f2c118d7faf55d3
6cd6ccf9a19078a664c8161e7c2e130e19af93fd
anh0001/EROS
/src/nimbro/motion/gait/test/test_gait_util_pose.cpp
C++
cpp
6,675
permissive
// Unit testing of the gait utility pose representations // File: test_gait_util_pose.cpp // Author: Philipp Allgeuer <pallgeuer@ais.uni-bonn.de> // Includes #include <string> #include <iostream> #include <gtest/gtest.h> #include <gait/util/gait_joint_pose.h> #include <gait/util/gait_inverse_pose.h> #include <gait/uti...
868535208305968075376c07302a5a2e9ec06388
34f5de39ff7bd958857288b26be3699a49f353fa
adityax10/ProgrammingCodes
/Algos Practice/DP/longest-substring-without-repeating-characters.cpp
C++
cpp
970
no_license
#include<bits/stdc++.h> using namespace std; int cal_len(string s) { int prev_index[256]; for(int i=0;i<256;i++) prev_index[i]=-1; int len = 0; int start; start = 0; //O(n) for(int i=0;i<s.size();i++) { if(prev_index[s[i]]==-1) { prev_index[s[i]]=i; len = max(len , i - start + 1 ); cout<<"Inc len...
ac916a07fe2d5d6b18e717d2387b5da7b202ceb9
7da60400116e180c0026fe68630095146f32c259
MuhanjalaRE/Midair-1.0.4.9504-SDK
/SDK/UE4_BackpackInfo_Engineer_functions.cpp
C++
cpp
360
no_license
// Unreal Engine 4 (4) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "UE4_BackpackInfo_Engineer_parameters.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- } #i...
21ba3c0d46d8ca236add9c540ecb65a09294c1a7
3f55b5405f9e4473d5a550529596a056952cc7fc
Starlink/vtk
/Interaction/Widgets/vtkRectilinearWipeRepresentation.cxx
C++
cxx
16,096
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkRectilinearWipeRepresentation.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
310ce396b0452f5f56f48667376111ca6c561f3b
a64a46597b73eb032fd63fa33bf88b2828e14691
hujinheng/directX
/other/vfxmemory.cpp
C++
cpp
16,394
no_license
// vfxmemory.cpp // 内存分配代码依赖一个全局变量。此全局变量析构的时候,CRT可能已经被(部分)销毁 // 导致在析构函数中不能使用CRT的相关函数。而在最后又需要报告内存信息,需 // 要使用到C运行库的_vsnprintf函数。 // 妥协的做法是在析构函数里不做任何事,而在DLL_PROCESS_DETACH时报告内存信息。 // 事实上的内存分配和错误报告输出相互依赖也导致问题,故错误输出也需要单独写 //----------------------------------------------------------------------------- #include "stdafx.h" #i...
4bf1c92bd91ff2e94a5036732aaa1818bad36e29
765c030b1d24dcfaf3f7bfe39290a9392f7c9af5
m-haris-n/Algorithms-CPP
/Maths/all_divisors.cpp
C++
cpp
1,582
no_license
/* Author : prashant_th18 :) */ // Algorithm for finding out all divisors of a number #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define ull unsigned long long #define ll long long #define ld long double #define pi pair<int, int> #define pl pair<ll, ll> #define ...
4111dc59091d2c6c690e58e0e234891fc221cc7a
ecae9cf1bd7fca3e11921717ba8f036eebd1a8c9
Seneral/SerialHMD
/SerialHMD/source/SerialHMDDriver.cpp
C++
cpp
14,321
permissive
#include <SerialHMDDriver.h> #include <DriverLog.h> SerialHMDDriver::SerialHMDDriver() { DriverLog("Driver: Init \n"); m_unObjectId = vr::k_unTrackedDeviceIndexInvalid; m_ulPropertyContainer = vr::k_ulInvalidPropertyContainer; // RETRIEVE GENERAL SETTINGS char buf[1024]; vr::VRSettings()->GetStrin...
194b68500f4566f6e98a99b7ef7fcc274a452fcd
bfc5d831cf792a432845f111d504052cfda2f219
ShinSeungChul/BOJ
/2504/2504/소스.cpp
C++
cpp
1,017
no_license
#include<iostream> #include<vector> #include<string.h> #include<cstdio> #include<algorithm> #include<math.h> #pragma warning(disable:4996) using namespace std; int main() { char str[31]; int len = 1; vector<char> s; int temp, sum = 0; cin >> str; s.push_back(str[0]); if (str[0] == '(') temp = 2; else if (s...
4f0893857e9ca2e064dc3e3c5933c6f24a933713
08b3abfb669daec6cfe740418080ed546aea01fe
EmilieNumworks/epsilon
/apps/inference/statistic/chi_square_and_slope/categorical_table_cell.cpp
C++
cpp
11,110
no_license
#include "categorical_table_cell.h" #include "inference/app.h" #include <inference/models/statistic/slope_t_interval.h> #include <inference/models/statistic/slope_t_test.h> using namespace Escher; namespace Inference { /* CategoricalTableCell */ CategoricalTableCell::CategoricalTableCell(Escher::Responder * parentR...
c6cace6e068e5e39cb05a010df6cd75959c081fd
f6c6c2eaa0c3082f75d5fd8fcb018cfc0fe9c055
casterbn/Qt_project
/002-Qt_widget_Concerning/000-Qt-widget-project/Qproperty_label_widget/widget.cpp
C++
cpp
1,679
no_license
#include "widget.h" #include "ui_widget.h" #include <QPropertyAnimation> #include <QLabel> #include <QString> Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); resize(400, 400); GeometryAnimation(); PosAnimation(); OpacityAnimation(); } void Widget:...
5a5891dfe9ca016e7e55a32ef859b13c6922d3f8
4b57c4878501179bd7ce690951973ca721eeb603
coderinblack08/competitive-programming
/usaco/gold/2015-16/Open 2016/split.cpp
C++
cpp
1,804
no_license
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define ll long long using namespace std; void setIO(string s = "") { ios_base::sync_with_stdio(0); cin.tie(0); if ((int)s.size()) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } } const int MX = 5...
e7d9820cfae03e17990021f95c4ca214161e01eb
0d7636a1ee52e2f0585cc8ca0cfc4bbd8de3b4fc
BlueBug12/LeetCode-Solution
/#0009_PalindromeNumber/isPalindrome.cpp
C++
cpp
362
no_license
class Solution { public: bool isPalindrome(int x) { if(x<0) return false; else{ string s = to_string(x); size_t j = s.size()-1; for(size_t i =0;i<s.size()/2;++i){ if(s.at(i)!=s.at(j-i)) return false; } ...
f06f6e858e7a7ccb0f268ef54755448c24604a76
8d5353b32512eaa265f318a1a997430b383975b5
will514/maya-usd
/lib/usd/translators/instancerWriter.cpp
C++
cpp
16,785
permissive
// // Copyright 2017 Pixar // // 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 wri...
fc5a2266f2b3561bc2abf37a041f61be71ddd10c
fc4e835b5c2ffff5217603b7c6ffa9098f7d2691
AEW2015/Vitis-AI
/tools/Vitis-AI-Runtime/VART/vart/rnn-runner/test/test_rnn_runner_u25.cpp
C++
cpp
7,674
permissive
/* * Copyright 2021 Xilinx 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 a...
d44cf61cdd279290ac285fd7343bd13fb89829f6
554474ec0139a4afaefb74d1733b707d6322aba7
cms-sw/cmssw
/Fireworks/Vertices/plugins/FWSecVertexProxyBuilder.cc
C++
cc
3,683
permissive
// -*- C++ -*- // #include <vector> #include "TMatrixDEigen.h" #include "TMatrixDSym.h" #include "TDecompSVD.h" #include "TEveTrans.h" #include "TEveTrack.h" #include "TGeoSphere.h" #include "TGeoMatrix.h" #include "TEveGeoNode.h" #include "TEveGeoShape.h" #include "TEveVSDStructs.h" // include files #include "Firewo...
8f84580c5d8bea6861f8797c6ca37d5dfa0663ed
9d35dad81e8c8f2061ab99f1493d44d5b59a379c
lifuguan/AprilTag_Localization
/src/bluefox2/src/bluefox2_ros.cpp
C++
cpp
879
no_license
#include "bluefox2/bluefox2_ros.h" namespace bluefox2 { Bluefox2Ros::Bluefox2Ros(const ros::NodeHandle& nh, const std::string& prefix) : CameraRosBase(nh, prefix), bluefox2_(identifier()) { // bluefox2_.OpenDevice(); SetHardwareId(bluefox2_.serial()); // Some hack for getting hardware sync to work ros::...
46bf78a26ccfa41603bb639ae64921088e1e8775
5cdad6df2d5b3ae34aea2ed2f29bb2c4549cab81
MinimSecure/unum-sdk
/src/gdb/gdb-7.11/gdb/testsuite/gdb.arch/amd64-entry-value.cc
C++
cc
4,478
permissive
/* This testcase is part of GDB, the GNU debugger. Copyright 2011-2016 Free Software Foundation, Inc. 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 3 of the License, or ...
50231dd33937cebd78c69e24e65cc19ac08b0152
86214dd9de3a7ab3f47e72b9b6b080a79fba77c2
Stayaccept/LeetCode
/961. 重复 N 次的元素.cpp
C++
cpp
213
no_license
class Solution { public: int repeatedNTimes(vector<int>& A) { int i,u; u=A[0]; for(i=2;i<A.size();i++) if(A[i]==A[i-1]||A[i]==A[i-2]) u=A[i]; return u; } };
f51ada70df3a2be625b3a22cbe1aa8aef130d413
cc06be61fee7168336150786bd44e710291d68f0
strigazi/athena
/Event/xAOD/xAODTrigMuonAthenaPool/src/xAODL2StandAloneMuonContainerCnv_v1.cxx
C++
cxx
2,108
permissive
/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: xAODL2StandAloneMuonContainerCnv_v1.cxx 707606 2015-11-12 19:59:49Z krasznaa $ // System include(s): #include <stdexcept> // Gaudi/Athena include(s): #include "GaudiKernel/MsgStream.h" // Local include(s): #include "xAODL2StandA...
1f76cb84867cdbe2d10a1c7fccf0c1c2c7c71e67
0e89ad6575e6d088519bcdaa9d1e32f2bbff9138
Raiyan-sharif/Online-Judge-
/Feven.cpp
C++
cpp
849
no_license
#include<cstdio> #include<cstdlib> int main() { unsigned long long t, a, s, c=0; scanf("%lld", &t); while(t--) { c++; scanf("%lld", &a); if(a < 10) { if(a%2 == 0) printf("Test %lld: feven\n", c); ...
02ba66e965e05bab46b92408563fb62af62432b5
3fa0c1390ec1ef3d254f3cfa2f209ba16b92959c
grpc/grpc
/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.cc
C++
cc
66,807
permissive
// Copyright 2023 gRPC 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 agreed to i...
86f92eefb33a16ce0bcc0cf9be27965c7528878d
dac5f604326c8b757a226d89a0bfa0d1e1f8979c
sukh-virdi-ada/AdaShip
/main.cpp
C++
cpp
2,057
no_license
//Play a game of AdaShip against the computer! //importing libraries #include <iostream> #include <algorithm> #include <time.h> #include <fstream> #include <string> #include <stdlib.h> //importing files #include "headers/Colours.h" using namespace std; int displayGreeting(); bool onePlayerVComputer(); bool endGame ...
a531566ced8b494dd8b36974ed512e76b958a822
365e828532735f8e8a4d4b3224da4c4395154456
ProfHindsight/ProjectTempSensorCpp
/RF24/HardwareSPI.cpp
C++
cpp
2,020
no_license
/* * HardwareSPI.cpp * * Created on: Apr 21, 2018 * Author: Colton */ #include "HardwareSPI.h" #include "em_gpio.h" #include "em_usart.h" #include "em_cmu.h" HardwareSPI::HardwareSPI() { CMU_ClockEnable(cmuClock_GPIO, true); // This stuff should be defined elsewhere. Otherwise we can't use two differen...
88e11b728ad4870486e3c136b409426a76de1221
5b0944f43f532efa5d0234ad2ca8a776d42ac5af
quasics/quasics-frc-sw-2015
/Experimental/CanBusExample/src/main/cpp/subsystems/NikeDriveBase.cpp
C++
cpp
1,435
permissive
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
689a04122e1c8689bae2d346feab6ffcd7e96893
b1afc781621a048a063f3d2f2e35a6cc2678c830
fsy-juruo/OI-templates
/graph/diff-constraint.cpp
C++
cpp
1,935
no_license
#include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define LD long double #define _rep(i, x, y) for(int i = x; i <= y; i++) #define _per(i, x, y) for(int i = x; i >= y; i--) using namespace std; template <typename T> inline void read(T &x) { x = 0; T f = (T) 1; char c = getchar(); ...
ae8a8db7ff60e410d1bb38cbc36347acbedf6ada
ba9832755c349e47ba5501e2bb35c02b57ee786a
AnBaolei1984/Paddle-Lite
/lite/tests/api/test_content_dnn_fp32_baidu_xpu.cc
C++
cc
4,503
permissive
// Copyright (c) 2019 PaddlePaddle 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...
efdb5eab871fd5b6c95aa5d9ea12516ac17106e7
bec1e674f07fd08ee0a4db87688a93c2212fbaff
veya2ztn/LJ-cluster
/C/ABC.cpp
C++
cpp
4,306
no_license
#include <stdio.h> #include <malloc.h> #include <string.h> #include <stdlib.h> #include "lib\oplocal.h" #define gemery (double(*)[3])malloc(sizeof(double)*3*NUM) #define SN 20 #define NUM 20 #define glimit 3 #define gmax 100 #define gem sizeof(double)*3*NUM #define mem sizeof(double)*3*3 #define vem...
0ff6d5d6788c38614affdd5fd55332a331429881
4e66abbc1f8463245002f3b099384e8af2e90407
gonzalomvp/audio-engine
/practica1/src/audio_source.cpp
C++
cpp
394
no_license
#include "audio_source.h" #include <al.h> #include "audio_buffer.h" AudioSource::AudioSource(AudioBuffer* buffer) { alGenSources(1, &m_alSource); setPitch(1.0f); setGain(1.0f); setLooping(false); setPosition(0.0f, 0.0f, 0.0f); setVelocity(0.0f, 0.0f, 0.0f); alSourcei(m_alSource, AL_BUFFER, buffer->getAlBuffer...
76d7bf2da91bc750e7fa72bc7d9c59407ef8c75f
d1ed6b62833bf394d2955b38a6ac8f17e5be2e03
amoghj8/Cpp-Refresher
/Pointers/pointerAsFunctionReturns.cpp
C++
cpp
266
no_license
#include<iostream> using namespace std; int* add(int *, int*); int main(int argc, char const *argv[]) { int a =10, b=12; int *ptr = add(&a, &b); cout<< *ptr; return 0; } int* add(int *ptrA, int* ptrB) { int c = *ptrA + *ptrB; return &c; }
7e5033f2a1c2ac0cca55e01d978fd04931e50ecd
be49242e42c9639f19efa50d4082ad1dd1177aab
zowhair/chromium
/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
C++
cc
12,805
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 <limits.h> #include <algorithm> #include <memory> #include "chrome/browser/ui/views/omnibox/omnibox_text_view.h" #include "base/macros.h" #inc...
0d028a382388613f8cf46729aa661f9ab3cad623
db8cfa8bfd6287e37bcff014862d0aa2851c330e
MatheusMartini/Ulbra-
/2018-2/ap1/media de x alunos.cpp
C++
cpp
445
no_license
#include<stdio.h> #include<conio.h> main() {float nn,n,m=0,k=0; float media; char nome; do{ printf ("\nDigite sua nota da g1:"); scanf ("%f",&nn); printf ("\nDigite sua nota da g2:"); scanf ("%f",&n); m = nn; k = n; media=(m+(k*2))/(3); printf ("\nmedia do aluno: %.2f",media); printf("\ndeseja con...
e39f97c3d37326533c4e877b770e84f56054b2b2
2d3e3163aa28c2ef3a14b64dee737e912620d831
cansou/MyCustomMars
/marsksim/boost/range/detail/end.hpp
C++
hpp
2,628
no_license
// Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. 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_0.txt) // // For more information, see http://www.boost.org/li...
6dd806d4a1c1ef8bddf348f33683129c238402dd
fb6ef00a1b77697360925d552e7c0677e879c40d
ZeroInfinite/turicreate
/src/unity/toolkits/coreml_export/MLModel/src/transforms/LogisticModel.cpp
C++
cpp
2,356
permissive
/* Copyright © 2017 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #include "LogisticModel.hpp" #include "../Format.hpp" namespace CoreML { LogisticModel::Logistic...
28a70b00b046ada2f631e001e790af13281bc343
5c1f033bc9d3bd1471271aecee2c3bd87beeaa27
YaMihailYa/ProjectX
/Project/Project/Level.cpp
C++
cpp
3,053
no_license
#include "Level.h" #include "Menu.h" #include "Inventory.h" #include "Room_Dog.h" #include "Room_Grandma.h" #include "Room_Tree.h" Level::Level(unsigned int id, Static_Object *_backGround, std::vector<Room*> _rooms, std::vector<Door*> _doors) :m_id(id), m_backGround(_backGround), m_rooms(_rooms), m_doors(_doors), m...
4821a6e8544ae1da7af5f58bcab3af50acea8bd8
79e13e16bb1a3cc675de65cf0f418989aedc5043
qiansunn/chromiumembedded
/libcef/utility/content_utility_client.cc
C++
cc
2,243
permissive
// Copyright (c) 2014 the Chromium Embedded Framework authors. // Portions 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 "libcef/utility/content_utility_client.h" #include "chrome/common/ch...
65c481ad2a5e690f9491b761814afc12d248bc53
9cb95bdec5fa5df6ac9f24d43929d9b161bacd36
MegaGabi/Programming-lab-3
/Source.cpp
C++
cpp
11,078
no_license
#include <iostream> #include <ctime> #include <conio.h> #include <ctype.h> #include <fstream> using namespace std; const int max_chars_in_names = 12; //кол-во символов в имени, или отчестве, или фамилии const int student_description_size = 6; //кол-во свойств описывающих студента int m_fn_size, f_fn_size, ...
3e302611a9973da88df863afc41dfea1551d701a
1217b792f506e22dd3177b9fe8ede5af8ff55400
kensukekita/centoyacoin
/src/rpcwallet.cpp
C++
cpp
55,139
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-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 <boost/assign/list_of.hpp> #include "wallet.h" #include "walletdb.h" #include...
80a8a1013ae79e11b65126435685adaa2a856f28
103d19d9b07d62d512a401797c4d28a8c5284a62
s-rifat/Competitve-Programming
/TOPH/Replay of Intra RUET Junior Contest (Round 2)/D.cpp
C++
cpp
590
no_license
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; #define FAST ios_base::sync_with_stdio(false);ci...
fb210ba85fb35036f827872378cc6528f2a49f65
d801012bb178515590f09a7c4ddddef52a85ff8e
mrkline/ece453
/tests/BinaryMessageTests.cpp
C++
cpp
2,145
permissive
#include "BinaryMessageTests.hpp" #include <cassert> #include <cstdint> #include <vector> #include "BinaryMessage.hpp" #include "Test.hpp" using namespace std; using namespace BinaryMessage; namespace { void intConversions() { vector<uint8_t> buf; appendInt(buf, (uint16_t)42); assert(buf.size() == 2); assert(...
7e6bc7155a908bf4a22369c523f1d17f2a8ab2a1
316cb2a563d0abebdf6bf1af80febd670b6be9de
amd0027/sc_embedded
/main/main.cpp
C++
cpp
201
no_license
/* Smart Chair Embedded Controller * Startup Code * * Team Smart Chair - UAH CPE496 2019 */ #include "SCController.h" extern "C" void app_main() { SCController smartChair; smartChair.Start(); }
e8aea3b92973c235017357da05c6f91da5ad9996
55a453559557abf4dc4b2d5aeb0cd12d37ac77c6
GermanAizek/chromium
/ash/wm/overview/overview_session.cc
C++
cc
39,624
permissive
// Copyright 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 "ash/wm/overview/overview_session.h" #include <algorithm> #include <functional> #include <utility> #include "ash/accessibility/accessibility_co...
e93cb302bdb0f8ee056dcf3a8e714a9064f6a4b9
f766fe582da6c904f59f951a8df53c39ff66ccb3
VisIVOLab/ViaLacteaVisualAnalytics
/Code/src/simcube/simcube_projection-collapse/api-collapse.cpp
C++
cpp
2,753
permissive
#include "../simcube_projection.hpp" #include "fits_simcube.hpp" #include "projection.hpp" #include "utils.hpp" #include <fitsio.h> #include <cassert> #include <cmath> #include <iostream> #include <limits> #include <stdexcept> #include <string> using namespace std; // to avoid undef data-points scale up by sqrt(3) ...
a8fc979ae5ec97dfa5adf001cccc6376d9619781
3c162f874ef051f53265bd7e6547d9afc3c47fcc
ananda741/Leetcode
/string_palind.cpp
C++
cpp
668
no_license
#include<iostream> #include<string> #include<ctype.h> using namespace std; bool isPalindrome(string s) { int i,j,len; for(i = 0;i<s.length();){ if(s[i]>=65 && s[i]<=90){ s[i] = tolower(s[i]); i++; } else if((s[i]>=48 && s[i]<=57) || (s[i...
db5fae0e0ace25fd6a1f0ba77eb490c751f7f74f
a9f24300815ef23d0db9f35d2c3f47649d0af8e5
vaibhav1865/HacktoberCodes
/Trie.cpp
C++
cpp
1,347
no_license
#include <bits/stdc++.h> using namespace std; typedef struct node { struct node* children[26]; bool isEndOfWord=false; node() { for(int i=0; i<26; i++) children[i] = NULL; } }node; void insert(node* root, string newStr) { node* curr = root; ...
59f39444d44336c72e595df6dd3510000a3d600a
9efd74f8064db9526b5d09dce57010ec01f90807
wmhwang-sponsored/asylo
/asylo/identity/sgx/proto_format_test.cc
C++
cc
3,754
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...
e3471cc9a568b695214a2357917c8196efece8b7
900f5828479cc7da49c82b058c4ea9e8d6b0aa56
ryppl/boost-history
/trunk/boost/asio/detail/fd_set_adapter.hpp
C++
hpp
1,127
permissive
// // fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2007 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 BOOST_ASIO_DETAIL_FD_SE...
3ee4fcab0a8c9d4041a2879e5057d7407c3d1f1d
72bf85282fee493c8abf119e2571edec24af5859
glaucoacassio2020/Competitive-Programming-Algorithm
/Online Judge/CodCad/Five Club/87664.cpp
C++
cpp
377
no_license
#include <bits/stdc++.h> using namespace std; int main() { long int vetor[7], n; cin >> n; for(int i=0; i<7; i++){ cin >> vetor[i]; } n -= vetor[0]; n -= vetor[1]; n -= vetor[2]; n += vetor[3]; n += vetor[4]; n += vetor[5]; n -= vetor[6]; if(n == 0) cout << "N" << end...
4ce228d40ccf10d0f6110e3a31c57637f42ac48f
88749216ac635753fd8588c23b308dc165476f05
iwakiriK/atcoder
/Dwango01Prelims/b.cpp
C++
cpp
622
no_license
#include<bits/stdc++.h> #define REP(i,a,b) for(int i=(a);i<(b);i++) #define rep(i,n) REP(i,0,(n)) typedef long long ll; using namespace std; int n, k, idx; ll a[1001], sum[500500], ans; int main() { cin >> n >> k; rep(i, n) cin >> a[i+1]; // 1 origin REP(i, 1, n) a[i+1] += a[i]; // cumulative sum REP(...
3ebc9149db801ddcac02dc233367c83c125e1d5e
58dbf1d3a2af25fe6f302e0e3c41ee856c20ba91
dldbstn1047/Algorithm
/BOJ 17142 (시간초과).cpp
C++
cpp
1,711
no_license
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <cstring> using namespace std; #define INF (int)2e9 int dy[4] = { 0, 1, 0, -1 }; int dx[4] = { 1, 0, -1, 0 }; int a[51][51]; int check[51][51]; int n, m; int MIN = INF; int virus_check[10]; vector<pair<int, int>> virus; void bfs() ...
ddaaa3e0bb25b67bd07ce30f3ab2bb8a20249094
951e8e0367961a46c510986779a7336fdc3f2f80
cj85/ThinkingCpp
/MULTIARG.cpp
C++
cpp
212
no_license
//multiple constructor arguments with aggregate initialization class MULTIARG{ int i,j; public: MULTIARG(int I, int J){ i=I; j=J; } static void test(){ MULTIARG x[]={MULTIARG(1,2),MULTIARG(3,4)}; } };
9bd5445e70efe4cd26ddd35950b1257b12ec580b
c4b302e3e49159688024bb911b63a0e5d231b45e
Sonzy/SoupEngine
/SoupEngine/Source/DirectXStuff/Bindable/VertexShader.cpp
C++
cpp
587
no_license
#include "VertexShader.h" #include "Error Handling/GraphicsErrorMacros.h" #include <d3dcompiler.h> Bind::VertexShader::VertexShader(Graphics & gfx, const std::wstring & path) { INFOMAN(gfx); GFX_THROW_INFO(D3DReadFileToBlob(path.c_str(), &blob)); GFX_THROW_INFO(GetDevice(gfx)->CreateVertexShader(blob->GetBufferPo...
2dd4fccd7a0f3155177d6e97e37b0abcb7b29ec9
3f34a3be53292d3ddcb06b14bfe46b8d211d7118
007Robin/Practice
/session14/Growarray.cc
C++
cc
1,963
no_license
#include <iostream> using namespace std; template<typename T> class GrowArray { private: int capacity; int used; T* data; void checkGrow() { if (used < capacity) return; T* temp = data; data = new T[capacity*2+2]; for (int i = 0; i < capacity; i++) data[i] = temp[i]; delete [] temp; capacity = 2*...
5db6e21759f3351c9ded6a46cf0d91eb5c7b3f3a
aab81052c8d736ce5ec7148804252615b2ce29db
AndrewHauck/RDT
/Programming/Old Igniter Code/ArduinoIgniter/IgniterAtmelProject/ArduinoIgniterProject/ArduinoIgniter/src/serialBuffer/serialBuffer.cpp
C++
cpp
1,682
no_license
#include "Arduino.h" #include "serialBuffer.h" serialBuffer::serialBuffer() { m_serialRaw = ""; m_stringComplete = false; m_serialRaw.reserve(200); // reserve 200 bytes for the serialRaw string } bool serialBuffer::updateBuffer() { char inChar = (char)Serial.read(); // get the new byte m_serialRaw += in...
25035dc5997e44799c10601adb2c41bb6f98c700
97c91193a74cd4c989bf35285b540d5a324d7e81
ailyanlu/ACM-13
/Timus/T1280.cpp
C++
cpp
720
no_license
#include <iostream> #include <map> #include <set> #include <string> #include <vector> #include <cmath> using namespace std; vector <vector <int> > V; vector <int> E; int n, m, time; int main (void) { #ifndef ONLINE_JUDGE freopen ("T1280.in", "r", stdin); freopen ("T1280.out", "w", stdout); #endif ...
bebd7f70f0d854dbe77ba7b1b002edb7db61a006
aed4b35cd7b9b1e680cd2759fd163eac1add58c2
softerboy/sfml-air-battle-game
/src/State.cpp
C++
cpp
848
no_license
#include "State.h" #include "StateStack.h" State::Context::Context(sf::RenderWindow& window, TextureHolder& textures, FontHolder& fonts, Player& player, MusicPlayer& music, SoundPlayer& sounds) ...
009a50e743a2cdd345fdb50119b45ca9c8357982
c058085224436696db8bbe651e710978868830e1
kester-lin/acm_backup
/src/ZOJ/ZOJ1388 POJ1433 Exchanges.cpp
C++
cpp
1,076
no_license
#ifdef _MSC_VER #define DEBUG #define _CRT_SECURE_NO_DEPRECATE #endif #include <fstream> #include <stdio.h> #include <iostream> #include <string.h> #include <string> #include <limits.h> #include <algorithm> #include <math.h> #include <numeric> #include <functional> #include <ctype.h> #define MAX 100010 using namespace...
2ed86bc975b65ada6338641bfff96576b1897f03
469c9d9d6ecabe4b72e063bbfc582247750d6cfd
gjc2/c-study
/enemy.cpp
C++
cpp
3,234
no_license
#include "enemy.h" #include "mainwindow.h" #include "tower.h" #include "utility.h" #include "waypoint.h" #include <QPainter> #include <QPoint> #include <QSize> #include <QString> #include <QVector2D> const QSize enemy::m_fixedsize(22,23); enemy::enemy(waypoint* startwaypoint,MainWindow* game,QString pa...
7a2e9e719f1c67eacd5fe105e720a4d91671406d
5e7bc1c52fef3b5fbfc1fc6e47f3b83a0e25fbb2
ulyananaylu/homework
/dz_5.cpp
C++
cpp
536
no_license
#include <iostream> using namespace std; struct String { char *str; int len; String(char *s) { int i; for(i = 0; s[i]; ++i); len = i; str = new char[i+1]; for(i = 0; s[i]; ++i) str[i] = s[i]; str[i] = '\0'; } char get_n(int n) { if(n > -1 && n < len) return str[n]; return '\0'; } void set...
a08ab0b44fc478ebc61ae739e48eef1974270715
6cfc37a736ff0fa67b44c894106d69714567ea11
f0ghua/qt_examples
/QTableXX/FilterTable/mainwindow.cpp
C++
cpp
1,427
permissive
#include "mainwindow.h" #include "sortfilterproxymodel.h" #include "filterheader.h" #include <QStandardItemModel> #include <QTableView> static const int rowCount = 250000; static const int columnCount = 4; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { QStandardItemModel *model = new QStandardItem...
5241fdfb9fdba67187f63e23733abd992cd8cc49
cdd096da0685b8c90383e9aa1714df8fee5de854
apock69/mangosbot-bots
/playerbot/strategy/generic/ConserveManaStrategy.cpp
C++
cpp
2,894
no_license
#include "botpch.h" #include "../../playerbot.h" #include "ConserveManaStrategy.h" #include "../../PlayerbotAIConfig.h" #include "../actions/GenericSpellActions.h" #include "../values/LastSpellCastValue.h" #include "../../ServerFacade.h" using namespace ai; float ConserveManaMultiplier::GetValue(Action* act...
ffe3b8a629adc8defe5afcff730979c1c89e3a84
1922846234ca544716cb50d631ac078ca47b790e
yourpalal/engine
/content_handler/application_controller_impl.cc
C++
cc
4,666
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/content_handler/application_controller_impl.h" #include <utility> #include <fdio/namespace.h> #include <zircon/status.h> #include "fl...
8047e5aec4a41a2315aab6bf54534f856567c8de
3d976fd6dbe7c4422d2ba575c0c98ac169f3d843
Jamaika1/MoxMxf_mxflib_dpx_IlmThread
/dpxlib/RunLengthEncoding.cpp
C++
cpp
5,291
permissive
// -*- mode: C++; tab-width: 4 -*- // vi: ts=4 /* * Copyright (c) 2009, Patrick A. Palmer. * 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 retai...
b318b7b03329a115a4eb52d757b4b767f1edad95
b159cdfa718b6a2420936d2b3b14936c2f2dacc9
basiliscos/cpp-rotor
/include/rotor/messages.hpp
C++
hpp
13,535
permissive
#pragma once // // Copyright (c) 2019-2022 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com) // // Distributed under the MIT Software License // #include "address.hpp" #include "message.h" #include "state.h" #include "request.hpp" #include "subscription_point.h" #include "forward.hpp" #include "extended_erro...
4f1ec6192f3a09adbc02df96dc9ee02c1c47c507
eaee4cfbe1d30abb9c8ec83d8f2c5e4a217fe55e
dipendughosh/programs
/MYDEVC/CPROGS/LOOPS/Agetoday.cpp
C++
cpp
1,704
no_license
#include <iostream.h> #include <stdlib.h> #include <conio.h> #include <time.h> int main() { int daysInMon[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; int dob,mob,yob; int curday,curmon,curyear; int ageday = 0,agemon = 0 ,ageyear = 0; int day,month,year,dinmon; int checkleap(int); cout<...
7cda8b17aece8d9b92248053e2e7df13588092ac
d16d4815920c0526d0987fff9dd236459df1f596
ArnCarveris/DiligentCore
/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
C++
cpp
8,869
permissive
/* Copyright 2015-2017 Egor Yusov * * 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 * * THE SOFTWARE IS PROVIDED "AS IS", ...
fa71a564c50a54d737a7c12410e09bf5cdb7c8cb
16624ed38255fc17028666e4bfb9ab26510e9c87
Bezifabr/Historical-Smackdown
/src/HealthBar.cpp
C++
cpp
472
no_license
#include "HealthBar.h" void HealthBar::LoadTextures(const sf::Texture& fullBar, const sf::Texture& emptyBar) { this->full.setTexture(fullBar); this->empty.setTexture(emptyBar); } void HealthBar::Update(int health) { full.setScale(health * 0.01f, 1); } void HealthBar::Draw(sf::RenderTarget & renderTarget) { rend...