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
da8fc1fb8d42e671381e9308ca576d7ae5a02f2f
ede532225fd06d1ec41c34c52270f4342162be1a
coderTong/aws-sdk-cpp
/aws-cpp-sdk-apigateway/source/model/GatewayResponse.cpp
C++
cpp
4,081
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
8c4697033eb2e9e3bcd64fb6a4133f8ba36a3bb4
c1bd21ce25a34138ac7d7215f6f2f589dd90c3d1
JetAr/ZDoc
/code/Windows-classic-samples/Samples/Win7Samples/sysmgmt/wmi/vc/eventconsumer/Factory.Cpp
C++
cpp
2,399
permissive
//*************************************************************************** // // Copyright (c) Microsoft Corporation, All Rights Reserved // // File: factory.cpp // // Description : // Event consumer provider class factory implementation // // Part of : WMI Tutorial. // // History: // //********************...
b6ecf6e093a7385736ee0b4ec40dd53a7523ae38
463ba2607652f64841da6331e07e3f0b89b7e784
jsonn/pkgsrc
/math/fityk/patches/patch-src_eparser.cpp
C++
cpp
1,322
no_license
$NetBSD: patch-src_eparser.cpp,v 1.1 2013/04/30 22:25:40 joerg Exp $ --- src/eparser.cpp.orig 2013-04-30 20:10:11.000000000 +0000 +++ src/eparser.cpp @@ -139,7 +139,7 @@ int get_function_narg(int op) } } -bool is_function(int op) +bool my_is_function(int op) { return (bool) get_function_narg(op); } @@ -...
e27008511902ba3176f1af07aafe3498b53f1862
8a0a71ae08b2e227a4efe7c366c93df126fd7b3f
rjrivera/code-dojo
/cpp/ProjectQServer/engineClone/rockSteady.cpp
C++
cpp
6,950
no_license
#include "rockSteady.h" #include "Project_Constants.h" #include <iostream> #include <vector> rockSteady::rockSteady() { std::cout << "rockSteady instatiated\n"; } rockSteady::rockSteady(std::vector<const sf::Texture *>& images_) : baseUnit(){ sprites = new std::vector<sf::Sprite>(); std::cout << "vector<sf::sp...
c630210c719139048117b099b9879a07a523121c
7079087141c8a9dd45bdebf0a4bbfcf277dafb0a
ElijahHyndman/vision_sdk
/vision_sdk/linux/src/system/sgxRenderUtils/car.cpp
C++
cpp
16,551
no_license
/* ******************************************************************************* * * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ * ALL RIGHTS RESERVED * ******************************************************************************* */ #include "sgxRender3DSRV.h" #include "jeep_obje...
b84d7128567513a6edf5049782205f73fddd2344
c54e17f890f70118a56e3d29f2bf355b32563a75
stubbi/nqs
/Test/Machine/layer_input_tests.hpp
C++
hpp
2,738
permissive
#include <fstream> #include <string> #include <vector> #include "Utils/json_utils.hpp" std::vector<nqs::json> GetLayerInputs() { std::vector<nqs::json> input_tests; nqs::json pars; // // // FullyConnected layer pars = {{"Graph", {{"Name", "Hypercube"}, {"L", 20}, {"Dimension", 1}, {"Pbc", ...
e9e3acf2558683d435a33c99243c57dffc37bd22
7b88670782c00a7158f285e494b7b595ae16e2ca
flomar/CrypTool-VS2015
/trunk/CrypTool/DlgCrtSecretSharingOptions.cpp
C++
cpp
5,836
permissive
/************************************************************************** Copyright [2009] [CrypTool Team] This file is part of CrypTool. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License a...
734e622e0455924027f025287ef6b4b08542c725
2eb1d85b1efed79e845a97011c87df2878d9e1bb
picmonkey/skia
/src/gpu/effects/GrOvalEffect.cpp
C++
cpp
15,909
permissive
/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrOvalEffect.h" #include "GrFragmentProcessor.h" #include "SkRect.h" #include "GrShaderCaps.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragme...
47df75caed8f2b76a47ee04f393b1fb76b9d283d
f0286f04f4b5675c3c44c4171cf3fcb3d5aeaa77
persmule/amule-dlp
/src/CanceledFileList.cpp
C++
cpp
3,485
no_license
// // This file is part of the aMule Project. // // Copyright (c) 2010-2011 aMule Team ( admin@amule.org / http://www.amule.org ) // // Any parts of this program derived from the xMule, lMule or eMule project, // or contributed by third-party developers are copyrighted by their // respective authors. // // This program...
e72877a8a2b88fe55c3df5865c0e30cd8944192f
b35313283f26758d88a798446e4d725b8114c8ea
ayushb666/Codechef
/chefAndRemissness.cpp
C++
cpp
449
no_license
#include <iostream> #include <math.h> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <list> #include <map> #include <string> #include <set> #include <deque> #include <numeric> #include <stdio.h> #include <iomanip> int main(){ int t; std::cin>>t; while(t--){ long n...
4998e83f82917eafb7c571b4c584111f86cef0b5
05a6818f31492fb59947cf70c72f412a4fc84e2f
gfreemancz/Playgroung01
/imaginarium01/imaginarium01/cTexture.cpp
C++
cpp
3,359
no_license
#include "stdafx.h" #include "cTexture.h" #include <iostream> #include "SDL.h" #include "SDL_image.h" #include "SDL_error.h" cTexture::cTexture(): TextureUnitUsed(0U), TextureID(0U), TextureDataPtr(nullptr), Widht(0U), Height(0U), DataFormat(GL_RGBA), WrapType_U(GL_REPEAT), WrapType_W(GL_REPEAT), F...
1e8772e203e2951925a500d70f73c3a8d39b987e
48dfc6b285f285816e616c6c12d39f59446e9263
sachinbs/DependencyAnalyzer
/Test_Executive/Test_Executive.cpp
C++
cpp
8,258
no_license
///////////////////////////////////////////////////////////////////// // Project#2: Type-based Dependency Analysis // // To create a Type-based dependency analyzer // // // // ## Created by using Prof. Jim Fawcett's 'CodeAnalyzer' ## // // ## project and augmenting it with 'Type An...
43b7eeb4d69448ab2e7afddfced0ecadab659a4c
f58a15149c6e00ea4d26ab0eb5304f8b9f52152d
guimeixen/VulkanRenderer
/VulkanRenderer/VKBase.cpp
C++
cpp
28,522
permissive
#include "VKBase.h" #include "VKUtils.h" #include <GLFW/glfw3.h> #include <iostream> #include <set> VKBase::VKBase() { instance = VK_NULL_HANDLE; debugCallback = VK_NULL_HANDLE; physicalDevice = VK_NULL_HANDLE; device = VK_NULL_HANDLE; surface = VK_NULL_HANDLE; swapchain = VK_NULL_HANDLE; enableValidationLay...
7b782cbf87f5e50e4990b426e87f0c5c1689e2f6
474cba48e878bf8a5e7186c310ebad63595692ac
sunnyps/chromium
/third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.cc
C++
cc
33,791
permissive
/* * Copyright (C) 2017 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
3448cfc3dd876434caecb1210bfd1af6f2251633
0b707f515a890cd17f078f4cc4fc8d1253d56a61
Larn0/XSEngine
/MyEngine1/d3dclass.cpp
C++
cpp
15,317
no_license
//////////////////////////////////////////////////////////////////////////////// // Filename: d3dclass.cpp //////////////////////////////////////////////////////////////////////////////// #include "d3dclass.h" D3DClass::D3DClass() { m_device = 0; m_commandQueue = 0; m_swapChain = 0; m_renderTargetViewHeap = 0; m...
05c245e867bb5dd74de97602863a93c65bfcee09
9e50cdcf6ab0def7e51b36d6805045d0aca6d999
housepower/ClickHouse
/src/Processors/Sources/MongoDBSource.cpp
C++
cpp
11,036
permissive
#include "MongoDBSource.h" #include <string> #include <vector> #include <Poco/MongoDB/Connection.h> #include <Poco/MongoDB/Cursor.h> #include <Poco/MongoDB/ObjectId.h> #include <Columns/ColumnNullable.h> #include <Columns/ColumnString.h> #include <Columns/ColumnsNumber.h> #include <IO/ReadHelpers.h> #include <Common...
0c3d7b7f072d5ed6ee385d3c10a67be933fdb1e9
210957e2865e6c9af10947f14066727b4d408c98
nicklatkovich/OOP-Lab09
/Vector.cpp
C++
cpp
1,413
no_license
#include "Vector.h" Vector::Vector() { delete[] coord; size = rand() % 6 + 2; coord = new int[size]; for (int i = 0; i < size; i++) { coord[i] = rand() % 19 - 9; } } Vector::Vector(const Vector & Copy) { delete[] coord; size = Copy.size; coord = new int[size]; for (int i = 0; i < size; i++) { coord[i] = ...
bc105e97e1f58c62bf065a78873a8abf3c3cc2d8
50a8615b3bf00513ba06dc0c22e5d5dfc6009251
JanakyMurthy/programmingPractice
/hackerrank/Algorithms/warmup/timeConversion.cc
C++
cc
750
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; /* Author: Janaky Murthy*/ int main(){ string time; cin >> time; int l = time.length(); string p = "PM"; string t = time.substr(l-2,2); bool pm = p.compare(t) == 0; if(pm) ...
f5c3916484fcfec33c08b544074ca645dfa4bbc6
b1601ef12e62eac01babf045198d824067c49574
brunolauze/openpegasus-providers-old
/src/Providers/UNIXProviders/InstRead/UNIX_InstReadProvider.cpp
C++
cpp
3,316
permissive
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
294df8ff2d5ba6896575a8c8a6651fd8bb62c833
e0093a25b494697bdac9f5b58559f77caa7e5c44
dongxiao92/ZenDNN
/src/cpu/aarch64/jit_sve_512_1x1_conv_kernel.hpp
C++
hpp
6,402
permissive
/******************************************************************************* * Modifications Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. * Notified per clause 4(b) of the license. *******************************************************************************/ /***************************...
0d06987e4a38517de676aa5b1e6a3c800b08964b
5f39c1c175474aea2e7496cee8b421790768a34c
zzy0119/emb1209
/apue/nettalk/c++/fun.cpp
C++
cpp
277
no_license
#include <iostream> #include <string.h> using namespace std; // 默认参数函数 必须在最后 void func(int n, int grade=100, string city="北京") { cout << n <<", "<< grade << ", " << city << endl; } int main(void) { func(1, 89, "新疆"); func(2); return 0; }
8a8b88560b0a5356fbf5699c79de6f89aa4e474b
17d37a7da0eb92740df3b8afb38aba66e7fc180a
haiderali2162/Word-Char-Counter
/src/WordCharCount.cpp
C++
cpp
1,164
no_license
#include "WordCharCount.h" #include <string> #include <iostream> #include <fstream> using namespace std; WordCharCount::WordCharCount() {} WordCharCount::WordCharCount(string fileName){ if(openFile(fileName)) { cout << "File Opened Successfully" << endl; } else cout << "Error while opening f...
d40103b855b3be9cefbace0a6d7bbade8b74e016
4a727de9a742c85536e3966e1ace68980720cd3e
MnSakibOvi/competitive-programming
/codeforces/B. Bogosort.cpp
C++
cpp
648
no_license
/// ***********************************************T /// O * *A /// O * Solved By : mn_sakib_ovi(DIU) *S /// v * Be Positive,be Happy. *I /// I * *I /// ***********************************************N ...
a2658bf69ad74254c875990ed223375e3ed4e2f9
4980714da324ce74548fea18c344d1d4391550c8
MarinaKim/Inheritance_Lab2105
/Project9/Students.cpp
C++
cpp
485
no_license
#include "Students.h" istream & operator >> (istream & is, Student & obj) { string s; getline(is, obj.name, '/'); getline(is, obj.sname, '/'); is >> obj.age; getline(is, s, ' '); getline(is, obj.address, '/'); getline(is, obj.group, '/'); getline(is, obj.subject); return is; } ostream & operator<<(ostream & ...
0d8c3147ef8d3684bff6cfc47994e29a2626d61c
7042591a5510178fddccd4c9167afc817fa38f0c
Yannayd/HW5
/FastDeliveryVehicle.cpp
C++
cpp
610
no_license
#include "FastDeliveryVehicle.h" #include <string.h> FastDeliveryVehicle::FastDeliveryVehicle(const char* ID, Quality quality) : DeliveryVehicle(ID, quality) {}; int FastDeliveryVehicle::performDeliveryDay(int* numberOfDeliveries) { int total_distance; DeliveryVehicle::performDeliveryDayInternal(numberO...
4dfb0338f43c0f6369350337a0cd07ca37a3bbc1
40a395856f19765770930d0e7829b25b981dd363
JanuszL/libcudacxx
/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
C++
cpp
5,723
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
620c4644e43b0b7c41351d7e0899b660cf62777c
33deb067e90aefca9c71fe4ea78a5caff1b841d0
dtc03012/My_Algorithm
/atcoder/ABC/191/C.cpp
C++
cpp
2,057
no_license
#include <bits/stdc++.h> using namespace std; typedef long long int lld; typedef pair<int,int> pi; typedef pair<lld,lld> pl; typedef pair<int,lld> pil; typedef pair<lld,int> pli; typedef vector<int> vit; typedef vector<vit> vitt; typedef vector<lld> vlt; typedef vector<vlt> vltt; typedef vector<pi> vpit; typedef vector...
d29865a069baabb6a622780d92a246afda9348d4
b6db47cf66e855678c74746007c7794a8414b061
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-9150.cpp
C++
cpp
2,398
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 { bool ac...
24fbf507f97b261220074af407f6f1b0463edc24
23c420c6b32887438e65d0693dcfbf00972394d2
HuangHaoHsu/MyCpp
/Serialize and Deserialize Binary Tree/main.cpp
C++
cpp
3,506
no_license
#include <iostream> #include <string> #include <sstream> #include <queue> #include <cstring> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ struct...
734fc8ddcaf87c339c1dd561a74a8f345b837152
ed74b1205e0c4bf6d5e65ac5b5793036b882f89d
lennonchan/OgreKit
/Ogre-1.9a/RenderSystems/GL/src/GLX/OgreGLXWindow.cpp
C++
cpp
22,131
no_license
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2012 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person obt...
3380b13c23c477fef4afeb9f4220ab546fb8a6aa
c2d27da4119cbac22e92af927f6f13e3fbbedb4d
randoruf/cpp
/acm/hdu/1896.cpp
C++
cpp
711
permissive
#include<bits/stdc++.h> using namespace std; #define sa(x) scanf("%d",&x) const int maxn = 10005; struct node{ int pos; int dis; bool operator < (const node a) const { if(pos == a.pos)return dis>a.dis; return pos>a.pos; } }g; int main(){ int T; cin>>T; while(T--){ pr...
c7e13079e1cd7d3f1b4c11196745e4c060c78c47
15310e4223333c88363fad7d78b2eef43847a94f
raphaeltrancoso/2048_cpp
/sokoban.hpp
C++
hpp
322
no_license
#include <iostream> #include <string> using namespace std; class sokoban { private: char** data; int largeur; int hauteur; int reachPoint; public: sokoban(string s); void play(); void drawGame(char* message); void moveUp(); void moveDown(); void moveLeft(); void moveRight(); int gameEnd(); ...
eb0d1587cd4da346f4d27220b6789898eef4c38f
839983129dceb988dfcf8de410f89ced5dd567de
sion1207/dcu-course-test
/vs-projects/chapter07/IntSetTest1.cpp
C++
cpp
868
permissive
#include <stdio.h> #include "InSet.h" int main (void) { IntSet s1, s2, s3; Initialize(&s1, 24); Initialize(&s2, 24); Initialize(&s3, 24); Add(&s1, 10); Add(&s2, 15); Add(&s1, 20); Add(&s1, 25); Assign(&s2, &s1); Add(&s2, 12); Remove(&s2, 20); Assign(&s3, &s2); printf("s1 = :"); Println(&s1); printf("s...
69b655b9ed51f02375e2894a871d11acfd891489
1137dab376ed9e3d086af3f73eb674e3d1bfafea
RuiOrey/UnrealEngineLearning
/Source/RuiTutorial/Private/Pickup.cpp
C++
cpp
942
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "RuiTutorial.h" #include "Pickup.h" APickup::APickup(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) { //Pickup is active as created bIsActive=true; //Create the root SpehereComponent to hand...
eb9111f08d920f7efa0c18e29e133786dd7cdcc2
a215354f0826c4369f2a0b2fe1ecd250491189f8
Yujeongju/baekjoon
/2583.cpp
C++
cpp
1,090
no_license
//2583 영역 구하기 #include <cstdio> #include <algorithm> #include <utility> using namespace std; int M, N, K; int arr[110][110], visit[110][110]; int cnt_arr[10010]; int cnt, result; int dx[4] = {0, 0, -1, 1}; int dy[4] = {1, -1, 0, 0}; void dfs(int x, int y){ visit[y][x] = 1; for(int i=0; i<4; i++){ int new_x = x+...
bbcb23d07078e8ec63f1c2371c5403404dcb4cdf
18d96e4040b916d2caff41a41c336857a87762db
SetLinux/Gavel-Engine
/GavelEngine/main.cpp
C++
cpp
3,674
no_license
#include "Engine/io/window.h" #include "Engine/graphics/graphics.h" #include "Engine/managers/renderpass_manager.h" #include "Engine/graphics/ibo.h" #include "Engine/graphics/vbo.h" #include "Engine/graphics/shader.h" #include "Engine/systems/render_system.h" #define IS_DOWN(x) (GetKeyState(x) & 0x8000 ) enum render_...
f83514632f2b4b355f0a2d228d489949f6ca4fc7
31f3c9cc27ca28d05da3b3bff4ec62cd60a24f16
envoyproxy/envoy
/source/common/config/xds_resource.cc
C++
cc
9,056
permissive
#include "source/common/config/xds_resource.h" #include <algorithm> #include "source/common/common/fmt.h" #include "source/common/http/utility.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" // TODO(htuch): This file has a bunch of ad hoc URI encoding/decoding based on Envoy's HTTP util // ...
9cb497880800c87f0577f4f1f46d1bf2b8a71662
48dbf4fff765c6334002555978d1ffcdd2aedd18
bergtholdt/ngraph
/src/ngraph/op/argmax.hpp
C++
hpp
1,834
permissive
//***************************************************************************** // Copyright 2017-2018 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
ed72ca07204702108b8e4a726e6e7734a7902c95
7ecaea35b653f15f60e5980db568acdf9befcb4c
gbonnanzio/CISC220Lab3
/problem0and1.cpp
C++
cpp
1,462
no_license
/* * problem0and1.cpp * * Geoffrey Bonnanzio and Nick Samulewicz * * problems related to question 1 of the lab */ #include "problem0and1.h" void rxSelectionSort1(char arr[], int len, int indx){ /* this function takes a character array, representing the * list to be sorted, as well as the length o...
9b352986fa6c32db8b574d32fcc4bd0f90aa01b9
05e837ff949098d074be235444076f815cdf90bb
KreasonAaronNaidoo/COMP315
/(2) Program/Astro Crisis/COMP 315/world.cpp
C++
cpp
2,762
no_license
// // world.cpp // COMP 315 // // Created by Kreason Aaron Naidoo on 2015/03/24. // Copyright (c) 2015 Kreason Aaron Naidoo. All rights reserved. // #ifdef __APPLE__ #include <GLUT/glut.h> char *s = "resources/universe.bmp"; #else #include <GL/glut.h> char *s = "resources\\universe.bmp"; #endif #include "world.h" ...
e242e190919d7600dd7f38d7461be69a7b30e43f
da4051c665d7e32671e4df8120e48658fec36301
srajang123/Competitive-Programming
/practice/PR003004.cpp
C++
cpp
877
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long void getDigitArray(ll n,vector<ll>&d1) { while(n) { d1.push_back(n%10); n/=10; } } ll dp[65][180][2]; ll getSum(ll i,ll s,ll msk,vector<ll>&a) { if(i<0)return s; if(dp[i][s][msk]!=-1 && msk!=1) return dp[i][s][...
f227a9bc29a214df1b598793058b6fe8b0733924
2c5bc22326c40cfcb3ca3cfd95d3a4d324d60cb7
SgtFlame/indiezen
/Zen/Studio/BrushModeling/I_RootLayout.hpp
C++
hpp
2,354
no_license
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ // IndieZen Game Engine Framework // // Copyright (C) 2001 - 2008 Tony Richards // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising...
4b8ec3b0679a49ccfdababa8dba17b0bb073c141
d8c3cc13ca463ee5ea34d4bfba1ff33856eec9c0
theodelrieu/mgs
/meta/include/mgs/meta/iter_value_t.hpp
C++
hpp
725
permissive
#pragma once #include <mgs/meta/concepts/detail/iterator_traits.hpp> #include <mgs/meta/detected/types/value_type.hpp> #include <mgs/meta/iterator_traits.hpp> #include <mgs/meta/readable_traits.hpp> namespace mgs { namespace detail { template <typename T, typename = void> struct iter_value : meta::readable_traits<T> ...
6b8519991612b235743ac39eded202aab4adfca3
29fa1446e0f5e6e3d8cf23eb34afe70177c52812
sj/fawkresrobotics-fawkes-copy
/src/plugins/ros/position_3d_thread.cpp
C++
cpp
5,015
no_license
/*************************************************************************** * position_3d_thread.cpp - Publish 3D Position to ROS * * Created: Wed Jul 16 17:04:42 2014 * Copyright 2014 Till Hofmann * ****************************************************************************/ /* This program is free soft...
5e7795758a7c3e6aa3e655676f008bc4749589d4
66837261343d7760e0b2ece497816ca9cddc3e78
tensorflow/tensorflow
/tensorflow/core/common_runtime/next_pluggable_device/direct_plugin_op_kernel.cc
C++
cc
5,521
permissive
/* Copyright 2022 The TensorFlow 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 a...
7a8dad0c61b957c20defe2179c1c7235eb972f98
4e4eef7e461189bb5c99c199cf170aa1d4f422b7
hitlqh/aliyun-openapi-cpp-sdk
/airec/src/model/ListInstanceTaskRequest.cc
C++
cc
1,250
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
054f2bd4748aa369be8960343b6edb0c0c15968e
dbbbe090de3cef1c7279cb16e6d4cedd8347a256
shinobu-x/cpp
/std/bind/bind_v1.cpp
C++
cpp
683
no_license
#include <functional> #include <iostream> template <typename T> struct type_t { type_t(T a) : a_(a) {} T get() { return a_; } T set(T a) { a_ = a; return a_; } private: T a_; }; template <typename T> T f(T a, T b) { return a+b; } template <typename T, T N> T doit() { type_t<T> t1(N); ...
5122300e8aa57e82736b2a359f51a6f5380a146f
562a0ff58704e2a8bd00b2b73e25949ef0754fd7
avandurmen0001/bluecoin
/src/qt/openuridialog.cpp
C++
cpp
1,221
permissive
// Copyright (c) 2011-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/openuridialog.h> #include <qt/forms/ui_openuridialog.h> #include <qt/guiutil.h> #include <qt/walletmodel.h> #i...
97ca17a4e54a2d1dd3cd3650367caa54d97ef909
cfed4a08f345c1f5a0643dd3b232f518c96cfa94
takahiro1127/LearningGo
/atcoder/practice/someSums.cpp
C++
cpp
458
no_license
#include<iostream> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int someSum = 0; for (int i = 0; i <= n; i++) { int p, q, r, x, y, z; p = i/10000; q = i/1000 - p * 10; r = i/100 - p * 100 - q * 10; x = i / 10 - p * 1000 - q * 100 - r * 10; y = i - p * 10000 - q * 1...
a8038b30add6f27cce7e5ff02e34beb8308bc509
6e37f27e73fd634e945f3709f25c53573b36a3b6
benpicco/spaceships
/src/spaceship.cpp
C++
cpp
3,192
no_license
#include "spaceship.hpp" #include "math_helper.hpp" static const float M_G = 0.00000000667408; SpaceObject::SpaceObject(float x, float y, SDL_Texture *texture, float weight) : mPosX(x), mPosY(y) { this->texture = texture; this->weight = weight; mVelX = 0; mVelY = 0; mAccX = 0; mAccY = 0; ...
a0a4368be156ce20e78a3e44a670df04b3cb4040
aa852684feab573f726971131572b0f512c95ff9
kareons777/ohsibuck
/Source/Practice3/Riend/TimeOfDayHandler.cpp
C++
cpp
828
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "TimeOfDayHandler.h" // Sets default values ATimeOfDayHandler::ATimeOfDayHandler() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTi...
2c6a6cbe15948411502b418f357149c8d5b9af4b
d13ba9710ecaef5d734c66773f6e8b1f5946a1ce
falgon/SrookCppLibraries
/srook/mpl/constant_sequence/iterator/index_sequence_iterator.hpp
C++
hpp
2,506
permissive
// Copyright (C) 2011-2020 Roki. Distributed under the MIT License #ifndef INCLUDED_SROOK_MPL_CONSTANT_SEQUENCE_ITERATOR_HPP #define INCLUDED_SROOK_MPL_CONSTANT_SEQUENCE_ITERATOR_HPP #include <srook/mpl/constant_sequence/algorithm/at.hpp> #include <type_traits> #include <utility> namespace srook { inline namespace mpl...
d099899f88e2d9da28113c60c89832efd466c97f
8eef4e65174b55c6403d84cfb9da8c9808a7cec3
adityasinghhh/coding
/puzzles/string_reversal_inplace.cpp
C++
cpp
231
no_license
#include<cstdio> #include<cstring> int main() { char a[10000]; int b; scanf("%s", a); int i, l = strlen(a)-1; for(i=0; i<l; i++, l--) { a[i] = a[i]^a[l]; a[l] = a[i]^a[l]; a[i] = a[i]^a[l]; } printf("%s\n", a); }
ede8e58a8f4242f4c8609e005bc0ee08624b2c65
bbe2a2bda59b52bd505f1fa7c2fe4e53338c7742
dlcksdud3579/Algorizm2
/Escape/MRNode.cpp
C++
cpp
273
no_license
#include "MRNode.h" MRNode::MRNode(int _nodeNum, Node* _valNode):Node(0,_nodeNum,0) { this->valNode = _valNode; } string MRNode::toString() { std::ostringstream ostr; ostr << this->nodeNum<<","<<this->valNode->toString(); return ostr.str(); } MRNode::~MRNode() { }
3899db95337848e326439e64316dc463c7b16d47
a81c53550f42e72d8d75470af2aa43e75614efd6
SmileLingyong/Code
/[offer-08]二叉树的下一个节点.cpp
C++
cpp
2,150
no_license
/** * Creation : 2019.03.18 14:00 * Last Reversion : 2019.03.18 14:40 * Author : Lingyong Smile {smilelingyong@163.com} * File Type : cpp * ----------------------------------------------------------------- * GetNext(二叉树的下一个节点) * 题目描述 * 给定一个二叉树和其中的一个结点,请找出中序遍...
540009243a6ac214beb6e6ef82193cb88bd21d92
8620496c6c55a82abeb8e83b190055f893544fd0
TencentCloud/tencentcloud-sdk-cpp
/cwp/src/v20180228/model/DescribePrivilegeRulesRequest.cpp
C++
cpp
3,401
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
5e55ce16df3697d590a67db5693c459d76b19f14
d355b1d5cdba76da7f432bab0356d52636290ff4
khoister/projecteuler
/problem014/problem014.cpp
C++
cpp
753
no_license
#include <iostream> #include <algorithm> #include <assert.h> unsigned long collatz_number(unsigned long n) { if (n < 1) return 0; unsigned long chain = 1; while (n != 1) { n = (n%2 == 0) ? (n>>1) : (n*3)+1; ++chain; } return chain; } int main(int argc, char* argv[]) { int limit = 1000000; if (argc > 1...
b017cb17757afa1246b8b75b49f32d7d7d7a94b1
0dfc0d0952480d40e9f874ec85ff9c5225a88721
tnakaicode/jburkardt
/fd1d_heat_explicit/fd1d_heat_explicit.cpp
C++
cpp
10,533
no_license
# include <cstdlib> # include <iostream> # include <iomanip> # include <fstream> # include <ctime> # include <cmath> using namespace std; # include "fd1d_heat_explicit.hpp" //****************************************************************************80 double *fd1d_heat_explicit ( int x_num, double x[], double t, ...
f178174169f14493be1a6d33e6b1222a80368adf
f9ad342c384a96799a25c5f286d8ad1b87ec33ee
btcup/sb-admin
/exams/2558/02204111/1/midterm/1_2_713_5820502574.cpp
C++
cpp
614
permissive
#include <iostream> using namespace std; int main() { int i,num,a,salar; num=0; for(i=1;i>0;i++) { cout<<"Enter employee ID and Salary :"; cin>>i>>salar; if(i==0 && salar==0 ) { break; } if(salar>=15000 ...
343ccacac432d9fd7a5793738c6120f27cc495bd
9d428cb7dc29fd279cd5c4abd85656759b2abc02
zsyfight/grid_map
/grid_map_pcl/test/test_helpers.cpp
C++
cpp
6,093
permissive
/* * common.cpp * * Created on: Nov 8, 2019 * Author: Edo Jelavic * Institute: ETH Zurich, Robotic Systems Lab */ #include "grid_map_pcl/GridMapPclLoader.hpp" #include <ros/package.h> #include "test_helpers.hpp" namespace grid_map { namespace grid_map_pcl_test { std::mt19937 rndGenerator; std::stri...
2e20d599b1b0d8e09f03dcd63e52621b6af75a09
ad4064eb7cdec051d82ea6e3fe8e0e66a281d77f
anamariadem/University
/Semester 2/OOP/ShoppingList/main.cpp
C++
cpp
203
no_license
#include "GUI.h" #include <QtWidgets/QApplication> #include "tests.h" int main(int argc, char *argv[]) { testDelete(); QApplication a(argc, argv); GUI w; w.show(); return a.exec(); }
1dfa2858387875a488e9a5a0c72cc05116ce5657
7ef640cac25054d75ae55db9cb88bec543d62951
eval1749/evita
/evita/io/io_context_utils.cc
C++
cc
985
no_license
// Copyright (c) 2014 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "evita/io/io_context_utils.h" #include <utility> #include "base/bind.h" #include "base/callback.h" #include "evita/dom/public/io_error.h" #include...
17c583230efde93144534b0d140acade665ab2ec
2f8c01c1065cc208e7aa65b3c6761ef96630766a
Trailblazer01010111/chromium
/chrome/common/component_flash_hint_file_linux.cc
C++
cc
7,672
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 "chrome/common/component_flash_hint_file_linux.h" #include <fcntl.h> #include <stddef.h> #include <stdint.h> #include <sys/mman.h> #include <me...
5ccc9623bd19a699b442ae18ecdcc5d1bbd1acfb
30eb55a20c80bfeb62c98a0f0698bce19de80713
ritik99/comp_code
/cf266b.cpp
C++
cpp
490
no_license
#include<iostream> #include<vector> using namespace std; int main(){ char arr[50]; int n, t; char temp; vector<int> vec; cin >> n >> t; for(int i = 0; i < n; i++){ cin >> arr[i]; } int time = 0; while(time<t){ for(int i = 0; i < n-1; i++){ if(arr[i] == 'B' && arr[i+1] == 'G'){ vec.push_back(i); ...
7019f70e8ae68d50f87552b7969d3a8b1e05df74
4250b0f1bbdd9f96c259a9287a5b83ac221b1f1b
MusharratTabassum/Codeforces-Solution
/I'm bored with life.cpp
C++
cpp
251
no_license
#include<bits/stdc++.h> using namespace std; int main() { int a,b,minimize; long long int p=1; cin>>a>>b; minimize=min(a,b); for(int i=1; i<=minimize; i++) p*=i; cout<<p<<endl; return 0; }
10c47527cb83ac612c47531593e323752c3325d6
6106d2acfc507fb948dfeafe97effeb7bdaa7781
Samsung/Castanets
/third_party/blink/renderer/platform/text/layout_locale.cc
C++
cc
8,713
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/platform/text/layout_locale.h" #include "base/compiler_specific.h" #include "third_party/blink/renderer/platform/lan...
f3d41f03d9687c88a3723e17317dd52c9c79eccf
595784087dabbc0b02ac3c71a422a725ff5b8fe2
salmandotexe/Codeforces
/Best Subsegment.cpp
C++
cpp
995
no_license
#include <bits/stdc++.h> #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector < vi > #define pii pair<int,int> #define pll pair<long long, long long> #define mod 1000000007 #define inf 100000000+5 #define all(c) c.begin(),c.end() #define mp(x,y) make_pair(x,y) #define mem(a,val) mem...
4e44d262cab064786343b9a9bb5bec03a83c52ff
91fbeb6d107c92338028a47df4a2171986508b73
VisualText/legacy
/visualtext3/PrefGeneralPage.cpp
C++
cpp
4,867
no_license
/******************************************************************************* Copyright (c) 1999-2010 by Text Analysis International, Inc. All rights reserved. *******************************************************************************/ // PrefGeneralPage.cpp : implementation file // #include "stdafx.h" #inclu...
e1d66b43529656351f83b30338e9713b4f7e0ff8
13d59eb0bf538a629bbb54fbf0f107ca0b548cb5
DeagleGross/C-Algo-Structures
/Data Structures/part1-04-nicequeue/tests/nice_queue_test.cpp
C++
cpp
2,348
no_license
//////////////////////////////////////////////////////////////////////////////// /// \file /// \brief Unit test for NiceQueue class /// \author Alexander Toptunov /// \version 0.1 /// \date 30.09.2018 /// This is a part of the course "Algorithms and Data Structures" /// provided by t...
f1ad188f31906e7352305934717fd2df27e072b6
9c892577668e0a69dc8a30f4532c01b4260d20b2
wwwonekey/QgisLidarPlugin
/gridindex.cpp
C++
cpp
2,286
no_license
#include <QFile> #include <QIODevice> #include <QTextStream> #include "gridindex.h" GridIndex::GridIndex(): mExtent(), mIndices (NULL), mRows(0), mCols(0), mCellSize(0) { } GridIndex::~GridIndex() { delete [] mIndices; } QgsRectangle const& GridIndex::extent() const { return mExtent; } const QList<quint32> *...
1f8897e8b713a133fbe1bf1e0c1a7dea0964ac9b
d6da31cd4c7c27e21b6159c98bd5251aa0e38a48
zy98/EasyCode
/AppConfig.cpp
C++
cpp
2,099
no_license
#include "AppConfig.h" #include <QFile> #include <QDataStream> #include <QApplication> AppConfig::AppConfig(QObject *parent) : QObject(parent) { //read m_Valid=read(); } AppConfig::AppConfig(QPoint point, QSize size, QFont font,bool fullScreen, bool chinese, bool autoWrap, bool sbBar, bool tbBar, QStringList...
e166027ba676780fb2dab0551e60e693239a622f
c2ca3ce11271ce2a9bf8e11ce36bc6b430624c1b
circuitar/Dimmer
/src/Dimmer.cpp
C++
cpp
8,081
permissive
/** @file * This is a library to control the intensity of dimmable AC lamps or other AC loads using triacs. * * Copyright (c) 2015 Circuitar * This software is released under the MIT license. See the attached LICENSE file for details. */ #include "Arduino.h" #include "Dimmer.h" #include <util/atomic.h> // Timer ...
655ed945043437be74ec94687d7a15b864e30797
e16a89bdbe06ed0035dbab6bd6066b9f1b38c104
eglrp/Open_DL_METU
/video/video.hpp
C++
hpp
427
no_license
// Copyright (c) 2015 Akin Caliskan. // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef OPEN_DL_METU_VIDEO_HPP #define OPEN_DL_METU_VIDEO_HPP #include <iostr...
c8cb9f753260685bfd5b7bb7a0ef2700ed806c85
c2c3fd517c3eac466747bab41a8792e9b808952e
Mrjarkos/2019_1_d3_prc4_CabuyaAlberto_C-rdenasJavier_RoncancioBrayan
/2019_1_d3_prc4_CabuyaAlberto_C-rdenasJavier_RoncancioBrayan/build-Bank-Desktop_Qt_5_12_3_GCC_64bit2-Debug/moc_bankofficial.cpp
C++
cpp
2,694
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'bankofficial.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.3) ** ** WARNING! All changes made in this file will be lost! *******************************************************...
f82b7fb9e47d794c940770e3f97b5cabfc298455
dd240c908daf08c6aca7efc91bce53cc63edcf9a
metux/chromium-suckless
/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
C++
cpp
48,090
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "modules/canvas2d/CanvasRenderingContext2D.h" #include "core/dom/Document.h" #include "core/fetch/MemoryCache.h" #include "core/frame/FrameView....
8448a5e3eb21a3b1631ef28921b955a5cb11cf88
7f1e47b198fcfbadb752af03ed9960589e40aa6d
ChaabaneHatem/Space-Invaders-II
/TP_Space_Invaders_II/Vaisseau.cpp
C++
cpp
621
no_license
#include "Vaisseau.h" #include <iostream> using namespace std; void Vaisseau::removeVaisseau() const { coord.gotoXY(coord.getPositionX(),coord.getPositionY()); cout << " "; } void Vaisseau::putVaisseau() const { coord.gotoXY(coord.getPositionX(),coord.getPositionY()); cout << char(18); } Vaisseau::Vaisseau() {...
dec21f4e34c9c8174b3c4fa92890dbcb7a415d58
9619862fe28434b9deba88720052b1dcd9b3b31b
XingSong/Project
/Nvi/test.cpp
C++
cpp
659
no_license
#include <iostream> #include <cstdlib> using namespace std; class Base { public: void Foo() { // cout << "Locking" << endl; DoFoo1(); DoFoo2(); // cout << "UnLocking" << endl; } protected: virtual void DoFoo1() { cout << "Base's DoFool" << endl; } virtual void DoFoo2() { cout << "Base's DoFoo2" << en...
06a269ba898d62747cf5204f2346b0970da09419
3110123dd94a287640bb59a15b88dd6a664502b4
DebarghaG/AutonomousVehicle-Hardware
/ComputerVision-Benchmarking/GPU-Programs/cascadeclassifier.cpp
C++
cpp
8,547
no_license
// WARNING: this sample is under construction! Use it on your own risk. #if defined _MSC_VER && _MSC_VER >= 1400 #pragma warning(disable : 4100) #endif #include <iostream> #include <iomanip> #include "opencv2/objdetect.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/cudaobjdetect....
ce498c70706c6fd21137af028b8a874696c560f8
e63ad043b0dd53583167c824e0da37d7494a7019
pes-magic/procon
/AtCoder/AGC028/B.cpp
C++
cpp
771
no_license
#include <iostream> #include <vector> using namespace std; const int MOD = 1000000007; int main(){ const int maxSize = 100001; vector<long long> inv(maxSize); vector<long long> invSum(maxSize); vector<long long> fact(maxSize); vector<long long> factInv(maxSize); for(int i=0;i<2;i++) inv[i] = fact[i] = in...
a1daef830ec748d27869c4acd80b61611645037f
1d624e9dee5b588da06ea01ce568bc627017358a
fakeenemy01/Speedo
/AndroidClient/Box2D/Collision/b2BroadPhase.cpp
C++
cpp
3,267
permissive
/* * Copyright (c) 2006-2009 Erin Catto http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * i...
3dafea01bd22c0a517d0cb0639b00abf64bb475f
2f58232692094848aba2b2467a53373bd5c222dc
sseidel16/ByzantineIson
/app/src/main/cpp/synthesizer.cc
C++
cc
13,593
no_license
/* * Copyright 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
99c8f7f0820429230e8707484f0170c23b8d43e9
9f692cdeac2630e41dbdf1f6e3a339375d8f8c48
silicon-lang/silicon
/src/CodeGen/CGNode.cpp
C++
cpp
713
permissive
// // Copyright 2021 Ardalan Amini // // 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...
b3a6e27780d3bc6bda36c939b88bcf4c25a39ec5
ffd1f0e5d60a18550f01908819a1cf278e1cd55e
fabpot/hhvm
/hphp/runtime/ext/mcrouter/ext_mcrouter.cpp
C++
cpp
16,436
permissive
#include "hphp/runtime/ext/extension.h" #include "hphp/runtime/base/execution-context.h" #include "hphp/runtime/base/array-init.h" #include "hphp/runtime/base/builtin-functions.h" #include "hphp/runtime/base/tv-refcount.h" #include "hphp/runtime/vm/native-data.h" #include "hphp/runtime/ext/asio/asio-external-thread-eve...
4c25466c0edcafb21e9a7cba82d9a7abb706832c
236e154e64d555e2d459115e10ac5786b8a2bc7e
beemfx/Beem.Media
/Misc/DBXExporter/DBXExporter/oedbx/library/dbxFileInfo.cpp
C++
cpp
1,786
no_license
//*************************************************************************************** #define AS_OE_IMPLEMENTATION #include <oedbx/dbxFileInfo.h> //*************************************************************************************** DbxFileInfo::DbxFileInfo(InStream ins, int4 address, int4 length) { init(); A...
bd87f8adb764c1322b85c2e71b2bcf4b82843e0f
3d2eef368bc3bc365d823871d2aee01ff53fe535
TikiTek/mechanica
/engine/modules/core/base/include/tiki/base/library_types.hpp
C++
hpp
385
no_license
#pragma once #include "tiki/base/types.hpp" #if TIKI_ENABLED( TIKI_PLATFORM_WIN ) # define TIKI_LIBRARY_EXPORT_METHOD __declspec( dllexport ) # define TIKI_LIBRARY_IMPORT_METHOD extern __declspec( dllimport ) #elif TIKI_ENABLED( TIKI_PLATFORM_LINUX ) # define TIKI_LIBRARY_EXPORT_METHOD extern # define TIKI_LIBRARY_IM...
c69bcdbbe830c6acb6fc77b30d634f2ecacca256
555a63fa2511107b6e91152335572da1d1dc6c26
liamh17/JudgeRobot2015ManualLift
/RPiVision/src/targetTracker.cpp
C++
cpp
788
no_license
// File: targetTracker.cpp // Date: 9/3/2013 // Auth: K. Loux // Desc: Target tracker implementing SIFT a la openCV. // Local headers #include "targetTracker.h" // Constructor TargetTracker::TargetTracker() { } bool TargetTracker::Train(const std::string &imageFileName) { // TODO: OpenCV stuff here // One rea...
92d2e517566870a76ad05a54f434521cdb9335ac
1cb4879886434e12b74a4a8841ae7f2952e0b6b5
mhcchang/chromium30
/src/chrome/browser/ui/ash/chrome_shell_delegate.cc
C++
cc
16,507
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/ash/chrome_shell_delegate.h" #include "apps/shell_window.h" #include "ash/ash_switches.h" #include "ash/host/root_window_...
f3139a3dd6c64eafba15b1020cd6b2c10fb9cfba
673239dfa96bbb8cb6944375867daf698551adff
Evolution-X/frameworks_native
/services/surfaceflinger/main_surfaceflinger.cpp
C++
cpp
5,927
permissive
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
4d924bcb5edcdd23b45ba2c8cce5e4058b4ac333
a93db0148d94f8046246e9f182daffd1e8fb3c15
ArutoriaWhite/Competitive-programming
/uva839.cpp
C++
cpp
392
no_license
#include<iostream> using namespace std; int sagiri() { int w1, d1, w2, d2; cin >> w1 >> d1 >> w2 >> d2; if (w1==0) w1 = sagiri(); if (w2==0) w2 = sagiri(); if (w1<0 || w2<0 || (w1*d1!=w2*d2)) return -1; return w1+w2; } int main() { bool fir=1; int T; cin >> T; while (T--) { if (fir) fir=0; else cout <<...
54317e4988b20d4c09cc4e2d84e1763151747bbb
926635c4b166bb1311c2096201038faece73f2f6
0x414c/cxx-snippets
/sources/utils/algorithms/summator.hxx
C++
hxx
10,762
no_license
#ifndef UTILS_ALGORITHMS_SUMMATOR_HXX #define UTILS_ALGORITHMS_SUMMATOR_HXX #include <ostream> // std::ostream #include <type_traits> // std::{is_arithmetic_v, is_floating_point_v, is_integral_v} #include "../meta/choose.hxx" // ChooseT #include "../meta/if-then.hxx" // IfThen namespace Utils { /** * @bri...
e6cb02dfe5abf4d941cff48a8e1ecd12ac18efdf
dbf8c7940f61df59e7f0974f32ba802d8b252c44
Skywalker666666/Pi_Map
/Sonar/sonar_mapping.cpp
C++
cpp
11,664
no_license
//============================================================================ // Copyright : PerceptIn //============================================================================ #include <iostream> #include <fstream> #include <iomanip> #include <sys/time.h> #include <glog/logging.h> #include <nanomsg/n...
3f8c80ad2d3ac336a5f210168cfb2d77e1f28f0b
a227fe19abba84f424c9e57366e05d26e4923c71
WalteR-MittY-pro/Gazebo-MPI
/gazebo7_7.14.0_exercise/gazebo/gui/building/LevelWidget.hh
C++
hh
2,680
permissive
/* * Copyright (C) 2012 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
93b3c1feb0321aaa480fcf34c6e40e3803eb5d4a
5b68691a3f574a2a90bed4e01d0b6cf0e78e4853
deadlymonkey/Crypto-Fall14
/references/atm.cpp
C++
cpp
12,760
no_license
/** @file atm.cpp @brief Top level ATM implementation file */ #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <stdlib.h> #include <stdio.h> #include <fstream> #include <streambuf> #include <iostream> #include <string> #includ...
21a8302ec2bdfe3cd7b35e2919935953d4d51c5d
f960bcecad0c92ca0c015d616752e93a83058024
SirTobias/DMPCRobotSimulation
/simulatoren_extern/qwt/src/moc/moc_qwt_picker.cpp
C++
cpp
12,447
permissive
/**************************************************************************** ** Meta object code from reading C++ file 'qwt_picker.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1) ** ** WARNING! All changes made in this file will be lost! **********************************************************...
5ce3d2ffe028345facc6528a8906f63a52cbe2d4
62c0b949aa93f5c71884c6fc14ed9566831a5bba
lachesis/bitcoin
/src/qt/csvmodelwriter.cpp
C++
cpp
1,602
permissive
#include "csvmodelwriter.h" #include <QAbstractItemModel> #include <QFile> #include <QTextStream> CSVModelWriter::CSVModelWriter(const QString &filename, QObject *parent) : QObject(parent), filename(filename) { } void CSVModelWriter::setModel(const QAbstractItemModel *model) { this->model = model; } voi...
ab8f755da5dfd72eaf1f73ec4afbdf854858f94b
21c1ec16b6f16573345bf27062abe6c0fa8f4080
yangcancai/coro
/include/coro/Socket.hpp
C++
hpp
2,800
permissive
/* * Copyright (c) 2013 Matt Fichman * * 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, publis...
454d03fa979c71791591712ce2b0440050439de0
66068b8b90f028d79e5d391c3bb6abd3c8bd4d62
youtube/cobalt
/starboard/shared/stub/media_is_buffer_pool_allocate_on_demand.cc
C++
cc
711
permissive
// Copyright 2018 The Cobalt Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
6b15bd3c600080442af87369b6cdbdbdeb8cbd03
d7c4f07719500dcc5225d23cff7111d4134d7eef
bkianmajd/image_recognition
/source/components/poker/statistics/deprecated/cache_manager_deprecated/cache_manager_test.cpp
C++
cpp
3,432
no_license
#include "components/poker/statistics/cache_manager/cache_manager.h" #include <iostream> #include <unordered_set> #include "gtest/gtest.h" namespace poker { namespace statistics { namespace { const std::string kBinaryDir = "components/poker/statistics/cache_manager/binary_data"; const std::string kPreFlopTestDa...
6a8674cd191e46a34c60db84f877d11a1e540899
b2c52bd9dfa1f1ee4ff8f3080346a2e692db6e0b
luizalexandrewarchive/URIOnlineJudge
/ATV/1060/main.cpp
C++
cpp
244
no_license
#include <iostream> #include <stdio.h> using namespace std; int main(){ int cont = 0; float lista[6]; for (int i = 0; i < 6; ++i){ cin >> lista[i]; if (lista[i] > 0){ cont++; } } cout << cont << " valores positivos" << endl; }
f5757cb9d21e1559e08c3cdd82ab8514904123cb
bd810a680924c13e3c2e8c7cf2b2f98026c10ddc
novakale/openvino
/src/core/include/openvino/op/hard_sigmoid.hpp
C++
hpp
1,077
permissive
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "openvino/op/op.hpp" namespace ov { namespace op { namespace v0 { /// \brief Parameterized, bounded sigmoid-like, piecewise linear /// function. min(max(alpha*x + beta, 0), 1) /// /// \ingrou...