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
076cb0d5d9b9ff36e856320843d6111f2e07f72e
b66aa13ca9f6c4ddcf49aa9df84d34acf3b6e0dd
agabrie/Bomberman
/engine/src/Engine.cpp
C++
cpp
1,413
no_license
#include "../include/Engine.hpp" void Engine::init(GameState &gameState) { gameState.pickups.initPickups(gameState.map); } void Engine::update(double deltaTime, std::vector<EngineEvent> &actions, GameState &gameState) { MoveState &moveState = gameState.player.moveState; for (EngineEvent event : actions) { swi...
d38d11ccbc4448c314e4aba05546baaa4517f9ff
d23be64e88ae95d27c4f70cbca5e2ebf3bcb709c
NachoCesa/UTN-C-
/segundaclase6.cpp
C++
cpp
969
no_license
//============================================================================ // Name : segundaclase6.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #inc...
3a2cab5b5481d70bbf4de5f150272026a8fd477a
43cf20b7337327ba05a14658daa779f55e57c14d
xogud3373/ros_auto_wheelchair
/wheelchair_door/src/action_go_door.cpp
C++
cpp
7,515
no_license
#include <ros/ros.h> #include <geometry_msgs/PoseStamped.h> #include <geometry_msgs/Pose2D.h> #include <nav_msgs/Odometry.h> #include <wheelchair_msg/door.h> #include <wheelchair_msg/door_mode.h> #include <wheelchair_msg/doormsg.h> #include <move_base_msgs/MoveBaseAction.h> #include <actionlib/client/simple_action_clie...
4f15860593bbb78b7d70366fe7808a7295115771
626e3b35375f0476de300570e2920f09648f3ab2
micat4208/Win32APIGameFramework
/Win32APIGameFramework/Game/Scenes/TitleScene/TitleScene.cpp
C++
cpp
219
no_license
#include "TitleScene.h" #include "Game/Components/TitlePressEnterKey/TitlePressEnterKey.h" void CTitleScene::Initialize() { CScene::Initialize(); NewObject<CGameObject>()->AddComponent<CTitlePressEnterKey>(); }
6d25a8086c5f28c78e06d16de074b70b8f29451c
dc822670b62575dd08ae1c8f777b8c43f6402170
cryptogarageinc/cg-cfd-core
/test/test_scriptoperator.cpp
C++
cpp
3,043
permissive
#include "gtest/gtest.h" #include "cfdcore/cfdcore_bytedata.h" #include "cfdcore/cfdcore_exception.h" #include "cfdcore/cfdcore_script.h" using cfd::core::ByteData; using cfd::core::CfdException; using cfd::core::Script; using cfd::core::ScriptBuilder; using cfd::core::ScriptElement; using cfd::core::ScriptOperator; ...
7d3db7d78340614f3c4bfe2ebca4da4185a4c3d3
27244498ae65eb5f90b9cfc2a7f272d2d2e02bf2
Abacn/AntLabyrinth
/MSDDumpReader/msddumpreaderB.cpp
C++
cpp
7,263
permissive
// // main.cpp // MDSDumpReaderB // // Created by Yi Hu on 8/24/18. // #include <iostream> #include <iomanip> #include <fstream> #include <sstream> #include <string> #include <cstring> #include <vector> #include <iterator> #include <cmath> using namespace std; // Extrapolating the MSD by a biased Ensemble average...
d5bb70bde72c46c1026e32c5ddd523b3e7980ab9
1f319d307e1959307f7fa8b9cdf14c937856c614
matheusota/Witness
/sim_generator_v2_test/Generator.cpp
C++
cpp
27,189
no_license
#include "Generator.h" using namespace std; //########################################################################################################################### //Combination of N choose K uint64_t nchoosek(int n, int k) { uint64_t val = 1; for (int x = 0; x < k; x++) val *= (n-x); for (i...
62e3e51ec35bb62c8169c5f9d3ec79db122b5b5b
61c55cafe60474cbb72e34eaebb0d7b0409b7f16
mihanloko/patterns
/documents/Tickets/TicketDecorator.cpp
C++
cpp
307
no_license
// // Created by mikhail on 11.11.2019. // #include "TicketDecorator.h" TicketDecorator::TicketDecorator(Ticket *wrapped) { this->wrapped = wrapped; } int TicketDecorator::getAllowedCargo() { return wrapped->getAllowedCargo(); } int TicketDecorator::getCost() { return wrapped->getCost(); }
3b5f21ae5233f575f22c96018f2e10e2d12647a8
c9a22388af05be0bcc1a74e8dfa2e1df1612b985
aylward/ITK
/Modules/Filtering/MathematicalMorphology/test/itkGrayscaleFunctionDilateImageFilterTest.cxx
C++
cxx
4,612
permissive
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
d9f614e645611e3be35266a609962d81cd9b18cf
e9eee6ce87b41c3c7520a1c841009db1860706e7
jimmywu1385/2048
/FP-40647036S/sourse/showmetric.hpp
C++
hpp
345
no_license
#pragma once #include<SFML/Graphics.hpp> class showmetric { public: showmetric(void); void draw(sf::RenderWindow &window,int z[]); private: sf::Texture qt0,qt1,qt2,qt3,qt4,qt5,qt6,qt7,qt8,qt9,qt10,b1; sf::Sprite qs0,qs1,qs2,qs3,qs4,qs5,qs6,qs7,qs8,qs9,qs10,qs11,qs12,qs13...
9b8f29ddd64eaa66cb30508429ae99a134eb02c8
e464207201ec2c74480734f718264f9c43b0ba10
ahmadelrouby/Sokoban-C-Game
/game testing/game testing/menu.cpp
C++
cpp
13,349
no_license
// // menu.cpp // game testing // // Created by Ahmad Refaat on 4/22/16. // Copyright © 2016 Ahmad Refaat. All rights reserved. // #include "menu.hpp" menu::menu(int x,int y){ if (!font.loadFromFile(resourcePath() + "sansation.ttf")) { return EXIT_FAILURE; } if(!backgroundTexture.loadFro...
17352c0389e62860c7956bd846e646d3709f6e5e
4ac7563d91c5d0766ad4dd04b3ea045f67dfce73
jkrajniak/science
/NaturalLanguageProcessing/viterbi_bp_enh.cc
C++
cc
7,116
no_license
// Copyright 2013 jkrajniak@gmail.com (Jakub Krajniak) // Draft implementation of Viterbi algorithm with backpointers // and the four categories for rare word. // // Usage: // viterbi_bp_enh word.count test_case // // Returns: // For each word in the test_case return the word and the tag. // #include <string> #inc...
ac0471e72d7e8707d91211e1e786f87e4bdec4ad
2f59c5c91fd5a3afc6ad218594b442a4a8460c84
markwal/hyperion
/src/hyperiond/hyperiond.cpp
C++
cpp
14,635
permissive
// C++ includes #include <cassert> #include <csignal> #include <vector> // QT includes #include <QCoreApplication> #include <QResource> #include <QLocale> // config includes #include "HyperionConfig.h" // Json-Schema includes #include <utils/jsonschema/JsonFactory.h> // Hyperion includes #include <hyperion/Hyperion...
b3af4823d561e68cac1186f5cfd97d2fb8271238
ac411a4102b27ae33dd7c6771fbe61fcf3a1c65d
jbkowalkowski/AnalysisWork
/docker_study/src/IntMaker_module.cc
C++
cc
1,247
no_license
//-------------------------------------------------------------------- // // Produces an IntProduct instance. // //-------------------------------------------------------------------- #include "art/Framework/Core/EDProducer.h" #include "art/Framework/Core/ModuleMacros.h" #include "art/Framework/Principal/Event.h" #inc...
36158a80ae12caadc2143186ed1ded2d46f6fe6a
fc57b7415770e13b34faa0a1b74db042ea008893
gscept/nebula
/tests/benchmarks/benchmarkfoundation/delegates.cc
C++
cc
2,474
permissive
//------------------------------------------------------------------------------ // delegates.cc // (C) 2019 Individual contributors, see AUTHORS file //------------------------------------------------------------------------------ #include "stdneb.h" #include "delegates.h" #include "util/delegate.h" #include <functi...
760d44140afe9e86fe50e6b75ccc936af3eade17
34c0dfc6b393f89cda1d864c283d8afaafa53a8c
avineshwar/private-membership
/private_membership/rlwe/batch/cpp/example/example.cc
C++
cc
10,918
permissive
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
a12e37a58fbf65a462b8195384d9106d38691ad5
b1cbfdc5c85e99d55d94ced19ca9eb8f05ecfac9
david-waterworth/catboost
/contrib/libs/re2/re2/testing/parse_test.cc
C++
cc
18,362
permissive
// Copyright 2006 The RE2 Authors. All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test parse.cc, dump.cc, and tostring.cc. #include <string> #include "library/cpp/testing/gtest/gtest.h" #include "util/logging.h" #include "re2/regexp.h"...
53e1284d9e584edba42b8fd4b22e000a88fdbea2
842e778dd5d5c172289ddcb9cb34c1c9183dd53c
Cylindric/AquaHub
/Firmware/main/WebControl.cpp
C++
cpp
3,518
permissive
/* Copyright 2018 Mark Hanford and AquaHub contributors. 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 ...
7bdf6050a390249f97b39fd2d9260b4a0959b388
330178cacf2445417498cfacdeffa1ead7549cca
fengrenchang86/PKU
/2230/7037752_AC_1329MS_3300K.cpp
C++
cpp
1,231
no_license
#include <iostream> using namespace std; struct ac { int v; ac *next; }*pTable[12000]; int n, m; int degree[12000]; int acStack[600000]; int nTop; void Insert(int x, int y) { ac *p = new ac; p->v = y; p->next = pTable[x]; pTable[x] = p; } void Input() { int i, x, y; for (i = 0; i <= n; i++) { pTable[i] = 0; ...
683a5b01f9ba968b42b0826ab3cdaaf6c712592d
09a8d0a50f815ef35b41e74a40ccbfc31311fa4e
DiamondJack/CTSC2018
/day2/trie/immortalCO/search.cpp
C++
cpp
1,582
permissive
#pragma GCC diagnostic error "-std=c++11" #pragma GCC optimize("-O2") #include <bits/stdc++.h> namespace __banban_hao_ke_ai__ { using str = std::string; const int MAX_N = 1010; const char C_MAX = 127, C_MIN = 0; const str NONE = ""; char val[MAX_N]; std::vector<int> adj[MAX_N]; int n; bool cmp(const str& a, ...
c3d557d06bda45598fd4e1ea0cce19b222ffed9b
bb3b18dfb598f3c024ca99d6c0cd830af0e5faad
feryandi/computer-graphics
/3D/Point.class.cpp
C++
cpp
510
no_license
#include "Point.class.hpp" Point::Point(){ x = 0; y = 0; z = 0; } Point::Point(float _x, float _y, float _z){ x = _x; y = _y; z = _z; } float Point::getX(){ return x; } float Point::getY(){ return y; } float Point::getZ(){ return z; } void Point::setX(float _x){ x = _x; } void Point::setY(flo...
6d370c8255d542ac76184d22878eba8601690ee1
aecee1aa26f563270b78db0d78538970c81dbcfc
kskovpen/cmssw
/DetectorDescription/Core/src/DDScope.cc
C++
cc
2,453
permissive
#include "DetectorDescription/Core/interface/DDScope.h" #include <ostream> dd_scope_class DDScopeClassification::operator()( const DDGeoHistory & left, const DDGeoHistory & right ) const { dd_scope_class result = subtree; DDGeoHistory::const_iterator lit = left.be...
df69faeaaf13584aeb9fa4fbf3df48fba0ba1153
090c0997867c55ecfca916516e7b41d3b2a92ad9
1369841815/FindMatchedLine
/generate_sfm.cpp
C++
cpp
20,973
no_license
#include <iostream> #include <fstream> using namespace std; #include <opencv2/core/core.hpp> #include<opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <Eigen/Geometry> #include <boost/format.hpp> // for formating strings #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/filte...
40d953ac934cdc3fc6a181419a1e832f163adddb
bf6a40f68ec341090939659931dcac383c17bedc
chinagdlex/yggdrasil
/developing/yggdrasil/tools/lua/luabind/include/luabind/detail/call_function.hpp
C++
hpp
15,552
no_license
// Copyright (c) 2003 Daniel Wallin and Arvid Norberg // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify,...
bab6b87eec648d5403d351335c623136d156deeb
73ca40944f75be27d845abf93a383ed5401639b1
laurentlb/envoy
/test/common/http/header_utility_test.cc
C++
cc
17,624
permissive
#include <regex> #include <vector> #include "envoy/config/route/v3alpha/route_components.pb.h" #include "envoy/json/json_object.h" #include "common/http/header_utility.h" #include "common/json/json_loader.h" #include "test/test_common/utility.h" #include "gtest/gtest.h" namespace Envoy { namespace Http { envoy::c...
2b75383f33a02bf85d6fb9e51326fd2a5bc279c7
8d9b1d5627bfd806c2d6fc15a2b4dc10af876ebb
DeclanRussell/NvidiaAIDenoiser
/contrib/OpenImageIO/include/boost/pool/detail/mutex.hpp
C++
hpp
2,477
permissive
// Copyright (C) 2000 Stephen Cleary // // 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 http://www.boost.org for updates, documentation, and revision history. #ifndef BOOST_POOL_MUTEX_HPP #define BOOST...
476910083ed251ab9e865d791eab3e4388dec248
7f193fa347f7e87b56e5b7268162e43915d5be2c
sarahkrob/raytracer
/src/scene/scene.cpp
C++
cpp
5,367
no_license
#include <cmath> #include "scene.h" #include "light.h" #include "../ui/TraceUI.h" #include "../SceneObjects/trimesh.h" #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/extended_min_max.hpp> #include <iostream> #include <glm/gtx/io.hpp> using namespace std; extern TraceUI* traceUI; bool Geometry::intersect(ray& r, ...
7fbce9c3ada99688d724c365c64199a538bf3224
d82674ef282e119c74131886794ba4ab96b0a782
dotnet/samples
/core/profiling/stacksampling/src/sampler.cpp
C++
cpp
10,815
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #include "SampleProfiler.h" #include "sampler.h" #include <thread> #include <cwchar> #include <cstdio> #include <cin...
3a31f56ebe0fc2ae334a244401e702711dd18d07
90ecbe4506d98b5fb7c2717ad44bbdc9f025c135
PaddlePaddle/Paddle
/paddle/fluid/operators/fused/mkldnn/multi_gru_mkldnn_op.cc
C++
cc
26,866
permissive
/* Copyright (c) 2020 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 by applicable law or...
65e3530adb62a1fc4ed5b648d5109df0990d9e9e
81441dcfbb8a15ec3cf2bd8595e71366cb58b595
KKoovalsky/JunglesDataStructs
/tests/test_find_nearest.cpp
C++
cpp
2,874
permissive
/** * @file test_find_nearest.cpp * @brief Tests the boundary_mapper template class * @author Kacper Kowalski - kacper.s.kowalski@gmail.com */ #include "ext_deps/catch/catch.hpp" #include "utils.hpp" #include <experimental/array> #include <vector> TEST_CASE("find_nearest() function unit tests", "[find_nearest]")...
ecf55a77062f3ba9984a218a5c0c22ffdaae6499
c4374776b443db808a7da5001dec62cb0ce10242
sustcoderboy/competitive-programming-archive
/peg/ccc/2012/stage-1/speed_fines_are_not_fine.cpp
C++
cpp
710
permissive
#include <iostream> using namespace std; inline void use_io_optimizations() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } inline unsigned int fine(unsigned int over_the_limit) { return over_the_limit <= 20 ? 100: over_the_limit <= 30 ? 270: 500; } i...
bac75b8eeeef4f30d6ed1d6fe1926d8ee3c7c863
086119b0fb9234c79915d345f1c6b78c6458f504
lerkas/C-lab-3
/src/main7.cpp
C++
cpp
959
no_license
#include <stdio.h> #include <string.h> #define N 256 int main() { char str[N]; char num[128] = {0}; // массив для заполнения цифрами частотности printf("Enter a string: \n"); fgets(str, N, stdin); int i, count = 1; int line = strlen(str); for (i = 0; i < line - 1; i++) // бежим по строке ...
15a93d22720c1bdef1cf863fe30c07e8f1d906a0
1c192878920e6e9924735e75543e4182d20bc78b
vvuk/bgfx
/3rdparty/spirv-tools/source/fuzz/fact_manager.cpp
C++
cpp
1,430
permissive
// Copyright (c) 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
696986ef23019d753b12cef257d929c288305cf6
abacd2e9973b1a45fd8d005841cd95daf7ce42d1
massnetwork/mass-browser
/third_party/WebKit/Source/core/layout/LayoutTextCombine.cpp
C++
cpp
6,778
permissive
/* * Copyright (C) 2011 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. ...
52c6eeefb251de4ca2f08fbc53582b5787a5f192
002b1a5f923103813f3c1cb7c0eea0312463d093
sergiud/bibtex-spirit
/tests/test_read_file.cpp
C++
cpp
2,149
permissive
// Copyright (c) 2011, 2020 Sergiu Deitsch // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, p...
020009721c8d52aad61f2988425f9fe593fc5b0d
f9689d7502caafd266a4936a61565f7b315e0731
kjbartel/clmagma
/src/dgeev.cpp
C++
cpp
16,940
no_license
/* -- clMAGMA (version 1.3.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2014 @precisions normal d -> s */ #include <stdio.h> #include "common_magma.h" #define PRECISION_d /* * VERSION1 - LAPACK * VERSION2 - MAGMA ...
50023ca300a52d76d6e0fd7f893b5167f8fa9c2c
7d8b95d9a670dd28ffaff91ca9a90c3ea89b03fc
olegrog/kesolver
/src/ci_simple.hpp
C++
hpp
3,536
no_license
#ifndef _CI_SIMPLE_HPP_ #define _CI_SIMPLE_HPP_ #include "ci.hpp" template <Symmetry symmetry> class ColliderSimple { public: typedef XiMesh<symmetry> XiMeshType; void gen(const double time_step, const int p, const XiMeshType& ximesh, const SimpleSection* sectio...
01d72fa20db5cd306d228e5c6cfcb1f5b2656b3c
0683c1e88056193c844a63e17fecf50e202cf3c3
parkchohee/ClashOfClans
/ClashOfClans/winMain/utils.cpp
C++
cpp
8,089
no_license
#include "stdafx.h" #include "utils.h" namespace MY_UTIL { float getDistance( float startX, float startY, float endX, float endY ) { float x = endX - startX; float y = endY - startY; return sqrtf( x*x + y*y ); } float getAngle( float startX, float startY, float endX, float endY ) { float x = endX - star...
cdcdda0f8aca1f6d257091d63b7c0e76e835fe12
b3175c5746ae8677759a1eac9345c21fc50e8223
IRETD/TestSystemStudent
/Zip/ZipArchiver.cpp
C++
cpp
1,775
no_license
#include "ZipArchiver.h" #include <private/qzipreader_p.h> #include <private/qzipwriter_p.h> #include <QBuffer> #include <QDir> #include <QDirIterator> ZipArchiver::ZipArchiver() { } bool ZipArchiver::unpackIntoSpecifyPath( QByteArray fileZipBuffer, const QString &path ) { QBuffer buffer( &fileZipBuffer ); ...
fbb48e9c818d0bfcaa4e35e35827a0b65cb246d6
dbe109ae23c73b32ffe8e25e81152baf41a76db7
sraihan73/Lucene-
/analysis/nori/src/java/org/apache/lucene/analysis/ko/tokenattributes/PartOfSpeechAttributeImpl.cpp
C++
cpp
2,641
no_license
using namespace std; #include "PartOfSpeechAttributeImpl.h" #include "../../../../../../../../../../core/src/java/org/apache/lucene/util/AttributeReflector.h" #include "../Token.h" #include "../dict/Dictionary.h" namespace org::apache::lucene::analysis::ko::tokenattributes { using Type = org::apache::lucene::analysis...
36a680470c97cd708ccea6630d313d380dcad573
eaab1ae833e4e6f39a796fbcfd9ece4272779889
LEA0317/LLVM-VideoCore4
/llvm11.0.0/clang/test/SemaCXX/references.cpp
C++
cpp
6,879
permissive
// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s int g(int); void f() { int i; int &r = i; r = 1; int *p = &r; int &rr = r; int (&rg)(int) = g; rg(i); int a[3]; int (&ra)[3] = a; ra[1] = i; int *Q; int *& P = Q; P[1] = 1; } typedef int t[1];...
233b1abebbd177ac8f80902203a8325d8ae5ffa5
10083769f177c030d744a5ec6b5470d0bd1c7fe0
egillt17/LitidVerk1
/Pizza/3vikuverk/src/Display.cpp
C++
cpp
1,733
no_license
#include "Display.h" #include "ManagerUI.h" #include "BakerUI.h" #include "DeliveryUI.h" #include "SalesUI.h" Display::Display() { //ctor } Display::~Display() { //dtor } void Display::displayMainUI() ///This is the main display for the User Interface, here we are firuri...
a9ffe611b2bf63f958947952ccd95d17cc109556
4c86dab139360ad1a5e03e2ca4814b4f5e2e7325
ssjf409/PS
/알고리즘스터디/2852NBA농구.cpp
C++
cpp
1,712
no_license
#include <iostream> #include <string> #include <vector> #include <cstdlib> using namespace std; int main() { int N; cin >> N; int flag = 0; // 1번팀은 음수로, 2번 팀은 양수로 int before_time = 0; int sum_of_time_1 = 0; int sum_of_time_2 = 0; for(int i = 0; i < N; i++) { int temp; ...
131b9ea9b15a5a4da8d8a69996d5c2e24c610e82
60829dbc1cfb280ce5117663e10c6f56350183dc
mar753/chromium
/third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.cc
C++
cc
22,207
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 "third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h" #include "services/network/public/mojom/web_sandbox_flags.mojom-blink...
1b40591e811011db5686ede882b42aa077afecc8
2d90335683cc321a261839e3d5cacdee30b6b622
venam/easy_cpp_string
/t.cpp
C++
cpp
3,582
permissive
#include "easy_string.hpp" #include <iostream> using namespace std; int main(int argc, char** argv) { std::string s = "Hello World"; s = easy_string::lc(s); std::cout<<"is lower: "<< easy_string::is_lower(s) << std::endl; std::cout<<"is upper: "<< easy_string::is_upper(s) << std::endl; std::cout<< s <<std::endl;...
d869d223a4a52d87f3a5dd5725c199eb375a7d1e
f20ed426967a5b046d025a896ab4f7c5a3266a66
jmorton06/Lumos
/Lumos/External/vulkan/SPIRV-Cross/spirv_cross.hpp
C++
hpp
46,915
permissive
/* * Copyright 2015-2020 Arm Limited * * 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...
8e8a7c38f99a8c00626fcbddbf925d4926486ec6
943bc6c0825cf0f742f069ade0eaed230e9b8052
Simran-B/SPIRV-Tools
/test/opt/ccp_test.cpp
C++
cpp
39,148
permissive
// Copyright (c) 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to...
9b2b111e94162f518f931ed9102234fe1ebce2cc
7ed38c3ad5792dfa3bc0338e32b1af241ddbf20c
2018hsridhar/Leetcode_Solutions
/leetcode_1358.cpp
C++
cpp
1,675
no_license
/* 1358. Number of Substrings Containing All Three Characters URL = https://leetcode.com/problems/number-of-substrings-containing-all-three-characters/description/ Sliding window technique Complexity Let N := len(s) Time = O(N) Space = O(1) ( EXP ) O(1) ( IMP ) Used switch-case in place of object instantiation. Case...
bcf8b89aeb7df799ac8e4231c31fc165f00200e5
2dbadbace98f89ba3f83e8199c41ed3296b95c68
haohaochung/POSD_HW
/105598031_HW6/Shapes/src/Parser.cpp
C++
cpp
956
no_license
//#include "Parser.h" //void Parser::textUI() { //while (true) { // char str[100]; //cout<< ":- "; //cin.getline(str, 100); //char *pch; //char *delimiters = " =,()"; //pch = strtok(str, delimiters); //while(pch!=NULL) { // cout<<pch<<endl; ...
9891c2ab09da448930429bdbb2247944a024c125
50941e5ce7b93949231759b79302f6be23eaf189
flamato/mrpt
/libs/hmtslam/src/CPropertiesValuesList.cpp
C++
cpp
5,414
permissive
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Cop...
9384bc76a004b75a2dbc7bca7423a9d629d1485f
d9aed3693f1b277f59f8fb3f252261838c5b3f21
Sporknugget/Juliet_prep
/testcases/CWE127_Buffer_Underread/s03/CWE127_Buffer_Underread__new_wchar_t_memcpy_03.cpp
C++
cpp
4,340
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE127_Buffer_Underread__new_wchar_t_memcpy_03.cpp Label Definition File: CWE127_Buffer_Underread__new.label.xml Template File: sources-sink-03.tmpl.cpp */ /* * @description * CWE: 127 Buffer Under-read * BadSource: Set data pointer to before the allocated memory buffer...
41aa291c4dad7e1b8f91fe869af99ac9d1723ecb
526cdb9fb6b87e66163d3d2bc5f36f7febf201c7
SiyangJ/Courses
/SU2016/C++/Exercises/3.2/3.2/main.cpp
C++
cpp
263
no_license
// // main.cpp // 3.2 // // Created by 景思阳 on 6/1/16. // Copyright © 2016 景思阳. All rights reserved. // #include <iostream> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; return 0; }
aa247ae771eda43c45d3ac46848edfcebd2241f2
d80767835d582b102887ed1eec521d8e824089e0
Elytum/bombermanRedo
/shaders/Shader.cpp
C++
cpp
3,177
no_license
#include <graphic.h> #include <iostream> #include <vector> #include <fstream> #include <Shaders/Shader.hpp> #include <sstream> /* ** Load a shader into opengl using a "vertex file" and a "fragment file" */ static GLuint loadShader(std::string filename, GLuint type) { // Create the shaders GLuint shaderID = glCrea...
49f693da1cea28d262343c25f652005119d2da54
2aa173d69c8bd5fad30c1658343077bad18134fb
drescherjm/dtk
/src/dtkWidgets/dtkWidgetsTagCloudView.cpp
C++
cpp
5,215
no_license
/* dtkWidgetsTagCloudView.cpp --- * * Author: Julien Wintz * Created: Mon Apr 15 14:39:34 2013 (+0200) * Version: * Last-Updated: Mon Apr 15 14:44:56 2013 (+0200) * By: Julien Wintz * Update #: 7 */ /* Change Log: * */ #include "dtkWidgetsTagCloudDesc.h" #include "dtkWidgetsTagCloudList.h" ...
4926dc35b1174a0915721eebfc44bb5a85db6d50
005533e20c63e4ff145881af6352794a3310c3b3
Iris-Lien/108-2-Computer-Programming
/CPE/38.Can You Solve It(10642 )/xy.cpp
C++
cpp
401
no_license
#include <iostream> using namespace std; int main() { int T,x1,y1,x2,y2; while (cin>>T) for (int t = 1 ; t <= T ; t++) { cin>>y1>>x1>>y2>>x2; long long n = (x1+y1)*(x1+y1+(long long)1)/(long long)2+y1; long long m = (x2+y2)*(x2+y2+(long long)1)/(long long)2...
4ed2201f9a6a26b787a09ae9deee8155b6864a22
834b668314f579177cbe35fd91b6db427e5e42e9
kwattt/ForestRedemption
/ForestRedemption/script.cpp
C++
cpp
12,294
no_license
#include "script.h" #include "models.h" #include "overlay.h" #include "misc.h" #include "menu.h" #define max_wood 4 prompt_ TreeP; prompt_ LogP; prompt_ WoodP; prompt_ DWoodP; prompt_ StickP; Object cabain_test = NULL; Ped playerPed; using namespace std; void checkKeys() { // Main loop, we mostly check keys for a...
82632691748d1def4874c6e521dcd202eb47c467
61240fb3d2d3f91e6877d6c28b97a9e4a64c01f8
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_new_hunk_1210.cpp
C++
cpp
734
no_license
if (bb_len != -1) conn->worker->s->read += bb_len; } if (ap_pass_brigade(r->output_filters, output_brigade) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0...
fe12c6b62f9521b3b1e4f4563b1acdb46914c20b
f01c0a9f6ae3e174c6803217418fc93ba70b0bf7
shaihitdin/CP
/Olymp/NEERC/ACM/2014-2015/Moscow/E.cpp
C++
cpp
1,044
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int till = sqrt (1e15) + 1; ll n, d; inline int get_ans (const ll &base) { ll now = n; int ans = 0; while (now) { if (now % base == d) ++ans; else break; now /= base; } return ans; } int main () { #ifdef LOCAL freop...
f10b5567e0981806752c4157ff7f73cebc7dfc87
537614dc496942d423fae2e69cd070f58eec14c6
sdlxrd/lab-4.6
/lab 4.6/lab 4.6.cpp
C++
cpp
714
no_license
#include <iostream> #include <cmath> using namespace std; int main() { double P, S; int k, i; P = 0; i = 1; while (i <= 10) { S = 1; k = 1; while (k <= i) { S *= k / i; k++; } P += (1 + S) / i*i; i++; } cout << P << endl; P = 0; i = 1; do { S = 1; k = 1; do { S *= k / i; ...
66c345a65b92e83b5167d312919b736c7ee754b3
55e8215e4b518955dd99ee1b43147bf5225e5098
Archenemy-L/QT
/WPS/childwnd.cpp
C++
cpp
6,361
no_license
#include "childwnd.h" #include <QFileInfo> #include <QFileDialog> #include <QTextDocumentWriter> #include <QMessageBox> #include <QTextList> #include <QTextBlockFormat> #include <QTextListFormat> ChildWnd::ChildWnd() { //子窗口关闭时销毁该类的实例对象 setAttribute(Qt::WA_DeleteOnClose); m_bSaved = false; ...
238540c630ad8758c6870684f48980c6e1bc0889
3d3db29e9fd313a751b5c5aff03e48dca72592cc
hoangt/NoSSim
/NoS_Vgraph/src/OSNode/CliTask.cc
C++
cc
8,326
permissive
#include "AppTasks.h" void send_img(void *arg, int image_count) { struct netconn *conn; err_t err; LwipCntxt *ctxt = (LwipCntxt *)arg; /* Create a new connection identifier. */ conn = netconn_new(ctxt, NETCONN_TCP); /* Bind connection to well known port number 7. */ //std::cout << "Before Connec...
a472d20a6f46a172db7ecb4a0029a4f7bd62e6d0
c2972ca89c008422c5ff6be2107a27ee9b8e0734
sgwx/sgwx-s-repository
/DataStructure/queue.cc
C++
cc
966
no_license
#include"queue.h" #include<stdlib.h> #include<stdio.h> void init_queue(Queue *q, int n) { q->data = (int *)malloc(sizeof(int) * n); q->count = 0; q->length = n; q->head = 0; q->tail = -1; } int push_queue(Queue *q, int value) { if (q->count == q->length) { return ERROR; } q->t...
7d7289c40039b3d565bdfb7ea0c6d70270e8a753
eabb5ba8415254bea6315e0769865ee38a02c9d5
nexagames/plaid_audio
/plaid/audio/effect/filter.cpp
C++
cpp
3,356
permissive
#if PLAIDGADGET #include "../../geometry/2d.h" #else #define PI 3.141592654f #endif #include "../effects.h" using namespace plaid; using namespace std; const float Filter::BOTTOM = 20.0f / 1024.0f, Filter::TOP = 20000.0f * 1024.0f; Filter::Filter(Signal source, float low, float high) : AudioEffect<Filter_Node>(...
75db5d55da5ae39de6e7cffddbb6435c5e69979c
6156cdadb237bb313e4ff91bf2a0d18c2e48afb3
NickelLiang/ECE_Courses
/CS225/lab_ml/NimLearner.cpp
C++
cpp
5,363
no_license
/** * @file NimLearner.cpp * CS 225: Data Structures */ #include "NimLearner.h" #include <ctime> /** * Constructor to create a game of Nim with `startingTokens` starting tokens. * * This function creates a graph, `g_` representing all of the states of a * game of Nim with vertex labels "p#-X", where: * - # is...
98809ba8d5719c4faeef5f85de19c74817161d57
66b79713c167936c16c734f75fe243d6a6b25798
xjhqre/cpp-demo
/实验3/代码/2/main.cpp
C++
cpp
576
no_license
#include "position.hpp" #include <iostream> #include <math.h> using namespace std; int main() { position a, b, c,d,e; a.set(5, 15); a.show(); b.set(-4.5, 6.7); b.show(); c.set(-10, -100); c.show(); d.set(20.5, 5.5); e.set();//默认为原点 e.show(); cout<<a.distance(b)<<endl; cout<<a.distance()<<endl;//默认求与原点的距离 ...
f366702eb96a60e46157147cedaa8b835dd4d25b
e4c59bd847c333bcd2b70da6b9c758d60a816dfa
lfladung/RainbowSnake
/io.cpp
C++
cpp
3,454
no_license
#include <unistd.h> #include <ncurses.h> #include <ctype.h> #include <stdlib.h> #include <time.h> #include "io.h" #include "snake.h" #include "map.h" void move(map *m, int dir){ int tailOldx = m->Snake->tail->posX; int tailOldy = m->Snake->tail->posY; m->Snake->tail->posX = m->Snake->head->posX; m->Snake->ta...
5d812a6579e6f087b289918fc91b582a6ae3b662
5d6d0c8345374ff4df9256f7e3b5ec3d0f8e0648
erikhallin/SpectraSub
/main.cpp
C++
cpp
28,886
no_license
#define _WIN32_WINNT 0x0500 #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <stdio.h> #include <fcntl.h> #include <io.h> #include <iostream> #include <fstream> #include <sstream> #include <vector> using namespace std; struct st_point { st_point() { x=0; y=0; } st_...
89bbec7671456d93a0792bb0ee5b80d94143b0ad
b1372dd81330402f4b49eb5ddc1ccf2829b38e1b
pozharko/elastic_network
/core/task_manager/trajectory_task.cpp
C++
cpp
4,467
no_license
#include "trajectory_task.h" #include <excitor.h> #include <relaxer.h> #include <result_observer.h> #include <node_chooser.h> #include <logging.h> #include <boost/filesystem.hpp> trajectory_process::trajectory_process(const std::string& results_dir, const std::size_t run_id, const config& conf) : results_dir_(resu...
c0a7cf6f1497a77284681c22bb8189007afb6314
734a97c3b5e93b51d23bb849bce724d1605a14a5
Vitucho2015/ucm-fdi-igr
/practica6/src/elements/BilliardTable.cpp
C++
cpp
2,042
no_license
/** Autor: Xavier Gallofré Nieva */ #include "BilliardTable.h" BilliardTable::BilliardTable(void) { GLdouble width,height, depth; width = 2; height =0.05; depth = 4; Bed* bed = new Bed(width,height,depth,10,2,20); bed->mT.translate(0.1,0.05,0.1); childs.push_back(bed); Parallelepiped* par...
b29ca727cb2c0862a739cf9f525a7328e28478a9
c521954b9c1a458c26c45458e68b7feef5114919
rahuttre/CalculateGrades-CPP
/CalculateGrades.cpp
C++
cpp
2,003
no_license
// Ryan Hutton // Module 2 - Calculate GPA // SNHU IT 312 - Software Development with C++ // 1/15/2020 // Assignment: Develop a program that calculates the GPA based // on four grades inputted by the user. The program will then // determine if there are honors awards given based on the // overall GPA. #include <i...
b0501bb45ec13f008698ca4e50598253e430a532
b3454af38c2b4c97d4493535f5c137d09b6a2e8a
marry9/tightvnc
/tvnviewer/ViewerWindow.cpp
C++
cpp
35,312
no_license
// Copyright (C) 2011,2012 GlavSoft LLC. // All rights reserved. // //------------------------------------------------------------------------- // This file is part of the TightVNC software. Please visit our Web site: // // http://www.tightvnc.com/ // // This program is free software; you can red...
bacd4d404f43b057686370cf7c2f46bbd7f0fcad
ab880b566b026285f587bf2c066e6f1774185cd9
dank0r/microsh
/main.cpp
C++
cpp
546
no_license
#include <iostream> #include <unistd.h> #include <string> std::string getNextCommand(std::string &path, bool &is_root) { std::string cblue = "\x1B[1m\x1B[34m"; std::string cnorm = "\x1B[0m"; std::cout << cblue << path << cnorm << (is_root ? "! " : "> "); std::string input; std::cin >> input; return input; } int...
867ee6141fb93984ee5c12754beec65afef76380
a1fb34093d7d4f64bbf81dbc689578c051e539bc
humanoid-robotics-htl-leonding/robo-ducks-core
/src/tuhhsdk/Tools/StateEstimation/Covariance.hpp
C++
hpp
815
permissive
#pragma once #include "Tools/Math/Eigen.hpp" namespace Covariance { /** * @brief fixCovariance makes a given covariance symmetric by averaging with * its transpose: A = 0.5 (A' * A) @param cov the matrix to be fixed */ inline void fixCovariance(Matrix2f& cov) { cov(0, 1) = (cov(0, 1) + cov(1, 0)) *...
5f23d4b2053616a83ea265e20e75376ea499d78f
6973ceadff8c111608faf10407de42bad2909bf3
simonxuluo/TDAP
/TransFE/mapping2daxi.cpp
C++
cpp
3,745
no_license
/*************************************************************************** * Copyright (c) 2012 by Timothy C. Raymond * * tc.raymond@ieee.org * * All rights reserved. * * * * R...
77ac13ee8490106bdf5609d00953884d89220836
24ea5e7de7f5177ab4e91e184fa6bd0c14b88fc8
Violet26/msdn-code-gallery-microsoft
/Official Windows Platform Sample/MIDI Windows Runtime sample/[C++]-MIDI Windows Runtime sample/C++/Constants.cpp
C++
cpp
839
permissive
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. /...
fce96495da8f4c5aa2b8392a7892ac596598d261
1320e21ef739dce917051f1aeb87f6882759557c
Kehczar/scum_sdk
/SCUM_HeadMountedDisplay_structs.hpp
C++
hpp
7,440
no_license
#pragma once // Scum 3.79.22573 (UE 4.24) #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace Classes { //--------------------------------------------------------------------------- //Enums //--------------------------------------------------------------------------- // Enum HeadMountedDisplay.EXRTrackedDevic...
b678bdde41b88013fceddf2fde27575562fbf2eb
072df55f3625a3fb8fa3ccea7469dce03ff47fad
damiankoper/so2
/src/Drawers/StopDrawer.cpp
C++
cpp
758
permissive
#include "StopDrawer.hpp" #include <QString> void StopDrawer::setStop(Stop *stop) { this->stop = stop; } void StopDrawer::draw(QPainter &painter) { QPen pen(Qt::black, STOP_STROKE, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin); painter.setPen(pen); std::string text = std::to_string(stop->passengers.size()) ...
37f7cc9c5d37779720ba687c92db69db9e8de268
55b3f33989697ee69ca21fab468e9f8c6e4dc75a
wildmichael/ParaView3-enhancements-old
/Qt/Components/pqPipelineBrowser.cxx
C++
cxx
22,946
permissive
/*========================================================================= Program: ParaView Module: $RCSfile: pqPipelineBrowser.cxx,v $ Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc. All rights reserved. ParaView is a free software; you can redistribute it and/or modify it under the ...
fac12544230052075abb1a00fa4e555cb7d942b0
625f87caf5d230de6ba16728427da7b56935827c
WaveMo/Language
/C++/C++课程作业/C++实验报告和课程项目/第六次实验/第一题/median.cpp
C++
cpp
846
no_license
// // median.cpp // one6 // // Created by Worlder on 2018/12/31. // Copyright © 2018 Worlder. All rights reserved. // #include <algorithm> // to get the declaration of `sort' #include <stdexcept> // to get the declaration of `domain_error' #include <vector> // to get the declaration of `vector' using std::doma...
24af21dc1a0912d870cb84e8aa81fb44cc5335d8
9efb89c9326fbf9224fdacde0c9c55e450ed5c30
chenlijun99/DeviceInterface
/src/libs/gui/ToggleButton.hpp
C++
hpp
1,019
no_license
#ifndef TOGGLEBUTTON_HPP #define TOGGLEBUTTON_HPP #include <QPushButton> class QString; class QColor; class ToggleButton : public QPushButton { Q_OBJECT public: ToggleButton(QWidget *parent = Q_NULLPTR); ToggleButton(const QString &name, QWidget *parent = Q_NULLPTR); ToggleButton(const QString &name, c...
606e6d51fcbdef1ee01be32a8c15f25da6af6a19
50ecd030617de6cb479f045452b4394211659274
OHSShi/SimpleSNMPMessage
/SNMP_LIB/TestSNMPMessage.cpp
C++
cpp
12,979
no_license
#include "Message.hpp" #include <stdio.h> int main( int argc , char** argv ) { SNMPMessage *ptr = 0; SNMPMessage *ptr1 = 0; char mVersion; mVersion = C_SNMP_V1; switch( mVersion ) { case C_SNMP_V1 : ptr = new Message; ptr1 = new Message; break; default : break; } if( ptr == NULL ) { ...
985260f6a2bda9e29035d8acd9d189363246fe22
aedf275606d97ceef32672f16fa8ea3fea91da6e
ydong08/testcode
/algorithm/xsgl.cpp
C++
cpp
14,106
no_license
#include <stdio.h> #include <stdlib.h> /*其它说明*/ #include <string.h> /*字符串函数*/ #include <time.h> #define LEN sizeof(STUDENT) typedef struct stu /*定义结构体数组用于缓存数据*/ { char num[6]; char name[5]; int score[3]; int sum; float average; int order; struct stu *next; }STUDENT; /*初始化函...
3b51f8a8a3074ea040982a778ae00861c8e92a69
c4374e9205b8036812bc01a01f186329fb581580
fnc12/Mitsoko
/AndroidUtil/android/os/AsyncTask.hpp
C++
hpp
723
no_license
// // AsyncTask.hpp // Groozim // // Created by John Zakharov on 21.11.16. // Copyright © 2016 Outlaw Studio. All rights reserved. // #ifndef VIPER__ANDROID_UTIL__ANDROID__OS__ASYNC_TASK #define VIPER__ANDROID_UTIL__ANDROID__OS__ASYNC_TASK #include "Mitsoko/AndroidUtil/java/lang/Object.hpp" namespace android{ ...
d7ca59b95b01b8af1d44efeffa1fb57d83232e2d
593a674e2f275b3a704e7f914d8959dc3bdab260
y-friedel/luwak-2
/luw/process/histogram/HISTOGRAM_computehistogram.cxx
C++
cxx
479
no_license
#include "histogram.h" #include <opencv2/core.hpp> //Mat IO_ERROR LUW::HISTOGRAM::ComputeHistogram(const cv::Mat& image_in) { if (!image_in.data) return IO_NOT_FOUND; #pragma omp parrallel for (int ith_row = 0; ith_row < image_in.rows; ++ith_row) { #pragma omp parrallel for (int ith_col = 0; ith_co...
5446cd50abfcba02e4a9a5a0343406ecebb9663c
c0e30282895c1ba44f6a0079b42d2bd92453e486
esrlabs/Mindroid.ecpp
/src/platforms/autosar-os/mindroid/util/concurrent/locks/Condition.cpp
C++
cpp
1,726
no_license
/* * Copyright (C) 2011 Daniel Himmelein * * 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 ...
2729951057164c0affe51d88ba1dc7cd3df0423e
70c26d423b1daa7aa7c3795d9e96a362e3b76316
tnsgh9603/BOJ_Old
/What is n, Daddy.cpp
C++
cpp
244
no_license
#include <bits/stdc++.h> #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; int main() { fastio; int n; cin >> n; if (n <= 5) { cout << n / 2 + 1; } else { cout << n / 2 + 1 - (n - 5); } return 0; }
b2d471a1ebb6e2d47e61aaf054b26b293641b371
e8f51f529055733b203ad791620f2898b151e68c
MichaelSmithwick/BattleTank
/BattleTank/Source/BattleTank/Private/TankAIController.cpp
C++
cpp
3,926
no_license
// Copyright(c)2018 -- Mike Smithwick -- All Rights Reserved #include "TankAIController.h" #include "Tank.h" #include "TankAimingComponent.h" #include "Engine/World.h" // check existence of Pawn for this object and existence of a human Player void ATankAIController::BeginPlay() { Super::BeginPlay(); APawn* ThisTan...
149bc38ae616c53ad18c82bca43c5ac2d3618688
fe239f3817c85c40f0d63cff949d284d88ddd341
ujjwalranjan1/Operating-Systems-Lab-IIT-KGP
/Assignment 4 files/thread_scheduling.cpp
C++
cpp
1,331
no_license
#include <bits/stdc++.h> #include <unistd.h> #include <pthread.h> using namespace std; int STATUS[10000], N, pid=0, READY[10000]; int change=0, from=-1, to=-1; pthread_t tid[10000], scheduler, reporter; void *report_jobs(void *n) { while(1){ while(!change); printf("Change from %d to %d", from, to); change = 0;...
5379bd3324b9f5a368f91254b5afea81431f546d
9d64512ca459f2fe43138785cf5c52db92013c10
zhuli19901106/hdoj
/HDU1445(AC).cpp
C++
cpp
747
no_license
#define _CRT_SECURE_NO_WARNINGS #include <cmath> #include <cstdio> #include <cstdlib> using namespace std; //Ignore Charley, but think about the one that arrives at the school first, Charley will always be with that guy. int main() { char str[1000]; double speed; double time; const double s = 4500; int n; doubl...
519aaf41e45c6253ff7f8f1fca60e538410e9816
da43483210ef4a4b7293eee5b7298413b94c9759
JoshuaMasci/Genesis
/Genesis/source/Input/KeyboardDevice.cpp
C++
cpp
1,842
permissive
#include "Genesis/Input/KeyboardDevice.hpp" #include "Genesis/Input/InputManager.hpp" namespace Genesis { /*KeyboardDevice::KeyboardDevice(string name) :ArrayInputDevice(name, (uint16_t)KeyboardButton::SIZE, 0) { } KeyboardDevice::~KeyboardDevice() { } void KeyboardDevice::updateValues() { ArrayInputDev...
ac22c348592650aa0ae17f685a6d932ce5a65d20
48d94864571ea2569cf178d8943c2cd2ff28ab89
liang0/chromium
/chrome/browser/favicon/content_favicon_driver_browsertest.cc
C++
cc
34,644
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/favicon/content/content_favicon_driver.h" #include <set> #include <string> #include "base/bind.h" #include "base/command_line.h" #i...
58b8437563b6b9bef54468c3dddab9e55fd53a87
e777ef2492402f8c8e6d001b6d376b7fb0fdb939
crazyman106/AndroidTest1
/app/src/main/cpp/native-lib.cpp
C++
cpp
255
no_license
#include <jni.h> #include <string> extern "C" JNIEXPORT jstring JNICALL Java_com_ljj_MainActivity_stringFromJNI( JNIEnv *env, jobject /* this */) { std::string hello = "Hello from C++"; return env->NewStringUTF(hello.c_str()); }
2a83f87c43232d402b7659c734f5bf4e76492b78
3fc00c87f337f2b93e50ea9c7aa720a73165691a
juniorandrade1/Master
/src/Priority_Queue/Non-oblivious-priority-queue.cpp
C++
cpp
974
no_license
#include <bits/stdc++.h> #include "Priority_queue.hpp" int main() { Retroactivity::NonObliviousPriorityQueue< int > q; int r; r = q.InsertPush(5, 10); printf("= %d\n", r); q.fixOperation(r, insertpush); printf("\n\n"); r = q.InsertPush(10, 20); printf("= %d\n", r); q.fixOperation(r, insertpush)...
90ec087fcd6d41a7af92a08b85f20cee144145ec
1d7d8597ea4c9a56401a0f71edd182cf18441ae4
weimingtom/httpcontentparser
/projects/MainUI/GuiLib1.5/GuiDocSpecial.cpp
C++
cpp
3,852
no_license
/**************************************************************************** * * * GuiToolKit * * (MFC extension) * * Created by Francisco Campos G. www.beyondata.com fcampos@beyondata.com * *-------------------------------------------------------------...
cbd2470b017e7a4b9e461952e6753785b1fb7529
89815147861d8dabc6a34d6ecda67a7d3856124b
KexinAnswer/CPlusPlus
/queue_stack/queue_stack/Main.cpp
C++
cpp
2,656
no_license
//#include <iostream> //#include <stack> //#include <queue> // //using namespace std; // //class MyStack { //public: // /** Initialize your data structure here. */ // MyStack() { // // } // // /** Push element x onto stack. */ // void push(int x) { // if (queueS2.size() == 0) // { // queueS1.push(x); // } // if (...
b83066cb0beef9a3d61532982cd231555d93b4af
fb21a87de57e58f1a180f56a53b0d8c8a69f677f
jumperbeng/backup
/PDA/VTK-6.3.0/VTK-Release-build/Rendering/VolumeOpenGL/vtkHAVSVolumeMapper_k6BeginFP.cxx
C++
cxx
1,217
permissive
/* DO NOT EDIT. * Generated by ../../bin/vtkEncodeString-6.3 * * Define the vtkHAVSVolumeMapper_k6BeginFP string. * * Generated from file: /home/jumper/Documents/PDA/VTK-6.3.0/Rendering/VolumeOpenGL/vtkHAVSVolumeMapper_k6BeginFP.asm */ #include "vtkHAVSVolumeMapper_k6BeginFP.h" const char *vtkHAVSVolumeMapper_k6...
704916d3a026794ed2296696498ba61b60398505
3d2ff63b95d14b27c56ac2b701c386c764a56dd0
Ewenwan/Cpp-High-Performance
/Chapter11/boost_compute_custom_kernel.cpp
C++
cpp
3,847
no_license
#include "chapter_11.hpp" #define BOOST_COMPUTE_NO_BOOST_CHRONO #include <boost/compute.hpp> #include <string_view> namespace { namespace bc = boost::compute; auto box_filter = [](int x, int y, const auto& src, auto& odst, int w, int r) { float sum = 0.0f; for (int yp = y - r; yp <= y + r; ++yp) { for (int xp...
715b2b40a4b117ce178f07268fcc285b1431944e
2e5de056eb43122399e9124c8a34f20a36fb5312
johanvdp/SolarBoilerMeter
/TemperatureCollector.cpp
C++
cpp
1,241
permissive
// The author disclaims copyright to this source code. #include <Wire.h> #include "Debug.h" #include "TemperatureCollector.h" TemperatureCollector::TemperatureCollector(Clock *clk, Thermometer* m, Log* l, unsigned long measurementIntervalSeconds) { clock = clk; meter = m; log = l; state = WAITING; nextMeasuremen...
696226f0f7ec1f7bcc3be00c23030aa6d9c6a8e1
d98d1fc3bc14c60bf430d8d2e301d1058a265348
asdlei99/yangmeetingserver
/src/slscore/SLSGroup.cpp
C++
cpp
12,133
permissive
/** * The MIT License (MIT) * * Copyright (c) 2019-2020 Edward.Wu * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * ...
2e955da7aa64e1af3741038d4e64699c6df8b991
09f15f684f7adeb4bf5a1ac0f16ede6dca5ebc51
claytronics/meldtools
/predicates/sched/mpi/token.hpp
C++
hpp
1,689
no_license
#ifndef SCHED_MPI_TOKEN_HPP #define SCHED_MPI_TOKEN_HPP #include "conf.hpp" #ifdef COMPILE_MPI #include <boost/serialization/serialization.hpp> #include <boost/mpi/packed_iarchive.hpp> #include <boost/mpi/packed_oarchive.hpp> #include <boost/mpi/datatype.hpp> namespace sched { class token { private: stat...