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 |
|---|---|---|---|---|---|---|---|---|
52b47faa0ebf5346a6bccd40e209b2027586e9e5 | 6f68ccf23e302f40d3c3b77b371928ff76543505 | demastri/RobotWork | /Godzuki.net/RobotSketches/TestingAndHardware/InputRouter/SimpleObject.cpp | C++ | cpp | 1,563 | no_license | #include <Arduino.h>
#include "SimpleObject.h"
SimpleObject::SimpleObject() {
instanceID = -1;
}
void SimpleObject::setup(int thisID, CommandRouter *router ) {
instanceID = thisID;
if( router != 0 )
setupCommandListener( *router );
}
void SimpleObject::teardown(CommandRouter *router) {
if( router != 0 )
teard... |
5973423291c2d8eb4b698dfc33690b41a91f5400 | dfe956d1a258929a0ed8ff6d53e71a9d68ba1071 | flatz/gttool | /src/btree.cpp | C++ | cpp | 2,316 | no_license | #include "btree.hpp"
#include "volume.hpp"
void StringKey::dump() const
{
std::string str(value(), length());
std::cout
<< "Length: " << str.length() << std::endl
<< "Value: " << str << std::endl
<< std::endl;
}
StringBTree::CallbackResult StringBTree::traverseCallback(const uint8_t* data) const
{
CallbackRe... |
c1818f36e94147e4fe78fc5adbdfec88a9640de8 | 8385e8caaf2e79882e1ceb72567b2f4edde1b497 | icburrito/UE4-AWS-GL-ServerSDK | /IoniasCall/Source/IoniasCall/Private/IoniasCallCharacter.cpp | C++ | cpp | 5,305 | no_license | // Copyright Epic Games, Inc. All Rights Reserved.
#include "IoniasCallCharacter.h"
#include "HeadMountedDisplayFunctionLibrary.h"
#include "Camera/CameraComponent.h"
#include "Components/CapsuleComponent.h"
#include "Components/InputComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "GameFram... |
b5de6eb7e2ce4811178b4466eef9f02d694cd5ed | f9b99ef61cfd235aa1d4e4f5520403d03bdf06bf | valenishen/ValenMeicellaIshen_FOP2020 | /Lab06/Q2.cpp | C++ | cpp | 408 | no_license | #include <iostream>
using namespace std;
int main() {
//Variable Declaration
int i, j, k;
//Display Request Input
cout << "Multiplication Table\n"
<< "What number = ";
cin >> k;
//Make looping condition based on the input
for (i = 1; i <= k; i++){
for (j = 1; j <= k ; j++... |
5ccb148abd734bec6df2827de1c2947eae9753af | dc207b0c6c88959439c1d6c56d7dc60c8016fb1f | EnjoyHacking/ChromiumGStreamerBackend | /media/audio/audio_input_controller.cc | C++ | cc | 25,545 | 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 "media/audio/audio_input_controller.h"
#include "base/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_r... |
d75b0439cf394853587161aa26d243455656a939 | df671cf2fec680b30a0d67e55c5eadbda8fce87f | joker-eph/nt2 | /modules/core/euler/unit/scalar/dawson.cpp | C++ | cpp | 2,418 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
fb469977418c44791222ca89eb0d55b266a8b42f | 186399c8934e96f214bef7f19dbf67fc0e20269b | prasang-gupta/competitive-programming | /hackerrank/interview-preparation-kit/dictionaries_and_hashmaps/count_triplets.cpp | C++ | cpp | 429 | no_license | // Complete the countTriplets function below.
long countTriplets(vector<long> arr, long r) {
map <long, long> right, left;
long count = 0;
for (int i = 0; i < arr.size(); ++i){
right[arr[i]]++;
}
for (int i = 0; i < arr.size(); ++i){
right[arr[i]]--;
if (arr[i]%r == 0){
... |
38331037ac209d0e0cb6af40dcaec5d99a9d0aa3 | 0a0133a81e3df84f24f142f57b8d4ae27a5c38ad | kangli-bionic/competitive_prog | /UVAONLINEJUDGE/10765_1.cpp | C++ | cpp | 1,726 | no_license | #include <iostream>
#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <queue>
#include <stdlib.h>
#include <set>
#include <algorithm>
#include <math.h>
#include <stdio.h>
#include <unistd.h>
#include <stack>
#include <sstream>
#include <iomanip>
#include <bitset>
#define M_PI 3.141592653589... |
75bc617eaf148e6d5367ed486a40520d2dd2aa0a | 4d7174b0a4342012b3f38d35b286da6c2f0024d0 | anubhav253/DS-using-c-plusplus | /Tree.cpp | C++ | cpp | 5,398 | no_license | #include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
class Node{
private:
int val;
Node* left;
Node* right;
public:
Node(int v){
val=v;
left=NULL;
right=NULL;
}
void setVal(int v){
val = v;
}
int getVal(){
return val;
}
void setLeft(Node* l){
left=l;
}
... |
3fcbd0556e81c9d75db35c294916a782273cd6c1 | bd0eec064c898a8fb03d816dfb0f815b0a36cf5e | imulan/procon | /aoj/vol27/2769.cpp | C++ | cpp | 1,482 | no_license | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pa... |
40f8031cda6811fe9db0ad7aa9781e914863dacf | 515c73b0c7f8dc2ee5820c94466dcc70caf83e8d | arthurherbout/crypto_code_detection | /data/code-jam/files/635102_sdya_706485_0_extracted_Solution.cpp | C++ | cpp | 1,595 | no_license | #include <iostream>
#include <string>
#include <string.h>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
using namespace std;
int n;
int a[500][500], b[500][500];
void solve(int test)
{
for (int i = 0; i <= 450; i ++)
for (int j = 0; j <= 450; j +... |
02536fe3c1286b3b5d11ccf31f327b242e8a007e | ae41747ca7c8d6950887a5ca36cb82a0d57effdf | ric2b/Vivaldi-browser | /chromium/chrome/browser/ash/policy/networking/euicc_status_uploader_unittest.cc | C++ | cc | 17,377 | permissive | // Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/policy/networking/euicc_status_uploader.h"
#include "ash/constants/ash_pref_names.h"
#include "base/json/json_string_value_serializer.h"
#include ... |
613c649b8e9a2fe1a1797e75d416121c2719ec69 | 314a742f9cafcb151484bbbe29d31b84285f3fb5 | sh4nnu/clang | /lib/Driver/ToolChains/FreeBSD.cpp | C++ | cpp | 14,298 | permissive | //===--- FreeBSD.cpp - FreeBSD ToolChain Implementations --------*- C++ -*-===//
//
// 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
//
//===---------------------------... |
13e4938d1843f15cf9191f210f29591bf24849ed | 082d00bdef9f501c81460108f7e508518ad48600 | sangramga/coding- | /hackerrank/csindia/above-average.cpp | C++ | cpp | 1,012 | no_license | #include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <c... |
7fc570f86eac377aed83ab34c880b41ffa96f8d6 | 7a0674b4f62348c291e80fba770d83612f587743 | ashleygwinnell/firecube | /FireCube/Audio/SoundEmitter.cpp | C++ | cpp | 10,543 | permissive | #include "Audio/SoundEmitter.h"
#include "Audio/Sound.h"
#include "Core/Engine.h"
#include "Audio/Audio.h"
#include "SoundDecoder.h"
using namespace FireCube;
const int EXTRA_DECODED_SAMPLES = 4;
SoundEmitter::SoundEmitter(Engine *engine) : Component(engine), sound(nullptr), looped(false), gain(1.0f), panning(0.0f),... |
65a1e5970e1ee2a6b631409a6ea6568254d87a03 | 3119ab665eebbd8bd4b43dbcde77147d8306747a | one-diary/Facebook-Hacker-Cup | /2021/Qualification Round/consistency_Xs_and_Os.cpp | C++ | cpp | 1,941 | no_license | #include <bits/stdc++.h>
using namespace std;
bool impossible(vector<int>& rows, vector<int>& cols) {
for (int i=0; i<rows.size(); i++)
if (rows[i]!=-1 || cols[i]!=-1)
return false;
return true;
}
int posmin_vector(vector<int>& vec) {
int mn = vec.size();
for (int& x: vec)
... |
32da67453926d36db3f5ebdda0a4f2c1b95f39d2 | 28c1e87a9af1286b382c82cfd822b9678643be7e | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE122_Heap_Based_Buffer_Overflow/s01/CWE122_Heap_Based_Buffer_Overflow__cpp_CWE193_char_memmove_83a.cpp | C++ | cpp | 2,192 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE193_char_memmove_83a.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE193.label.xml
Template File: sources-sink-83a.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: All... |
2d82a46ada75518291e40441e7c6ca7556393e61 | 497f4d521a8e8dfbcca0ebd12016168a1f0bd17f | zillemarco/Anima_Old | /AnimaEngine/AnimaMappedValues.cpp | C++ | cpp | 40,402 | no_license | //
// AnimaMappedValues.cpp
// Anima
//
// Created by Marco Zille on 26/11/14.
//
//
#include "AnimaMappedValues.h"
#include "AnimaDataGeneratorsManager.h"
#include "AnimaShaderProgram.h"
#include "AnimaScene.h"
#include "AnimaXmlTranslators.h"
BEGIN_ANIMA_ENGINE_NAMESPACE
AnimaMappedValues::AnimaMappedValues(Ani... |
6f9e9740cafdbe1107232fa69d23f5aaec65c193 | b6f8068ed9a8e3765f5af330f26b96157fbd9db6 | hitomi4vv/aizu-online-judge | /introduction/ITP1_10_C-Standard Deviation.cpp | C++ | cpp | 303 | no_license | #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
int n;
while(cin >> n, n != 0) {
double s[1001], m = 0, sum = 0;
for(int i = 0; i < n; i++) cin >> s[i], m += s[i], sum += s[i]*s[i];
m /= n;
cout << sqrt(sum/n-m*m) << endl;
}
return 0;
}
|
e1a2e2d06a78fb68cf524489b14b752d671e616f | 61d74f28db6582ae9e4450a8e8c64da672f65c78 | filipsajdak/LearningCpp | /Design patterns/Null Object/NullObject.cpp | C++ | cpp | 2,885 | permissive | #include <gmock/gmock.h>
#include <vector>
#include <functional>
#include <algorithm>
using namespace ::testing;
namespace {
struct Name {
std::string first_name;
std::string last_name;
constexpr bool operator==(const Name& rhs) const noexcept {
return std::tie(first_name, last_name) == std::tie(rhs.first... |
bc62dd8ac981c9aa81051ef8f50f462a2252d1bb | a13972fc6bc3a4986698ec9b843fd8504f19a214 | robcog-iai/URoboSim | /Source/URoboSim/Private/AJointActor.cpp | C++ | cpp | 2,440 | permissive |
#include "AJointActor.h"
#include "URoboSimGameInstance.h"
#if WITH_EDITOR
#include "Editor/EditorEngine.h"
#endif // WITH_EDITOR
AJointActor::AJointActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
J... |
a81e432c058f8e37cc78a5b14934b34ad08f37a4 | 2eca7efe1cc1d75aef6643f99dacc426cc85be4a | fuentead/recovery | /sql/runtimestats/sscpipc.cpp | C++ | cpp | 29,601 | permissive | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// (C) Copyright 2006-2014 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You m... |
2def4edddc3a9b439bd78260e5bdde6a107400d0 | 6f9eae971844d4507489caff1550a6184e2c964e | ZX1209/past1 | /STLlist.cpp | C++ | cpp | 362 | no_license | #include<iostream>
#include<list>
using namespace std;
int main()
{
list< int > mylist(5,100);
mylist.push_front(-13);
mylist.push_back(300);
list<int>::iterator p = mylist.begin();
mylist.erase(p);
for(p=mylist.begin();p!=mylist.end();p++)
{
cout<<* p<<" ";
}
cout<<endl;
cout<<myli... |
2f29ef27535c2bc29fa8e11f7ff0ae0583eca572 | 49bbd33f3f1ec96be8df8d29cf87f59dc638edb1 | KnightMareWolff/INSRT-Legacy | /src/INSGL/IGL_FunctionsPCv30.cpp | C++ | cpp | 13,903 | no_license | #include "IGL_FunctionsPCv30.h"
#ifdef Q_OS_WIN
CIGLFunctionsPCv30::CIGLFunctionsPCv30(QOpenGLContext *pContext, int iVersao, int iMajor, int iMinor)
{
iIGLVersion = iVersao;
iIGLMinorVersion = iMajor ;
iIGLMajorVersion = iMinor ;
bIGLSuportaFeedback = false;
bIGLSuportaShaders = fals... |
27996c471df90df1a7f98ad3d0cbaa7160d27ee1 | 9ef7d29c1ef0da0f498b00666bc307f0eb2ceabb | smmzhang/esdg-opencl | /clover/src/core/devices/cpu/device.cpp | C++ | cpp | 17,149 | no_license | /*
* Copyright (c) 2011, Denis Steckelmacher <steckdenis@yahoo.fr>
* 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
* ... |
73ef930764a1d068b550d6c7d2d7691b854c2135 | 353ae52d7518fd1e1177cdd0bc6dd094effb153a | myl2232/ArmyEngineSimulation | /Source/Army/Private/WHCMode/SArmyWHCModeSideBoardAttr.cpp | C++ | cpp | 1,072 | no_license | #include "SArmyWHCModeSideBoardAttr.h"
#include "ArmyShapeTableActor.h"
#include "ArmyStyle.h"
FArmyWHCModeSideBoardAttr::FArmyWHCModeSideBoardAttr(TSharedRef<class SArmyWHCModeAttrPanelContainer> InContainer)
: FArmyWHCModeAttrPanel(InContainer)
{}
void FArmyWHCModeSideBoardAttr::TickPanel()
{
}
void FArmyWHCModeS... |
f36ad7c83a663561d806ae6b07dc61cab1232791 | b8e485d965f7a51aa6864b6c80361b39b2f24222 | rlch/flutter-webrtc | /windows/third_party/uuidxx/uuidxx.cc | C++ | cc | 2,979 | permissive | #ifdef _WIN32
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#endif
#include "uuidxx.h"
#include <random>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
using namespace std;
using namespace uuidxx;
bool uuid::operator == (const uuid & guid2) const
{
return memcmp(&guid2, this, ... |
4b397f1a6b6f8466c5f7a9687a22527b2a3b2bbe | 44e7f54aae1d5ab3cc1d2689cf97bd90587247d2 | PhilMiller/vt | /tests/unit/mapping/test_mapping_registry.cc | C++ | cc | 4,209 | permissive | /*
//@HEADER
// ************************************************************************
//
// test_mapping_registry.cc
// vt (Virtual Transport)
// Copyright (C) 2018 NTESS, LLC
//
// Under the terms of Contract DE-NA-0003525 with NTESS, LLC,
// the U.S. Go... |
d940423c12b69b44392733442bc3c52519dcf707 | 8259f8313ca71590149f559f3d8ad73f1c7d6b4c | sirraghavgupta/cpp-data-structures-and-algorithms | /problems/GREEDY_defenceOfKingdom.cpp | C++ | cpp | 1,077 | no_license | /*##############################################################################
AUTHOR : RAGHAV GUPTA
DATE : 13 october 2019
AIM : see the screen shots
STATUS : !!! success !!!
##############################################################################*/
#include <bits/stdc++.h>
using namespace std;
int main... |
eaae7f7f3bace6e066650387bcd8dccdcdd1ffc2 | 5281b0f93a95a0fd10bdfe43e162146f25117bde | EduardoGRocha/duckdb | /tools/pythonpkg/src/pyconnection.cpp | C++ | cpp | 19,563 | permissive | #include "duckdb_python/pyconnection.hpp"
#include "duckdb_python/pyresult.hpp"
#include "duckdb_python/pyrelation.hpp"
#include "duckdb_python/pandas_scan.hpp"
#include "duckdb_python/map.hpp"
#include "duckdb/common/arrow.hpp"
#include "duckdb/parser/parsed_data/create_table_function_info.hpp"
#include "duckdb/main/... |
613103146a5f71789d25f51729f07ae5803d8bc7 | a0444626b4b6dfa0467a40ff94f34d4ca741d9c6 | adamkglaser/B3D | /source/src/B3D_cudaCompress/profiler/profilerstreamwriter.cpp | C++ | cpp | 4,653 | permissive | /*************************************************************************************
Simple Runtime Profiler
Author: Marc Treib
(c) Marc Treib
mailto:treib@in.tum.de
Last Changed: 2013-04-10
*************************************************************************************/
#include "profilerstreamwriter.hp... |
b28236d37286c541e3f5cc632bb9b3ed843817f7 | 067b047879d8edc571a2a39a91574f24ec979b8a | mgomezch/Tajada | /tajadac/Tajada/Code/Intermediate/Instruction/Multiply.hh | C++ | hh | 1,746 | no_license | #ifndef TAJADA_CODE_INTERMEDIATE_INSTRUCTION_MULTIPLY_HH
#define TAJADA_CODE_INTERMEDIATE_INSTRUCTION_MULTIPLY_HH
#include <string>
// Superclasses:
#include "Tajada/Code/Intermediate/Instruction/Instruction.hh"
#include "Tajada/Code/Intermediate/Address/Address.hh"
#include "Tajada/Code/MIPS/Instruction/Instruction... |
b88e96f7afd8c264d2388bbcb04d791001a7960f | a30216bc366b5ee3075d47a17d3f54a4794f1190 | waaberi/chromium | /third_party/blink/renderer/core/layout/ng/grid/ng_grid_track_collection.cc | C++ | cc | 22,016 | permissive | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/layout/ng/grid/ng_grid_track_collection.h"
#include "base/check.h"
#include "third_party/blink/renderer/platfor... |
3f1123ecc97fefc384f617ff2ec73a83830a2738 | 67f417685e0978bfa192c54a478fcdaaf380f84b | Capri2014/math | /stan/math/rev/mat/fun/initialize_variable.hpp | C++ | hpp | 1,085 | permissive | #ifndef STAN_MATH_REV_MAT_FUN_INITIALIZE_VARIABLE_HPP
#define STAN_MATH_REV_MAT_FUN_INITIALIZE_VARIABLE_HPP
#include <stan/math/rev/meta.hpp>
#include <stan/math/prim/mat/fun/Eigen.hpp>
#include <stan/math/rev/core.hpp>
#include <vector>
namespace stan {
namespace math {
/**
* Initialize variable to value. (Functi... |
4b313fa5ff27e8fb89310ffabab39d9bc7c8cb40 | b6555fff810573d3dd057c371ceb45e486a7af27 | IamBikramPurkait/My-CP-Journey | /GFG/CPP STL/15 - Strings and more/implement_strstr.cpp | C++ | cpp | 449 | permissive | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
int strstr(string, string);
int main()
{
int t;
cin >> t;
while (t--)
{
string a;
string b;
cin >> a;
cin >> b;
cout << strstr(a, b) << endl;
}
}
// } Driver Code Ends
//Function to loc... |
501e7abc1e6428818cdb423291e4f628c4d4f0e2 | e4fce2ddc0e33e2c1531614d9563fb20177bdaa3 | Liamplusplus/Workflow | /purge/main/copyright.cpp | C++ | cpp | 886 | no_license | //Copyright Wed Feb 15 21:47:29 2017, Liam Rogers, All rights reserved.
/*
* Creates file that acknowledges owner of project.
* CTK will look for this file everytime a new source file
* is added to the project.
*/
#include <project/CppProject.hpp>
#include <ctk/application/terminal.hpp>
using namespace std;
usin... |
a0b09f89b70901788c001fad3d80479541c1a925 | fc71b75acf7d89fade54c0f0d4f80aa593e6fccf | mashrurmoyukh/C-Plus-Plus_Phone-Book-Management-System | /Phone Book.cpp | C++ | cpp | 6,872 | no_license | #include "Phone Book.h"
#include<string>
PhoneBook::PhoneBook() {
TOA = 0;
}
PhoneBook::~PhoneBook() { }
void PhoneBook::Handle() {
char c = 0;
while(c != 'x') {
cout<<endl;
cout<<"...............................PHONE BOOK.........................."<<endl;
cout<<"=====... |
b44e600171994e3bfb7a973f4bd4007ff8d9ae2c | 1aed5c05b569fd92d25faad2c904d0f30cbd74cf | davidstandard/rockbox-fft | /rbutil/rbutilqt/systrace.cpp | C++ | cpp | 2,128 | no_license | /***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
777d3b2ff367b9d1ce09d82291ca567f72c96e15 | d656dfc666afb2395ff191e1d1935697b2ddafca | zy4kamu/Coda | /src/algorithms/Phoenix/NLUPhoenix/SlotTransformer.cpp | C++ | cpp | 6,070 | permissive |
#include "SlotTransformer.h"
using std::unordered_map;
using std::string;
using std::wstring;
using std::vector;
SlotTransformer::SlotTransformer()
{
//mapInt.insert(std::make_pair("convertHours", &SlotTransformer::convertHours));
name_FUNC.insert(std::make_pair(L"normalize_time", &SlotTransformer::normalizeTime)... |
d99f3a59a66ff15a4ce85afa29ab6923b04f7444 | fba2f13eb82f12b2cff8537b9c642b7d817ee4a7 | Samsung/Castanets | /ui/events/win/events_win_utils.cc | C++ | cc | 16,493 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdint.h>
#include "ui/events/event_constants.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "base/win/windowsx_shim.h"
#in... |
58e7328a2a37fc021870ab37ab48a1033aca6ec7 | d6a492e7ca2094dd10233b846ff268dfea2d0224 | erkkiperkele/6281_2 | /Programming/Squicksort/Squicksort.cpp | C++ | cpp | 1,686 | no_license | #include <stdio.h>
#include <cstdlib>
#include <vector>
#include <fstream>
#include <iostream>
#include <chrono>
using namespace std;
using namespace std::chrono;
void quicksort(vector<int>& values);
vector<int> LoadFromFile();
int compare(const void * a, const void * b);
void Print(vector<int>& values);
void PrintCh... |
ac49a8c3084dc7ee0e936609d032d28b800c0166 | bc807ad7463c0b3a568e54710a4824ce4c2a8732 | marco-c/gecko-dev-wordified-and-comments-removed | /gfx/skia/skia/src/image/SkImage_AndroidFactories.cpp | C++ | cpp | 7,132 | permissive | #
include
"
include
/
core
/
SkTypes
.
h
"
#
if
defined
(
SK_BUILD_FOR_ANDROID
)
&
&
__ANDROID_API__
>
=
26
#
include
"
include
/
android
/
SkImageAndroid
.
h
"
#
include
"
include
/
core
/
SkAlphaType
.
h
"
#
include
"
include
/
core
/
SkBitmap
.
h
"
#
include
"
include
/
core
/
SkColorSpace
.
h
"
#
include
"
include
... |
efe0efa7699cd51e9b639bade4040bd6ce31a144 | cc0a27f335afd503b9d88581e1853a1d2dd1fa18 | cms-externals/boost | /libs/log/example/doc/sinks_multifile.cpp | C++ | cpp | 2,151 | permissive | /*
* Copyright Andrey Semashev 2007 - 2014.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#include <string>
#include <iostream>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boo... |
a1040fb5848a68a0ad7e960e86655e65a7cc4f26 | fe49964db79023a202ab7f9eaa460c5ad765426e | nbrignol/actor-stdio | /src/Actor.cpp | C++ | cpp | 268 | no_license | #include <iostream>
#include "Actor.h"
Actor::Actor(){
this->position = Vector();
this->width = 0;
this->height = 0;
this->behavior = NULL;
this->name = "unknown";
}
void Actor::move(float elapsedMs) {
this->behavior->move(elapsedMs);
}
|
2cc0d6c7f55ba4d7460732dd601e3bf11f0fa13f | 462d1f71089ac2e9ae1cb6e04cfa96bab3ef3e19 | jaiskid/cppcode_practice | /Array/Second_largest.cpp | C++ | cpp | 411 | no_license | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int arr[1000];
for(int i=0;i<n;i++){
cin>>arr[i];
}
int largest=arr[0];
int second_largest=arr[1];
for(int i=0;i<n;i++){
if(largest<arr[i]){
largest=arr[i];
}
}
for(int i=0;i<n;i++){
if(arr[i]!=largest){
if(second_largest<arr[i]){... |
09a3c6646c0356e552e16eea8c33be932900f144 | dbe5a9b59d427e46ea2197c481456888df87f260 | liangbright/MDK | /Test/Test_LinearAlgebra/Test_Eigen/Main_Test.cpp | C++ | cpp | 302 | no_license | #include <iostream>
#include "mdkCommonType.h"
#include "TestEigen.h"
int main()
{
//Test_Constructor();
//Test_LinearEquationSolver_LeastSquares();
//Test_pinv();
//Test_inv();
//Test_rank();
Test_det();
//Test_SymmetricRealMatrixEigen();
std::system("pause");
return 1;
} |
1d984037c4d325ffeb188f2fa6f046491c6a3f47 | 4794f2defe977315ec3d8f0dc3d52d1bb505a44f | bismyc/Match3 | /Match3/src/graphics/Texture.cpp | C++ | cpp | 1,238 | no_license | #include "Texture.h"
#include "stb_image/stb_image.h"
Texture::Texture(const std::string& path)
:m_RendererID(0), m_FilePath(path), m_LocalBuffer(nullptr),
m_Width(0), m_Height(0), m_BPP(0)
{
stbi_set_flip_vertically_on_load(1);
m_LocalBuffer = stbi_load(path.c_str(), &m_Width, &m_Height, &m_BPP, 4);
GLCall(glG... |
d2bf4953d582363bd10374cd275ba1615fdeadec | 9da42ae0092072a65e023c0e1bae0ef7a2dc89ff | kaaveland/arrow | /cpp/src/arrow/flight/test_integration_server.cc | C++ | cc | 7,069 | permissive | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
b050196b44be2a4a184f207517a71440fd7de9c9 | c319c2354522ac582a4a4be57edc78d04ea7bada | moevm/oop | /8304/Samakaev_Dmitry/MovingUnitChain.cpp | C++ | cpp | 945 | no_license | #include "MovingUnitChain.h"
MovingUnitResult MovingUnitCoordinatesCheck::execute(Field& fld, int x_from, int y_from, int x_to, int y_to)
{
if (x_from < 0 || x_from >= fld.getX_SIZE() || y_from < 0 || y_from >= fld.getY_SIZE() ||
x_to < 0 || x_to >= fld.getX_SIZE() || y_to < 0 || y_to >= fld.getY_SIZE())
re... |
b859f4f427d8fb7e27396585fe04adeae0a50b00 | 765328721d65ca7257c6d59a7300c81be5c4826a | BlueEarthSecurity/ogs | /ProcessLib/HT/HTProcess.cpp | C++ | cpp | 11,198 | permissive | /**
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "HTProcess.h"
#include <cassert>
// TOD... |
7250524263b1221f8eac2564ab677b13f892c1a7 | c4fbe02bd982c415c2dd763d8ed05ac8927b7dd6 | wa008/acmcode | /codeforces/gym102253/b.cpp | C++ | cpp | 2,391 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5+7;
const int maxm = 2e6+7;
const int sz = 26;
const ll mod = 1e9+7;
int n,m,k;
char ch[maxn];
int arr[sz][maxn], len[sz];
int ans[30];
bool cmp(int i,int j){
if(len[i] != len[j]){
return len[i]<len[j];
... |
a4689b6cdfa96e46e08f5d05e59f3329787c15a8 | 20a50c8831e264d26b834c30286ceb6aaf2868e6 | OxOOO1/Renderer | /Bindable/VertexBuffer.cpp | C++ | cpp | 2,998 | no_license | #include "VertexBuffer.h"
void VertexBuffer::Create(Rendering & renderer, const RawVertexBuffer & vbuf)
{
CreateConst(renderer, vbuf.SizeBytes(), vbuf.GetVertexLayout().SizeBytes(), vbuf.GetDataConst());
}
void VertexBuffer::CreateConst(Rendering & renderer, UINT sizeBytes, UINT vertexSize, const void* data)
{... |
8a0463a7914162b9719a2557593d4fa4870799f6 | 50829de7204285d4d285b6d82cb355cece31cbe6 | co1rowjp/envoy | /test/common/http/filter/ratelimit_test.cc | C++ | cc | 20,900 | permissive | #include <memory>
#include <string>
#include <vector>
#include "common/buffer/buffer_impl.h"
#include "common/common/empty_string.h"
#include "common/config/filter_json.h"
#include "common/http/filter/ratelimit.h"
#include "common/http/headers.h"
#include "test/mocks/http/mocks.h"
#include "test/mocks/local_info/mock... |
3ff87764487bf0ccacb791662ee47d6f85352a21 | c3f110cf3099f753ac4be3f8ef1f0d7612926f29 | manimanis/Intranet | /Visual C++/RmtSensingSources/Common.cpp | C++ | cpp | 2,461 | permissive | #include "stdafx.h"
#include "Common.h"
// Définition de la fonction de tracage des flèches
void fleche(CDC *pDC, CRect rect, int type)
{
double sin_a, cos_a;
double dx, dy;
double sin_b = sin(PI / 12);
double cos_b = cos(PI / 12);
dx = (double)(rect.right - rect.left);
dy = (double)(rect.bottom - rect.top);
... |
8c37ef901f4103520fda481a2b9c26d20cbbeb5b | da5c7ee2e62a299effdf63a80b15aa7da3f37957 | weishengwu/Message-Queue | /Sender_257.cpp | C++ | cpp | 974 | no_license | #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <cstring>
#include <string>
#include <iostream>
#include <unistd.h>
#include <sys/wait.h>
#include <cstdlib>
#include <bits/stdc++.h>
#include "get_info.h"
using namespace std;
int main() {
int qid = msgget(ftok(".",'u'), 0);
// declare my m... |
94ec287cc37e8c0b09599ee184810251cb0ff960 | cff827d642ad4464060ef750936c8b59385842f1 | dknife/201501Lec_GamePhysics | /GPcode01_03_KinematicParticleExplosion/GPcode01_03_KinematicParticleExplosion/KinematicsSimulator.cpp | C++ | cpp | 730 | permissive | //
// KinematicsSimulator.cpp
// GPcode01_01_xcode
//
// Created by young-min kang on 3/27/15.
// Copyright (c) 2015 young-min kang. All rights reserved.
//
#include "KinematicsSimulator.h"
CKinematicSimulator::CKinematicSimulator() : CSimulator() {}
void CKinematicSimulator::init() {
for(int i=0;i<NUMPART... |
bdc7cb73cbca2f83ffe3b79e23f0e56fdd28ab08 | b39e9d846b93e78a1b0ae6988a12b3c2fa446a38 | project-oak/oak | /third_party/tflite-micro/tensorflow/lite/micro/kernels/pooling_common.cc | C++ | cc | 5,588 | 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... |
aa91f67ea0d9459d9e2f8e7be827870dde27d684 | 765e85904950e2296647efd3636af85a54bcf9bc | shengchiliu/Cpp-Primer-Answer | /Chapter-7/7.6/Sales_data.cpp | C++ | cpp | 737 | no_license | #include <iostream>
#include <string>
#include "Sales_data.h"
Sales_data & Sales_data::combine(const Sales_data & sa)
{
amount += sa.amount;
totalPrice += sa.totalPrice;
return *this;
}
double Sales_data::avg_price() const
{
if(amount)
return totalPrice / amount;
return 0;
}
Sales_data add(const Sales_data & ... |
191b3d3dfc0ab63500aba10fb30e3801c84ee2b3 | b89949335607bff38c4462d89da3a5ea81889b61 | WladimirW/alax | /Utilities/Miscellaneous/RenderWmvVideo/RenderWmvVideo.cpp | C++ | cpp | 4,076 | no_license | ////////////////////////////////////////////////////////////
// Copyright (C) Roman Ryltsov, 2013
// Created by Roman Ryltsov roman@alax.info
#include "stdafx.h"
#include <dshow.h>
#pragma comment(lib, "strmiids.lib")
#pragma region Windows SDK Tribute, qedit.h
struct __declspec(uuid("0579154a-2b53-4994-... |
ed30e0f3a099325c64949bdb103a81eb6a6be463 | 38e80384f424d0ef49ebdff94e2c61667d82240f | AbheekG/nao | /interfaces/nao/src/naointerface.cpp | C++ | cpp | 12,693 | permissive | /**
* @author Michael Quinlan
*
* Version : $Id$
* This file was generated by Aldebaran Robotics ModuleGenerator
*/
#include "naointerface.h"
#include <alvalue/alvalue.h>
#include <alcommon/alproxy.h>
#include <alcommon/albroker.h>
#include <almemoryfastaccess/almemoryfastaccess.h>
#include <alproxies/dcmproxy.... |
edd45266efa0852cfdd81bbbc5f845d625415c66 | bd1070f9dcda189b9de4755248a0d941e7340db9 | dorgeln/powerloader | /src/url.cpp | C++ | cpp | 9,350 | permissive | // Copyright (c) 2019, QuantStack and Mamba Contributors
//
// Distributed under the terms of the BSD 3-Clause License.
//
// The full license is in the file LICENSE, distributed with this software.
#include <filesystem>
#include "url.hpp"
#include "utils.hpp"
#include "openssl/md5.h"
#include <iostream>
#include <r... |
8e473d8d2e693dbb8c973d04ffcacc81a895af5a | fcfae31f2e52fe0a01434386a98ee2eeb1278f48 | data-storage/incubator-kudu | /src/kudu/tools/ksck_remote.cc | C++ | cc | 11,824 | permissive | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
1829d8308fa20ba8173a3067d6d5b9be0bb2b799 | f940ef824dc0d4372bb20f588ce34d91986e8139 | Bochacoin/Bochacoin-Core | /src/miner.cpp | C++ | cpp | 31,249 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-li... |
ecb0b2067047603767055f2bc7272fe53c3edea7 | 2226822d6f014f6c553b17202861b7a8b20762b0 | lbguilherme/duvidovc-app | /java/src/org.apache.http.util.cpp | C++ | cpp | 35,408 | no_license | #include "java-core.hpp"
#include <memory>
#include "java.lang.ClassLoader.hpp"
#include "java.lang.Object.hpp"
#include "java.lang.String.hpp"
#include "java.lang.Throwable.hpp"
#include "org.apache.http.HttpEntity.hpp"
#include "org.apache.http.util.ByteArrayBuffer.hpp"
#include "org.apache.http.util.CharArrayBuffer.... |
9b398a581a18972a004a9d74667199ea33b324e8 | e61d571d22c122b9cc1326d96e6a49db40b71e14 | unjambonakap/opa | /external/opa_plll/plll-1.0/plll/src/lattices/transform.cpp | C++ | cpp | 48,893 | permissive | /*
Copyright (c) 2011-2014 University of Zurich
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, m... |
9cc30227a5973fe5796bf64fb083b1c0e4712f4f | 76b221fc52b5a06a0b9cc6920769438df598cd59 | govardhan100/Hackerearth | /hacker_earth/ Bishu_and_Soldiers .cpp | C++ | cpp | 766 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int binary_search(int* a,int &l,int &r,int key){
int m=l+((r-l)/2);
if(r<l){return -1;}
if(a[m]==key){
l=m+1;
//cout<<"R: "<<r<<"l:"<<l<<endl;
while(binary_search(a,l,r,key)!=-1){
l++;
}
l--;
return l;
}
if(a[m]>key){r=m-1;}
else{l=m+1;}
return... |
84469ca15b413b9f970ba052e380be02e68e64ad | 1cfca207f88c9e8c76ada23e30e359154afaea01 | Anzsley/My_Juliet_Test_Suite_v1.3_for_C_Cpp | /C/testcases/CWE126_Buffer_Overread/s02/CWE126_Buffer_Overread__new_char_loop_54c.cpp | C++ | cpp | 1,112 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE126_Buffer_Overread__new_char_loop_54c.cpp
Label Definition File: CWE126_Buffer_Overread__new.label.xml
Template File: sources-sink-54c.tmpl.cpp
*/
/*
* @description
* CWE: 126 Buffer Over-read
* BadSource: Use a small buffer
* GoodSource: Use a large buffer
* Sink... |
95cd2402d7d5f706440931d4d44f29297d0c4e67 | 9c86361e628c2bd9e27ffe2a2660b5534b7003d2 | tngamemo/sumokoin | /src/cryptonote_core/cryptonote_format_utils.cpp | C++ | cpp | 46,232 | permissive | // Copyright (c) 2016-2017, SUMOKOIN, (forked from) The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyr... |
d247dac064f9d15c74001ad98d86cccfe769afc2 | 347cf175e74c08b8b37aebb8916dbf572128bc33 | bstatcomp/math | /stan/math/prim/prob/skew_normal_rng.hpp | C++ | hpp | 2,567 | permissive | #ifndef STAN_MATH_PRIM_PROB_SKEW_NORMAL_RNG_HPP
#define STAN_MATH_PRIM_PROB_SKEW_NORMAL_RNG_HPP
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/err.hpp>
#include <stan/math/prim/fun/max_size.hpp>
#include <stan/math/prim/prob/normal_rng.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/r... |
b33c64bb55547c0d7a8a38a076f7615402d44cf8 | 4dcc479188cf0ef755ab7dafa5b44fc2db5a118f | al3ks1002/Competitive-Programming-Library | /src/graphs/strongly-connected-components/SCCGraph.cpp | C++ | cpp | 2,503 | no_license | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
class SCCGraph {
public:
explicit SCCGraph(const int num_vertices) : num_vertices_(num_vertices) {
edges_.resize(num_vertices + 1);
transpose_edges_.resize(num_vertices + 1);
visited_.resize(num_vertices ... |
9b33c8c5227a5fcf5af4ed48eb00566e9d41ef8d | de377ca66b4fe1d9d614b5e7681f9f91f504a8f8 | rosoareslv/SED99 | /c++/rdkit/2016/8/MaximumCommonSubgraph.cpp | C++ | cpp | 45,447 | no_license | //
// Copyright (C) 2014 Novartis Institutes for BioMedical Research
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <list>
#incl... |
d9135021dcf2fe02034e2e1d13a297a619153e70 | 6a9e36a3a2815355a7bac5c5cfc07c1d2e5cc1bc | flingengine/json | /test/src/unit-alt-string.cpp | C++ | cpp | 6,858 | permissive | /*
__ _____ _____ _____
__| | __| | | | JSON for Modern C++ (test suite)
| | |__ | | | | | | version 3.7.0
|_____|_____|_____|_|___| https://github.com/nlohmann/json
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
Copyright (c) 2018 Vitaliy Manus... |
c688e715d8494217c393a4fa8f2abbf1d976724e | 5f6e9afc8163a0a031ed35b96f7b77bd36266229 | Ted-Huang/IPCdemo | /IPCdemo/IPCdemo.cpp | C++ | cpp | 3,122 | no_license |
// IPCdemo.cpp : 定義應用程式的類別行為。
//
#include "stdafx.h"
#include "IPCdemo.h"
#include "IPCdemoDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CIPCdemoApp
BEGIN_MESSAGE_MAP(CIPCdemoApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CIPCdemoApp 建構
CIPCdemoApp::CIPCdemoApp()
{
// 支援重新啟動管... |
cbca6ebc828f58e17e26d516ceeb499e821e0889 | 096e7c507b079d2aee3d15afa0ab3669895c9764 | YannGarcia/repo | /dev/g++/projects/embedded/helper/src/obstream.cc | C++ | cc | 11,810 | permissive | /*!
* \file obstream.cpp
* \brief Implementation file for output binary stream.
* \author garciay.yann@gmail.com
* \copyright Copyright (c) 2015-2017 ygarcia. All rights reserved
* \license This project is released under the MIT License
* \version 0.1
*/
#include <iostream>
#include <iomanip>
#in... |
a5f4e9e1851b8b1bd95d158017b4cc4aaa003a4e | 65eccb6be2fb85b5957efbeab7956bfe4ce3987b | marvinwilliams/rantanplan | /src/encoder/lifted_foreach_encoder.cpp | C++ | cpp | 13,968 | permissive | #include "encoder/lifted_foreach_encoder.hpp"
#include "config.hpp"
#include "encoder/encoder.hpp"
#include "encoder/support.hpp"
#include "logging/logging.hpp"
#include "model/normalized/model.hpp"
#include "model/normalized/utils.hpp"
#include "planner/planner.hpp"
#include "sat/formula.hpp"
#include <algorithm>
#in... |
78fda5c58c1e19c6a7943f0f5f9ca5db6ad35060 | 2497b1c8eb94f72a9f836dc1355453bc0f222aba | GLP90/cmssw | /FastSimulation/Tracking/plugins/SealModule.cc | C++ | cc | 814 | no_license | #include "FWCore/Framework/interface/MakerMacros.h"
#include "FastSimulation/Tracking/plugins/TrajectorySeedProducer.h"
#include "FastSimulation/Tracking/plugins/TrackCandidateProducer.h"
#include "FastSimulation/Tracking/plugins/PixelTracksProducer.h"
#include "FastSimulation/Tracking/plugins/SimTrackIdProducer.h"
#in... |
7af5906bc8e45de13bd42d7f4f04437f49985c4e | 16ef2399f7c7e926a008a4f51f7a741c6567cf0d | denysegh/armnn | /src/profiling/SendThread.cpp | C++ | cpp | 9,857 | permissive | //
// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "SendThread.hpp"
#include "ProfilingUtils.hpp"
#include <armnn/Exceptions.hpp>
#include <armnn/Conversion.hpp>
#include <armnn/utility/NumericCast.hpp>
#include <Processes.hpp>
#include <boost/format.hp... |
dff5b593262d48ba54bcdc5a66669ff5d66c44aa | 4a68b0bdcb97dffd008b54f9e6837c4a8297df51 | kod3r/icnc | /src/dist/distributor.cpp | C++ | cpp | 17,000 | permissive | /* *******************************************************************************
* Copyright (c) 2007-2014, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of so... |
37e87de3f04c01da37b8510e101a8c399a61dff1 | 916a1908097e344ac608119191061dd1089b9960 | Rayxxx777/praktikum2 | /praktikum3a.cpp | C++ | cpp | 505 | no_license | #include <iostream>
using ramespace std;
int main()
{
intn a,b,c;
cout << "masukan nilai pertama : ";
cin >>a;
cout << "masukan nilai kedua : ";
cin >>b;
cout << "masukan nilai ketiga : ";
cin >>c;
if (a>b)
{
if(a>c)
cout << "bilangan terbesar adalah : " << a;
else
cout << "... |
520eaa8e0cb949af2e483893a41c9a137c96cb24 | 5c77ccdcbf5fd66368ecb7455a691891d9febde8 | chihlee/phantomjs | /src/qt/qtbase/src/corelib/io/qdebug.cpp | C++ | cpp | 12,812 | permissive | /****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** License... |
d861d7b282d8da743e209c2a71b99c00c560d40f | ae434ac80e8677ff0e68212a7ca09c8be070ba64 | mapron/Wuild | /3rdparty/ninja/src/msvc_helper_main-win32.cc | C++ | cc | 4,012 | permissive | // Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
3d157a54a0847d739c0e361e2ecea2c50014faa3 | bce7f04aa41fb5376f3c886552465d763348ab22 | JerryShih/iree | /iree/compiler/Conversion/LinalgToSPIRV/VectorToGPUPass.cpp | C++ | cpp | 17,131 | permissive | // Copyright 2020 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... |
d49224fc3e00416989072cd4b8069126d894aed8 | d9cbf2cec2dbf01f330a96692384956baef4d5e8 | shingchuang/intelRSD | /PSME/common/agent-framework/src/module-ref/requests/network/delete_port_static_mac.cpp | C++ | cpp | 1,691 | permissive | /*!
* @section LICENSE
*
* @copyright
* Copyright (c) 2015-2016 Intel Corporation
*
* @copyright
* 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
*
* @copyright
* http://www.apach... |
6566c0fc5b2883385d477f5501f9f1a106a3696b | 673c5acd9b4d53fd96f361f4d48ca5a73238b1a5 | Diren52/Data-Abstraction-and-structures | /WeatherValue/WeatherValuetest.cpp | C++ | cpp | 1,945 | no_license | #include "WeatherValue.h"
#include <iostream>
void testplan1();
void testplan2();
void testplan3();
void testplan4();
void testplan5();
void testplan6();
using namespace std;
int main()
{
cout << "Test 1: Defualt constructor";
testplan1();
cout << "Test 2:initializing using the default co... |
ac710f9590b0865dc0ce3614466933334b4f77cf | 88dc83a9102dba0065f0cb5256351f8acc2d3ee6 | ghostec/WhiteOld | /Renderer/src/Helpers/OpenGL/ShaderHelper.cpp | C++ | cpp | 2,398 | no_license | #include "Renderer/Helpers/OpenGL/ShaderHelper.h"
namespace ShaderHelper
{
void setLight( Shader *shader, Light* light )
{
WMath::vec3 pos = light->getPosition();
WMath::vec3 col = light->getColor();
shader->setUniform( "lights[0].position", pos.vec );
shader->setUniform( "lights[0].intensities", ... |
fac1a557afe0f54f4f58d2f1693053526a580752 | 16281397a6a1d568f01faf604d6e30a7d85d018f | AMReX-FHD/FHDeX | /exec/compressible_stag_mui/SPPARKS_MUI/app_ising.cpp | C++ | cpp | 5,351 | permissive | /* ----------------------------------------------------------------------
SPPARKS - Stochastic Parallel PARticle Kinetic Simulator
http://www.cs.sandia.gov/~sjplimp/spparks.html
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
Copyright (2008) Sandia Corporation. Under the terms of Contrac... |
2fce834b3e01eb6045dab8a2b3b5223cd79e0125 | 3ca3c44a060d2af86f3cd86458bd3fbe77efc5db | DarkPassion/libcommon | /src/task/thread_queue.cpp | C++ | cpp | 2,868 | no_license |
#include <unistd.h>
#include <algorithm>
#include "task/thread_queue.h"
#include "util/log.h"
namespace libcommon {
ThreadQueue::ThreadQueue(const char* name) : _queue_push_cond(_queue_mutex)
{
_pth = new ThreadImp(name, this, 1000, true);
_pth->start();
LOGD("ThreadQueue ---... |
321b457d7b511dae953b84b776e805d057b3e691 | d63a35de0c6b88e625b2467081a09dd5cd3f0105 | Mani5871/GeeksforGeeks | /Strings/Distinct Characters using sliding window.cpp | C++ | cpp | 662 | no_license | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
//code
int t;
cin >> t;
while(t--)
{
string str;
cin >> str;
int i, j, k, cnt = 0, max = 0;
unordered_map<char, bool> map1;
for(i = 0; i < str.size(); i ++)
{
cnt = 0;
ma... |
a25fa73c085cf5bf26d38e7bec5149a4e25df3a0 | 26b772fca012e54b36ea035e10dddfb9b3ef5546 | LeeYuHwan/AlgorithmStudy | /200604/완주하지못한선수_정민수.cpp | C++ | cpp | 495 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
string solution(vector<string> participant, vector<string> completion)
{
string answer = "";
sort(participant.begin(), participant.end());
sort(completion.begin(), completion.end());
for (int i = 0; i < ... |
bd596c670e49684d2b3d6c992087312eb3cc86f3 | e79921e6de65d4eb49c1ab440d2656f93757e5b6 | leoncwu/leetcode | /algorithms/cpp/1_two_sum/two_sumII.cpp | C++ | cpp | 305 | no_license | class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
unordered_map<int, int> search;
for (int i = 0; i < nums.size(); ++i) {
if (search.count(target - nums[i])) {
return {search[target - nums[i]], i};
}
search[nums[i]] = i;
}
return {};
}
};
|
b32c406cd4c0a9ba96fb5678c397e92f6920a42a | a5ee4252cab50d915216c8eb1a65af712d009bd0 | Stoven-Dubois/Babybot | /code_ros/src/babybot_navigation/src/vitesse_suivi.cpp | C++ | cpp | 1,654 | no_license | #include <stdio.h>
#include <cmath>
#include <../../opt/ros/indigo/include/geometry_msgs/Twist.h>
#include "ros/ros.h"
#include "std_msgs/Float32MultiArray.h"
#include <std_msgs/MultiArrayLayout.h>
#include "std_msgs/Int32.h"
#include <std_msgs/MultiArrayDimension.h>
std_msgs::Int32 test;
ros::Publisher pub; //decl... |
cc1d581aee5b3d045dd1c4f783db7ead39277084 | 85dd1f6d79d064e7998988753313ca003a332dcc | frayien/Projet_optimisation | /src/question5.cpp | C++ | cpp | 717 | no_license | #include "question.h"
#include <iostream>
#include "Solution.h"
void question::question5([[maybe_unused]] Config const& config)
{
std::cout << " ------------ Opérateurs de voisinage ------------ " << std::endl << std::endl;
Solution sol(10);
sol.add_bin();
sol.insert(0, 5);
sol.add_bin();
s... |
a844758964154672a564675daf2ff171033f25e0 | acc0843da27cf50a6f38afb4171a27b10bcd3197 | PetreCatalin/Concursuri-Programare-Competitiva | /Alte concursuri/turn/main.cpp | C++ | cpp | 1,269 | no_license | #include <fstream>
using namespace std;
long int d,n,m,x[105],r[105],i,j,a[105][105],b[105],c[105],minim,aux;
int main()
{
ifstream f("turn.in");
ofstream g("turn.out");
f>>d>>n>>m;
for (i=1;i<=n;i++) {
f>>x[i];
if (i==1) {
for (j=1;j<=d;j++)
a[1][j]=j*x[i];
}
... |
50fb10b4e21f6a585840e4d70887d28bda789065 | 89682bf7f1340144eda83306b89dc276cccc2665 | nee4545/Guildhall | /Engine/Code/Engine/Math/Mat44.cpp | C++ | cpp | 11,836 | no_license | #include "Engine/Math/Mat44.hpp"
#include "Engine/Math/MathUtils.hpp"
Mat44::Mat44( float* sixteenValuesBasisMajor )
{
Ix = sixteenValuesBasisMajor[0];
Iy = sixteenValuesBasisMajor[1];
Iz = sixteenValuesBasisMajor[2];
Iw = sixteenValuesBasisMajor[3];
Jx = sixteenValuesBasisMajor[4];
Jy = sixteenValuesBasisMajo... |
f93e0dcb624bd92067ca95b962622b6f668700fb | ed814a459cdc93eead8a8db0734665cdf6dc446d | unvestigate/libyojimbo | /yojimbo_sockets.cpp | C++ | cpp | 12,016 | permissive | /*
Yojimbo Client/Server Network Protocol Library.
Copyright © 2016, The Network Protocol Company, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain ... |
2172953fbe3c1cc354034160304927de717649b8 | 73fe57b70cb6e8ab4be53f9ac49c8c504e64d1a7 | roznet/connectstats | /FitFileExplorer/FitSDKRelease_20/fit.cpp | C++ | cpp | 4,927 | permissive | ////////////////////////////////////////////////////////////////////////////////
// The following FIT Protocol software provided may be used with FIT protocol
// devices only and remains the copyrighted property of Dynastream Innovations Inc.
// The software is being provided on an "as-is" basis and as an accommodat... |
48443291f8b74a29bf510877caed7125d3bf7fbe | 32f6eea9f9023afcf2b23288dda10e264d9562e9 | SteveBronder/math | /stan/math/fwd/fun/fmin.hpp | C++ | hpp | 1,882 | permissive | #ifndef STAN_MATH_FWD_FUN_FMIN_HPP
#define STAN_MATH_FWD_FUN_FMIN_HPP
#include <stan/math/fwd/meta.hpp>
#include <stan/math/fwd/core.hpp>
#include <stan/math/prim/fun/constants.hpp>
#include <stan/math/prim/fun/fmin.hpp>
#include <stan/math/prim/fun/is_nan.hpp>
namespace stan {
namespace math {
template <typename T>... |
3825d54d516df9dfcb337dc3fbe0d5027bd64e0f | c83046e50950f697b218282912caadfb6ae31e22 | revrepo/old_stuff | /rmp-server/src/queue.cpp | C++ | cpp | 28,880 | no_license | /*****************************************************************************
Copyright (c) 2001 - 2011, The Board of Trustees of the University of Illinois.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
m... |
71930ba1dfbafb35c7ebf0e50b061eb68c110ce9 | c9da83d47ed2322534aec6f4bd93f9a2c122fd76 | kai-xie/play-with-compiler | /06_13_playscript-cpp/PlayScriptCompiler.cpp | C++ | cpp | 2,320 | no_license | #include "PlayScriptCompiler.h"
#include "ASTEvaluator.h"
#include "AntlrPlayScript.h"
#include "ClosureAnalyzer.h"
#include "RefResolver.h"
#include "SemanticValidator.h"
#include "TypeAndScopeScanner.h"
#include "TypeChecker.h"
#include "TypeResolver.h"
namespace play {
std::shared_ptr<AnnotatedTree> PlayScriptCom... |
9ed677fb178c75db3ef23f42df927de3c06fd106 | 1a14c7f72597e61edf522d1db3b051c9e641daaa | roussukke/Yorozuya | /library/ATF/FolderItems3.hpp | C++ | hpp | 271 | permissive | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <FolderItems2.hpp>
START_ATF_NAMESPACE
struct FolderItems3 : FolderItems2
{
};
END_ATF_NAMESPACE
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.